From eb2c60afbf7fa4a1ded36849bf6fdb8dfa9e3d8c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 6 Aug 2026 21:05:09 +0000 Subject: [PATCH 1/2] chore: update protobuf to 33.2 and rules_python to 1.6.0 PiperOrigin-RevId: 960369644 Source-Link: https://github.com/googleapis/googleapis/commit/fc62df08979faf46d3c4d7eec30c57e6046a29f1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/80c59368f6b8c91fcf55e9f937519203b45c22f3 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3JldF9tYW5hZ2VyLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3JldF9tYW5hZ2VyLXYxYmV0YTIvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyZV9zb3VyY2VfbWFuYWdlci12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5LXByaXZhdGVfY2EtdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5LXByaXZhdGVfY2EtdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5X2NlbnRlci12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5X2NlbnRlci12MXAxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5X2NlbnRlci12Mi8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5X2NlbnRlcl9tYW5hZ2VtZW50LXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlcnZpY2VfY29udHJvbC12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlcnZpY2VfZGlyZWN0b3J5LXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlcnZpY2VfaGVhbHRoLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlcnZpY2VfbWFuYWdlbWVudC12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlcnZpY2VfdXNhZ2UtdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNoZWxsLXYxLy5Pd2xCb3QueWFtbCIsImgiOiI4MGM1OTM2OGY2YjhjOTFmY2Y1NWU5ZjkzNzUxOTIwM2I0NWMyMmYzIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNwYW5uZXItYWRtaW4tZGF0YWJhc2UtdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNwYW5uZXItYWRtaW4taW5zdGFuY2UtdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNwYW5uZXItdjEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNwZWVjaC12MS8uT3dsQm90LnlhbWwiLCJoIjoiODBjNTkzNjhmNmI4YzkxZmNmNTVlOWY5Mzc1MTkyMDNiNDVjMjJmMyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNwZWVjaC12MXAxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6IjgwYzU5MzY4ZjZiOGM5MWZjZjU1ZTlmOTM3NTE5MjAzYjQ1YzIyZjMifQ== --- .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 93 + ...oogle-cloud-secret_manager-v1beta1.gemspec | 30 + .../google-cloud-secret_manager-v1beta1.rb | 21 + .../google/cloud/secret_manager/v1beta1.rb | 45 + .../v1beta1/bindings_override.rb | 75 + .../cloud/secret_manager/v1beta1/rest.rb | 38 + .../v1beta1/secret_manager_service.rb | 61 + .../v1beta1/secret_manager_service/client.rb | 1944 +++++ .../secret_manager_service/credentials.rb | 51 + .../v1beta1/secret_manager_service/paths.rb | 83 + .../v1beta1/secret_manager_service/rest.rb | 59 + .../secret_manager_service/rest/client.rb | 1804 ++++ .../rest/service_stub.rb | 1004 +++ .../cloud/secret_manager/v1beta1/version.rb | 28 + .../cloud/secrets/v1beta1/resources_pb.rb | 32 + .../cloud/secrets/v1beta1/service_pb.rb | 45 + .../secrets/v1beta1/service_services_pb.rb | 117 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/secrets/v1beta1/resources.rb | 189 + .../google/cloud/secrets/v1beta1/service.rb | 261 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../access_secret_version.rb | 47 + .../add_secret_version.rb | 47 + .../secret_manager_service/create_secret.rb | 47 + .../secret_manager_service/delete_secret.rb | 47 + .../destroy_secret_version.rb | 47 + .../disable_secret_version.rb | 47 + .../enable_secret_version.rb | 47 + .../secret_manager_service/get_iam_policy.rb | 47 + .../secret_manager_service/get_secret.rb | 47 + .../get_secret_version.rb | 47 + .../list_secret_versions.rb | 51 + .../secret_manager_service/list_secrets.rb | 51 + .../secret_manager_service/set_iam_policy.rb | 47 + .../test_iam_permissions.rb | 47 + .../secret_manager_service/update_secret.rb | 47 + ...metadata_google.cloud.secrets.v1beta1.json | 615 ++ .../secret_manager_service_paths_test.rb | 79 + .../secret_manager_service_rest_test.rb | 921 ++ .../v1beta1/secret_manager_service_test.rb | 1008 +++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 93 + ...oogle-cloud-secret_manager-v1beta2.gemspec | 30 + .../google-cloud-secret_manager-v1beta2.rb | 21 + .../google/cloud/secret_manager/v1beta2.rb | 45 + .../v1beta2/bindings_override.rb | 75 + .../cloud/secret_manager/v1beta2/rest.rb | 38 + .../v1beta2/secret_manager_service.rb | 61 + .../v1beta2/secret_manager_service/client.rb | 1998 +++++ .../secret_manager_service/credentials.rb | 51 + .../v1beta2/secret_manager_service/paths.rb | 167 + .../v1beta2/secret_manager_service/rest.rb | 59 + .../secret_manager_service/rest/client.rb | 1858 ++++ .../rest/service_stub.rb | 1117 +++ .../cloud/secret_manager/v1beta2/version.rb | 28 + .../secretmanager/v1beta2/resources_pb.rb | 41 + .../cloud/secretmanager/v1beta2/service_pb.rb | 45 + .../v1beta2/service_services_pb.rb | 125 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../cloud/secretmanager/v1beta2/resources.rb | 512 ++ .../cloud/secretmanager/v1beta2/service.rb | 321 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../access_secret_version.rb | 47 + .../add_secret_version.rb | 47 + .../secret_manager_service/create_secret.rb | 47 + .../secret_manager_service/delete_secret.rb | 47 + .../destroy_secret_version.rb | 47 + .../disable_secret_version.rb | 47 + .../enable_secret_version.rb | 47 + .../secret_manager_service/get_iam_policy.rb | 47 + .../secret_manager_service/get_secret.rb | 47 + .../get_secret_version.rb | 47 + .../list_secret_versions.rb | 51 + .../secret_manager_service/list_secrets.rb | 51 + .../secret_manager_service/set_iam_policy.rb | 47 + .../test_iam_permissions.rb | 47 + .../secret_manager_service/update_secret.rb | 47 + ...ta_google.cloud.secretmanager.v1beta2.json | 615 ++ .../secret_manager_service_paths_test.rb | 109 + .../secret_manager_service_rest_test.rb | 927 ++ .../v1beta2/secret_manager_service_test.rb | 1020 +++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 278 + ...gle-cloud-secure_source_manager-v1.gemspec | 30 + .../google-cloud-secure_source_manager-v1.rb | 21 + .../google/cloud/secure_source_manager/v1.rb | 45 + .../v1/bindings_override.rb | 108 + .../cloud/secure_source_manager/v1/rest.rb | 38 + .../v1/secure_source_manager.rb | 58 + .../v1/secure_source_manager/client.rb | 5883 +++++++++++++ .../v1/secure_source_manager/credentials.rb | 47 + .../v1/secure_source_manager/operations.rb | 843 ++ .../v1/secure_source_manager/paths.rb | 313 + .../v1/secure_source_manager/rest.rb | 56 + .../v1/secure_source_manager/rest/client.rb | 5485 ++++++++++++ .../secure_source_manager/rest/operations.rb | 927 ++ .../rest/service_stub.rb | 3278 ++++++++ .../cloud/secure_source_manager/v1/version.rb | 28 + .../v1/secure_source_manager_pb.rb | 129 + .../v1/secure_source_manager_services_pb.rb | 170 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1/secure_source_manager.rb | 1857 ++++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../batch_create_pull_request_comments.rb | 54 + .../secure_source_manager/close_issue.rb | 54 + .../close_pull_request.rb | 54 + .../create_branch_rule.rb | 54 + .../secure_source_manager/create_hook.rb | 54 + .../secure_source_manager/create_instance.rb | 54 + .../secure_source_manager/create_issue.rb | 54 + .../create_issue_comment.rb | 54 + .../create_pull_request.rb | 54 + .../create_pull_request_comment.rb | 54 + .../create_repository.rb | 54 + .../delete_branch_rule.rb | 54 + .../secure_source_manager/delete_hook.rb | 54 + .../secure_source_manager/delete_instance.rb | 54 + .../secure_source_manager/delete_issue.rb | 54 + .../delete_issue_comment.rb | 54 + .../delete_pull_request_comment.rb | 54 + .../delete_repository.rb | 54 + .../secure_source_manager/fetch_blob.rb | 47 + .../secure_source_manager/fetch_tree.rb | 51 + .../secure_source_manager/get_branch_rule.rb | 47 + .../secure_source_manager/get_hook.rb | 47 + .../get_iam_policy_repo.rb | 47 + .../secure_source_manager/get_instance.rb | 47 + .../secure_source_manager/get_issue.rb | 47 + .../get_issue_comment.rb | 47 + .../secure_source_manager/get_pull_request.rb | 47 + .../get_pull_request_comment.rb | 47 + .../secure_source_manager/get_repository.rb | 47 + .../list_branch_rules.rb | 51 + .../secure_source_manager/list_hooks.rb | 51 + .../secure_source_manager/list_instances.rb | 51 + .../list_issue_comments.rb | 51 + .../secure_source_manager/list_issues.rb | 51 + .../list_pull_request_comments.rb | 51 + .../list_pull_request_file_diffs.rb | 51 + .../list_pull_requests.rb | 51 + .../list_repositories.rb | 51 + .../merge_pull_request.rb | 54 + .../secure_source_manager/open_issue.rb | 54 + .../open_pull_request.rb | 54 + .../resolve_pull_request_comments.rb | 54 + .../set_iam_policy_repo.rb | 47 + .../test_iam_permissions_repo.rb | 47 + .../unresolve_pull_request_comments.rb | 54 + .../update_branch_rule.rb | 54 + .../secure_source_manager/update_hook.rb | 54 + .../secure_source_manager/update_issue.rb | 54 + .../update_issue_comment.rb | 54 + .../update_pull_request.rb | 54 + .../update_pull_request_comment.rb | 54 + .../update_repository.rb | 54 + ...a_google.cloud.securesourcemanager.v1.json | 2095 +++++ .../secure_source_manager_operations_test.rb | 400 + .../v1/secure_source_manager_paths_test.rb | 211 + .../v1/secure_source_manager_rest_test.rb | 2973 +++++++ .../v1/secure_source_manager_test.rb | 3466 ++++++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 163 + ...oogle-cloud-security-private_ca-v1.gemspec | 30 + .../google-cloud-security-private_ca-v1.rb | 21 + .../google/cloud/security/private_ca/v1.rb | 47 + .../private_ca/v1/bindings_override.rb | 158 + .../v1/certificate_authority_service.rb | 60 + .../certificate_authority_service/client.rb | 3815 +++++++++ .../credentials.rb | 53 + .../operations.rb | 845 ++ .../v1/certificate_authority_service/paths.rb | 155 + .../v1/certificate_authority_service/rest.rb | 58 + .../rest/client.rb | 3578 ++++++++ .../rest/operations.rb | 929 ++ .../rest/service_stub.rb | 1867 +++++ .../cloud/security/private_ca/v1/rest.rb | 40 + .../cloud/security/private_ca/v1/version.rb | 30 + .../security/privateca/v1/resources_pb.rb | 81 + .../cloud/security/privateca/v1/service_pb.rb | 71 + .../privateca/v1/service_services_pb.rb | 150 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../cloud/security/privateca/v1/resources.rb | 1725 ++++ .../cloud/security/privateca/v1/service.rb | 1041 +++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../activate_certificate_authority.rb | 54 + .../create_ca_pool.rb | 54 + .../create_certificate.rb | 47 + .../create_certificate_authority.rb | 54 + .../create_certificate_template.rb | 54 + .../delete_ca_pool.rb | 54 + .../delete_certificate_authority.rb | 54 + .../delete_certificate_template.rb | 54 + .../disable_certificate_authority.rb | 54 + .../enable_certificate_authority.rb | 54 + .../fetch_ca_certs.rb | 47 + .../fetch_certificate_authority_csr.rb | 47 + .../get_ca_pool.rb | 47 + .../get_certificate.rb | 47 + .../get_certificate_authority.rb | 47 + .../get_certificate_revocation_list.rb | 47 + .../get_certificate_template.rb | 47 + .../list_ca_pools.rb | 51 + .../list_certificate_authorities.rb | 51 + .../list_certificate_revocation_lists.rb | 51 + .../list_certificate_templates.rb | 51 + .../list_certificates.rb | 51 + .../revoke_certificate.rb | 47 + .../undelete_certificate_authority.rb | 54 + .../update_ca_pool.rb | 54 + .../update_certificate.rb | 47 + .../update_certificate_authority.rb | 54 + .../update_certificate_revocation_list.rb | 54 + .../update_certificate_template.rb | 54 + ...ta_google.cloud.security.privateca.v1.json | 1175 +++ ...icate_authority_service_operations_test.rb | 400 + ...ertificate_authority_service_paths_test.rb | 115 + ...certificate_authority_service_rest_test.rb | 1726 ++++ .../v1/certificate_authority_service_test.rb | 2017 +++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 118 + ...-cloud-security-private_ca-v1beta1.gemspec | 28 + ...oogle-cloud-security-private_ca-v1beta1.rb | 21 + .../cloud/security/private_ca/v1beta1.rb | 47 + .../v1beta1/certificate_authority_service.rb | 59 + .../certificate_authority_service/client.rb | 2616 ++++++ .../credentials.rb | 53 + .../operations.rb | 845 ++ .../certificate_authority_service/paths.rb | 132 + .../certificate_authority_service/rest.rb | 56 + .../rest/client.rb | 2433 ++++++ .../rest/operations.rb | 929 ++ .../rest/service_stub.rb | 1314 +++ .../cloud/security/private_ca/v1beta1/rest.rb | 39 + .../security/private_ca/v1beta1/version.rb | 30 + .../privateca/v1beta1/resources_pb.rb | 67 + .../security/privateca/v1beta1/service_pb.rb | 57 + .../privateca/v1beta1/service_services_pb.rb | 99 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../security/privateca/v1beta1/resources.rb | 1001 +++ .../security/privateca/v1beta1/service.rb | 633 ++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../activate_certificate_authority.rb | 54 + .../create_certificate.rb | 47 + .../create_certificate_authority.rb | 54 + .../disable_certificate_authority.rb | 54 + .../enable_certificate_authority.rb | 54 + .../fetch_certificate_authority_csr.rb | 47 + .../get_certificate.rb | 47 + .../get_certificate_authority.rb | 47 + .../get_certificate_revocation_list.rb | 47 + .../get_reusable_config.rb | 47 + .../list_certificate_authorities.rb | 51 + .../list_certificate_revocation_lists.rb | 51 + .../list_certificates.rb | 51 + .../list_reusable_configs.rb | 51 + .../restore_certificate_authority.rb | 54 + .../revoke_certificate.rb | 47 + .../schedule_delete_certificate_authority.rb | 54 + .../update_certificate.rb | 47 + .../update_certificate_authority.rb | 54 + .../update_certificate_revocation_list.rb | 54 + ...ogle.cloud.security.privateca.v1beta1.json | 815 ++ ...icate_authority_service_operations_test.rb | 400 + ...ertificate_authority_service_paths_test.rb | 103 + ...certificate_authority_service_rest_test.rb | 1216 +++ .../certificate_authority_service_test.rb | 1412 ++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-security_center-v1/.toys.rb | 28 + .../google-cloud-security_center-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-security_center-v1/Gemfile | 15 + .../LICENSE.md | 201 + .../google-cloud-security_center-v1/README.md | 153 + .../google-cloud-security_center-v1/Rakefile | 169 + .../gapic_metadata.json | 333 + .../google-cloud-security_center-v1.gemspec | 29 + .../lib/google-cloud-security_center-v1.rb | 21 + .../lib/google/cloud/security_center/v1.rb | 45 + .../google/cloud/security_center/v1/rest.rb | 37 + .../security_center/v1/security_center.rb | 56 + .../v1/security_center/client.rb | 7460 +++++++++++++++++ .../v1/security_center/credentials.rb | 51 + .../v1/security_center/operations.rb | 843 ++ .../v1/security_center/paths.rb | 1127 +++ .../v1/security_center/rest.rb | 53 + .../v1/security_center/rest/client.rb | 6970 +++++++++++++++ .../v1/security_center/rest/operations.rb | 926 ++ .../v1/security_center/rest/service_stub.rb | 4766 +++++++++++ .../cloud/security_center/v1/version.rb | 28 + .../cloud/securitycenter/v1/access_pb.rb | 23 + .../securitycenter/v1/agent_anomaly_pb.rb | 24 + .../cloud/securitycenter/v1/agent_pb.rb | 21 + .../securitycenter/v1/agent_session_pb.rb | 21 + .../cloud/securitycenter/v1/application_pb.rb | 21 + .../cloud/securitycenter/v1/asset_pb.rb | 29 + .../securitycenter/v1/attack_exposure_pb.rb | 24 + .../cloud/securitycenter/v1/attack_path_pb.rb | 28 + .../v1/backup_disaster_recovery_pb.rb | 23 + .../securitycenter/v1/bigquery_export_pb.rb | 25 + .../cloud/securitycenter/v1/chokepoint_pb.rb | 21 + .../cloud/securitycenter/v1/cloud_armor_pb.rb | 27 + .../v1/cloud_dlp_data_profile_pb.rb | 27 + .../v1/cloud_dlp_inspection_pb.rb | 23 + .../cloud/securitycenter/v1/compliance_pb.rb | 21 + .../cloud/securitycenter/v1/connection_pb.rb | 22 + .../securitycenter/v1/contact_details_pb.rb | 22 + .../cloud/securitycenter/v1/container_pb.rb | 24 + .../cloud/securitycenter/v1/database_pb.rb | 21 + ...event_threat_detection_custom_module_pb.rb | 26 + ...urity_health_analytics_custom_module_pb.rb | 26 + ...event_threat_detection_custom_module_pb.rb | 27 + ...tion_custom_module_validation_errors_pb.rb | 23 + .../securitycenter/v1/exfiltration_pb.rb | 22 + .../securitycenter/v1/external_exposure_pb.rb | 23 + .../securitycenter/v1/external_system_pb.rb | 25 + .../google/cloud/securitycenter/v1/file_pb.rb | 22 + .../cloud/securitycenter/v1/finding_pb.rb | 68 + .../cloud/securitycenter/v1/folder_pb.rb | 21 + .../securitycenter/v1/group_membership_pb.rb | 22 + .../cloud/securitycenter/v1/iam_binding_pb.rb | 22 + .../cloud/securitycenter/v1/indicator_pb.rb | 26 + .../securitycenter/v1/kernel_rootkit_pb.rb | 21 + .../cloud/securitycenter/v1/kubernetes_pb.rb | 34 + .../cloud/securitycenter/v1/label_pb.rb | 21 + .../securitycenter/v1/load_balancer_pb.rb | 21 + .../cloud/securitycenter/v1/log_entry_pb.rb | 24 + .../securitycenter/v1/mitre_attack_pb.rb | 23 + .../cloud/securitycenter/v1/mute_config_pb.rb | 26 + .../cloud/securitycenter/v1/notebook_pb.rb | 23 + .../v1/notification_config_pb.rb | 25 + .../v1/notification_message_pb.rb | 24 + .../cloud/securitycenter/v1/org_policy_pb.rb | 23 + .../v1/organization_settings_pb.rb | 25 + .../cloud/securitycenter/v1/process_pb.rb | 24 + .../cloud/securitycenter/v1/resource_pb.rb | 36 + .../v1/resource_value_config_pb.rb | 28 + .../v1/run_asset_discovery_response_pb.rb | 24 + ...urity_health_analytics_custom_config_pb.rb | 27 + ...urity_health_analytics_custom_module_pb.rb | 27 + .../securitycenter/v1/security_marks_pb.rb | 23 + .../securitycenter/v1/security_posture_pb.rb | 22 + .../v1/securitycenter_service_pb.rb | 147 + .../v1/securitycenter_service_services_pb.rb | 226 + .../cloud/securitycenter/v1/simulation_pb.rb | 27 + .../cloud/securitycenter/v1/source_pb.rb | 23 + .../securitycenter/v1/toxic_combination_pb.rb | 21 + .../securitycenter/v1/valued_resource_pb.rb | 25 + .../securitycenter/v1/vulnerability_pb.rb | 36 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/securitycenter/v1/access.rb | 120 + .../google/cloud/securitycenter/v1/agent.rb | 39 + .../cloud/securitycenter/v1/agent_anomaly.rb | 98 + .../cloud/securitycenter/v1/agent_session.rb | 35 + .../cloud/securitycenter/v1/application.rb | 40 + .../google/cloud/securitycenter/v1/asset.rb | 141 + .../securitycenter/v1/attack_exposure.rb | 73 + .../cloud/securitycenter/v1/attack_path.rb | 147 + .../v1/backup_disaster_recovery.rb | 90 + .../securitycenter/v1/bigquery_export.rb | 92 + .../cloud/securitycenter/v1/chokepoint.rb | 39 + .../cloud/securitycenter/v1/cloud_armor.rb | 128 + .../v1/cloud_dlp_data_profile.rb | 114 + .../securitycenter/v1/cloud_dlp_inspection.rb | 50 + .../cloud/securitycenter/v1/compliance.rb | 43 + .../cloud/securitycenter/v1/connection.rb | 70 + .../securitycenter/v1/contact_details.rb | 44 + .../cloud/securitycenter/v1/container.rb | 49 + .../cloud/securitycenter/v1/database.rb | 67 + ...ve_event_threat_detection_custom_module.rb | 77 + ...security_health_analytics_custom_module.rb | 73 + .../event_threat_detection_custom_module.rb | 88 + ...tection_custom_module_validation_errors.rb | 69 + .../cloud/securitycenter/v1/exfiltration.rb | 64 + .../securitycenter/v1/external_exposure.rb | 77 + .../securitycenter/v1/external_system.rb | 98 + .../google/cloud/securitycenter/v1/file.rb | 72 + .../google/cloud/securitycenter/v1/finding.rb | 486 ++ .../google/cloud/securitycenter/v1/folder.rb | 40 + .../securitycenter/v1/group_membership.rb | 51 + .../cloud/securitycenter/v1/iam_binding.rb | 56 + .../cloud/securitycenter/v1/indicator.rb | 116 + .../cloud/securitycenter/v1/kernel_rootkit.rb | 66 + .../cloud/securitycenter/v1/kubernetes.rb | 241 + .../google/cloud/securitycenter/v1/label.rb | 41 + .../cloud/securitycenter/v1/load_balancer.rb | 36 + .../cloud/securitycenter/v1/log_entry.rb | 58 + .../cloud/securitycenter/v1/mitre_attack.rb | 303 + .../cloud/securitycenter/v1/mute_config.rb | 116 + .../cloud/securitycenter/v1/notebook.rb | 46 + .../securitycenter/v1/notification_config.rb | 87 + .../securitycenter/v1/notification_message.rb | 42 + .../cloud/securitycenter/v1/org_policy.rb | 37 + .../v1/organization_settings.rb | 86 + .../google/cloud/securitycenter/v1/process.rb | 79 + .../cloud/securitycenter/v1/resource.rb | 286 + .../v1/resource_value_config.rb | 125 + .../v1/run_asset_discovery_response.rb | 54 + ...security_health_analytics_custom_config.rb | 112 + ...security_health_analytics_custom_module.rb | 90 + .../cloud/securitycenter/v1/security_marks.rb | 71 + .../securitycenter/v1/security_posture.rb | 83 + .../v1/securitycenter_service.rb | 2146 +++++ .../cloud/securitycenter/v1/simulation.rb | 46 + .../google/cloud/securitycenter/v1/source.rb | 65 + .../securitycenter/v1/toxic_combination.rb | 45 + .../securitycenter/v1/valued_resource.rb | 86 + .../cloud/securitycenter/v1/vulnerability.rb | 336 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../batch_create_resource_value_configs.rb | 47 + .../security_center/bulk_mute_findings.rb | 54 + .../create_big_query_export.rb | 47 + ...te_event_threat_detection_custom_module.rb | 47 + .../security_center/create_finding.rb | 47 + .../security_center/create_mute_config.rb | 47 + .../create_notification_config.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + .../snippets/security_center/create_source.rb | 47 + .../delete_big_query_export.rb | 47 + ...te_event_threat_detection_custom_module.rb | 47 + .../security_center/delete_mute_config.rb | 47 + .../delete_notification_config.rb | 47 + .../delete_resource_value_config.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + .../security_center/get_big_query_export.rb | 47 + ...ve_event_threat_detection_custom_module.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + ...et_event_threat_detection_custom_module.rb | 47 + .../security_center/get_iam_policy.rb | 47 + .../security_center/get_mute_config.rb | 47 + .../get_notification_config.rb | 47 + .../get_organization_settings.rb | 47 + .../get_resource_value_config.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + .../security_center/get_simulation.rb | 47 + .../snippets/security_center/get_source.rb | 47 + .../security_center/get_valued_resource.rb | 47 + .../snippets/security_center/group_assets.rb | 51 + .../security_center/group_findings.rb | 51 + .../snippets/security_center/list_assets.rb | 51 + .../security_center/list_attack_paths.rb | 51 + .../security_center/list_big_query_exports.rb | 51 + ...t_event_threat_detection_custom_modules.rb | 51 + ...ecurity_health_analytics_custom_modules.rb | 51 + ...e_event_threat_detection_custom_modules.rb | 51 + ...ecurity_health_analytics_custom_modules.rb | 51 + ...t_event_threat_detection_custom_modules.rb | 51 + .../snippets/security_center/list_findings.rb | 51 + .../security_center/list_mute_configs.rb | 51 + .../list_notification_configs.rb | 51 + .../list_resource_value_configs.rb | 51 + ...ecurity_health_analytics_custom_modules.rb | 51 + .../snippets/security_center/list_sources.rb | 51 + .../security_center/list_valued_resources.rb | 51 + .../security_center/run_asset_discovery.rb | 54 + .../security_center/set_finding_state.rb | 47 + .../security_center/set_iam_policy.rb | 47 + .../snippets/security_center/set_mute.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + .../security_center/test_iam_permissions.rb | 47 + .../update_big_query_export.rb | 47 + ...te_event_threat_detection_custom_module.rb | 47 + .../security_center/update_external_system.rb | 47 + .../security_center/update_finding.rb | 47 + .../security_center/update_mute_config.rb | 47 + .../update_notification_config.rb | 47 + .../update_organization_settings.rb | 47 + .../update_resource_value_config.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + .../security_center/update_security_marks.rb | 47 + .../snippets/security_center/update_source.rb | 47 + ...te_event_threat_detection_custom_module.rb | 47 + ...tadata_google.cloud.securitycenter.v1.json | 2535 ++++++ .../v1/security_center_operations_test.rb | 400 + .../v1/security_center_paths_test.rb | 487 ++ .../v1/security_center_rest_test.rb | 3594 ++++++++ .../v1/security_center_test.rb | 4053 +++++++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 133 + ...le-cloud-security_center-v1p1beta1.gemspec | 29 + .../google-cloud-security_center-v1p1beta1.rb | 21 + .../google/cloud/security_center/v1p1beta1.rb | 45 + .../cloud/security_center/v1p1beta1/rest.rb | 37 + .../v1p1beta1/security_center.rb | 56 + .../v1p1beta1/security_center/client.rb | 3252 +++++++ .../v1p1beta1/security_center/credentials.rb | 51 + .../v1p1beta1/security_center/operations.rb | 843 ++ .../v1p1beta1/security_center/paths.rb | 330 + .../v1p1beta1/security_center/rest.rb | 53 + .../v1p1beta1/security_center/rest/client.rb | 3048 +++++++ .../security_center/rest/operations.rb | 927 ++ .../security_center/rest/service_stub.rb | 1645 ++++ .../security_center/v1p1beta1/version.rb | 28 + .../securitycenter/v1p1beta1/asset_pb.rb | 29 + .../securitycenter/v1p1beta1/finding_pb.rb | 29 + .../securitycenter/v1p1beta1/folder_pb.rb | 21 + .../v1p1beta1/notification_config_pb.rb | 26 + .../v1p1beta1/notification_message_pb.rb | 24 + .../v1p1beta1/organization_settings_pb.rb | 25 + .../securitycenter/v1p1beta1/resource_pb.rb | 24 + .../run_asset_discovery_response_pb.rb | 24 + .../v1p1beta1/security_marks_pb.rb | 23 + .../v1p1beta1/securitycenter_service_pb.rb | 74 + .../securitycenter_service_services_pb.rb | 107 + .../securitycenter/v1p1beta1/source_pb.rb | 23 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../cloud/securitycenter/v1p1beta1/asset.rb | 141 + .../cloud/securitycenter/v1p1beta1/finding.rb | 146 + .../cloud/securitycenter/v1p1beta1/folder.rb | 40 + .../v1p1beta1/notification_config.rb | 98 + .../v1p1beta1/notification_message.rb | 42 + .../v1p1beta1/organization_settings.rb | 86 + .../securitycenter/v1p1beta1/resource.rb | 53 + .../v1p1beta1/run_asset_discovery_response.rb | 54 + .../v1p1beta1/security_marks.rb | 71 + .../v1p1beta1/securitycenter_service.rb | 1053 +++ .../cloud/securitycenter/v1p1beta1/source.rb | 64 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../security_center/create_finding.rb | 47 + .../create_notification_config.rb | 47 + .../snippets/security_center/create_source.rb | 47 + .../delete_notification_config.rb | 47 + .../security_center/get_iam_policy.rb | 47 + .../get_notification_config.rb | 47 + .../get_organization_settings.rb | 47 + .../snippets/security_center/get_source.rb | 47 + .../snippets/security_center/group_assets.rb | 51 + .../security_center/group_findings.rb | 51 + .../snippets/security_center/list_assets.rb | 51 + .../snippets/security_center/list_findings.rb | 51 + .../list_notification_configs.rb | 51 + .../snippets/security_center/list_sources.rb | 51 + .../security_center/run_asset_discovery.rb | 54 + .../security_center/set_finding_state.rb | 47 + .../security_center/set_iam_policy.rb | 47 + .../security_center/test_iam_permissions.rb | 47 + .../security_center/update_finding.rb | 47 + .../update_notification_config.rb | 47 + .../update_organization_settings.rb | 47 + .../security_center/update_security_marks.rb | 47 + .../snippets/security_center/update_source.rb | 47 + ...google.cloud.securitycenter.v1p1beta1.json | 935 +++ .../security_center_operations_test.rb | 400 + .../v1p1beta1/security_center_paths_test.rb | 178 + .../v1p1beta1/security_center_rest_test.rb | 1388 +++ .../v1p1beta1/security_center_test.rb | 1581 ++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-security_center-v2/.toys.rb | 28 + .../google-cloud-security_center-v2/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-security_center-v2/Gemfile | 15 + .../LICENSE.md | 201 + .../google-cloud-security_center-v2/README.md | 154 + .../google-cloud-security_center-v2/Rakefile | 169 + .../gapic_metadata.json | 218 + .../google-cloud-security_center-v2.gemspec | 29 + .../lib/google-cloud-security_center-v2.rb | 21 + .../lib/google/cloud/security_center/v2.rb | 45 + .../google/cloud/security_center/v2/rest.rb | 37 + .../security_center/v2/security_center.rb | 56 + .../v2/security_center/client.rb | 4793 +++++++++++ .../v2/security_center/credentials.rb | 51 + .../v2/security_center/operations.rb | 843 ++ .../v2/security_center/paths.rb | 1068 +++ .../v2/security_center/rest.rb | 53 + .../v2/security_center/rest/client.rb | 4395 ++++++++++ .../v2/security_center/rest/operations.rb | 926 ++ .../v2/security_center/rest/service_stub.rb | 3336 ++++++++ .../cloud/security_center/v2/version.rb | 28 + .../cloud/securitycenter/v2/access_pb.rb | 23 + .../v2/affected_resources_pb.rb | 21 + .../securitycenter/v2/agent_anomaly_pb.rb | 24 + .../cloud/securitycenter/v2/agent_pb.rb | 21 + .../securitycenter/v2/agent_session_pb.rb | 21 + .../cloud/securitycenter/v2/ai_model_pb.rb | 22 + .../cloud/securitycenter/v2/application_pb.rb | 21 + .../securitycenter/v2/attack_exposure_pb.rb | 25 + .../cloud/securitycenter/v2/attack_path_pb.rb | 28 + .../v2/backup_disaster_recovery_pb.rb | 23 + .../securitycenter/v2/bigquery_export_pb.rb | 25 + .../cloud/securitycenter/v2/chokepoint_pb.rb | 21 + .../cloud/securitycenter/v2/cloud_armor_pb.rb | 27 + .../v2/cloud_dlp_data_profile_pb.rb | 24 + .../v2/cloud_dlp_inspection_pb.rb | 23 + .../cloud/securitycenter/v2/compliance_pb.rb | 21 + .../cloud/securitycenter/v2/connection_pb.rb | 22 + .../securitycenter/v2/contact_details_pb.rb | 22 + .../cloud/securitycenter/v2/container_pb.rb | 24 + .../securitycenter/v2/data_access_event_pb.rb | 24 + .../securitycenter/v2/data_flow_event_pb.rb | 24 + .../v2/data_retention_deletion_event_pb.rb | 25 + .../cloud/securitycenter/v2/database_pb.rb | 21 + .../google/cloud/securitycenter/v2/disk_pb.rb | 21 + .../securitycenter/v2/exfiltration_pb.rb | 22 + .../securitycenter/v2/external_system_pb.rb | 25 + .../google/cloud/securitycenter/v2/file_pb.rb | 24 + .../cloud/securitycenter/v2/finding_pb.rb | 77 + .../cloud/securitycenter/v2/folder_pb.rb | 21 + .../securitycenter/v2/group_membership_pb.rb | 22 + .../cloud/securitycenter/v2/iam_binding_pb.rb | 22 + .../cloud/securitycenter/v2/indicator_pb.rb | 26 + .../cloud/securitycenter/v2/ip_rules_pb.rb | 28 + .../google/cloud/securitycenter/v2/job_pb.rb | 24 + .../securitycenter/v2/kernel_rootkit_pb.rb | 21 + .../cloud/securitycenter/v2/kubernetes_pb.rb | 34 + .../cloud/securitycenter/v2/label_pb.rb | 21 + .../securitycenter/v2/load_balancer_pb.rb | 21 + .../cloud/securitycenter/v2/log_entry_pb.rb | 24 + .../securitycenter/v2/mitre_attack_pb.rb | 23 + .../cloud/securitycenter/v2/mute_config_pb.rb | 26 + .../cloud/securitycenter/v2/network_pb.rb | 21 + .../cloud/securitycenter/v2/notebook_pb.rb | 23 + .../v2/notification_config_pb.rb | 26 + .../v2/notification_message_pb.rb | 24 + .../cloud/securitycenter/v2/org_policy_pb.rb | 24 + .../cloud/securitycenter/v2/process_pb.rb | 24 + .../cloud/securitycenter/v2/resource_pb.rb | 39 + .../v2/resource_value_config_pb.rb | 28 + .../securitycenter/v2/security_marks_pb.rb | 23 + .../securitycenter/v2/security_posture_pb.rb | 22 + .../v2/securitycenter_service_pb.rb | 101 + .../v2/securitycenter_service_services_pb.rb | 167 + .../cloud/securitycenter/v2/simulation_pb.rb | 27 + .../cloud/securitycenter/v2/source_pb.rb | 23 + .../securitycenter/v2/toxic_combination_pb.rb | 21 + .../securitycenter/v2/valued_resource_pb.rb | 25 + .../cloud/securitycenter/v2/vertex_ai_pb.rb | 23 + .../securitycenter/v2/vulnerability_pb.rb | 37 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../proto_docs/google/api/routing.rb | 463 + .../google/cloud/securitycenter/v2/access.rb | 120 + .../securitycenter/v2/affected_resources.rb | 35 + .../google/cloud/securitycenter/v2/agent.rb | 39 + .../cloud/securitycenter/v2/agent_anomaly.rb | 98 + .../cloud/securitycenter/v2/agent_session.rb | 35 + .../cloud/securitycenter/v2/ai_model.rb | 71 + .../cloud/securitycenter/v2/application.rb | 40 + .../securitycenter/v2/attack_exposure.rb | 73 + .../cloud/securitycenter/v2/attack_path.rb | 147 + .../v2/backup_disaster_recovery.rb | 90 + .../securitycenter/v2/bigquery_export.rb | 96 + .../cloud/securitycenter/v2/chokepoint.rb | 39 + .../cloud/securitycenter/v2/cloud_armor.rb | 138 + .../v2/cloud_dlp_data_profile.rb | 52 + .../securitycenter/v2/cloud_dlp_inspection.rb | 50 + .../cloud/securitycenter/v2/compliance.rb | 43 + .../cloud/securitycenter/v2/connection.rb | 70 + .../securitycenter/v2/contact_details.rb | 44 + .../cloud/securitycenter/v2/container.rb | 49 + .../securitycenter/v2/data_access_event.rb | 61 + .../securitycenter/v2/data_flow_event.rb | 65 + .../v2/data_retention_deletion_event.rb | 69 + .../cloud/securitycenter/v2/database.rb | 67 + .../google/cloud/securitycenter/v2/disk.rb | 36 + .../cloud/securitycenter/v2/exfiltration.rb | 64 + .../securitycenter/v2/external_system.rb | 106 + .../google/cloud/securitycenter/v2/file.rb | 105 + .../google/cloud/securitycenter/v2/finding.rb | 533 ++ .../google/cloud/securitycenter/v2/folder.rb | 40 + .../securitycenter/v2/group_membership.rb | 51 + .../cloud/securitycenter/v2/iam_binding.rb | 56 + .../cloud/securitycenter/v2/indicator.rb | 116 + .../cloud/securitycenter/v2/ip_rules.rb | 122 + .../google/cloud/securitycenter/v2/job.rb | 65 + .../cloud/securitycenter/v2/kernel_rootkit.rb | 66 + .../cloud/securitycenter/v2/kubernetes.rb | 241 + .../google/cloud/securitycenter/v2/label.rb | 41 + .../cloud/securitycenter/v2/load_balancer.rb | 36 + .../cloud/securitycenter/v2/log_entry.rb | 58 + .../cloud/securitycenter/v2/mitre_attack.rb | 521 ++ .../cloud/securitycenter/v2/mute_config.rb | 113 + .../google/cloud/securitycenter/v2/network.rb | 36 + .../cloud/securitycenter/v2/notebook.rb | 46 + .../securitycenter/v2/notification_config.rb | 94 + .../securitycenter/v2/notification_message.rb | 42 + .../cloud/securitycenter/v2/org_policy.rb | 37 + .../google/cloud/securitycenter/v2/process.rb | 83 + .../cloud/securitycenter/v2/resource.rb | 314 + .../v2/resource_value_config.rb | 127 + .../cloud/securitycenter/v2/security_marks.rb | 84 + .../securitycenter/v2/security_posture.rb | 83 + .../v2/securitycenter_service.rb | 1216 +++ .../cloud/securitycenter/v2/simulation.rb | 46 + .../google/cloud/securitycenter/v2/source.rb | 65 + .../securitycenter/v2/toxic_combination.rb | 46 + .../securitycenter/v2/valued_resource.rb | 86 + .../cloud/securitycenter/v2/vertex_ai.rb | 68 + .../cloud/securitycenter/v2/vulnerability.rb | 365 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../batch_create_resource_value_configs.rb | 47 + .../security_center/bulk_mute_findings.rb | 54 + .../create_big_query_export.rb | 47 + .../security_center/create_finding.rb | 47 + .../security_center/create_mute_config.rb | 47 + .../create_notification_config.rb | 47 + .../snippets/security_center/create_source.rb | 47 + .../delete_big_query_export.rb | 47 + .../security_center/delete_mute_config.rb | 47 + .../delete_notification_config.rb | 47 + .../delete_resource_value_config.rb | 47 + .../security_center/get_big_query_export.rb | 47 + .../security_center/get_iam_policy.rb | 47 + .../security_center/get_mute_config.rb | 47 + .../get_notification_config.rb | 47 + .../get_resource_value_config.rb | 47 + .../security_center/get_simulation.rb | 47 + .../snippets/security_center/get_source.rb | 47 + .../security_center/get_valued_resource.rb | 47 + .../security_center/group_findings.rb | 51 + .../security_center/list_attack_paths.rb | 51 + .../security_center/list_big_query_exports.rb | 51 + .../snippets/security_center/list_findings.rb | 51 + .../security_center/list_mute_configs.rb | 51 + .../list_notification_configs.rb | 51 + .../list_resource_value_configs.rb | 51 + .../snippets/security_center/list_sources.rb | 51 + .../security_center/list_valued_resources.rb | 51 + .../security_center/set_finding_state.rb | 47 + .../security_center/set_iam_policy.rb | 47 + .../snippets/security_center/set_mute.rb | 47 + .../security_center/test_iam_permissions.rb | 47 + .../update_big_query_export.rb | 47 + .../security_center/update_external_system.rb | 47 + .../security_center/update_finding.rb | 47 + .../security_center/update_mute_config.rb | 47 + .../update_notification_config.rb | 47 + .../update_resource_value_config.rb | 47 + .../security_center/update_security_marks.rb | 47 + .../snippets/security_center/update_source.rb | 47 + ...tadata_google.cloud.securitycenter.v2.json | 1615 ++++ .../v2/security_center_operations_test.rb | 400 + .../v2/security_center_paths_test.rb | 403 + .../v2/security_center_rest_test.rb | 2311 +++++ .../v2/security_center_test.rb | 2592 ++++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 123 + ...loud-security_center_management-v1.gemspec | 30 + ...gle-cloud-security_center_management-v1.rb | 21 + .../cloud/security_center_management/v1.rb | 45 + .../v1/bindings_override.rb | 75 + .../security_center_management/v1/rest.rb | 38 + .../v1/security_center_management.rb | 55 + .../v1/security_center_management/client.rb | 2792 ++++++ .../security_center_management/credentials.rb | 47 + .../v1/security_center_management/paths.rb | 374 + .../v1/security_center_management/rest.rb | 53 + .../security_center_management/rest/client.rb | 2610 ++++++ .../rest/service_stub.rb | 1677 ++++ .../security_center_management/v1/version.rb | 28 + .../v1/security_center_management_pb.rb | 86 + .../security_center_management_services_pb.rb | 141 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1/security_center_management.rb | 1334 +++ .../proto_docs/google/iam/v1/policy.rb | 426 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + ...te_event_threat_detection_custom_module.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + ...te_event_threat_detection_custom_module.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + ...ve_event_threat_detection_custom_module.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + ...et_event_threat_detection_custom_module.rb | 47 + .../get_security_center_service.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + ...t_event_threat_detection_custom_modules.rb | 51 + ...ecurity_health_analytics_custom_modules.rb | 51 + ...e_event_threat_detection_custom_modules.rb | 51 + ...ecurity_health_analytics_custom_modules.rb | 51 + ...t_event_threat_detection_custom_modules.rb | 51 + .../list_security_center_services.rb | 51 + ...ecurity_health_analytics_custom_modules.rb | 51 + ...security_health_analytics_custom_module.rb | 47 + ...te_event_threat_detection_custom_module.rb | 47 + .../update_security_center_service.rb | 47 + ...security_health_analytics_custom_module.rb | 47 + ...te_event_threat_detection_custom_module.rb | 47 + ...gle.cloud.securitycentermanagement.v1.json | 855 ++ .../security_center_management_paths_test.rb | 169 + .../security_center_management_rest_test.rb | 1265 +++ .../v1/security_center_management_test.rb | 1421 ++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-service_control-v1/.toys.rb | 28 + .../google-cloud-service_control-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-service_control-v1/Gemfile | 15 + .../LICENSE.md | 201 + .../google-cloud-service_control-v1/README.md | 154 + .../google-cloud-service_control-v1/Rakefile | 169 + .../gapic_metadata.json | 42 + .../google-cloud-service_control-v1.gemspec | 28 + .../lib/google-cloud-service_control-v1.rb | 21 + .../api/servicecontrol/v1/check_error_pb.rb | 24 + .../api/servicecontrol/v1/distribution_pb.rb | 26 + .../api/servicecontrol/v1/http_request_pb.rb | 23 + .../api/servicecontrol/v1/log_entry_pb.rb | 29 + .../api/servicecontrol/v1/metric_value_pb.rb | 25 + .../api/servicecontrol/v1/operation_pb.rb | 27 + .../servicecontrol/v1/quota_controller_pb.rb | 31 + .../v1/quota_controller_services_pb.rb | 58 + .../v1/service_controller_pb.rb | 34 + .../v1/service_controller_services_pb.rb | 81 + .../lib/google/cloud/service_control/v1.rb | 46 + .../service_control/v1/quota_controller.rb | 57 + .../v1/quota_controller/client.rb | 497 ++ .../v1/quota_controller/credentials.rb | 52 + .../v1/quota_controller/rest.rb | 54 + .../v1/quota_controller/rest/client.rb | 447 + .../v1/quota_controller/rest/service_stub.rb | 143 + .../google/cloud/service_control/v1/rest.rb | 38 + .../service_control/v1/service_controller.rb | 58 + .../v1/service_controller/client.rb | 643 ++ .../v1/service_controller/credentials.rb | 52 + .../v1/service_controller/rest.rb | 55 + .../v1/service_controller/rest/client.rb | 586 ++ .../service_controller/rest/service_stub.rb | 205 + .../cloud/service_control/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/distribution.rb | 233 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../api/servicecontrol/v1/check_error.rb | 129 + .../api/servicecontrol/v1/distribution.rb | 157 + .../api/servicecontrol/v1/http_request.rb | 95 + .../google/api/servicecontrol/v1/log_entry.rb | 142 + .../api/servicecontrol/v1/metric_value.rb | 101 + .../google/api/servicecontrol/v1/operation.rb | 146 + .../api/servicecontrol/v1/quota_controller.rb | 235 + .../servicecontrol/v1/service_controller.rb | 217 + .../google/logging/type/log_severity.rb | 71 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../quota_controller/allocate_quota.rb | 47 + .../snippets/service_controller/check.rb | 47 + .../snippets/service_controller/report.rb | 47 + ...metadata_google.api.servicecontrol.v1.json | 135 + .../v1/quota_controller_rest_test.rb | 155 + .../v1/quota_controller_test.rb | 166 + .../v1/service_controller_rest_test.rb | 211 + .../v1/service_controller_test.rb | 228 + .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 122 + ...le-cloud-service_directory-v1beta1.gemspec | 30 + .../google-cloud-service_directory-v1beta1.rb | 21 + .../google/cloud/service_directory/v1beta1.rb | 46 + .../v1beta1/bindings_override.rb | 75 + .../v1beta1/lookup_service.rb | 55 + .../v1beta1/lookup_service/client.rb | 540 ++ .../v1beta1/lookup_service/credentials.rb | 51 + .../v1beta1/lookup_service/paths.rb | 54 + .../v1beta1/lookup_service/rest.rb | 53 + .../v1beta1/lookup_service/rest/client.rb | 498 ++ .../lookup_service/rest/service_stub.rb | 143 + .../v1beta1/registration_service.rb | 69 + .../v1beta1/registration_service/client.rb | 2307 +++++ .../registration_service/credentials.rb | 51 + .../v1beta1/registration_service/paths.rb | 130 + .../v1beta1/registration_service/rest.rb | 67 + .../registration_service/rest/client.rb | 2146 +++++ .../registration_service/rest/service_stub.rb | 1236 +++ .../cloud/service_directory/v1beta1/rest.rb | 39 + .../service_directory/v1beta1/version.rb | 28 + .../servicedirectory/v1beta1/endpoint_pb.rb | 25 + .../v1beta1/lookup_service_pb.rb | 28 + .../v1beta1/lookup_service_services_pb.rb | 47 + .../servicedirectory/v1beta1/namespace_pb.rb | 25 + .../v1beta1/registration_service_pb.rb | 50 + .../registration_service_services_pb.rb | 96 + .../servicedirectory/v1beta1/service_pb.rb | 26 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../servicedirectory/v1beta1/endpoint.rb | 103 + .../v1beta1/lookup_service.rb | 89 + .../servicedirectory/v1beta1/namespace.rb | 62 + .../v1beta1/registration_service.rb | 432 + .../cloud/servicedirectory/v1beta1/service.rb | 88 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../lookup_service/resolve_service.rb | 47 + .../registration_service/create_endpoint.rb | 47 + .../registration_service/create_namespace.rb | 47 + .../registration_service/create_service.rb | 47 + .../registration_service/delete_endpoint.rb | 47 + .../registration_service/delete_namespace.rb | 47 + .../registration_service/delete_service.rb | 47 + .../registration_service/get_endpoint.rb | 47 + .../registration_service/get_iam_policy.rb | 47 + .../registration_service/get_namespace.rb | 47 + .../registration_service/get_service.rb | 47 + .../registration_service/list_endpoints.rb | 51 + .../registration_service/list_namespaces.rb | 51 + .../registration_service/list_services.rb | 51 + .../registration_service/set_iam_policy.rb | 47 + .../test_iam_permissions.rb | 47 + .../registration_service/update_endpoint.rb | 47 + .../registration_service/update_namespace.rb | 47 + .../registration_service/update_service.rb | 47 + ...google.cloud.servicedirectory.v1beta1.json | 775 ++ .../v1beta1/lookup_service_paths_test.rb | 55 + .../v1beta1/lookup_service_rest_test.rb | 155 + .../v1beta1/lookup_service_test.rb | 166 + .../registration_service_paths_test.rb | 103 + .../v1beta1/registration_service_rest_test.rb | 1096 +++ .../v1beta1/registration_service_test.rb | 1213 +++ .../test/helper.rb | 35 + .../google-cloud-service_health-v1/.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../google-cloud-service_health-v1/.toys.rb | 28 + .../google-cloud-service_health-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-service_health-v1/Gemfile | 15 + .../google-cloud-service_health-v1/LICENSE.md | 201 + .../google-cloud-service_health-v1/README.md | 154 + .../google-cloud-service_health-v1/Rakefile | 169 + .../gapic_metadata.json | 48 + .../google-cloud-service_health-v1.gemspec | 29 + .../lib/google-cloud-service_health-v1.rb | 21 + .../lib/google/cloud/service_health/v1.rb | 45 + .../service_health/v1/bindings_override.rb | 75 + .../google/cloud/service_health/v1/rest.rb | 38 + .../cloud/service_health/v1/service_health.rb | 55 + .../v1/service_health/client.rb | 1144 +++ .../v1/service_health/credentials.rb | 47 + .../service_health/v1/service_health/paths.rb | 124 + .../service_health/v1/service_health/rest.rb | 53 + .../v1/service_health/rest/client.rb | 1067 +++ .../v1/service_health/rest/service_stub.rb | 447 + .../google/cloud/service_health/v1/version.rb | 28 + .../servicehealth/v1/event_resources_pb.rb | 52 + .../servicehealth/v1/event_service_pb.rb | 24 + .../v1/event_service_services_pb.rb | 58 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../cloud/servicehealth/v1/event_resources.rb | 718 ++ .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../snippets/Gemfile | 32 + .../snippets/service_health/get_event.rb | 47 + .../service_health/get_organization_event.rb | 47 + .../service_health/get_organization_impact.rb | 47 + .../snippets/service_health/list_events.rb | 51 + .../list_organization_events.rb | 51 + .../list_organization_impacts.rb | 51 + ...etadata_google.cloud.servicehealth.v1.json | 255 + .../v1/service_health_paths_test.rb | 103 + .../v1/service_health_rest_test.rb | 434 + .../service_health/v1/service_health_test.rb | 489 ++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 83 + ...google-cloud-service_management-v1.gemspec | 29 + .../lib/google-cloud-service_management-v1.rb | 21 + .../api/servicemanagement/v1/resources_pb.rb | 39 + .../servicemanagement/v1/servicemanager_pb.rb | 50 + .../v1/servicemanager_services_pb.rb | 143 + .../lib/google/cloud/service_management/v1.rb | 45 + .../v1/bindings_override.rb | 110 + .../cloud/service_management/v1/rest.rb | 38 + .../service_management/v1/service_manager.rb | 56 + .../v1/service_manager/client.rb | 1811 ++++ .../v1/service_manager/credentials.rb | 54 + .../v1/service_manager/operations.rb | 835 ++ .../v1/service_manager/rest.rb | 54 + .../v1/service_manager/rest/client.rb | 1703 ++++ .../v1/service_manager/rest/operations.rb | 925 ++ .../v1/service_manager/rest/service_stub.rb | 882 ++ .../cloud/service_management/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/auth.rb | 259 + .../proto_docs/google/api/backend.rb | 199 + .../proto_docs/google/api/billing.rb | 82 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/config_change.rb | 89 + .../proto_docs/google/api/context.rb | 97 + .../proto_docs/google/api/control.rb | 41 + .../proto_docs/google/api/documentation.rb | 176 + .../proto_docs/google/api/endpoint.rb | 71 + .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/label.rb | 49 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/log.rb | 54 + .../proto_docs/google/api/logging.rb | 86 + .../proto_docs/google/api/metric.rb | 299 + .../google/api/monitored_resource.rb | 150 + .../proto_docs/google/api/monitoring.rb | 112 + .../proto_docs/google/api/policy.rb | 75 + .../proto_docs/google/api/quota.rb | 208 + .../proto_docs/google/api/resource.rb | 227 + .../proto_docs/google/api/service.rb | 170 + .../api/servicemanagement/v1/resources.rb | 332 + .../servicemanagement/v1/servicemanager.rb | 334 + .../proto_docs/google/api/source_info.rb | 31 + .../proto_docs/google/api/system_parameter.rb | 104 + .../proto_docs/google/api/usage.rb | 81 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/api.rb | 218 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../google/protobuf/source_context.rb | 33 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/protobuf/type.rb | 256 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../service_manager/create_service.rb | 54 + .../service_manager/create_service_config.rb | 47 + .../service_manager/create_service_rollout.rb | 54 + .../service_manager/delete_service.rb | 54 + .../service_manager/generate_config_report.rb | 47 + .../snippets/service_manager/get_service.rb | 47 + .../service_manager/get_service_config.rb | 47 + .../service_manager/get_service_rollout.rb | 47 + .../service_manager/list_service_configs.rb | 51 + .../service_manager/list_service_rollouts.rb | 51 + .../snippets/service_manager/list_services.rb | 51 + .../service_manager/submit_config_source.rb | 54 + .../service_manager/undelete_service.rb | 54 + ...adata_google.api.servicemanagement.v1.json | 535 ++ .../v1/service_manager_operations_test.rb | 400 + .../v1/service_manager_rest_test.rb | 817 ++ .../v1/service_manager_test.rb | 944 +++ .../test/helper.rb | 35 + .../google-cloud-service_usage-v1/.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-service_usage-v1/.toys.rb | 28 + .../google-cloud-service_usage-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-service_usage-v1/Gemfile | 15 + .../google-cloud-service_usage-v1/LICENSE.md | 201 + .../google-cloud-service_usage-v1/README.md | 154 + .../google-cloud-service_usage-v1/Rakefile | 169 + .../gapic_metadata.json | 48 + .../google-cloud-service_usage-v1.gemspec | 28 + .../lib/google-cloud-service_usage-v1.rb | 21 + .../api/serviceusage/v1/resources_pb.rb | 34 + .../api/serviceusage/v1/serviceusage_pb.rb | 38 + .../v1/serviceusage_services_pb.rb | 80 + .../lib/google/cloud/service_usage/v1.rb | 45 + .../lib/google/cloud/service_usage/v1/rest.rb | 37 + .../cloud/service_usage/v1/service_usage.rb | 59 + .../service_usage/v1/service_usage/client.rb | 1077 +++ .../v1/service_usage/credentials.rb | 53 + .../v1/service_usage/operations.rb | 835 ++ .../service_usage/v1/service_usage/rest.rb | 56 + .../v1/service_usage/rest/client.rb | 992 +++ .../v1/service_usage/rest/operations.rb | 925 ++ .../v1/service_usage/rest/service_stub.rb | 450 + .../google/cloud/service_usage/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/auth.rb | 259 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/documentation.rb | 176 + .../proto_docs/google/api/endpoint.rb | 71 + .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/label.rb | 49 + .../proto_docs/google/api/launch_stage.rb | 71 + .../google/api/monitored_resource.rb | 150 + .../proto_docs/google/api/monitoring.rb | 112 + .../proto_docs/google/api/quota.rb | 208 + .../proto_docs/google/api/resource.rb | 227 + .../google/api/serviceusage/v1/resources.rb | 123 + .../api/serviceusage/v1/serviceusage.rb | 242 + .../proto_docs/google/api/usage.rb | 81 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/api.rb | 218 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../google/protobuf/source_context.rb | 33 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/type.rb | 256 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../service_usage/batch_enable_services.rb | 54 + .../service_usage/batch_get_services.rb | 47 + .../snippets/service_usage/disable_service.rb | 54 + .../snippets/service_usage/enable_service.rb | 54 + .../snippets/service_usage/get_service.rb | 47 + .../snippets/service_usage/list_services.rb | 51 + ...t_metadata_google.api.serviceusage.v1.json | 255 + .../v1/service_usage_operations_test.rb | 400 + .../v1/service_usage_rest_test.rb | 430 + .../service_usage/v1/service_usage_test.rb | 500 ++ .../test/helper.rb | 35 + .../google-cloud-shell-v1/.gitignore | 20 + .../google-cloud-shell-v1/.repo-metadata.json | 18 + .../google-cloud-shell-v1/.rubocop.yml | 33 + .../google-cloud-shell-v1/.toys.rb | 28 + .../google-cloud-shell-v1/.yardopts | 12 + .../google-cloud-shell-v1/AUTHENTICATION.md | 122 + .../google-cloud-shell-v1/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-shell-v1/Gemfile | 15 + .../google-cloud-shell-v1/LICENSE.md | 201 + .../google-cloud-shell-v1/README.md | 154 + .../google-cloud-shell-v1/Rakefile | 169 + .../google-cloud-shell-v1/gapic_metadata.json | 43 + .../google-cloud-shell-v1.gemspec | 28 + .../lib/google-cloud-shell-v1.rb | 21 + .../lib/google/cloud/shell/v1.rb | 45 + .../cloud/shell/v1/cloud_shell_service.rb | 62 + .../shell/v1/cloud_shell_service/client.rb | 956 +++ .../v1/cloud_shell_service/credentials.rb | 51 + .../v1/cloud_shell_service/operations.rb | 843 ++ .../shell/v1/cloud_shell_service/paths.rb | 50 + .../shell/v1/cloud_shell_service/rest.rb | 59 + .../v1/cloud_shell_service/rest/client.rb | 878 ++ .../v1/cloud_shell_service/rest/operations.rb | 927 ++ .../cloud_shell_service/rest/service_stub.rb | 390 + .../google/cloud/shell/v1/cloudshell_pb.rb | 47 + .../cloud/shell/v1/cloudshell_services_pb.rb | 72 + .../lib/google/cloud/shell/v1/rest.rb | 37 + .../lib/google/cloud/shell/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/shell/v1/cloudshell.rb | 331 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../google-cloud-shell-v1/snippets/Gemfile | 32 + .../cloud_shell_service/add_public_key.rb | 54 + .../authorize_environment.rb | 54 + .../cloud_shell_service/get_environment.rb | 47 + .../cloud_shell_service/remove_public_key.rb | 54 + .../cloud_shell_service/start_environment.rb | 54 + ...nippet_metadata_google.cloud.shell.v1.json | 215 + .../v1/cloud_shell_service_operations_test.rb | 400 + .../v1/cloud_shell_service_paths_test.rb | 55 + .../shell/v1/cloud_shell_service_rest_test.rb | 376 + .../shell/v1/cloud_shell_service_test.rb | 442 + .../google-cloud-shell-v1/test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 153 + ...le-cloud-spanner-admin-database-v1.gemspec | 29 + .../google-cloud-spanner-admin-database-v1.rb | 21 + .../google/cloud/spanner/admin/database/v1.rb | 49 + .../admin/database/v1/database_admin.rb | 66 + .../database/v1/database_admin/client.rb | 3660 ++++++++ .../database/v1/database_admin/credentials.rb | 56 + .../database/v1/database_admin/operations.rb | 847 ++ .../admin/database/v1/database_admin/paths.rb | 176 + .../admin/database/v1/database_admin/rest.rb | 63 + .../database/v1/database_admin/rest/client.rb | 3340 ++++++++ .../v1/database_admin/rest/operations.rb | 1014 +++ .../v1/database_admin/rest/service_stub.rb | 1740 ++++ .../cloud/spanner/admin/database/v1/rest.rb | 41 + .../spanner/admin/database/v1/version.rb | 32 + .../spanner/admin/database/v1/backup_pb.rb | 52 + .../admin/database/v1/backup_schedule_pb.rb | 40 + .../spanner/admin/database/v1/common_pb.rb | 34 + .../database/v1/spanner_database_admin_pb.rb | 73 + .../v1/spanner_database_admin_services_pb.rb | 245 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../spanner/admin/database/v1/backup.rb | 730 ++ .../admin/database/v1/backup_schedule.rb | 220 + .../spanner/admin/database/v1/common.rb | 123 + .../database/v1/spanner_database_admin.rb | 834 ++ .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../database_admin/add_split_points.rb | 47 + .../snippets/database_admin/copy_backup.rb | 54 + .../snippets/database_admin/create_backup.rb | 54 + .../database_admin/create_backup_schedule.rb | 47 + .../database_admin/create_database.rb | 54 + .../snippets/database_admin/delete_backup.rb | 47 + .../database_admin/delete_backup_schedule.rb | 47 + .../snippets/database_admin/drop_database.rb | 47 + .../snippets/database_admin/get_backup.rb | 47 + .../database_admin/get_backup_schedule.rb | 47 + .../snippets/database_admin/get_database.rb | 47 + .../database_admin/get_database_ddl.rb | 47 + .../snippets/database_admin/get_iam_policy.rb | 47 + .../internal_update_graph_operation.rb | 47 + .../database_admin/list_backup_operations.rb | 51 + .../database_admin/list_backup_schedules.rb | 51 + .../snippets/database_admin/list_backups.rb | 51 + .../list_database_operations.rb | 51 + .../database_admin/list_database_roles.rb | 51 + .../snippets/database_admin/list_databases.rb | 51 + .../database_admin/restore_database.rb | 54 + .../snippets/database_admin/set_iam_policy.rb | 47 + .../database_admin/test_iam_permissions.rb | 47 + .../snippets/database_admin/update_backup.rb | 47 + .../database_admin/update_backup_schedule.rb | 47 + .../database_admin/update_database.rb | 54 + .../database_admin/update_database_ddl.rb | 54 + ...data_google.spanner.admin.database.v1.json | 1095 +++ .../v1/database_admin_operations_test.rb | 400 + .../database/v1/database_admin_paths_test.rb | 127 + .../database/v1/database_admin_rest_test.rb | 1548 ++++ .../admin/database/v1/database_admin_test.rb | 1843 ++++ .../test/helper.rb | 35 + .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 123 + ...le-cloud-spanner-admin-instance-v1.gemspec | 29 + .../google-cloud-spanner-admin-instance-v1.rb | 21 + .../google/cloud/spanner/admin/instance/v1.rb | 49 + .../admin/instance/v1/instance_admin.rb | 80 + .../instance/v1/instance_admin/client.rb | 3142 +++++++ .../instance/v1/instance_admin/credentials.rb | 56 + .../instance/v1/instance_admin/operations.rb | 847 ++ .../admin/instance/v1/instance_admin/paths.rb | 104 + .../admin/instance/v1/instance_admin/rest.rb | 77 + .../instance/v1/instance_admin/rest/client.rb | 2950 +++++++ .../v1/instance_admin/rest/operations.rb | 1070 +++ .../v1/instance_admin/rest/service_stub.rb | 1376 +++ .../cloud/spanner/admin/instance/v1/rest.rb | 41 + .../spanner/admin/instance/v1/version.rb | 32 + .../spanner/admin/instance/v1/common_pb.rb | 31 + .../instance/v1/spanner_instance_admin_pb.rb | 89 + .../v1/spanner_instance_admin_services_pb.rb | 463 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../spanner/admin/instance/v1/common.rb | 71 + .../instance/v1/spanner_instance_admin.rb | 1561 ++++ .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../instance_admin/create_instance.rb | 54 + .../instance_admin/create_instance_config.rb | 54 + .../create_instance_partition.rb | 54 + .../instance_admin/delete_instance.rb | 47 + .../instance_admin/delete_instance_config.rb | 47 + .../delete_instance_partition.rb | 47 + .../snippets/instance_admin/get_iam_policy.rb | 47 + .../snippets/instance_admin/get_instance.rb | 47 + .../instance_admin/get_instance_config.rb | 47 + .../instance_admin/get_instance_partition.rb | 47 + .../list_instance_config_operations.rb | 51 + .../instance_admin/list_instance_configs.rb | 51 + .../list_instance_partition_operations.rb | 51 + .../list_instance_partitions.rb | 51 + .../snippets/instance_admin/list_instances.rb | 51 + .../snippets/instance_admin/move_instance.rb | 54 + .../snippets/instance_admin/set_iam_policy.rb | 47 + .../instance_admin/test_iam_permissions.rb | 47 + .../instance_admin/update_instance.rb | 54 + .../instance_admin/update_instance_config.rb | 54 + .../update_instance_partition.rb | 54 + ...data_google.spanner.admin.instance.v1.json | 855 ++ .../v1/instance_admin_operations_test.rb | 400 + .../instance/v1/instance_admin_paths_test.rb | 91 + .../instance/v1/instance_admin_rest_test.rb | 1269 +++ .../admin/instance/v1/instance_admin_test.rb | 1468 ++++ .../test/helper.rb | 35 + .../google-cloud-spanner-v1/.gitignore | 20 + .../.repo-metadata.json | 18 + .../google-cloud-spanner-v1/.rubocop.yml | 33 + .../google-cloud-spanner-v1/.toys.rb | 28 + .../google-cloud-spanner-v1/.yardopts | 12 + .../google-cloud-spanner-v1/AUTHENTICATION.md | 122 + .../google-cloud-spanner-v1/CHANGELOG.md | 2 + .../google-cloud-spanner-v1/Gemfile | 15 + .../google-cloud-spanner-v1/LICENSE.md | 201 + .../google-cloud-spanner-v1/README.md | 153 + .../google-cloud-spanner-v1/Rakefile | 169 + .../gapic_metadata.json | 103 + .../google-cloud-spanner-v1.gemspec | 28 + .../lib/google-cloud-spanner-v1.rb | 21 + .../lib/google/cloud/spanner/v1.rb | 40 + .../lib/google/cloud/spanner/v1/spanner.rb | 52 + .../google/cloud/spanner/v1/spanner/client.rb | 2747 ++++++ .../cloud/spanner/v1/spanner/credentials.rb | 52 + .../google/cloud/spanner/v1/spanner/paths.rb | 73 + .../lib/google/cloud/spanner/v1/version.rb | 28 + .../lib/google/spanner/v1/change_stream_pb.rb | 37 + .../google/spanner/v1/commit_response_pb.rb | 27 + .../lib/google/spanner/v1/keys_pb.rb | 24 + .../lib/google/spanner/v1/location_pb.rb | 35 + .../lib/google/spanner/v1/mutation_pb.rb | 30 + .../lib/google/spanner/v1/query_plan_pb.rb | 30 + .../lib/google/spanner/v1/result_set_pb.rb | 31 + .../lib/google/spanner/v1/spanner_pb.rb | 74 + .../google/spanner/v1/spanner_services_pb.rb | 226 + .../lib/google/spanner/v1/transaction_pb.rb | 34 + .../lib/google/spanner/v1/type_pb.rb | 27 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/rpc/status.rb | 48 + .../google/spanner/v1/change_stream.rb | 488 ++ .../google/spanner/v1/commit_response.rb | 79 + .../proto_docs/google/spanner/v1/keys.rb | 170 + .../proto_docs/google/spanner/v1/location.rb | 417 + .../proto_docs/google/spanner/v1/mutation.rb | 178 + .../google/spanner/v1/query_plan.rb | 180 + .../google/spanner/v1/result_set.rb | 265 + .../proto_docs/google/spanner/v1/spanner.rb | 1221 +++ .../google/spanner/v1/transaction.rb | 357 + .../proto_docs/google/spanner/v1/type.rb | 222 + .../google-cloud-spanner-v1/snippets/Gemfile | 32 + .../snippet_metadata_google.spanner.v1.json | 695 ++ .../snippets/spanner/batch_create_sessions.rb | 47 + .../snippets/spanner/batch_write.rb | 50 + .../snippets/spanner/begin_transaction.rb | 47 + .../snippets/spanner/commit.rb | 47 + .../snippets/spanner/create_session.rb | 47 + .../snippets/spanner/delete_session.rb | 47 + .../snippets/spanner/execute_batch_dml.rb | 47 + .../snippets/spanner/execute_sql.rb | 47 + .../snippets/spanner/execute_streaming_sql.rb | 50 + .../snippets/spanner/fetch_cache_update.rb | 50 + .../snippets/spanner/get_session.rb | 47 + .../snippets/spanner/list_sessions.rb | 51 + .../snippets/spanner/partition_query.rb | 47 + .../snippets/spanner/partition_read.rb | 47 + .../snippets/spanner/read.rb | 47 + .../snippets/spanner/rollback.rb | 47 + .../snippets/spanner/streaming_read.rb | 50 + .../cloud/spanner/v1/spanner_paths_test.rb | 67 + .../google/cloud/spanner/v1/spanner_test.rb | 1346 +++ .../google-cloud-spanner-v1/test/helper.rb | 35 + .../google-cloud-speech-v1/.gitignore | 20 + .../.repo-metadata.json | 18 + .../google-cloud-speech-v1/.rubocop.yml | 33 + .../google-cloud-speech-v1/.toys.rb | 28 + .../google-cloud-speech-v1/.yardopts | 12 + .../google-cloud-speech-v1/AUTHENTICATION.md | 122 + .../google-cloud-speech-v1/CHANGELOG.md | 2 + .../google-cloud-speech-v1/Gemfile | 15 + .../google-cloud-speech-v1/LICENSE.md | 201 + .../google-cloud-speech-v1/README.md | 154 + .../google-cloud-speech-v1/Rakefile | 169 + .../gapic_metadata.json | 92 + .../google-cloud-speech-v1.gemspec | 28 + .../lib/google-cloud-speech-v1.rb | 21 + .../lib/google/cloud/speech/v1.rb | 46 + .../lib/google/cloud/speech/v1/adaptation.rb | 55 + .../cloud/speech/v1/adaptation/client.rb | 1436 ++++ .../cloud/speech/v1/adaptation/credentials.rb | 51 + .../cloud/speech/v1/adaptation/paths.rb | 88 + .../google/cloud/speech/v1/adaptation/rest.rb | 52 + .../cloud/speech/v1/adaptation/rest/client.rb | 1323 +++ .../speech/v1/adaptation/rest/service_stub.rb | 695 ++ .../speech/v1/cloud_speech_adaptation_pb.rb | 40 + .../v1/cloud_speech_adaptation_services_pb.rb | 65 + .../google/cloud/speech/v1/cloud_speech_pb.rb | 56 + .../speech/v1/cloud_speech_services_pb.rb | 56 + .../lib/google/cloud/speech/v1/resource_pb.rb | 30 + .../lib/google/cloud/speech/v1/rest.rb | 38 + .../lib/google/cloud/speech/v1/speech.rb | 56 + .../google/cloud/speech/v1/speech/client.rb | 687 ++ .../cloud/speech/v1/speech/credentials.rb | 51 + .../cloud/speech/v1/speech/operations.rb | 835 ++ .../google/cloud/speech/v1/speech/paths.rb | 71 + .../lib/google/cloud/speech/v1/speech/rest.rb | 53 + .../cloud/speech/v1/speech/rest/client.rb | 555 ++ .../cloud/speech/v1/speech/rest/operations.rb | 925 ++ .../speech/v1/speech/rest/service_stub.rb | 201 + .../lib/google/cloud/speech/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/speech/v1/cloud_speech.rb | 1003 +++ .../speech/v1/cloud_speech_adaptation.rb | 270 + .../google/cloud/speech/v1/resource.rb | 185 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../google-cloud-speech-v1/snippets/Gemfile | 32 + .../adaptation/create_custom_class.rb | 47 + .../snippets/adaptation/create_phrase_set.rb | 47 + .../adaptation/delete_custom_class.rb | 47 + .../snippets/adaptation/delete_phrase_set.rb | 47 + .../snippets/adaptation/get_custom_class.rb | 47 + .../snippets/adaptation/get_phrase_set.rb | 47 + .../adaptation/list_custom_classes.rb | 51 + .../snippets/adaptation/list_phrase_set.rb | 51 + .../adaptation/update_custom_class.rb | 47 + .../snippets/adaptation/update_phrase_set.rb | 47 + ...ippet_metadata_google.cloud.speech.v1.json | 535 ++ .../snippets/speech/long_running_recognize.rb | 54 + .../snippets/speech/recognize.rb | 47 + .../snippets/speech/streaming_recognize.rb | 56 + .../cloud/speech/v1/adaptation_paths_test.rb | 79 + .../cloud/speech/v1/adaptation_rest_test.rb | 649 ++ .../google/cloud/speech/v1/adaptation_test.rb | 714 ++ .../cloud/speech/v1/speech_operations_test.rb | 400 + .../cloud/speech/v1/speech_paths_test.rb | 67 + .../cloud/speech/v1/speech_rest_test.rb | 210 + .../google/cloud/speech/v1/speech_test.rb | 334 + .../google-cloud-speech-v1/test/helper.rb | 35 + .../google-cloud-speech-v1p1beta1/.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-speech-v1p1beta1/.toys.rb | 28 + .../google-cloud-speech-v1p1beta1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-speech-v1p1beta1/Gemfile | 15 + .../google-cloud-speech-v1p1beta1/LICENSE.md | 201 + .../google-cloud-speech-v1p1beta1/README.md | 154 + .../google-cloud-speech-v1p1beta1/Rakefile | 169 + .../gapic_metadata.json | 92 + .../google-cloud-speech-v1p1beta1.gemspec | 28 + .../lib/google-cloud-speech-v1p1beta1.rb | 21 + .../lib/google/cloud/speech/v1p1beta1.rb | 46 + .../cloud/speech/v1p1beta1/adaptation.rb | 55 + .../speech/v1p1beta1/adaptation/client.rb | 1436 ++++ .../v1p1beta1/adaptation/credentials.rb | 51 + .../speech/v1p1beta1/adaptation/paths.rb | 132 + .../cloud/speech/v1p1beta1/adaptation/rest.rb | 52 + .../v1p1beta1/adaptation/rest/client.rb | 1323 +++ .../v1p1beta1/adaptation/rest/service_stub.rb | 695 ++ .../v1p1beta1/cloud_speech_adaptation_pb.rb | 40 + .../cloud_speech_adaptation_services_pb.rb | 65 + .../cloud/speech/v1p1beta1/cloud_speech_pb.rb | 56 + .../v1p1beta1/cloud_speech_services_pb.rb | 56 + .../cloud/speech/v1p1beta1/resource_pb.rb | 34 + .../lib/google/cloud/speech/v1p1beta1/rest.rb | 38 + .../google/cloud/speech/v1p1beta1/speech.rb | 56 + .../cloud/speech/v1p1beta1/speech/client.rb | 687 ++ .../speech/v1p1beta1/speech/credentials.rb | 51 + .../speech/v1p1beta1/speech/operations.rb | 835 ++ .../cloud/speech/v1p1beta1/speech/paths.rb | 115 + .../cloud/speech/v1p1beta1/speech/rest.rb | 53 + .../speech/v1p1beta1/speech/rest/client.rb | 555 ++ .../v1p1beta1/speech/rest/operations.rb | 925 ++ .../v1p1beta1/speech/rest/service_stub.rb | 201 + .../google/cloud/speech/v1p1beta1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../cloud/speech/v1p1beta1/cloud_speech.rb | 1033 +++ .../v1p1beta1/cloud_speech_adaptation.rb | 270 + .../google/cloud/speech/v1p1beta1/resource.rb | 325 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 128 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../adaptation/create_custom_class.rb | 47 + .../snippets/adaptation/create_phrase_set.rb | 47 + .../adaptation/delete_custom_class.rb | 47 + .../snippets/adaptation/delete_phrase_set.rb | 47 + .../snippets/adaptation/get_custom_class.rb | 47 + .../snippets/adaptation/get_phrase_set.rb | 47 + .../adaptation/list_custom_classes.rb | 51 + .../snippets/adaptation/list_phrase_set.rb | 51 + .../adaptation/update_custom_class.rb | 47 + .../snippets/adaptation/update_phrase_set.rb | 47 + ...etadata_google.cloud.speech.v1p1beta1.json | 535 ++ .../snippets/speech/long_running_recognize.rb | 54 + .../snippets/speech/recognize.rb | 47 + .../snippets/speech/streaming_recognize.rb | 56 + .../speech/v1p1beta1/adaptation_paths_test.rb | 103 + .../speech/v1p1beta1/adaptation_rest_test.rb | 649 ++ .../cloud/speech/v1p1beta1/adaptation_test.rb | 714 ++ .../v1p1beta1/speech_operations_test.rb | 400 + .../speech/v1p1beta1/speech_paths_test.rb | 91 + .../speech/v1p1beta1/speech_rest_test.rb | 210 + .../cloud/speech/v1p1beta1/speech_test.rb | 334 + .../test/helper.rb | 35 + 1786 files changed, 387147 insertions(+) create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/google-cloud-secret_manager-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google-cloud-secret_manager-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/snippet_metadata_google.cloud.secrets.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_test.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/.gitignore create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/.yardopts create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/Gemfile create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/README.md create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/Rakefile create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/google-cloud-secret_manager-v1beta2.gemspec create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/access_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/add_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/create_secret.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/delete_secret.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/destroy_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/disable_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/enable_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret_version.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secret_versions.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secrets.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/update_secret.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/snippet_metadata_google.cloud.secretmanager.v1beta2.json create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_test.rb create mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/README.md create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/google-cloud-secure_source_manager-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google-cloud-secure_source_manager-v1.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_instance.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_repository.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_branch_rule.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_repository.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_branch_rules.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_instances.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/test_iam_permissions_repo.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb create mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/README.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/google-cloud-security-private_ca-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_test.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/google-cloud-security-private_ca-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google-cloud-security-private_ca-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/snippet_metadata_google.cloud.security.privateca.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_test.rb create mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security_center-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1/README.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_message_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/org_policy_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/organization_settings_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/process_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/resource_value_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/run_asset_discovery_response_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_module_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_marks_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_posture_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json create mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/google-cloud-security_center-v1p1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/asset_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/finding_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/folder_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_message_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/organization_settings_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/security_marks_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/source_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/delete_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_organization_settings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_assets.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_assets.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_notification_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_sources.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_finding_state.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_organization_settings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_security_marks.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-security_center-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security_center-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security_center-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security_center-v2/README.md create mode 100644 owl-bot-staging/google-cloud-security_center-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json create mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/README.md create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/google-cloud-security_center_management-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google-cloud-security_center_management-v1.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_center_service.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_center_services.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_center_service.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_health_analytics_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/snippet_metadata_google.cloud.securitycentermanagement.v1.json create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-service_control-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-service_control-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-service_control-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-service_control-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-service_control-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-service_control-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-service_control-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-service_control-v1/README.md create mode 100644 owl-bot-staging/google-cloud-service_control-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-service_control-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-service_control-v1/google-cloud-service_control-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google-cloud-service_control-v1.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/check_error_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/distribution_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/http_request_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/log_entry_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/metric_value_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/operation_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/client.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/client.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/credentials.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/distribution.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/check_error.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/distribution.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/http_request.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/log_entry.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/metric_value.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/operation.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/service_controller.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/logging/type/log_severity.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-service_control-v1/snippets/quota_controller/allocate_quota.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/check.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/report.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/snippets/snippet_metadata_google.api.servicecontrol.v1.json create mode 100644 owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_test.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_test.rb create mode 100644 owl-bot-staging/google-cloud-service_control-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/google-cloud-service_directory-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/endpoint_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/namespace_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/lookup_service/resolve_service.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_endpoint.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_namespace.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_service.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_endpoint.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_namespace.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_service.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_endpoint.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_namespace.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_service.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_endpoints.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_namespaces.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_services.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_endpoint.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_namespace.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_service.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/snippet_metadata_google.cloud.servicedirectory.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_test.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_test.rb create mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-service_health-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-service_health-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-service_health-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-service_health-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-service_health-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-service_health-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-service_health-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-service_health-v1/README.md create mode 100644 owl-bot-staging/google-cloud-service_health-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-service_health-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-service_health-v1/google-cloud-service_health-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google-cloud-service_health-v1.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/client.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/paths.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_event.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_event.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_impact.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_events.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_events.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_impacts.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/snippet_metadata_google.cloud.servicehealth.v1.json create mode 100644 owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_test.rb create mode 100644 owl-bot-staging/google-cloud-service_health-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-service_management-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-service_management-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-service_management-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-service_management-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-service_management-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-service_management-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-service_management-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-service_management-v1/README.md create mode 100644 owl-bot-staging/google-cloud-service_management-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-service_management-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-service_management-v1/google-cloud-service_management-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google-cloud-service_management-v1.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/auth.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/backend.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/billing.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/config_change.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/context.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/control.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/documentation.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/endpoint.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/label.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/log.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/logging.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/metric.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitored_resource.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitoring.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/policy.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/quota.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/service.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/resources.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/source_info.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/system_parameter.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/usage.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/api.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/source_context.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/type.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_config.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_rollout.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/delete_service.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/generate_config_report.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_config.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_rollout.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_configs.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_rollouts.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_services.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/submit_config_source.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/undelete_service.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/snippet_metadata_google.api.servicemanagement.v1.json create mode 100644 owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_test.rb create mode 100644 owl-bot-staging/google-cloud-service_management-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/README.md create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/google-cloud-service_usage-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google-cloud-service_usage-v1.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/auth.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/documentation.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/endpoint.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/label.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitored_resource.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitoring.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/quota.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/usage.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/api.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/source_context.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/type.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_enable_services.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_get_services.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/disable_service.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/enable_service.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/get_service.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/list_services.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/snippet_metadata_google.api.serviceusage.v1.json create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_test.rb create mode 100644 owl-bot-staging/google-cloud-service_usage-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-shell-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-shell-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-shell-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-shell-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-shell-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-shell-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-shell-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-shell-v1/README.md create mode 100644 owl-bot-staging/google-cloud-shell-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-shell-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-shell-v1/google-cloud-shell-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google-cloud-shell-v1.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_pb.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/add_public_key.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/authorize_environment.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/get_environment.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/remove_public_key.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/start_environment.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/snippet_metadata_google.cloud.shell.v1.json create mode 100644 owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_test.rb create mode 100644 owl-bot-staging/google-cloud-shell-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/README.md create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/google-cloud-spanner-admin-database-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_schedule_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/add_split_points.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/copy_backup.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_database.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/drop_database.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backups.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_operations.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_roles.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_databases.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/restore_database.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/README.md create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instances.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/move_instance.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/snippet_metadata_google.spanner.admin.instance.v1.json create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_test.rb create mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-spanner-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-spanner-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-spanner-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-spanner-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-spanner-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-spanner-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-spanner-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-spanner-v1/README.md create mode 100644 owl-bot-staging/google-cloud-spanner-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-spanner-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-spanner-v1/google-cloud-spanner-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google-cloud-spanner-v1.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/keys_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/location_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/mutation_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/query_plan_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/result_set_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/transaction_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/type_pb.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/keys.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/location.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/mutation.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/query_plan.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/result_set.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/spanner.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/type.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_create_sessions.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_write.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/begin_transaction.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/commit.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/create_session.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/delete_session.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_batch_dml.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_sql.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_streaming_sql.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/fetch_cache_update.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/get_session.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/list_sessions.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_query.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_read.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/read.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/rollback.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/streaming_read.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_test.rb create mode 100644 owl-bot-staging/google-cloud-spanner-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-speech-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-speech-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-speech-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-speech-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-speech-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-speech-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-speech-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-speech-v1/README.md create mode 100644 owl-bot-staging/google-cloud-speech-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-speech-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-speech-v1/google-cloud-speech-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google-cloud-speech-v1.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/client.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_pb.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_pb.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/client.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/credentials.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/operations.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/paths.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/resource.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_custom_class.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_phrase_set.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_custom_class.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_phrase_set.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_custom_class.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_phrase_set.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_custom_classes.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_phrase_set.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_custom_class.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_phrase_set.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/snippet_metadata_google.cloud.speech.v1.json create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/speech/long_running_recognize.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/speech/recognize.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/speech/streaming_recognize.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/google-cloud-speech-v1p1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_custom_class.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_phrase_set.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_custom_class.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_custom_class.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_phrase_set.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_custom_classes.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_phrase_set.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_custom_class.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_phrase_set.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/snippet_metadata_google.cloud.speech.v1p1beta1.json create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/long_running_recognize.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/recognize.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/streaming_recognize.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_test.rb create mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/.gitignore b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.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-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..bae754636e19 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.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-v1beta1/latest", + "distribution_name": "google-cloud-secret_manager-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "secretmanager", + "name_pretty": "Secret Manager V1beta1 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. Note that google-cloud-secret_manager-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secret_manager instead. See the readme for more details.", + "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-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..7f3f3a64f5cf --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-secret_manager-v1beta1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-secret_manager-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/.yardopts b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.yardopts new file mode 100644 index 000000000000..78441fd84b43 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Secret Manager V1beta1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-secret_manager-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..755a69b7bf72 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-secret_manager-v1beta1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-secret_manager-v1beta1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/secret_manager/v1beta1" + +client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/secret_manager/v1beta1" + +::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-secret_manager-v1beta1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/secret_manager/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-secret_manager-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/Gemfile b/owl-bot-staging/google-cloud-secret_manager-v1beta1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-secret_manager-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/README.md b/owl-bot-staging/google-cloud-secret_manager-v1beta1/README.md new file mode 100644 index 000000000000..34823d1f4db7 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Secret Manager V1beta1 API + +Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security. + +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. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Secret Manager V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-secret_manager](https://rubygems.org/gems/google-cloud-secret_manager). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-secret_manager-v1beta1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/secretmanager.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/secret_manager/v1beta1" + +client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new +request = ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new # (request fields as keyword arguments...) +response = client.list_secrets request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/secret-manager) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/secret_manager/v1beta1" +require "logger" + +client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-secret_manager`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-secret_manager-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-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-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-secret_manager-v1beta1/Rakefile b/owl-bot-staging/google-cloud-secret_manager-v1beta1/Rakefile new file mode 100644 index 000000000000..48d5c1256eec --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-secret_manager-v1beta1 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/v1beta1/secret_manager_service/credentials" + ::Google::Cloud::SecretManager::V1beta1::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-v1beta1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-secret_manager-v1beta1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-secret_manager-v1beta1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-secret_manager-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-secret_manager-v1beta1" + header "google-cloud-secret_manager-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-secret_manager-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-secret_manager-v1beta1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-secret_manager-v1beta1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-secret_manager-v1beta1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-secret_manager-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..baf3eab359db --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/gapic_metadata.json @@ -0,0 +1,93 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.secrets.v1beta1", + "libraryPackage": "::Google::Cloud::SecretManager::V1beta1", + "services": { + "SecretManagerService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client", + "rpcs": { + "ListSecrets": { + "methods": [ + "list_secrets" + ] + }, + "CreateSecret": { + "methods": [ + "create_secret" + ] + }, + "AddSecretVersion": { + "methods": [ + "add_secret_version" + ] + }, + "GetSecret": { + "methods": [ + "get_secret" + ] + }, + "UpdateSecret": { + "methods": [ + "update_secret" + ] + }, + "DeleteSecret": { + "methods": [ + "delete_secret" + ] + }, + "ListSecretVersions": { + "methods": [ + "list_secret_versions" + ] + }, + "GetSecretVersion": { + "methods": [ + "get_secret_version" + ] + }, + "AccessSecretVersion": { + "methods": [ + "access_secret_version" + ] + }, + "DisableSecretVersion": { + "methods": [ + "disable_secret_version" + ] + }, + "EnableSecretVersion": { + "methods": [ + "enable_secret_version" + ] + }, + "DestroySecretVersion": { + "methods": [ + "destroy_secret_version" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/google-cloud-secret_manager-v1beta1.gemspec b/owl-bot-staging/google-cloud-secret_manager-v1beta1/google-cloud-secret_manager-v1beta1.gemspec new file mode 100644 index 000000000000..8736d60ccc3f --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/google-cloud-secret_manager-v1beta1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/secret_manager/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-secret_manager-v1beta1" + gem.version = Google::Cloud::SecretManager::V1beta1::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. Note that google-cloud-secret_manager-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secret_manager instead. See the readme for more details." + gem.summary = "Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google-cloud-secret_manager-v1beta1.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google-cloud-secret_manager-v1beta1.rb new file mode 100644 index 000000000000..5e930f08a7d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google-cloud-secret_manager-v1beta1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/secret_manager/v1beta1" diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1.rb new file mode 100644 index 000000000000..c73914ce8c82 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/secret_manager/v1beta1/secret_manager_service" +require "google/cloud/secret_manager/v1beta1/version" + +module Google + module Cloud + module SecretManager + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/secret_manager/v1beta1" + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/secret_manager/v1beta1" + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + module V1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/secret_manager/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.rb new file mode 100644 index 000000000000..0fadf3d51c06 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module SecretManager + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/secret_manager/v1beta1/rest" + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + module V1beta1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecretManager"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.rb new file mode 100644 index 000000000000..c97fa6acb0d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest" +require "google/cloud/secret_manager/v1beta1/bindings_override" +require "google/cloud/secret_manager/v1beta1/version" + +module Google + module Cloud + module SecretManager + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/secret_manager/v1beta1/rest" + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + module V1beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.rb new file mode 100644 index 000000000000..7973da8d921f --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/secret_manager/v1beta1/version" + +require "google/cloud/secret_manager/v1beta1/secret_manager_service/credentials" +require "google/cloud/secret_manager/v1beta1/secret_manager_service/paths" +require "google/cloud/secret_manager/v1beta1/secret_manager_service/client" +require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest" + +module Google + module Cloud + module SecretManager + module V1beta1 + ## + # Secret Manager Service + # + # Manages secrets and operations using those secrets. Implements a REST + # model with the following objects: + # + # * {::Google::Cloud::SecretManager::V1beta1::Secret Secret} + # * {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/secret_manager/v1beta1/secret_manager_service" + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest" + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + module SecretManagerService + end + end + end + end +end + +helper_path = ::File.join __dir__, "secret_manager_service", "helpers.rb" +require "google/cloud/secret_manager/v1beta1/secret_manager_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb new file mode 100644 index 000000000000..9d84a4a7f262 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb @@ -0,0 +1,1944 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/secrets/v1beta1/service_pb" +require "google/cloud/location" + +module Google + module Cloud + module SecretManager + module V1beta1 + module SecretManagerService + ## + # Client for the SecretManagerService service. + # + # Secret Manager Service + # + # Manages secrets and operations using those secrets. Implements a REST + # model with the following objects: + # + # * {::Google::Cloud::SecretManager::V1beta1::Secret Secret} + # * {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "secretmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :secret_manager_service_stub + + ## + # Configure the SecretManagerService Client class. + # + # See {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecretManagerService clients + # ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecretManager", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_secrets.timeout = 60.0 + + default_config.rpcs.create_secret.timeout = 60.0 + + default_config.rpcs.add_secret_version.timeout = 60.0 + + default_config.rpcs.get_secret.timeout = 60.0 + + default_config.rpcs.update_secret.timeout = 60.0 + + default_config.rpcs.delete_secret.timeout = 60.0 + + default_config.rpcs.list_secret_versions.timeout = 60.0 + + default_config.rpcs.get_secret_version.timeout = 60.0 + + default_config.rpcs.access_secret_version.timeout = 60.0 + default_config.rpcs.access_secret_version.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.disable_secret_version.timeout = 60.0 + + default_config.rpcs.enable_secret_version.timeout = 60.0 + + default_config.rpcs.destroy_secret_version.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.get_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecretManagerService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @secret_manager_service_stub.universe_domain + end + + ## + # Create a new SecretManagerService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecretManagerService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/secrets/v1beta1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @secret_manager_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @secret_manager_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @secret_manager_service_stub.endpoint + config.universe_domain = @secret_manager_service_stub.universe_domain + config.logger = @secret_manager_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @secret_manager_service_stub.logger + end + + # Service calls + + ## + # Lists {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}. + # + # @overload list_secrets(request, options = nil) + # Pass arguments to `list_secrets` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_secrets(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_secrets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}, in the format `projects/*`. + # @param page_size [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::Secret>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::Secret>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new + # + # # Call the list_secrets method. + # result = client.list_secrets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecretManager::V1beta1::Secret. + # p item + # end + # + def list_secrets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_secrets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_secrets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_secrets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :list_secrets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new {::Google::Cloud::SecretManager::V1beta1::Secret Secret} containing no + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. + # + # @overload create_secret(request, options = nil) + # Pass arguments to `create_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_secret(parent: nil, secret_id: nil, secret: nil) + # Pass arguments to `create_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project to associate with the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format `projects/*`. + # @param secret_id [::String] + # Required. This must be unique within the project. + # + # A secret ID is a string with a maximum length of 255 characters and can + # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and + # underscore (`_`) characters. + # @param secret [::Google::Cloud::SecretManager::V1beta1::Secret, ::Hash] + # Required. A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with initial + # field values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::Secret] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::Secret] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new + # + # # Call the create_secret method. + # result = client.create_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. + # p result + # + def create_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_secret.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :create_secret, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} + # containing secret data and attaches it to an existing + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # @overload add_secret_version(request, options = nil) + # Pass arguments to `add_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload add_secret_version(parent: nil, payload: nil) + # Pass arguments to `add_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to associate with the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format + # `projects/*/secrets/*`. + # @param payload [::Google::Cloud::SecretManager::V1beta1::SecretPayload, ::Hash] + # Required. The secret payload of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new + # + # # Call the add_secret_version method. + # result = client.add_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p result + # + def add_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.add_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.add_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.add_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :add_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata for a given {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # @overload get_secret(request, options = nil) + # Pass arguments to `get_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::GetSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::GetSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_secret(name: nil) + # Pass arguments to `get_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format + # `projects/*/secrets/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::Secret] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::Secret] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new + # + # # Call the get_secret method. + # result = client.get_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. + # p result + # + def get_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_secret.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :get_secret, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates metadata of an existing + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # @overload update_secret(request, options = nil) + # Pass arguments to `update_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_secret(secret: nil, update_mask: nil) + # Pass arguments to `update_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param secret [::Google::Cloud::SecretManager::V1beta1::Secret, ::Hash] + # Required. {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with updated field + # values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Specifies the fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::Secret] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::Secret] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new + # + # # Call the update_secret method. + # result = client.update_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. + # p result + # + def update_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.secret&.name + header_params["secret.name"] = request.secret.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_secret.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :update_secret, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # @overload delete_secret(request, options = nil) + # Pass arguments to `delete_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_secret(name: nil) + # Pass arguments to `delete_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to delete in the format + # `projects/*/secrets/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new + # + # # Call the delete_secret method. + # result = client.delete_secret request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_secret.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :delete_secret, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. This + # call does not return secret data. + # + # @overload list_secret_versions(request, options = nil) + # Pass arguments to `list_secret_versions` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_secret_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} associated with the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} to list, in + # the format `projects/*/secrets/*`. + # @param page_size [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # ListSecretVersionsResponse.next_page_token][]. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::SecretVersion>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::SecretVersion>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new + # + # # Call the list_secret_versions method. + # result = client.list_secret_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p item + # end + # + def list_secret_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_secret_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_secret_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_secret_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :list_secret_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata for a + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # `projects/*/secrets/*/versions/latest` is an alias to the `latest` + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # @overload get_secret_version(request, options = nil) + # Pass arguments to `get_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_secret_version(name: nil) + # Pass arguments to `get_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format + # `projects/*/secrets/*/versions/*`. + # `projects/*/secrets/*/versions/latest` is an alias to the `latest` + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new + # + # # Call the get_secret_version method. + # result = client.get_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p result + # + def get_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :get_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Accesses a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # This call returns the secret data. + # + # `projects/*/secrets/*/versions/latest` is an alias to the `latest` + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # @overload access_secret_version(request, options = nil) + # Pass arguments to `access_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload access_secret_version(name: nil) + # Pass arguments to `access_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format + # `projects/*/secrets/*/versions/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new + # + # # Call the access_secret_version method. + # result = client.access_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse. + # p result + # + def access_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.access_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.access_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.access_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :access_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disables a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DISABLED DISABLED}. + # + # @overload disable_secret_version(request, options = nil) + # Pass arguments to `disable_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload disable_secret_version(name: nil) + # Pass arguments to `disable_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to disable in + # the format `projects/*/secrets/*/versions/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new + # + # # Call the disable_secret_version method. + # result = client.disable_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p result + # + def disable_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.disable_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.disable_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :disable_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enables a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::ENABLED ENABLED}. + # + # @overload enable_secret_version(request, options = nil) + # Pass arguments to `enable_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enable_secret_version(name: nil) + # Pass arguments to `enable_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to enable in + # the format `projects/*/secrets/*/versions/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new + # + # # Call the enable_secret_version method. + # result = client.enable_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p result + # + def enable_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enable_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enable_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :enable_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Destroys a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED} and + # irrevocably destroys the secret data. + # + # @overload destroy_secret_version(request, options = nil) + # Pass arguments to `destroy_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload destroy_secret_version(name: nil) + # Pass arguments to `destroy_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to destroy in + # the format `projects/*/secrets/*/versions/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new + # + # # Call the destroy_secret_version method. + # result = client.destroy_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p result + # + def destroy_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.destroy_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.destroy_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.destroy_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :destroy_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified secret. Replaces any + # existing policy. + # + # Permissions on {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} + # are enforced according to the policy set on the associated + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a secret. + # Returns empty policy if the secret exists and does not have a policy set. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has for the specified secret. + # If the secret does not exist, this call returns an empty set of + # permissions, not a NOT_FOUND error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecretManagerService API. + # + # This class represents the configuration for SecretManagerService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_secrets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_secrets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_secrets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "secretmanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SecretManagerService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_secrets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_secrets + ## + # RPC-specific configuration for `create_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :create_secret + ## + # RPC-specific configuration for `add_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :add_secret_version + ## + # RPC-specific configuration for `get_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :get_secret + ## + # RPC-specific configuration for `update_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :update_secret + ## + # RPC-specific configuration for `delete_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_secret + ## + # RPC-specific configuration for `list_secret_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_secret_versions + ## + # RPC-specific configuration for `get_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_secret_version + ## + # RPC-specific configuration for `access_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :access_secret_version + ## + # RPC-specific configuration for `disable_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_secret_version + ## + # RPC-specific configuration for `enable_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_secret_version + ## + # RPC-specific configuration for `destroy_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :destroy_secret_version + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + list_secrets_config = parent_rpcs.list_secrets if parent_rpcs.respond_to? :list_secrets + @list_secrets = ::Gapic::Config::Method.new list_secrets_config + create_secret_config = parent_rpcs.create_secret if parent_rpcs.respond_to? :create_secret + @create_secret = ::Gapic::Config::Method.new create_secret_config + add_secret_version_config = parent_rpcs.add_secret_version if parent_rpcs.respond_to? :add_secret_version + @add_secret_version = ::Gapic::Config::Method.new add_secret_version_config + get_secret_config = parent_rpcs.get_secret if parent_rpcs.respond_to? :get_secret + @get_secret = ::Gapic::Config::Method.new get_secret_config + update_secret_config = parent_rpcs.update_secret if parent_rpcs.respond_to? :update_secret + @update_secret = ::Gapic::Config::Method.new update_secret_config + delete_secret_config = parent_rpcs.delete_secret if parent_rpcs.respond_to? :delete_secret + @delete_secret = ::Gapic::Config::Method.new delete_secret_config + list_secret_versions_config = parent_rpcs.list_secret_versions if parent_rpcs.respond_to? :list_secret_versions + @list_secret_versions = ::Gapic::Config::Method.new list_secret_versions_config + get_secret_version_config = parent_rpcs.get_secret_version if parent_rpcs.respond_to? :get_secret_version + @get_secret_version = ::Gapic::Config::Method.new get_secret_version_config + access_secret_version_config = parent_rpcs.access_secret_version if parent_rpcs.respond_to? :access_secret_version + @access_secret_version = ::Gapic::Config::Method.new access_secret_version_config + disable_secret_version_config = parent_rpcs.disable_secret_version if parent_rpcs.respond_to? :disable_secret_version + @disable_secret_version = ::Gapic::Config::Method.new disable_secret_version_config + enable_secret_version_config = parent_rpcs.enable_secret_version if parent_rpcs.respond_to? :enable_secret_version + @enable_secret_version = ::Gapic::Config::Method.new enable_secret_version_config + destroy_secret_version_config = parent_rpcs.destroy_secret_version if parent_rpcs.respond_to? :destroy_secret_version + @destroy_secret_version = ::Gapic::Config::Method.new destroy_secret_version_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.rb new file mode 100644 index 000000000000..3fe96f0aee79 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module SecretManager + module V1beta1 + module SecretManagerService + # Credentials for the SecretManagerService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SECRET_MANAGER_CREDENTIALS", + "SECRET_MANAGER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SECRET_MANAGER_CREDENTIALS_JSON", + "SECRET_MANAGER_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.rb new file mode 100644 index 000000000000..504b57a7a147 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1beta1 + module SecretManagerService + # Path helper methods for the SecretManagerService API. + module Paths + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified Secret resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}` + # + # @param project [String] + # @param secret [String] + # + # @return [::String] + def secret_path project:, secret: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}" + end + + ## + # Create a fully-qualified SecretVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}/versions/{secret_version}` + # + # @param project [String] + # @param secret [String] + # @param secret_version [String] + # + # @return [::String] + def secret_version_path project:, secret:, secret_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.rb new file mode 100644 index 000000000000..06dc1cced025 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/secret_manager/v1beta1/version" +require "google/cloud/secret_manager/v1beta1/bindings_override" + +require "google/cloud/secret_manager/v1beta1/secret_manager_service/credentials" +require "google/cloud/secret_manager/v1beta1/secret_manager_service/paths" +require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client" + +module Google + module Cloud + module SecretManager + module V1beta1 + ## + # Secret Manager Service + # + # Manages secrets and operations using those secrets. Implements a REST + # model with the following objects: + # + # * {::Google::Cloud::SecretManager::V1beta1::Secret Secret} + # * {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest" + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + module SecretManagerService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb new file mode 100644 index 000000000000..8f9b19c07538 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb @@ -0,0 +1,1804 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/secrets/v1beta1/service_pb" +require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module SecretManager + module V1beta1 + module SecretManagerService + module Rest + ## + # REST client for the SecretManagerService service. + # + # Secret Manager Service + # + # Manages secrets and operations using those secrets. Implements a REST + # model with the following objects: + # + # * {::Google::Cloud::SecretManager::V1beta1::Secret Secret} + # * {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "secretmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :secret_manager_service_stub + + ## + # Configure the SecretManagerService Client class. + # + # See {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecretManagerService clients + # ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecretManager", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_secrets.timeout = 60.0 + + default_config.rpcs.create_secret.timeout = 60.0 + + default_config.rpcs.add_secret_version.timeout = 60.0 + + default_config.rpcs.get_secret.timeout = 60.0 + + default_config.rpcs.update_secret.timeout = 60.0 + + default_config.rpcs.delete_secret.timeout = 60.0 + + default_config.rpcs.list_secret_versions.timeout = 60.0 + + default_config.rpcs.get_secret_version.timeout = 60.0 + + default_config.rpcs.access_secret_version.timeout = 60.0 + default_config.rpcs.access_secret_version.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.disable_secret_version.timeout = 60.0 + + default_config.rpcs.enable_secret_version.timeout = 60.0 + + default_config.rpcs.destroy_secret_version.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.get_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecretManagerService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @secret_manager_service_stub.universe_domain + end + + ## + # Create a new SecretManagerService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecretManagerService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @secret_manager_service_stub = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @secret_manager_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @secret_manager_service_stub.endpoint + config.universe_domain = @secret_manager_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @secret_manager_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @secret_manager_service_stub.logger + end + + # Service calls + + ## + # Lists {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}. + # + # @overload list_secrets(request, options = nil) + # Pass arguments to `list_secrets` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_secrets(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_secrets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}, in the format `projects/*`. + # @param page_size [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::Secret>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::Secret>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new + # + # # Call the list_secrets method. + # result = client.list_secrets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecretManager::V1beta1::Secret. + # p item + # end + # + def list_secrets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_secrets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_secrets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_secrets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.list_secrets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, "secrets", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new {::Google::Cloud::SecretManager::V1beta1::Secret Secret} containing no + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. + # + # @overload create_secret(request, options = nil) + # Pass arguments to `create_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_secret(parent: nil, secret_id: nil, secret: nil) + # Pass arguments to `create_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project to associate with the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format `projects/*`. + # @param secret_id [::String] + # Required. This must be unique within the project. + # + # A secret ID is a string with a maximum length of 255 characters and can + # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and + # underscore (`_`) characters. + # @param secret [::Google::Cloud::SecretManager::V1beta1::Secret, ::Hash] + # Required. A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with initial + # field values. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::Secret] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new + # + # # Call the create_secret method. + # result = client.create_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. + # p result + # + def create_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_secret.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.create_secret request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} + # containing secret data and attaches it to an existing + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # @overload add_secret_version(request, options = nil) + # Pass arguments to `add_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload add_secret_version(parent: nil, payload: nil) + # Pass arguments to `add_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to associate with the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format + # `projects/*/secrets/*`. + # @param payload [::Google::Cloud::SecretManager::V1beta1::SecretPayload, ::Hash] + # Required. The secret payload of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new + # + # # Call the add_secret_version method. + # result = client.add_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p result + # + def add_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.add_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.add_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.add_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.add_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata for a given {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # @overload get_secret(request, options = nil) + # Pass arguments to `get_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::GetSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::GetSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_secret(name: nil) + # Pass arguments to `get_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format + # `projects/*/secrets/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::Secret] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new + # + # # Call the get_secret method. + # result = client.get_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. + # p result + # + def get_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_secret.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.get_secret request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates metadata of an existing + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # @overload update_secret(request, options = nil) + # Pass arguments to `update_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_secret(secret: nil, update_mask: nil) + # Pass arguments to `update_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param secret [::Google::Cloud::SecretManager::V1beta1::Secret, ::Hash] + # Required. {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with updated field + # values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Specifies the fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::Secret] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new + # + # # Call the update_secret method. + # result = client.update_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. + # p result + # + def update_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_secret.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.update_secret request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # @overload delete_secret(request, options = nil) + # Pass arguments to `delete_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_secret(name: nil) + # Pass arguments to `delete_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to delete in the format + # `projects/*/secrets/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new + # + # # Call the delete_secret method. + # result = client.delete_secret request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_secret.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.delete_secret request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. This + # call does not return secret data. + # + # @overload list_secret_versions(request, options = nil) + # Pass arguments to `list_secret_versions` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_secret_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} associated with the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} to list, in + # the format `projects/*/secrets/*`. + # @param page_size [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # ListSecretVersionsResponse.next_page_token][]. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::SecretVersion>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::SecretVersion>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new + # + # # Call the list_secret_versions method. + # result = client.list_secret_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p item + # end + # + def list_secret_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_secret_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_secret_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_secret_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.list_secret_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, "versions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata for a + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # `projects/*/secrets/*/versions/latest` is an alias to the `latest` + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # @overload get_secret_version(request, options = nil) + # Pass arguments to `get_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_secret_version(name: nil) + # Pass arguments to `get_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format + # `projects/*/secrets/*/versions/*`. + # `projects/*/secrets/*/versions/latest` is an alias to the `latest` + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new + # + # # Call the get_secret_version method. + # result = client.get_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p result + # + def get_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.get_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Accesses a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # This call returns the secret data. + # + # `projects/*/secrets/*/versions/latest` is an alias to the `latest` + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # @overload access_secret_version(request, options = nil) + # Pass arguments to `access_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload access_secret_version(name: nil) + # Pass arguments to `access_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format + # `projects/*/secrets/*/versions/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new + # + # # Call the access_secret_version method. + # result = client.access_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse. + # p result + # + def access_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.access_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.access_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.access_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.access_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disables a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DISABLED DISABLED}. + # + # @overload disable_secret_version(request, options = nil) + # Pass arguments to `disable_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload disable_secret_version(name: nil) + # Pass arguments to `disable_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to disable in + # the format `projects/*/secrets/*/versions/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new + # + # # Call the disable_secret_version method. + # result = client.disable_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p result + # + def disable_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.disable_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.disable_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.disable_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enables a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::ENABLED ENABLED}. + # + # @overload enable_secret_version(request, options = nil) + # Pass arguments to `enable_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enable_secret_version(name: nil) + # Pass arguments to `enable_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to enable in + # the format `projects/*/secrets/*/versions/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new + # + # # Call the enable_secret_version method. + # result = client.enable_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p result + # + def enable_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enable_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.enable_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.enable_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Destroys a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED} and + # irrevocably destroys the secret data. + # + # @overload destroy_secret_version(request, options = nil) + # Pass arguments to `destroy_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload destroy_secret_version(name: nil) + # Pass arguments to `destroy_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to destroy in + # the format `projects/*/secrets/*/versions/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new + # + # # Call the destroy_secret_version method. + # result = client.destroy_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + # p result + # + def destroy_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.destroy_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.destroy_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.destroy_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.destroy_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified secret. Replaces any + # existing policy. + # + # Permissions on {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} + # are enforced according to the policy set on the associated + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a secret. + # Returns empty policy if the secret exists and does not have a policy set. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has for the specified secret. + # If the secret does not exist, this call returns an empty set of + # permissions, not a NOT_FOUND error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecretManagerService REST API. + # + # This class represents the configuration for SecretManagerService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_secrets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_secrets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_secrets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "secretmanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the SecretManagerService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_secrets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_secrets + ## + # RPC-specific configuration for `create_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :create_secret + ## + # RPC-specific configuration for `add_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :add_secret_version + ## + # RPC-specific configuration for `get_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :get_secret + ## + # RPC-specific configuration for `update_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :update_secret + ## + # RPC-specific configuration for `delete_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_secret + ## + # RPC-specific configuration for `list_secret_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_secret_versions + ## + # RPC-specific configuration for `get_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_secret_version + ## + # RPC-specific configuration for `access_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :access_secret_version + ## + # RPC-specific configuration for `disable_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_secret_version + ## + # RPC-specific configuration for `enable_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_secret_version + ## + # RPC-specific configuration for `destroy_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :destroy_secret_version + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + list_secrets_config = parent_rpcs.list_secrets if parent_rpcs.respond_to? :list_secrets + @list_secrets = ::Gapic::Config::Method.new list_secrets_config + create_secret_config = parent_rpcs.create_secret if parent_rpcs.respond_to? :create_secret + @create_secret = ::Gapic::Config::Method.new create_secret_config + add_secret_version_config = parent_rpcs.add_secret_version if parent_rpcs.respond_to? :add_secret_version + @add_secret_version = ::Gapic::Config::Method.new add_secret_version_config + get_secret_config = parent_rpcs.get_secret if parent_rpcs.respond_to? :get_secret + @get_secret = ::Gapic::Config::Method.new get_secret_config + update_secret_config = parent_rpcs.update_secret if parent_rpcs.respond_to? :update_secret + @update_secret = ::Gapic::Config::Method.new update_secret_config + delete_secret_config = parent_rpcs.delete_secret if parent_rpcs.respond_to? :delete_secret + @delete_secret = ::Gapic::Config::Method.new delete_secret_config + list_secret_versions_config = parent_rpcs.list_secret_versions if parent_rpcs.respond_to? :list_secret_versions + @list_secret_versions = ::Gapic::Config::Method.new list_secret_versions_config + get_secret_version_config = parent_rpcs.get_secret_version if parent_rpcs.respond_to? :get_secret_version + @get_secret_version = ::Gapic::Config::Method.new get_secret_version_config + access_secret_version_config = parent_rpcs.access_secret_version if parent_rpcs.respond_to? :access_secret_version + @access_secret_version = ::Gapic::Config::Method.new access_secret_version_config + disable_secret_version_config = parent_rpcs.disable_secret_version if parent_rpcs.respond_to? :disable_secret_version + @disable_secret_version = ::Gapic::Config::Method.new disable_secret_version_config + enable_secret_version_config = parent_rpcs.enable_secret_version if parent_rpcs.respond_to? :enable_secret_version + @enable_secret_version = ::Gapic::Config::Method.new enable_secret_version_config + destroy_secret_version_config = parent_rpcs.destroy_secret_version if parent_rpcs.respond_to? :destroy_secret_version + @destroy_secret_version = ::Gapic::Config::Method.new destroy_secret_version_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb new file mode 100644 index 000000000000..968f6c2a4fd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb @@ -0,0 +1,1004 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/secrets/v1beta1/service_pb" + +module Google + module Cloud + module SecretManager + module V1beta1 + module SecretManagerService + module Rest + ## + # REST service stub for the SecretManagerService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_secrets REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse] + # A result object deserialized from the server's reply + def list_secrets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_secrets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_secrets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::Secret] + # A result object deserialized from the server's reply + def create_secret request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_secret_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_secret", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta1::Secret.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the add_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # A result object deserialized from the server's reply + def add_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_add_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "add_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::GetSecretRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::Secret] + # A result object deserialized from the server's reply + def get_secret request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_secret_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_secret", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta1::Secret.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::Secret] + # A result object deserialized from the server's reply + def update_secret request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_secret_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_secret", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta1::Secret.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_secret request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_secret_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_secret", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_secret_versions REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse] + # A result object deserialized from the server's reply + def list_secret_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_secret_versions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_secret_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # A result object deserialized from the server's reply + def get_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the access_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] + # A result object deserialized from the server's reply + def access_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_access_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "access_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the disable_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # A result object deserialized from the server's reply + def disable_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "disable_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enable_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # A result object deserialized from the server's reply + def enable_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "enable_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the destroy_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] + # A result object deserialized from the server's reply + def destroy_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_destroy_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "destroy_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_secrets REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_secrets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/secrets", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_secret_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/secrets", + body: "secret", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the add_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_add_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}:addVersion", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::GetSecretRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_secret_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_secret_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{secret.name}", + body: "secret", + matches: [ + ["secret.name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_secret_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_secret_versions REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_secret_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the access_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_access_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}:access", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_disable_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:disable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enable_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:enable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the destroy_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_destroy_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:destroy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/version.rb new file mode 100644 index 000000000000..9b5192150b89 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecretManager + module V1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/resources_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/resources_pb.rb new file mode 100644 index 000000000000..0bc06c21b282 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/resources_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/secrets/v1beta1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/secrets/v1beta1/resources.proto\x12\x1cgoogle.cloud.secrets.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd9\x02\n\x06Secret\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x0breplication\x18\x02 \x01(\x0b\x32).google.cloud.secrets.v1beta1.ReplicationB\x06\xe0\x41\x05\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x04 \x03(\x0b\x32\x30.google.cloud.secrets.v1beta1.Secret.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:M\xea\x41J\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\"\x90\x03\n\rSecretVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0c\x64\x65stroy_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x04 \x01(\x0e\x32\x31.google.cloud.secrets.v1beta1.SecretVersion.StateB\x03\xe0\x41\x03\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tDESTROYED\x10\x03:n\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\"\xc5\x02\n\x0bReplication\x12H\n\tautomatic\x18\x01 \x01(\x0b\x32\x33.google.cloud.secrets.v1beta1.Replication.AutomaticH\x00\x12M\n\x0cuser_managed\x18\x02 \x01(\x0b\x32\x35.google.cloud.secrets.v1beta1.Replication.UserManagedH\x00\x1a\x0b\n\tAutomatic\x1a\x80\x01\n\x0bUserManaged\x12T\n\x08replicas\x18\x01 \x03(\x0b\x32=.google.cloud.secrets.v1beta1.Replication.UserManaged.ReplicaB\x03\xe0\x41\x02\x1a\x1b\n\x07Replica\x12\x10\n\x08location\x18\x01 \x01(\tB\r\n\x0breplication\"\x1d\n\rSecretPayload\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x42\xee\x01\n&com.google.cloud.secretmanager.v1beta1B\x0eResourcesProtoP\x01Z:cloud.google.com/go/secrets/apiv1beta1/secretspb;secretspb\xa2\x02\x03GSM\xaa\x02\"Google.Cloud.SecretManager.V1Beta1\xca\x02\"Google\\Cloud\\SecretManager\\V1beta1\xea\x02%Google::Cloud::SecretManager::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecretManager + module V1beta1 + Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.Secret").msgclass + SecretVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.SecretVersion").msgclass + SecretVersion::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.SecretVersion.State").enummodule + Replication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.Replication").msgclass + Replication::Automatic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.Replication.Automatic").msgclass + Replication::UserManaged = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.Replication.UserManaged").msgclass + Replication::UserManaged::Replica = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.Replication.UserManaged.Replica").msgclass + SecretPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.SecretPayload").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_pb.rb new file mode 100644 index 000000000000..af5986516c2c --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/secrets/v1beta1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/secrets/v1beta1/resources_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n*google/cloud/secrets/v1beta1/service.proto\x12\x1cgoogle.cloud.secrets.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/secrets/v1beta1/resources.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x8a\x01\n\x12ListSecretsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\x13ListSecretsResponse\x12\x35\n\x07secrets\x18\x01 \x03(\x0b\x32$.google.cloud.secrets.v1beta1.Secret\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\xad\x01\n\x13\x43reateSecretRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tsecret_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06secret\x18\x03 \x01(\x0b\x32$.google.cloud.secrets.v1beta1.SecretB\x03\xe0\x41\x02\"\x99\x01\n\x17\x41\x64\x64SecretVersionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\x12\x41\n\x07payload\x18\x02 \x01(\x0b\x32+.google.cloud.secrets.v1beta1.SecretPayloadB\x03\xe0\x41\x02\"M\n\x10GetSecretRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\"\x89\x01\n\x19ListSecretVersionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n\x1aListSecretVersionsResponse\x12=\n\x08versions\x18\x01 \x03(\x0b\x32+.google.cloud.secrets.v1beta1.SecretVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"[\n\x17GetSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\x86\x01\n\x13UpdateSecretRequest\x12\x39\n\x06secret\x18\x01 \x01(\x0b\x32$.google.cloud.secrets.v1beta1.SecretB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"^\n\x1a\x41\x63\x63\x65ssSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\x9a\x01\n\x1b\x41\x63\x63\x65ssSecretVersionResponse\x12=\n\x04name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12<\n\x07payload\x18\x02 \x01(\x0b\x32+.google.cloud.secrets.v1beta1.SecretPayload\"P\n\x13\x44\x65leteSecretRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\"_\n\x1b\x44isableSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"^\n\x1a\x45nableSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"_\n\x1b\x44\x65stroySecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion2\x83\x16\n\x14SecretManagerService\x12\xa9\x01\n\x0bListSecrets\x12\x30.google.cloud.secrets.v1beta1.ListSecretsRequest\x1a\x31.google.cloud.secrets.v1beta1.ListSecretsResponse\"5\xda\x41\x06parent\x82\xd3\xe4\x93\x02&\x12$/v1beta1/{parent=projects/*}/secrets\x12\xb7\x01\n\x0c\x43reateSecret\x12\x31.google.cloud.secrets.v1beta1.CreateSecretRequest\x1a$.google.cloud.secrets.v1beta1.Secret\"N\xda\x41\x17parent,secret_id,secret\x82\xd3\xe4\x93\x02.\"$/v1beta1/{parent=projects/*}/secrets:\x06secret\x12\xc5\x01\n\x10\x41\x64\x64SecretVersion\x12\x35.google.cloud.secrets.v1beta1.AddSecretVersionRequest\x1a+.google.cloud.secrets.v1beta1.SecretVersion\"M\xda\x41\x0eparent,payload\x82\xd3\xe4\x93\x02\x36\"1/v1beta1/{parent=projects/*/secrets/*}:addVersion:\x01*\x12\x96\x01\n\tGetSecret\x12..google.cloud.secrets.v1beta1.GetSecretRequest\x1a$.google.cloud.secrets.v1beta1.Secret\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1beta1/{name=projects/*/secrets/*}\x12\xb9\x01\n\x0cUpdateSecret\x12\x31.google.cloud.secrets.v1beta1.UpdateSecretRequest\x1a$.google.cloud.secrets.v1beta1.Secret\"P\xda\x41\x12secret,update_mask\x82\xd3\xe4\x93\x02\x35\x32+/v1beta1/{secret.name=projects/*/secrets/*}:\x06secret\x12\x8e\x01\n\x0c\x44\x65leteSecret\x12\x31.google.cloud.secrets.v1beta1.DeleteSecretRequest\x1a\x16.google.protobuf.Empty\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&*$/v1beta1/{name=projects/*/secrets/*}\x12\xc9\x01\n\x12ListSecretVersions\x12\x37.google.cloud.secrets.v1beta1.ListSecretVersionsRequest\x1a\x38.google.cloud.secrets.v1beta1.ListSecretVersionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{parent=projects/*/secrets/*}/versions\x12\xb6\x01\n\x10GetSecretVersion\x12\x35.google.cloud.secrets.v1beta1.GetSecretVersionRequest\x1a+.google.cloud.secrets.v1beta1.SecretVersion\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{name=projects/*/secrets/*/versions/*}\x12\xd1\x01\n\x13\x41\x63\x63\x65ssSecretVersion\x12\x38.google.cloud.secrets.v1beta1.AccessSecretVersionRequest\x1a\x39.google.cloud.secrets.v1beta1.AccessSecretVersionResponse\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta1/{name=projects/*/secrets/*/versions/*}:access\x12\xc9\x01\n\x14\x44isableSecretVersion\x12\x39.google.cloud.secrets.v1beta1.DisableSecretVersionRequest\x1a+.google.cloud.secrets.v1beta1.SecretVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1beta1/{name=projects/*/secrets/*/versions/*}:disable:\x01*\x12\xc6\x01\n\x13\x45nableSecretVersion\x12\x38.google.cloud.secrets.v1beta1.EnableSecretVersionRequest\x1a+.google.cloud.secrets.v1beta1.SecretVersion\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/secrets/*/versions/*}:enable:\x01*\x12\xc9\x01\n\x14\x44\x65stroySecretVersion\x12\x39.google.cloud.secrets.v1beta1.DestroySecretVersionRequest\x1a+.google.cloud.secrets.v1beta1.SecretVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1beta1/{name=projects/*/secrets/*/versions/*}:destroy:\x01*\x12\x8b\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"@\x82\xd3\xe4\x93\x02:\"5/v1beta1/{resource=projects/*/secrets/*}:setIamPolicy:\x01*\x12\x88\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"=\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta1/{resource=projects/*/secrets/*}:getIamPolicy\x12\xb1\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"F\x82\xd3\xe4\x93\x02@\";/v1beta1/{resource=projects/*/secrets/*}:testIamPermissions:\x01*\x1aP\xca\x41\x1csecretmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xec\x01\n&com.google.cloud.secretmanager.v1beta1B\x0cServiceProtoP\x01Z:cloud.google.com/go/secrets/apiv1beta1/secretspb;secretspb\xa2\x02\x03GSM\xaa\x02\"Google.Cloud.SecretManager.V1Beta1\xca\x02\"Google\\Cloud\\SecretManager\\V1beta1\xea\x02%Google::Cloud::SecretManager::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecretManager + module V1beta1 + ListSecretsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.ListSecretsRequest").msgclass + ListSecretsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.ListSecretsResponse").msgclass + CreateSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.CreateSecretRequest").msgclass + AddSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.AddSecretVersionRequest").msgclass + GetSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.GetSecretRequest").msgclass + ListSecretVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.ListSecretVersionsRequest").msgclass + ListSecretVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.ListSecretVersionsResponse").msgclass + GetSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.GetSecretVersionRequest").msgclass + UpdateSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.UpdateSecretRequest").msgclass + AccessSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.AccessSecretVersionRequest").msgclass + AccessSecretVersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.AccessSecretVersionResponse").msgclass + DeleteSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.DeleteSecretRequest").msgclass + DisableSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.DisableSecretVersionRequest").msgclass + EnableSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.EnableSecretVersionRequest").msgclass + DestroySecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.DestroySecretVersionRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb new file mode 100644 index 000000000000..3ffb62db71bb --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb @@ -0,0 +1,117 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/secrets/v1beta1/service.proto for package 'Google.Cloud.SecretManager.V1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/secrets/v1beta1/service_pb' + +module Google + module Cloud + module SecretManager + module V1beta1 + module SecretManagerService + # Secret Manager Service + # + # Manages secrets and operations using those secrets. Implements a REST + # model with the following objects: + # + # * [Secret][google.cloud.secrets.v1beta1.Secret] + # * [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.secrets.v1beta1.SecretManagerService' + + # Lists [Secrets][google.cloud.secrets.v1beta1.Secret]. + rpc :ListSecrets, ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest, ::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse + # Creates a new [Secret][google.cloud.secrets.v1beta1.Secret] containing no + # [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion]. + rpc :CreateSecret, ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest, ::Google::Cloud::SecretManager::V1beta1::Secret + # Creates a new [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] + # containing secret data and attaches it to an existing + # [Secret][google.cloud.secrets.v1beta1.Secret]. + rpc :AddSecretVersion, ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::SecretVersion + # Gets metadata for a given [Secret][google.cloud.secrets.v1beta1.Secret]. + rpc :GetSecret, ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest, ::Google::Cloud::SecretManager::V1beta1::Secret + # Updates metadata of an existing + # [Secret][google.cloud.secrets.v1beta1.Secret]. + rpc :UpdateSecret, ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest, ::Google::Cloud::SecretManager::V1beta1::Secret + # Deletes a [Secret][google.cloud.secrets.v1beta1.Secret]. + rpc :DeleteSecret, ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest, ::Google::Protobuf::Empty + # Lists [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion]. This + # call does not return secret data. + rpc :ListSecretVersions, ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest, ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse + # Gets metadata for a + # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + # + # `projects/*/secrets/*/versions/latest` is an alias to the `latest` + # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + rpc :GetSecretVersion, ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::SecretVersion + # Accesses a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + # This call returns the secret data. + # + # `projects/*/secrets/*/versions/latest` is an alias to the `latest` + # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + rpc :AccessSecretVersion, ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse + # Disables a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + # + # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the + # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to + # [DISABLED][google.cloud.secrets.v1beta1.SecretVersion.State.DISABLED]. + rpc :DisableSecretVersion, ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::SecretVersion + # Enables a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + # + # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the + # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to + # [ENABLED][google.cloud.secrets.v1beta1.SecretVersion.State.ENABLED]. + rpc :EnableSecretVersion, ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::SecretVersion + # Destroys a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. + # + # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the + # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to + # [DESTROYED][google.cloud.secrets.v1beta1.SecretVersion.State.DESTROYED] and + # irrevocably destroys the secret data. + rpc :DestroySecretVersion, ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::SecretVersion + # Sets the access control policy on the specified secret. Replaces any + # existing policy. + # + # Permissions on [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] + # are enforced according to the policy set on the associated + # [Secret][google.cloud.secrets.v1beta1.Secret]. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets the access control policy for a secret. + # Returns empty policy if the secret exists and does not have a policy set. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns permissions that a caller has for the specified secret. + # If the secret does not exist, this call returns an empty set of + # permissions, not a NOT_FOUND error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..0040e72113a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Secret Manager V1beta1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.rb new file mode 100644 index 000000000000..ad2f4fa25e44 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.rb @@ -0,0 +1,189 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecretManager + module V1beta1 + # A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} is a logical secret whose + # value and versions can be accessed. + # + # A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} is made up of zero or more + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} that represent + # the secret data. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} in the format + # `projects/*/secrets/*`. + # @!attribute [rw] replication + # @return [::Google::Cloud::SecretManager::V1beta1::Replication] + # Required. Immutable. The replication policy of the secret data attached to + # the {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # The replication policy cannot be changed after the Secret has been created. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} was created. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The labels assigned to this Secret. + # + # Label keys must be between 1 and 63 characters long, have a UTF-8 encoding + # of maximum 128 bytes, and must conform to the following PCRE regular + # expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}` + # + # Label values must be between 0 and 63 characters long, have a UTF-8 + # encoding of maximum 128 bytes, and must conform to the following PCRE + # regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}` + # + # No more than 64 labels can be assigned to a given resource. + class Secret + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A secret version resource in the Secret Manager API. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format + # `projects/*/secrets/*/versions/*`. + # + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} IDs in a + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} start at 1 and are + # incremented for each subsequent version of the secret. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} was created. + # @!attribute [r] destroy_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time this + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} was destroyed. + # Only present if {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} + # is {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED}. + # @!attribute [r] state + # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion::State] + # Output only. The current state of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + class SecretVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}, + # indicating if it can be accessed. + module State + # Not specified. This value is unused and invalid. + STATE_UNSPECIFIED = 0 + + # The {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} may be + # accessed. + ENABLED = 1 + + # The {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} may not + # be accessed, but the secret data is still available and can be placed + # back into the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::ENABLED ENABLED} + # state. + DISABLED = 2 + + # The {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} is + # destroyed and the secret data is no longer stored. A version may not + # leave this state once entered. + DESTROYED = 3 + end + end + + # A policy that defines the replication configuration of data. + # @!attribute [rw] automatic + # @return [::Google::Cloud::SecretManager::V1beta1::Replication::Automatic] + # The {::Google::Cloud::SecretManager::V1beta1::Secret Secret} will automatically be + # replicated without any restrictions. + # + # Note: The following fields are mutually exclusive: `automatic`, `user_managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] user_managed + # @return [::Google::Cloud::SecretManager::V1beta1::Replication::UserManaged] + # The {::Google::Cloud::SecretManager::V1beta1::Secret Secret} will only be replicated + # into the locations specified. + # + # Note: The following fields are mutually exclusive: `user_managed`, `automatic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Replication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A replication policy that replicates the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} payload without any + # restrictions. + class Automatic + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A replication policy that replicates the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} payload into the locations + # specified in + # {::Google::Cloud::SecretManager::V1beta1::Replication::UserManaged#replicas Replication.UserManaged.replicas} + # @!attribute [rw] replicas + # @return [::Array<::Google::Cloud::SecretManager::V1beta1::Replication::UserManaged::Replica>] + # Required. The list of Replicas for this + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # + # Cannot be empty. + class UserManaged + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a Replica for this + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. + # @!attribute [rw] location + # @return [::String] + # The canonical IDs of the location to replicate data. + # For example: `"us-east1"`. + class Replica + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # A secret payload resource in the Secret Manager API. This contains the + # sensitive secret data that is associated with a + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + # @!attribute [rw] data + # @return [::String] + # The secret data. Must be no larger than 64KiB. + class SecretPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.rb new file mode 100644 index 000000000000..dc304a41b777 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.rb @@ -0,0 +1,261 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1beta1 + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secrets SecretManagerService.ListSecrets}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}, in the format `projects/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. + class ListSecretsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secrets SecretManagerService.ListSecrets}. + # @!attribute [rw] secrets + # @return [::Array<::Google::Cloud::SecretManager::V1beta1::Secret>] + # The list of {::Google::Cloud::SecretManager::V1beta1::Secret Secrets} sorted in + # reverse by create_time (newest first). + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. Pass this value in + # {::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest#page_token ListSecretsRequest.page_token} + # to retrieve the next page. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}. + class ListSecretsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#create_secret SecretManagerService.CreateSecret}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project to associate with the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format `projects/*`. + # @!attribute [rw] secret_id + # @return [::String] + # Required. This must be unique within the project. + # + # A secret ID is a string with a maximum length of 255 characters and can + # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and + # underscore (`_`) characters. + # @!attribute [rw] secret + # @return [::Google::Cloud::SecretManager::V1beta1::Secret] + # Required. A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with initial + # field values. + class CreateSecretRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to associate with the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format + # `projects/*/secrets/*`. + # @!attribute [rw] payload + # @return [::Google::Cloud::SecretManager::V1beta1::SecretPayload] + # Required. The secret payload of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + class AddSecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret SecretManagerService.GetSecret}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format + # `projects/*/secrets/*`. + class GetSecretRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secret_versions SecretManagerService.ListSecretVersions}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} associated with the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} to list, in + # the format `projects/*/secrets/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # ListSecretVersionsResponse.next_page_token][]. + class ListSecretVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secret_versions SecretManagerService.ListSecretVersions}. + # @!attribute [rw] versions + # @return [::Array<::Google::Cloud::SecretManager::V1beta1::SecretVersion>] + # The list of {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} + # sorted in reverse by create_time (newest first). + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. Pass this value in + # {::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest#page_token ListSecretVersionsRequest.page_token} + # to retrieve the next page. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. + class ListSecretVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret_version SecretManagerService.GetSecretVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format + # `projects/*/secrets/*/versions/*`. + # `projects/*/secrets/*/versions/latest` is an alias to the `latest` + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. + class GetSecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#update_secret SecretManagerService.UpdateSecret}. + # @!attribute [rw] secret + # @return [::Google::Cloud::SecretManager::V1beta1::Secret] + # Required. {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with updated field + # values. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Specifies the fields to be updated. + class UpdateSecretRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format + # `projects/*/secrets/*/versions/*`. + class AccessSecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion}. + # @!attribute [rw] name + # @return [::String] + # The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format + # `projects/*/secrets/*/versions/*`. + # @!attribute [rw] payload + # @return [::Google::Cloud::SecretManager::V1beta1::SecretPayload] + # Secret payload + class AccessSecretVersionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#delete_secret SecretManagerService.DeleteSecret}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to delete in the format + # `projects/*/secrets/*`. + class DeleteSecretRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#disable_secret_version SecretManagerService.DisableSecretVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to disable in + # the format `projects/*/secrets/*/versions/*`. + class DisableSecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#enable_secret_version SecretManagerService.EnableSecretVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to enable in + # the format `projects/*/secrets/*/versions/*`. + class EnableSecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#destroy_secret_version SecretManagerService.DestroySecretVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to destroy in + # the format `projects/*/secrets/*/versions/*`. + class DestroySecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..7d0b3f462848 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-secret_manager-v1beta1", path: "../" +else + gem "google-cloud-secret_manager-v1beta1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.rb new file mode 100644 index 000000000000..ac6df7b6e662 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the access_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#access_secret_version. +# +def access_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new + + # Call the access_secret_version method. + result = client.access_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.rb new file mode 100644 index 000000000000..2a913b556c14 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the add_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#add_secret_version. +# +def add_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new + + # Call the add_secret_version method. + result = client.add_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.rb new file mode 100644 index 000000000000..b0fd1bcbba4a --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the create_secret call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#create_secret. +# +def create_secret + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new + + # Call the create_secret method. + result = client.create_secret request + + # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.rb new file mode 100644 index 000000000000..7148292e6d60 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the delete_secret call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#delete_secret. +# +def delete_secret + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new + + # Call the delete_secret method. + result = client.delete_secret request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.rb new file mode 100644 index 000000000000..a2ce12dcbae7 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the destroy_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#destroy_secret_version. +# +def destroy_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new + + # Call the destroy_secret_version method. + result = client.destroy_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.rb new file mode 100644 index 000000000000..c578b0471ea7 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the disable_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#disable_secret_version. +# +def disable_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new + + # Call the disable_secret_version method. + result = client.disable_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.rb new file mode 100644 index 000000000000..728070e800a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the enable_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#enable_secret_version. +# +def enable_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new + + # Call the enable_secret_version method. + result = client.enable_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.rb new file mode 100644 index 000000000000..2fcae7265e71 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the get_iam_policy call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.rb new file mode 100644 index 000000000000..75619ce72ae8 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_GetSecret_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the get_secret call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret. +# +def get_secret + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new + + # Call the get_secret method. + result = client.get_secret request + + # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_GetSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.rb new file mode 100644 index 000000000000..5c6734cf2a67 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the get_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret_version. +# +def get_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new + + # Call the get_secret_version method. + result = client.get_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.rb new file mode 100644 index 000000000000..3beb998ea346 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the list_secret_versions call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secret_versions. +# +def list_secret_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new + + # Call the list_secret_versions method. + result = client.list_secret_versions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecretManager::V1beta1::SecretVersion. + p item + end +end +# [END secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.rb new file mode 100644 index 000000000000..d29981383e36 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the list_secrets call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secrets. +# +def list_secrets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new + + # Call the list_secrets method. + result = client.list_secrets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecretManager::V1beta1::Secret. + p item + end +end +# [END secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.rb new file mode 100644 index 000000000000..0d96d5ef3a67 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the set_iam_policy call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.rb new file mode 100644 index 000000000000..855968413f63 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the test_iam_permissions call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.rb new file mode 100644 index 000000000000..7979fa334732 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_sync] +require "google/cloud/secret_manager/v1beta1" + +## +# Snippet for the update_secret call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#update_secret. +# +def update_secret + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new + + # Call the update_secret method. + result = client.update_secret request + + # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. + p result +end +# [END secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/snippet_metadata_google.cloud.secrets.v1beta1.json b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/snippet_metadata_google.cloud.secrets.v1beta1.json new file mode 100644 index 000000000000..e3e0f532e34a --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/snippet_metadata_google.cloud.secrets.v1beta1.json @@ -0,0 +1,615 @@ +{ + "client_library": { + "name": "google-cloud-secret_manager-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.secrets.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_sync", + "title": "Snippet for the list_secrets call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secrets.", + "file": "secret_manager_service/list_secrets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_secrets", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secrets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "ListSecrets", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.ListSecrets", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_sync", + "title": "Snippet for the create_secret call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#create_secret.", + "file": "secret_manager_service/create_secret.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_secret", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#create_secret", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta1::Secret", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "CreateSecret", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.CreateSecret", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_sync", + "title": "Snippet for the add_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#add_secret_version.", + "file": "secret_manager_service/add_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "add_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#add_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta1::SecretVersion", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "AddSecretVersion", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.AddSecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_GetSecret_sync", + "title": "Snippet for the get_secret call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret.", + "file": "secret_manager_service/get_secret.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_secret", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::GetSecretRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta1::Secret", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "GetSecret", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.GetSecret", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_sync", + "title": "Snippet for the update_secret call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#update_secret.", + "file": "secret_manager_service/update_secret.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_secret", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#update_secret", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta1::Secret", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "UpdateSecret", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.UpdateSecret", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_sync", + "title": "Snippet for the delete_secret call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#delete_secret.", + "file": "secret_manager_service/delete_secret.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_secret", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#delete_secret", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "DeleteSecret", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.DeleteSecret", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_sync", + "title": "Snippet for the list_secret_versions call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secret_versions.", + "file": "secret_manager_service/list_secret_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_secret_versions", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secret_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "ListSecretVersions", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.ListSecretVersions", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_sync", + "title": "Snippet for the get_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret_version.", + "file": "secret_manager_service/get_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta1::SecretVersion", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "GetSecretVersion", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.GetSecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_sync", + "title": "Snippet for the access_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#access_secret_version.", + "file": "secret_manager_service/access_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "access_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#access_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "AccessSecretVersion", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.AccessSecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_sync", + "title": "Snippet for the disable_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#disable_secret_version.", + "file": "secret_manager_service/disable_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#disable_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta1::SecretVersion", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "DisableSecretVersion", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.DisableSecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_sync", + "title": "Snippet for the enable_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#enable_secret_version.", + "file": "secret_manager_service/enable_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#enable_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta1::SecretVersion", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "EnableSecretVersion", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.EnableSecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_sync", + "title": "Snippet for the destroy_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#destroy_secret_version.", + "file": "secret_manager_service/destroy_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "destroy_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#destroy_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta1::SecretVersion", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "DestroySecretVersion", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.DestroySecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#set_iam_policy.", + "file": "secret_manager_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.SetIamPolicy", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_iam_policy.", + "file": "secret_manager_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.GetIamPolicy", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#test_iam_permissions.", + "file": "secret_manager_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.TestIamPermissions", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_test.rb new file mode 100644 index 000000000000..8b03d0133770 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/secret_manager/v1beta1/secret_manager_service" + +class ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_secret_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_path project: "value0", secret: "value1" + assert_equal "projects/value0/secrets/value1", path + end + end + + def test_secret_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_version_path project: "value0", secret: "value1", secret_version: "value2" + assert_equal "projects/value0/secrets/value1/versions/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_test.rb new file mode 100644 index 000000000000..654e46b19b8a --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_test.rb @@ -0,0 +1,921 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/secrets/v1beta1/service_pb" +require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest" + + +class ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_secrets + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_secrets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_list_secrets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_secrets_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_secrets parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_secrets ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_secrets(::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_secrets_client_stub.call_count + end + end + end + + def test_create_secret + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta1::Secret.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + secret_id = "hello world" + secret = {} + + create_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_create_secret_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_secret parent: parent, secret_id: secret_id, secret: secret do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_secret ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_secret(::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_secret_client_stub.call_count + end + end + end + + def test_add_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + payload = {} + + add_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_add_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, add_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.add_secret_version({ parent: parent, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.add_secret_version parent: parent, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.add_secret_version ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new(parent: parent, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.add_secret_version({ parent: parent, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.add_secret_version(::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new(parent: parent, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, add_secret_version_client_stub.call_count + end + end + end + + def test_get_secret + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta1::Secret.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_get_secret_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_secret({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_secret name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_secret ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_secret({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_secret(::Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_secret_client_stub.call_count + end + end + end + + def test_update_secret + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta1::Secret.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + secret = {} + update_mask = {} + + update_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_update_secret_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_secret({ secret: secret, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_secret secret: secret, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_secret ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new(secret: secret, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_secret({ secret: secret, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_secret(::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new(secret: secret, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_secret_client_stub.call_count + end + end + end + + def test_delete_secret + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_delete_secret_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_secret({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_secret name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_secret ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_secret({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_secret(::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_secret_client_stub.call_count + end + end + end + + def test_list_secret_versions + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_secret_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_list_secret_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_secret_versions_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_secret_versions parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_secret_versions ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_secret_versions(::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_secret_versions_client_stub.call_count + end + end + end + + def test_get_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_get_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_secret_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_secret_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_secret_version ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_secret_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_secret_version(::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_secret_version_client_stub.call_count + end + end + end + + def test_access_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + access_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_access_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, access_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.access_secret_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.access_secret_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.access_secret_version ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.access_secret_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.access_secret_version(::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, access_secret_version_client_stub.call_count + end + end + end + + def test_disable_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_disable_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.disable_secret_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.disable_secret_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.disable_secret_version ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.disable_secret_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.disable_secret_version(::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_secret_version_client_stub.call_count + end + end + end + + def test_enable_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_enable_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.enable_secret_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.enable_secret_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.enable_secret_version ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.enable_secret_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.enable_secret_version(::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_secret_version_client_stub.call_count + end + end + end + + def test_destroy_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + destroy_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_destroy_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, destroy_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.destroy_secret_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.destroy_secret_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.destroy_secret_version ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.destroy_secret_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.destroy_secret_version(::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, destroy_secret_version_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_test.rb new file mode 100644 index 000000000000..dae1d80c90fc --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_test.rb @@ -0,0 +1,1008 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/secrets/v1beta1/service_pb" +require "google/cloud/secret_manager/v1beta1/secret_manager_service" + +class ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_secrets + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_secrets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_secrets, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_secrets_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_secrets parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_secrets ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_secrets(::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_secrets_client_stub.call_rpc_count + end + end + + def test_create_secret + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta1::Secret.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + secret_id = "hello world" + secret = {} + + create_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_secret, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["secret_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta1::Secret), request["secret"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_secret parent: parent, secret_id: secret_id, secret: secret do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_secret ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_secret(::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_secret_client_stub.call_rpc_count + end + end + + def test_add_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + payload = {} + + add_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :add_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta1::SecretPayload), request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, add_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.add_secret_version({ parent: parent, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.add_secret_version parent: parent, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.add_secret_version ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new(parent: parent, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.add_secret_version({ parent: parent, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.add_secret_version(::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new(parent: parent, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, add_secret_version_client_stub.call_rpc_count + end + end + + def test_get_secret + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta1::Secret.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_secret, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_secret({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_secret name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_secret ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_secret({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_secret(::Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_secret_client_stub.call_rpc_count + end + end + + def test_update_secret + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta1::Secret.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + secret = {} + update_mask = {} + + update_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_secret, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta1::Secret), request["secret"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_secret({ secret: secret, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_secret secret: secret, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_secret ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new(secret: secret, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_secret({ secret: secret, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_secret(::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new(secret: secret, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_secret_client_stub.call_rpc_count + end + end + + def test_delete_secret + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_secret, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_secret({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_secret name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_secret ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_secret({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_secret(::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_secret_client_stub.call_rpc_count + end + end + + def test_list_secret_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_secret_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_secret_versions, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_secret_versions_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_secret_versions parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_secret_versions ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_secret_versions(::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_secret_versions_client_stub.call_rpc_count + end + end + + def test_get_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_secret_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_secret_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_secret_version ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_secret_version({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_secret_version(::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_secret_version_client_stub.call_rpc_count + end + end + + def test_access_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + access_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :access_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, access_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.access_secret_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.access_secret_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.access_secret_version ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.access_secret_version({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.access_secret_version(::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, access_secret_version_client_stub.call_rpc_count + end + end + + def test_disable_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.disable_secret_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.disable_secret_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.disable_secret_version ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.disable_secret_version({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.disable_secret_version(::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, disable_secret_version_client_stub.call_rpc_count + end + end + + def test_enable_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.enable_secret_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.enable_secret_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.enable_secret_version ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.enable_secret_version({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.enable_secret_version(::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enable_secret_version_client_stub.call_rpc_count + end + end + + def test_destroy_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + destroy_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :destroy_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, destroy_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.destroy_secret_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.destroy_secret_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.destroy_secret_version ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.destroy_secret_version({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.destroy_secret_version(::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, destroy_secret_version_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta1/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-v1beta2/.gitignore b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.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-v1beta2/.repo-metadata.json b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.repo-metadata.json new file mode 100644 index 000000000000..14c52f056019 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.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-v1beta2/latest", + "distribution_name": "google-cloud-secret_manager-v1beta2", + "is_cloud": true, + "language": "ruby", + "name": "secretmanager", + "name_pretty": "Secret Manager V1BETA2 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 Overview. Note that google-cloud-secret_manager-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secret_manager instead. See the readme for more details.", + "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-v1beta2/.rubocop.yml b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.rubocop.yml new file mode 100644 index 000000000000..734c385c1bd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-secret_manager-v1beta2.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-secret_manager-v1beta2.rb" diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/.toys.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.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-v1beta2/.yardopts b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.yardopts new file mode 100644 index 000000000000..ac280e88bebc --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Secret Manager V1BETA2 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-secret_manager-v1beta2/AUTHENTICATION.md new file mode 100644 index 000000000000..15838bd69def --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-secret_manager-v1beta2 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-v1beta2 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/v1beta2" + +client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/secret_manager/v1beta2" + +::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-secret_manager-v1beta2 +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/v1beta2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/CHANGELOG.md b/owl-bot-staging/google-cloud-secret_manager-v1beta2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/Gemfile b/owl-bot-staging/google-cloud-secret_manager-v1beta2/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-v1beta2/LICENSE.md b/owl-bot-staging/google-cloud-secret_manager-v1beta2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/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-v1beta2/README.md b/owl-bot-staging/google-cloud-secret_manager-v1beta2/README.md new file mode 100644 index 000000000000..5d42a564c07a --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Secret Manager V1BETA2 API + +Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security. + +Secret Manager Overview. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Secret Manager V1BETA2 API. Most users should consider using +the main client gem, +[google-cloud-secret_manager](https://rubygems.org/gems/google-cloud-secret_manager). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-secret_manager-v1beta2 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/secretmanager.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/secret_manager/v1beta2" + +client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new +request = ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new # (request fields as keyword arguments...) +response = client.list_secrets request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1beta2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/secret-manager) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/secret_manager/v1beta2" +require "logger" + +client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-secret_manager`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-secret_manager-v1beta2`. +_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-v1beta2`. + +### 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-v1beta2/Rakefile b/owl-bot-staging/google-cloud-secret_manager-v1beta2/Rakefile new file mode 100644 index 000000000000..b1cfc54cac77 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-secret_manager-v1beta2 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/v1beta2/secret_manager_service/credentials" + ::Google::Cloud::SecretManager::V1beta2::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-v1beta2 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-v1beta2 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-v1beta2 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-v1beta2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-secret_manager-v1beta2" + header "google-cloud-secret_manager-v1beta2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-secret_manager-v1beta2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-secret_manager-v1beta2 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-v1beta2 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-v1beta2 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-v1beta2/gapic_metadata.json b/owl-bot-staging/google-cloud-secret_manager-v1beta2/gapic_metadata.json new file mode 100644 index 000000000000..fd910a3daa8c --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/gapic_metadata.json @@ -0,0 +1,93 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.secretmanager.v1beta2", + "libraryPackage": "::Google::Cloud::SecretManager::V1beta2", + "services": { + "SecretManagerService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client", + "rpcs": { + "ListSecrets": { + "methods": [ + "list_secrets" + ] + }, + "CreateSecret": { + "methods": [ + "create_secret" + ] + }, + "AddSecretVersion": { + "methods": [ + "add_secret_version" + ] + }, + "GetSecret": { + "methods": [ + "get_secret" + ] + }, + "UpdateSecret": { + "methods": [ + "update_secret" + ] + }, + "DeleteSecret": { + "methods": [ + "delete_secret" + ] + }, + "ListSecretVersions": { + "methods": [ + "list_secret_versions" + ] + }, + "GetSecretVersion": { + "methods": [ + "get_secret_version" + ] + }, + "AccessSecretVersion": { + "methods": [ + "access_secret_version" + ] + }, + "DisableSecretVersion": { + "methods": [ + "disable_secret_version" + ] + }, + "EnableSecretVersion": { + "methods": [ + "enable_secret_version" + ] + }, + "DestroySecretVersion": { + "methods": [ + "destroy_secret_version" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/google-cloud-secret_manager-v1beta2.gemspec b/owl-bot-staging/google-cloud-secret_manager-v1beta2/google-cloud-secret_manager-v1beta2.gemspec new file mode 100644 index 000000000000..cc529d218e90 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/google-cloud-secret_manager-v1beta2.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/secret_manager/v1beta2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-secret_manager-v1beta2" + gem.version = Google::Cloud::SecretManager::V1beta2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Secret Manager Overview. Note that google-cloud-secret_manager-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secret_manager instead. See the readme for more details." + gem.summary = "Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.rb new file mode 100644 index 000000000000..4fa698942ce3 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/secret_manager/v1beta2" diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2.rb new file mode 100644 index 000000000000..094bfb8e6d20 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/secret_manager/v1beta2/secret_manager_service" +require "google/cloud/secret_manager/v1beta2/version" + +module Google + module Cloud + module SecretManager + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/secret_manager/v1beta2" + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/secret_manager/v1beta2" + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + module V1beta2 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta2", "_helpers.rb" +require "google/cloud/secret_manager/v1beta2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb new file mode 100644 index 000000000000..2cb21f372d4d --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module SecretManager + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/secret_manager/v1beta2/rest" + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + module V1beta2 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecretManager"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta2/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.rb new file mode 100644 index 000000000000..4581b5c14be0 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest" +require "google/cloud/secret_manager/v1beta2/bindings_override" +require "google/cloud/secret_manager/v1beta2/version" + +module Google + module Cloud + module SecretManager + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/secret_manager/v1beta2/rest" + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + module V1beta2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb new file mode 100644 index 000000000000..5200a70afe3b --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/secret_manager/v1beta2/version" + +require "google/cloud/secret_manager/v1beta2/secret_manager_service/credentials" +require "google/cloud/secret_manager/v1beta2/secret_manager_service/paths" +require "google/cloud/secret_manager/v1beta2/secret_manager_service/client" +require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest" + +module Google + module Cloud + module SecretManager + module V1beta2 + ## + # Secret Manager Service + # + # Manages secrets and operations using those secrets. Implements a REST + # model with the following objects: + # + # * {::Google::Cloud::SecretManager::V1beta2::Secret Secret} + # * {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/secret_manager/v1beta2/secret_manager_service" + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest" + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + module SecretManagerService + end + end + end + end +end + +helper_path = ::File.join __dir__, "secret_manager_service", "helpers.rb" +require "google/cloud/secret_manager/v1beta2/secret_manager_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb new file mode 100644 index 000000000000..dc83842b33eb --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb @@ -0,0 +1,1998 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/secretmanager/v1beta2/service_pb" +require "google/cloud/location" + +module Google + module Cloud + module SecretManager + module V1beta2 + module SecretManagerService + ## + # Client for the SecretManagerService service. + # + # Secret Manager Service + # + # Manages secrets and operations using those secrets. Implements a REST + # model with the following objects: + # + # * {::Google::Cloud::SecretManager::V1beta2::Secret Secret} + # * {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "secretmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :secret_manager_service_stub + + ## + # Configure the SecretManagerService Client class. + # + # See {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecretManagerService clients + # ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecretManager", "V1beta2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_secrets.timeout = 60.0 + + default_config.rpcs.create_secret.timeout = 60.0 + + default_config.rpcs.add_secret_version.timeout = 60.0 + + default_config.rpcs.get_secret.timeout = 60.0 + + default_config.rpcs.update_secret.timeout = 60.0 + + default_config.rpcs.delete_secret.timeout = 60.0 + + default_config.rpcs.list_secret_versions.timeout = 60.0 + + default_config.rpcs.get_secret_version.timeout = 60.0 + + default_config.rpcs.access_secret_version.timeout = 60.0 + default_config.rpcs.access_secret_version.retry_policy = { + initial_delay: 2.0, max_delay: 60.0, multiplier: 2.0, retry_codes: [14, 8] + } + + default_config.rpcs.disable_secret_version.timeout = 60.0 + + default_config.rpcs.enable_secret_version.timeout = 60.0 + + default_config.rpcs.destroy_secret_version.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.get_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecretManagerService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @secret_manager_service_stub.universe_domain + end + + ## + # Create a new SecretManagerService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecretManagerService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/secretmanager/v1beta2/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @secret_manager_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @secret_manager_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @secret_manager_service_stub.endpoint + config.universe_domain = @secret_manager_service_stub.universe_domain + config.logger = @secret_manager_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @secret_manager_service_stub.logger + end + + # Service calls + + ## + # Lists {::Google::Cloud::SecretManager::V1beta2::Secret Secrets}. + # + # @overload list_secrets(request, options = nil) + # Pass arguments to `list_secrets` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_secrets(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_secrets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secrets}, in the format + # `projects/*` or `projects/*/locations/*` + # @param page_size [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. + # @param filter [::String] + # Optional. Filter string, adhering to the rules in + # [List-operation + # filtering](https://cloud.google.com/secret-manager/docs/filtering). List + # only secrets matching the filter. If filter is empty, all secrets are + # listed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::Secret>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::Secret>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new + # + # # Call the list_secrets method. + # result = client.list_secrets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecretManager::V1beta2::Secret. + # p item + # end + # + def list_secrets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_secrets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_secrets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_secrets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :list_secrets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new {::Google::Cloud::SecretManager::V1beta2::Secret Secret} + # containing no + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. + # + # @overload create_secret(request, options = nil) + # Pass arguments to `create_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_secret(parent: nil, secret_id: nil, secret: nil) + # Pass arguments to `create_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project to associate with the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format + # `projects/*` or `projects/*/locations/*`. + # @param secret_id [::String] + # Required. This must be unique within the project. + # + # A secret ID is a string with a maximum length of 255 characters and can + # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and + # underscore (`_`) characters. + # @param secret [::Google::Cloud::SecretManager::V1beta2::Secret, ::Hash] + # Required. A {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with + # initial field values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::Secret] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::Secret] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new + # + # # Call the create_secret method. + # result = client.create_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. + # p result + # + def create_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_secret.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :create_secret, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} + # containing secret data and attaches it to an existing + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # @overload add_secret_version(request, options = nil) + # Pass arguments to `add_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload add_secret_version(parent: nil, payload: nil) + # Pass arguments to `add_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to associate with the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the + # format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + # @param payload [::Google::Cloud::SecretManager::V1beta2::SecretPayload, ::Hash] + # Required. The secret payload of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new + # + # # Call the add_secret_version method. + # result = client.add_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p result + # + def add_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.add_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.add_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.add_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :add_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata for a given + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # @overload get_secret(request, options = nil) + # Pass arguments to `get_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::GetSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::GetSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_secret(name: nil) + # Pass arguments to `get_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format + # `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::Secret] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::Secret] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new + # + # # Call the get_secret method. + # result = client.get_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. + # p result + # + def get_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_secret.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :get_secret, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates metadata of an existing + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # @overload update_secret(request, options = nil) + # Pass arguments to `update_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_secret(secret: nil, update_mask: nil) + # Pass arguments to `update_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param secret [::Google::Cloud::SecretManager::V1beta2::Secret, ::Hash] + # Required. {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with updated + # field values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Specifies the fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::Secret] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::Secret] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new + # + # # Call the update_secret method. + # result = client.update_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. + # p result + # + def update_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.secret&.name + header_params["secret.name"] = request.secret.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_secret.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :update_secret, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # @overload delete_secret(request, options = nil) + # Pass arguments to `delete_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_secret(name: nil, etag: nil) + # Pass arguments to `delete_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to delete in the format + # `projects/*/secrets/*`. + # @param etag [::String] + # Optional. Etag of the {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # The request succeeds if it matches the etag of the currently stored secret + # object. If the etag is omitted, the request succeeds. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new + # + # # Call the delete_secret method. + # result = client.delete_secret request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_secret.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :delete_secret, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. + # This call does not return secret data. + # + # @overload list_secret_versions(request, options = nil) + # Pass arguments to `list_secret_versions` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_secret_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} associated with the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} to list, + # in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + # @param page_size [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # ListSecretVersionsResponse.next_page_token][]. + # @param filter [::String] + # Optional. Filter string, adhering to the rules in + # [List-operation + # filtering](https://cloud.google.com/secret-manager/docs/filtering). List + # only secret versions matching the filter. If filter is empty, all secret + # versions are listed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::SecretVersion>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::SecretVersion>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new + # + # # Call the list_secret_versions method. + # result = client.list_secret_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p item + # end + # + def list_secret_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_secret_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_secret_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_secret_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :list_secret_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata for a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # `projects/*/secrets/*/versions/latest` is an alias to the most recently + # created {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # @overload get_secret_version(request, options = nil) + # Pass arguments to `get_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_secret_version(name: nil) + # Pass arguments to `get_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the + # format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # + # `projects/*/secrets/*/versions/latest` or + # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + # recently created + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new + # + # # Call the get_secret_version method. + # result = client.get_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p result + # + def get_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :get_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Accesses a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. This + # call returns the secret data. + # + # `projects/*/secrets/*/versions/latest` is an alias to the most recently + # created {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # @overload access_secret_version(request, options = nil) + # Pass arguments to `access_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload access_secret_version(name: nil) + # Pass arguments to `access_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the + # format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # + # `projects/*/secrets/*/versions/latest` or + # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + # recently created + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new + # + # # Call the access_secret_version method. + # result = client.access_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse. + # p result + # + def access_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.access_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.access_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.access_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :access_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disables a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of + # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::DISABLED DISABLED}. + # + # @overload disable_secret_version(request, options = nil) + # Pass arguments to `disable_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload disable_secret_version(name: nil, etag: nil) + # Pass arguments to `disable_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # disable in the format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # @param etag [::String] + # Optional. Etag of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The + # request succeeds if it matches the etag of the currently stored secret + # version object. If the etag is omitted, the request succeeds. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new + # + # # Call the disable_secret_version method. + # result = client.disable_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p result + # + def disable_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.disable_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.disable_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :disable_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enables a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of + # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::ENABLED ENABLED}. + # + # @overload enable_secret_version(request, options = nil) + # Pass arguments to `enable_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enable_secret_version(name: nil, etag: nil) + # Pass arguments to `enable_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to enable + # in the format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # @param etag [::String] + # Optional. Etag of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The + # request succeeds if it matches the etag of the currently stored secret + # version object. If the etag is omitted, the request succeeds. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new + # + # # Call the enable_secret_version method. + # result = client.enable_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p result + # + def enable_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enable_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enable_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :enable_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Destroys a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of + # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::DESTROYED DESTROYED} + # and irrevocably destroys the secret data. + # + # @overload destroy_secret_version(request, options = nil) + # Pass arguments to `destroy_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload destroy_secret_version(name: nil, etag: nil) + # Pass arguments to `destroy_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # destroy in the format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # @param etag [::String] + # Optional. Etag of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The + # request succeeds if it matches the etag of the currently stored secret + # version object. If the etag is omitted, the request succeeds. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new + # + # # Call the destroy_secret_version method. + # result = client.destroy_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p result + # + def destroy_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.destroy_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.destroy_secret_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.destroy_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :destroy_secret_version, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified secret. Replaces any + # existing policy. + # + # Permissions on + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} are + # enforced according to the policy set on the associated + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a secret. + # Returns empty policy if the secret exists and does not have a policy set. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has for the specified secret. + # If the secret does not exist, this call returns an empty set of + # permissions, not a NOT_FOUND error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecretManagerService API. + # + # This class represents the configuration for SecretManagerService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_secrets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_secrets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_secrets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "secretmanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SecretManagerService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_secrets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_secrets + ## + # RPC-specific configuration for `create_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :create_secret + ## + # RPC-specific configuration for `add_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :add_secret_version + ## + # RPC-specific configuration for `get_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :get_secret + ## + # RPC-specific configuration for `update_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :update_secret + ## + # RPC-specific configuration for `delete_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_secret + ## + # RPC-specific configuration for `list_secret_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_secret_versions + ## + # RPC-specific configuration for `get_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_secret_version + ## + # RPC-specific configuration for `access_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :access_secret_version + ## + # RPC-specific configuration for `disable_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_secret_version + ## + # RPC-specific configuration for `enable_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_secret_version + ## + # RPC-specific configuration for `destroy_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :destroy_secret_version + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + list_secrets_config = parent_rpcs.list_secrets if parent_rpcs.respond_to? :list_secrets + @list_secrets = ::Gapic::Config::Method.new list_secrets_config + create_secret_config = parent_rpcs.create_secret if parent_rpcs.respond_to? :create_secret + @create_secret = ::Gapic::Config::Method.new create_secret_config + add_secret_version_config = parent_rpcs.add_secret_version if parent_rpcs.respond_to? :add_secret_version + @add_secret_version = ::Gapic::Config::Method.new add_secret_version_config + get_secret_config = parent_rpcs.get_secret if parent_rpcs.respond_to? :get_secret + @get_secret = ::Gapic::Config::Method.new get_secret_config + update_secret_config = parent_rpcs.update_secret if parent_rpcs.respond_to? :update_secret + @update_secret = ::Gapic::Config::Method.new update_secret_config + delete_secret_config = parent_rpcs.delete_secret if parent_rpcs.respond_to? :delete_secret + @delete_secret = ::Gapic::Config::Method.new delete_secret_config + list_secret_versions_config = parent_rpcs.list_secret_versions if parent_rpcs.respond_to? :list_secret_versions + @list_secret_versions = ::Gapic::Config::Method.new list_secret_versions_config + get_secret_version_config = parent_rpcs.get_secret_version if parent_rpcs.respond_to? :get_secret_version + @get_secret_version = ::Gapic::Config::Method.new get_secret_version_config + access_secret_version_config = parent_rpcs.access_secret_version if parent_rpcs.respond_to? :access_secret_version + @access_secret_version = ::Gapic::Config::Method.new access_secret_version_config + disable_secret_version_config = parent_rpcs.disable_secret_version if parent_rpcs.respond_to? :disable_secret_version + @disable_secret_version = ::Gapic::Config::Method.new disable_secret_version_config + enable_secret_version_config = parent_rpcs.enable_secret_version if parent_rpcs.respond_to? :enable_secret_version + @enable_secret_version = ::Gapic::Config::Method.new enable_secret_version_config + destroy_secret_version_config = parent_rpcs.destroy_secret_version if parent_rpcs.respond_to? :destroy_secret_version + @destroy_secret_version = ::Gapic::Config::Method.new destroy_secret_version_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb new file mode 100644 index 000000000000..42d6ada8e23f --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module SecretManager + module V1beta2 + module SecretManagerService + # Credentials for the SecretManagerService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SECRET_MANAGER_CREDENTIALS", + "SECRET_MANAGER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SECRET_MANAGER_CREDENTIALS_JSON", + "SECRET_MANAGER_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb new file mode 100644 index 000000000000..a3810d469c8f --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb @@ -0,0 +1,167 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1beta2 + module SecretManagerService + # Path helper methods for the SecretManagerService API. + module Paths + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified Secret resource string. + # + # @overload secret_path(project:, secret:) + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}` + # + # @param project [String] + # @param secret [String] + # + # @overload secret_path(project:, location:, secret:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/secrets/{secret}` + # + # @param project [String] + # @param location [String] + # @param secret [String] + # + # @return [::String] + def secret_path **args + resources = { + "project:secret" => (proc do |project:, secret:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}" + end), + "location:project:secret" => (proc do |project:, location:, secret:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/secrets/#{secret}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified SecretVersion resource string. + # + # @overload secret_version_path(project:, secret:, secret_version:) + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}/versions/{secret_version}` + # + # @param project [String] + # @param secret [String] + # @param secret_version [String] + # + # @overload secret_version_path(project:, location:, secret:, secret_version:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}` + # + # @param project [String] + # @param location [String] + # @param secret [String] + # @param secret_version [String] + # + # @return [::String] + def secret_version_path **args + resources = { + "project:secret:secret_version" => (proc do |project:, secret:, secret_version:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" + end), + "location:project:secret:secret_version" => (proc do |project:, location:, secret:, secret_version:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/locations/#{location}/secrets/#{secret}/versions/#{secret_version}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Topic resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/topics/{topic}` + # + # @param project [String] + # @param topic [String] + # + # @return [::String] + def topic_path project:, topic: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/topics/#{topic}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb new file mode 100644 index 000000000000..0f60f9b3fd09 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/secret_manager/v1beta2/version" +require "google/cloud/secret_manager/v1beta2/bindings_override" + +require "google/cloud/secret_manager/v1beta2/secret_manager_service/credentials" +require "google/cloud/secret_manager/v1beta2/secret_manager_service/paths" +require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client" + +module Google + module Cloud + module SecretManager + module V1beta2 + ## + # Secret Manager Service + # + # Manages secrets and operations using those secrets. Implements a REST + # model with the following objects: + # + # * {::Google::Cloud::SecretManager::V1beta2::Secret Secret} + # * {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest" + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + module SecretManagerService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb new file mode 100644 index 000000000000..e674d89468e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb @@ -0,0 +1,1858 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/secretmanager/v1beta2/service_pb" +require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module SecretManager + module V1beta2 + module SecretManagerService + module Rest + ## + # REST client for the SecretManagerService service. + # + # Secret Manager Service + # + # Manages secrets and operations using those secrets. Implements a REST + # model with the following objects: + # + # * {::Google::Cloud::SecretManager::V1beta2::Secret Secret} + # * {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "secretmanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :secret_manager_service_stub + + ## + # Configure the SecretManagerService Client class. + # + # See {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecretManagerService clients + # ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecretManager", "V1beta2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_secrets.timeout = 60.0 + + default_config.rpcs.create_secret.timeout = 60.0 + + default_config.rpcs.add_secret_version.timeout = 60.0 + + default_config.rpcs.get_secret.timeout = 60.0 + + default_config.rpcs.update_secret.timeout = 60.0 + + default_config.rpcs.delete_secret.timeout = 60.0 + + default_config.rpcs.list_secret_versions.timeout = 60.0 + + default_config.rpcs.get_secret_version.timeout = 60.0 + + default_config.rpcs.access_secret_version.timeout = 60.0 + default_config.rpcs.access_secret_version.retry_policy = { + initial_delay: 2.0, max_delay: 60.0, multiplier: 2.0, retry_codes: [14, 8] + } + + default_config.rpcs.disable_secret_version.timeout = 60.0 + + default_config.rpcs.enable_secret_version.timeout = 60.0 + + default_config.rpcs.destroy_secret_version.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.get_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecretManagerService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @secret_manager_service_stub.universe_domain + end + + ## + # Create a new SecretManagerService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecretManagerService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @secret_manager_service_stub = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @secret_manager_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @secret_manager_service_stub.endpoint + config.universe_domain = @secret_manager_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @secret_manager_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @secret_manager_service_stub.logger + end + + # Service calls + + ## + # Lists {::Google::Cloud::SecretManager::V1beta2::Secret Secrets}. + # + # @overload list_secrets(request, options = nil) + # Pass arguments to `list_secrets` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_secrets(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_secrets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secrets}, in the format + # `projects/*` or `projects/*/locations/*` + # @param page_size [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. + # @param filter [::String] + # Optional. Filter string, adhering to the rules in + # [List-operation + # filtering](https://cloud.google.com/secret-manager/docs/filtering). List + # only secrets matching the filter. If filter is empty, all secrets are + # listed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::Secret>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::Secret>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new + # + # # Call the list_secrets method. + # result = client.list_secrets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecretManager::V1beta2::Secret. + # p item + # end + # + def list_secrets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_secrets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_secrets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_secrets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.list_secrets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, "secrets", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new {::Google::Cloud::SecretManager::V1beta2::Secret Secret} + # containing no + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. + # + # @overload create_secret(request, options = nil) + # Pass arguments to `create_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_secret(parent: nil, secret_id: nil, secret: nil) + # Pass arguments to `create_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project to associate with the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format + # `projects/*` or `projects/*/locations/*`. + # @param secret_id [::String] + # Required. This must be unique within the project. + # + # A secret ID is a string with a maximum length of 255 characters and can + # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and + # underscore (`_`) characters. + # @param secret [::Google::Cloud::SecretManager::V1beta2::Secret, ::Hash] + # Required. A {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with + # initial field values. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::Secret] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new + # + # # Call the create_secret method. + # result = client.create_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. + # p result + # + def create_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_secret.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.create_secret request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} + # containing secret data and attaches it to an existing + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # @overload add_secret_version(request, options = nil) + # Pass arguments to `add_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload add_secret_version(parent: nil, payload: nil) + # Pass arguments to `add_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to associate with the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the + # format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + # @param payload [::Google::Cloud::SecretManager::V1beta2::SecretPayload, ::Hash] + # Required. The secret payload of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new + # + # # Call the add_secret_version method. + # result = client.add_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p result + # + def add_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.add_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.add_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.add_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.add_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata for a given + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # @overload get_secret(request, options = nil) + # Pass arguments to `get_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::GetSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::GetSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_secret(name: nil) + # Pass arguments to `get_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format + # `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::Secret] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new + # + # # Call the get_secret method. + # result = client.get_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. + # p result + # + def get_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_secret.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.get_secret request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates metadata of an existing + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # @overload update_secret(request, options = nil) + # Pass arguments to `update_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_secret(secret: nil, update_mask: nil) + # Pass arguments to `update_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param secret [::Google::Cloud::SecretManager::V1beta2::Secret, ::Hash] + # Required. {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with updated + # field values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Specifies the fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::Secret] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new + # + # # Call the update_secret method. + # result = client.update_secret request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. + # p result + # + def update_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_secret.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.update_secret request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # @overload delete_secret(request, options = nil) + # Pass arguments to `delete_secret` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_secret(name: nil, etag: nil) + # Pass arguments to `delete_secret` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to delete in the format + # `projects/*/secrets/*`. + # @param etag [::String] + # Optional. Etag of the {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # The request succeeds if it matches the etag of the currently stored secret + # object. If the etag is omitted, the request succeeds. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new + # + # # Call the delete_secret method. + # result = client.delete_secret request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_secret request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_secret.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_secret.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_secret.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.delete_secret request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. + # This call does not return secret data. + # + # @overload list_secret_versions(request, options = nil) + # Pass arguments to `list_secret_versions` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_secret_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} associated with the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} to list, + # in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + # @param page_size [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # ListSecretVersionsResponse.next_page_token][]. + # @param filter [::String] + # Optional. Filter string, adhering to the rules in + # [List-operation + # filtering](https://cloud.google.com/secret-manager/docs/filtering). List + # only secret versions matching the filter. If filter is empty, all secret + # versions are listed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::SecretVersion>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::SecretVersion>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new + # + # # Call the list_secret_versions method. + # result = client.list_secret_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p item + # end + # + def list_secret_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_secret_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_secret_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_secret_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.list_secret_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, "versions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata for a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # `projects/*/secrets/*/versions/latest` is an alias to the most recently + # created {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # @overload get_secret_version(request, options = nil) + # Pass arguments to `get_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_secret_version(name: nil) + # Pass arguments to `get_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the + # format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # + # `projects/*/secrets/*/versions/latest` or + # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + # recently created + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new + # + # # Call the get_secret_version method. + # result = client.get_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p result + # + def get_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.get_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Accesses a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. This + # call returns the secret data. + # + # `projects/*/secrets/*/versions/latest` is an alias to the most recently + # created {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # @overload access_secret_version(request, options = nil) + # Pass arguments to `access_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload access_secret_version(name: nil) + # Pass arguments to `access_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the + # format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # + # `projects/*/secrets/*/versions/latest` or + # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + # recently created + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new + # + # # Call the access_secret_version method. + # result = client.access_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse. + # p result + # + def access_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.access_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.access_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.access_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.access_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disables a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of + # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::DISABLED DISABLED}. + # + # @overload disable_secret_version(request, options = nil) + # Pass arguments to `disable_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload disable_secret_version(name: nil, etag: nil) + # Pass arguments to `disable_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # disable in the format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # @param etag [::String] + # Optional. Etag of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The + # request succeeds if it matches the etag of the currently stored secret + # version object. If the etag is omitted, the request succeeds. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new + # + # # Call the disable_secret_version method. + # result = client.disable_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p result + # + def disable_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.disable_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.disable_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.disable_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enables a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of + # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::ENABLED ENABLED}. + # + # @overload enable_secret_version(request, options = nil) + # Pass arguments to `enable_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enable_secret_version(name: nil, etag: nil) + # Pass arguments to `enable_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to enable + # in the format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # @param etag [::String] + # Optional. Etag of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The + # request succeeds if it matches the etag of the currently stored secret + # version object. If the etag is omitted, the request succeeds. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new + # + # # Call the enable_secret_version method. + # result = client.enable_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p result + # + def enable_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enable_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.enable_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.enable_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Destroys a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # + # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of + # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::DESTROYED DESTROYED} + # and irrevocably destroys the secret data. + # + # @overload destroy_secret_version(request, options = nil) + # Pass arguments to `destroy_secret_version` via a request object, either of type + # {::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload destroy_secret_version(name: nil, etag: nil) + # Pass arguments to `destroy_secret_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # destroy in the format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # @param etag [::String] + # Optional. Etag of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The + # request succeeds if it matches the etag of the currently stored secret + # version object. If the etag is omitted, the request succeeds. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new + # + # # Call the destroy_secret_version method. + # result = client.destroy_secret_version request + # + # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + # p result + # + def destroy_secret_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.destroy_secret_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.destroy_secret_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.destroy_secret_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.destroy_secret_version request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified secret. Replaces any + # existing policy. + # + # Permissions on + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} are + # enforced according to the policy set on the associated + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a secret. + # Returns empty policy if the secret exists and does not have a policy set. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has for the specified secret. + # If the secret does not exist, this call returns an empty set of + # permissions, not a NOT_FOUND error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secret_manager/v1beta2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secret_manager_service_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecretManagerService REST API. + # + # This class represents the configuration for SecretManagerService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_secrets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_secrets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_secrets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "secretmanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the SecretManagerService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_secrets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_secrets + ## + # RPC-specific configuration for `create_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :create_secret + ## + # RPC-specific configuration for `add_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :add_secret_version + ## + # RPC-specific configuration for `get_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :get_secret + ## + # RPC-specific configuration for `update_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :update_secret + ## + # RPC-specific configuration for `delete_secret` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_secret + ## + # RPC-specific configuration for `list_secret_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_secret_versions + ## + # RPC-specific configuration for `get_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_secret_version + ## + # RPC-specific configuration for `access_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :access_secret_version + ## + # RPC-specific configuration for `disable_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_secret_version + ## + # RPC-specific configuration for `enable_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_secret_version + ## + # RPC-specific configuration for `destroy_secret_version` + # @return [::Gapic::Config::Method] + # + attr_reader :destroy_secret_version + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + list_secrets_config = parent_rpcs.list_secrets if parent_rpcs.respond_to? :list_secrets + @list_secrets = ::Gapic::Config::Method.new list_secrets_config + create_secret_config = parent_rpcs.create_secret if parent_rpcs.respond_to? :create_secret + @create_secret = ::Gapic::Config::Method.new create_secret_config + add_secret_version_config = parent_rpcs.add_secret_version if parent_rpcs.respond_to? :add_secret_version + @add_secret_version = ::Gapic::Config::Method.new add_secret_version_config + get_secret_config = parent_rpcs.get_secret if parent_rpcs.respond_to? :get_secret + @get_secret = ::Gapic::Config::Method.new get_secret_config + update_secret_config = parent_rpcs.update_secret if parent_rpcs.respond_to? :update_secret + @update_secret = ::Gapic::Config::Method.new update_secret_config + delete_secret_config = parent_rpcs.delete_secret if parent_rpcs.respond_to? :delete_secret + @delete_secret = ::Gapic::Config::Method.new delete_secret_config + list_secret_versions_config = parent_rpcs.list_secret_versions if parent_rpcs.respond_to? :list_secret_versions + @list_secret_versions = ::Gapic::Config::Method.new list_secret_versions_config + get_secret_version_config = parent_rpcs.get_secret_version if parent_rpcs.respond_to? :get_secret_version + @get_secret_version = ::Gapic::Config::Method.new get_secret_version_config + access_secret_version_config = parent_rpcs.access_secret_version if parent_rpcs.respond_to? :access_secret_version + @access_secret_version = ::Gapic::Config::Method.new access_secret_version_config + disable_secret_version_config = parent_rpcs.disable_secret_version if parent_rpcs.respond_to? :disable_secret_version + @disable_secret_version = ::Gapic::Config::Method.new disable_secret_version_config + enable_secret_version_config = parent_rpcs.enable_secret_version if parent_rpcs.respond_to? :enable_secret_version + @enable_secret_version = ::Gapic::Config::Method.new enable_secret_version_config + destroy_secret_version_config = parent_rpcs.destroy_secret_version if parent_rpcs.respond_to? :destroy_secret_version + @destroy_secret_version = ::Gapic::Config::Method.new destroy_secret_version_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb new file mode 100644 index 000000000000..6975b7911fd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb @@ -0,0 +1,1117 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/secretmanager/v1beta2/service_pb" + +module Google + module Cloud + module SecretManager + module V1beta2 + module SecretManagerService + module Rest + ## + # REST service stub for the SecretManagerService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_secrets REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse] + # A result object deserialized from the server's reply + def list_secrets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_secrets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_secrets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::Secret] + # A result object deserialized from the server's reply + def create_secret request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_secret_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_secret", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta2::Secret.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the add_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # A result object deserialized from the server's reply + def add_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_add_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "add_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::GetSecretRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::Secret] + # A result object deserialized from the server's reply + def get_secret request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_secret_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_secret", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta2::Secret.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::Secret] + # A result object deserialized from the server's reply + def update_secret request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_secret_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_secret", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta2::Secret.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_secret request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_secret_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_secret", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_secret_versions REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse] + # A result object deserialized from the server's reply + def list_secret_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_secret_versions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_secret_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # A result object deserialized from the server's reply + def get_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the access_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] + # A result object deserialized from the server's reply + def access_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_access_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "access_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the disable_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # A result object deserialized from the server's reply + def disable_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "disable_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enable_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # A result object deserialized from the server's reply + def enable_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "enable_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the destroy_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] + # A result object deserialized from the server's reply + def destroy_secret_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_destroy_secret_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "destroy_secret_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_secrets REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_secrets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/secrets", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/secrets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_secret_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{parent}/secrets", + body: "secret", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{parent}/secrets", + body: "secret", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the add_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_add_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{parent}:addVersion", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{parent}:addVersion", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::GetSecretRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_secret_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_secret_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta2/{secret.name}", + body: "secret", + matches: [ + ["secret.name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta2/{secret.name}", + body: "secret", + matches: [ + ["secret.name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_secret REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_secret_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_secret_versions REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_secret_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{parent}/versions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the access_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_access_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}:access", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{name}:access", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_disable_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{name}:disable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{name}:disable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enable_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{name}:enable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{name}:enable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the destroy_secret_version REST call + # + # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_destroy_secret_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{name}:destroy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{name}:destroy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta2/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta2/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/version.rb new file mode 100644 index 000000000000..256dc4e50205 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/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 SecretManager + module V1beta2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/resources_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/resources_pb.rb new file mode 100644 index 000000000000..3c6f0ebe8af9 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/resources_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/secretmanager/v1beta2/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/secretmanager/v1beta2/resources.proto\x12\"google.cloud.secretmanager.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\t\n\x06Secret\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12L\n\x0breplication\x18\x02 \x01(\x0b\x32/.google.cloud.secretmanager.v1beta2.ReplicationB\x06\xe0\x41\x05\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.secretmanager.v1beta2.Secret.LabelsEntry\x12>\n\x06topics\x18\x05 \x03(\x0b\x32).google.cloud.secretmanager.v1beta2.TopicB\x03\xe0\x41\x01\x12\x36\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x12-\n\x03ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x04H\x00\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x08rotation\x18\t \x01(\x0b\x32,.google.cloud.secretmanager.v1beta2.RotationB\x03\xe0\x41\x01\x12\\\n\x0fversion_aliases\x18\x0b \x03(\x0b\x32>.google.cloud.secretmanager.v1beta2.Secret.VersionAliasesEntryB\x03\xe0\x41\x01\x12U\n\x0b\x61nnotations\x18\r \x03(\x0b\x32;.google.cloud.secretmanager.v1beta2.Secret.AnnotationsEntryB\x03\xe0\x41\x01\x12;\n\x13version_destroy_ttl\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12g\n\x1b\x63ustomer_managed_encryption\x18\x0f \x01(\x0b\x32=.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13VersionAliasesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x99\x01\xea\x41\x95\x01\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\x12\x38projects/{project}/locations/{location}/secrets/{secret}*\x07secrets2\x06secretB\x0c\n\nexpiration\"\xd1\x06\n\rSecretVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0c\x64\x65stroy_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12K\n\x05state\x18\x04 \x01(\x0e\x32\x37.google.cloud.secretmanager.v1beta2.SecretVersion.StateB\x03\xe0\x41\x03\x12Q\n\x12replication_status\x18\x05 \x01(\x0b\x32\x35.google.cloud.secretmanager.v1beta2.ReplicationStatus\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12.\n!client_specified_payload_checksum\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x16scheduled_destroy_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12m\n\x1b\x63ustomer_managed_encryption\x18\t \x01(\x0b\x32\x43.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tDESTROYED\x10\x03:\xe2\x01\xea\x41\xde\x01\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\x12Rprojects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}*\x0esecretVersions2\rsecretVersion\"\xaa\x04\n\x0bReplication\x12N\n\tautomatic\x18\x01 \x01(\x0b\x32\x39.google.cloud.secretmanager.v1beta2.Replication.AutomaticH\x00\x12S\n\x0cuser_managed\x18\x02 \x01(\x0b\x32;.google.cloud.secretmanager.v1beta2.Replication.UserManagedH\x00\x1at\n\tAutomatic\x12g\n\x1b\x63ustomer_managed_encryption\x18\x01 \x01(\x0b\x32=.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionB\x03\xe0\x41\x01\x1a\xf0\x01\n\x0bUserManaged\x12Z\n\x08replicas\x18\x01 \x03(\x0b\x32\x43.google.cloud.secretmanager.v1beta2.Replication.UserManaged.ReplicaB\x03\xe0\x41\x02\x1a\x84\x01\n\x07Replica\x12\x10\n\x08location\x18\x01 \x01(\t\x12g\n\x1b\x63ustomer_managed_encryption\x18\x02 \x01(\x0b\x32=.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionB\x03\xe0\x41\x01\x42\r\n\x0breplication\"6\n\x19\x43ustomerManagedEncryption\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x85\x05\n\x11ReplicationStatus\x12Z\n\tautomatic\x18\x01 \x01(\x0b\x32\x45.google.cloud.secretmanager.v1beta2.ReplicationStatus.AutomaticStatusH\x00\x12_\n\x0cuser_managed\x18\x02 \x01(\x0b\x32G.google.cloud.secretmanager.v1beta2.ReplicationStatus.UserManagedStatusH\x00\x1a\x80\x01\n\x0f\x41utomaticStatus\x12m\n\x1b\x63ustomer_managed_encryption\x18\x01 \x01(\x0b\x32\x43.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\x1a\x99\x02\n\x11UserManagedStatus\x12l\n\x08replicas\x18\x01 \x03(\x0b\x32U.google.cloud.secretmanager.v1beta2.ReplicationStatus.UserManagedStatus.ReplicaStatusB\x03\xe0\x41\x03\x1a\x95\x01\n\rReplicaStatus\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12m\n\x1b\x63ustomer_managed_encryption\x18\x02 \x01(\x0b\x32\x43.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\x42\x14\n\x12replication_status\"D\n\x1f\x43ustomerManagedEncryptionStatus\x12!\n\x14kms_key_version_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"_\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02:C\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\"\x80\x01\n\x08Rotation\x12;\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x37\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x04\"L\n\rSecretPayload\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x1d\n\x0b\x64\x61ta_crc32c\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0e\n\x0c_data_crc32cB\x80\x02\n&com.google.cloud.secretmanager.v1beta2B\x0eResourcesProtoP\x01ZLcloud.google.com/go/secretmanager/apiv1beta2/secretmanagerpb;secretmanagerpb\xa2\x02\x03GSM\xaa\x02\"Google.Cloud.SecretManager.V1Beta2\xca\x02\"Google\\Cloud\\SecretManager\\V1beta2\xea\x02%Google::Cloud::SecretManager::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecretManager + module V1beta2 + Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Secret").msgclass + SecretVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.SecretVersion").msgclass + SecretVersion::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.SecretVersion.State").enummodule + Replication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Replication").msgclass + Replication::Automatic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Replication.Automatic").msgclass + Replication::UserManaged = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Replication.UserManaged").msgclass + Replication::UserManaged::Replica = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Replication.UserManaged.Replica").msgclass + CustomerManagedEncryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.CustomerManagedEncryption").msgclass + ReplicationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ReplicationStatus").msgclass + ReplicationStatus::AutomaticStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ReplicationStatus.AutomaticStatus").msgclass + ReplicationStatus::UserManagedStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ReplicationStatus.UserManagedStatus").msgclass + ReplicationStatus::UserManagedStatus::ReplicaStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ReplicationStatus.UserManagedStatus.ReplicaStatus").msgclass + CustomerManagedEncryptionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionStatus").msgclass + Topic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Topic").msgclass + Rotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Rotation").msgclass + SecretPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.SecretPayload").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_pb.rb new file mode 100644 index 000000000000..36eb635dcf02 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/secretmanager/v1beta2/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/secretmanager/v1beta2/resources_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n0google/cloud/secretmanager/v1beta2/service.proto\x12\"google.cloud.secretmanager.v1beta2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/secretmanager/v1beta2/resources.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x97\x01\n\x12ListSecretsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#secretmanager.googleapis.com/Secret\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x13ListSecretsResponse\x12;\n\x07secrets\x18\x01 \x03(\x0b\x32*.google.cloud.secretmanager.v1beta2.Secret\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\xab\x01\n\x13\x43reateSecretRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#secretmanager.googleapis.com/Secret\x12\x16\n\tsecret_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x06secret\x18\x03 \x01(\x0b\x32*.google.cloud.secretmanager.v1beta2.SecretB\x03\xe0\x41\x02\"\x9f\x01\n\x17\x41\x64\x64SecretVersionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\x12G\n\x07payload\x18\x02 \x01(\x0b\x32\x31.google.cloud.secretmanager.v1beta2.SecretPayloadB\x03\xe0\x41\x02\"M\n\x10GetSecretRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\"\x9e\x01\n\x19ListSecretVersionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x8e\x01\n\x1aListSecretVersionsResponse\x12\x43\n\x08versions\x18\x01 \x03(\x0b\x32\x31.google.cloud.secretmanager.v1beta2.SecretVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"[\n\x17GetSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\x8c\x01\n\x13UpdateSecretRequest\x12?\n\x06secret\x18\x01 \x01(\x0b\x32*.google.cloud.secretmanager.v1beta2.SecretB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"^\n\x1a\x41\x63\x63\x65ssSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\xa0\x01\n\x1b\x41\x63\x63\x65ssSecretVersionResponse\x12=\n\x04name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x42\n\x07payload\x18\x02 \x01(\x0b\x32\x31.google.cloud.secretmanager.v1beta2.SecretPayload\"c\n\x13\x44\x65leteSecretRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n\x1b\x44isableSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"q\n\x1a\x45nableSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n\x1b\x44\x65stroySecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xf7\x1e\n\x14SecretManagerService\x12\xe9\x01\n\x0bListSecrets\x12\x36.google.cloud.secretmanager.v1beta2.ListSecretsRequest\x1a\x37.google.cloud.secretmanager.v1beta2.ListSecretsResponse\"i\xda\x41\x06parent\x82\xd3\xe4\x93\x02Z\x12$/v1beta2/{parent=projects/*}/secretsZ2\x12\x30/v1beta2/{parent=projects/*/locations/*}/secrets\x12\x80\x02\n\x0c\x43reateSecret\x12\x37.google.cloud.secretmanager.v1beta2.CreateSecretRequest\x1a*.google.cloud.secretmanager.v1beta2.Secret\"\x8a\x01\xda\x41\x17parent,secret_id,secret\x82\xd3\xe4\x93\x02j\"$/v1beta2/{parent=projects/*}/secrets:\x06secretZ:\"0/v1beta2/{parent=projects/*/locations/*}/secrets:\x06secret\x12\x96\x02\n\x10\x41\x64\x64SecretVersion\x12;.google.cloud.secretmanager.v1beta2.AddSecretVersionRequest\x1a\x31.google.cloud.secretmanager.v1beta2.SecretVersion\"\x91\x01\xda\x41\x0eparent,payload\x82\xd3\xe4\x93\x02z\"1/v1beta2/{parent=projects/*/secrets/*}:addVersion:\x01*ZB\"=/v1beta2/{parent=projects/*/locations/*/secrets/*}:addVersion:\x01*\x12\xd6\x01\n\tGetSecret\x12\x34.google.cloud.secretmanager.v1beta2.GetSecretRequest\x1a*.google.cloud.secretmanager.v1beta2.Secret\"g\xda\x41\x04name\x82\xd3\xe4\x93\x02Z\x12$/v1beta2/{name=projects/*/secrets/*}Z2\x12\x30/v1beta2/{name=projects/*/locations/*/secrets/*}\x12\x89\x02\n\x0cUpdateSecret\x12\x37.google.cloud.secretmanager.v1beta2.UpdateSecretRequest\x1a*.google.cloud.secretmanager.v1beta2.Secret\"\x93\x01\xda\x41\x12secret,update_mask\x82\xd3\xe4\x93\x02x2+/v1beta2/{secret.name=projects/*/secrets/*}:\x06secretZA27/v1beta2/{secret.name=projects/*/locations/*/secrets/*}:\x06secret\x12\xc8\x01\n\x0c\x44\x65leteSecret\x12\x37.google.cloud.secretmanager.v1beta2.DeleteSecretRequest\x1a\x16.google.protobuf.Empty\"g\xda\x41\x04name\x82\xd3\xe4\x93\x02Z*$/v1beta2/{name=projects/*/secrets/*}Z2*0/v1beta2/{name=projects/*/locations/*/secrets/*}\x12\x94\x02\n\x12ListSecretVersions\x12=.google.cloud.secretmanager.v1beta2.ListSecretVersionsRequest\x1a>.google.cloud.secretmanager.v1beta2.ListSecretVersionsResponse\"\x7f\xda\x41\x06parent\x82\xd3\xe4\x93\x02p\x12//v1beta2/{parent=projects/*/secrets/*}/versionsZ=\x12;/v1beta2/{parent=projects/*/locations/*/secrets/*}/versions\x12\x81\x02\n\x10GetSecretVersion\x12;.google.cloud.secretmanager.v1beta2.GetSecretVersionRequest\x1a\x31.google.cloud.secretmanager.v1beta2.SecretVersion\"}\xda\x41\x04name\x82\xd3\xe4\x93\x02p\x12//v1beta2/{name=projects/*/secrets/*/versions/*}Z=\x12;/v1beta2/{name=projects/*/locations/*/secrets/*/versions/*}\x12\xa4\x02\n\x13\x41\x63\x63\x65ssSecretVersion\x12>.google.cloud.secretmanager.v1beta2.AccessSecretVersionRequest\x1a?.google.cloud.secretmanager.v1beta2.AccessSecretVersionResponse\"\x8b\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02~\x12\x36/v1beta2/{name=projects/*/secrets/*/versions/*}:accessZD\x12\x42/v1beta2/{name=projects/*/locations/*/secrets/*/versions/*}:access\x12\xa1\x02\n\x14\x44isableSecretVersion\x12?.google.cloud.secretmanager.v1beta2.DisableSecretVersionRequest\x1a\x31.google.cloud.secretmanager.v1beta2.SecretVersion\"\x94\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x86\x01\"7/v1beta2/{name=projects/*/secrets/*/versions/*}:disable:\x01*ZH\"C/v1beta2/{name=projects/*/locations/*/secrets/*/versions/*}:disable:\x01*\x12\x9d\x02\n\x13\x45nableSecretVersion\x12>.google.cloud.secretmanager.v1beta2.EnableSecretVersionRequest\x1a\x31.google.cloud.secretmanager.v1beta2.SecretVersion\"\x92\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x84\x01\"6/v1beta2/{name=projects/*/secrets/*/versions/*}:enable:\x01*ZG\"B/v1beta2/{name=projects/*/locations/*/secrets/*/versions/*}:enable:\x01*\x12\xa1\x02\n\x14\x44\x65stroySecretVersion\x12?.google.cloud.secretmanager.v1beta2.DestroySecretVersionRequest\x1a\x31.google.cloud.secretmanager.v1beta2.SecretVersion\"\x94\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x86\x01\"7/v1beta2/{name=projects/*/secrets/*/versions/*}:destroy:\x01*ZH\"C/v1beta2/{name=projects/*/locations/*/secrets/*/versions/*}:destroy:\x01*\x12\xd5\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\x89\x01\x82\xd3\xe4\x93\x02\x82\x01\"5/v1beta2/{resource=projects/*/secrets/*}:setIamPolicy:\x01*ZF\"A/v1beta2/{resource=projects/*/locations/*/secrets/*}:setIamPolicy:\x01*\x12\xce\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\x82\x01\x82\xd3\xe4\x93\x02|\x12\x35/v1beta2/{resource=projects/*/secrets/*}:getIamPolicyZC\x12\x41/v1beta2/{resource=projects/*/locations/*/secrets/*}:getIamPolicy\x12\x81\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\x95\x01\x82\xd3\xe4\x93\x02\x8e\x01\";/v1beta2/{resource=projects/*/secrets/*}:testIamPermissions:\x01*ZL\"G/v1beta2/{resource=projects/*/locations/*/secrets/*}:testIamPermissions:\x01*\x1aP\xca\x41\x1csecretmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfe\x01\n&com.google.cloud.secretmanager.v1beta2B\x0cServiceProtoP\x01ZLcloud.google.com/go/secretmanager/apiv1beta2/secretmanagerpb;secretmanagerpb\xa2\x02\x03GSM\xaa\x02\"Google.Cloud.SecretManager.V1Beta2\xca\x02\"Google\\Cloud\\SecretManager\\V1beta2\xea\x02%Google::Cloud::SecretManager::V1beta2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecretManager + module V1beta2 + ListSecretsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ListSecretsRequest").msgclass + ListSecretsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ListSecretsResponse").msgclass + CreateSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.CreateSecretRequest").msgclass + AddSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.AddSecretVersionRequest").msgclass + GetSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.GetSecretRequest").msgclass + ListSecretVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ListSecretVersionsRequest").msgclass + ListSecretVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ListSecretVersionsResponse").msgclass + GetSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.GetSecretVersionRequest").msgclass + UpdateSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.UpdateSecretRequest").msgclass + AccessSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.AccessSecretVersionRequest").msgclass + AccessSecretVersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.AccessSecretVersionResponse").msgclass + DeleteSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.DeleteSecretRequest").msgclass + DisableSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.DisableSecretVersionRequest").msgclass + EnableSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.EnableSecretVersionRequest").msgclass + DestroySecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.DestroySecretVersionRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb new file mode 100644 index 000000000000..86d8147e919d --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb @@ -0,0 +1,125 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/secretmanager/v1beta2/service.proto for package 'Google.Cloud.SecretManager.V1beta2' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/secretmanager/v1beta2/service_pb' + +module Google + module Cloud + module SecretManager + module V1beta2 + module SecretManagerService + # Secret Manager Service + # + # Manages secrets and operations using those secrets. Implements a REST + # model with the following objects: + # + # * [Secret][google.cloud.secretmanager.v1beta2.Secret] + # * [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.secretmanager.v1beta2.SecretManagerService' + + # Lists [Secrets][google.cloud.secretmanager.v1beta2.Secret]. + rpc :ListSecrets, ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest, ::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse + # Creates a new [Secret][google.cloud.secretmanager.v1beta2.Secret] + # containing no + # [SecretVersions][google.cloud.secretmanager.v1beta2.SecretVersion]. + rpc :CreateSecret, ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest, ::Google::Cloud::SecretManager::V1beta2::Secret + # Creates a new + # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] + # containing secret data and attaches it to an existing + # [Secret][google.cloud.secretmanager.v1beta2.Secret]. + rpc :AddSecretVersion, ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::SecretVersion + # Gets metadata for a given + # [Secret][google.cloud.secretmanager.v1beta2.Secret]. + rpc :GetSecret, ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest, ::Google::Cloud::SecretManager::V1beta2::Secret + # Updates metadata of an existing + # [Secret][google.cloud.secretmanager.v1beta2.Secret]. + rpc :UpdateSecret, ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest, ::Google::Cloud::SecretManager::V1beta2::Secret + # Deletes a [Secret][google.cloud.secretmanager.v1beta2.Secret]. + rpc :DeleteSecret, ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest, ::Google::Protobuf::Empty + # Lists [SecretVersions][google.cloud.secretmanager.v1beta2.SecretVersion]. + # This call does not return secret data. + rpc :ListSecretVersions, ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest, ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse + # Gets metadata for a + # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. + # + # `projects/*/secrets/*/versions/latest` is an alias to the most recently + # created [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. + rpc :GetSecretVersion, ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::SecretVersion + # Accesses a + # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. This + # call returns the secret data. + # + # `projects/*/secrets/*/versions/latest` is an alias to the most recently + # created [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. + rpc :AccessSecretVersion, ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse + # Disables a + # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. + # + # Sets the [state][google.cloud.secretmanager.v1beta2.SecretVersion.state] of + # the [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] to + # [DISABLED][google.cloud.secretmanager.v1beta2.SecretVersion.State.DISABLED]. + rpc :DisableSecretVersion, ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::SecretVersion + # Enables a + # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. + # + # Sets the [state][google.cloud.secretmanager.v1beta2.SecretVersion.state] of + # the [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] to + # [ENABLED][google.cloud.secretmanager.v1beta2.SecretVersion.State.ENABLED]. + rpc :EnableSecretVersion, ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::SecretVersion + # Destroys a + # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. + # + # Sets the [state][google.cloud.secretmanager.v1beta2.SecretVersion.state] of + # the [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] to + # [DESTROYED][google.cloud.secretmanager.v1beta2.SecretVersion.State.DESTROYED] + # and irrevocably destroys the secret data. + rpc :DestroySecretVersion, ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::SecretVersion + # Sets the access control policy on the specified secret. Replaces any + # existing policy. + # + # Permissions on + # [SecretVersions][google.cloud.secretmanager.v1beta2.SecretVersion] are + # enforced according to the policy set on the associated + # [Secret][google.cloud.secretmanager.v1beta2.Secret]. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets the access control policy for a secret. + # Returns empty policy if the secret exists and does not have a policy set. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns permissions that a caller has for the specified secret. + # If the secret does not exist, this call returns an empty set of + # permissions, not a NOT_FOUND error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/README.md b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/README.md new file mode 100644 index 000000000000..397e964dde26 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Secret Manager V1BETA2 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb new file mode 100644 index 000000000000..67caed18595b --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb @@ -0,0 +1,512 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecretManager + module V1beta2 + # A {::Google::Cloud::SecretManager::V1beta2::Secret Secret} is a logical secret + # whose value and versions can be accessed. + # + # A {::Google::Cloud::SecretManager::V1beta2::Secret Secret} is made up of zero or + # more {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} that + # represent the secret data. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} in the format + # `projects/*/secrets/*`. + # @!attribute [rw] replication + # @return [::Google::Cloud::SecretManager::V1beta2::Replication] + # Optional. Immutable. The replication policy of the secret data attached to + # the {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # The replication policy cannot be changed after the Secret has been created. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} was created. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The labels assigned to this Secret. + # + # Label keys must be between 1 and 63 characters long, have a UTF-8 encoding + # of maximum 128 bytes, and must conform to the following PCRE regular + # expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}` + # + # Label values must be between 0 and 63 characters long, have a UTF-8 + # encoding of maximum 128 bytes, and must conform to the following PCRE + # regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}` + # + # No more than 64 labels can be assigned to a given resource. + # @!attribute [rw] topics + # @return [::Array<::Google::Cloud::SecretManager::V1beta2::Topic>] + # Optional. A list of up to 10 Pub/Sub topics to which messages are published + # when control plane operations are called on the secret or its versions. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Timestamp in UTC when the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} is scheduled to + # expire. This is always provided on output, regardless of what was sent on + # input. + # + # Note: The following fields are mutually exclusive: `expire_time`, `ttl`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ttl + # @return [::Google::Protobuf::Duration] + # Input only. The TTL for the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # Note: The following fields are mutually exclusive: `ttl`, `expire_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] etag + # @return [::String] + # Optional. Etag of the currently stored + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # @!attribute [rw] rotation + # @return [::Google::Cloud::SecretManager::V1beta2::Rotation] + # Optional. Rotation policy attached to the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. May be excluded if + # there is no rotation policy. + # @!attribute [rw] version_aliases + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # Optional. Mapping from version alias to version name. + # + # A version alias is a string with a maximum length of 63 characters and can + # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) + # and underscore ('_') characters. An alias string must start with a + # letter and cannot be the string 'latest' or 'NEW'. + # No more than 50 aliases can be assigned to a given secret. + # + # Version-Alias pairs will be viewable via GetSecret and modifiable via + # UpdateSecret. Access by alias is only supported for + # GetSecretVersion and AccessSecretVersion. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Custom metadata about the secret. + # + # Annotations are distinct from various forms of labels. + # Annotations exist to allow client tools to store their own state + # information without requiring a database. + # + # Annotation keys must be between 1 and 63 characters long, have a UTF-8 + # encoding of maximum 128 bytes, begin and end with an alphanumeric character + # ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and + # alphanumerics in between these symbols. + # + # The total size of annotation keys and values must be less than 16KiB. + # @!attribute [rw] version_destroy_ttl + # @return [::Google::Protobuf::Duration] + # Optional. Secret Version TTL after destruction request + # + # This is a part of the Delayed secret version destroy feature. + # For secret with TTL>0, version destruction doesn't happen immediately + # on calling destroy instead the version goes to a disabled state and + # destruction happens after the TTL expires. + # @!attribute [rw] customer_managed_encryption + # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryption] + # Optional. The customer-managed encryption configuration of the Regionalised + # Secrets. If no configuration is provided, Google-managed default encryption + # is used. + # + # Updates to the {::Google::Cloud::SecretManager::V1beta2::Secret Secret} + # encryption configuration only apply to + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} added + # afterwards. They do not apply retroactively to existing + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. + class Secret + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class VersionAliasesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A secret version resource in the Secret Manager API. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the + # format `projects/*/secrets/*/versions/*`. + # + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} IDs in a + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} start at 1 and are + # incremented for each subsequent version of the secret. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} was + # created. + # @!attribute [r] destroy_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time this + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} was + # destroyed. Only present if + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} is + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::DESTROYED DESTROYED}. + # @!attribute [r] state + # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion::State] + # Output only. The current state of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # @!attribute [rw] replication_status + # @return [::Google::Cloud::SecretManager::V1beta2::ReplicationStatus] + # The replication status of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # @!attribute [r] etag + # @return [::String] + # Output only. Etag of the currently stored + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # @!attribute [r] client_specified_payload_checksum + # @return [::Boolean] + # Output only. True if payload checksum specified in + # {::Google::Cloud::SecretManager::V1beta2::SecretPayload SecretPayload} object + # has been received by + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client SecretManagerService} + # on + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion}. + # @!attribute [r] scheduled_destroy_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Output only. Scheduled destroy time for secret version. + # This is a part of the Delayed secret version destroy feature. For a + # Secret with a valid version destroy TTL, when a secert version is + # destroyed, version is moved to disabled state and it is scheduled for + # destruction Version is destroyed only after the scheduled_destroy_time. + # @!attribute [r] customer_managed_encryption + # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryptionStatus] + # Output only. The customer-managed encryption status of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. Only + # populated if customer-managed encryption is used and + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} is a Regionalised + # Secret. + class SecretVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}, + # indicating if it can be accessed. + module State + # Not specified. This value is unused and invalid. + STATE_UNSPECIFIED = 0 + + # The {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} may + # be accessed. + ENABLED = 1 + + # The {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} may + # not be accessed, but the secret data is still available and can be placed + # back into the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::ENABLED ENABLED} + # state. + DISABLED = 2 + + # The {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} is + # destroyed and the secret data is no longer stored. A version may not + # leave this state once entered. + DESTROYED = 3 + end + end + + # A policy that defines the replication and encryption configuration of data. + # @!attribute [rw] automatic + # @return [::Google::Cloud::SecretManager::V1beta2::Replication::Automatic] + # The {::Google::Cloud::SecretManager::V1beta2::Secret Secret} will + # automatically be replicated without any restrictions. + # + # Note: The following fields are mutually exclusive: `automatic`, `user_managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] user_managed + # @return [::Google::Cloud::SecretManager::V1beta2::Replication::UserManaged] + # The {::Google::Cloud::SecretManager::V1beta2::Secret Secret} will only be + # replicated into the locations specified. + # + # Note: The following fields are mutually exclusive: `user_managed`, `automatic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Replication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A replication policy that replicates the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} payload without any + # restrictions. + # @!attribute [rw] customer_managed_encryption + # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryption] + # Optional. The customer-managed encryption configuration of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. If no configuration + # is provided, Google-managed default encryption is used. + # + # Updates to the {::Google::Cloud::SecretManager::V1beta2::Secret Secret} + # encryption configuration only apply to + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} added + # afterwards. They do not apply retroactively to existing + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. + class Automatic + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A replication policy that replicates the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} payload into the + # locations specified in + # {::Google::Cloud::SecretManager::V1beta2::Replication::UserManaged#replicas Replication.UserManaged.replicas} + # @!attribute [rw] replicas + # @return [::Array<::Google::Cloud::SecretManager::V1beta2::Replication::UserManaged::Replica>] + # Required. The list of Replicas for this + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # + # Cannot be empty. + class UserManaged + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a Replica for this + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # @!attribute [rw] location + # @return [::String] + # The canonical IDs of the location to replicate data. + # For example: `"us-east1"`. + # @!attribute [rw] customer_managed_encryption + # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryption] + # Optional. The customer-managed encryption configuration of the + # [User-Managed Replica][Replication.UserManaged.Replica]. If no + # configuration is provided, Google-managed default encryption is used. + # + # Updates to the {::Google::Cloud::SecretManager::V1beta2::Secret Secret} + # encryption configuration only apply to + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} + # added afterwards. They do not apply retroactively to existing + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. + class Replica + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Configuration for encrypting secret payloads using customer-managed + # encryption keys (CMEK). + # @!attribute [rw] kms_key_name + # @return [::String] + # Required. The resource name of the Cloud KMS CryptoKey used to encrypt + # secret payloads. + # + # For secrets using the + # {::Google::Cloud::SecretManager::V1beta2::Replication::UserManaged UserManaged} + # replication policy type, Cloud KMS CryptoKeys must reside in the same + # location as the [replica location][Secret.UserManaged.Replica.location]. + # + # For secrets using the + # {::Google::Cloud::SecretManager::V1beta2::Replication::Automatic Automatic} + # replication policy type, Cloud KMS CryptoKeys must reside in `global`. + # + # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + class CustomerManagedEncryption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The replication status of a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # @!attribute [rw] automatic + # @return [::Google::Cloud::SecretManager::V1beta2::ReplicationStatus::AutomaticStatus] + # Describes the replication status of a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} with + # automatic replication. + # + # Only populated if the parent + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} has an automatic + # replication policy. + # + # Note: The following fields are mutually exclusive: `automatic`, `user_managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] user_managed + # @return [::Google::Cloud::SecretManager::V1beta2::ReplicationStatus::UserManagedStatus] + # Describes the replication status of a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} with + # user-managed replication. + # + # Only populated if the parent + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} has a user-managed + # replication policy. + # + # Note: The following fields are mutually exclusive: `user_managed`, `automatic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ReplicationStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The replication status of a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} using + # automatic replication. + # + # Only populated if the parent + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} has an automatic + # replication policy. + # @!attribute [r] customer_managed_encryption + # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryptionStatus] + # Output only. The customer-managed encryption status of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. Only + # populated if customer-managed encryption is used. + class AutomaticStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The replication status of a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} using + # user-managed replication. + # + # Only populated if the parent + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} has a user-managed + # replication policy. + # @!attribute [r] replicas + # @return [::Array<::Google::Cloud::SecretManager::V1beta2::ReplicationStatus::UserManagedStatus::ReplicaStatus>] + # Output only. The list of replica statuses for the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + class UserManagedStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the status of a user-managed replica for the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # @!attribute [r] location + # @return [::String] + # Output only. The canonical ID of the replica location. + # For example: `"us-east1"`. + # @!attribute [r] customer_managed_encryption + # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryptionStatus] + # Output only. The customer-managed encryption status of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. Only + # populated if customer-managed encryption is used. + class ReplicaStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Describes the status of customer-managed encryption. + # @!attribute [rw] kms_key_version_name + # @return [::String] + # Required. The resource name of the Cloud KMS CryptoKeyVersion used to + # encrypt the secret payload, in the following format: + # `projects/*/locations/*/keyRings/*/cryptoKeys/*/versions/*`. + class CustomerManagedEncryptionStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Pub/Sub topic which Secret Manager will publish to when control plane + # events occur on this secret. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Pub/Sub topic that will be published to, + # in the following format: `projects/*/topics/*`. For publication to succeed, + # the Secret Manager service agent must have the `pubsub.topic.publish` + # permission on the topic. The Pub/Sub Publisher role + # (`roles/pubsub.publisher`) includes this permission. + class Topic + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The rotation time and period for a + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. At next_rotation_time, + # Secret Manager will send a Pub/Sub notification to the topics configured on + # the Secret. {::Google::Cloud::SecretManager::V1beta2::Secret#topics Secret.topics} + # must be set to configure rotation. + # @!attribute [rw] next_rotation_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Timestamp in UTC at which the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} is scheduled to rotate. + # Cannot be set to less than 300s (5 min) in the future and at most + # 3153600000s (100 years). + # + # {::Google::Cloud::SecretManager::V1beta2::Rotation#next_rotation_time next_rotation_time} + # MUST be set if + # {::Google::Cloud::SecretManager::V1beta2::Rotation#rotation_period rotation_period} + # is set. + # @!attribute [rw] rotation_period + # @return [::Google::Protobuf::Duration] + # Input only. The Duration between rotation notifications. Must be in seconds + # and at least 3600s (1h) and at most 3153600000s (100 years). + # + # If + # {::Google::Cloud::SecretManager::V1beta2::Rotation#rotation_period rotation_period} + # is set, + # {::Google::Cloud::SecretManager::V1beta2::Rotation#next_rotation_time next_rotation_time} + # must be set. + # {::Google::Cloud::SecretManager::V1beta2::Rotation#next_rotation_time next_rotation_time} + # will be advanced by this period when the service automatically sends + # rotation notifications. + class Rotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A secret payload resource in the Secret Manager API. This contains the + # sensitive secret payload that is associated with a + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + # @!attribute [rw] data + # @return [::String] + # The secret data. Must be no larger than 64KiB. + # @!attribute [rw] data_crc32c + # @return [::Integer] + # Optional. If specified, + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client SecretManagerService} + # will verify the integrity of the received + # {::Google::Cloud::SecretManager::V1beta2::SecretPayload#data data} on + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion} + # calls using the crc32c checksum and store it to include in future + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion} + # responses. If a checksum is not provided in the + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion} + # request, the + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client SecretManagerService} + # will generate and store one for you. + # + # The CRC32C value is encoded as a Int64 for compatibility, and can be + # safely downconverted to uint32 in languages that support this type. + # https://cloud.google.com/apis/design/design_patterns#integer_types + class SecretPayload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.rb new file mode 100644 index 000000000000..9df94e60b5d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.rb @@ -0,0 +1,321 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecretManager + module V1beta2 + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secrets SecretManagerService.ListSecrets}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secrets}, in the format + # `projects/*` or `projects/*/locations/*` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter string, adhering to the rules in + # [List-operation + # filtering](https://cloud.google.com/secret-manager/docs/filtering). List + # only secrets matching the filter. If filter is empty, all secrets are + # listed. + class ListSecretsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secrets SecretManagerService.ListSecrets}. + # @!attribute [rw] secrets + # @return [::Array<::Google::Cloud::SecretManager::V1beta2::Secret>] + # The list of {::Google::Cloud::SecretManager::V1beta2::Secret Secrets} sorted in + # reverse by create_time (newest first). + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. Pass this value in + # {::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest#page_token ListSecretsRequest.page_token} + # to retrieve the next page. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of {::Google::Cloud::SecretManager::V1beta2::Secret Secrets} + # but 0 when the + # {::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest#filter ListSecretsRequest.filter} + # field is set. + class ListSecretsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#create_secret SecretManagerService.CreateSecret}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project to associate with the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format + # `projects/*` or `projects/*/locations/*`. + # @!attribute [rw] secret_id + # @return [::String] + # Required. This must be unique within the project. + # + # A secret ID is a string with a maximum length of 255 characters and can + # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and + # underscore (`_`) characters. + # @!attribute [rw] secret + # @return [::Google::Cloud::SecretManager::V1beta2::Secret] + # Required. A {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with + # initial field values. + class CreateSecretRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to associate with the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the + # format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + # @!attribute [rw] payload + # @return [::Google::Cloud::SecretManager::V1beta2::SecretPayload] + # Required. The secret payload of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + class AddSecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret SecretManagerService.GetSecret}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format + # `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + class GetSecretRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secret_versions SecretManagerService.ListSecretVersions}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} associated with the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} to list, + # in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to be returned in a single page. If + # set to 0, the server decides the number of results to return. If the + # number is greater than 25000, it is capped at 25000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # ListSecretVersionsResponse.next_page_token][]. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter string, adhering to the rules in + # [List-operation + # filtering](https://cloud.google.com/secret-manager/docs/filtering). List + # only secret versions matching the filter. If filter is empty, all secret + # versions are listed. + class ListSecretVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secret_versions SecretManagerService.ListSecretVersions}. + # @!attribute [rw] versions + # @return [::Array<::Google::Cloud::SecretManager::V1beta2::SecretVersion>] + # The list of + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} sorted + # in reverse by create_time (newest first). + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. Pass this value in + # {::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest#page_token ListSecretVersionsRequest.page_token} + # to retrieve the next page. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} but 0 + # when the + # {::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest#filter ListSecretsRequest.filter} + # field is set. + class ListSecretVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret_version SecretManagerService.GetSecretVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the + # format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # + # `projects/*/secrets/*/versions/latest` or + # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + # recently created + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + class GetSecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#update_secret SecretManagerService.UpdateSecret}. + # @!attribute [rw] secret + # @return [::Google::Cloud::SecretManager::V1beta2::Secret] + # Required. {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with updated + # field values. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Specifies the fields to be updated. + class UpdateSecretRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the + # format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # + # `projects/*/secrets/*/versions/latest` or + # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + # recently created + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. + class AccessSecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion}. + # @!attribute [rw] name + # @return [::String] + # The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the + # format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # @!attribute [rw] payload + # @return [::Google::Cloud::SecretManager::V1beta2::SecretPayload] + # Secret payload + class AccessSecretVersionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#delete_secret SecretManagerService.DeleteSecret}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to delete in the format + # `projects/*/secrets/*`. + # @!attribute [rw] etag + # @return [::String] + # Optional. Etag of the {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. + # The request succeeds if it matches the etag of the currently stored secret + # object. If the etag is omitted, the request succeeds. + class DeleteSecretRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#disable_secret_version SecretManagerService.DisableSecretVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # disable in the format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # @!attribute [rw] etag + # @return [::String] + # Optional. Etag of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The + # request succeeds if it matches the etag of the currently stored secret + # version object. If the etag is omitted, the request succeeds. + class DisableSecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#enable_secret_version SecretManagerService.EnableSecretVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to enable + # in the format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # @!attribute [rw] etag + # @return [::String] + # Optional. Etag of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The + # request succeeds if it matches the etag of the currently stored secret + # version object. If the etag is omitted, the request succeeds. + class EnableSecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#destroy_secret_version SecretManagerService.DestroySecretVersion}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to + # destroy in the format `projects/*/secrets/*/versions/*` or + # `projects/*/locations/*/secrets/*/versions/*`. + # @!attribute [rw] etag + # @return [::String] + # Optional. Etag of the + # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The + # request succeeds if it matches the etag of the currently stored secret + # version object. If the etag is omitted, the request succeeds. + class DestroySecretVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/Gemfile b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/Gemfile new file mode 100644 index 000000000000..dbb02f1e7509 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-secret_manager-v1beta2", path: "../" +else + gem "google-cloud-secret_manager-v1beta2" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/access_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/access_secret_version.rb new file mode 100644 index 000000000000..d0d080ffd38d --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/access_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_AccessSecretVersion_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the access_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version. +# +def access_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new + + # Call the access_secret_version method. + result = client.access_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_AccessSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/add_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/add_secret_version.rb new file mode 100644 index 000000000000..e80ead1cc007 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/add_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_AddSecretVersion_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the add_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version. +# +def add_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new + + # Call the add_secret_version method. + result = client.add_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_AddSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/create_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/create_secret.rb new file mode 100644 index 000000000000..e3bad58b58f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/create_secret.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_CreateSecret_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the create_secret call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#create_secret. +# +def create_secret + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new + + # Call the create_secret method. + result = client.create_secret request + + # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_CreateSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/delete_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/delete_secret.rb new file mode 100644 index 000000000000..13e175a049e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/delete_secret.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_DeleteSecret_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the delete_secret call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#delete_secret. +# +def delete_secret + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new + + # Call the delete_secret method. + result = client.delete_secret request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_DeleteSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/destroy_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/destroy_secret_version.rb new file mode 100644 index 000000000000..d806c328f332 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/destroy_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_DestroySecretVersion_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the destroy_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#destroy_secret_version. +# +def destroy_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new + + # Call the destroy_secret_version method. + result = client.destroy_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_DestroySecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/disable_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/disable_secret_version.rb new file mode 100644 index 000000000000..b5c83f8366d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/disable_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_DisableSecretVersion_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the disable_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#disable_secret_version. +# +def disable_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new + + # Call the disable_secret_version method. + result = client.disable_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_DisableSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/enable_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/enable_secret_version.rb new file mode 100644 index 000000000000..25e18d630f29 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/enable_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_EnableSecretVersion_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the enable_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#enable_secret_version. +# +def enable_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new + + # Call the enable_secret_version method. + result = client.enable_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_EnableSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_iam_policy.rb new file mode 100644 index 000000000000..27c9a36d2f37 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_GetIamPolicy_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the get_iam_policy call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret.rb new file mode 100644 index 000000000000..85d7b4256e33 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_GetSecret_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the get_secret call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret. +# +def get_secret + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new + + # Call the get_secret method. + result = client.get_secret request + + # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_GetSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret_version.rb new file mode 100644 index 000000000000..20072c84fd22 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret_version.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_GetSecretVersion_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the get_secret_version call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret_version. +# +def get_secret_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new + + # Call the get_secret_version method. + result = client.get_secret_version request + + # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_GetSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secret_versions.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secret_versions.rb new file mode 100644 index 000000000000..7742f1a55a7d --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secret_versions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_ListSecretVersions_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the list_secret_versions call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secret_versions. +# +def list_secret_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new + + # Call the list_secret_versions method. + result = client.list_secret_versions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecretManager::V1beta2::SecretVersion. + p item + end +end +# [END secretmanager_v1beta2_generated_SecretManagerService_ListSecretVersions_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secrets.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secrets.rb new file mode 100644 index 000000000000..fd2e425d30c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secrets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_ListSecrets_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the list_secrets call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secrets. +# +def list_secrets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new + + # Call the list_secrets method. + result = client.list_secrets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecretManager::V1beta2::Secret. + p item + end +end +# [END secretmanager_v1beta2_generated_SecretManagerService_ListSecrets_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/set_iam_policy.rb new file mode 100644 index 000000000000..30030038e28f --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_SetIamPolicy_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the set_iam_policy call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/test_iam_permissions.rb new file mode 100644 index 000000000000..52ad7f6d8e08 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_TestIamPermissions_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the test_iam_permissions call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/update_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/update_secret.rb new file mode 100644 index 000000000000..74eec379aa18 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/update_secret.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START secretmanager_v1beta2_generated_SecretManagerService_UpdateSecret_sync] +require "google/cloud/secret_manager/v1beta2" + +## +# Snippet for the update_secret call in the SecretManagerService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#update_secret. +# +def update_secret + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new + + # Call the update_secret method. + result = client.update_secret request + + # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. + p result +end +# [END secretmanager_v1beta2_generated_SecretManagerService_UpdateSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/snippet_metadata_google.cloud.secretmanager.v1beta2.json b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/snippet_metadata_google.cloud.secretmanager.v1beta2.json new file mode 100644 index 000000000000..8628979bdc17 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/snippet_metadata_google.cloud.secretmanager.v1beta2.json @@ -0,0 +1,615 @@ +{ + "client_library": { + "name": "google-cloud-secret_manager-v1beta2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.secretmanager.v1beta2", + "version": "v1beta2" + } + ] + }, + "snippets": [ + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_ListSecrets_sync", + "title": "Snippet for the list_secrets call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secrets.", + "file": "secret_manager_service/list_secrets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_secrets", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secrets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "ListSecrets", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.ListSecrets", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_CreateSecret_sync", + "title": "Snippet for the create_secret call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#create_secret.", + "file": "secret_manager_service/create_secret.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_secret", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#create_secret", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta2::Secret", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "CreateSecret", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.CreateSecret", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_AddSecretVersion_sync", + "title": "Snippet for the add_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version.", + "file": "secret_manager_service/add_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "add_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta2::SecretVersion", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "AddSecretVersion", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.AddSecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_GetSecret_sync", + "title": "Snippet for the get_secret call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret.", + "file": "secret_manager_service/get_secret.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_secret", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::GetSecretRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta2::Secret", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "GetSecret", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.GetSecret", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_UpdateSecret_sync", + "title": "Snippet for the update_secret call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#update_secret.", + "file": "secret_manager_service/update_secret.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_secret", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#update_secret", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta2::Secret", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "UpdateSecret", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.UpdateSecret", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_DeleteSecret_sync", + "title": "Snippet for the delete_secret call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#delete_secret.", + "file": "secret_manager_service/delete_secret.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_secret", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#delete_secret", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "DeleteSecret", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.DeleteSecret", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_ListSecretVersions_sync", + "title": "Snippet for the list_secret_versions call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secret_versions.", + "file": "secret_manager_service/list_secret_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_secret_versions", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secret_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "ListSecretVersions", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.ListSecretVersions", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_GetSecretVersion_sync", + "title": "Snippet for the get_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret_version.", + "file": "secret_manager_service/get_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta2::SecretVersion", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "GetSecretVersion", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.GetSecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_AccessSecretVersion_sync", + "title": "Snippet for the access_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version.", + "file": "secret_manager_service/access_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "access_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "AccessSecretVersion", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.AccessSecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_DisableSecretVersion_sync", + "title": "Snippet for the disable_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#disable_secret_version.", + "file": "secret_manager_service/disable_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#disable_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta2::SecretVersion", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "DisableSecretVersion", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.DisableSecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_EnableSecretVersion_sync", + "title": "Snippet for the enable_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#enable_secret_version.", + "file": "secret_manager_service/enable_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#enable_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta2::SecretVersion", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "EnableSecretVersion", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.EnableSecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_DestroySecretVersion_sync", + "title": "Snippet for the destroy_secret_version call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#destroy_secret_version.", + "file": "secret_manager_service/destroy_secret_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "destroy_secret_version", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#destroy_secret_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecretManager::V1beta2::SecretVersion", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "DestroySecretVersion", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.DestroySecretVersion", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#set_iam_policy.", + "file": "secret_manager_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.SetIamPolicy", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_iam_policy.", + "file": "secret_manager_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.GetIamPolicy", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the SecretManagerService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#test_iam_permissions.", + "file": "secret_manager_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "SecretManagerService::Client", + "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.TestIamPermissions", + "service": { + "short_name": "SecretManagerService", + "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_test.rb new file mode 100644 index 000000000000..f28501a34bc5 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_test.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/secret_manager/v1beta2/secret_manager_service" + +class ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_secret_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_path project: "value0", secret: "value1" + assert_equal "projects/value0/secrets/value1", path + + path = client.secret_path project: "value0", location: "value1", secret: "value2" + assert_equal "projects/value0/locations/value1/secrets/value2", path + end + end + + def test_secret_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_version_path project: "value0", secret: "value1", secret_version: "value2" + assert_equal "projects/value0/secrets/value1/versions/value2", path + + path = client.secret_version_path project: "value0", location: "value1", secret: "value2", secret_version: "value3" + assert_equal "projects/value0/locations/value1/secrets/value2/versions/value3", path + end + end + + def test_topic_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.topic_path project: "value0", topic: "value1" + assert_equal "projects/value0/topics/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_test.rb new file mode 100644 index 000000000000..498bb30fc0c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_test.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/secretmanager/v1beta2/service_pb" +require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest" + + +class ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_secrets + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_secrets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_list_secrets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_secrets_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_secrets parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_secrets ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_secrets(::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_secrets_client_stub.call_count + end + end + end + + def test_create_secret + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta2::Secret.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + secret_id = "hello world" + secret = {} + + create_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_create_secret_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_secret parent: parent, secret_id: secret_id, secret: secret do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_secret ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_secret(::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_secret_client_stub.call_count + end + end + end + + def test_add_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + payload = {} + + add_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_add_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, add_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.add_secret_version({ parent: parent, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.add_secret_version parent: parent, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.add_secret_version ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new(parent: parent, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.add_secret_version({ parent: parent, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.add_secret_version(::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new(parent: parent, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, add_secret_version_client_stub.call_count + end + end + end + + def test_get_secret + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta2::Secret.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_get_secret_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_secret({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_secret name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_secret ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_secret({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_secret(::Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_secret_client_stub.call_count + end + end + end + + def test_update_secret + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta2::Secret.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + secret = {} + update_mask = {} + + update_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_update_secret_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_secret({ secret: secret, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_secret secret: secret, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_secret ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new(secret: secret, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_secret({ secret: secret, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_secret(::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new(secret: secret, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_secret_client_stub.call_count + end + end + end + + def test_delete_secret + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_delete_secret_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_secret({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_secret name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_secret ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_secret({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_secret(::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_secret_client_stub.call_count + end + end + end + + def test_list_secret_versions + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_secret_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_list_secret_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_secret_versions_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_secret_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_secret_versions ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_secret_versions(::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_secret_versions_client_stub.call_count + end + end + end + + def test_get_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_get_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_secret_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_secret_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_secret_version ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_secret_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_secret_version(::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_secret_version_client_stub.call_count + end + end + end + + def test_access_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + access_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_access_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, access_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.access_secret_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.access_secret_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.access_secret_version ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.access_secret_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.access_secret_version(::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, access_secret_version_client_stub.call_count + end + end + end + + def test_disable_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + disable_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_disable_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.disable_secret_version({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.disable_secret_version name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.disable_secret_version ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.disable_secret_version({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.disable_secret_version(::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_secret_version_client_stub.call_count + end + end + end + + def test_enable_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + enable_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_enable_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.enable_secret_version({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.enable_secret_version name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.enable_secret_version ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.enable_secret_version({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.enable_secret_version(::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_secret_version_client_stub.call_count + end + end + end + + def test_destroy_secret_version + # Create test objects. + client_result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + destroy_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_destroy_secret_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, destroy_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.destroy_secret_version({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.destroy_secret_version name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.destroy_secret_version ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.destroy_secret_version({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.destroy_secret_version(::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, destroy_secret_version_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_test.rb new file mode 100644 index 000000000000..f8e5a58d175f --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_test.rb @@ -0,0 +1,1020 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/secretmanager/v1beta2/service_pb" +require "google/cloud/secret_manager/v1beta2/secret_manager_service" + +class ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_secrets + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_secrets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_secrets, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_secrets_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_secrets parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_secrets ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_secrets(::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_secrets_client_stub.call_rpc_count + end + end + + def test_create_secret + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta2::Secret.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + secret_id = "hello world" + secret = {} + + create_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_secret, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["secret_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta2::Secret), request["secret"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_secret parent: parent, secret_id: secret_id, secret: secret do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_secret ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_secret(::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_secret_client_stub.call_rpc_count + end + end + + def test_add_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + payload = {} + + add_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :add_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta2::SecretPayload), request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, add_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.add_secret_version({ parent: parent, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.add_secret_version parent: parent, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.add_secret_version ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new(parent: parent, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.add_secret_version({ parent: parent, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.add_secret_version(::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new(parent: parent, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, add_secret_version_client_stub.call_rpc_count + end + end + + def test_get_secret + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta2::Secret.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_secret, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_secret({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_secret name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_secret ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_secret({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_secret(::Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_secret_client_stub.call_rpc_count + end + end + + def test_update_secret + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta2::Secret.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + secret = {} + update_mask = {} + + update_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_secret, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta2::Secret), request["secret"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_secret({ secret: secret, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_secret secret: secret, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_secret ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new(secret: secret, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_secret({ secret: secret, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_secret(::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new(secret: secret, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_secret_client_stub.call_rpc_count + end + end + + def test_delete_secret + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_secret, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_secret_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_secret({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_secret name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_secret ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_secret({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_secret(::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_secret_client_stub.call_rpc_count + end + end + + def test_list_secret_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_secret_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_secret_versions, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_secret_versions_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_secret_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_secret_versions ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_secret_versions(::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_secret_versions_client_stub.call_rpc_count + end + end + + def test_get_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_secret_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_secret_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_secret_version ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_secret_version({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_secret_version(::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_secret_version_client_stub.call_rpc_count + end + end + + def test_access_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + access_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :access_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, access_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.access_secret_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.access_secret_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.access_secret_version ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.access_secret_version({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.access_secret_version(::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, access_secret_version_client_stub.call_rpc_count + end + end + + def test_disable_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + disable_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.disable_secret_version({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.disable_secret_version name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.disable_secret_version ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.disable_secret_version({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.disable_secret_version(::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, disable_secret_version_client_stub.call_rpc_count + end + end + + def test_enable_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + enable_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.enable_secret_version({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.enable_secret_version name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.enable_secret_version ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.enable_secret_version({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.enable_secret_version(::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enable_secret_version_client_stub.call_rpc_count + end + end + + def test_destroy_secret_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + destroy_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :destroy_secret_version, name + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, destroy_secret_version_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.destroy_secret_version({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.destroy_secret_version name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.destroy_secret_version ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.destroy_secret_version({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.destroy_secret_version(::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, destroy_secret_version_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/helper.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secret_manager-v1beta2/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-v1/.gitignore b/owl-bot-staging/google-cloud-secure_source_manager-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/.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-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-secure_source_manager-v1/.repo-metadata.json new file mode 100644 index 000000000000..8301929ac8fd --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/.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-v1/latest", + "distribution_name": "google-cloud-secure_source_manager-v1", + "is_cloud": true, + "language": "ruby", + "name": "securesourcemanager", + "name_pretty": "Secure Source Manager V1 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. Note that google-cloud-secure_source_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secure_source_manager instead. See the readme for more details.", + "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-v1/.rubocop.yml b/owl-bot-staging/google-cloud-secure_source_manager-v1/.rubocop.yml new file mode 100644 index 000000000000..93adabe4f472 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-secure_source_manager-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-secure_source_manager-v1.rb" diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/.toys.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/.yardopts b/owl-bot-staging/google-cloud-secure_source_manager-v1/.yardopts new file mode 100644 index 000000000000..6adcda101376 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Secure Source Manager V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-secure_source_manager-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..32e59d3cbbea --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-secure_source_manager-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-secure_source_manager-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/secure_source_manager/v1" + +client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new 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/v1" + +::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-secure_source_manager-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/secure_source_manager/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-secure_source_manager-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/Gemfile b/owl-bot-staging/google-cloud-secure_source_manager-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-v1/LICENSE.md b/owl-bot-staging/google-cloud-secure_source_manager-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/README.md b/owl-bot-staging/google-cloud-secure_source_manager-v1/README.md new file mode 100644 index 000000000000..7336cf26afe2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Secure Source Manager V1 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. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Secure Source Manager V1 API. Most users should consider using +the main client gem, +[google-cloud-secure_source_manager](https://rubygems.org/gems/google-cloud-secure_source_manager). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-secure_source_manager-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/securesourcemanager.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/secure_source_manager/v1" + +client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new +request = ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new # (request fields as keyword arguments...) +response = client.list_instances request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/secure-source-manager/docs/overview) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/secure_source_manager/v1" +require "logger" + +client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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-v1/Rakefile b/owl-bot-staging/google-cloud-secure_source_manager-v1/Rakefile new file mode 100644 index 000000000000..9fd2e0c76cc0 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-secure_source_manager-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/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-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-secure_source_manager-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-secure_source_manager-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-secure_source_manager-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-secure_source_manager-v1" + header "google-cloud-secure_source_manager-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-secure_source_manager-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-secure_source_manager-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-secure_source_manager-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-secure_source_manager-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-secure_source_manager-v1/gapic_metadata.json new file mode 100644 index 000000000000..cb4bf595a281 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/gapic_metadata.json @@ -0,0 +1,278 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.securesourcemanager.v1", + "libraryPackage": "::Google::Cloud::SecureSourceManager::V1", + "services": { + "SecureSourceManager": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client", + "rpcs": { + "ListInstances": { + "methods": [ + "list_instances" + ] + }, + "GetInstance": { + "methods": [ + "get_instance" + ] + }, + "CreateInstance": { + "methods": [ + "create_instance" + ] + }, + "DeleteInstance": { + "methods": [ + "delete_instance" + ] + }, + "ListRepositories": { + "methods": [ + "list_repositories" + ] + }, + "GetRepository": { + "methods": [ + "get_repository" + ] + }, + "CreateRepository": { + "methods": [ + "create_repository" + ] + }, + "UpdateRepository": { + "methods": [ + "update_repository" + ] + }, + "DeleteRepository": { + "methods": [ + "delete_repository" + ] + }, + "ListHooks": { + "methods": [ + "list_hooks" + ] + }, + "GetHook": { + "methods": [ + "get_hook" + ] + }, + "CreateHook": { + "methods": [ + "create_hook" + ] + }, + "UpdateHook": { + "methods": [ + "update_hook" + ] + }, + "DeleteHook": { + "methods": [ + "delete_hook" + ] + }, + "GetIamPolicyRepo": { + "methods": [ + "get_iam_policy_repo" + ] + }, + "SetIamPolicyRepo": { + "methods": [ + "set_iam_policy_repo" + ] + }, + "TestIamPermissionsRepo": { + "methods": [ + "test_iam_permissions_repo" + ] + }, + "CreateBranchRule": { + "methods": [ + "create_branch_rule" + ] + }, + "ListBranchRules": { + "methods": [ + "list_branch_rules" + ] + }, + "GetBranchRule": { + "methods": [ + "get_branch_rule" + ] + }, + "UpdateBranchRule": { + "methods": [ + "update_branch_rule" + ] + }, + "DeleteBranchRule": { + "methods": [ + "delete_branch_rule" + ] + }, + "CreatePullRequest": { + "methods": [ + "create_pull_request" + ] + }, + "GetPullRequest": { + "methods": [ + "get_pull_request" + ] + }, + "ListPullRequests": { + "methods": [ + "list_pull_requests" + ] + }, + "UpdatePullRequest": { + "methods": [ + "update_pull_request" + ] + }, + "MergePullRequest": { + "methods": [ + "merge_pull_request" + ] + }, + "OpenPullRequest": { + "methods": [ + "open_pull_request" + ] + }, + "ClosePullRequest": { + "methods": [ + "close_pull_request" + ] + }, + "ListPullRequestFileDiffs": { + "methods": [ + "list_pull_request_file_diffs" + ] + }, + "FetchTree": { + "methods": [ + "fetch_tree" + ] + }, + "FetchBlob": { + "methods": [ + "fetch_blob" + ] + }, + "CreateIssue": { + "methods": [ + "create_issue" + ] + }, + "GetIssue": { + "methods": [ + "get_issue" + ] + }, + "ListIssues": { + "methods": [ + "list_issues" + ] + }, + "UpdateIssue": { + "methods": [ + "update_issue" + ] + }, + "DeleteIssue": { + "methods": [ + "delete_issue" + ] + }, + "OpenIssue": { + "methods": [ + "open_issue" + ] + }, + "CloseIssue": { + "methods": [ + "close_issue" + ] + }, + "GetPullRequestComment": { + "methods": [ + "get_pull_request_comment" + ] + }, + "ListPullRequestComments": { + "methods": [ + "list_pull_request_comments" + ] + }, + "CreatePullRequestComment": { + "methods": [ + "create_pull_request_comment" + ] + }, + "UpdatePullRequestComment": { + "methods": [ + "update_pull_request_comment" + ] + }, + "DeletePullRequestComment": { + "methods": [ + "delete_pull_request_comment" + ] + }, + "BatchCreatePullRequestComments": { + "methods": [ + "batch_create_pull_request_comments" + ] + }, + "ResolvePullRequestComments": { + "methods": [ + "resolve_pull_request_comments" + ] + }, + "UnresolvePullRequestComments": { + "methods": [ + "unresolve_pull_request_comments" + ] + }, + "CreateIssueComment": { + "methods": [ + "create_issue_comment" + ] + }, + "GetIssueComment": { + "methods": [ + "get_issue_comment" + ] + }, + "ListIssueComments": { + "methods": [ + "list_issue_comments" + ] + }, + "UpdateIssueComment": { + "methods": [ + "update_issue_comment" + ] + }, + "DeleteIssueComment": { + "methods": [ + "delete_issue_comment" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/google-cloud-secure_source_manager-v1.gemspec b/owl-bot-staging/google-cloud-secure_source_manager-v1/google-cloud-secure_source_manager-v1.gemspec new file mode 100644 index 000000000000..c1b92e838a02 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/google-cloud-secure_source_manager-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/secure_source_manager/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-secure_source_manager-v1" + gem.version = Google::Cloud::SecureSourceManager::V1::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. Note that google-cloud-secure_source_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secure_source_manager instead. See the readme for more details." + 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") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google-cloud-secure_source_manager-v1.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google-cloud-secure_source_manager-v1.rb new file mode 100644 index 000000000000..0de64e27e2a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google-cloud-secure_source_manager-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/secure_source_manager/v1" diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1.rb new file mode 100644 index 000000000000..34a35e7b08eb --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/secure_source_manager/v1/secure_source_manager" +require "google/cloud/secure_source_manager/v1/version" + +module Google + module Cloud + module SecureSourceManager + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/secure_source_manager/v1" + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/secure_source_manager/v1" + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/secure_source_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.rb new file mode 100644 index 000000000000..31599cbdad14 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module SecureSourceManager + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/secure_source_manager/v1/rest" + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecureSourceManager"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/rest.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/rest.rb new file mode 100644 index 000000000000..8696eba4fdff --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/secure_source_manager/v1/secure_source_manager/rest" +require "google/cloud/secure_source_manager/v1/bindings_override" +require "google/cloud/secure_source_manager/v1/version" + +module Google + module Cloud + module SecureSourceManager + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/secure_source_manager/v1/rest" + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb new file mode 100644 index 000000000000..b4982af54739 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/secure_source_manager/v1/version" + +require "google/cloud/secure_source_manager/v1/secure_source_manager/credentials" +require "google/cloud/secure_source_manager/v1/secure_source_manager/paths" +require "google/cloud/secure_source_manager/v1/secure_source_manager/operations" +require "google/cloud/secure_source_manager/v1/secure_source_manager/client" +require "google/cloud/secure_source_manager/v1/secure_source_manager/rest" + +module Google + module Cloud + module SecureSourceManager + module V1 + ## + # Secure Source Manager API + # + # Access Secure Source Manager instances, resources, and repositories. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/secure_source_manager/v1/secure_source_manager" + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/secure_source_manager/v1/secure_source_manager/rest" + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + module SecureSourceManager + end + end + end + end +end + +helper_path = ::File.join __dir__, "secure_source_manager", "helpers.rb" +require "google/cloud/secure_source_manager/v1/secure_source_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb new file mode 100644 index 000000000000..5320e8dfbdfa --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb @@ -0,0 +1,5883 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module SecureSourceManager + module V1 + module SecureSourceManager + ## + # Client for the SecureSourceManager service. + # + # Secure Source Manager API + # + # Access Secure Source Manager instances, resources, and repositories. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securesourcemanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :secure_source_manager_stub + + ## + # Configure the SecureSourceManager Client class. + # + # See {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecureSourceManager clients + # ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecureSourceManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_instances.timeout = 60.0 + default_config.rpcs.list_instances.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_instance.timeout = 60.0 + default_config.rpcs.get_instance.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_repositories.timeout = 60.0 + default_config.rpcs.list_repositories.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_repository.timeout = 60.0 + default_config.rpcs.get_repository.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_iam_policy_repo.timeout = 60.0 + default_config.rpcs.get_iam_policy_repo.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecureSourceManager Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @secure_source_manager_stub.universe_domain + end + + ## + # Create a new SecureSourceManager client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecureSourceManager client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/securesourcemanager/v1/secure_source_manager_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @secure_source_manager_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @secure_source_manager_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @secure_source_manager_stub.endpoint + config.universe_domain = @secure_source_manager_stub.universe_domain + config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @secure_source_manager_stub.endpoint + config.universe_domain = @secure_source_manager_stub.universe_domain + config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @secure_source_manager_stub.logger + end + + # Service calls + + ## + # Lists Instances in a given project and location. + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListInstancesRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filter for filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_instances.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_instances, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_instances, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::Instance] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_instance, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new instance in a given project and location. + # + # @overload create_instance(request, options = nil) + # Pass arguments to `create_instance` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) + # Pass arguments to `create_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param instance_id [::String] + # Required. ID of the instance to be created. + # @param instance [::Google::Cloud::SecureSourceManager::V1::Instance, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new + # + # # Call the create_instance method. + # result = client.create_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single instance. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_instance(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, will force the deletion of the instance. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :delete_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Repositories in a given project and location. + # + # The instance field is required in the query parameter for requests using + # the securesourcemanager.googleapis.com endpoint. + # + # @overload list_repositories(request, options = nil) + # Pass arguments to `list_repositories` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, instance: nil) + # Pass arguments to `list_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListRepositoriesRequest. + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filter results. + # @param instance [::String] + # Optional. The name of the instance in which the repository is hosted, + # formatted as + # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + # When listing repositories via securesourcemanager.googleapis.com, this + # field is required. When listing repositories via *.sourcemanager.dev, this + # field is ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new + # + # # Call the list_repositories method. + # result = client.list_repositories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Repository. + # p item + # end + # + def list_repositories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_repositories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_repositories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_repositories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_repositories, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata of a repository. + # + # @overload get_repository(request, options = nil) + # Pass arguments to `get_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_repository(name: nil) + # Pass arguments to `get_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the repository to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::Repository] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Repository] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new + # + # # Call the get_repository method. + # result = client.get_repository request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Repository. + # p result + # + def get_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_repository, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new repository in a given project and location. + # + # The Repository.Instance field is required in the request body for requests + # using the securesourcemanager.googleapis.com endpoint. + # + # @overload create_repository(request, options = nil) + # Pass arguments to `create_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_repository(parent: nil, repository: nil, repository_id: nil) + # Pass arguments to `create_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project in which to create the repository. Values are of the + # form `projects/{project_number}/locations/{location_id}` + # @param repository [::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash] + # Required. The resource being created. + # @param repository_id [::String] + # Required. The ID to use for the repository, which will become the final + # component of the repository's resource name. This value should be 4-63 + # characters, and valid characters are /[a-z][0-9]-/. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new + # + # # Call the create_repository method. + # result = client.create_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_repository, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the metadata of a repository. + # + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_repository(update_mask: nil, repository: nil, validate_only: nil) + # Pass arguments to `update_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # repository resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param repository [::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash] + # Required. The repository being updated. + # @param validate_only [::Boolean] + # Optional. False by default. If set to true, the request is validated and + # the user is provided with an expected result, but no actual change is made. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new + # + # # Call the update_repository method. + # result = client.update_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.repository&.name + header_params["repository.name"] = request.repository.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :update_repository, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Repository. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_repository(name: nil, allow_missing: nil) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the repository to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the repository is not found, the request will + # succeed but no action will be taken on the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new + # + # # Call the delete_repository method. + # result = client.delete_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :delete_repository, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists hooks in a given repository. + # + # @overload list_hooks(request, options = nil) + # Pass arguments to `list_hooks` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListHooksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_hooks(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_hooks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListHooksRequest. + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new + # + # # Call the list_hooks method. + # result = client.list_hooks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Hook. + # p item + # end + # + def list_hooks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_hooks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_hooks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_hooks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_hooks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_hooks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata of a hook. + # + # @overload get_hook(request, options = nil) + # Pass arguments to `get_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetHookRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetHookRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_hook(name: nil) + # Pass arguments to `get_hook` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the hook to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::Hook] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Hook] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new + # + # # Call the get_hook method. + # result = client.get_hook request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook. + # p result + # + def get_hook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetHookRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_hook.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_hook.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_hook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_hook, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new hook in a given repository. + # + # @overload create_hook(request, options = nil) + # Pass arguments to `create_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateHookRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_hook(parent: nil, hook: nil, hook_id: nil) + # Pass arguments to `create_hook` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The repository in which to create the hook. Values are of the + # form + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] + # Required. The resource being created. + # @param hook_id [::String] + # Required. The ID to use for the hook, which will become the final component + # of the hook's resource name. This value restricts to lower-case letters, + # numbers, and hyphen, with the first character a letter, the last a letter + # or a number, and a 63 character maximum. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new + # + # # Call the create_hook method. + # result = client.create_hook request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_hook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_hook.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_hook.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_hook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_hook, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the metadata of a hook. + # + # @overload update_hook(request, options = nil) + # Pass arguments to `update_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_hook(update_mask: nil, hook: nil) + # Pass arguments to `update_hook` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # hook resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] + # Required. The hook being updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new + # + # # Call the update_hook method. + # result = client.update_hook request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_hook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_hook.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.hook&.name + header_params["hook.name"] = request.hook.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_hook.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_hook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :update_hook, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Hook. + # + # @overload delete_hook(request, options = nil) + # Pass arguments to `delete_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_hook(name: nil) + # Pass arguments to `delete_hook` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the hook to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new + # + # # Call the delete_hook method. + # result = client.delete_hook request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_hook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_hook.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_hook.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_hook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :delete_hook, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get IAM policy for a repository. + # + # @overload get_iam_policy_repo(request, options = nil) + # Pass arguments to `get_iam_policy_repo` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy_repo(resource: nil, options: nil) + # Pass arguments to `get_iam_policy_repo` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy_repo method. + # result = client.get_iam_policy_repo request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy_repo.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy_repo.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_iam_policy_repo, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Set IAM policy on a repository. + # + # @overload set_iam_policy_repo(request, options = nil) + # Pass arguments to `set_iam_policy_repo` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy_repo` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy_repo method. + # result = client.set_iam_policy_repo request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy_repo.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy_repo.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :set_iam_policy_repo, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Test IAM permissions on a repository. + # IAM permission checks are not required on this method. + # + # @overload test_iam_permissions_repo(request, options = nil) + # Pass arguments to `test_iam_permissions_repo` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions_repo(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions_repo` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions_repo method. + # result = client.test_iam_permissions_repo request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions_repo.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions_repo.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :test_iam_permissions_repo, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # CreateBranchRule creates a branch rule in a given repository. + # + # @overload create_branch_rule(request, options = nil) + # Pass arguments to `create_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) + # Pass arguments to `create_branch_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] + # @param branch_rule_id [::String] + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new + # + # # Call the create_branch_rule method. + # result = client.create_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_branch_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_branch_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_branch_rule, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # ListBranchRules lists branch rules in a given repository. + # + # @overload list_branch_rules(request, options = nil) + # Pass arguments to `list_branch_rules` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_branch_rules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_branch_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new + # + # # Call the list_branch_rules method. + # result = client.list_branch_rules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::BranchRule. + # p item + # end + # + def list_branch_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_branch_rules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_branch_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_branch_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_branch_rules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # GetBranchRule gets a branch rule. + # + # @overload get_branch_rule(request, options = nil) + # Pass arguments to `get_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_branch_rule(name: nil) + # Pass arguments to `get_branch_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the repository to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new + # + # # Call the get_branch_rule method. + # result = client.get_branch_rule request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule. + # p result + # + def get_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_branch_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_branch_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_branch_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # UpdateBranchRule updates a branch rule. + # + # @overload update_branch_rule(request, options = nil) + # Pass arguments to `update_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_branch_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually post it. (https://google.aip.dev/163, for declarative friendly) + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # branchRule resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new + # + # # Call the update_branch_rule method. + # result = client.update_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_branch_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.branch_rule&.name + header_params["branch_rule.name"] = request.branch_rule.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_branch_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :update_branch_rule, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # DeleteBranchRule deletes a branch rule. + # + # @overload delete_branch_rule(request, options = nil) + # Pass arguments to `delete_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_branch_rule(name: nil, allow_missing: nil) + # Pass arguments to `delete_branch_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # @param allow_missing [::Boolean] + # Optional. If set to true, and the branch rule is not found, the request + # will succeed but no action will be taken on the server. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new + # + # # Call the delete_branch_rule method. + # result = client.delete_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_branch_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_branch_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :delete_branch_rule, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a pull request. + # + # @overload create_pull_request(request, options = nil) + # Pass arguments to `create_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_pull_request(parent: nil, pull_request: nil) + # Pass arguments to `create_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The repository that the pull request is created from. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] + # Required. The pull request to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new + # + # # Call the create_pull_request method. + # result = client.create_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_pull_request, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a pull request. + # + # @overload get_pull_request(request, options = nil) + # Pass arguments to `get_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_pull_request(name: nil) + # Pass arguments to `get_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new + # + # # Call the get_pull_request method. + # result = client.get_pull_request request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequest. + # p result + # + def get_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_pull_request, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists pull requests in a repository. + # + # @overload list_pull_requests(request, options = nil) + # Pass arguments to `list_pull_requests` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_pull_requests(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_requests` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The repository in which to list pull requests. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new + # + # # Call the list_pull_requests method. + # result = client.list_pull_requests request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequest. + # p item + # end + # + def list_pull_requests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_pull_requests.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_pull_requests.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_pull_requests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_pull_requests, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_requests, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a pull request. + # + # @overload update_pull_request(request, options = nil) + # Pass arguments to `update_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_pull_request(pull_request: nil, update_mask: nil) + # Pass arguments to `update_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] + # Required. The pull request to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new + # + # # Call the update_pull_request method. + # result = client.update_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.pull_request&.name + header_params["pull_request.name"] = request.pull_request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :update_pull_request, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Merges a pull request. + # + # @overload merge_pull_request(request, options = nil) + # Pass arguments to `merge_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload merge_pull_request(name: nil) + # Pass arguments to `merge_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The pull request to merge. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new + # + # # Call the merge_pull_request method. + # result = client.merge_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def merge_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.merge_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.merge_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.merge_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :merge_pull_request, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Opens a pull request. + # + # @overload open_pull_request(request, options = nil) + # Pass arguments to `open_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload open_pull_request(name: nil) + # Pass arguments to `open_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The pull request to open. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new + # + # # Call the open_pull_request method. + # result = client.open_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def open_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.open_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.open_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.open_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :open_pull_request, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Closes a pull request without merging. + # + # @overload close_pull_request(request, options = nil) + # Pass arguments to `close_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload close_pull_request(name: nil) + # Pass arguments to `close_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The pull request to close. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new + # + # # Call the close_pull_request method. + # result = client.close_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def close_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.close_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.close_pull_request.timeout, + metadata: metadata, + retry_policy: @config.rpcs.close_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :close_pull_request, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a pull request's file diffs. + # + # @overload list_pull_request_file_diffs(request, options = nil) + # Pass arguments to `list_pull_request_file_diffs` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_pull_request_file_diffs(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_request_file_diffs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The pull request to list file diffs for. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new + # + # # Call the list_pull_request_file_diffs method. + # result = client.list_pull_request_file_diffs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::FileDiff. + # p item + # end + # + def list_pull_request_file_diffs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_pull_request_file_diffs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_pull_request_file_diffs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_pull_request_file_diffs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_pull_request_file_diffs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_file_diffs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a tree from a repository. + # + # @overload fetch_tree(request, options = nil) + # Pass arguments to `fetch_tree` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_tree(repository: nil, ref: nil, recursive: nil, page_size: nil, page_token: nil) + # Pass arguments to `fetch_tree` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param repository [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository to fetch the tree from. + # @param ref [::String] + # Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies + # which tree to fetch. If not specified, the default branch will be used. + # @param recursive [::Boolean] + # Optional. If true, include all subfolders and their files in the response. + # If false, only the immediate children are returned. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, at most 10,000 items will be returned. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new + # + # # Call the fetch_tree method. + # result = client.fetch_tree request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::TreeEntry. + # p item + # end + # + def fetch_tree request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_tree.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.repository + header_params["repository"] = request.repository + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_tree.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_tree.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :fetch_tree, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :fetch_tree, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a blob from a repository. + # + # @overload fetch_blob(request, options = nil) + # Pass arguments to `fetch_blob` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_blob(repository: nil, sha: nil) + # Pass arguments to `fetch_blob` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param repository [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository containing the blob. + # @param sha [::String] + # Required. The SHA-1 hash of the blob to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new + # + # # Call the fetch_blob method. + # result = client.fetch_blob request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::FetchBlobResponse. + # p result + # + def fetch_blob request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_blob.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.repository + header_params["repository"] = request.repository + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_blob.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_blob.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :fetch_blob, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an issue. + # + # @overload create_issue(request, options = nil) + # Pass arguments to `create_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_issue(parent: nil, issue: nil) + # Pass arguments to `create_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The repository in which to create the issue. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] + # Required. The issue to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new + # + # # Call the create_issue method. + # result = client.create_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_issue, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue. + # + # @overload get_issue(request, options = nil) + # Pass arguments to `get_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_issue(name: nil) + # Pass arguments to `get_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::Issue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Issue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new + # + # # Call the get_issue method. + # result = client.get_issue request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Issue. + # p result + # + def get_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_issue, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists issues in a repository. + # + # @overload list_issues(request, options = nil) + # Pass arguments to `list_issues` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_issues(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The repository in which to list issues. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Used to filter the resulting issues list. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new + # + # # Call the list_issues method. + # result = client.list_issues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Issue. + # p item + # end + # + def list_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_issues, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_issues, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a issue. + # + # @overload update_issue(request, options = nil) + # Pass arguments to `update_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_issue(issue: nil, update_mask: nil) + # Pass arguments to `update_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] + # Required. The issue to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new + # + # # Call the update_issue method. + # result = client.update_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.issue&.name + header_params["issue.name"] = request.issue.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :update_issue, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an issue. + # + # @overload delete_issue(request, options = nil) + # Pass arguments to `delete_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_issue(name: nil, etag: nil) + # Pass arguments to `delete_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # deletion will be blocked and an ABORTED error will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new + # + # # Call the delete_issue method. + # result = client.delete_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :delete_issue, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Opens an issue. + # + # @overload open_issue(request, options = nil) + # Pass arguments to `open_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload open_issue(name: nil, etag: nil) + # Pass arguments to `open_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to open. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # opening will be blocked and an ABORTED error will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new + # + # # Call the open_issue method. + # result = client.open_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def open_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.open_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.open_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.open_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :open_issue, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Closes an issue. + # + # @overload close_issue(request, options = nil) + # Pass arguments to `close_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload close_issue(name: nil, etag: nil) + # Pass arguments to `close_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to close. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # closing will be blocked and an ABORTED error will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new + # + # # Call the close_issue method. + # result = client.close_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def close_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.close_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.close_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.close_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :close_issue, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a pull request comment. + # + # @overload get_pull_request_comment(request, options = nil) + # Pass arguments to `get_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_pull_request_comment(name: nil) + # Pass arguments to `get_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request comment to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new + # + # # Call the get_pull_request_comment method. + # result = client.get_pull_request_comment request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequestComment. + # p result + # + def get_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_pull_request_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_pull_request_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_pull_request_comment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists pull request comments. + # + # @overload list_pull_request_comments(request, options = nil) + # Pass arguments to `list_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_pull_request_comments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_request_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The pull request in which to list pull request comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new + # + # # Call the list_pull_request_comments method. + # result = client.list_pull_request_comments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequestComment. + # p item + # end + # + def list_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_pull_request_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_pull_request_comments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_pull_request_comments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_comments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a pull request comment. This function is used to create a single + # PullRequestComment of type Comment, or a single PullRequestComment of type + # Code that's replying to another PullRequestComment of type Code. Use + # BatchCreatePullRequestComments to create multiple PullRequestComments for + # code reviews. + # + # @overload create_pull_request_comment(request, options = nil) + # Pass arguments to `create_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_pull_request_comment(parent: nil, pull_request_comment: nil) + # Pass arguments to `create_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The pull request in which to create the pull request comment. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] + # Required. The pull request comment to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new + # + # # Call the create_pull_request_comment method. + # result = client.create_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_pull_request_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_pull_request_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_pull_request_comment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a pull request comment. + # + # @overload update_pull_request_comment(request, options = nil) + # Pass arguments to `update_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_pull_request_comment(pull_request_comment: nil, update_mask: nil) + # Pass arguments to `update_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] + # Required. The pull request comment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request comment resource by the update. Updatable fields are + # `body`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new + # + # # Call the update_pull_request_comment method. + # result = client.update_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_pull_request_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.pull_request_comment&.name + header_params["pull_request_comment.name"] = request.pull_request_comment.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_pull_request_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :update_pull_request_comment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a pull request comment. + # + # @overload delete_pull_request_comment(request, options = nil) + # Pass arguments to `delete_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_pull_request_comment(name: nil) + # Pass arguments to `delete_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new + # + # # Call the delete_pull_request_comment method. + # result = client.delete_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_pull_request_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_pull_request_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :delete_pull_request_comment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Batch creates pull request comments. This function is used to create + # multiple PullRequestComments for code review. There needs to be exactly one + # PullRequestComment of type Review, and at most 100 PullRequestComments of + # type Code per request. The Position of the code comments must be unique + # within the request. + # + # @overload batch_create_pull_request_comments(request, options = nil) + # Pass arguments to `batch_create_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_create_pull_request_comments(parent: nil, requests: nil) + # Pass arguments to `batch_create_pull_request_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The pull request in which to create the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param requests [::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash>] + # Required. The request message specifying the resources to create. There + # should be exactly one CreatePullRequestCommentRequest with CommentDetail + # being REVIEW in the list, and no more than 100 + # CreatePullRequestCommentRequests with CommentDetail being CODE in the list + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new + # + # # Call the batch_create_pull_request_comments method. + # result = client.batch_create_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_create_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_create_pull_request_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_create_pull_request_comments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :batch_create_pull_request_comments, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resolves pull request comments. A list of PullRequestComment names must be + # provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be resolved. + # + # @overload resolve_pull_request_comments(request, options = nil) + # Pass arguments to `resolve_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload resolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) + # Pass arguments to `resolve_pull_request_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param names [::Array<::String>] + # Required. The names of the pull request comments to resolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @param auto_fill [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to resolved. If + # unset, all comments in the same thread need be present. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new + # + # # Call the resolve_pull_request_comments method. + # result = client.resolve_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def resolve_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.resolve_pull_request_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.resolve_pull_request_comments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resolve_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :resolve_pull_request_comments, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unresolves pull request comments. A list of PullRequestComment names must + # be provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be unresolved. + # + # @overload unresolve_pull_request_comments(request, options = nil) + # Pass arguments to `unresolve_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload unresolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) + # Pass arguments to `unresolve_pull_request_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param names [::Array<::String>] + # Required. The names of the pull request comments to unresolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @param auto_fill [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to unresolved. If + # unset, all comments in the same thread need be present. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new + # + # # Call the unresolve_pull_request_comments method. + # result = client.unresolve_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def unresolve_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.unresolve_pull_request_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.unresolve_pull_request_comments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.unresolve_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :unresolve_pull_request_comments, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an issue comment. + # + # @overload create_issue_comment(request, options = nil) + # Pass arguments to `create_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_issue_comment(parent: nil, issue_comment: nil) + # Pass arguments to `create_issue_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The issue in which to create the issue comment. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] + # Required. The issue comment to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new + # + # # Call the create_issue_comment method. + # result = client.create_issue_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_issue_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_issue_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_issue_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_issue_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :create_issue_comment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue comment. + # + # @overload get_issue_comment(request, options = nil) + # Pass arguments to `get_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_issue_comment(name: nil) + # Pass arguments to `get_issue_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue comment to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new + # + # # Call the get_issue_comment method. + # result = client.get_issue_comment request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment. + # p result + # + def get_issue_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_issue_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_issue_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_issue_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :get_issue_comment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists comments in an issue. + # + # @overload list_issue_comments(request, options = nil) + # Pass arguments to `list_issue_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_issue_comments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_issue_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The issue in which to list the comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new + # + # # Call the list_issue_comments method. + # result = client.list_issue_comments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::IssueComment. + # p item + # end + # + def list_issue_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_issue_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_issue_comments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_issue_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :list_issue_comments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_issue_comments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an issue comment. + # + # @overload update_issue_comment(request, options = nil) + # Pass arguments to `update_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_issue_comment(issue_comment: nil, update_mask: nil) + # Pass arguments to `update_issue_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] + # Required. The issue comment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue comment resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new + # + # # Call the update_issue_comment method. + # result = client.update_issue_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_issue_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_issue_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.issue_comment&.name + header_params["issue_comment.name"] = request.issue_comment.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_issue_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_issue_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :update_issue_comment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an issue comment. + # + # @overload delete_issue_comment(request, options = nil) + # Pass arguments to `delete_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_issue_comment(name: nil) + # Pass arguments to `delete_issue_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new + # + # # Call the delete_issue_comment method. + # result = client.delete_issue_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_issue_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_issue_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_issue_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_issue_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.call_rpc :delete_issue_comment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecureSourceManager API. + # + # This class represents the configuration for SecureSourceManager, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_instances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securesourcemanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SecureSourceManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `create_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `list_repositories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_repositories + ## + # RPC-specific configuration for `get_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :get_repository + ## + # RPC-specific configuration for `create_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :create_repository + ## + # RPC-specific configuration for `update_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :update_repository + ## + # RPC-specific configuration for `delete_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_repository + ## + # RPC-specific configuration for `list_hooks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_hooks + ## + # RPC-specific configuration for `get_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :get_hook + ## + # RPC-specific configuration for `create_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :create_hook + ## + # RPC-specific configuration for `update_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :update_hook + ## + # RPC-specific configuration for `delete_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_hook + ## + # RPC-specific configuration for `get_iam_policy_repo` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy_repo + ## + # RPC-specific configuration for `set_iam_policy_repo` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy_repo + ## + # RPC-specific configuration for `test_iam_permissions_repo` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions_repo + ## + # RPC-specific configuration for `create_branch_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_branch_rule + ## + # RPC-specific configuration for `list_branch_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_branch_rules + ## + # RPC-specific configuration for `get_branch_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_branch_rule + ## + # RPC-specific configuration for `update_branch_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_branch_rule + ## + # RPC-specific configuration for `delete_branch_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_branch_rule + ## + # RPC-specific configuration for `create_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :create_pull_request + ## + # RPC-specific configuration for `get_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pull_request + ## + # RPC-specific configuration for `list_pull_requests` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_requests + ## + # RPC-specific configuration for `update_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pull_request + ## + # RPC-specific configuration for `merge_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :merge_pull_request + ## + # RPC-specific configuration for `open_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :open_pull_request + ## + # RPC-specific configuration for `close_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :close_pull_request + ## + # RPC-specific configuration for `list_pull_request_file_diffs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_request_file_diffs + ## + # RPC-specific configuration for `fetch_tree` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_tree + ## + # RPC-specific configuration for `fetch_blob` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_blob + ## + # RPC-specific configuration for `create_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :create_issue + ## + # RPC-specific configuration for `get_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue + ## + # RPC-specific configuration for `list_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issues + ## + # RPC-specific configuration for `update_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue + ## + # RPC-specific configuration for `delete_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue + ## + # RPC-specific configuration for `open_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :open_issue + ## + # RPC-specific configuration for `close_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :close_issue + ## + # RPC-specific configuration for `get_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pull_request_comment + ## + # RPC-specific configuration for `list_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_request_comments + ## + # RPC-specific configuration for `create_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_pull_request_comment + ## + # RPC-specific configuration for `update_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pull_request_comment + ## + # RPC-specific configuration for `delete_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_pull_request_comment + ## + # RPC-specific configuration for `batch_create_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_pull_request_comments + ## + # RPC-specific configuration for `resolve_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :resolve_pull_request_comments + ## + # RPC-specific configuration for `unresolve_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :unresolve_pull_request_comments + ## + # RPC-specific configuration for `create_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_issue_comment + ## + # RPC-specific configuration for `get_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue_comment + ## + # RPC-specific configuration for `list_issue_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issue_comments + ## + # RPC-specific configuration for `update_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue_comment + ## + # RPC-specific configuration for `delete_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue_comment + + # @private + def initialize parent_rpcs = nil + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance + @create_instance = ::Gapic::Config::Method.new create_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories + @list_repositories = ::Gapic::Config::Method.new list_repositories_config + get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository + @get_repository = ::Gapic::Config::Method.new get_repository_config + create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository + @create_repository = ::Gapic::Config::Method.new create_repository_config + update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository + @update_repository = ::Gapic::Config::Method.new update_repository_config + delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository + @delete_repository = ::Gapic::Config::Method.new delete_repository_config + list_hooks_config = parent_rpcs.list_hooks if parent_rpcs.respond_to? :list_hooks + @list_hooks = ::Gapic::Config::Method.new list_hooks_config + get_hook_config = parent_rpcs.get_hook if parent_rpcs.respond_to? :get_hook + @get_hook = ::Gapic::Config::Method.new get_hook_config + create_hook_config = parent_rpcs.create_hook if parent_rpcs.respond_to? :create_hook + @create_hook = ::Gapic::Config::Method.new create_hook_config + update_hook_config = parent_rpcs.update_hook if parent_rpcs.respond_to? :update_hook + @update_hook = ::Gapic::Config::Method.new update_hook_config + delete_hook_config = parent_rpcs.delete_hook if parent_rpcs.respond_to? :delete_hook + @delete_hook = ::Gapic::Config::Method.new delete_hook_config + get_iam_policy_repo_config = parent_rpcs.get_iam_policy_repo if parent_rpcs.respond_to? :get_iam_policy_repo + @get_iam_policy_repo = ::Gapic::Config::Method.new get_iam_policy_repo_config + set_iam_policy_repo_config = parent_rpcs.set_iam_policy_repo if parent_rpcs.respond_to? :set_iam_policy_repo + @set_iam_policy_repo = ::Gapic::Config::Method.new set_iam_policy_repo_config + test_iam_permissions_repo_config = parent_rpcs.test_iam_permissions_repo if parent_rpcs.respond_to? :test_iam_permissions_repo + @test_iam_permissions_repo = ::Gapic::Config::Method.new test_iam_permissions_repo_config + create_branch_rule_config = parent_rpcs.create_branch_rule if parent_rpcs.respond_to? :create_branch_rule + @create_branch_rule = ::Gapic::Config::Method.new create_branch_rule_config + list_branch_rules_config = parent_rpcs.list_branch_rules if parent_rpcs.respond_to? :list_branch_rules + @list_branch_rules = ::Gapic::Config::Method.new list_branch_rules_config + get_branch_rule_config = parent_rpcs.get_branch_rule if parent_rpcs.respond_to? :get_branch_rule + @get_branch_rule = ::Gapic::Config::Method.new get_branch_rule_config + update_branch_rule_config = parent_rpcs.update_branch_rule if parent_rpcs.respond_to? :update_branch_rule + @update_branch_rule = ::Gapic::Config::Method.new update_branch_rule_config + delete_branch_rule_config = parent_rpcs.delete_branch_rule if parent_rpcs.respond_to? :delete_branch_rule + @delete_branch_rule = ::Gapic::Config::Method.new delete_branch_rule_config + create_pull_request_config = parent_rpcs.create_pull_request if parent_rpcs.respond_to? :create_pull_request + @create_pull_request = ::Gapic::Config::Method.new create_pull_request_config + get_pull_request_config = parent_rpcs.get_pull_request if parent_rpcs.respond_to? :get_pull_request + @get_pull_request = ::Gapic::Config::Method.new get_pull_request_config + list_pull_requests_config = parent_rpcs.list_pull_requests if parent_rpcs.respond_to? :list_pull_requests + @list_pull_requests = ::Gapic::Config::Method.new list_pull_requests_config + update_pull_request_config = parent_rpcs.update_pull_request if parent_rpcs.respond_to? :update_pull_request + @update_pull_request = ::Gapic::Config::Method.new update_pull_request_config + merge_pull_request_config = parent_rpcs.merge_pull_request if parent_rpcs.respond_to? :merge_pull_request + @merge_pull_request = ::Gapic::Config::Method.new merge_pull_request_config + open_pull_request_config = parent_rpcs.open_pull_request if parent_rpcs.respond_to? :open_pull_request + @open_pull_request = ::Gapic::Config::Method.new open_pull_request_config + close_pull_request_config = parent_rpcs.close_pull_request if parent_rpcs.respond_to? :close_pull_request + @close_pull_request = ::Gapic::Config::Method.new close_pull_request_config + list_pull_request_file_diffs_config = parent_rpcs.list_pull_request_file_diffs if parent_rpcs.respond_to? :list_pull_request_file_diffs + @list_pull_request_file_diffs = ::Gapic::Config::Method.new list_pull_request_file_diffs_config + fetch_tree_config = parent_rpcs.fetch_tree if parent_rpcs.respond_to? :fetch_tree + @fetch_tree = ::Gapic::Config::Method.new fetch_tree_config + fetch_blob_config = parent_rpcs.fetch_blob if parent_rpcs.respond_to? :fetch_blob + @fetch_blob = ::Gapic::Config::Method.new fetch_blob_config + create_issue_config = parent_rpcs.create_issue if parent_rpcs.respond_to? :create_issue + @create_issue = ::Gapic::Config::Method.new create_issue_config + get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue + @get_issue = ::Gapic::Config::Method.new get_issue_config + list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues + @list_issues = ::Gapic::Config::Method.new list_issues_config + update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue + @update_issue = ::Gapic::Config::Method.new update_issue_config + delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue + @delete_issue = ::Gapic::Config::Method.new delete_issue_config + open_issue_config = parent_rpcs.open_issue if parent_rpcs.respond_to? :open_issue + @open_issue = ::Gapic::Config::Method.new open_issue_config + close_issue_config = parent_rpcs.close_issue if parent_rpcs.respond_to? :close_issue + @close_issue = ::Gapic::Config::Method.new close_issue_config + get_pull_request_comment_config = parent_rpcs.get_pull_request_comment if parent_rpcs.respond_to? :get_pull_request_comment + @get_pull_request_comment = ::Gapic::Config::Method.new get_pull_request_comment_config + list_pull_request_comments_config = parent_rpcs.list_pull_request_comments if parent_rpcs.respond_to? :list_pull_request_comments + @list_pull_request_comments = ::Gapic::Config::Method.new list_pull_request_comments_config + create_pull_request_comment_config = parent_rpcs.create_pull_request_comment if parent_rpcs.respond_to? :create_pull_request_comment + @create_pull_request_comment = ::Gapic::Config::Method.new create_pull_request_comment_config + update_pull_request_comment_config = parent_rpcs.update_pull_request_comment if parent_rpcs.respond_to? :update_pull_request_comment + @update_pull_request_comment = ::Gapic::Config::Method.new update_pull_request_comment_config + delete_pull_request_comment_config = parent_rpcs.delete_pull_request_comment if parent_rpcs.respond_to? :delete_pull_request_comment + @delete_pull_request_comment = ::Gapic::Config::Method.new delete_pull_request_comment_config + batch_create_pull_request_comments_config = parent_rpcs.batch_create_pull_request_comments if parent_rpcs.respond_to? :batch_create_pull_request_comments + @batch_create_pull_request_comments = ::Gapic::Config::Method.new batch_create_pull_request_comments_config + resolve_pull_request_comments_config = parent_rpcs.resolve_pull_request_comments if parent_rpcs.respond_to? :resolve_pull_request_comments + @resolve_pull_request_comments = ::Gapic::Config::Method.new resolve_pull_request_comments_config + unresolve_pull_request_comments_config = parent_rpcs.unresolve_pull_request_comments if parent_rpcs.respond_to? :unresolve_pull_request_comments + @unresolve_pull_request_comments = ::Gapic::Config::Method.new unresolve_pull_request_comments_config + create_issue_comment_config = parent_rpcs.create_issue_comment if parent_rpcs.respond_to? :create_issue_comment + @create_issue_comment = ::Gapic::Config::Method.new create_issue_comment_config + get_issue_comment_config = parent_rpcs.get_issue_comment if parent_rpcs.respond_to? :get_issue_comment + @get_issue_comment = ::Gapic::Config::Method.new get_issue_comment_config + list_issue_comments_config = parent_rpcs.list_issue_comments if parent_rpcs.respond_to? :list_issue_comments + @list_issue_comments = ::Gapic::Config::Method.new list_issue_comments_config + update_issue_comment_config = parent_rpcs.update_issue_comment if parent_rpcs.respond_to? :update_issue_comment + @update_issue_comment = ::Gapic::Config::Method.new update_issue_comment_config + delete_issue_comment_config = parent_rpcs.delete_issue_comment if parent_rpcs.respond_to? :delete_issue_comment + @delete_issue_comment = ::Gapic::Config::Method.new delete_issue_comment_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.rb new file mode 100644 index 000000000000..514b539ee5fe --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module SecureSourceManager + module V1 + module SecureSourceManager + # Credentials for the SecureSourceManager API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb new file mode 100644 index 000000000000..47e65cdbc636 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module SecureSourceManager + module V1 + module SecureSourceManager + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securesourcemanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SecureSourceManager Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SecureSourceManager Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securesourcemanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb new file mode 100644 index 000000000000..da9c90ca3b1d --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb @@ -0,0 +1,313 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + module SecureSourceManager + # Path helper methods for the SecureSourceManager API. + module Paths + ## + # Create a fully-qualified BranchRule resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param branch_rule [String] + # + # @return [::String] + def branch_rule_path project:, location:, repository:, branch_rule: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/branchRules/#{branch_rule}" + end + + ## + # Create a fully-qualified CaPool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/caPools/{ca_pool}` + # + # @param project [String] + # @param location [String] + # @param ca_pool [String] + # + # @return [::String] + def ca_pool_path project:, location:, ca_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/caPools/#{ca_pool}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # Create a fully-qualified Hook resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/hooks/{hook}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param hook [String] + # + # @return [::String] + def hook_path project:, location:, repository:, hook: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/hooks/#{hook}" + end + + ## + # Create a fully-qualified InspectTemplate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/inspectTemplates/{inspect_template}` + # + # @param project [String] + # @param location [String] + # @param inspect_template [String] + # + # @return [::String] + def inspect_template_path project:, location:, inspect_template: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/inspectTemplates/#{inspect_template}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified Issue resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param issue [String] + # + # @return [::String] + def issue_path project:, location:, repository:, issue: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/issues/#{issue}" + end + + ## + # Create a fully-qualified IssueComment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param issue [String] + # @param comment [String] + # + # @return [::String] + def issue_comment_path project:, location:, repository:, issue:, comment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + raise ::ArgumentError, "issue cannot contain /" if issue.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/issues/#{issue}/issueComments/#{comment}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified PullRequest resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param pull_request [String] + # + # @return [::String] + def pull_request_path project:, location:, repository:, pull_request: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/pullRequests/#{pull_request}" + end + + ## + # Create a fully-qualified PullRequestComment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # @param pull_request [String] + # @param comment [String] + # + # @return [::String] + def pull_request_comment_path project:, location:, repository:, pull_request:, comment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" + raise ::ArgumentError, "pull_request cannot contain /" if pull_request.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}/pullRequests/#{pull_request}/pullRequestComments/#{comment}" + end + + ## + # Create a fully-qualified Repository resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # + # @return [::String] + def repository_path project:, location:, repository: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}" + end + + ## + # Create a fully-qualified ServiceAccount resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/serviceAccounts/{service_account}` + # + # @param project [String] + # @param service_account [String] + # + # @return [::String] + def service_account_path project:, service_account: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/serviceAccounts/#{service_account}" + end + + ## + # Create a fully-qualified ServiceAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}` + # + # @param project [String] + # @param region [String] + # @param service_attachment [String] + # + # @return [::String] + def service_attachment_path project:, region:, service_attachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/serviceAttachments/#{service_attachment}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb new file mode 100644 index 000000000000..1d049bd8ad6d --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/secure_source_manager/v1/version" +require "google/cloud/secure_source_manager/v1/bindings_override" + +require "google/cloud/secure_source_manager/v1/secure_source_manager/credentials" +require "google/cloud/secure_source_manager/v1/secure_source_manager/paths" +require "google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations" +require "google/cloud/secure_source_manager/v1/secure_source_manager/rest/client" + +module Google + module Cloud + module SecureSourceManager + module V1 + ## + # Secure Source Manager API + # + # Access Secure Source Manager instances, resources, and repositories. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/secure_source_manager/v1/secure_source_manager/rest" + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + module SecureSourceManager + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/secure_source_manager/v1/secure_source_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb new file mode 100644 index 000000000000..5256c3f91046 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb @@ -0,0 +1,5485 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" +require "google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module SecureSourceManager + module V1 + module SecureSourceManager + module Rest + ## + # REST client for the SecureSourceManager service. + # + # Secure Source Manager API + # + # Access Secure Source Manager instances, resources, and repositories. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securesourcemanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :secure_source_manager_stub + + ## + # Configure the SecureSourceManager Client class. + # + # See {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecureSourceManager clients + # ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecureSourceManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_instances.timeout = 60.0 + default_config.rpcs.list_instances.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_instance.timeout = 60.0 + default_config.rpcs.get_instance.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_repositories.timeout = 60.0 + default_config.rpcs.list_repositories.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_repository.timeout = 60.0 + default_config.rpcs.get_repository.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_iam_policy_repo.timeout = 60.0 + default_config.rpcs.get_iam_policy_repo.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecureSourceManager Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @secure_source_manager_stub.universe_domain + end + + ## + # Create a new SecureSourceManager REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecureSourceManager client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @secure_source_manager_stub = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @secure_source_manager_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @secure_source_manager_stub.endpoint + config.universe_domain = @secure_source_manager_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @secure_source_manager_stub.endpoint + config.universe_domain = @secure_source_manager_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @secure_source_manager_stub.logger + end + + # Service calls + + ## + # Lists Instances in a given project and location. + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListInstancesRequest. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filter for filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_instances.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_instances request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_instances, "instances", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_instance request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new instance in a given project and location. + # + # @overload create_instance(request, options = nil) + # Pass arguments to `create_instance` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) + # Pass arguments to `create_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param instance_id [::String] + # Required. ID of the instance to be created. + # @param instance [::Google::Cloud::SecureSourceManager::V1::Instance, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new + # + # # Call the create_instance method. + # result = client.create_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single instance. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_instance(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, will force the deletion of the instance. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.delete_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Repositories in a given project and location. + # + # The instance field is required in the query parameter for requests using + # the securesourcemanager.googleapis.com endpoint. + # + # @overload list_repositories(request, options = nil) + # Pass arguments to `list_repositories` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, instance: nil) + # Pass arguments to `list_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListRepositoriesRequest. + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filter results. + # @param instance [::String] + # Optional. The name of the instance in which the repository is hosted, + # formatted as + # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + # When listing repositories via securesourcemanager.googleapis.com, this + # field is required. When listing repositories via *.sourcemanager.dev, this + # field is ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new + # + # # Call the list_repositories method. + # result = client.list_repositories request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Repository. + # p item + # end + # + def list_repositories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_repositories.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_repositories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_repositories request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_repositories, "repositories", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata of a repository. + # + # @overload get_repository(request, options = nil) + # Pass arguments to `get_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_repository(name: nil) + # Pass arguments to `get_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the repository to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Repository] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new + # + # # Call the get_repository method. + # result = client.get_repository request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Repository. + # p result + # + def get_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_repository request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new repository in a given project and location. + # + # The Repository.Instance field is required in the request body for requests + # using the securesourcemanager.googleapis.com endpoint. + # + # @overload create_repository(request, options = nil) + # Pass arguments to `create_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_repository(parent: nil, repository: nil, repository_id: nil) + # Pass arguments to `create_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project in which to create the repository. Values are of the + # form `projects/{project_number}/locations/{location_id}` + # @param repository [::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash] + # Required. The resource being created. + # @param repository_id [::String] + # Required. The ID to use for the repository, which will become the final + # component of the repository's resource name. This value should be 4-63 + # characters, and valid characters are /[a-z][0-9]-/. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new + # + # # Call the create_repository method. + # result = client.create_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_repository request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the metadata of a repository. + # + # @overload update_repository(request, options = nil) + # Pass arguments to `update_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_repository(update_mask: nil, repository: nil, validate_only: nil) + # Pass arguments to `update_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # repository resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param repository [::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash] + # Required. The repository being updated. + # @param validate_only [::Boolean] + # Optional. False by default. If set to true, the request is validated and + # the user is provided with an expected result, but no actual change is made. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new + # + # # Call the update_repository method. + # result = client.update_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.update_repository request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Repository. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_repository(name: nil, allow_missing: nil) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the repository to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the repository is not found, the request will + # succeed but no action will be taken on the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new + # + # # Call the delete_repository method. + # result = client.delete_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.delete_repository request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists hooks in a given repository. + # + # @overload list_hooks(request, options = nil) + # Pass arguments to `list_hooks` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListHooksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_hooks(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_hooks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListHooksRequest. + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new + # + # # Call the list_hooks method. + # result = client.list_hooks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Hook. + # p item + # end + # + def list_hooks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_hooks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_hooks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_hooks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_hooks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_hooks, "hooks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata of a hook. + # + # @overload get_hook(request, options = nil) + # Pass arguments to `get_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetHookRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetHookRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_hook(name: nil) + # Pass arguments to `get_hook` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the hook to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Hook] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Hook] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new + # + # # Call the get_hook method. + # result = client.get_hook request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook. + # p result + # + def get_hook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetHookRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_hook.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_hook.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_hook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_hook request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new hook in a given repository. + # + # @overload create_hook(request, options = nil) + # Pass arguments to `create_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateHookRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_hook(parent: nil, hook: nil, hook_id: nil) + # Pass arguments to `create_hook` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The repository in which to create the hook. Values are of the + # form + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] + # Required. The resource being created. + # @param hook_id [::String] + # Required. The ID to use for the hook, which will become the final component + # of the hook's resource name. This value restricts to lower-case letters, + # numbers, and hyphen, with the first character a letter, the last a letter + # or a number, and a 63 character maximum. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new + # + # # Call the create_hook method. + # result = client.create_hook request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_hook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_hook.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_hook.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_hook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_hook request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the metadata of a hook. + # + # @overload update_hook(request, options = nil) + # Pass arguments to `update_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_hook(update_mask: nil, hook: nil) + # Pass arguments to `update_hook` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # hook resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] + # Required. The hook being updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new + # + # # Call the update_hook method. + # result = client.update_hook request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_hook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_hook.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_hook.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_hook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.update_hook request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Hook. + # + # @overload delete_hook(request, options = nil) + # Pass arguments to `delete_hook` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_hook(name: nil) + # Pass arguments to `delete_hook` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the hook to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new + # + # # Call the delete_hook method. + # result = client.delete_hook request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_hook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_hook.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_hook.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_hook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.delete_hook request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get IAM policy for a repository. + # + # @overload get_iam_policy_repo(request, options = nil) + # Pass arguments to `get_iam_policy_repo` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy_repo(resource: nil, options: nil) + # Pass arguments to `get_iam_policy_repo` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy_repo method. + # result = client.get_iam_policy_repo request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy_repo.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy_repo.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_iam_policy_repo request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Set IAM policy on a repository. + # + # @overload set_iam_policy_repo(request, options = nil) + # Pass arguments to `set_iam_policy_repo` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy_repo` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy_repo method. + # result = client.set_iam_policy_repo request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy_repo.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy_repo.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.set_iam_policy_repo request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Test IAM permissions on a repository. + # IAM permission checks are not required on this method. + # + # @overload test_iam_permissions_repo(request, options = nil) + # Pass arguments to `test_iam_permissions_repo` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions_repo(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions_repo` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions_repo method. + # result = client.test_iam_permissions_repo request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions_repo request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions_repo.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions_repo.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions_repo.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.test_iam_permissions_repo request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # CreateBranchRule creates a branch rule in a given repository. + # + # @overload create_branch_rule(request, options = nil) + # Pass arguments to `create_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) + # Pass arguments to `create_branch_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] + # @param branch_rule_id [::String] + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new + # + # # Call the create_branch_rule method. + # result = client.create_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_branch_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_branch_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_branch_rule request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # ListBranchRules lists branch rules in a given repository. + # + # @overload list_branch_rules(request, options = nil) + # Pass arguments to `list_branch_rules` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_branch_rules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_branch_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new + # + # # Call the list_branch_rules method. + # result = client.list_branch_rules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::BranchRule. + # p item + # end + # + def list_branch_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_branch_rules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_branch_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_branch_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_branch_rules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, "branch_rules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # GetBranchRule gets a branch rule. + # + # @overload get_branch_rule(request, options = nil) + # Pass arguments to `get_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_branch_rule(name: nil) + # Pass arguments to `get_branch_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the repository to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new + # + # # Call the get_branch_rule method. + # result = client.get_branch_rule request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule. + # p result + # + def get_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_branch_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_branch_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_branch_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # UpdateBranchRule updates a branch rule. + # + # @overload update_branch_rule(request, options = nil) + # Pass arguments to `update_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) + # Pass arguments to `update_branch_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually post it. (https://google.aip.dev/163, for declarative friendly) + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # branchRule resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new + # + # # Call the update_branch_rule method. + # result = client.update_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_branch_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_branch_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.update_branch_rule request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # DeleteBranchRule deletes a branch rule. + # + # @overload delete_branch_rule(request, options = nil) + # Pass arguments to `delete_branch_rule` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_branch_rule(name: nil, allow_missing: nil) + # Pass arguments to `delete_branch_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # @param allow_missing [::Boolean] + # Optional. If set to true, and the branch rule is not found, the request + # will succeed but no action will be taken on the server. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new + # + # # Call the delete_branch_rule method. + # result = client.delete_branch_rule request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_branch_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_branch_rule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_branch_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_branch_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.delete_branch_rule request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a pull request. + # + # @overload create_pull_request(request, options = nil) + # Pass arguments to `create_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_pull_request(parent: nil, pull_request: nil) + # Pass arguments to `create_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The repository that the pull request is created from. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] + # Required. The pull request to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new + # + # # Call the create_pull_request method. + # result = client.create_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_pull_request request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a pull request. + # + # @overload get_pull_request(request, options = nil) + # Pass arguments to `get_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_pull_request(name: nil) + # Pass arguments to `get_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new + # + # # Call the get_pull_request method. + # result = client.get_pull_request request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequest. + # p result + # + def get_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_pull_request request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists pull requests in a repository. + # + # @overload list_pull_requests(request, options = nil) + # Pass arguments to `list_pull_requests` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_pull_requests(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_requests` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The repository in which to list pull requests. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new + # + # # Call the list_pull_requests method. + # result = client.list_pull_requests request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequest. + # p item + # end + # + def list_pull_requests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_pull_requests.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_pull_requests.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_pull_requests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_pull_requests request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_requests, "pull_requests", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a pull request. + # + # @overload update_pull_request(request, options = nil) + # Pass arguments to `update_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_pull_request(pull_request: nil, update_mask: nil) + # Pass arguments to `update_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] + # Required. The pull request to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new + # + # # Call the update_pull_request method. + # result = client.update_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.update_pull_request request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Merges a pull request. + # + # @overload merge_pull_request(request, options = nil) + # Pass arguments to `merge_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload merge_pull_request(name: nil) + # Pass arguments to `merge_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The pull request to merge. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new + # + # # Call the merge_pull_request method. + # result = client.merge_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def merge_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.merge_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.merge_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.merge_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.merge_pull_request request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Opens a pull request. + # + # @overload open_pull_request(request, options = nil) + # Pass arguments to `open_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload open_pull_request(name: nil) + # Pass arguments to `open_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The pull request to open. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new + # + # # Call the open_pull_request method. + # result = client.open_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def open_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.open_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.open_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.open_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.open_pull_request request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Closes a pull request without merging. + # + # @overload close_pull_request(request, options = nil) + # Pass arguments to `close_pull_request` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload close_pull_request(name: nil) + # Pass arguments to `close_pull_request` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The pull request to close. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new + # + # # Call the close_pull_request method. + # result = client.close_pull_request request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def close_pull_request request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.close_pull_request.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.close_pull_request.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.close_pull_request.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.close_pull_request request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a pull request's file diffs. + # + # @overload list_pull_request_file_diffs(request, options = nil) + # Pass arguments to `list_pull_request_file_diffs` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_pull_request_file_diffs(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_request_file_diffs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The pull request to list file diffs for. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new + # + # # Call the list_pull_request_file_diffs method. + # result = client.list_pull_request_file_diffs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::FileDiff. + # p item + # end + # + def list_pull_request_file_diffs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_pull_request_file_diffs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_pull_request_file_diffs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_pull_request_file_diffs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_pull_request_file_diffs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_file_diffs, "file_diffs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a tree from a repository. + # + # @overload fetch_tree(request, options = nil) + # Pass arguments to `fetch_tree` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_tree(repository: nil, ref: nil, recursive: nil, page_size: nil, page_token: nil) + # Pass arguments to `fetch_tree` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param repository [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository to fetch the tree from. + # @param ref [::String] + # Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies + # which tree to fetch. If not specified, the default branch will be used. + # @param recursive [::Boolean] + # Optional. If true, include all subfolders and their files in the response. + # If false, only the immediate children are returned. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, at most 10,000 items will be returned. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new + # + # # Call the fetch_tree method. + # result = client.fetch_tree request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::TreeEntry. + # p item + # end + # + def fetch_tree request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_tree.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_tree.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_tree.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.fetch_tree request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :fetch_tree, "tree_entries", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a blob from a repository. + # + # @overload fetch_blob(request, options = nil) + # Pass arguments to `fetch_blob` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_blob(repository: nil, sha: nil) + # Pass arguments to `fetch_blob` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param repository [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository containing the blob. + # @param sha [::String] + # Required. The SHA-1 hash of the blob to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new + # + # # Call the fetch_blob method. + # result = client.fetch_blob request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::FetchBlobResponse. + # p result + # + def fetch_blob request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_blob.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_blob.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_blob.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.fetch_blob request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an issue. + # + # @overload create_issue(request, options = nil) + # Pass arguments to `create_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_issue(parent: nil, issue: nil) + # Pass arguments to `create_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The repository in which to create the issue. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] + # Required. The issue to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new + # + # # Call the create_issue method. + # result = client.create_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_issue request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue. + # + # @overload get_issue(request, options = nil) + # Pass arguments to `get_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_issue(name: nil) + # Pass arguments to `get_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Issue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Issue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new + # + # # Call the get_issue method. + # result = client.get_issue request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Issue. + # p result + # + def get_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_issue request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists issues in a repository. + # + # @overload list_issues(request, options = nil) + # Pass arguments to `list_issues` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_issues(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The repository in which to list issues. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Used to filter the resulting issues list. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new + # + # # Call the list_issues method. + # result = client.list_issues request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Issue. + # p item + # end + # + def list_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_issues request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_issues, "issues", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a issue. + # + # @overload update_issue(request, options = nil) + # Pass arguments to `update_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_issue(issue: nil, update_mask: nil) + # Pass arguments to `update_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] + # Required. The issue to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new + # + # # Call the update_issue method. + # result = client.update_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.update_issue request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an issue. + # + # @overload delete_issue(request, options = nil) + # Pass arguments to `delete_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_issue(name: nil, etag: nil) + # Pass arguments to `delete_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # deletion will be blocked and an ABORTED error will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new + # + # # Call the delete_issue method. + # result = client.delete_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.delete_issue request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Opens an issue. + # + # @overload open_issue(request, options = nil) + # Pass arguments to `open_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload open_issue(name: nil, etag: nil) + # Pass arguments to `open_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to open. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # opening will be blocked and an ABORTED error will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new + # + # # Call the open_issue method. + # result = client.open_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def open_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.open_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.open_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.open_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.open_issue request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Closes an issue. + # + # @overload close_issue(request, options = nil) + # Pass arguments to `close_issue` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload close_issue(name: nil, etag: nil) + # Pass arguments to `close_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue to close. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @param etag [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # closing will be blocked and an ABORTED error will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new + # + # # Call the close_issue method. + # result = client.close_issue request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def close_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.close_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.close_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.close_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.close_issue request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a pull request comment. + # + # @overload get_pull_request_comment(request, options = nil) + # Pass arguments to `get_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_pull_request_comment(name: nil) + # Pass arguments to `get_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request comment to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new + # + # # Call the get_pull_request_comment method. + # result = client.get_pull_request_comment request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequestComment. + # p result + # + def get_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_pull_request_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_pull_request_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_pull_request_comment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists pull request comments. + # + # @overload list_pull_request_comments(request, options = nil) + # Pass arguments to `list_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_pull_request_comments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_pull_request_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The pull request in which to list pull request comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new + # + # # Call the list_pull_request_comments method. + # result = client.list_pull_request_comments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequestComment. + # p item + # end + # + def list_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_pull_request_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_pull_request_comments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_pull_request_comments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_comments, "pull_request_comments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a pull request comment. This function is used to create a single + # PullRequestComment of type Comment, or a single PullRequestComment of type + # Code that's replying to another PullRequestComment of type Code. Use + # BatchCreatePullRequestComments to create multiple PullRequestComments for + # code reviews. + # + # @overload create_pull_request_comment(request, options = nil) + # Pass arguments to `create_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_pull_request_comment(parent: nil, pull_request_comment: nil) + # Pass arguments to `create_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The pull request in which to create the pull request comment. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] + # Required. The pull request comment to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new + # + # # Call the create_pull_request_comment method. + # result = client.create_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_pull_request_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_pull_request_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_pull_request_comment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a pull request comment. + # + # @overload update_pull_request_comment(request, options = nil) + # Pass arguments to `update_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_pull_request_comment(pull_request_comment: nil, update_mask: nil) + # Pass arguments to `update_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] + # Required. The pull request comment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request comment resource by the update. Updatable fields are + # `body`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new + # + # # Call the update_pull_request_comment method. + # result = client.update_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_pull_request_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_pull_request_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.update_pull_request_comment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a pull request comment. + # + # @overload delete_pull_request_comment(request, options = nil) + # Pass arguments to `delete_pull_request_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_pull_request_comment(name: nil) + # Pass arguments to `delete_pull_request_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the pull request comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new + # + # # Call the delete_pull_request_comment method. + # result = client.delete_pull_request_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_pull_request_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_pull_request_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_pull_request_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_pull_request_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.delete_pull_request_comment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Batch creates pull request comments. This function is used to create + # multiple PullRequestComments for code review. There needs to be exactly one + # PullRequestComment of type Review, and at most 100 PullRequestComments of + # type Code per request. The Position of the code comments must be unique + # within the request. + # + # @overload batch_create_pull_request_comments(request, options = nil) + # Pass arguments to `batch_create_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_create_pull_request_comments(parent: nil, requests: nil) + # Pass arguments to `batch_create_pull_request_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The pull request in which to create the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param requests [::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash>] + # Required. The request message specifying the resources to create. There + # should be exactly one CreatePullRequestCommentRequest with CommentDetail + # being REVIEW in the list, and no more than 100 + # CreatePullRequestCommentRequests with CommentDetail being CODE in the list + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new + # + # # Call the batch_create_pull_request_comments method. + # result = client.batch_create_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_create_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_create_pull_request_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_create_pull_request_comments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_create_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.batch_create_pull_request_comments request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resolves pull request comments. A list of PullRequestComment names must be + # provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be resolved. + # + # @overload resolve_pull_request_comments(request, options = nil) + # Pass arguments to `resolve_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload resolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) + # Pass arguments to `resolve_pull_request_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param names [::Array<::String>] + # Required. The names of the pull request comments to resolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @param auto_fill [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to resolved. If + # unset, all comments in the same thread need be present. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new + # + # # Call the resolve_pull_request_comments method. + # result = client.resolve_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def resolve_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.resolve_pull_request_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.resolve_pull_request_comments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.resolve_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.resolve_pull_request_comments request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unresolves pull request comments. A list of PullRequestComment names must + # be provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be unresolved. + # + # @overload unresolve_pull_request_comments(request, options = nil) + # Pass arguments to `unresolve_pull_request_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload unresolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) + # Pass arguments to `unresolve_pull_request_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @param names [::Array<::String>] + # Required. The names of the pull request comments to unresolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @param auto_fill [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to unresolved. If + # unset, all comments in the same thread need be present. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new + # + # # Call the unresolve_pull_request_comments method. + # result = client.unresolve_pull_request_comments request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def unresolve_pull_request_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.unresolve_pull_request_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.unresolve_pull_request_comments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.unresolve_pull_request_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.unresolve_pull_request_comments request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an issue comment. + # + # @overload create_issue_comment(request, options = nil) + # Pass arguments to `create_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_issue_comment(parent: nil, issue_comment: nil) + # Pass arguments to `create_issue_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The issue in which to create the issue comment. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] + # Required. The issue comment to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new + # + # # Call the create_issue_comment method. + # result = client.create_issue_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_issue_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_issue_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_issue_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_issue_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.create_issue_comment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue comment. + # + # @overload get_issue_comment(request, options = nil) + # Pass arguments to `get_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_issue_comment(name: nil) + # Pass arguments to `get_issue_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue comment to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new + # + # # Call the get_issue_comment method. + # result = client.get_issue_comment request + # + # # The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment. + # p result + # + def get_issue_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_issue_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_issue_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_issue_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.get_issue_comment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists comments in an issue. + # + # @overload list_issue_comments(request, options = nil) + # Pass arguments to `list_issue_comments` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_issue_comments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_issue_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The issue in which to list the comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @param page_size [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new + # + # # Call the list_issue_comments method. + # result = client.list_issue_comments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::IssueComment. + # p item + # end + # + def list_issue_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_issue_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_issue_comments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_issue_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.list_issue_comments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_issue_comments, "issue_comments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an issue comment. + # + # @overload update_issue_comment(request, options = nil) + # Pass arguments to `update_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_issue_comment(issue_comment: nil, update_mask: nil) + # Pass arguments to `update_issue_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] + # Required. The issue comment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue comment resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new + # + # # Call the update_issue_comment method. + # result = client.update_issue_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_issue_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_issue_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_issue_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_issue_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.update_issue_comment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an issue comment. + # + # @overload delete_issue_comment(request, options = nil) + # Pass arguments to `delete_issue_comment` via a request object, either of type + # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_issue_comment(name: nil) + # Pass arguments to `delete_issue_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the issue comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/secure_source_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new + # + # # Call the delete_issue_comment method. + # result = client.delete_issue_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_issue_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_issue_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_issue_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_issue_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @secure_source_manager_stub.delete_issue_comment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecureSourceManager REST API. + # + # This class represents the configuration for SecureSourceManager REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_instances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securesourcemanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the SecureSourceManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `create_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `list_repositories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_repositories + ## + # RPC-specific configuration for `get_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :get_repository + ## + # RPC-specific configuration for `create_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :create_repository + ## + # RPC-specific configuration for `update_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :update_repository + ## + # RPC-specific configuration for `delete_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_repository + ## + # RPC-specific configuration for `list_hooks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_hooks + ## + # RPC-specific configuration for `get_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :get_hook + ## + # RPC-specific configuration for `create_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :create_hook + ## + # RPC-specific configuration for `update_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :update_hook + ## + # RPC-specific configuration for `delete_hook` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_hook + ## + # RPC-specific configuration for `get_iam_policy_repo` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy_repo + ## + # RPC-specific configuration for `set_iam_policy_repo` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy_repo + ## + # RPC-specific configuration for `test_iam_permissions_repo` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions_repo + ## + # RPC-specific configuration for `create_branch_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_branch_rule + ## + # RPC-specific configuration for `list_branch_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_branch_rules + ## + # RPC-specific configuration for `get_branch_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_branch_rule + ## + # RPC-specific configuration for `update_branch_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_branch_rule + ## + # RPC-specific configuration for `delete_branch_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_branch_rule + ## + # RPC-specific configuration for `create_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :create_pull_request + ## + # RPC-specific configuration for `get_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pull_request + ## + # RPC-specific configuration for `list_pull_requests` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_requests + ## + # RPC-specific configuration for `update_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pull_request + ## + # RPC-specific configuration for `merge_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :merge_pull_request + ## + # RPC-specific configuration for `open_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :open_pull_request + ## + # RPC-specific configuration for `close_pull_request` + # @return [::Gapic::Config::Method] + # + attr_reader :close_pull_request + ## + # RPC-specific configuration for `list_pull_request_file_diffs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_request_file_diffs + ## + # RPC-specific configuration for `fetch_tree` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_tree + ## + # RPC-specific configuration for `fetch_blob` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_blob + ## + # RPC-specific configuration for `create_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :create_issue + ## + # RPC-specific configuration for `get_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue + ## + # RPC-specific configuration for `list_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issues + ## + # RPC-specific configuration for `update_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue + ## + # RPC-specific configuration for `delete_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue + ## + # RPC-specific configuration for `open_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :open_issue + ## + # RPC-specific configuration for `close_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :close_issue + ## + # RPC-specific configuration for `get_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pull_request_comment + ## + # RPC-specific configuration for `list_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pull_request_comments + ## + # RPC-specific configuration for `create_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_pull_request_comment + ## + # RPC-specific configuration for `update_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pull_request_comment + ## + # RPC-specific configuration for `delete_pull_request_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_pull_request_comment + ## + # RPC-specific configuration for `batch_create_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_pull_request_comments + ## + # RPC-specific configuration for `resolve_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :resolve_pull_request_comments + ## + # RPC-specific configuration for `unresolve_pull_request_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :unresolve_pull_request_comments + ## + # RPC-specific configuration for `create_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_issue_comment + ## + # RPC-specific configuration for `get_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue_comment + ## + # RPC-specific configuration for `list_issue_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issue_comments + ## + # RPC-specific configuration for `update_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue_comment + ## + # RPC-specific configuration for `delete_issue_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue_comment + + # @private + def initialize parent_rpcs = nil + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance + @create_instance = ::Gapic::Config::Method.new create_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories + @list_repositories = ::Gapic::Config::Method.new list_repositories_config + get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository + @get_repository = ::Gapic::Config::Method.new get_repository_config + create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository + @create_repository = ::Gapic::Config::Method.new create_repository_config + update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository + @update_repository = ::Gapic::Config::Method.new update_repository_config + delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository + @delete_repository = ::Gapic::Config::Method.new delete_repository_config + list_hooks_config = parent_rpcs.list_hooks if parent_rpcs.respond_to? :list_hooks + @list_hooks = ::Gapic::Config::Method.new list_hooks_config + get_hook_config = parent_rpcs.get_hook if parent_rpcs.respond_to? :get_hook + @get_hook = ::Gapic::Config::Method.new get_hook_config + create_hook_config = parent_rpcs.create_hook if parent_rpcs.respond_to? :create_hook + @create_hook = ::Gapic::Config::Method.new create_hook_config + update_hook_config = parent_rpcs.update_hook if parent_rpcs.respond_to? :update_hook + @update_hook = ::Gapic::Config::Method.new update_hook_config + delete_hook_config = parent_rpcs.delete_hook if parent_rpcs.respond_to? :delete_hook + @delete_hook = ::Gapic::Config::Method.new delete_hook_config + get_iam_policy_repo_config = parent_rpcs.get_iam_policy_repo if parent_rpcs.respond_to? :get_iam_policy_repo + @get_iam_policy_repo = ::Gapic::Config::Method.new get_iam_policy_repo_config + set_iam_policy_repo_config = parent_rpcs.set_iam_policy_repo if parent_rpcs.respond_to? :set_iam_policy_repo + @set_iam_policy_repo = ::Gapic::Config::Method.new set_iam_policy_repo_config + test_iam_permissions_repo_config = parent_rpcs.test_iam_permissions_repo if parent_rpcs.respond_to? :test_iam_permissions_repo + @test_iam_permissions_repo = ::Gapic::Config::Method.new test_iam_permissions_repo_config + create_branch_rule_config = parent_rpcs.create_branch_rule if parent_rpcs.respond_to? :create_branch_rule + @create_branch_rule = ::Gapic::Config::Method.new create_branch_rule_config + list_branch_rules_config = parent_rpcs.list_branch_rules if parent_rpcs.respond_to? :list_branch_rules + @list_branch_rules = ::Gapic::Config::Method.new list_branch_rules_config + get_branch_rule_config = parent_rpcs.get_branch_rule if parent_rpcs.respond_to? :get_branch_rule + @get_branch_rule = ::Gapic::Config::Method.new get_branch_rule_config + update_branch_rule_config = parent_rpcs.update_branch_rule if parent_rpcs.respond_to? :update_branch_rule + @update_branch_rule = ::Gapic::Config::Method.new update_branch_rule_config + delete_branch_rule_config = parent_rpcs.delete_branch_rule if parent_rpcs.respond_to? :delete_branch_rule + @delete_branch_rule = ::Gapic::Config::Method.new delete_branch_rule_config + create_pull_request_config = parent_rpcs.create_pull_request if parent_rpcs.respond_to? :create_pull_request + @create_pull_request = ::Gapic::Config::Method.new create_pull_request_config + get_pull_request_config = parent_rpcs.get_pull_request if parent_rpcs.respond_to? :get_pull_request + @get_pull_request = ::Gapic::Config::Method.new get_pull_request_config + list_pull_requests_config = parent_rpcs.list_pull_requests if parent_rpcs.respond_to? :list_pull_requests + @list_pull_requests = ::Gapic::Config::Method.new list_pull_requests_config + update_pull_request_config = parent_rpcs.update_pull_request if parent_rpcs.respond_to? :update_pull_request + @update_pull_request = ::Gapic::Config::Method.new update_pull_request_config + merge_pull_request_config = parent_rpcs.merge_pull_request if parent_rpcs.respond_to? :merge_pull_request + @merge_pull_request = ::Gapic::Config::Method.new merge_pull_request_config + open_pull_request_config = parent_rpcs.open_pull_request if parent_rpcs.respond_to? :open_pull_request + @open_pull_request = ::Gapic::Config::Method.new open_pull_request_config + close_pull_request_config = parent_rpcs.close_pull_request if parent_rpcs.respond_to? :close_pull_request + @close_pull_request = ::Gapic::Config::Method.new close_pull_request_config + list_pull_request_file_diffs_config = parent_rpcs.list_pull_request_file_diffs if parent_rpcs.respond_to? :list_pull_request_file_diffs + @list_pull_request_file_diffs = ::Gapic::Config::Method.new list_pull_request_file_diffs_config + fetch_tree_config = parent_rpcs.fetch_tree if parent_rpcs.respond_to? :fetch_tree + @fetch_tree = ::Gapic::Config::Method.new fetch_tree_config + fetch_blob_config = parent_rpcs.fetch_blob if parent_rpcs.respond_to? :fetch_blob + @fetch_blob = ::Gapic::Config::Method.new fetch_blob_config + create_issue_config = parent_rpcs.create_issue if parent_rpcs.respond_to? :create_issue + @create_issue = ::Gapic::Config::Method.new create_issue_config + get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue + @get_issue = ::Gapic::Config::Method.new get_issue_config + list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues + @list_issues = ::Gapic::Config::Method.new list_issues_config + update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue + @update_issue = ::Gapic::Config::Method.new update_issue_config + delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue + @delete_issue = ::Gapic::Config::Method.new delete_issue_config + open_issue_config = parent_rpcs.open_issue if parent_rpcs.respond_to? :open_issue + @open_issue = ::Gapic::Config::Method.new open_issue_config + close_issue_config = parent_rpcs.close_issue if parent_rpcs.respond_to? :close_issue + @close_issue = ::Gapic::Config::Method.new close_issue_config + get_pull_request_comment_config = parent_rpcs.get_pull_request_comment if parent_rpcs.respond_to? :get_pull_request_comment + @get_pull_request_comment = ::Gapic::Config::Method.new get_pull_request_comment_config + list_pull_request_comments_config = parent_rpcs.list_pull_request_comments if parent_rpcs.respond_to? :list_pull_request_comments + @list_pull_request_comments = ::Gapic::Config::Method.new list_pull_request_comments_config + create_pull_request_comment_config = parent_rpcs.create_pull_request_comment if parent_rpcs.respond_to? :create_pull_request_comment + @create_pull_request_comment = ::Gapic::Config::Method.new create_pull_request_comment_config + update_pull_request_comment_config = parent_rpcs.update_pull_request_comment if parent_rpcs.respond_to? :update_pull_request_comment + @update_pull_request_comment = ::Gapic::Config::Method.new update_pull_request_comment_config + delete_pull_request_comment_config = parent_rpcs.delete_pull_request_comment if parent_rpcs.respond_to? :delete_pull_request_comment + @delete_pull_request_comment = ::Gapic::Config::Method.new delete_pull_request_comment_config + batch_create_pull_request_comments_config = parent_rpcs.batch_create_pull_request_comments if parent_rpcs.respond_to? :batch_create_pull_request_comments + @batch_create_pull_request_comments = ::Gapic::Config::Method.new batch_create_pull_request_comments_config + resolve_pull_request_comments_config = parent_rpcs.resolve_pull_request_comments if parent_rpcs.respond_to? :resolve_pull_request_comments + @resolve_pull_request_comments = ::Gapic::Config::Method.new resolve_pull_request_comments_config + unresolve_pull_request_comments_config = parent_rpcs.unresolve_pull_request_comments if parent_rpcs.respond_to? :unresolve_pull_request_comments + @unresolve_pull_request_comments = ::Gapic::Config::Method.new unresolve_pull_request_comments_config + create_issue_comment_config = parent_rpcs.create_issue_comment if parent_rpcs.respond_to? :create_issue_comment + @create_issue_comment = ::Gapic::Config::Method.new create_issue_comment_config + get_issue_comment_config = parent_rpcs.get_issue_comment if parent_rpcs.respond_to? :get_issue_comment + @get_issue_comment = ::Gapic::Config::Method.new get_issue_comment_config + list_issue_comments_config = parent_rpcs.list_issue_comments if parent_rpcs.respond_to? :list_issue_comments + @list_issue_comments = ::Gapic::Config::Method.new list_issue_comments_config + update_issue_comment_config = parent_rpcs.update_issue_comment if parent_rpcs.respond_to? :update_issue_comment + @update_issue_comment = ::Gapic::Config::Method.new update_issue_comment_config + delete_issue_comment_config = parent_rpcs.delete_issue_comment if parent_rpcs.respond_to? :delete_issue_comment + @delete_issue_comment = ::Gapic::Config::Method.new delete_issue_comment_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb new file mode 100644 index 000000000000..b4d307413f79 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module SecureSourceManager + module V1 + module SecureSourceManager + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securesourcemanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SecureSourceManager Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SecureSourceManager Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securesourcemanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb new file mode 100644 index 000000000000..f85cddd65669 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb @@ -0,0 +1,3278 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" + +module Google + module Cloud + module SecureSourceManager + module V1 + module SecureSourceManager + module Rest + ## + # REST service stub for the SecureSourceManager service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_instances REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse] + # A result object deserialized from the server's reply + def list_instances request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_instances", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_instance REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Instance] + # A result object deserialized from the server's reply + def get_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::Instance.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_instance REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_repositories REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse] + # A result object deserialized from the server's reply + def list_repositories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_repositories_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_repositories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Repository] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Repository] + # A result object deserialized from the server's reply + def get_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::Repository.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_repository request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_repository_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_repository", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_hooks REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListHooksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListHooksResponse] + # A result object deserialized from the server's reply + def list_hooks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_hooks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_hooks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetHookRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Hook] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Hook] + # A result object deserialized from the server's reply + def get_hook request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_hook_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_hook", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::Hook.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_hook request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_hook_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_hook", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_hook request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_hook_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_hook", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_hook request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_hook_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_hook", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy_repo REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy_repo request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_repo_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy_repo", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy_repo REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy_repo request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_repo_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy_repo", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions_repo REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions_repo request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_repo_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions_repo", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_branch_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_branch_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_branch_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_branch_rules REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse] + # A result object deserialized from the server's reply + def list_branch_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_branch_rules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_branch_rules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # A result object deserialized from the server's reply + def get_branch_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_branch_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_branch_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::BranchRule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_branch_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_branch_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_branch_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_branch_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_branch_rule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_branch_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_pull_request_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # A result object deserialized from the server's reply + def get_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_pull_request_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::PullRequest.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_pull_requests REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse] + # A result object deserialized from the server's reply + def list_pull_requests request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_pull_requests_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_pull_requests", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_pull_request_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the merge_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def merge_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_merge_pull_request_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "merge_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the open_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def open_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_open_pull_request_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "open_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the close_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def close_pull_request request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_close_pull_request_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "close_pull_request", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_pull_request_file_diffs REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse] + # A result object deserialized from the server's reply + def list_pull_request_file_diffs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_pull_request_file_diffs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_pull_request_file_diffs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_tree REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse] + # A result object deserialized from the server's reply + def fetch_tree request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_tree_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_tree", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_blob REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] + # A result object deserialized from the server's reply + def fetch_blob request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_blob_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_blob", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_issue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Issue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::Issue] + # A result object deserialized from the server's reply + def get_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_issue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::Issue.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_issues REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse] + # A result object deserialized from the server's reply + def list_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_issues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_issue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_issue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the open_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def open_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_open_issue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "open_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the close_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def close_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_close_issue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "close_issue", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # A result object deserialized from the server's reply + def get_pull_request_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_pull_request_comment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_pull_request_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::PullRequestComment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse] + # A result object deserialized from the server's reply + def list_pull_request_comments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_pull_request_comments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_pull_request_comments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_pull_request_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_pull_request_comment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_pull_request_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_pull_request_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_pull_request_comment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_pull_request_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_pull_request_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_pull_request_comment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_pull_request_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_create_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_create_pull_request_comments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_pull_request_comments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_create_pull_request_comments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the resolve_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def resolve_pull_request_comments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_resolve_pull_request_comments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "resolve_pull_request_comments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the unresolve_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def unresolve_pull_request_comments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_unresolve_pull_request_comments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "unresolve_pull_request_comments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_issue_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_issue_comment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_issue_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # A result object deserialized from the server's reply + def get_issue_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_issue_comment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_issue_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::IssueComment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_issue_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse] + # A result object deserialized from the server's reply + def list_issue_comments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_issue_comments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_issue_comments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_issue_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_issue_comment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_issue_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_issue_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_issue_comment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_issue_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_instances REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_instances_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/instances", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_instance REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/instances", + body: "instance", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_repositories REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_repositories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/repositories", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/repositories", + body: "repository", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{repository.name}", + body: "repository", + matches: [ + ["repository.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_repository REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_hooks REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_hooks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/hooks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetHookRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_hook_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_hook_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/hooks", + body: "hook", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_hook_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{hook.name}", + body: "hook", + matches: [ + ["hook.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_hook REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_hook_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy_repo REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_repo_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy_repo REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_repo_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions_repo REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_repo_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_branch_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/branchRules", + body: "branch_rule", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_branch_rules REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_branch_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/branchRules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_branch_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_branch_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{branch_rule.name}", + body: "branch_rule", + matches: [ + ["branch_rule.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_branch_rule REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_branch_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/pullRequests", + body: "pull_request", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_pull_requests REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_pull_requests_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/pullRequests", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{pull_request.name}", + body: "pull_request", + matches: [ + ["pull_request.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the merge_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_merge_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:merge", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the open_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_open_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:open", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the close_pull_request REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_close_pull_request_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:close", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_pull_request_file_diffs REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_pull_request_file_diffs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:listFileDiffs", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_tree REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_tree_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{repository}:fetchTree", + matches: [ + ["repository", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_blob REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_blob_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{repository}:fetchBlob", + matches: [ + ["repository", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/issues", + body: "issue", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_issues REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/issues", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{issue.name}", + body: "issue", + matches: [ + ["issue.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the open_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_open_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:open", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the close_issue REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_close_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:close", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_pull_request_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_pull_request_comments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/pullRequestComments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_pull_request_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/pullRequestComments", + body: "pull_request_comment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_pull_request_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{pull_request_comment.name}", + body: "pull_request_comment", + matches: [ + ["pull_request_comment.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_pull_request_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_pull_request_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_create_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_create_pull_request_comments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/pullRequestComments:batchCreate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the resolve_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_resolve_pull_request_comments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/pullRequestComments:resolve", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the unresolve_pull_request_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_unresolve_pull_request_comments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/pullRequestComments:unresolve", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_issue_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/issueComments", + body: "issue_comment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_issue_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_issue_comments REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_issue_comments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/issueComments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_issue_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{issue_comment.name}", + body: "issue_comment", + matches: [ + ["issue_comment.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_issue_comment REST call + # + # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_issue_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb new file mode 100644 index 000000000000..aa5823b1716e --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecureSourceManager + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb new file mode 100644 index 000000000000..2728b0fc9add --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securesourcemanager/v1/secure_source_manager.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n?google/cloud/securesourcemanager/v1/secure_source_manager.proto\x12#google.cloud.securesourcemanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xed\r\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12N\n\x06labels\x18\x04 \x03(\x0b\x32\x39.google.cloud.securesourcemanager.v1.Instance.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x0eprivate_config\x18\r \x01(\x0b\x32;.google.cloud.securesourcemanager.v1.Instance.PrivateConfigB\x03\xe0\x41\x01\x12G\n\x05state\x18\x05 \x01(\x0e\x32\x33.google.cloud.securesourcemanager.v1.Instance.StateB\x03\xe0\x41\x03\x12P\n\nstate_note\x18\n \x01(\x0e\x32\x37.google.cloud.securesourcemanager.v1.Instance.StateNoteB\x03\xe0\x41\x03\x12:\n\x07kms_key\x18\x0b \x01(\tB)\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12R\n\x0bhost_config\x18\t \x01(\x0b\x32\x38.google.cloud.securesourcemanager.v1.Instance.HostConfigB\x03\xe0\x41\x03\x12\x82\x01\n$workforce_identity_federation_config\x18\x0e \x01(\x0b\x32O.google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfigB\x03\xe0\x41\x01\x1a^\n\nHostConfig\x12\x11\n\x04html\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08git_http\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07git_ssh\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\x85\x04\n\rPrivateConfig\x12\x1a\n\nis_private\x18\x01 \x01(\x08\x42\x06\xe0\x41\x05\xe0\x41\x02\x12;\n\x07\x63\x61_pool\x18\x02 \x01(\tB*\xe0\x41\x05\xe0\x41\x01\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12Q\n\x17http_service_attachment\x18\x03 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(compute.googleapis.com/ServiceAttachment\x12P\n\x16ssh_service_attachment\x18\x04 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(compute.googleapis.com/ServiceAttachment\x12!\n\x14psc_allowed_projects\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12m\n\x12\x63ustom_host_config\x18\x07 \x01(\x0b\x32L.google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfigB\x03\xe0\x41\x01\x1a\x64\n\x10\x43ustomHostConfig\x12\x11\n\x04html\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07git_ssh\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08git_http\x18\x04 \x01(\tB\x03\xe0\x41\x02\x1a<\n!WorkforceIdentityFederationConfig\x12\x17\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x06\xe0\x41\x05\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\n\n\x06PAUSED\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x06\"_\n\tStateNote\x12\x1a\n\x16STATE_NOTE_UNSPECIFIED\x10\x00\x12\x1b\n\x17PAUSED_CMEK_UNAVAILABLE\x10\x01\x12\x19\n\x11INSTANCE_RESUMING\x10\x02\x1a\x02\x08\x01:q\xea\x41n\n+securesourcemanager.googleapis.com/Instance\x12.google.cloud.securesourcemanager.v1.PullRequestComment.ReviewB\x03\xe0\x41\x01H\x00\x12W\n\x07\x63omment\x18\x05 \x01(\x0b\x32?.google.cloud.securesourcemanager.v1.PullRequestComment.CommentB\x03\xe0\x41\x01H\x00\x12Q\n\x04\x63ode\x18\x06 \x01(\x0b\x32<.google.cloud.securesourcemanager.v1.PullRequestComment.CodeB\x03\xe0\x41\x01H\x00\x1a\xff\x01\n\x06Review\x12\x63\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32I.google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionTypeB\x03\xe0\x41\x02\x12\x11\n\x04\x62ody\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14\x65\x66\x66\x65\x63tive_commit_sha\x18\x04 \x01(\tB\x03\xe0\x41\x03\"Z\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMMENT\x10\x01\x12\x14\n\x10\x43HANGE_REQUESTED\x10\x02\x12\x0c\n\x08\x41PPROVED\x10\x03\x1a\x1c\n\x07\x43omment\x12\x11\n\x04\x62ody\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xe8\x01\n\x04\x43ode\x12\x11\n\x04\x62ody\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x05reply\x18\x02 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x04\x12W\n\x08position\x18\x03 \x01(\x0b\x32@.google.cloud.securesourcemanager.v1.PullRequestComment.PositionB\x03\xe0\x41\x01\x12#\n\x16\x65\x66\x66\x65\x63tive_root_comment\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08resolved\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12!\n\x14\x65\x66\x66\x65\x63tive_commit_sha\x18\x07 \x01(\tB\x03\xe0\x41\x03\x1a\x30\n\x08Position\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02:\xb8\x01\xea\x41\xb4\x01\n5securesourcemanager.googleapis.com/PullRequestComment\x12{projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}B\x10\n\x0e\x63omment_detail\"\xb8\x01\n\x14ListInstancesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+securesourcemanager.googleapis.com/Instance\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x15ListInstancesResponse\x12@\n\tinstances\x18\x01 \x03(\x0b\x32-.google.cloud.securesourcemanager.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"W\n\x12GetInstanceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\"\xdd\x01\n\x15\x43reateInstanceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+securesourcemanager.googleapis.com/Instance\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x08instance\x18\x03 \x01(\x0b\x32-.google.cloud.securesourcemanager.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x8f\x01\n\x15\x44\x65leteInstanceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xed\x01\n\x17ListRepositoriesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x08instance\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\"z\n\x18ListRepositoriesResponse\x12\x45\n\x0crepositories\x18\x01 \x03(\x0b\x32/.google.cloud.securesourcemanager.v1.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"[\n\x14GetRepositoryRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\"\xc6\x01\n\x17\x43reateRepositoryRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/Repository\x12H\n\nrepository\x18\x02 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rrepository_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb5\x01\n\x17UpdateRepositoryRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12H\n\nrepository\x18\x02 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"z\n\x17\x44\x65leteRepositoryRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x1a\n\rallow_missing\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x10ListHooksRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'securesourcemanager.googleapis.com/Hook\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"f\n\x11ListHooksResponse\x12\x38\n\x05hooks\x18\x01 \x03(\x0b\x32).google.cloud.securesourcemanager.v1.Hook\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x0eGetHookRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'securesourcemanager.googleapis.com/Hook\"\xae\x01\n\x11\x43reateHookRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12<\n\x04hook\x18\x02 \x01(\x0b\x32).google.cloud.securesourcemanager.v1.HookB\x03\xe0\x41\x02\x12\x14\n\x07hook_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x87\x01\n\x11UpdateHookRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12<\n\x04hook\x18\x02 \x01(\x0b\x32).google.cloud.securesourcemanager.v1.HookB\x03\xe0\x41\x02\"R\n\x11\x44\x65leteHookRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'securesourcemanager.googleapis.com/Hook\"[\n\x14GetBranchRuleRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/BranchRule\"\xc8\x01\n\x17\x43reateBranchRuleRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/BranchRule\x12I\n\x0b\x62ranch_rule\x18\x02 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xe0\x41\x02\x12\x1b\n\x0e\x62ranch_rule_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x90\x01\n\x16ListBranchRulesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/BranchRule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"z\n\x17\x44\x65leteBranchRuleRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/BranchRule\x12\x1a\n\rallow_missing\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xb6\x01\n\x17UpdateBranchRuleRequest\x12I\n\x0b\x62ranch_rule\x18\x01 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"y\n\x17ListBranchRulesResponse\x12\x45\n\x0c\x62ranch_rules\x18\x01 \x03(\x0b\x32/.google.cloud.securesourcemanager.v1.BranchRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xae\x01\n\x18\x43reatePullRequestRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12K\n\x0cpull_request\x18\x02 \x01(\x0b\x32\x30.google.cloud.securesourcemanager.v1.PullRequestB\x03\xe0\x41\x02\"]\n\x15GetPullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"\x91\x01\n\x17ListPullRequestsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"|\n\x18ListPullRequestsResponse\x12G\n\rpull_requests\x18\x01 \x03(\x0b\x32\x30.google.cloud.securesourcemanager.v1.PullRequest\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9d\x01\n\x18UpdatePullRequestRequest\x12K\n\x0cpull_request\x18\x01 \x01(\x0b\x32\x30.google.cloud.securesourcemanager.v1.PullRequestB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"_\n\x17MergePullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"^\n\x16OpenPullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"_\n\x17\x43losePullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"\x98\x01\n\x1fListPullRequestFileDiffsRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"~\n ListPullRequestFileDiffsResponse\x12\x41\n\nfile_diffs\x18\x01 \x03(\x0b\x32-.google.cloud.securesourcemanager.v1.FileDiff\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9b\x01\n\x12\x43reateIssueRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12>\n\x05issue\x18\x02 \x01(\x0b\x32*.google.cloud.securesourcemanager.v1.IssueB\x03\xe0\x41\x02\"Q\n\x0fGetIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\"\x9b\x01\n\x11ListIssuesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securesourcemanager.googleapis.com/Issue\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"i\n\x12ListIssuesResponse\x12:\n\x06issues\x18\x01 \x03(\x0b\x32*.google.cloud.securesourcemanager.v1.Issue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8a\x01\n\x12UpdateIssueRequest\x12>\n\x05issue\x18\x01 \x01(\x0b\x32*.google.cloud.securesourcemanager.v1.IssueB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"g\n\x12\x44\x65leteIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"f\n\x11\x43loseIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x10OpenIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xef\x01\n\tTreeEntry\x12L\n\x04type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securesourcemanager.v1.TreeEntry.ObjectTypeB\x03\xe0\x41\x03\x12\x10\n\x03sha\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04mode\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04size\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\"I\n\nObjectType\x12\x1b\n\x17OBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TREE\x10\x01\x12\x08\n\x04\x42LOB\x10\x02\x12\n\n\x06\x43OMMIT\x10\x03\"\xb8\x01\n\x10\x46\x65tchTreeRequest\x12I\n\nrepository\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x10\n\x03ref\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\trecursive\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"r\n\x11\x46\x65tchTreeResponse\x12\x44\n\x0ctree_entries\x18\x01 \x03(\x0b\x32..google.cloud.securesourcemanager.v1.TreeEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"o\n\x10\x46\x65tchBlobRequest\x12I\n\nrepository\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x10\n\x03sha\x18\x02 \x01(\tB\x03\xe0\x41\x02\"1\n\x11\x46\x65tchBlobResponse\x12\x0b\n\x03sha\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\"\xa0\x01\n\x1eListPullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x92\x01\n\x1fListPullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcc\x01\n\x1f\x43reatePullRequestCommentRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12Z\n\x14pull_request_comment\x18\x02 \x01(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xe0\x41\x02\"\xd3\x01\n%BatchCreatePullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12[\n\x08requests\x18\x02 \x03(\x0b\x32\x44.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequestB\x03\xe0\x41\x02\"\x80\x01\n&BatchCreatePullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"\xb3\x01\n\x1fUpdatePullRequestCommentRequest\x12Z\n\x14pull_request_comment\x18\x01 \x01(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"n\n\x1f\x44\x65letePullRequestCommentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\"k\n\x1cGetPullRequestCommentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\"\xd8\x01\n!ResolvePullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12L\n\x05names\x18\x02 \x03(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\n\tauto_fill\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"|\n\"ResolvePullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"\xda\x01\n#UnresolvePullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12L\n\x05names\x18\x02 \x03(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\n\tauto_fill\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"~\n$UnresolvePullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"\xac\x01\n\x19\x43reateIssueCommentRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12M\n\rissue_comment\x18\x02 \x01(\x0b\x32\x31.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xe0\x41\x02\"_\n\x16GetIssueCommentRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/securesourcemanager.googleapis.com/IssueComment\"\x94\x01\n\x18ListIssueCommentsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/securesourcemanager.googleapis.com/IssueComment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x19ListIssueCommentsResponse\x12I\n\x0eissue_comments\x18\x01 \x03(\x0b\x32\x31.google.cloud.securesourcemanager.v1.IssueComment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa0\x01\n\x19UpdateIssueCommentRequest\x12M\n\rissue_comment\x18\x01 \x01(\x0b\x32\x31.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"b\n\x19\x44\x65leteIssueCommentRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/securesourcemanager.googleapis.com/IssueComment2\xfe\x64\n\x13SecureSourceManager\x12\xc6\x01\n\rListInstances\x12\x39.google.cloud.securesourcemanager.v1.ListInstancesRequest\x1a:.google.cloud.securesourcemanager.v1.ListInstancesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xb3\x01\n\x0bGetInstance\x12\x37.google.cloud.securesourcemanager.v1.GetInstanceRequest\x1a-.google.cloud.securesourcemanager.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xea\x01\n\x0e\x43reateInstance\x12:.google.cloud.securesourcemanager.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xd6\x01\n\x0e\x44\x65leteInstance\x12:.google.cloud.securesourcemanager.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xd2\x01\n\x10ListRepositories\x12<.google.cloud.securesourcemanager.v1.ListRepositoriesRequest\x1a=.google.cloud.securesourcemanager.v1.ListRepositoriesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/repositories\x12\xbc\x01\n\rGetRepository\x12\x39.google.cloud.securesourcemanager.v1.GetRepositoryRequest\x1a/.google.cloud.securesourcemanager.v1.Repository\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/repositories/*}\x12\xfa\x01\n\x10\x43reateRepository\x12<.google.cloud.securesourcemanager.v1.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41\x1f\n\nRepository\x12\x11OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xfc\x01\n\x10UpdateRepository\x12<.google.cloud.securesourcemanager.v1.UpdateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nRepository\x12\x11OperationMetadata\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\xdd\x01\n\x10\x44\x65leteRepository\x12<.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xc5\x01\n\tListHooks\x12\x35.google.cloud.securesourcemanager.v1.ListHooksRequest\x1a\x36.google.cloud.securesourcemanager.v1.ListHooksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/repositories/*}/hooks\x12\xb2\x01\n\x07GetHook\x12\x33.google.cloud.securesourcemanager.v1.GetHookRequest\x1a).google.cloud.securesourcemanager.v1.Hook\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xdd\x01\n\nCreateHook\x12\x36.google.cloud.securesourcemanager.v1.CreateHookRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x19\n\x04Hook\x12\x11OperationMetadata\xda\x41\x13parent,hook,hook_id\x82\xd3\xe4\x93\x02@\"8/v1/{parent=projects/*/locations/*/repositories/*}/hooks:\x04hook\x12\xdf\x01\n\nUpdateHook\x12\x36.google.cloud.securesourcemanager.v1.UpdateHookRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x19\n\x04Hook\x12\x11OperationMetadata\xda\x41\x10hook,update_mask\x82\xd3\xe4\x93\x02\x45\x32=/v1/{hook.name=projects/*/locations/*/repositories/*/hooks/*}:\x04hook\x12\xd9\x01\n\nDeleteHook\x12\x36.google.cloud.securesourcemanager.v1.DeleteHookRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xa3\x01\n\x10GetIamPolicyRepo\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"T\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xa6\x01\n\x10SetIamPolicyRepo\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"W\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\xcc\x01\n\x16TestIamPermissionsRepo\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x08resource\x82\xd3\xe4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\x8b\x02\n\x10\x43reateBranchRule\x12<.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"\x99\x01\xca\x41\x1f\n\nBranchRule\x12\x11OperationMetadata\xda\x41!parent,branch_rule,branch_rule_id\x82\xd3\xe4\x93\x02M\">/v1/{parent=projects/*/locations/*/repositories/*}/branchRules:\x0b\x62ranch_rule\x12\xdd\x01\n\x0fListBranchRules\x12;.google.cloud.securesourcemanager.v1.ListBranchRulesRequest\x1a<.google.cloud.securesourcemanager.v1.ListBranchRulesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/branchRules\x12\xca\x01\n\rGetBranchRule\x12\x39.google.cloud.securesourcemanager.v1.GetBranchRuleRequest\x1a/.google.cloud.securesourcemanager.v1.BranchRule\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\x8d\x02\n\x10UpdateBranchRule\x12<.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nBranchRule\x12\x11OperationMetadata\xda\x41\x17\x62ranch_rule,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{branch_rule.name=projects/*/locations/*/repositories/*/branchRules/*}:\x0b\x62ranch_rule\x12\xeb\x01\n\x10\x44\x65leteBranchRule\x12<.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\xa6\x02\n\x11\x43reatePullRequest\x12=.google.cloud.securesourcemanager.v1.CreatePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x13parent,pull_request\x82\xd3\xe4\x93\x02O\"?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests:\x0cpull_request\x12\xce\x01\n\x0eGetPullRequest\x12:.google.cloud.securesourcemanager.v1.GetPullRequestRequest\x1a\x30.google.cloud.securesourcemanager.v1.PullRequest\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}\x12\xe1\x01\n\x10ListPullRequests\x12<.google.cloud.securesourcemanager.v1.ListPullRequestsRequest\x1a=.google.cloud.securesourcemanager.v1.ListPullRequestsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests\x12\xb8\x02\n\x11UpdatePullRequest\x12=.google.cloud.securesourcemanager.v1.UpdatePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x18pull_request,update_mask\x82\xd3\xe4\x93\x02\\2L/v1/{pull_request.name=projects/*/locations/*/repositories/*/pullRequests/*}:\x0cpull_request\x12\x90\x02\n\x10MergePullRequest\x12<.google.cloud.securesourcemanager.v1.MergePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:merge:\x01*\x12\x8d\x02\n\x0fOpenPullRequest\x12;.google.cloud.securesourcemanager.v1.OpenPullRequestRequest\x1a\x1d.google.longrunning.Operation\"\x9d\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02I\"D/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:open:\x01*\x12\x90\x02\n\x10\x43losePullRequest\x12<.google.cloud.securesourcemanager.v1.ClosePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:close:\x01*\x12\x85\x02\n\x18ListPullRequestFileDiffs\x12\x44.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest\x1a\x45.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\x12M/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:listFileDiffs\x12\xc4\x01\n\tFetchTree\x12\x35.google.cloud.securesourcemanager.v1.FetchTreeRequest\x1a\x36.google.cloud.securesourcemanager.v1.FetchTreeResponse\"H\x82\xd3\xe4\x93\x02\x42\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchTree\x12\xc4\x01\n\tFetchBlob\x12\x35.google.cloud.securesourcemanager.v1.FetchBlobRequest\x1a\x36.google.cloud.securesourcemanager.v1.FetchBlobResponse\"H\x82\xd3\xe4\x93\x02\x42\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchBlob\x12\x80\x02\n\x0b\x43reateIssue\x12\x37.google.cloud.securesourcemanager.v1.CreateIssueRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x0cparent,issue\x82\xd3\xe4\x93\x02\x42\"9/v1/{parent=projects/*/locations/*/repositories/*}/issues:\x05issue\x12\xb6\x01\n\x08GetIssue\x12\x34.google.cloud.securesourcemanager.v1.GetIssueRequest\x1a*.google.cloud.securesourcemanager.v1.Issue\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xc9\x01\n\nListIssues\x12\x36.google.cloud.securesourcemanager.v1.ListIssuesRequest\x1a\x37.google.cloud.securesourcemanager.v1.ListIssuesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/repositories/*}/issues\x12\x8b\x02\n\x0bUpdateIssue\x12\x37.google.cloud.securesourcemanager.v1.UpdateIssueRequest\x1a\x1d.google.longrunning.Operation\"\xa3\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x11issue,update_mask\x82\xd3\xe4\x93\x02H2?/v1/{issue.name=projects/*/locations/*/repositories/*/issues/*}:\x05issue\x12\xdc\x01\n\x0b\x44\x65leteIssue\x12\x37.google.cloud.securesourcemanager.v1.DeleteIssueRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xf5\x01\n\tOpenIssue\x12\x35.google.cloud.securesourcemanager.v1.OpenIssueRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\">/v1/{name=projects/*/locations/*/repositories/*/issues/*}:open:\x01*\x12\xf8\x01\n\nCloseIssue\x12\x36.google.cloud.securesourcemanager.v1.CloseIssueRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\"?/v1/{name=projects/*/locations/*/repositories/*/issues/*}:close:\x01*\x12\xf9\x01\n\x15GetPullRequestComment\x12\x41.google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest\x1a\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"d\xda\x41\x04name\x82\xd3\xe4\x93\x02W\x12U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\x8c\x02\n\x17ListPullRequestComments\x12\x43.google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest\x1a\x44.google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse\"f\xda\x41\x06parent\x82\xd3\xe4\x93\x02W\x12U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments\x12\xe1\x02\n\x18\x43reatePullRequestComment\x12\x44.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41K\n6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xda\x41\x1bparent,pull_request_comment\x82\xd3\xe4\x93\x02m\"U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:\x14pull_request_comment\x12\xfc\x02\n\x18UpdatePullRequestComment\x12\x44.google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest\x1a\x1d.google.longrunning.Operation\"\xfa\x01\xca\x41K\n6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xda\x41 pull_request_comment,update_mask\x82\xd3\xe4\x93\x02\x82\x01\x32j/v1/{pull_request_comment.name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}:\x14pull_request_comment\x12\x93\x02\n\x18\x44\x65letePullRequestComment\x12\x44.google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02W*U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\xca\x02\n\x1e\x42\x61tchCreatePullRequestComments\x12J.google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest\x1a\x1d.google.longrunning.Operation\"\xbc\x01\xca\x41;\n&BatchCreatePullRequestCommentsResponse\x12\x11OperationMetadata\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x66\"a/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:batchCreate:\x01*\x12\xb7\x02\n\x1aResolvePullRequestComments\x12\x46.google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41\x37\n\"ResolvePullRequestCommentsResponse\x12\x11OperationMetadata\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02\x62\"]/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:resolve:\x01*\x12\xbf\x02\n\x1cUnresolvePullRequestComments\x12H.google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\x39\n$UnresolvePullRequestCommentsResponse\x12\x11OperationMetadata\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02\x64\"_/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:unresolve:\x01*\x12\xb5\x02\n\x12\x43reateIssueComment\x12>.google.cloud.securesourcemanager.v1.CreateIssueCommentRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x45\n0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xda\x41\x14parent,issue_comment\x82\xd3\xe4\x93\x02Z\"I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments:\rissue_comment\x12\xdb\x01\n\x0fGetIssueComment\x12;.google.cloud.securesourcemanager.v1.GetIssueCommentRequest\x1a\x31.google.cloud.securesourcemanager.v1.IssueComment\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x12\xee\x01\n\x11ListIssueComments\x12=.google.cloud.securesourcemanager.v1.ListIssueCommentsRequest\x1a>.google.cloud.securesourcemanager.v1.ListIssueCommentsResponse\"Z\xda\x41\x06parent\x82\xd3\xe4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments\x12\xc8\x02\n\x12UpdateIssueComment\x12>.google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest\x1a\x1d.google.longrunning.Operation\"\xd2\x01\xca\x41\x45\n0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xda\x41\x19issue_comment,update_mask\x82\xd3\xe4\x93\x02h2W/v1/{issue_comment.name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}:\rissue_comment\x12\xfb\x01\n\x12\x44\x65leteIssueComment\x12>.google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02K*I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x1aV\xca\x41\"securesourcemanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb9\x06\n\'com.google.cloud.securesourcemanager.v1B\x18SecureSourceManagerProtoP\x01ZYcloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb;securesourcemanagerpb\xaa\x02#Google.Cloud.SecureSourceManager.V1\xca\x02#Google\\Cloud\\SecureSourceManager\\V1\xea\x02&Google::Cloud::SecureSourceManager::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}\xea\x41q\n\"dlp.googleapis.com/InspectTemplate\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecureSourceManager + module V1 + Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance").msgclass + Instance::HostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.HostConfig").msgclass + Instance::PrivateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.PrivateConfig").msgclass + Instance::PrivateConfig::CustomHostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig").msgclass + Instance::WorkforceIdentityFederationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig").msgclass + Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.State").enummodule + Instance::StateNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.StateNote").enummodule + Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository").msgclass + Repository::URIs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository.URIs").msgclass + Repository::InitialConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository.InitialConfig").msgclass + Repository::ScanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository.ScanConfig").msgclass + Repository::ScanConfig::SecretScanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository.ScanConfig.SecretScanConfig").msgclass + Hook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Hook").msgclass + Hook::PushOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Hook.PushOption").msgclass + Hook::HookEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Hook.HookEventType").enummodule + BranchRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BranchRule").msgclass + BranchRule::Check = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BranchRule.Check").msgclass + PullRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequest").msgclass + PullRequest::Branch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequest.Branch").msgclass + PullRequest::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequest.State").enummodule + FileDiff = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FileDiff").msgclass + FileDiff::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FileDiff.Action").enummodule + Issue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Issue").msgclass + Issue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Issue.State").enummodule + IssueComment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.IssueComment").msgclass + PullRequestComment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment").msgclass + PullRequestComment::Review = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Review").msgclass + PullRequestComment::Review::ActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType").enummodule + PullRequestComment::Comment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Comment").msgclass + PullRequestComment::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Code").msgclass + PullRequestComment::Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Position").msgclass + ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListInstancesRequest").msgclass + ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListInstancesResponse").msgclass + GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetInstanceRequest").msgclass + CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateInstanceRequest").msgclass + DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteInstanceRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.OperationMetadata").msgclass + ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListRepositoriesRequest").msgclass + ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListRepositoriesResponse").msgclass + GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetRepositoryRequest").msgclass + CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateRepositoryRequest").msgclass + UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateRepositoryRequest").msgclass + DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteRepositoryRequest").msgclass + ListHooksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListHooksRequest").msgclass + ListHooksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListHooksResponse").msgclass + GetHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetHookRequest").msgclass + CreateHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateHookRequest").msgclass + UpdateHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateHookRequest").msgclass + DeleteHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteHookRequest").msgclass + GetBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetBranchRuleRequest").msgclass + CreateBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateBranchRuleRequest").msgclass + ListBranchRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListBranchRulesRequest").msgclass + DeleteBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest").msgclass + UpdateBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest").msgclass + ListBranchRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListBranchRulesResponse").msgclass + CreatePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreatePullRequestRequest").msgclass + GetPullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetPullRequestRequest").msgclass + ListPullRequestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestsRequest").msgclass + ListPullRequestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestsResponse").msgclass + UpdatePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdatePullRequestRequest").msgclass + MergePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.MergePullRequestRequest").msgclass + OpenPullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.OpenPullRequestRequest").msgclass + ClosePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ClosePullRequestRequest").msgclass + ListPullRequestFileDiffsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest").msgclass + ListPullRequestFileDiffsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse").msgclass + CreateIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateIssueRequest").msgclass + GetIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetIssueRequest").msgclass + ListIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssuesRequest").msgclass + ListIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssuesResponse").msgclass + UpdateIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateIssueRequest").msgclass + DeleteIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteIssueRequest").msgclass + CloseIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CloseIssueRequest").msgclass + OpenIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.OpenIssueRequest").msgclass + TreeEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.TreeEntry").msgclass + TreeEntry::ObjectType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.TreeEntry.ObjectType").enummodule + FetchTreeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchTreeRequest").msgclass + FetchTreeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchTreeResponse").msgclass + FetchBlobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchBlobRequest").msgclass + FetchBlobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchBlobResponse").msgclass + ListPullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest").msgclass + ListPullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse").msgclass + CreatePullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest").msgclass + BatchCreatePullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest").msgclass + BatchCreatePullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsResponse").msgclass + UpdatePullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest").msgclass + DeletePullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest").msgclass + GetPullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest").msgclass + ResolvePullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest").msgclass + ResolvePullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsResponse").msgclass + UnresolvePullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest").msgclass + UnresolvePullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsResponse").msgclass + CreateIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateIssueCommentRequest").msgclass + GetIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetIssueCommentRequest").msgclass + ListIssueCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssueCommentsRequest").msgclass + ListIssueCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssueCommentsResponse").msgclass + UpdateIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest").msgclass + DeleteIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb new file mode 100644 index 000000000000..cea486da7706 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb @@ -0,0 +1,170 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/securesourcemanager/v1/secure_source_manager.proto for package 'Google.Cloud.SecureSourceManager.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/securesourcemanager/v1/secure_source_manager_pb' + +module Google + module Cloud + module SecureSourceManager + module V1 + module SecureSourceManager + # Secure Source Manager API + # + # Access Secure Source Manager instances, resources, and repositories. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.securesourcemanager.v1.SecureSourceManager' + + # Lists Instances in a given project and location. + rpc :ListInstances, ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest, ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse + # Gets details of a single instance. + rpc :GetInstance, ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest, ::Google::Cloud::SecureSourceManager::V1::Instance + # Creates a new instance in a given project and location. + rpc :CreateInstance, ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest, ::Google::Longrunning::Operation + # Deletes a single instance. + rpc :DeleteInstance, ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation + # Lists Repositories in a given project and location. + # + # The instance field is required in the query parameter for requests using + # the securesourcemanager.googleapis.com endpoint. + rpc :ListRepositories, ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest, ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse + # Gets metadata of a repository. + rpc :GetRepository, ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest, ::Google::Cloud::SecureSourceManager::V1::Repository + # Creates a new repository in a given project and location. + # + # The Repository.Instance field is required in the request body for requests + # using the securesourcemanager.googleapis.com endpoint. + rpc :CreateRepository, ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest, ::Google::Longrunning::Operation + # Updates the metadata of a repository. + rpc :UpdateRepository, ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, ::Google::Longrunning::Operation + # Deletes a Repository. + rpc :DeleteRepository, ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::Google::Longrunning::Operation + # Lists hooks in a given repository. + rpc :ListHooks, ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse + # Gets metadata of a hook. + rpc :GetHook, ::Google::Cloud::SecureSourceManager::V1::GetHookRequest, ::Google::Cloud::SecureSourceManager::V1::Hook + # Creates a new hook in a given repository. + rpc :CreateHook, ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, ::Google::Longrunning::Operation + # Updates the metadata of a hook. + rpc :UpdateHook, ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, ::Google::Longrunning::Operation + # Deletes a Hook. + rpc :DeleteHook, ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, ::Google::Longrunning::Operation + # Get IAM policy for a repository. + rpc :GetIamPolicyRepo, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Set IAM policy on a repository. + rpc :SetIamPolicyRepo, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Test IAM permissions on a repository. + # IAM permission checks are not required on this method. + rpc :TestIamPermissionsRepo, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # CreateBranchRule creates a branch rule in a given repository. + rpc :CreateBranchRule, ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::Google::Longrunning::Operation + # ListBranchRules lists branch rules in a given repository. + rpc :ListBranchRules, ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse + # GetBranchRule gets a branch rule. + rpc :GetBranchRule, ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::Google::Cloud::SecureSourceManager::V1::BranchRule + # UpdateBranchRule updates a branch rule. + rpc :UpdateBranchRule, ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Google::Longrunning::Operation + # DeleteBranchRule deletes a branch rule. + rpc :DeleteBranchRule, ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Google::Longrunning::Operation + # Creates a pull request. + rpc :CreatePullRequest, ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, ::Google::Longrunning::Operation + # Gets a pull request. + rpc :GetPullRequest, ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, ::Google::Cloud::SecureSourceManager::V1::PullRequest + # Lists pull requests in a repository. + rpc :ListPullRequests, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse + # Updates a pull request. + rpc :UpdatePullRequest, ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, ::Google::Longrunning::Operation + # Merges a pull request. + rpc :MergePullRequest, ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, ::Google::Longrunning::Operation + # Opens a pull request. + rpc :OpenPullRequest, ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, ::Google::Longrunning::Operation + # Closes a pull request without merging. + rpc :ClosePullRequest, ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, ::Google::Longrunning::Operation + # Lists a pull request's file diffs. + rpc :ListPullRequestFileDiffs, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse + # Fetches a tree from a repository. + rpc :FetchTree, ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse + # Fetches a blob from a repository. + rpc :FetchBlob, ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse + # Creates an issue. + rpc :CreateIssue, ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, ::Google::Longrunning::Operation + # Gets an issue. + rpc :GetIssue, ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, ::Google::Cloud::SecureSourceManager::V1::Issue + # Lists issues in a repository. + rpc :ListIssues, ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse + # Updates a issue. + rpc :UpdateIssue, ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, ::Google::Longrunning::Operation + # Deletes an issue. + rpc :DeleteIssue, ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, ::Google::Longrunning::Operation + # Opens an issue. + rpc :OpenIssue, ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, ::Google::Longrunning::Operation + # Closes an issue. + rpc :CloseIssue, ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, ::Google::Longrunning::Operation + # Gets a pull request comment. + rpc :GetPullRequestComment, ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::Google::Cloud::SecureSourceManager::V1::PullRequestComment + # Lists pull request comments. + rpc :ListPullRequestComments, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse + # Creates a pull request comment. This function is used to create a single + # PullRequestComment of type Comment, or a single PullRequestComment of type + # Code that's replying to another PullRequestComment of type Code. Use + # BatchCreatePullRequestComments to create multiple PullRequestComments for + # code reviews. + rpc :CreatePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Google::Longrunning::Operation + # Updates a pull request comment. + rpc :UpdatePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::Google::Longrunning::Operation + # Deletes a pull request comment. + rpc :DeletePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::Google::Longrunning::Operation + # Batch creates pull request comments. This function is used to create + # multiple PullRequestComments for code review. There needs to be exactly one + # PullRequestComment of type Review, and at most 100 PullRequestComments of + # type Code per request. The Position of the code comments must be unique + # within the request. + rpc :BatchCreatePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Google::Longrunning::Operation + # Resolves pull request comments. A list of PullRequestComment names must be + # provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be resolved. + rpc :ResolvePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::Google::Longrunning::Operation + # Unresolves pull request comments. A list of PullRequestComment names must + # be provided. The PullRequestComment names must be in the same conversation + # thread. If auto_fill is set, all comments in the conversation thread will + # be unresolved. + rpc :UnresolvePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::Google::Longrunning::Operation + # Creates an issue comment. + rpc :CreateIssueComment, ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::Google::Longrunning::Operation + # Gets an issue comment. + rpc :GetIssueComment, ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::Google::Cloud::SecureSourceManager::V1::IssueComment + # Lists comments in an issue. + rpc :ListIssueComments, ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse + # Updates an issue comment. + rpc :UpdateIssueComment, ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::Google::Longrunning::Operation + # Deletes an issue comment. + rpc :DeleteIssueComment, ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/README.md new file mode 100644 index 000000000000..993b0230a7dc --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Secure Source Manager V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb new file mode 100644 index 000000000000..b120f62bbaae --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb @@ -0,0 +1,1857 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # A resource that represents a Secure Source Manager instance. + # @!attribute [rw] name + # @return [::String] + # Identifier. A unique identifier for an instance. The name should be of the + # format: + # `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + # + # `project_number`: Maps to a unique int64 id assigned to each project. + # + # `location_id`: Refers to the region where the instance will be deployed. + # Since Secure Source Manager is a regional service, it must be one of the + # valid GCP regions. + # + # `instance_id`: User provided name for the instance, must be unique for a + # project_number and location_id combination. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update timestamp. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels as key value pairs. + # Keys and values can contain only lowercase letters, numeric characters, + # underscores, and dashes. + # For more information, see [Requirements for + # labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). + # @!attribute [rw] private_config + # @return [::Google::Cloud::SecureSourceManager::V1::Instance::PrivateConfig] + # Optional. Private settings for private instance. + # @!attribute [r] state + # @return [::Google::Cloud::SecureSourceManager::V1::Instance::State] + # Output only. Current state of the instance. + # @!attribute [r] state_note + # @return [::Google::Cloud::SecureSourceManager::V1::Instance::StateNote] + # Output only. An optional field providing information about the current + # instance state. + # @!attribute [rw] kms_key + # @return [::String] + # Optional. Immutable. Customer-managed encryption key name, in the format + # projects/*/locations/*/keyRings/*/cryptoKeys/*. + # @!attribute [r] host_config + # @return [::Google::Cloud::SecureSourceManager::V1::Instance::HostConfig] + # Output only. A list of hostnames for this instance. + # @!attribute [rw] workforce_identity_federation_config + # @return [::Google::Cloud::SecureSourceManager::V1::Instance::WorkforceIdentityFederationConfig] + # Optional. Configuration for Workforce Identity Federation to support + # third party identity provider. If unset, defaults to the Google OIDC IdP. + class Instance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # HostConfig has different instance endpoints. + # @!attribute [r] html + # @return [::String] + # Output only. HTML hostname. + # @!attribute [r] api + # @return [::String] + # Output only. API hostname. + # @!attribute [r] git_http + # @return [::String] + # Output only. Git HTTP hostname. + # @!attribute [r] git_ssh + # @return [::String] + # Output only. Git SSH hostname. + class HostConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PrivateConfig includes settings for private instance. + # @!attribute [rw] is_private + # @return [::Boolean] + # Required. Immutable. Indicate if it's private instance. + # @!attribute [rw] ca_pool + # @return [::String] + # Optional. Immutable. CA pool resource, resource must in the format of + # `projects/{project}/locations/{location}/caPools/{ca_pool}`. + # @!attribute [r] http_service_attachment + # @return [::String] + # Output only. Service Attachment for HTTP, resource is in the format of + # `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. + # @!attribute [r] ssh_service_attachment + # @return [::String] + # Output only. Service Attachment for SSH, resource is in the format of + # `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. + # @!attribute [rw] psc_allowed_projects + # @return [::Array<::String>] + # Optional. Additional allowed projects for setting up PSC connections. + # Instance host project is automatically allowed and does not need to be + # included in this list. + # @!attribute [rw] custom_host_config + # @return [::Google::Cloud::SecureSourceManager::V1::Instance::PrivateConfig::CustomHostConfig] + # Optional. Custom host config for the instance. + class PrivateConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Custom host config for the instance. + # @!attribute [rw] html + # @return [::String] + # Required. The custom UI hostname for the instance, e.g., + # "git.source.internal.mycompany.com" + # @!attribute [rw] api + # @return [::String] + # Required. The custom API hostname for the instance, e.g., + # "api.source.internal.mycompany.com" + # @!attribute [rw] git_ssh + # @return [::String] + # Required. The custom git ssh hostname for the instance, e.g., + # "ssh.source.internal.mycompany.com" + # @!attribute [rw] git_http + # @return [::String] + # Required. The custom git http hostname for the instance, e.g., + # "git.source.internal.mycompany.com" + class CustomHostConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # WorkforceIdentityFederationConfig allows this instance to support users + # from external identity providers. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Immutable. Whether Workforce Identity Federation is enabled. + class WorkforceIdentityFederationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Secure Source Manager instance state. + module State + # Not set. This should only be the case for incoming requests. + STATE_UNSPECIFIED = 0 + + # Instance is being created. + CREATING = 1 + + # Instance is ready. + ACTIVE = 2 + + # Instance is being deleted. + DELETING = 3 + + # Instance is paused. + PAUSED = 4 + + # Instance is unknown, we are not sure if it's functioning. + UNKNOWN = 6 + end + + # Provides information about the current instance state. + module StateNote + # STATE_NOTE_UNSPECIFIED as the first value of State. + STATE_NOTE_UNSPECIFIED = 0 + + # CMEK access is unavailable. + PAUSED_CMEK_UNAVAILABLE = 1 + + # INSTANCE_RESUMING indicates that the instance was previously paused + # and is under the process of being brought back. + INSTANCE_RESUMING = 2 + end + end + + # Metadata of a Secure Source Manager repository. + # @!attribute [rw] name + # @return [::String] + # Identifier. A unique identifier for a repository. The name should be of the + # format: + # `projects/{project}/locations/{location_id}/repositories/{repository_id}` + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the repository, which cannot exceed 500 + # characters. + # @!attribute [rw] instance + # @return [::String] + # Optional. The name of the instance in which the repository is hosted, + # formatted as + # `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + # When creating repository via securesourcemanager.googleapis.com, this field + # is used as input. When creating repository via *.sourcemanager.dev, this + # field is output only. + # @!attribute [r] uid + # @return [::String] + # Output only. Unique identifier of the repository. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update timestamp. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [r] uris + # @return [::Google::Cloud::SecureSourceManager::V1::Repository::URIs] + # Output only. URIs for the repository. + # @!attribute [rw] initial_config + # @return [::Google::Cloud::SecureSourceManager::V1::Repository::InitialConfig] + # Input only. Initial configurations for the repository. + # @!attribute [rw] service_account + # @return [::String] + # Optional. Repository level service account (BYOSA). + # @!attribute [rw] scan_config + # @return [::Google::Cloud::SecureSourceManager::V1::Repository::ScanConfig] + # Optional. Provides configuration for scanning. + class Repository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # URIs for the repository. + # @!attribute [r] html + # @return [::String] + # Output only. HTML is the URI for user to view the repository in a + # browser. + # @!attribute [r] git_https + # @return [::String] + # Output only. git_https is the git HTTPS URI for git operations. + # @!attribute [r] api + # @return [::String] + # Output only. API is the URI for API access. + class URIs + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Repository initialization configuration. + # @!attribute [rw] default_branch + # @return [::String] + # Default branch name of the repository. + # @!attribute [rw] gitignores + # @return [::Array<::String>] + # List of gitignore template names user can choose from. + # Valid values: actionscript, ada, agda, android, + # anjuta, ansible, appcelerator-titanium, app-engine, archives, + # arch-linux-packages, atmel-studio, autotools, backup, bazaar, bazel, + # bitrix, bricx-cc, c, cake-php, calabash, cf-wheels, chef-cookbook, + # clojure, cloud9, c-make, code-igniter, code-kit, code-sniffer, + # common-lisp, composer, concrete5, coq, cordova, cpp, craft-cms, cuda, + # cvs, d, dart, dart-editor, delphi, diff, dm, dreamweaver, dropbox, + # drupal, drupal-7, eagle, eclipse, eiffel-studio, elisp, elixir, elm, + # emacs, ensime, epi-server, erlang, esp-idf, espresso, exercism, + # expression-engine, ext-js, fancy, finale, flex-builder, force-dot-com, + # fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, godot, gpg, + # gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, images, + # infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, + # jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, + # kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, + # lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, + # logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, + # mercurial, mercury, metals, meta-programming-system, meteor, + # microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, + # nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, + # opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, + # phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, + # psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, + # rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, + # sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, + # slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, + # sugar-crm, svn, swift, symfony, symphony-cms, synopsys-vcs, tags, + # terraform, tex, text-mate, textpattern, think-php, tortoise-git, + # turbo-gears-2, typo3, umbraco, unity, unreal-engine, vagrant, vim, + # virtual-env, virtuoso, visual-studio, visual-studio-code, vue, vvvv, waf, + # web-methods, windows, word-press, xcode, xilinx, xilinx-ise, xojo, + # yeoman, yii, zend-framework, zephir. + # @!attribute [rw] license + # @return [::String] + # License template name user can choose from. + # Valid values: license-0bsd, license-389-exception, aal, abstyles, + # adobe-2006, adobe-glyph, adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, + # afl-3-0, afmparse, agpl-1-0, agpl-1-0-only, agpl-1-0-or-later, + # agpl-3-0-only, agpl-3-0-or-later, aladdin, amdplpa, aml, ampas, antlr-pd, + # antlr-pd-fallback, apache-1-0, apache-1-1, apache-2-0, apafml, apl-1-0, + # apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, artistic-1-0, artistic-1-0-cl8, + # artistic-1-0-perl, artistic-2-0, autoconf-exception-2-0, + # autoconf-exception-3-0, bahyph, barr, beerware, bison-exception-2-2, + # bittorrent-1-0, bittorrent-1-1, blessing, blueoak-1-0-0, + # bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, + # bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, + # bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, + # bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, + # bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, + # bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, + # bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, + # bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, + # catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, + # cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, + # cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, + # cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, + # cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, + # cc-by-nd-3-0, cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, + # cc-by-sa-2-1-jp, cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, + # cddl-1-0, cddl-1-1, cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, + # cecill-1-1, cecill-2-0, cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, + # cern-ohl-1-2, cern-ohl-p-2-0, cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, + # classpath-exception-2-0, clisp-exception-2-0, cnri-jython, cnri-python, + # cnri-python-gpl-compatible, condor-1-1, copyleft-next-0-3-0, + # copyleft-next-0-3-1, cpal-1-0, cpl-1-0, cpol-1-02, crossword, + # crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, d-fsl-1-0, diffmark, + # digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, dvipdfm, ecl-1-0, + # ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, entessa, epics, + # epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, eupl-1-0, eupl-1-1, + # eupl-1-2, eurosym, fair, fawkes-runtime-exception, fltk-exception, + # font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, + # freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, + # gcc-exception-3-1, gd, gfdl-1-1-invariants-only, + # gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, + # gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, + # gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, + # gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, + # gfdl-1-2-only, gfdl-1-2-or-later, gfdl-1-3-invariants-only, + # gfdl-1-3-invariants-or-later, gfdl-1-3-no-invariants-only, + # gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, gfdl-1-3-or-later, + # giftware, gl2ps, glide, glulxe, glwtpl, gnu-javamail-exception, gnuplot, + # gpl-1-0-only, gpl-1-0-or-later, gpl-2-0-only, gpl-2-0-or-later, + # gpl-3-0-linking-exception, gpl-3-0-linking-source-exception, + # gpl-3-0-only, gpl-3-0-or-later, gpl-cc-1-0, gsoap-1-3b, haskell-report, + # hippocratic-2-1, hpnd, hpnd-sell-variant, htmltidy, + # i2p-gpl-java-exception, ibm-pibs, icu, ijg, image-magick, imatix, imlib2, + # info-zip, intel, intel-acpi, interbase-1-0, ipa, ipl-1-0, isc, + # jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, leptonica, + # lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, lgpl-2-1-or-later, + # lgpl-3-0-linking-exception, lgpl-3-0-only, lgpl-3-0-or-later, lgpllr, + # libpng, libpng-2-0, libselinux-1-0, libtiff, libtool-exception, + # liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, + # linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, + # lppl-1-1, lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, + # mif-exception, miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, + # mit-feh, mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, + # mpl-1-0, mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, + # mtll, mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, + # naumen, nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, + # nist-pd, nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, + # nosl, noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, + # ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, + # odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, + # ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, + # ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, + # oldap-1-3, oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, + # oldap-2-2-1, oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, + # openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, + # opl-1-0, oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, + # o-uda-1-0, parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, + # plexus, polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, + # postgresql, psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, + # python-2-0, qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, + # qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, + # ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, + # sgi-b-1-1, sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, + # sissl-1-2, sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, + # spencer-99, spl-1-0, ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, + # swift-exception, swl, tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, + # tosl, tu-berlin-1-0, tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, + # unicode-dfs-2015, unicode-dfs-2016, unicode-tou, + # universal-foss-exception-1-0, unlicense, upl-1-0, vim, vostrom, vsl-1-0, + # w3c, w3c-19980720, w3c-20150513, watcom-1-0, wsuipa, wtfpl, + # wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, xnet, xpp, + # xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, zlib, + # zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1. + # @!attribute [rw] readme + # @return [::String] + # README template name. + # Valid template name(s) are: default. + class InitialConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for scanning. + # @!attribute [rw] secret_scan_config + # @return [::Google::Cloud::SecureSourceManager::V1::Repository::ScanConfig::SecretScanConfig] + # Optional. Configuration for secret scanning. + class ScanConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for secret scanning. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Enables secret scanning for the repository. + # @!attribute [rw] inspect_template + # @return [::String] + # Optional. The DLP inspect template to use for secret scanning. + class SecretScanConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Metadata of a Secure Source Manager Hook. + # @!attribute [rw] name + # @return [::String] + # Identifier. A unique identifier for a Hook. The name should be of the + # format: + # `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` + # @!attribute [rw] target_uri + # @return [::String] + # Required. The target URI to which the payloads will be delivered. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. Determines if the hook disabled or not. + # Set to true to stop sending traffic. + # @!attribute [rw] events + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Hook::HookEventType>] + # Optional. The events that trigger hook on. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update timestamp. + # @!attribute [r] uid + # @return [::String] + # Output only. Unique identifier of the hook. + # @!attribute [rw] push_option + # @return [::Google::Cloud::SecureSourceManager::V1::Hook::PushOption] + # Optional. The trigger option for push events. + # @!attribute [rw] sensitive_query_string + # @return [::String] + # Optional. The sensitive query string to be appended to the target URI. + class Hook + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] branch_filter + # @return [::String] + # Optional. Trigger hook for matching branches only. + # Specified as glob pattern. If empty or *, events for all branches are + # reported. Examples: main, \\{main,release*}. + # See https://pkg.go.dev/github.com/gobwas/glob documentation. + class PushOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module HookEventType + # Unspecified. + UNSPECIFIED = 0 + + # Push events are triggered when pushing to the repository. + PUSH = 1 + + # Pull request events are triggered when a pull request is opened, closed, + # reopened, or edited. + PULL_REQUEST = 2 + end + end + + # Metadata of a BranchRule. BranchRule is the protection rule to enforce + # pre-defined rules on designated branches within a repository. + # @!attribute [rw] name + # @return [::String] + # Identifier. A unique identifier for a BranchRule. The name should be of the + # format: + # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` + # @!attribute [r] uid + # @return [::String] + # Output only. Unique identifier of the repository. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Update timestamp. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User annotations. These attributes can only be set and used by + # the user. See https://google.aip.dev/128#annotations for more details such + # as format and size limitations. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [rw] include_pattern + # @return [::String] + # Optional. The pattern of the branch that can match to this BranchRule. + # Specified as regex. + # .* for all branches. Examples: main, (main|release.*). + # Current MVP phase only support `.*` for wildcard. + # @!attribute [rw] disabled + # @return [::Boolean] + # Optional. Determines if the branch rule is disabled or not. + # @!attribute [rw] require_pull_request + # @return [::Boolean] + # Optional. Determines if the branch rule requires a pull request or not. + # @!attribute [rw] minimum_reviews_count + # @return [::Integer] + # Optional. The minimum number of reviews required for the branch rule to be + # matched. + # @!attribute [rw] minimum_approvals_count + # @return [::Integer] + # Optional. The minimum number of approvals required for the branch rule to + # be matched. + # @!attribute [rw] require_code_owner_approval + # @return [::Boolean] + # Optional. Determines if code owners must approve before merging to the + # branch. + # @!attribute [rw] require_comments_resolved + # @return [::Boolean] + # Optional. Determines if require comments resolved before merging to the + # branch. + # @!attribute [rw] allow_stale_reviews + # @return [::Boolean] + # Optional. Determines if allow stale reviews or approvals before merging to + # the branch. + # @!attribute [rw] require_linear_history + # @return [::Boolean] + # Optional. Determines if require linear history before merging to the + # branch. + # @!attribute [rw] required_status_checks + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::BranchRule::Check>] + # Optional. List of required status checks before merging to the branch. + class BranchRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Check is a type for status check. + # @!attribute [rw] context + # @return [::String] + # Required. The context of the check. + class Check + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Metadata of a PullRequest. PullRequest is the request + # from a user to merge a branch (head) into another branch (base). + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. A unique identifier for a PullRequest. The number + # appended at the end is generated by the server. Format: + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` + # @!attribute [rw] title + # @return [::String] + # Required. The pull request title. + # @!attribute [rw] body + # @return [::String] + # Optional. The pull request body. Provides a detailed description of the + # changes. + # @!attribute [rw] base + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest::Branch] + # Required. The branch to merge changes in. + # @!attribute [rw] head + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest::Branch] + # Immutable. The branch containing the changes to be merged. + # @!attribute [r] state + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest::State] + # Output only. State of the pull request (open, closed or merged). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last updated timestamp. + # @!attribute [r] close_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Close timestamp (if closed or merged). Cleared when pull + # request is re-opened. + class PullRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Branch represents a branch involved in a pull request. + # @!attribute [rw] ref + # @return [::String] + # Required. Name of the branch. + # @!attribute [r] sha + # @return [::String] + # Output only. The commit at the tip of the branch. + class Branch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of the pull request. + module State + # Unspecified. + STATE_UNSPECIFIED = 0 + + # An open pull request. + OPEN = 1 + + # A closed pull request. + CLOSED = 2 + + # A merged pull request. + MERGED = 3 + end + end + + # Metadata of a FileDiff. FileDiff represents a single file diff in a pull + # request. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the file. + # @!attribute [r] action + # @return [::Google::Cloud::SecureSourceManager::V1::FileDiff::Action] + # Output only. The action taken on the file (eg. added, modified, deleted). + # @!attribute [r] sha + # @return [::String] + # Output only. The commit pointing to the file changes. + # @!attribute [r] patch + # @return [::String] + # Output only. The git patch containing the file changes. + class FileDiff + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Action taken on the file. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # The file was added. + ADDED = 1 + + # The file was modified. + MODIFIED = 2 + + # The file was deleted. + DELETED = 3 + end + end + + # Metadata of an Issue. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique identifier for an issue. The issue id is generated by + # the server. Format: + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}` + # @!attribute [rw] title + # @return [::String] + # Required. Issue title. + # @!attribute [rw] body + # @return [::String] + # Optional. Issue body. Provides a detailed description of the issue. + # @!attribute [r] state + # @return [::Google::Cloud::SecureSourceManager::V1::Issue::State] + # Output only. State of the issue. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last updated timestamp. + # @!attribute [r] close_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Close timestamp (if closed). Cleared when is re-opened. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + class Issue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of an issue. + module State + # Unspecified. + STATE_UNSPECIFIED = 0 + + # An open issue. + OPEN = 1 + + # A closed issue. + CLOSED = 2 + end + end + + # IssueComment represents a comment on an issue. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique identifier for an issue comment. The comment id is + # generated by the server. Format: + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}` + # @!attribute [rw] body + # @return [::String] + # Required. The comment body. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last updated timestamp. + class IssueComment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PullRequestComment represents a comment on a pull request. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique identifier for the pull request comment. The comment id + # is generated by the server. Format: + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last updated timestamp. + # @!attribute [rw] review + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Review] + # Optional. The review summary comment. + # + # Note: The following fields are mutually exclusive: `review`, `comment`, `code`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] comment + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Comment] + # Optional. The general pull request comment. + # + # Note: The following fields are mutually exclusive: `comment`, `review`, `code`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] code + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Code] + # Optional. The comment on a code line. + # + # Note: The following fields are mutually exclusive: `code`, `review`, `comment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class PullRequestComment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The review summary comment. + # @!attribute [rw] action_type + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Review::ActionType] + # Required. The review action type. + # @!attribute [rw] body + # @return [::String] + # Optional. The comment body. + # @!attribute [r] effective_commit_sha + # @return [::String] + # Output only. The effective commit sha this review is pointing to. + class Review + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The review action type. + module ActionType + # Unspecified. + ACTION_TYPE_UNSPECIFIED = 0 + + # A general review comment. + COMMENT = 1 + + # Change required from this review. + CHANGE_REQUESTED = 2 + + # Change approved from this review. + APPROVED = 3 + end + end + + # The general pull request comment. + # @!attribute [rw] body + # @return [::String] + # Required. The comment body. + class Comment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The comment on a code line. + # @!attribute [rw] body + # @return [::String] + # Required. The comment body. + # @!attribute [rw] reply + # @return [::String] + # Optional. Input only. The PullRequestComment resource name that this + # comment is replying to. + # @!attribute [rw] position + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Position] + # Optional. The position of the comment. + # @!attribute [r] effective_root_comment + # @return [::String] + # Output only. The root comment of the conversation, derived from the reply + # field. + # @!attribute [r] resolved + # @return [::Boolean] + # Output only. Boolean indicator if the comment is resolved. + # @!attribute [r] effective_commit_sha + # @return [::String] + # Output only. The effective commit sha this code comment is pointing to. + class Code + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The position of the code comment. + # @!attribute [rw] path + # @return [::String] + # Required. The path of the file. + # @!attribute [rw] line + # @return [::Integer] + # Required. The line number of the comment. Positive value means it's on + # the new side of the diff, negative value means it's on the old side. + class Position + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # ListInstancesRequest is the request to list instances. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListInstancesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter for filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListInstancesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Instance>] + # The list of instances. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListInstancesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetInstanceRequest is the request for getting an instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CreateInstanceRequest is the request for creating an instance. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] instance_id + # @return [::String] + # Required. ID of the instance to be created. + # @!attribute [rw] instance + # @return [::Google::Cloud::SecureSourceManager::V1::Instance] + # Required. The resource being created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteInstanceRequest is the request for deleting an instance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, will force the deletion of the instance. + class DeleteInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListRepositoriesRequest is request to list repositories. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListRepositoriesRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter results. + # @!attribute [rw] instance + # @return [::String] + # Optional. The name of the instance in which the repository is hosted, + # formatted as + # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + # When listing repositories via securesourcemanager.googleapis.com, this + # field is required. When listing repositories via *.sourcemanager.dev, this + # field is ignored. + class ListRepositoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] repositories + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Repository>] + # The list of repositories. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListRepositoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetRepositoryRequest is the request for getting a repository. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the repository to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + class GetRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CreateRepositoryRequest is the request for creating a repository. + # @!attribute [rw] parent + # @return [::String] + # Required. The project in which to create the repository. Values are of the + # form `projects/{project_number}/locations/{location_id}` + # @!attribute [rw] repository + # @return [::Google::Cloud::SecureSourceManager::V1::Repository] + # Required. The resource being created. + # @!attribute [rw] repository_id + # @return [::String] + # Required. The ID to use for the repository, which will become the final + # component of the repository's resource name. This value should be 4-63 + # characters, and valid characters are /[a-z][0-9]-/. + class CreateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # UpdateRepositoryRequest is the request to update a repository. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # repository resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] repository + # @return [::Google::Cloud::SecureSourceManager::V1::Repository] + # Required. The repository being updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. False by default. If set to true, the request is validated and + # the user is provided with an expected result, but no actual change is made. + class UpdateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteRepositoryRequest is the request to delete a repository. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the repository to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the repository is not found, the request will + # succeed but no action will be taken on the server. + class DeleteRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListHooksRequest is request to list hooks. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListHooksRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListHooksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListHooksResponse is response to list hooks. + # @!attribute [rw] hooks + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Hook>] + # The list of hooks. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListHooksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetHookRequest is the request for getting a hook. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the hook to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + class GetHookRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CreateHookRequest is the request for creating a hook. + # @!attribute [rw] parent + # @return [::String] + # Required. The repository in which to create the hook. Values are of the + # form + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @!attribute [rw] hook + # @return [::Google::Cloud::SecureSourceManager::V1::Hook] + # Required. The resource being created. + # @!attribute [rw] hook_id + # @return [::String] + # Required. The ID to use for the hook, which will become the final component + # of the hook's resource name. This value restricts to lower-case letters, + # numbers, and hyphen, with the first character a letter, the last a letter + # or a number, and a 63 character maximum. + class CreateHookRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # UpdateHookRequest is the request to update a hook. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # hook resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # @!attribute [rw] hook + # @return [::Google::Cloud::SecureSourceManager::V1::Hook] + # Required. The hook being updated. + class UpdateHookRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteHookRequest is the request to delete a hook. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the hook to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + class DeleteHookRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetBranchRuleRequest is the request for getting a branch rule. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the repository to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. + class GetBranchRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CreateBranchRuleRequest is the request to create a branch rule. + # @!attribute [rw] parent + # @return [::String] + # @!attribute [rw] branch_rule + # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # @!attribute [rw] branch_rule_id + # @return [::String] + class CreateBranchRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListBranchRulesRequest is the request to list branch rules. + # @!attribute [rw] parent + # @return [::String] + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListBranchRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteBranchRuleRequest is the request to delete a branch rule. + # @!attribute [rw] name + # @return [::String] + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the branch rule is not found, the request + # will succeed but no action will be taken on the server. + class DeleteBranchRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # UpdateBranchRuleRequest is the request to update a branchRule. + # @!attribute [rw] branch_rule + # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually post it. (https://google.aip.dev/163, for declarative friendly) + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # branchRule resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + class UpdateBranchRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListBranchRulesResponse is the response to listing branchRules. + # @!attribute [rw] branch_rules + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::BranchRule>] + # The list of branch rules. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListBranchRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CreatePullRequestRequest is the request to create a pull request. + # @!attribute [rw] parent + # @return [::String] + # Required. The repository that the pull request is created from. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @!attribute [rw] pull_request + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # Required. The pull request to create. + class CreatePullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetPullRequestRequest is the request to get a pull request. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the pull request to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. + class GetPullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListPullRequestsRequest is the request to list pull requests. + # @!attribute [rw] parent + # @return [::String] + # Required. The repository in which to list pull requests. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListPullRequestsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListPullRequestsResponse is the response to list pull requests. + # @!attribute [rw] pull_requests + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequest>] + # The list of pull requests. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListPullRequestsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # UpdatePullRequestRequest is the request to update a pull request. + # @!attribute [rw] pull_request + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] + # Required. The pull request to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + class UpdatePullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MergePullRequestRequest is the request to merge a pull request. + # @!attribute [rw] name + # @return [::String] + # Required. The pull request to merge. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + class MergePullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # OpenPullRequestRequest is the request to open a pull request. + # @!attribute [rw] name + # @return [::String] + # Required. The pull request to open. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + class OpenPullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ClosePullRequestRequest is the request to close a pull request. + # @!attribute [rw] name + # @return [::String] + # Required. The pull request to close. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + class ClosePullRequestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListPullRequestFileDiffsRequest is the request to list pull request file + # diffs. + # @!attribute [rw] name + # @return [::String] + # Required. The pull request to list file diffs for. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListPullRequestFileDiffsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListPullRequestFileDiffsResponse is the response containing file diffs + # returned from ListPullRequestFileDiffs. + # @!attribute [rw] file_diffs + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::FileDiff>] + # The list of pull request file diffs. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListPullRequestFileDiffsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create an issue. + # @!attribute [rw] parent + # @return [::String] + # Required. The repository in which to create the issue. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @!attribute [rw] issue + # @return [::Google::Cloud::SecureSourceManager::V1::Issue] + # Required. The issue to create. + class CreateIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get an issue. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. + class GetIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list issues. + # @!attribute [rw] parent + # @return [::String] + # Required. The repository in which to list issues. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Used to filter the resulting issues list. + class ListIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to list issues. + # @!attribute [rw] issues + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Issue>] + # The list of issues. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update an issue. + # @!attribute [rw] issue + # @return [::Google::Cloud::SecureSourceManager::V1::Issue] + # Required. The issue to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + class UpdateIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete an issue. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # deletion will be blocked and an ABORTED error will be returned. + class DeleteIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to close an issue. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue to close. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # closing will be blocked and an ABORTED error will be returned. + class CloseIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to open an issue. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue to open. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. The current etag of the issue. + # If the etag is provided and does not match the current etag of the issue, + # opening will be blocked and an ABORTED error will be returned. + class OpenIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an entry within a tree structure (like a Git tree). + # @!attribute [r] type + # @return [::Google::Cloud::SecureSourceManager::V1::TreeEntry::ObjectType] + # Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. + # @!attribute [r] sha + # @return [::String] + # Output only. The SHA-1 hash of the object (unique identifier). Output-only. + # @!attribute [r] path + # @return [::String] + # Output only. The path of the file or directory within the tree (e.g., + # "src/main/java/MyClass.java"). Output-only. + # @!attribute [r] mode + # @return [::String] + # Output only. The file mode as a string (e.g., "100644"). Indicates file + # type. Output-only. + # @!attribute [r] size + # @return [::Integer] + # Output only. The size of the object in bytes (only for blobs). Output-only. + class TreeEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the type of object the TreeEntry represents. + module ObjectType + # Default value, indicating the object type is unspecified. + OBJECT_TYPE_UNSPECIFIED = 0 + + # Represents a directory (folder). + TREE = 1 + + # Represents a file (contains file data). + BLOB = 2 + + # Represents a pointer to another repository (submodule). + COMMIT = 3 + end + end + + # Request message for fetching a tree structure from a repository. + # @!attribute [rw] repository + # @return [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository to fetch the tree from. + # @!attribute [rw] ref + # @return [::String] + # Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies + # which tree to fetch. If not specified, the default branch will be used. + # @!attribute [rw] recursive + # @return [::Boolean] + # Optional. If true, include all subfolders and their files in the response. + # If false, only the immediate children are returned. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, at most 10,000 items will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class FetchTreeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing a list of TreeEntry objects. + # @!attribute [rw] tree_entries + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] + # The list of TreeEntry objects. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class FetchTreeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for fetching a blob (file content) from a repository. + # @!attribute [rw] repository + # @return [::String] + # Required. The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + # Specifies the repository containing the blob. + # @!attribute [rw] sha + # @return [::String] + # Required. The SHA-1 hash of the blob to retrieve. + class FetchBlobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message containing the content of a blob. + # @!attribute [rw] sha + # @return [::String] + # The SHA-1 hash of the blob. + # @!attribute [rw] content + # @return [::String] + # The content of the blob, encoded as base64. + class FetchBlobResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list pull request comments. + # @!attribute [rw] parent + # @return [::String] + # Required. The pull request in which to list pull request comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListPullRequestCommentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to list pull request comments. + # @!attribute [rw] pull_request_comments + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # The list of pull request comments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to set as page_token to retrieve the next page. If this field is + # omitted, there are no subsequent pages. + class ListPullRequestCommentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a pull request comment. + # @!attribute [rw] parent + # @return [::String] + # Required. The pull request in which to create the pull request comment. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] pull_request_comment + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # Required. The pull request comment to create. + class CreatePullRequestCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to batch create pull request comments. + # @!attribute [rw] parent + # @return [::String] + # Required. The pull request in which to create the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest>] + # Required. The request message specifying the resources to create. There + # should be exactly one CreatePullRequestCommentRequest with CommentDetail + # being REVIEW in the list, and no more than 100 + # CreatePullRequestCommentRequests with CommentDetail being CODE in the list + class BatchCreatePullRequestCommentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to batch create pull request comments. + # @!attribute [rw] pull_request_comments + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # The list of pull request comments created. + class BatchCreatePullRequestCommentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a pull request comment. + # @!attribute [rw] pull_request_comment + # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] + # Required. The pull request comment to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # pull request comment resource by the update. Updatable fields are + # `body`. + class UpdatePullRequestCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a pull request comment. A Review PullRequestComment + # cannot be deleted. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the pull request comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + class DeletePullRequestCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get a pull request comment. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the pull request comment to retrieve. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. + class GetPullRequestCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to resolve multiple pull request comments. + # @!attribute [rw] parent + # @return [::String] + # Required. The pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The names of the pull request comments to resolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @!attribute [rw] auto_fill + # @return [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to resolved. If + # unset, all comments in the same thread need be present. + class ResolvePullRequestCommentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to resolve multiple pull request comments. + # @!attribute [rw] pull_request_comments + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # The list of pull request comments resolved. + class ResolvePullRequestCommentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to unresolve multiple pull request comments. + # @!attribute [rw] parent + # @return [::String] + # Required. The pull request in which to resolve the pull request comments. + # Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The names of the pull request comments to unresolve. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` + # Only comments from the same threads are allowed in the same request. + # @!attribute [rw] auto_fill + # @return [::Boolean] + # Optional. If set, at least one comment in a thread is required, rest of the + # comments in the same thread will be automatically updated to unresolved. If + # unset, all comments in the same thread need be present. + class UnresolvePullRequestCommentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to unresolve multiple pull request comments. + # @!attribute [rw] pull_request_comments + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] + # The list of pull request comments unresolved. + class UnresolvePullRequestCommentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create an issue comment. + # @!attribute [rw] parent + # @return [::String] + # Required. The issue in which to create the issue comment. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @!attribute [rw] issue_comment + # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # Required. The issue comment to create. + class CreateIssueCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get an issue comment. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue comment to retrieve. + # The format is + # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. + class GetIssueCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list issue comments. + # @!attribute [rw] parent + # @return [::String] + # Required. The issue in which to list the comments. Format: + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. If unspecified, a default size of 30 will be + # used. The maximum value is 100; values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListIssueCommentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to list issue comments. + # @!attribute [rw] issue_comments + # @return [::Array<::Google::Cloud::SecureSourceManager::V1::IssueComment>] + # The list of issue comments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListIssueCommentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update an issue comment. + # @!attribute [rw] issue_comment + # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] + # Required. The issue comment to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # issue comment resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + class UpdateIssueCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete an issue comment. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the issue comment to delete. + # The format is + # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`. + class DeleteIssueCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/Gemfile new file mode 100644 index 000000000000..c02a8c6ffa97 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-secure_source_manager-v1", path: "../" +else + gem "google-cloud-secure_source_manager-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb new file mode 100644 index 000000000000..6aeca4d125fe --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_BatchCreatePullRequestComments_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the batch_create_pull_request_comments call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#batch_create_pull_request_comments. +# +def batch_create_pull_request_comments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new + + # Call the batch_create_pull_request_comments method. + result = client.batch_create_pull_request_comments request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_BatchCreatePullRequestComments_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb new file mode 100644 index 000000000000..b2ba82ae6d45 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_CloseIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the close_issue call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_issue. +# +def close_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new + + # Call the close_issue method. + result = client.close_issue request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CloseIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb new file mode 100644 index 000000000000..38c1ced837e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_ClosePullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the close_pull_request call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_pull_request. +# +def close_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new + + # Call the close_pull_request method. + result = client.close_pull_request request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ClosePullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.rb new file mode 100644 index 000000000000..81740887a0f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_CreateBranchRule_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_branch_rule call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_branch_rule. +# +def create_branch_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new + + # Call the create_branch_rule method. + result = client.create_branch_rule request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreateBranchRule_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb new file mode 100644 index 000000000000..9ebf7f19e4b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_CreateHook_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_hook call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_hook. +# +def create_hook + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new + + # Call the create_hook method. + result = client.create_hook request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreateHook_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_instance.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_instance.rb new file mode 100644 index 000000000000..d7e6ebc48aea --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_CreateInstance_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_instance call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_instance. +# +def create_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new + + # Call the create_instance method. + result = client.create_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb new file mode 100644 index 000000000000..c7ecf6b65771 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_CreateIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_issue call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue. +# +def create_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new + + # Call the create_issue method. + result = client.create_issue request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreateIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb new file mode 100644 index 000000000000..9a392c0b40e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_CreateIssueComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_issue_comment call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue_comment. +# +def create_issue_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new + + # Call the create_issue_comment method. + result = client.create_issue_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreateIssueComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb new file mode 100644 index 000000000000..96f9276bb3ad --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_pull_request call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request. +# +def create_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new + + # Call the create_pull_request method. + result = client.create_pull_request request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb new file mode 100644 index 000000000000..42a6943f1657 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequestComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_pull_request_comment call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request_comment. +# +def create_pull_request_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new + + # Call the create_pull_request_comment method. + result = client.create_pull_request_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequestComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_repository.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_repository.rb new file mode 100644 index 000000000000..8a5c6b9f1c9c --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_repository.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_CreateRepository_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the create_repository call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_repository. +# +def create_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new + + # Call the create_repository method. + result = client.create_repository request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_branch_rule.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_branch_rule.rb new file mode 100644 index 000000000000..7be487c5cd28 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_branch_rule.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteBranchRule_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the delete_branch_rule call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_branch_rule. +# +def delete_branch_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new + + # Call the delete_branch_rule method. + result = client.delete_branch_rule request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteBranchRule_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb new file mode 100644 index 000000000000..bb832a22960e --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteHook_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the delete_hook call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_hook. +# +def delete_hook + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new + + # Call the delete_hook method. + result = client.delete_hook request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteHook_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.rb new file mode 100644 index 000000000000..3846d75b48de --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteInstance_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the delete_instance call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_instance. +# +def delete_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new + + # Call the delete_instance method. + result = client.delete_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb new file mode 100644 index 000000000000..97ae38f29b45 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the delete_issue call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue. +# +def delete_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new + + # Call the delete_issue method. + result = client.delete_issue request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb new file mode 100644 index 000000000000..7d4cf8df2226 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteIssueComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the delete_issue_comment call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue_comment. +# +def delete_issue_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new + + # Call the delete_issue_comment method. + result = client.delete_issue_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteIssueComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb new file mode 100644 index 000000000000..9b109842de87 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_DeletePullRequestComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the delete_pull_request_comment call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_pull_request_comment. +# +def delete_pull_request_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new + + # Call the delete_pull_request_comment method. + result = client.delete_pull_request_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_DeletePullRequestComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.rb new file mode 100644 index 000000000000..5ac51c078de8 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteRepository_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the delete_repository call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_repository. +# +def delete_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new + + # Call the delete_repository method. + result = client.delete_repository request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb new file mode 100644 index 000000000000..cf6d2c9e3b39 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_FetchBlob_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the fetch_blob call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_blob. +# +def fetch_blob + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new + + # Call the fetch_blob method. + result = client.fetch_blob request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::FetchBlobResponse. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_FetchBlob_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb new file mode 100644 index 000000000000..f44b00813d69 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_FetchTree_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the fetch_tree call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_tree. +# +def fetch_tree + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new + + # Call the fetch_tree method. + result = client.fetch_tree request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecureSourceManager::V1::TreeEntry. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_FetchTree_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.rb new file mode 100644 index 000000000000..f34587a87d48 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_GetBranchRule_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_branch_rule call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_branch_rule. +# +def get_branch_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new + + # Call the get_branch_rule method. + result = client.get_branch_rule request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetBranchRule_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb new file mode 100644 index 000000000000..7e6782e5a4ad --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_GetHook_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_hook call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_hook. +# +def get_hook + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new + + # Call the get_hook method. + result = client.get_hook request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetHook_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.rb new file mode 100644 index 000000000000..e9ce8413832f --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_GetIamPolicyRepo_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_iam_policy_repo call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_iam_policy_repo. +# +def get_iam_policy_repo + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy_repo method. + result = client.get_iam_policy_repo request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetIamPolicyRepo_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_instance.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_instance.rb new file mode 100644 index 000000000000..36213b70cd2b --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_instance.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_GetInstance_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_instance call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::Instance. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb new file mode 100644 index 000000000000..a00d369904cc --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_GetIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_issue call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue. +# +def get_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new + + # Call the get_issue method. + result = client.get_issue request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::Issue. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb new file mode 100644 index 000000000000..d72bb362175a --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_GetIssueComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_issue_comment call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue_comment. +# +def get_issue_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new + + # Call the get_issue_comment method. + result = client.get_issue_comment request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetIssueComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb new file mode 100644 index 000000000000..99294fe78a70 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_GetPullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_pull_request call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request. +# +def get_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new + + # Call the get_pull_request method. + result = client.get_pull_request request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequest. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetPullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb new file mode 100644 index 000000000000..b353146f2611 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_GetPullRequestComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_pull_request_comment call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request_comment. +# +def get_pull_request_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new + + # Call the get_pull_request_comment method. + result = client.get_pull_request_comment request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequestComment. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetPullRequestComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_repository.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_repository.rb new file mode 100644 index 000000000000..c061ef825149 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_repository.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_GetRepository_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the get_repository call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_repository. +# +def get_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new + + # Call the get_repository method. + result = client.get_repository request + + # The returned object is of type Google::Cloud::SecureSourceManager::V1::Repository. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_branch_rules.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_branch_rules.rb new file mode 100644 index 000000000000..00499c4f7fe8 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_branch_rules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_ListBranchRules_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_branch_rules call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_branch_rules. +# +def list_branch_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new + + # Call the list_branch_rules method. + result = client.list_branch_rules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecureSourceManager::V1::BranchRule. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListBranchRules_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb new file mode 100644 index 000000000000..bdd7fcb4c869 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_ListHooks_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_hooks call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_hooks. +# +def list_hooks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new + + # Call the list_hooks method. + result = client.list_hooks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Hook. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListHooks_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_instances.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_instances.rb new file mode 100644 index 000000000000..a0635c75ef14 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_instances.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_ListInstances_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_instances call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_instances. +# +def list_instances + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new + + # Call the list_instances method. + result = client.list_instances request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Instance. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb new file mode 100644 index 000000000000..c67d4b141f75 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_ListIssueComments_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_issue_comments call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issue_comments. +# +def list_issue_comments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new + + # Call the list_issue_comments method. + result = client.list_issue_comments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecureSourceManager::V1::IssueComment. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListIssueComments_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb new file mode 100644 index 000000000000..1d06ffba7fd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_ListIssues_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_issues call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issues. +# +def list_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new + + # Call the list_issues method. + result = client.list_issues request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Issue. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListIssues_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb new file mode 100644 index 000000000000..e27942c2285c --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestComments_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_pull_request_comments call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_comments. +# +def list_pull_request_comments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new + + # Call the list_pull_request_comments method. + result = client.list_pull_request_comments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequestComment. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestComments_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb new file mode 100644 index 000000000000..ee7f1fb85eee --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestFileDiffs_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_pull_request_file_diffs call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_file_diffs. +# +def list_pull_request_file_diffs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new + + # Call the list_pull_request_file_diffs method. + result = client.list_pull_request_file_diffs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecureSourceManager::V1::FileDiff. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestFileDiffs_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb new file mode 100644 index 000000000000..7d7b6c3956a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_ListPullRequests_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_pull_requests call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_requests. +# +def list_pull_requests + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new + + # Call the list_pull_requests method. + result = client.list_pull_requests request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequest. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequests_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.rb new file mode 100644 index 000000000000..bed32be0efe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_ListRepositories_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the list_repositories call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_repositories. +# +def list_repositories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new + + # Call the list_repositories method. + result = client.list_repositories request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Repository. + p item + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb new file mode 100644 index 000000000000..a561bbc1483f --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_MergePullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the merge_pull_request call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#merge_pull_request. +# +def merge_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new + + # Call the merge_pull_request method. + result = client.merge_pull_request request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_MergePullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb new file mode 100644 index 000000000000..aac118b714ec --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_OpenIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the open_issue call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_issue. +# +def open_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new + + # Call the open_issue method. + result = client.open_issue request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_OpenIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb new file mode 100644 index 000000000000..e144b045570d --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_OpenPullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the open_pull_request call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_pull_request. +# +def open_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new + + # Call the open_pull_request method. + result = client.open_pull_request request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_OpenPullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb new file mode 100644 index 000000000000..7a9e2ed11b6c --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_ResolvePullRequestComments_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the resolve_pull_request_comments call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#resolve_pull_request_comments. +# +def resolve_pull_request_comments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new + + # Call the resolve_pull_request_comments method. + result = client.resolve_pull_request_comments request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_ResolvePullRequestComments_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.rb new file mode 100644 index 000000000000..9eaf3ef13717 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_SetIamPolicyRepo_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the set_iam_policy_repo call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#set_iam_policy_repo. +# +def set_iam_policy_repo + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy_repo method. + result = client.set_iam_policy_repo request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_SetIamPolicyRepo_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/test_iam_permissions_repo.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/test_iam_permissions_repo.rb new file mode 100644 index 000000000000..73012017a1b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/test_iam_permissions_repo.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_TestIamPermissionsRepo_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the test_iam_permissions_repo call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#test_iam_permissions_repo. +# +def test_iam_permissions_repo + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions_repo method. + result = client.test_iam_permissions_repo request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END securesourcemanager_v1_generated_SecureSourceManager_TestIamPermissionsRepo_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb new file mode 100644 index 000000000000..d8c323b516f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_UnresolvePullRequestComments_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the unresolve_pull_request_comments call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#unresolve_pull_request_comments. +# +def unresolve_pull_request_comments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new + + # Call the unresolve_pull_request_comments method. + result = client.unresolve_pull_request_comments request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UnresolvePullRequestComments_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.rb new file mode 100644 index 000000000000..bd2c0fd99ca4 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_UpdateBranchRule_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_branch_rule call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_branch_rule. +# +def update_branch_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new + + # Call the update_branch_rule method. + result = client.update_branch_rule request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateBranchRule_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb new file mode 100644 index 000000000000..724f047f2413 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_UpdateHook_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_hook call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_hook. +# +def update_hook + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new + + # Call the update_hook method. + result = client.update_hook request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateHook_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb new file mode 100644 index 000000000000..4de76feb6560 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_UpdateIssue_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_issue call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue. +# +def update_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new + + # Call the update_issue method. + result = client.update_issue request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb new file mode 100644 index 000000000000..f19c0a363e5b --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_UpdateIssueComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_issue_comment call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue_comment. +# +def update_issue_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new + + # Call the update_issue_comment method. + result = client.update_issue_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateIssueComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb new file mode 100644 index 000000000000..caea95463f77 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequest_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_pull_request call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request. +# +def update_pull_request + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new + + # Call the update_pull_request method. + result = client.update_pull_request request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb new file mode 100644 index 000000000000..902089aa57c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequestComment_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_pull_request_comment call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request_comment. +# +def update_pull_request_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new + + # Call the update_pull_request_comment method. + result = client.update_pull_request_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequestComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb new file mode 100644 index 000000000000..fa3df85ca997 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securesourcemanager_v1_generated_SecureSourceManager_UpdateRepository_sync] +require "google/cloud/secure_source_manager/v1" + +## +# Snippet for the update_repository call in the SecureSourceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_repository. +# +def update_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new + + # Call the update_repository method. + result = client.update_repository request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateRepository_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json new file mode 100644 index 000000000000..98391cb30a6e --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json @@ -0,0 +1,2095 @@ +{ + "client_library": { + "name": "google-cloud-secure_source_manager-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.securesourcemanager.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListInstances_sync", + "title": "Snippet for the list_instances call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_instances.", + "file": "secure_source_manager/list_instances.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instances", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_instances", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListInstances", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListInstances", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetInstance_sync", + "title": "Snippet for the get_instance call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_instance.", + "file": "secure_source_manager/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::Instance", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetInstance", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateInstance_sync", + "title": "Snippet for the create_instance call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_instance.", + "file": "secure_source_manager/create_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_instance", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreateInstance", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateInstance", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteInstance_sync", + "title": "Snippet for the delete_instance call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_instance.", + "file": "secure_source_manager/delete_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_instance", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "DeleteInstance", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteInstance", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListRepositories_sync", + "title": "Snippet for the list_repositories call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_repositories.", + "file": "secure_source_manager/list_repositories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_repositories", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_repositories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListRepositories", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListRepositories", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetRepository_sync", + "title": "Snippet for the get_repository call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_repository.", + "file": "secure_source_manager/get_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_repository", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::Repository", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetRepository", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetRepository", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateRepository_sync", + "title": "Snippet for the create_repository call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_repository.", + "file": "secure_source_manager/create_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_repository", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreateRepository", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateRepository", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateRepository_sync", + "title": "Snippet for the update_repository call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_repository.", + "file": "secure_source_manager/update_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_repository", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdateRepository", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateRepository", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteRepository_sync", + "title": "Snippet for the delete_repository call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_repository.", + "file": "secure_source_manager/delete_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_repository", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "DeleteRepository", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteRepository", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListHooks_sync", + "title": "Snippet for the list_hooks call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_hooks.", + "file": "secure_source_manager/list_hooks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_hooks", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_hooks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListHooksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListHooksResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListHooks", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListHooks", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetHook_sync", + "title": "Snippet for the get_hook call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_hook.", + "file": "secure_source_manager/get_hook.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_hook", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_hook", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetHookRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::Hook", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetHook", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetHook", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateHook_sync", + "title": "Snippet for the create_hook call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_hook.", + "file": "secure_source_manager/create_hook.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_hook", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_hook", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreateHookRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreateHook", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateHook", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateHook_sync", + "title": "Snippet for the update_hook call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_hook.", + "file": "secure_source_manager/update_hook.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_hook", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_hook", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdateHook", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateHook", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteHook_sync", + "title": "Snippet for the delete_hook call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_hook.", + "file": "secure_source_manager/delete_hook.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_hook", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_hook", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "DeleteHook", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteHook", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetIamPolicyRepo_sync", + "title": "Snippet for the get_iam_policy_repo call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_iam_policy_repo.", + "file": "secure_source_manager/get_iam_policy_repo.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy_repo", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_iam_policy_repo", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetIamPolicyRepo", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetIamPolicyRepo", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_SetIamPolicyRepo_sync", + "title": "Snippet for the set_iam_policy_repo call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#set_iam_policy_repo.", + "file": "secure_source_manager/set_iam_policy_repo.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy_repo", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#set_iam_policy_repo", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "SetIamPolicyRepo", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.SetIamPolicyRepo", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_TestIamPermissionsRepo_sync", + "title": "Snippet for the test_iam_permissions_repo call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#test_iam_permissions_repo.", + "file": "secure_source_manager/test_iam_permissions_repo.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions_repo", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#test_iam_permissions_repo", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "TestIamPermissionsRepo", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.TestIamPermissionsRepo", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateBranchRule_sync", + "title": "Snippet for the create_branch_rule call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_branch_rule.", + "file": "secure_source_manager/create_branch_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_branch_rule", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_branch_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreateBranchRule", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateBranchRule", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListBranchRules_sync", + "title": "Snippet for the list_branch_rules call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_branch_rules.", + "file": "secure_source_manager/list_branch_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_branch_rules", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_branch_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListBranchRules", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListBranchRules", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetBranchRule_sync", + "title": "Snippet for the get_branch_rule call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_branch_rule.", + "file": "secure_source_manager/get_branch_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_branch_rule", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_branch_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::BranchRule", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetBranchRule", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetBranchRule", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateBranchRule_sync", + "title": "Snippet for the update_branch_rule call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_branch_rule.", + "file": "secure_source_manager/update_branch_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_branch_rule", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_branch_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdateBranchRule", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateBranchRule", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteBranchRule_sync", + "title": "Snippet for the delete_branch_rule call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_branch_rule.", + "file": "secure_source_manager/delete_branch_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_branch_rule", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_branch_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "DeleteBranchRule", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteBranchRule", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequest_sync", + "title": "Snippet for the create_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request.", + "file": "secure_source_manager/create_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreatePullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreatePullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetPullRequest_sync", + "title": "Snippet for the get_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request.", + "file": "secure_source_manager/get_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::PullRequest", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetPullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetPullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListPullRequests_sync", + "title": "Snippet for the list_pull_requests call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_requests.", + "file": "secure_source_manager/list_pull_requests.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_pull_requests", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_requests", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListPullRequests", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListPullRequests", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequest_sync", + "title": "Snippet for the update_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request.", + "file": "secure_source_manager/update_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdatePullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdatePullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_MergePullRequest_sync", + "title": "Snippet for the merge_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#merge_pull_request.", + "file": "secure_source_manager/merge_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "merge_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#merge_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "MergePullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.MergePullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_OpenPullRequest_sync", + "title": "Snippet for the open_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_pull_request.", + "file": "secure_source_manager/open_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "open_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "OpenPullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.OpenPullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ClosePullRequest_sync", + "title": "Snippet for the close_pull_request call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_pull_request.", + "file": "secure_source_manager/close_pull_request.rb", + "language": "RUBY", + "client_method": { + "short_name": "close_pull_request", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_pull_request", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ClosePullRequest", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ClosePullRequest", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestFileDiffs_sync", + "title": "Snippet for the list_pull_request_file_diffs call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_file_diffs.", + "file": "secure_source_manager/list_pull_request_file_diffs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_pull_request_file_diffs", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_file_diffs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListPullRequestFileDiffs", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListPullRequestFileDiffs", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_FetchTree_sync", + "title": "Snippet for the fetch_tree call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_tree.", + "file": "secure_source_manager/fetch_tree.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_tree", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_tree", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "FetchTree", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.FetchTree", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_FetchBlob_sync", + "title": "Snippet for the fetch_blob call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_blob.", + "file": "secure_source_manager/fetch_blob.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_blob", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_blob", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "FetchBlob", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.FetchBlob", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateIssue_sync", + "title": "Snippet for the create_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue.", + "file": "secure_source_manager/create_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreateIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetIssue_sync", + "title": "Snippet for the get_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue.", + "file": "secure_source_manager/get_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::Issue", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListIssues_sync", + "title": "Snippet for the list_issues call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issues.", + "file": "secure_source_manager/list_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_issues", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListIssues", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListIssues", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateIssue_sync", + "title": "Snippet for the update_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue.", + "file": "secure_source_manager/update_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdateIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteIssue_sync", + "title": "Snippet for the delete_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue.", + "file": "secure_source_manager/delete_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "DeleteIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_OpenIssue_sync", + "title": "Snippet for the open_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_issue.", + "file": "secure_source_manager/open_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "open_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "OpenIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.OpenIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CloseIssue_sync", + "title": "Snippet for the close_issue call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_issue.", + "file": "secure_source_manager/close_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "close_issue", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CloseIssue", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CloseIssue", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetPullRequestComment_sync", + "title": "Snippet for the get_pull_request_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request_comment.", + "file": "secure_source_manager/get_pull_request_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_pull_request_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::PullRequestComment", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetPullRequestComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetPullRequestComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestComments_sync", + "title": "Snippet for the list_pull_request_comments call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_comments.", + "file": "secure_source_manager/list_pull_request_comments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_pull_request_comments", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_comments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListPullRequestComments", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListPullRequestComments", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequestComment_sync", + "title": "Snippet for the create_pull_request_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request_comment.", + "file": "secure_source_manager/create_pull_request_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_pull_request_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreatePullRequestComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreatePullRequestComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequestComment_sync", + "title": "Snippet for the update_pull_request_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request_comment.", + "file": "secure_source_manager/update_pull_request_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_pull_request_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdatePullRequestComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdatePullRequestComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeletePullRequestComment_sync", + "title": "Snippet for the delete_pull_request_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_pull_request_comment.", + "file": "secure_source_manager/delete_pull_request_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_pull_request_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_pull_request_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "DeletePullRequestComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeletePullRequestComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_BatchCreatePullRequestComments_sync", + "title": "Snippet for the batch_create_pull_request_comments call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#batch_create_pull_request_comments.", + "file": "secure_source_manager/batch_create_pull_request_comments.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_pull_request_comments", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#batch_create_pull_request_comments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "BatchCreatePullRequestComments", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.BatchCreatePullRequestComments", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ResolvePullRequestComments_sync", + "title": "Snippet for the resolve_pull_request_comments call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#resolve_pull_request_comments.", + "file": "secure_source_manager/resolve_pull_request_comments.rb", + "language": "RUBY", + "client_method": { + "short_name": "resolve_pull_request_comments", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#resolve_pull_request_comments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ResolvePullRequestComments", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ResolvePullRequestComments", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UnresolvePullRequestComments_sync", + "title": "Snippet for the unresolve_pull_request_comments call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#unresolve_pull_request_comments.", + "file": "secure_source_manager/unresolve_pull_request_comments.rb", + "language": "RUBY", + "client_method": { + "short_name": "unresolve_pull_request_comments", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#unresolve_pull_request_comments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UnresolvePullRequestComments", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UnresolvePullRequestComments", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateIssueComment_sync", + "title": "Snippet for the create_issue_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue_comment.", + "file": "secure_source_manager/create_issue_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_issue_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "CreateIssueComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateIssueComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetIssueComment_sync", + "title": "Snippet for the get_issue_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue_comment.", + "file": "secure_source_manager/get_issue_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_issue_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::IssueComment", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "GetIssueComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetIssueComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListIssueComments_sync", + "title": "Snippet for the list_issue_comments call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issue_comments.", + "file": "secure_source_manager/list_issue_comments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_issue_comments", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issue_comments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "ListIssueComments", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListIssueComments", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateIssueComment_sync", + "title": "Snippet for the update_issue_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue_comment.", + "file": "secure_source_manager/update_issue_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_issue_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "UpdateIssueComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateIssueComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteIssueComment_sync", + "title": "Snippet for the delete_issue_comment call in the SecureSourceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue_comment.", + "file": "secure_source_manager/delete_issue_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_issue_comment", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecureSourceManager::Client", + "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" + }, + "method": { + "short_name": "DeleteIssueComment", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteIssueComment", + "service": { + "short_name": "SecureSourceManager", + "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb new file mode 100644 index 000000000000..f4daf3d553b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" +require "google/cloud/securesourcemanager/v1/secure_source_manager_services_pb" +require "google/cloud/secure_source_manager/v1/secure_source_manager" + +class ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb new file mode 100644 index 000000000000..5320203b8443 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_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 "gapic/grpc/service_stub" + +require "google/cloud/secure_source_manager/v1/secure_source_manager" + +class ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_branch_rule_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.branch_rule_path project: "value0", location: "value1", repository: "value2", branch_rule: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/branchRules/value3", path + end + end + + def test_ca_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.ca_pool_path project: "value0", location: "value1", ca_pool: "value2" + assert_equal "projects/value0/locations/value1/caPools/value2", path + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_hook_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.hook_path project: "value0", location: "value1", repository: "value2", hook: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/hooks/value3", path + end + end + + def test_inspect_template_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.inspect_template_path project: "value0", location: "value1", inspect_template: "value2" + assert_equal "projects/value0/locations/value1/inspectTemplates/value2", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_issue_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.issue_path project: "value0", location: "value1", repository: "value2", issue: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/issues/value3", path + end + end + + def test_issue_comment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.issue_comment_path project: "value0", location: "value1", repository: "value2", issue: "value3", comment: "value4" + assert_equal "projects/value0/locations/value1/repositories/value2/issues/value3/issueComments/value4", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_pull_request_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.pull_request_path project: "value0", location: "value1", repository: "value2", pull_request: "value3" + assert_equal "projects/value0/locations/value1/repositories/value2/pullRequests/value3", path + end + end + + def test_pull_request_comment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.pull_request_comment_path project: "value0", location: "value1", repository: "value2", pull_request: "value3", comment: "value4" + assert_equal "projects/value0/locations/value1/repositories/value2/pullRequests/value3/pullRequestComments/value4", path + end + end + + def test_repository_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.repository_path project: "value0", location: "value1", repository: "value2" + assert_equal "projects/value0/locations/value1/repositories/value2", path + end + end + + def test_service_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_account_path project: "value0", service_account: "value1" + assert_equal "projects/value0/serviceAccounts/value1", path + end + end + + def test_service_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_attachment_path project: "value0", region: "value1", service_attachment: "value2" + assert_equal "projects/value0/regions/value1/serviceAttachments/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb new file mode 100644 index 000000000000..32cf40c3585f --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb @@ -0,0 +1,2973 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" +require "google/cloud/secure_source_manager/v1/secure_source_manager/rest" + + +class ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_instances + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_instances ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_instances(::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_instances_client_stub.call_count + end + end + end + + def test_get_instance + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_instance ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_instance(::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_count + end + end + end + + def test_create_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_id = "hello world" + instance = {} + request_id = "hello world" + + create_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_instance parent: parent, instance_id: instance_id, instance: instance, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_instance ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_instance(::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_instance_client_stub.call_count + end + end + end + + def test_delete_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + + delete_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_instance({ name: name, request_id: request_id, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_instance name: name, request_id: request_id, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_instance ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new(name: name, request_id: request_id, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_instance({ name: name, request_id: request_id, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_instance(::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new(name: name, request_id: request_id, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_instance_client_stub.call_count + end + end + end + + def test_list_repositories + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + instance = "hello world" + + list_repositories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_repositories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_repositories_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_repositories parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_repositories ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_repositories(::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_repositories_client_stub.call_count + end + end + end + + def test_get_repository + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::Repository.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_repository_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_repository({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_repository name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_repository ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_repository({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_repository(::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_repository_client_stub.call_count + end + end + end + + def test_create_repository + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + repository = {} + repository_id = "hello world" + + create_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_repository_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_repository({ parent: parent, repository: repository, repository_id: repository_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_repository parent: parent, repository: repository, repository_id: repository_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_repository ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_repository({ parent: parent, repository: repository, repository_id: repository_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_repository(::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_repository_client_stub.call_count + end + end + end + + def test_update_repository + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + repository = {} + validate_only = true + + update_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_repository_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_repository update_mask: update_mask, repository: repository, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_repository ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_repository(::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_repository_client_stub.call_count + end + end + end + + def test_delete_repository + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + allow_missing = true + + delete_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_repository_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_repository({ name: name, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_repository name: name, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_repository ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_repository({ name: name, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_repository(::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_repository_client_stub.call_count + end + end + end + + def test_list_hooks + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_hooks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_hooks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_hooks_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_hooks({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_hooks parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_hooks ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_hooks({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_hooks(::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_hooks_client_stub.call_count + end + end + end + + def test_get_hook + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::Hook.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_hook_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_hook_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_hook_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_hook({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_hook name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_hook ::Google::Cloud::SecureSourceManager::V1::GetHookRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_hook({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_hook(::Google::Cloud::SecureSourceManager::V1::GetHookRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_hook_client_stub.call_count + end + end + end + + def test_create_hook + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + hook = {} + hook_id = "hello world" + + create_hook_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_hook_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_hook_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_hook({ parent: parent, hook: hook, hook_id: hook_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_hook parent: parent, hook: hook, hook_id: hook_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_hook ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_hook({ parent: parent, hook: hook, hook_id: hook_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_hook(::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_hook_client_stub.call_count + end + end + end + + def test_update_hook + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + hook = {} + + update_hook_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_hook_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_hook_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_hook({ update_mask: update_mask, hook: hook }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_hook update_mask: update_mask, hook: hook do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_hook ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_hook({ update_mask: update_mask, hook: hook }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_hook(::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_hook_client_stub.call_count + end + end + end + + def test_delete_hook + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_hook_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_hook_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_hook_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_hook({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_hook name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_hook ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_hook({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_hook(::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_hook_client_stub.call_count + end + end + end + + def test_get_iam_policy_repo + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_repo_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_iam_policy_repo_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_repo_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_iam_policy_repo({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_iam_policy_repo resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_iam_policy_repo ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_iam_policy_repo({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_iam_policy_repo(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_repo_client_stub.call_count + end + end + end + + def test_set_iam_policy_repo + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_repo_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_set_iam_policy_repo_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_repo_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_iam_policy_repo resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_iam_policy_repo ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_iam_policy_repo(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_repo_client_stub.call_count + end + end + end + + def test_test_iam_permissions_repo + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_repo_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_test_iam_permissions_repo_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_repo_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.test_iam_permissions_repo({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.test_iam_permissions_repo resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.test_iam_permissions_repo ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.test_iam_permissions_repo({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.test_iam_permissions_repo(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_repo_client_stub.call_count + end + end + end + + def test_create_branch_rule + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + branch_rule = {} + branch_rule_id = "hello world" + + create_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_branch_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_branch_rule_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_branch_rule parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_branch_rule ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_branch_rule(::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_branch_rule_client_stub.call_count + end + end + end + + def test_list_branch_rules + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_branch_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_branch_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_branch_rules_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_branch_rules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_branch_rules ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_branch_rules(::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_branch_rules_client_stub.call_count + end + end + end + + def test_get_branch_rule + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::BranchRule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_branch_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_branch_rule_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_branch_rule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_branch_rule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_branch_rule ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_branch_rule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_branch_rule(::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_branch_rule_client_stub.call_count + end + end + end + + def test_update_branch_rule + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + branch_rule = {} + validate_only = true + update_mask = {} + + update_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_branch_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_branch_rule_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_branch_rule branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_branch_rule ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_branch_rule(::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_branch_rule_client_stub.call_count + end + end + end + + def test_delete_branch_rule + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + allow_missing = true + + delete_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_branch_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_branch_rule_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_branch_rule({ name: name, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_branch_rule name: name, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_branch_rule ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_branch_rule({ name: name, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_branch_rule(::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_branch_rule_client_stub.call_count + end + end + end + + def test_create_pull_request + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + pull_request = {} + + create_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_pull_request({ parent: parent, pull_request: pull_request }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_pull_request parent: parent, pull_request: pull_request do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_pull_request ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_pull_request({ parent: parent, pull_request: pull_request }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_pull_request(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_pull_request_client_stub.call_count + end + end + end + + def test_get_pull_request + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::PullRequest.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_pull_request({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_pull_request name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_pull_request ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_pull_request({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_pull_request(::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_pull_request_client_stub.call_count + end + end + end + + def test_list_pull_requests + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_pull_requests_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_pull_requests_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_pull_requests_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_pull_requests({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_pull_requests parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_pull_requests ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_pull_requests({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_pull_requests(::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_pull_requests_client_stub.call_count + end + end + end + + def test_update_pull_request + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + pull_request = {} + update_mask = {} + + update_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_pull_request({ pull_request: pull_request, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_pull_request pull_request: pull_request, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_pull_request ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_pull_request({ pull_request: pull_request, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_pull_request(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_pull_request_client_stub.call_count + end + end + end + + def test_merge_pull_request + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + merge_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_merge_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, merge_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.merge_pull_request({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.merge_pull_request name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.merge_pull_request ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.merge_pull_request({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.merge_pull_request(::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, merge_pull_request_client_stub.call_count + end + end + end + + def test_open_pull_request + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + open_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_open_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, open_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.open_pull_request({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.open_pull_request name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.open_pull_request ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.open_pull_request({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.open_pull_request(::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, open_pull_request_client_stub.call_count + end + end + end + + def test_close_pull_request + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + close_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_close_pull_request_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, close_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.close_pull_request({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.close_pull_request name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.close_pull_request ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.close_pull_request({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.close_pull_request(::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, close_pull_request_client_stub.call_count + end + end + end + + def test_list_pull_request_file_diffs + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_pull_request_file_diffs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_pull_request_file_diffs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_pull_request_file_diffs_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_pull_request_file_diffs({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_pull_request_file_diffs name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_pull_request_file_diffs ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_pull_request_file_diffs({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_pull_request_file_diffs(::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_pull_request_file_diffs_client_stub.call_count + end + end + end + + def test_fetch_tree + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + repository = "hello world" + ref = "hello world" + recursive = true + page_size = 42 + page_token = "hello world" + + fetch_tree_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_fetch_tree_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_tree_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.fetch_tree({ repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.fetch_tree repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.fetch_tree ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.fetch_tree({ repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.fetch_tree(::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_tree_client_stub.call_count + end + end + end + + def test_fetch_blob + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + repository = "hello world" + sha = "hello world" + + fetch_blob_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_fetch_blob_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_blob_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.fetch_blob({ repository: repository, sha: sha }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.fetch_blob repository: repository, sha: sha do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.fetch_blob ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.fetch_blob({ repository: repository, sha: sha }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.fetch_blob(::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_blob_client_stub.call_count + end + end + end + + def test_create_issue + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + issue = {} + + create_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_issue({ parent: parent, issue: issue }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_issue parent: parent, issue: issue do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_issue ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_issue({ parent: parent, issue: issue }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_issue(::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_issue_client_stub.call_count + end + end + end + + def test_get_issue + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::Issue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_issue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_issue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_issue ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_issue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_issue(::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_issue_client_stub.call_count + end + end + end + + def test_list_issues + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_issues_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_issues({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_issues parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_issues ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_issues({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_issues(::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_issues_client_stub.call_count + end + end + end + + def test_update_issue + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + issue = {} + update_mask = {} + + update_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_issue({ issue: issue, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_issue issue: issue, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_issue ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_issue({ issue: issue, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_issue(::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_issue_client_stub.call_count + end + end + end + + def test_delete_issue + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_issue({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_issue name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_issue ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_issue({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_issue(::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_issue_client_stub.call_count + end + end + end + + def test_open_issue + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + open_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_open_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, open_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.open_issue({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.open_issue name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.open_issue ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.open_issue({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.open_issue(::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, open_issue_client_stub.call_count + end + end + end + + def test_close_issue + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + close_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_close_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, close_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.close_issue({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.close_issue name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.close_issue ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.close_issue({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.close_issue(::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, close_issue_client_stub.call_count + end + end + end + + def test_get_pull_request_comment + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::PullRequestComment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_pull_request_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_pull_request_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_pull_request_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_pull_request_comment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_pull_request_comment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_pull_request_comment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_pull_request_comment_client_stub.call_count + end + end + end + + def test_list_pull_request_comments + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_pull_request_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_pull_request_comments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_pull_request_comments_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_pull_request_comments({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_pull_request_comments parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_pull_request_comments({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_pull_request_comments_client_stub.call_count + end + end + end + + def test_create_pull_request_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + pull_request_comment = {} + + create_pull_request_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_pull_request_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_pull_request_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_pull_request_comment parent: parent, pull_request_comment: pull_request_comment do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_pull_request_comment_client_stub.call_count + end + end + end + + def test_update_pull_request_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + pull_request_comment = {} + update_mask = {} + + update_pull_request_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_pull_request_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_pull_request_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_pull_request_comment pull_request_comment: pull_request_comment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_pull_request_comment_client_stub.call_count + end + end + end + + def test_delete_pull_request_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_pull_request_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_pull_request_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_pull_request_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_pull_request_comment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_pull_request_comment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_pull_request_comment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_pull_request_comment_client_stub.call_count + end + end + end + + def test_batch_create_pull_request_comments + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_create_pull_request_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_batch_create_pull_request_comments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_create_pull_request_comments_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.batch_create_pull_request_comments({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.batch_create_pull_request_comments parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.batch_create_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.batch_create_pull_request_comments({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.batch_create_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_create_pull_request_comments_client_stub.call_count + end + end + end + + def test_resolve_pull_request_comments + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + auto_fill = true + + resolve_pull_request_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_resolve_pull_request_comments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, resolve_pull_request_comments_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.resolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.resolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.resolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, resolve_pull_request_comments_client_stub.call_count + end + end + end + + def test_unresolve_pull_request_comments + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + auto_fill = true + + unresolve_pull_request_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_unresolve_pull_request_comments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, unresolve_pull_request_comments_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.unresolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.unresolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.unresolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, unresolve_pull_request_comments_client_stub.call_count + end + end + end + + def test_create_issue_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + issue_comment = {} + + create_issue_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_issue_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_issue_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_issue_comment({ parent: parent, issue_comment: issue_comment }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_issue_comment parent: parent, issue_comment: issue_comment do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_issue_comment ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_issue_comment({ parent: parent, issue_comment: issue_comment }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_issue_comment(::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_issue_comment_client_stub.call_count + end + end + end + + def test_get_issue_comment + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::IssueComment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_issue_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_issue_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_issue_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_issue_comment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_issue_comment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_issue_comment ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_issue_comment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_issue_comment(::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_issue_comment_client_stub.call_count + end + end + end + + def test_list_issue_comments + # Create test objects. + client_result = ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_issue_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_issue_comments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_issue_comments_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_issue_comments({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_issue_comments parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_issue_comments ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_issue_comments({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_issue_comments(::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_issue_comments_client_stub.call_count + end + end + end + + def test_update_issue_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + issue_comment = {} + update_mask = {} + + update_issue_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_issue_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_issue_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_issue_comment issue_comment: issue_comment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_issue_comment ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_issue_comment(::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_issue_comment_client_stub.call_count + end + end + end + + def test_delete_issue_comment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_issue_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_issue_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_issue_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_issue_comment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_issue_comment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_issue_comment ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_issue_comment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_issue_comment(::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_issue_comment_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb new file mode 100644 index 000000000000..e03409ec4ac5 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb @@ -0,0 +1,3466 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" +require "google/cloud/secure_source_manager/v1/secure_source_manager" + +class ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_instances + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_instances, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_instances_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_instances ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_instances(::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_instances_client_stub.call_rpc_count + end + end + + def test_get_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::Instance.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_instance({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_instance name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_instance ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_instance({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_instance(::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_rpc_count + end + end + + def test_create_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_id = "hello world" + instance = {} + request_id = "hello world" + + create_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_instance, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["instance_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Instance), request["instance"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_instance_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_instance parent: parent, instance_id: instance_id, instance: instance, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_instance ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_instance(::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_instance_client_stub.call_rpc_count + end + end + + def test_delete_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + + delete_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_instance, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_instance_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_instance({ name: name, request_id: request_id, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_instance name: name, request_id: request_id, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_instance ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new(name: name, request_id: request_id, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_instance({ name: name, request_id: request_id, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_instance(::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new(name: name, request_id: request_id, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_instance_client_stub.call_rpc_count + end + end + + def test_list_repositories + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + instance = "hello world" + + list_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_repositories, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["instance"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_repositories_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_repositories parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_repositories ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_repositories(::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_repositories_client_stub.call_rpc_count + end + end + + def test_get_repository + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::Repository.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_repository, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_repository_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_repository({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_repository name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_repository ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_repository({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_repository(::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_repository_client_stub.call_rpc_count + end + end + + def test_create_repository + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + repository = {} + repository_id = "hello world" + + create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_repository, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Repository), request["repository"] + assert_equal "hello world", request["repository_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_repository_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_repository({ parent: parent, repository: repository, repository_id: repository_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_repository parent: parent, repository: repository, repository_id: repository_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_repository ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_repository({ parent: parent, repository: repository, repository_id: repository_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_repository(::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_repository_client_stub.call_rpc_count + end + end + + def test_update_repository + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + repository = {} + validate_only = true + + update_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_repository, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Repository), request["repository"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_repository_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_repository update_mask: update_mask, repository: repository, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_repository ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_repository(::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_repository_client_stub.call_rpc_count + end + end + + def test_delete_repository + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + allow_missing = true + + delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_repository, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_repository_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_repository({ name: name, allow_missing: allow_missing }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_repository name: name, allow_missing: allow_missing do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_repository ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_repository({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_repository(::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_repository_client_stub.call_rpc_count + end + end + + def test_list_hooks + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_hooks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_hooks, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_hooks_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_hooks({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_hooks parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_hooks ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_hooks({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_hooks(::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_hooks_client_stub.call_rpc_count + end + end + + def test_get_hook + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::Hook.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_hook, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetHookRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_hook_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_hook({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_hook name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_hook ::Google::Cloud::SecureSourceManager::V1::GetHookRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_hook({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_hook(::Google::Cloud::SecureSourceManager::V1::GetHookRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_hook_client_stub.call_rpc_count + end + end + + def test_create_hook + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + hook = {} + hook_id = "hello world" + + create_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_hook, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Hook), request["hook"] + assert_equal "hello world", request["hook_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_hook_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_hook({ parent: parent, hook: hook, hook_id: hook_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_hook parent: parent, hook: hook, hook_id: hook_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_hook ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_hook({ parent: parent, hook: hook, hook_id: hook_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_hook(::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_hook_client_stub.call_rpc_count + end + end + + def test_update_hook + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + hook = {} + + update_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_hook, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Hook), request["hook"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_hook_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_hook({ update_mask: update_mask, hook: hook }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_hook update_mask: update_mask, hook: hook do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_hook ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_hook({ update_mask: update_mask, hook: hook }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_hook(::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_hook_client_stub.call_rpc_count + end + end + + def test_delete_hook + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_hook, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_hook_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_hook({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_hook name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_hook ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_hook({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_hook(::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_hook_client_stub.call_rpc_count + end + end + + def test_get_iam_policy_repo + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy_repo, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_repo_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_iam_policy_repo({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_iam_policy_repo resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_iam_policy_repo ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_iam_policy_repo({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_iam_policy_repo(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_repo_client_stub.call_rpc_count + end + end + + def test_set_iam_policy_repo + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy_repo, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_repo_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_iam_policy_repo resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_iam_policy_repo ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_iam_policy_repo(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_repo_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions_repo + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions_repo, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_repo_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.test_iam_permissions_repo({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.test_iam_permissions_repo resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.test_iam_permissions_repo ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.test_iam_permissions_repo({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.test_iam_permissions_repo(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_repo_client_stub.call_rpc_count + end + end + + def test_create_branch_rule + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + branch_rule = {} + branch_rule_id = "hello world" + + create_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_branch_rule, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::BranchRule), request["branch_rule"] + assert_equal "hello world", request["branch_rule_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_branch_rule_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_branch_rule parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_branch_rule ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_branch_rule(::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_branch_rule_client_stub.call_rpc_count + end + end + + def test_list_branch_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_branch_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_branch_rules, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_branch_rules_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_branch_rules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_branch_rules ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_branch_rules(::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_branch_rules_client_stub.call_rpc_count + end + end + + def test_get_branch_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::BranchRule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_branch_rule, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_branch_rule_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_branch_rule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_branch_rule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_branch_rule ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_branch_rule({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_branch_rule(::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_branch_rule_client_stub.call_rpc_count + end + end + + def test_update_branch_rule + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + branch_rule = {} + validate_only = true + update_mask = {} + + update_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_branch_rule, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::BranchRule), request["branch_rule"] + assert_equal true, request["validate_only"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_branch_rule_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_branch_rule branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_branch_rule ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_branch_rule(::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_branch_rule_client_stub.call_rpc_count + end + end + + def test_delete_branch_rule + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + allow_missing = true + + delete_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_branch_rule, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_branch_rule_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_branch_rule({ name: name, allow_missing: allow_missing }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_branch_rule name: name, allow_missing: allow_missing do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_branch_rule ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_branch_rule({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_branch_rule(::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_branch_rule_client_stub.call_rpc_count + end + end + + def test_create_pull_request + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + pull_request = {} + + create_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequest), request["pull_request"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_pull_request({ parent: parent, pull_request: pull_request }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_pull_request parent: parent, pull_request: pull_request do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_pull_request ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_pull_request({ parent: parent, pull_request: pull_request }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_pull_request(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_pull_request_client_stub.call_rpc_count + end + end + + def test_get_pull_request + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::PullRequest.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_pull_request({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_pull_request name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_pull_request ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_pull_request({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_pull_request(::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_pull_request_client_stub.call_rpc_count + end + end + + def test_list_pull_requests + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_pull_requests_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_pull_requests, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_pull_requests_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_pull_requests({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_pull_requests parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_pull_requests ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_pull_requests({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_pull_requests(::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_pull_requests_client_stub.call_rpc_count + end + end + + def test_update_pull_request + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + pull_request = {} + update_mask = {} + + update_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequest), request["pull_request"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_pull_request({ pull_request: pull_request, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_pull_request pull_request: pull_request, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_pull_request ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_pull_request({ pull_request: pull_request, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_pull_request(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_pull_request_client_stub.call_rpc_count + end + end + + def test_merge_pull_request + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + merge_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :merge_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, merge_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.merge_pull_request({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.merge_pull_request name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.merge_pull_request ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.merge_pull_request({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.merge_pull_request(::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, merge_pull_request_client_stub.call_rpc_count + end + end + + def test_open_pull_request + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + open_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :open_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, open_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.open_pull_request({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.open_pull_request name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.open_pull_request ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.open_pull_request({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.open_pull_request(::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, open_pull_request_client_stub.call_rpc_count + end + end + + def test_close_pull_request + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + close_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :close_pull_request, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, close_pull_request_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.close_pull_request({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.close_pull_request name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.close_pull_request ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.close_pull_request({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.close_pull_request(::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, close_pull_request_client_stub.call_rpc_count + end + end + + def test_list_pull_request_file_diffs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_pull_request_file_diffs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_pull_request_file_diffs, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_pull_request_file_diffs_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_pull_request_file_diffs({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_pull_request_file_diffs name: name, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_pull_request_file_diffs ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_pull_request_file_diffs({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_pull_request_file_diffs(::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_pull_request_file_diffs_client_stub.call_rpc_count + end + end + + def test_fetch_tree + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + repository = "hello world" + ref = "hello world" + recursive = true + page_size = 42 + page_token = "hello world" + + fetch_tree_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_tree, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, request + assert_equal "hello world", request["repository"] + assert_equal "hello world", request["ref"] + assert_equal true, request["recursive"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_tree_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_tree({ repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.fetch_tree repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.fetch_tree ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.fetch_tree({ repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.fetch_tree(::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_tree_client_stub.call_rpc_count + end + end + + def test_fetch_blob + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + repository = "hello world" + sha = "hello world" + + fetch_blob_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_blob, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, request + assert_equal "hello world", request["repository"] + assert_equal "hello world", request["sha"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_blob_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_blob({ repository: repository, sha: sha }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.fetch_blob repository: repository, sha: sha do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.fetch_blob ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.fetch_blob({ repository: repository, sha: sha }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.fetch_blob(::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_blob_client_stub.call_rpc_count + end + end + + def test_create_issue + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + issue = {} + + create_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Issue), request["issue"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_issue({ parent: parent, issue: issue }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_issue parent: parent, issue: issue do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_issue ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_issue({ parent: parent, issue: issue }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_issue(::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_issue_client_stub.call_rpc_count + end + end + + def test_get_issue + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::Issue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_issue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_issue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_issue ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_issue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_issue(::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_issue_client_stub.call_rpc_count + end + end + + def test_list_issues + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_issues, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_issues_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_issues({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_issues parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_issues ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_issues({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_issues(::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_issues_client_stub.call_rpc_count + end + end + + def test_update_issue + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + issue = {} + update_mask = {} + + update_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Issue), request["issue"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_issue({ issue: issue, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_issue issue: issue, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_issue ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_issue({ issue: issue, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_issue(::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_issue_client_stub.call_rpc_count + end + end + + def test_delete_issue + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_issue({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_issue name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_issue ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_issue({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_issue(::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_issue_client_stub.call_rpc_count + end + end + + def test_open_issue + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + open_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :open_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, open_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.open_issue({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.open_issue name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.open_issue ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.open_issue({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.open_issue(::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, open_issue_client_stub.call_rpc_count + end + end + + def test_close_issue + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + close_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :close_issue, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, close_issue_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.close_issue({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.close_issue name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.close_issue ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.close_issue({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.close_issue(::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, close_issue_client_stub.call_rpc_count + end + end + + def test_get_pull_request_comment + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::PullRequestComment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_pull_request_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_pull_request_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_pull_request_comment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_pull_request_comment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_pull_request_comment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_pull_request_comment_client_stub.call_rpc_count + end + end + + def test_list_pull_request_comments + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_pull_request_comments, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_pull_request_comments_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_pull_request_comments({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_pull_request_comments parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_pull_request_comments({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_pull_request_comments_client_stub.call_rpc_count + end + end + + def test_create_pull_request_comment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + pull_request_comment = {} + + create_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_pull_request_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequestComment), request["pull_request_comment"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_pull_request_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_pull_request_comment parent: parent, pull_request_comment: pull_request_comment do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_pull_request_comment_client_stub.call_rpc_count + end + end + + def test_update_pull_request_comment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + pull_request_comment = {} + update_mask = {} + + update_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_pull_request_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequestComment), request["pull_request_comment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_pull_request_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_pull_request_comment pull_request_comment: pull_request_comment, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_pull_request_comment_client_stub.call_rpc_count + end + end + + def test_delete_pull_request_comment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_pull_request_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_pull_request_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_pull_request_comment({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_pull_request_comment name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_pull_request_comment({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_pull_request_comment_client_stub.call_rpc_count + end + end + + def test_batch_create_pull_request_comments + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_create_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_pull_request_comments, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_pull_request_comments_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_create_pull_request_comments({ parent: parent, requests: requests }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_create_pull_request_comments parent: parent, requests: requests do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_create_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_create_pull_request_comments({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_create_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_create_pull_request_comments_client_stub.call_rpc_count + end + end + + def test_resolve_pull_request_comments + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + auto_fill = true + + resolve_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resolve_pull_request_comments, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + assert_equal true, request["auto_fill"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, resolve_pull_request_comments_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.resolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.resolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.resolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, resolve_pull_request_comments_client_stub.call_rpc_count + end + end + + def test_unresolve_pull_request_comments + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + auto_fill = true + + unresolve_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :unresolve_pull_request_comments, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + assert_equal true, request["auto_fill"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, unresolve_pull_request_comments_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.unresolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.unresolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.unresolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, unresolve_pull_request_comments_client_stub.call_rpc_count + end + end + + def test_create_issue_comment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + issue_comment = {} + + create_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_issue_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::IssueComment), request["issue_comment"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_issue_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_issue_comment({ parent: parent, issue_comment: issue_comment }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_issue_comment parent: parent, issue_comment: issue_comment do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_issue_comment ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_issue_comment({ parent: parent, issue_comment: issue_comment }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_issue_comment(::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_issue_comment_client_stub.call_rpc_count + end + end + + def test_get_issue_comment + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::IssueComment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_issue_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_issue_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_issue_comment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_issue_comment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_issue_comment ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_issue_comment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_issue_comment(::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_issue_comment_client_stub.call_rpc_count + end + end + + def test_list_issue_comments + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_issue_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_issue_comments, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_issue_comments_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_issue_comments({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_issue_comments parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_issue_comments ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_issue_comments({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_issue_comments(::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_issue_comments_client_stub.call_rpc_count + end + end + + def test_update_issue_comment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + issue_comment = {} + update_mask = {} + + update_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_issue_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::IssueComment), request["issue_comment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_issue_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_issue_comment issue_comment: issue_comment, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_issue_comment ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_issue_comment(::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_issue_comment_client_stub.call_rpc_count + end + end + + def test_delete_issue_comment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_issue_comment, name + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_issue_comment_client_stub do + # Create client + c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_issue_comment({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_issue_comment name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_issue_comment ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_issue_comment({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_issue_comment(::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_issue_comment_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/helper.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-secure_source_manager-v1/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-v1/.gitignore b/owl-bot-staging/google-cloud-security-private_ca-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/.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-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-security-private_ca-v1/.repo-metadata.json new file mode 100644 index 000000000000..f7ac3d34f8c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/.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-v1/latest", + "distribution_name": "google-cloud-security-private_ca-v1", + "is_cloud": true, + "language": "ruby", + "name": "privateca", + "name_pretty": "Certificate Authority Service V1 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). Note that google-cloud-security-private_ca-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security-private_ca instead. See the readme for more details.", + "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-v1/.rubocop.yml b/owl-bot-staging/google-cloud-security-private_ca-v1/.rubocop.yml new file mode 100644 index 000000000000..f143186a635f --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security-private_ca-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-security-private_ca-v1.rb" diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/.toys.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/.yardopts b/owl-bot-staging/google-cloud-security-private_ca-v1/.yardopts new file mode 100644 index 000000000000..4cd4bdadd755 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Certificate Authority Service V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security-private_ca-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..b0dc4d853281 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security-private_ca-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-security-private_ca-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/security/private_ca/v1" + +client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new 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/v1" + +::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-security-private_ca-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/security/private_ca/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-security-private_ca-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/Gemfile b/owl-bot-staging/google-cloud-security-private_ca-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-v1/LICENSE.md b/owl-bot-staging/google-cloud-security-private_ca-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/README.md b/owl-bot-staging/google-cloud-security-private_ca-v1/README.md new file mode 100644 index 000000000000..de3b38eef2b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Certificate Authority Service V1 API + +The Certificate Authority Service API is a highly-available, scalable service that enables you to simplify and automate the management of private certificate authorities (CAs) while staying in control of your private keys. + +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). + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Certificate Authority Service V1 API. Most users should consider using +the main client gem, +[google-cloud-security-private_ca](https://rubygems.org/gems/google-cloud-security-private_ca). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-security-private_ca-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/privateca.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/security/private_ca/v1" + +client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new +request = ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new # (request fields as keyword arguments...) +response = client.create_certificate request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/certificate-authority-service/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/security/private_ca/v1" +require "logger" + +client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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-v1/Rakefile b/owl-bot-staging/google-cloud-security-private_ca-v1/Rakefile new file mode 100644 index 000000000000..bb7b3d9c8032 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-security-private_ca-v1 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-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security-private_ca-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security-private_ca-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-security-private_ca-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security-private_ca-v1" + header "google-cloud-security-private_ca-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security-private_ca-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security-private_ca-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-security-private_ca-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-security-private_ca-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-security-private_ca-v1/gapic_metadata.json new file mode 100644 index 000000000000..a3ae1a7a8d29 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/gapic_metadata.json @@ -0,0 +1,163 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.security.privateca.v1", + "libraryPackage": "::Google::Cloud::Security::PrivateCA::V1", + "services": { + "CertificateAuthorityService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client", + "rpcs": { + "CreateCertificate": { + "methods": [ + "create_certificate" + ] + }, + "GetCertificate": { + "methods": [ + "get_certificate" + ] + }, + "ListCertificates": { + "methods": [ + "list_certificates" + ] + }, + "RevokeCertificate": { + "methods": [ + "revoke_certificate" + ] + }, + "UpdateCertificate": { + "methods": [ + "update_certificate" + ] + }, + "ActivateCertificateAuthority": { + "methods": [ + "activate_certificate_authority" + ] + }, + "CreateCertificateAuthority": { + "methods": [ + "create_certificate_authority" + ] + }, + "DisableCertificateAuthority": { + "methods": [ + "disable_certificate_authority" + ] + }, + "EnableCertificateAuthority": { + "methods": [ + "enable_certificate_authority" + ] + }, + "FetchCertificateAuthorityCsr": { + "methods": [ + "fetch_certificate_authority_csr" + ] + }, + "GetCertificateAuthority": { + "methods": [ + "get_certificate_authority" + ] + }, + "ListCertificateAuthorities": { + "methods": [ + "list_certificate_authorities" + ] + }, + "UndeleteCertificateAuthority": { + "methods": [ + "undelete_certificate_authority" + ] + }, + "DeleteCertificateAuthority": { + "methods": [ + "delete_certificate_authority" + ] + }, + "UpdateCertificateAuthority": { + "methods": [ + "update_certificate_authority" + ] + }, + "CreateCaPool": { + "methods": [ + "create_ca_pool" + ] + }, + "UpdateCaPool": { + "methods": [ + "update_ca_pool" + ] + }, + "GetCaPool": { + "methods": [ + "get_ca_pool" + ] + }, + "ListCaPools": { + "methods": [ + "list_ca_pools" + ] + }, + "DeleteCaPool": { + "methods": [ + "delete_ca_pool" + ] + }, + "FetchCaCerts": { + "methods": [ + "fetch_ca_certs" + ] + }, + "GetCertificateRevocationList": { + "methods": [ + "get_certificate_revocation_list" + ] + }, + "ListCertificateRevocationLists": { + "methods": [ + "list_certificate_revocation_lists" + ] + }, + "UpdateCertificateRevocationList": { + "methods": [ + "update_certificate_revocation_list" + ] + }, + "CreateCertificateTemplate": { + "methods": [ + "create_certificate_template" + ] + }, + "DeleteCertificateTemplate": { + "methods": [ + "delete_certificate_template" + ] + }, + "GetCertificateTemplate": { + "methods": [ + "get_certificate_template" + ] + }, + "ListCertificateTemplates": { + "methods": [ + "list_certificate_templates" + ] + }, + "UpdateCertificateTemplate": { + "methods": [ + "update_certificate_template" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/google-cloud-security-private_ca-v1.gemspec b/owl-bot-staging/google-cloud-security-private_ca-v1/google-cloud-security-private_ca-v1.gemspec new file mode 100644 index 000000000000..07003500a08f --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/google-cloud-security-private_ca-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security/private_ca/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security-private_ca-v1" + gem.version = Google::Cloud::Security::PrivateCA::V1::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). Note that google-cloud-security-private_ca-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security-private_ca instead. See the readme for more details." + gem.summary = "The Certificate Authority Service API is a highly-available, scalable service that enables you to simplify and automate the management of private certificate authorities (CAs) while staying in control of your private keys." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.rb new file mode 100644 index 000000000000..ec80d7546971 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/security/private_ca/v1" diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.rb new file mode 100644 index 000000000000..2dcf3038bbe3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security/private_ca/v1/certificate_authority_service" +require "google/cloud/security/private_ca/v1/version" + +module Google + module Cloud + module Security + module PrivateCA + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/security/private_ca/v1" + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/security/private_ca/v1" + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/security/private_ca/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.rb new file mode 100644 index 000000000000..f9fc3eab4e89 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.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 "gapic/rest" + +module Google + module Cloud + module Security + module PrivateCA + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/security/private_ca/v1/rest" + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Security", "PrivateCA"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb new file mode 100644 index 000000000000..780346978920 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security/private_ca/v1/version" + +require "google/cloud/security/private_ca/v1/certificate_authority_service/credentials" +require "google/cloud/security/private_ca/v1/certificate_authority_service/paths" +require "google/cloud/security/private_ca/v1/certificate_authority_service/operations" +require "google/cloud/security/private_ca/v1/certificate_authority_service/client" +require "google/cloud/security/private_ca/v1/certificate_authority_service/rest" + +module Google + module Cloud + module Security + module PrivateCA + module V1 + ## + # [Certificate Authority + # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] + # manages private certificate authorities and issued certificates. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/security/private_ca/v1/certificate_authority_service" + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/security/private_ca/v1/certificate_authority_service/rest" + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + module CertificateAuthorityService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "certificate_authority_service", "helpers.rb" +require "google/cloud/security/private_ca/v1/certificate_authority_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb new file mode 100644 index 000000000000..29c542d7d4b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb @@ -0,0 +1,3815 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/security/privateca/v1/service_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Security + module PrivateCA + module V1 + module CertificateAuthorityService + ## + # Client for the CertificateAuthorityService service. + # + # [Certificate Authority + # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] + # manages private certificate authorities and issued certificates. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :certificate_authority_service_stub + + ## + # Configure the CertificateAuthorityService Client class. + # + # See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CertificateAuthorityService clients + # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Security", "PrivateCA", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CertificateAuthorityService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @certificate_authority_service_stub.universe_domain + end + + ## + # Create a new CertificateAuthorityService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CertificateAuthorityService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/security/privateca/v1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @certificate_authority_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @certificate_authority_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @certificate_authority_service_stub.endpoint + config.universe_domain = @certificate_authority_service_stub.universe_domain + config.logger = @certificate_authority_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @certificate_authority_service_stub.endpoint + config.universe_domain = @certificate_authority_service_stub.universe_domain + config.logger = @certificate_authority_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @certificate_authority_service_stub.logger + end + + # Service calls + + ## + # Create a new {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} + # in a given Project, Location from a particular + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # + # @overload create_certificate(request, options = nil) + # Pass arguments to `create_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil, validate_only: nil, issuing_certificate_authority_id: nil) + # Pass arguments to `create_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}, in the + # format `projects/*/locations/*/caPools/*`. + # @param certificate_id [::String] + # Optional. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the Enterprise + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#tier CertificateAuthority.tier}, + # but is optional and its value is ignored otherwise. + # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash] + # Required. A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} + # with initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, + # the server can check if original operation with the same request ID was + # received, and if so, will ignore the second request. This prevents clients + # from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If this is true, no + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} resource will + # be persisted regardless of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s + # {::Google::Cloud::Security::PrivateCA::V1::CaPool#tier tier}, and the returned + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} will not + # contain the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate#pem_certificate pem_certificate} + # field. + # @param issuing_certificate_authority_id [::String] + # Optional. The resource ID of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # that should issue the certificate. This optional field will ignore the + # load-balancing scheme of the Pool and directly issue the certificate from + # the CA with the specified ID, contained in the same + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} referenced by `parent`. + # Per-CA quota rules apply. If left empty, a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # will be chosen from the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} + # by the service. For example, to issue a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} from a + # Certificate Authority with resource name + # "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", + # you can set the + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#parent parent} + # to "projects/my-project/locations/us-central1/caPools/my-pool" and the + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#issuing_certificate_authority_id issuing_certificate_authority_id} + # to "my-ca". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new + # + # # Call the create_certificate method. + # result = client.create_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + # p result + # + def create_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :create_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. + # + # @overload get_certificate(request, options = nil) + # Pass arguments to `get_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_certificate(name: nil) + # Pass arguments to `get_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1::Certificate#name name} + # of the {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} to + # get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new + # + # # Call the get_certificate method. + # result = client.get_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + # p result + # + def get_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :get_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. + # + # @overload list_certificates(request, options = nil) + # Pass arguments to `list_certificates` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent associated with the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}, in the + # format `projects/*/locations/*/caPools/*`. The parent resource name can be + # in one of two forms: + # + # 1. **Specific CA Pool:** To list certificates within a single CA Pool: + # `projects/*/locations/*/caPools/*` + # + # 2. **All CA Pools in a Location:** To list certificates across *all* CA + # Pools in a given project and location, use the wildcard character (`-`) + # in place of the CA Pool ID. + # Example: `projects/*/locations/*/caPools/-` + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} to include + # in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} can + # subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. For + # details on supported filters and syntax, see [Certificates Filtering + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + # @param order_by [::String] + # Optional. Specify how the results should be sorted. For details on + # supported fields and syntax, see [Certificates Sorting + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::Certificate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::Certificate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new + # + # # Call the list_certificates method. + # result = client.list_certificates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::Certificate. + # p item + # end + # + def list_certificates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_certificates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_certificates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_certificates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :list_certificates, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificates, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Revoke a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. + # + # @overload revoke_certificate(request, options = nil) + # Pass arguments to `revoke_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload revoke_certificate(name: nil, reason: nil, request_id: nil) + # Pass arguments to `revoke_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the format + # `projects/*/locations/*/caPools/*/certificates/*`. + # @param reason [::Google::Cloud::Security::PrivateCA::V1::RevocationReason] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::RevocationReason RevocationReason} for + # revoking this certificate. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new + # + # # Call the revoke_certificate method. + # result = client.revoke_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + # p result + # + def revoke_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.revoke_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.revoke_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :revoke_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. + # Currently, the only field you can update is the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate#labels labels} field. + # + # @overload update_certificate(request, options = nil) + # Pass arguments to `update_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_certificate(certificate: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash] + # Required. {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} + # with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new + # + # # Call the update_certificate method. + # result = client.update_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + # p result + # + def update_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.certificate&.name + header_params["certificate.name"] = request.certificate.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :update_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Activate a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # that is in state + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION} + # and is of type + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. + # After the parent Certificate Authority signs a certificate signing request + # from + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr FetchCertificateAuthorityCsr}, + # this method can complete the activation process. + # + # @overload activate_certificate_authority(request, options = nil) + # Pass arguments to `activate_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil) + # Pass arguments to `activate_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param pem_ca_certificate [::String] + # Required. The signed CA certificate issued from + # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. + # @param subordinate_config [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig, ::Hash] + # Required. Must include information about the issuer of + # 'pem_ca_certificate', and any further issuers until the self-signed CA. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new + # + # # Call the activate_certificate_authority method. + # result = client.activate_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def activate_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.activate_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.activate_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :activate_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a new + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in a given Project and Location. + # + # @overload create_certificate_authority(request, options = nil) + # Pass arguments to `create_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil) + # Pass arguments to `create_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, + # in the format `projects/*/locations/*/caPools/*`. + # @param certificate_authority_id [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash] + # Required. A + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # with initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new + # + # # Call the create_certificate_authority method. + # result = client.create_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :create_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # + # @overload disable_certificate_authority(request, options = nil) + # Pass arguments to `disable_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload disable_certificate_authority(name: nil, request_id: nil, ignore_dependent_resources: nil) + # Pass arguments to `disable_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param ignore_dependent_resources [::Boolean] + # Optional. This field allows this CA to be disabled even if it's being + # depended on by another resource. However, doing so may result in unintended + # and unrecoverable effects on any dependent resources since the CA will + # no longer be able to issue certificates. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new + # + # # Call the disable_certificate_authority method. + # result = client.disable_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def disable_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.disable_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :disable_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # + # @overload enable_certificate_authority(request, options = nil) + # Pass arguments to `enable_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enable_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `enable_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new + # + # # Call the enable_certificate_authority method. + # result = client.enable_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def enable_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enable_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :enable_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch a certificate signing request (CSR) from a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # that is in state + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION} + # and is of type + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. + # The CSR must then be signed by the desired parent Certificate Authority, + # which could be another + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # resource, or could be an on-prem certificate authority. See also + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#activate_certificate_authority ActivateCertificateAuthority}. + # + # @overload fetch_certificate_authority_csr(request, options = nil) + # Pass arguments to `fetch_certificate_authority_csr` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_certificate_authority_csr(name: nil) + # Pass arguments to `fetch_certificate_authority_csr` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new + # + # # Call the fetch_certificate_authority_csr method. + # result = client.fetch_certificate_authority_csr request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse. + # p result + # + def fetch_certificate_authority_csr request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_certificate_authority_csr.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :fetch_certificate_authority_csr, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # + # @overload get_certificate_authority(request, options = nil) + # Pass arguments to `get_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_certificate_authority(name: nil) + # Pass arguments to `get_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new + # + # # Call the get_certificate_authority method. + # result = client.get_certificate_authority request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. + # p result + # + def get_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :get_certificate_authority, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}. + # + # @overload list_certificate_authorities(request, options = nil) + # Pass arguments to `list_certificate_authorities` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_certificate_authorities(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_authorities` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, + # in the format `projects/*/locations/*/caPools/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} + # to include in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new + # + # # Call the list_certificate_authorities method. + # result = client.list_certificate_authorities request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. + # p item + # end + # + def list_certificate_authorities request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_certificate_authorities.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_certificate_authorities.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :list_certificate_authorities, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_authorities, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undelete a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # that has been deleted. + # + # @overload undelete_certificate_authority(request, options = nil) + # Pass arguments to `undelete_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload undelete_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `undelete_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new + # + # # Call the undelete_certificate_authority method. + # result = client.undelete_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undelete_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.undelete_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.undelete_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undelete_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :undelete_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # + # @overload delete_certificate_authority(request, options = nil) + # Pass arguments to `delete_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_certificate_authority(name: nil, request_id: nil, ignore_active_certificates: nil, skip_grace_period: nil, ignore_dependent_resources: nil) + # Pass arguments to `delete_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param ignore_active_certificates [::Boolean] + # Optional. This field allows the CA to be deleted even if the CA has + # active certs. Active certs include both unrevoked and unexpired certs. + # @param skip_grace_period [::Boolean] + # Optional. If this flag is set, the Certificate Authority will be deleted as + # soon as possible without a 30-day grace period where undeletion would have + # been allowed. If you proceed, there will be no way to recover this CA. + # @param ignore_dependent_resources [::Boolean] + # Optional. This field allows this CA to be deleted even if it's being + # depended on by another resource. However, doing so may result in unintended + # and unrecoverable effects on any dependent resources since the CA will + # no longer be able to issue certificates. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new + # + # # Call the delete_certificate_authority method. + # result = client.delete_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :delete_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # + # @overload update_certificate_authority(request, options = nil) + # Pass arguments to `update_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_certificate_authority(certificate_authority: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash] + # Required. + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new + # + # # Call the update_certificate_authority method. + # result = client.update_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.certificate_authority&.name + header_params["certificate_authority.name"] = request.certificate_authority.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :update_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # + # @overload create_ca_pool(request, options = nil) + # Pass arguments to `create_ca_pool` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_ca_pool(parent: nil, ca_pool_id: nil, ca_pool: nil, request_id: nil) + # Pass arguments to `create_ca_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}, in the format + # `projects/*/locations/*`. + # @param ca_pool_id [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash] + # Required. A {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with + # initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new + # + # # Call the create_ca_pool method. + # result = client.create_ca_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_ca_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_ca_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_ca_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_ca_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :create_ca_pool, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # + # @overload update_ca_pool(request, options = nil) + # Pass arguments to `update_ca_pool` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_ca_pool(ca_pool: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_ca_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash] + # Required. {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with updated + # values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new + # + # # Call the update_ca_pool method. + # result = client.update_ca_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_ca_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_ca_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.ca_pool&.name + header_params["ca_pool.name"] = request.ca_pool.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_ca_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_ca_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :update_ca_pool, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # + # @overload get_ca_pool(request, options = nil) + # Pass arguments to `get_ca_pool` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_ca_pool(name: nil) + # Pass arguments to `get_ca_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1::CaPool#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::CaPool] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new + # + # # Call the get_ca_pool method. + # result = client.get_ca_pool request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CaPool. + # p result + # + def get_ca_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_ca_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_ca_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_ca_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :get_ca_pool, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}. + # + # @overload list_ca_pools(request, options = nil) + # Pass arguments to `list_ca_pools` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_ca_pools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_ca_pools` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}, in the format + # `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} to include in the + # response. Further {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} can + # subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CaPool>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CaPool>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new + # + # # Call the list_ca_pools method. + # result = client.list_ca_pools request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CaPool. + # p item + # end + # + def list_ca_pools request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_ca_pools.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_ca_pools.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_ca_pools.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :list_ca_pools, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_ca_pools, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # + # @overload delete_ca_pool(request, options = nil) + # Pass arguments to `delete_ca_pool` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_ca_pool(name: nil, request_id: nil, ignore_dependent_resources: nil) + # Pass arguments to `delete_ca_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format + # `projects/*/locations/*/caPools/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param ignore_dependent_resources [::Boolean] + # Optional. This field allows this pool to be deleted even if it's being + # depended on by another resource. However, doing so may result in unintended + # and unrecoverable effects on any dependent resources since the pool will + # no longer be able to issue certificates. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new + # + # # Call the delete_ca_pool method. + # result = client.delete_ca_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_ca_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_ca_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_ca_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_ca_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :delete_ca_pool, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchCaCerts returns the current trust anchor for the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. This will include CA + # certificate chains for all certificate authorities in the ENABLED, + # DISABLED, or STAGED states. + # + # @overload fetch_ca_certs(request, options = nil) + # Pass arguments to `fetch_ca_certs` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_ca_certs(ca_pool: nil, request_id: nil) + # Pass arguments to `fetch_ca_certs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param ca_pool [::String] + # Required. The resource name for the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format + # `projects/*/locations/*/caPools/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new + # + # # Call the fetch_ca_certs method. + # result = client.fetch_ca_certs request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse. + # p result + # + def fetch_ca_certs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_ca_certs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.ca_pool + header_params["ca_pool"] = request.ca_pool + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_ca_certs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_ca_certs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :fetch_ca_certs, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. + # + # @overload get_certificate_revocation_list(request, options = nil) + # Pass arguments to `get_certificate_revocation_list` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_certificate_revocation_list(name: nil) + # Pass arguments to `get_certificate_revocation_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList#name name} + # of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new + # + # # Call the get_certificate_revocation_list method. + # result = client.get_certificate_revocation_list request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. + # p result + # + def get_certificate_revocation_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_certificate_revocation_list.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :get_certificate_revocation_list, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}. + # + # @overload list_certificate_revocation_lists(request, options = nil) + # Pass arguments to `list_certificate_revocation_lists` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_certificate_revocation_lists(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_revocation_lists` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}, + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} + # to include in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new + # + # # Call the list_certificate_revocation_lists method. + # result = client.list_certificate_revocation_lists request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. + # p item + # end + # + def list_certificate_revocation_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_certificate_revocation_lists.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :list_certificate_revocation_lists, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_revocation_lists, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. + # + # @overload update_certificate_revocation_list(request, options = nil) + # Pass arguments to `update_certificate_revocation_list` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_certificate_revocation_list(certificate_revocation_list: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate_revocation_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_revocation_list [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList, ::Hash] + # Required. + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new + # + # # Call the update_certificate_revocation_list method. + # result = client.update_certificate_revocation_list request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_certificate_revocation_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_certificate_revocation_list.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.certificate_revocation_list&.name + header_params["certificate_revocation_list.name"] = request.certificate_revocation_list.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :update_certificate_revocation_list, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a new + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # in a given Project and Location. + # + # @overload create_certificate_template(request, options = nil) + # Pass arguments to `create_certificate_template` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_certificate_template(parent: nil, certificate_template_id: nil, certificate_template: nil, request_id: nil) + # Pass arguments to `create_certificate_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}, + # in the format `projects/*/locations/*`. + # @param certificate_template_id [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash] + # Required. A + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # with initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new + # + # # Call the create_certificate_template method. + # result = client.create_certificate_template request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_certificate_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_certificate_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_certificate_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_certificate_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :create_certificate_template, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # DeleteCertificateTemplate deletes a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. + # + # @overload delete_certificate_template(request, options = nil) + # Pass arguments to `delete_certificate_template` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_certificate_template(name: nil, request_id: nil) + # Pass arguments to `delete_certificate_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # in the format `projects/*/locations/*/certificateTemplates/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new + # + # # Call the delete_certificate_template method. + # result = client.delete_certificate_template request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_certificate_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_certificate_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_certificate_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_certificate_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :delete_certificate_template, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. + # + # @overload get_certificate_template(request, options = nil) + # Pass arguments to `get_certificate_template` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_certificate_template(name: nil) + # Pass arguments to `get_certificate_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new + # + # # Call the get_certificate_template method. + # result = client.get_certificate_template request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. + # p result + # + def get_certificate_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_certificate_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_certificate_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_certificate_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :get_certificate_template, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}. + # + # @overload list_certificate_templates(request, options = nil) + # Pass arguments to `list_certificate_templates` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_certificate_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_templates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}, + # in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} + # to include in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new + # + # # Call the list_certificate_templates method. + # result = client.list_certificate_templates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. + # p item + # end + # + def list_certificate_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_certificate_templates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_certificate_templates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_certificate_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :list_certificate_templates, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_templates, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. + # + # @overload update_certificate_template(request, options = nil) + # Pass arguments to `update_certificate_template` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_certificate_template(certificate_template: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash] + # Required. + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new + # + # # Call the update_certificate_template method. + # result = client.update_certificate_template request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_certificate_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_certificate_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.certificate_template&.name + header_params["certificate_template.name"] = request.certificate_template.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_certificate_template.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_certificate_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :update_certificate_template, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CertificateAuthorityService API. + # + # This class represents the configuration for CertificateAuthorityService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_certificate to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_certificate.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_certificate.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "privateca.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CertificateAuthorityService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate + ## + # RPC-specific configuration for `get_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate + ## + # RPC-specific configuration for `list_certificates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificates + ## + # RPC-specific configuration for `revoke_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :revoke_certificate + ## + # RPC-specific configuration for `update_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate + ## + # RPC-specific configuration for `activate_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :activate_certificate_authority + ## + # RPC-specific configuration for `create_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_authority + ## + # RPC-specific configuration for `disable_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_certificate_authority + ## + # RPC-specific configuration for `enable_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_certificate_authority + ## + # RPC-specific configuration for `fetch_certificate_authority_csr` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_certificate_authority_csr + ## + # RPC-specific configuration for `get_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_authority + ## + # RPC-specific configuration for `list_certificate_authorities` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_authorities + ## + # RPC-specific configuration for `undelete_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_certificate_authority + ## + # RPC-specific configuration for `delete_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate_authority + ## + # RPC-specific configuration for `update_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_authority + ## + # RPC-specific configuration for `create_ca_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :create_ca_pool + ## + # RPC-specific configuration for `update_ca_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :update_ca_pool + ## + # RPC-specific configuration for `get_ca_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :get_ca_pool + ## + # RPC-specific configuration for `list_ca_pools` + # @return [::Gapic::Config::Method] + # + attr_reader :list_ca_pools + ## + # RPC-specific configuration for `delete_ca_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_ca_pool + ## + # RPC-specific configuration for `fetch_ca_certs` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_ca_certs + ## + # RPC-specific configuration for `get_certificate_revocation_list` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_revocation_list + ## + # RPC-specific configuration for `list_certificate_revocation_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_revocation_lists + ## + # RPC-specific configuration for `update_certificate_revocation_list` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_revocation_list + ## + # RPC-specific configuration for `create_certificate_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_template + ## + # RPC-specific configuration for `delete_certificate_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate_template + ## + # RPC-specific configuration for `get_certificate_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_template + ## + # RPC-specific configuration for `list_certificate_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_templates + ## + # RPC-specific configuration for `update_certificate_template` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_template + + # @private + def initialize parent_rpcs = nil + create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate + @create_certificate = ::Gapic::Config::Method.new create_certificate_config + get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate + @get_certificate = ::Gapic::Config::Method.new get_certificate_config + list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates + @list_certificates = ::Gapic::Config::Method.new list_certificates_config + revoke_certificate_config = parent_rpcs.revoke_certificate if parent_rpcs.respond_to? :revoke_certificate + @revoke_certificate = ::Gapic::Config::Method.new revoke_certificate_config + update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate + @update_certificate = ::Gapic::Config::Method.new update_certificate_config + activate_certificate_authority_config = parent_rpcs.activate_certificate_authority if parent_rpcs.respond_to? :activate_certificate_authority + @activate_certificate_authority = ::Gapic::Config::Method.new activate_certificate_authority_config + create_certificate_authority_config = parent_rpcs.create_certificate_authority if parent_rpcs.respond_to? :create_certificate_authority + @create_certificate_authority = ::Gapic::Config::Method.new create_certificate_authority_config + disable_certificate_authority_config = parent_rpcs.disable_certificate_authority if parent_rpcs.respond_to? :disable_certificate_authority + @disable_certificate_authority = ::Gapic::Config::Method.new disable_certificate_authority_config + enable_certificate_authority_config = parent_rpcs.enable_certificate_authority if parent_rpcs.respond_to? :enable_certificate_authority + @enable_certificate_authority = ::Gapic::Config::Method.new enable_certificate_authority_config + fetch_certificate_authority_csr_config = parent_rpcs.fetch_certificate_authority_csr if parent_rpcs.respond_to? :fetch_certificate_authority_csr + @fetch_certificate_authority_csr = ::Gapic::Config::Method.new fetch_certificate_authority_csr_config + get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority + @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config + list_certificate_authorities_config = parent_rpcs.list_certificate_authorities if parent_rpcs.respond_to? :list_certificate_authorities + @list_certificate_authorities = ::Gapic::Config::Method.new list_certificate_authorities_config + undelete_certificate_authority_config = parent_rpcs.undelete_certificate_authority if parent_rpcs.respond_to? :undelete_certificate_authority + @undelete_certificate_authority = ::Gapic::Config::Method.new undelete_certificate_authority_config + delete_certificate_authority_config = parent_rpcs.delete_certificate_authority if parent_rpcs.respond_to? :delete_certificate_authority + @delete_certificate_authority = ::Gapic::Config::Method.new delete_certificate_authority_config + update_certificate_authority_config = parent_rpcs.update_certificate_authority if parent_rpcs.respond_to? :update_certificate_authority + @update_certificate_authority = ::Gapic::Config::Method.new update_certificate_authority_config + create_ca_pool_config = parent_rpcs.create_ca_pool if parent_rpcs.respond_to? :create_ca_pool + @create_ca_pool = ::Gapic::Config::Method.new create_ca_pool_config + update_ca_pool_config = parent_rpcs.update_ca_pool if parent_rpcs.respond_to? :update_ca_pool + @update_ca_pool = ::Gapic::Config::Method.new update_ca_pool_config + get_ca_pool_config = parent_rpcs.get_ca_pool if parent_rpcs.respond_to? :get_ca_pool + @get_ca_pool = ::Gapic::Config::Method.new get_ca_pool_config + list_ca_pools_config = parent_rpcs.list_ca_pools if parent_rpcs.respond_to? :list_ca_pools + @list_ca_pools = ::Gapic::Config::Method.new list_ca_pools_config + delete_ca_pool_config = parent_rpcs.delete_ca_pool if parent_rpcs.respond_to? :delete_ca_pool + @delete_ca_pool = ::Gapic::Config::Method.new delete_ca_pool_config + fetch_ca_certs_config = parent_rpcs.fetch_ca_certs if parent_rpcs.respond_to? :fetch_ca_certs + @fetch_ca_certs = ::Gapic::Config::Method.new fetch_ca_certs_config + get_certificate_revocation_list_config = parent_rpcs.get_certificate_revocation_list if parent_rpcs.respond_to? :get_certificate_revocation_list + @get_certificate_revocation_list = ::Gapic::Config::Method.new get_certificate_revocation_list_config + list_certificate_revocation_lists_config = parent_rpcs.list_certificate_revocation_lists if parent_rpcs.respond_to? :list_certificate_revocation_lists + @list_certificate_revocation_lists = ::Gapic::Config::Method.new list_certificate_revocation_lists_config + update_certificate_revocation_list_config = parent_rpcs.update_certificate_revocation_list if parent_rpcs.respond_to? :update_certificate_revocation_list + @update_certificate_revocation_list = ::Gapic::Config::Method.new update_certificate_revocation_list_config + create_certificate_template_config = parent_rpcs.create_certificate_template if parent_rpcs.respond_to? :create_certificate_template + @create_certificate_template = ::Gapic::Config::Method.new create_certificate_template_config + delete_certificate_template_config = parent_rpcs.delete_certificate_template if parent_rpcs.respond_to? :delete_certificate_template + @delete_certificate_template = ::Gapic::Config::Method.new delete_certificate_template_config + get_certificate_template_config = parent_rpcs.get_certificate_template if parent_rpcs.respond_to? :get_certificate_template + @get_certificate_template = ::Gapic::Config::Method.new get_certificate_template_config + list_certificate_templates_config = parent_rpcs.list_certificate_templates if parent_rpcs.respond_to? :list_certificate_templates + @list_certificate_templates = ::Gapic::Config::Method.new list_certificate_templates_config + update_certificate_template_config = parent_rpcs.update_certificate_template if parent_rpcs.respond_to? :update_certificate_template + @update_certificate_template = ::Gapic::Config::Method.new update_certificate_template_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.rb new file mode 100644 index 000000000000..47ad11aa913e --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Security + module PrivateCA + module V1 + module CertificateAuthorityService + # Credentials for the CertificateAuthorityService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "PRIVATE_CA_CREDENTIALS", + "PRIVATE_CA_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "PRIVATE_CA_CREDENTIALS_JSON", + "PRIVATE_CA_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb new file mode 100644 index 000000000000..23f248bdc84e --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb @@ -0,0 +1,845 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Security + module PrivateCA + module V1 + module CertificateAuthorityService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CertificateAuthorityService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CertificateAuthorityService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "privateca.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb new file mode 100644 index 000000000000..57c61d556fb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + module CertificateAuthorityService + # Path helper methods for the CertificateAuthorityService API. + module Paths + ## + # Create a fully-qualified CaPool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/caPools/{ca_pool}` + # + # @param project [String] + # @param location [String] + # @param ca_pool [String] + # + # @return [::String] + def ca_pool_path project:, location:, ca_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/caPools/#{ca_pool}" + end + + ## + # Create a fully-qualified Certificate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}` + # + # @param project [String] + # @param location [String] + # @param ca_pool [String] + # @param certificate [String] + # + # @return [::String] + def certificate_path project:, location:, ca_pool:, certificate: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "ca_pool cannot contain /" if ca_pool.to_s.include? "/" + + "projects/#{project}/locations/#{location}/caPools/#{ca_pool}/certificates/#{certificate}" + end + + ## + # Create a fully-qualified CertificateAuthority resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}` + # + # @param project [String] + # @param location [String] + # @param ca_pool [String] + # @param certificate_authority [String] + # + # @return [::String] + def certificate_authority_path project:, location:, ca_pool:, certificate_authority: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "ca_pool cannot contain /" if ca_pool.to_s.include? "/" + + "projects/#{project}/locations/#{location}/caPools/#{ca_pool}/certificateAuthorities/#{certificate_authority}" + end + + ## + # Create a fully-qualified CertificateRevocationList resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}` + # + # @param project [String] + # @param location [String] + # @param ca_pool [String] + # @param certificate_authority [String] + # @param certificate_revocation_list [String] + # + # @return [::String] + def certificate_revocation_list_path project:, location:, ca_pool:, certificate_authority:, certificate_revocation_list: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "ca_pool cannot contain /" if ca_pool.to_s.include? "/" + raise ::ArgumentError, "certificate_authority cannot contain /" if certificate_authority.to_s.include? "/" + + "projects/#{project}/locations/#{location}/caPools/#{ca_pool}/certificateAuthorities/#{certificate_authority}/certificateRevocationLists/#{certificate_revocation_list}" + end + + ## + # Create a fully-qualified CertificateTemplate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/certificateTemplates/{certificate_template}` + # + # @param project [String] + # @param location [String] + # @param certificate_template [String] + # + # @return [::String] + def certificate_template_path project:, location:, certificate_template: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/certificateTemplates/#{certificate_template}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb new file mode 100644 index 000000000000..04c2876adc55 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security/private_ca/v1/version" +require "google/cloud/security/private_ca/v1/bindings_override" + +require "google/cloud/security/private_ca/v1/certificate_authority_service/credentials" +require "google/cloud/security/private_ca/v1/certificate_authority_service/paths" +require "google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations" +require "google/cloud/security/private_ca/v1/certificate_authority_service/rest/client" + +module Google + module Cloud + module Security + module PrivateCA + module V1 + ## + # [Certificate Authority + # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] + # manages private certificate authorities and issued certificates. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/security/private_ca/v1/certificate_authority_service/rest" + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + module CertificateAuthorityService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/security/private_ca/v1/certificate_authority_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb new file mode 100644 index 000000000000..840608d90785 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb @@ -0,0 +1,3578 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/security/privateca/v1/service_pb" +require "google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Security + module PrivateCA + module V1 + module CertificateAuthorityService + module Rest + ## + # REST client for the CertificateAuthorityService service. + # + # [Certificate Authority + # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] + # manages private certificate authorities and issued certificates. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :certificate_authority_service_stub + + ## + # Configure the CertificateAuthorityService Client class. + # + # See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CertificateAuthorityService clients + # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Security", "PrivateCA", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CertificateAuthorityService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @certificate_authority_service_stub.universe_domain + end + + ## + # Create a new CertificateAuthorityService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CertificateAuthorityService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @certificate_authority_service_stub = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @certificate_authority_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @certificate_authority_service_stub.endpoint + config.universe_domain = @certificate_authority_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @certificate_authority_service_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @certificate_authority_service_stub.endpoint + config.universe_domain = @certificate_authority_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @certificate_authority_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @certificate_authority_service_stub.logger + end + + # Service calls + + ## + # Create a new {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} + # in a given Project, Location from a particular + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # + # @overload create_certificate(request, options = nil) + # Pass arguments to `create_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil, validate_only: nil, issuing_certificate_authority_id: nil) + # Pass arguments to `create_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}, in the + # format `projects/*/locations/*/caPools/*`. + # @param certificate_id [::String] + # Optional. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the Enterprise + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#tier CertificateAuthority.tier}, + # but is optional and its value is ignored otherwise. + # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash] + # Required. A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} + # with initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, + # the server can check if original operation with the same request ID was + # received, and if so, will ignore the second request. This prevents clients + # from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param validate_only [::Boolean] + # Optional. If this is true, no + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} resource will + # be persisted regardless of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s + # {::Google::Cloud::Security::PrivateCA::V1::CaPool#tier tier}, and the returned + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} will not + # contain the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate#pem_certificate pem_certificate} + # field. + # @param issuing_certificate_authority_id [::String] + # Optional. The resource ID of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # that should issue the certificate. This optional field will ignore the + # load-balancing scheme of the Pool and directly issue the certificate from + # the CA with the specified ID, contained in the same + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} referenced by `parent`. + # Per-CA quota rules apply. If left empty, a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # will be chosen from the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} + # by the service. For example, to issue a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} from a + # Certificate Authority with resource name + # "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", + # you can set the + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#parent parent} + # to "projects/my-project/locations/us-central1/caPools/my-pool" and the + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#issuing_certificate_authority_id issuing_certificate_authority_id} + # to "my-ca". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new + # + # # Call the create_certificate method. + # result = client.create_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + # p result + # + def create_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.create_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. + # + # @overload get_certificate(request, options = nil) + # Pass arguments to `get_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_certificate(name: nil) + # Pass arguments to `get_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1::Certificate#name name} + # of the {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} to + # get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new + # + # # Call the get_certificate method. + # result = client.get_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + # p result + # + def get_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.get_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. + # + # @overload list_certificates(request, options = nil) + # Pass arguments to `list_certificates` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the parent associated with the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}, in the + # format `projects/*/locations/*/caPools/*`. The parent resource name can be + # in one of two forms: + # + # 1. **Specific CA Pool:** To list certificates within a single CA Pool: + # `projects/*/locations/*/caPools/*` + # + # 2. **All CA Pools in a Location:** To list certificates across *all* CA + # Pools in a given project and location, use the wildcard character (`-`) + # in place of the CA Pool ID. + # Example: `projects/*/locations/*/caPools/-` + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} to include + # in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} can + # subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. For + # details on supported filters and syntax, see [Certificates Filtering + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + # @param order_by [::String] + # Optional. Specify how the results should be sorted. For details on + # supported fields and syntax, see [Certificates Sorting + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::Certificate>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::Certificate>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new + # + # # Call the list_certificates method. + # result = client.list_certificates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::Certificate. + # p item + # end + # + def list_certificates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_certificates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_certificates.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_certificates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.list_certificates request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificates, "certificates", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Revoke a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. + # + # @overload revoke_certificate(request, options = nil) + # Pass arguments to `revoke_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload revoke_certificate(name: nil, reason: nil, request_id: nil) + # Pass arguments to `revoke_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the format + # `projects/*/locations/*/caPools/*/certificates/*`. + # @param reason [::Google::Cloud::Security::PrivateCA::V1::RevocationReason] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::RevocationReason RevocationReason} for + # revoking this certificate. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new + # + # # Call the revoke_certificate method. + # result = client.revoke_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + # p result + # + def revoke_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.revoke_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.revoke_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.revoke_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. + # Currently, the only field you can update is the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate#labels labels} field. + # + # @overload update_certificate(request, options = nil) + # Pass arguments to `update_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_certificate(certificate: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash] + # Required. {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} + # with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new + # + # # Call the update_certificate method. + # result = client.update_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + # p result + # + def update_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.update_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Activate a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # that is in state + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION} + # and is of type + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. + # After the parent Certificate Authority signs a certificate signing request + # from + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client#fetch_certificate_authority_csr FetchCertificateAuthorityCsr}, + # this method can complete the activation process. + # + # @overload activate_certificate_authority(request, options = nil) + # Pass arguments to `activate_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil) + # Pass arguments to `activate_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param pem_ca_certificate [::String] + # Required. The signed CA certificate issued from + # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. + # @param subordinate_config [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig, ::Hash] + # Required. Must include information about the issuer of + # 'pem_ca_certificate', and any further issuers until the self-signed CA. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new + # + # # Call the activate_certificate_authority method. + # result = client.activate_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def activate_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.activate_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.activate_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.activate_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a new + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in a given Project and Location. + # + # @overload create_certificate_authority(request, options = nil) + # Pass arguments to `create_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil) + # Pass arguments to `create_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, + # in the format `projects/*/locations/*/caPools/*`. + # @param certificate_authority_id [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash] + # Required. A + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # with initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new + # + # # Call the create_certificate_authority method. + # result = client.create_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.create_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # + # @overload disable_certificate_authority(request, options = nil) + # Pass arguments to `disable_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload disable_certificate_authority(name: nil, request_id: nil, ignore_dependent_resources: nil) + # Pass arguments to `disable_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param ignore_dependent_resources [::Boolean] + # Optional. This field allows this CA to be disabled even if it's being + # depended on by another resource. However, doing so may result in unintended + # and unrecoverable effects on any dependent resources since the CA will + # no longer be able to issue certificates. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new + # + # # Call the disable_certificate_authority method. + # result = client.disable_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def disable_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.disable_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.disable_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # + # @overload enable_certificate_authority(request, options = nil) + # Pass arguments to `enable_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enable_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `enable_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new + # + # # Call the enable_certificate_authority method. + # result = client.enable_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def enable_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enable_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.enable_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch a certificate signing request (CSR) from a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # that is in state + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION} + # and is of type + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. + # The CSR must then be signed by the desired parent Certificate Authority, + # which could be another + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # resource, or could be an on-prem certificate authority. See also + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client#activate_certificate_authority ActivateCertificateAuthority}. + # + # @overload fetch_certificate_authority_csr(request, options = nil) + # Pass arguments to `fetch_certificate_authority_csr` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_certificate_authority_csr(name: nil) + # Pass arguments to `fetch_certificate_authority_csr` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new + # + # # Call the fetch_certificate_authority_csr method. + # result = client.fetch_certificate_authority_csr request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse. + # p result + # + def fetch_certificate_authority_csr request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_certificate_authority_csr.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.fetch_certificate_authority_csr request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # + # @overload get_certificate_authority(request, options = nil) + # Pass arguments to `get_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_certificate_authority(name: nil) + # Pass arguments to `get_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new + # + # # Call the get_certificate_authority method. + # result = client.get_certificate_authority request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. + # p result + # + def get_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.get_certificate_authority request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}. + # + # @overload list_certificate_authorities(request, options = nil) + # Pass arguments to `list_certificate_authorities` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_certificate_authorities(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_authorities` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, + # in the format `projects/*/locations/*/caPools/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} + # to include in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new + # + # # Call the list_certificate_authorities method. + # result = client.list_certificate_authorities request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. + # p item + # end + # + def list_certificate_authorities request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_certificate_authorities.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_certificate_authorities.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.list_certificate_authorities request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_authorities, "certificate_authorities", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undelete a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # that has been deleted. + # + # @overload undelete_certificate_authority(request, options = nil) + # Pass arguments to `undelete_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload undelete_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `undelete_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new + # + # # Call the undelete_certificate_authority method. + # result = client.undelete_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undelete_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.undelete_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.undelete_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undelete_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.undelete_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # + # @overload delete_certificate_authority(request, options = nil) + # Pass arguments to `delete_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_certificate_authority(name: nil, request_id: nil, ignore_active_certificates: nil, skip_grace_period: nil, ignore_dependent_resources: nil) + # Pass arguments to `delete_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param ignore_active_certificates [::Boolean] + # Optional. This field allows the CA to be deleted even if the CA has + # active certs. Active certs include both unrevoked and unexpired certs. + # @param skip_grace_period [::Boolean] + # Optional. If this flag is set, the Certificate Authority will be deleted as + # soon as possible without a 30-day grace period where undeletion would have + # been allowed. If you proceed, there will be no way to recover this CA. + # @param ignore_dependent_resources [::Boolean] + # Optional. This field allows this CA to be deleted even if it's being + # depended on by another resource. However, doing so may result in unintended + # and unrecoverable effects on any dependent resources since the CA will + # no longer be able to issue certificates. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new + # + # # Call the delete_certificate_authority method. + # result = client.delete_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.delete_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # + # @overload update_certificate_authority(request, options = nil) + # Pass arguments to `update_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_certificate_authority(certificate_authority: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash] + # Required. + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new + # + # # Call the update_certificate_authority method. + # result = client.update_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.update_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # + # @overload create_ca_pool(request, options = nil) + # Pass arguments to `create_ca_pool` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_ca_pool(parent: nil, ca_pool_id: nil, ca_pool: nil, request_id: nil) + # Pass arguments to `create_ca_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}, in the format + # `projects/*/locations/*`. + # @param ca_pool_id [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash] + # Required. A {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with + # initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new + # + # # Call the create_ca_pool method. + # result = client.create_ca_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_ca_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_ca_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_ca_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_ca_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.create_ca_pool request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # + # @overload update_ca_pool(request, options = nil) + # Pass arguments to `update_ca_pool` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_ca_pool(ca_pool: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_ca_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash] + # Required. {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with updated + # values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new + # + # # Call the update_ca_pool method. + # result = client.update_ca_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_ca_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_ca_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_ca_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_ca_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.update_ca_pool request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # + # @overload get_ca_pool(request, options = nil) + # Pass arguments to `get_ca_pool` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_ca_pool(name: nil) + # Pass arguments to `get_ca_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1::CaPool#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CaPool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new + # + # # Call the get_ca_pool method. + # result = client.get_ca_pool request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CaPool. + # p result + # + def get_ca_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_ca_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_ca_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_ca_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.get_ca_pool request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}. + # + # @overload list_ca_pools(request, options = nil) + # Pass arguments to `list_ca_pools` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_ca_pools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_ca_pools` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}, in the format + # `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} to include in the + # response. Further {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} can + # subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CaPool>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CaPool>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new + # + # # Call the list_ca_pools method. + # result = client.list_ca_pools request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CaPool. + # p item + # end + # + def list_ca_pools request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_ca_pools.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_ca_pools.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_ca_pools.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.list_ca_pools request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_ca_pools, "ca_pools", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # + # @overload delete_ca_pool(request, options = nil) + # Pass arguments to `delete_ca_pool` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_ca_pool(name: nil, request_id: nil, ignore_dependent_resources: nil) + # Pass arguments to `delete_ca_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format + # `projects/*/locations/*/caPools/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param ignore_dependent_resources [::Boolean] + # Optional. This field allows this pool to be deleted even if it's being + # depended on by another resource. However, doing so may result in unintended + # and unrecoverable effects on any dependent resources since the pool will + # no longer be able to issue certificates. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new + # + # # Call the delete_ca_pool method. + # result = client.delete_ca_pool request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_ca_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_ca_pool.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_ca_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_ca_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.delete_ca_pool request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # FetchCaCerts returns the current trust anchor for the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. This will include CA + # certificate chains for all certificate authorities in the ENABLED, + # DISABLED, or STAGED states. + # + # @overload fetch_ca_certs(request, options = nil) + # Pass arguments to `fetch_ca_certs` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_ca_certs(ca_pool: nil, request_id: nil) + # Pass arguments to `fetch_ca_certs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param ca_pool [::String] + # Required. The resource name for the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format + # `projects/*/locations/*/caPools/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new + # + # # Call the fetch_ca_certs method. + # result = client.fetch_ca_certs request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse. + # p result + # + def fetch_ca_certs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_ca_certs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_ca_certs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_ca_certs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.fetch_ca_certs request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. + # + # @overload get_certificate_revocation_list(request, options = nil) + # Pass arguments to `get_certificate_revocation_list` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_certificate_revocation_list(name: nil) + # Pass arguments to `get_certificate_revocation_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList#name name} + # of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new + # + # # Call the get_certificate_revocation_list method. + # result = client.get_certificate_revocation_list request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. + # p result + # + def get_certificate_revocation_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_certificate_revocation_list.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.get_certificate_revocation_list request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}. + # + # @overload list_certificate_revocation_lists(request, options = nil) + # Pass arguments to `list_certificate_revocation_lists` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_certificate_revocation_lists(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_revocation_lists` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}, + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} + # to include in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new + # + # # Call the list_certificate_revocation_lists method. + # result = client.list_certificate_revocation_lists request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. + # p item + # end + # + def list_certificate_revocation_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_certificate_revocation_lists.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.list_certificate_revocation_lists request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_revocation_lists, "certificate_revocation_lists", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. + # + # @overload update_certificate_revocation_list(request, options = nil) + # Pass arguments to `update_certificate_revocation_list` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_certificate_revocation_list(certificate_revocation_list: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate_revocation_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_revocation_list [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList, ::Hash] + # Required. + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new + # + # # Call the update_certificate_revocation_list method. + # result = client.update_certificate_revocation_list request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_certificate_revocation_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_certificate_revocation_list.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.update_certificate_revocation_list request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a new + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # in a given Project and Location. + # + # @overload create_certificate_template(request, options = nil) + # Pass arguments to `create_certificate_template` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_certificate_template(parent: nil, certificate_template_id: nil, certificate_template: nil, request_id: nil) + # Pass arguments to `create_certificate_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}, + # in the format `projects/*/locations/*`. + # @param certificate_template_id [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash] + # Required. A + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # with initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new + # + # # Call the create_certificate_template method. + # result = client.create_certificate_template request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_certificate_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_certificate_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_certificate_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_certificate_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.create_certificate_template request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # DeleteCertificateTemplate deletes a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. + # + # @overload delete_certificate_template(request, options = nil) + # Pass arguments to `delete_certificate_template` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_certificate_template(name: nil, request_id: nil) + # Pass arguments to `delete_certificate_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # in the format `projects/*/locations/*/certificateTemplates/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new + # + # # Call the delete_certificate_template method. + # result = client.delete_certificate_template request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_certificate_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_certificate_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_certificate_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_certificate_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.delete_certificate_template request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. + # + # @overload get_certificate_template(request, options = nil) + # Pass arguments to `get_certificate_template` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_certificate_template(name: nil) + # Pass arguments to `get_certificate_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new + # + # # Call the get_certificate_template method. + # result = client.get_certificate_template request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. + # p result + # + def get_certificate_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_certificate_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_certificate_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.get_certificate_template request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}. + # + # @overload list_certificate_templates(request, options = nil) + # Pass arguments to `list_certificate_templates` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_certificate_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_templates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}, + # in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} + # to include in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new + # + # # Call the list_certificate_templates method. + # result = client.list_certificate_templates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. + # p item + # end + # + def list_certificate_templates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_certificate_templates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_certificate_templates.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_certificate_templates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.list_certificate_templates request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_templates, "certificate_templates", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. + # + # @overload update_certificate_template(request, options = nil) + # Pass arguments to `update_certificate_template` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_certificate_template(certificate_template: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate_template` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash] + # Required. + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new + # + # # Call the update_certificate_template method. + # result = client.update_certificate_template request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_certificate_template request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_certificate_template.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_certificate_template.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_certificate_template.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.update_certificate_template request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CertificateAuthorityService REST API. + # + # This class represents the configuration for CertificateAuthorityService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_certificate to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_certificate.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_certificate.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "privateca.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the CertificateAuthorityService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate + ## + # RPC-specific configuration for `get_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate + ## + # RPC-specific configuration for `list_certificates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificates + ## + # RPC-specific configuration for `revoke_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :revoke_certificate + ## + # RPC-specific configuration for `update_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate + ## + # RPC-specific configuration for `activate_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :activate_certificate_authority + ## + # RPC-specific configuration for `create_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_authority + ## + # RPC-specific configuration for `disable_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_certificate_authority + ## + # RPC-specific configuration for `enable_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_certificate_authority + ## + # RPC-specific configuration for `fetch_certificate_authority_csr` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_certificate_authority_csr + ## + # RPC-specific configuration for `get_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_authority + ## + # RPC-specific configuration for `list_certificate_authorities` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_authorities + ## + # RPC-specific configuration for `undelete_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_certificate_authority + ## + # RPC-specific configuration for `delete_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate_authority + ## + # RPC-specific configuration for `update_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_authority + ## + # RPC-specific configuration for `create_ca_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :create_ca_pool + ## + # RPC-specific configuration for `update_ca_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :update_ca_pool + ## + # RPC-specific configuration for `get_ca_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :get_ca_pool + ## + # RPC-specific configuration for `list_ca_pools` + # @return [::Gapic::Config::Method] + # + attr_reader :list_ca_pools + ## + # RPC-specific configuration for `delete_ca_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_ca_pool + ## + # RPC-specific configuration for `fetch_ca_certs` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_ca_certs + ## + # RPC-specific configuration for `get_certificate_revocation_list` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_revocation_list + ## + # RPC-specific configuration for `list_certificate_revocation_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_revocation_lists + ## + # RPC-specific configuration for `update_certificate_revocation_list` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_revocation_list + ## + # RPC-specific configuration for `create_certificate_template` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_template + ## + # RPC-specific configuration for `delete_certificate_template` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate_template + ## + # RPC-specific configuration for `get_certificate_template` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_template + ## + # RPC-specific configuration for `list_certificate_templates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_templates + ## + # RPC-specific configuration for `update_certificate_template` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_template + + # @private + def initialize parent_rpcs = nil + create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate + @create_certificate = ::Gapic::Config::Method.new create_certificate_config + get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate + @get_certificate = ::Gapic::Config::Method.new get_certificate_config + list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates + @list_certificates = ::Gapic::Config::Method.new list_certificates_config + revoke_certificate_config = parent_rpcs.revoke_certificate if parent_rpcs.respond_to? :revoke_certificate + @revoke_certificate = ::Gapic::Config::Method.new revoke_certificate_config + update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate + @update_certificate = ::Gapic::Config::Method.new update_certificate_config + activate_certificate_authority_config = parent_rpcs.activate_certificate_authority if parent_rpcs.respond_to? :activate_certificate_authority + @activate_certificate_authority = ::Gapic::Config::Method.new activate_certificate_authority_config + create_certificate_authority_config = parent_rpcs.create_certificate_authority if parent_rpcs.respond_to? :create_certificate_authority + @create_certificate_authority = ::Gapic::Config::Method.new create_certificate_authority_config + disable_certificate_authority_config = parent_rpcs.disable_certificate_authority if parent_rpcs.respond_to? :disable_certificate_authority + @disable_certificate_authority = ::Gapic::Config::Method.new disable_certificate_authority_config + enable_certificate_authority_config = parent_rpcs.enable_certificate_authority if parent_rpcs.respond_to? :enable_certificate_authority + @enable_certificate_authority = ::Gapic::Config::Method.new enable_certificate_authority_config + fetch_certificate_authority_csr_config = parent_rpcs.fetch_certificate_authority_csr if parent_rpcs.respond_to? :fetch_certificate_authority_csr + @fetch_certificate_authority_csr = ::Gapic::Config::Method.new fetch_certificate_authority_csr_config + get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority + @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config + list_certificate_authorities_config = parent_rpcs.list_certificate_authorities if parent_rpcs.respond_to? :list_certificate_authorities + @list_certificate_authorities = ::Gapic::Config::Method.new list_certificate_authorities_config + undelete_certificate_authority_config = parent_rpcs.undelete_certificate_authority if parent_rpcs.respond_to? :undelete_certificate_authority + @undelete_certificate_authority = ::Gapic::Config::Method.new undelete_certificate_authority_config + delete_certificate_authority_config = parent_rpcs.delete_certificate_authority if parent_rpcs.respond_to? :delete_certificate_authority + @delete_certificate_authority = ::Gapic::Config::Method.new delete_certificate_authority_config + update_certificate_authority_config = parent_rpcs.update_certificate_authority if parent_rpcs.respond_to? :update_certificate_authority + @update_certificate_authority = ::Gapic::Config::Method.new update_certificate_authority_config + create_ca_pool_config = parent_rpcs.create_ca_pool if parent_rpcs.respond_to? :create_ca_pool + @create_ca_pool = ::Gapic::Config::Method.new create_ca_pool_config + update_ca_pool_config = parent_rpcs.update_ca_pool if parent_rpcs.respond_to? :update_ca_pool + @update_ca_pool = ::Gapic::Config::Method.new update_ca_pool_config + get_ca_pool_config = parent_rpcs.get_ca_pool if parent_rpcs.respond_to? :get_ca_pool + @get_ca_pool = ::Gapic::Config::Method.new get_ca_pool_config + list_ca_pools_config = parent_rpcs.list_ca_pools if parent_rpcs.respond_to? :list_ca_pools + @list_ca_pools = ::Gapic::Config::Method.new list_ca_pools_config + delete_ca_pool_config = parent_rpcs.delete_ca_pool if parent_rpcs.respond_to? :delete_ca_pool + @delete_ca_pool = ::Gapic::Config::Method.new delete_ca_pool_config + fetch_ca_certs_config = parent_rpcs.fetch_ca_certs if parent_rpcs.respond_to? :fetch_ca_certs + @fetch_ca_certs = ::Gapic::Config::Method.new fetch_ca_certs_config + get_certificate_revocation_list_config = parent_rpcs.get_certificate_revocation_list if parent_rpcs.respond_to? :get_certificate_revocation_list + @get_certificate_revocation_list = ::Gapic::Config::Method.new get_certificate_revocation_list_config + list_certificate_revocation_lists_config = parent_rpcs.list_certificate_revocation_lists if parent_rpcs.respond_to? :list_certificate_revocation_lists + @list_certificate_revocation_lists = ::Gapic::Config::Method.new list_certificate_revocation_lists_config + update_certificate_revocation_list_config = parent_rpcs.update_certificate_revocation_list if parent_rpcs.respond_to? :update_certificate_revocation_list + @update_certificate_revocation_list = ::Gapic::Config::Method.new update_certificate_revocation_list_config + create_certificate_template_config = parent_rpcs.create_certificate_template if parent_rpcs.respond_to? :create_certificate_template + @create_certificate_template = ::Gapic::Config::Method.new create_certificate_template_config + delete_certificate_template_config = parent_rpcs.delete_certificate_template if parent_rpcs.respond_to? :delete_certificate_template + @delete_certificate_template = ::Gapic::Config::Method.new delete_certificate_template_config + get_certificate_template_config = parent_rpcs.get_certificate_template if parent_rpcs.respond_to? :get_certificate_template + @get_certificate_template = ::Gapic::Config::Method.new get_certificate_template_config + list_certificate_templates_config = parent_rpcs.list_certificate_templates if parent_rpcs.respond_to? :list_certificate_templates + @list_certificate_templates = ::Gapic::Config::Method.new list_certificate_templates_config + update_certificate_template_config = parent_rpcs.update_certificate_template if parent_rpcs.respond_to? :update_certificate_template + @update_certificate_template = ::Gapic::Config::Method.new update_certificate_template_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb new file mode 100644 index 000000000000..02a7da47b22c --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb @@ -0,0 +1,929 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Security + module PrivateCA + module V1 + module CertificateAuthorityService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CertificateAuthorityService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CertificateAuthorityService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "privateca.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb new file mode 100644 index 000000000000..1665c56a8de6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb @@ -0,0 +1,1867 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/privateca/v1/service_pb" + +module Google + module Cloud + module Security + module PrivateCA + module V1 + module CertificateAuthorityService + module Rest + ## + # REST service stub for the CertificateAuthorityService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # A result object deserialized from the server's reply + def create_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # A result object deserialized from the server's reply + def get_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_certificates REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse] + # A result object deserialized from the server's reply + def list_certificates request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_certificates_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_certificates", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the revoke_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # A result object deserialized from the server's reply + def revoke_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_revoke_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "revoke_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # A result object deserialized from the server's reply + def update_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the activate_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def activate_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_activate_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "activate_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the disable_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def disable_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "disable_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enable_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def enable_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "enable_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_certificate_authority_csr REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] + # A result object deserialized from the server's reply + def fetch_certificate_authority_csr request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_certificate_authority_csr_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_certificate_authority_csr", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] + # A result object deserialized from the server's reply + def get_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_certificate_authorities REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse] + # A result object deserialized from the server's reply + def list_certificate_authorities request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_authorities_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_certificate_authorities", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the undelete_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def undelete_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undelete_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "undelete_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_ca_pool REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_ca_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_ca_pool_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_ca_pool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_ca_pool REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_ca_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_ca_pool_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_ca_pool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_ca_pool REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CaPool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool] + # A result object deserialized from the server's reply + def get_ca_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_ca_pool_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_ca_pool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::CaPool.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_ca_pools REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse] + # A result object deserialized from the server's reply + def list_ca_pools request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_ca_pools_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_ca_pools", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_ca_pool REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_ca_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_ca_pool_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_ca_pool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_ca_certs REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] + # A result object deserialized from the server's reply + def fetch_ca_certs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_ca_certs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_ca_certs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_certificate_revocation_list REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] + # A result object deserialized from the server's reply + def get_certificate_revocation_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_revocation_list_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_certificate_revocation_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_certificate_revocation_lists REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse] + # A result object deserialized from the server's reply + def list_certificate_revocation_lists request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_revocation_lists_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_certificate_revocation_lists", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_certificate_revocation_list REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_certificate_revocation_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_revocation_list_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_certificate_revocation_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_certificate_template REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_certificate_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_certificate_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_certificate_template REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_certificate_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_certificate_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_certificate_template REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] + # A result object deserialized from the server's reply + def get_certificate_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_certificate_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_certificate_templates REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse] + # A result object deserialized from the server's reply + def list_certificate_templates request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_templates_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_certificate_templates", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_certificate_template REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_certificate_template request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_template_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_certificate_template", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/certificates", + body: "certificate", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_certificates REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_certificates_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/certificates", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the revoke_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_revoke_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:revoke", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{certificate.name}", + body: "certificate", + matches: [ + ["certificate.name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the activate_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_activate_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:activate", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/certificateAuthorities", + body: "certificate_authority", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_disable_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:disable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enable_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:enable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_certificate_authority_csr REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_certificate_authority_csr_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:fetch", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_certificate_authorities REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_certificate_authorities_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/certificateAuthorities", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undelete_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undelete_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:undelete", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{certificate_authority.name}", + body: "certificate_authority", + matches: [ + ["certificate_authority.name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_ca_pool REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_ca_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/caPools", + body: "ca_pool", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_ca_pool REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_ca_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{ca_pool.name}", + body: "ca_pool", + matches: [ + ["ca_pool.name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_ca_pool REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_ca_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_ca_pools REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_ca_pools_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/caPools", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_ca_pool REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_ca_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_ca_certs REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_ca_certs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{ca_pool}:fetchCaCerts", + body: "*", + matches: [ + ["ca_pool", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_certificate_revocation_list REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_certificate_revocation_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_certificate_revocation_lists REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_certificate_revocation_lists_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/certificateRevocationLists", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_certificate_revocation_list REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_certificate_revocation_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{certificate_revocation_list.name}", + body: "certificate_revocation_list", + matches: [ + ["certificate_revocation_list.name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_certificate_template REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_certificate_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/certificateTemplates", + body: "certificate_template", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_certificate_template REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_certificate_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_certificate_template REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_certificate_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_certificate_templates REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_certificate_templates_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/certificateTemplates", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_certificate_template REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_certificate_template_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{certificate_template.name}", + body: "certificate_template", + matches: [ + ["certificate_template.name", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.rb new file mode 100644 index 000000000000..32ff1bdaacad --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security/private_ca/v1/certificate_authority_service/rest" +require "google/cloud/security/private_ca/v1/bindings_override" +require "google/cloud/security/private_ca/v1/version" + +module Google + module Cloud + module Security + module PrivateCA + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/security/private_ca/v1/rest" + # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb new file mode 100644 index 000000000000..c9a5e76697ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Security + module PrivateCA + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb new file mode 100644 index 000000000000..e05f1bb88584 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/security/privateca/v1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\n2google/cloud/security/privateca/v1/resources.proto\x12\"google.cloud.security.privateca.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\x86\x12\n\x14\x43\x65rtificateAuthority\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12S\n\x04type\x18\x02 \x01(\x0e\x32=.google.cloud.security.privateca.v1.CertificateAuthority.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12M\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.CertificateConfigB\x06\xe0\x41\x02\xe0\x41\x05\x12\x33\n\x08lifetime\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x06\xe0\x41\x02\xe0\x41\x05\x12\x61\n\x08key_spec\x18\x05 \x01(\x0b\x32G.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpecB\x06\xe0\x41\x02\xe0\x41\x05\x12V\n\x12subordinate_config\x18\x06 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.SubordinateConfigB\x03\xe0\x41\x01\x12\x42\n\x04tier\x18\x07 \x01(\x0e\x32/.google.cloud.security.privateca.v1.CaPool.TierB\x03\xe0\x41\x03\x12R\n\x05state\x18\x08 \x01(\x0e\x32>.google.cloud.security.privateca.v1.CertificateAuthority.StateB\x03\xe0\x41\x03\x12 \n\x13pem_ca_certificates\x18\t \x03(\tB\x03\xe0\x41\x03\x12\x64\n\x1b\x63\x61_certificate_descriptions\x18\n \x03(\x0b\x32:.google.cloud.security.privateca.v1.CertificateDescriptionB\x03\xe0\x41\x03\x12\x17\n\ngcs_bucket\x18\x0b \x01(\tB\x03\xe0\x41\x05\x12]\n\x0b\x61\x63\x63\x65ss_urls\x18\x0c \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrlsB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x06labels\x18\x11 \x03(\x0b\x32\x44.google.cloud.security.privateca.v1.CertificateAuthority.LabelsEntryB\x03\xe0\x41\x01\x12u\n\x18user_defined_access_urls\x18\x12 \x01(\x0b\x32N.google.cloud.security.privateca.v1.CertificateAuthority.UserDefinedAccessUrlsB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x14 \x01(\x08\x42\x03\xe0\x41\x03\x1aH\n\nAccessUrls\x12!\n\x19\x63\x61_certificate_access_url\x18\x01 \x01(\t\x12\x17\n\x0f\x63rl_access_urls\x18\x02 \x03(\t\x1a\xa0\x01\n\x0eKeyVersionSpec\x12\x1f\n\x15\x63loud_kms_key_version\x18\x01 \x01(\tH\x00\x12_\n\talgorithm\x18\x02 \x01(\x0e\x32J.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithmH\x00\x42\x0c\n\nKeyVersion\x1a`\n\x15UserDefinedAccessUrls\x12)\n\x1c\x61ia_issuing_certificate_urls\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63rl_access_urls\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSELF_SIGNED\x10\x01\x12\x0f\n\x0bSUBORDINATE\x10\x02\"p\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\n\n\x06STAGED\x10\x03\x12\x1c\n\x18\x41WAITING_USER_ACTIVATION\x10\x04\x12\x0b\n\x07\x44\x45LETED\x10\x05\"\xfc\x01\n\x11SignHashAlgorithm\x12#\n\x1fSIGN_HASH_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x19\n\x15RSA_PKCS1_2048_SHA256\x10\x06\x12\x19\n\x15RSA_PKCS1_3072_SHA256\x10\x07\x12\x19\n\x15RSA_PKCS1_4096_SHA256\x10\x08\x12\x12\n\x0e\x45\x43_P256_SHA256\x10\x04\x12\x12\n\x0e\x45\x43_P384_SHA384\x10\x05:\x9d\x01\xea\x41\x99\x01\n-privateca.googleapis.com/CertificateAuthority\x12hprojects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}\"\xe6\x11\n\x06\x43\x61Pool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x45\n\x04tier\x18\x02 \x01(\x0e\x32/.google.cloud.security.privateca.v1.CaPool.TierB\x06\xe0\x41\x02\xe0\x41\x05\x12W\n\x0fissuance_policy\x18\x03 \x01(\x0b\x32\x39.google.cloud.security.privateca.v1.CaPool.IssuancePolicyB\x03\xe0\x41\x01\x12]\n\x12publishing_options\x18\x04 \x01(\x0b\x32<.google.cloud.security.privateca.v1.CaPool.PublishingOptionsB\x03\xe0\x41\x01\x12P\n\x0f\x65ncryption_spec\x18\x08 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.EncryptionSpecB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x05 \x03(\x0b\x32\x36.google.cloud.security.privateca.v1.CaPool.LabelsEntryB\x03\xe0\x41\x01\x1a\xfb\x01\n\x11PublishingOptions\x12\x1c\n\x0fpublish_ca_cert\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bpublish_crl\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12i\n\x0f\x65ncoding_format\x18\x03 \x01(\x0e\x32K.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormatB\x03\xe0\x41\x01\"C\n\x0e\x45ncodingFormat\x12\x1f\n\x1b\x45NCODING_FORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03PEM\x10\x01\x12\x07\n\x03\x44\x45R\x10\x02\x1a\xe2\n\n\x0eIssuancePolicy\x12h\n\x11\x61llowed_key_types\x18\x01 \x03(\x0b\x32H.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyTypeB\x03\xe0\x41\x01\x12\x39\n\x11\x62\x61\x63kdate_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x36\n)allow_requester_specified_not_before_time\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\x38\n\x10maximum_lifetime\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12l\n\x16\x61llowed_issuance_modes\x18\x03 \x01(\x0b\x32G.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModesB\x03\xe0\x41\x01\x12P\n\x0f\x62\x61seline_values\x18\x04 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x01\x12\x65\n\x14identity_constraints\x18\x05 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.CertificateIdentityConstraintsB\x03\xe0\x41\x01\x12h\n\x16passthrough_extensions\x18\x06 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateExtensionConstraintsB\x03\xe0\x41\x01\x1a\xc5\x04\n\x0e\x41llowedKeyType\x12\x62\n\x03rsa\x18\x01 \x01(\x0b\x32S.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyTypeH\x00\x12l\n\x0e\x65lliptic_curve\x18\x02 \x01(\x0b\x32R.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyTypeH\x00\x1aJ\n\nRsaKeyType\x12\x1d\n\x10min_modulus_size\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10max_modulus_size\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x1a\x88\x02\n\tEcKeyType\x12\x89\x01\n\x13signature_algorithm\x18\x01 \x01(\x0e\x32g.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithmB\x03\xe0\x41\x01\"o\n\x14\x45\x63SignatureAlgorithm\x12&\n\"EC_SIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x0e\n\nECDSA_P256\x10\x01\x12\x0e\n\nECDSA_P384\x10\x02\x12\x0f\n\x0b\x45\x44\x44SA_25519\x10\x03\x42\n\n\x08key_type\x1a`\n\rIssuanceModes\x12%\n\x18\x61llow_csr_based_issuance\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1b\x61llow_config_based_issuance\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"8\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\n\n\x06\x44\x45VOPS\x10\x02:_\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}\"\'\n\x0e\x45ncryptionSpec\x12\x15\n\rcloud_kms_key\x18\x01 \x01(\t\"\xbc\x08\n\x19\x43\x65rtificateRevocationList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0fsequence_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12s\n\x14revoked_certificates\x18\x03 \x03(\x0b\x32P.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificateB\x03\xe0\x41\x03\x12\x14\n\x07pem_crl\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naccess_url\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12W\n\x05state\x18\x06 \x01(\x0e\x32\x43.google.cloud.security.privateca.v1.CertificateRevocationList.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12^\n\x06labels\x18\n \x03(\x0b\x32I.google.cloud.security.privateca.v1.CertificateRevocationList.LabelsEntryB\x03\xe0\x41\x01\x1a\xc0\x01\n\x12RevokedCertificate\x12>\n\x0b\x63\x65rtificate\x18\x01 \x01(\tB)\xfa\x41&\n$privateca.googleapis.com/Certificate\x12\x19\n\x11hex_serial_number\x18\x02 \x01(\t\x12O\n\x11revocation_reason\x18\x03 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReason\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0e\n\nSUPERSEDED\x10\x02:\xdc\x01\xea\x41\xd8\x01\n2privateca.googleapis.com/CertificateRevocationList\x12\xa1\x01projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}\"\xaa\n\n\x0b\x43\x65rtificate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\x07pem_csr\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x12L\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.CertificateConfigB\x03\xe0\x41\x05H\x00\x12[\n\x1cissuer_certificate_authority\x18\x04 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x33\n\x08lifetime\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x06\xe0\x41\x02\xe0\x41\x05\x12R\n\x14\x63\x65rtificate_template\x18\x06 \x01(\tB4\xe0\x41\x05\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\x12Q\n\x0csubject_mode\x18\x07 \x01(\x0e\x32\x36.google.cloud.security.privateca.v1.SubjectRequestModeB\x03\xe0\x41\x05\x12\x62\n\x12revocation_details\x18\x08 \x01(\x0b\x32\x41.google.cloud.security.privateca.v1.Certificate.RevocationDetailsB\x03\xe0\x41\x03\x12\x1c\n\x0fpem_certificate\x18\t \x01(\tB\x03\xe0\x41\x03\x12`\n\x17\x63\x65rtificate_description\x18\n \x01(\x0b\x32:.google.cloud.security.privateca.v1.CertificateDescriptionB\x03\xe0\x41\x03\x12\"\n\x15pem_certificate_chain\x18\x0b \x03(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x06labels\x18\x0e \x03(\x0b\x32;.google.cloud.security.privateca.v1.Certificate.LabelsEntryB\x03\xe0\x41\x01\x12\x42\n\x19requested_not_before_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x1a\x98\x01\n\x11RevocationDetails\x12N\n\x10revocation_state\x18\x01 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReason\x12\x33\n\x0frevocation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x7f\xea\x41|\n$privateca.googleapis.com/Certificate\x12Tprojects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}B\x14\n\x12\x63\x65rtificate_config\"\xa0\x06\n\x13\x43\x65rtificateTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x38\n\x10maximum_lifetime\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12R\n\x11predefined_values\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x01\x12\x65\n\x14identity_constraints\x18\x03 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.CertificateIdentityConstraintsB\x03\xe0\x41\x01\x12h\n\x16passthrough_extensions\x18\x04 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateExtensionConstraintsB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12X\n\x06labels\x18\x08 \x03(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateTemplate.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x87\x01\xea\x41\x83\x01\n,privateca.googleapis.com/CertificateTemplate\x12Sprojects/{project}/locations/{location}/certificateTemplates/{certificate_template}\"\xce\x06\n\x0eX509Parameters\x12\x44\n\tkey_usage\x18\x01 \x01(\x0b\x32,.google.cloud.security.privateca.v1.KeyUsageB\x03\xe0\x41\x01\x12U\n\nca_options\x18\x02 \x01(\x0b\x32<.google.cloud.security.privateca.v1.X509Parameters.CaOptionsB\x03\xe0\x41\x01\x12\x45\n\npolicy_ids\x18\x03 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x01\x12\x1d\n\x10\x61ia_ocsp_servers\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x61\n\x10name_constraints\x18\x06 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.X509Parameters.NameConstraintsB\x03\xe0\x41\x01\x12U\n\x15\x61\x64\x64itional_extensions\x18\x05 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1.X509ExtensionB\x03\xe0\x41\x01\x1as\n\tCaOptions\x12\x17\n\x05is_ca\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12(\n\x16max_issuer_path_length\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x08\n\x06_is_caB\x19\n\x17_max_issuer_path_length\x1a\x89\x02\n\x0fNameConstraints\x12\x10\n\x08\x63ritical\x18\x01 \x01(\x08\x12\x1b\n\x13permitted_dns_names\x18\x02 \x03(\t\x12\x1a\n\x12\x65xcluded_dns_names\x18\x03 \x03(\t\x12\x1b\n\x13permitted_ip_ranges\x18\x04 \x03(\t\x12\x1a\n\x12\x65xcluded_ip_ranges\x18\x05 \x03(\t\x12!\n\x19permitted_email_addresses\x18\x06 \x03(\t\x12 \n\x18\x65xcluded_email_addresses\x18\x07 \x03(\t\x12\x16\n\x0epermitted_uris\x18\x08 \x03(\t\x12\x15\n\rexcluded_uris\x18\t \x03(\t\"\xa9\x02\n\x11SubordinateConfig\x12V\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthorityH\x00\x12m\n\x10pem_issuer_chain\x18\x02 \x01(\x0b\x32L.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChainB\x03\xe0\x41\x02H\x00\x1a\x37\n\x16SubordinateConfigChain\x12\x1d\n\x10pem_certificates\x18\x01 \x03(\tB\x03\xe0\x41\x02\x42\x14\n\x12subordinate_config\"\x9d\x01\n\tPublicKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12L\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x37.google.cloud.security.privateca.v1.PublicKey.KeyFormatB\x03\xe0\x41\x02\"0\n\tKeyFormat\x12\x1a\n\x16KEY_FORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03PEM\x10\x01\"\xac\x04\n\x11\x43\x65rtificateConfig\x12`\n\x0esubject_config\x18\x01 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfigB\x03\xe0\x41\x02\x12L\n\x0bx509_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x02\x12\x46\n\npublic_key\x18\x03 \x01(\x0b\x32-.google.cloud.security.privateca.v1.PublicKeyB\x03\xe0\x41\x01\x12X\n\x0esubject_key_id\x18\x04 \x01(\x0b\x32;.google.cloud.security.privateca.v1.CertificateConfig.KeyIdB\x03\xe0\x41\x01\x1a\xa6\x01\n\rSubjectConfig\x12\x41\n\x07subject\x18\x01 \x01(\x0b\x32+.google.cloud.security.privateca.v1.SubjectB\x03\xe0\x41\x01\x12R\n\x10subject_alt_name\x18\x02 \x01(\x0b\x32\x33.google.cloud.security.privateca.v1.SubjectAltNamesB\x03\xe0\x41\x01\x1a\x1c\n\x05KeyId\x12\x13\n\x06key_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xc1\x08\n\x16\x43\x65rtificateDescription\x12j\n\x13subject_description\x18\x01 \x01(\x0b\x32M.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription\x12L\n\x10x509_description\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509Parameters\x12\x41\n\npublic_key\x18\x03 \x01(\x0b\x32-.google.cloud.security.privateca.v1.PublicKey\x12X\n\x0esubject_key_id\x18\x04 \x01(\x0b\x32@.google.cloud.security.privateca.v1.CertificateDescription.KeyId\x12Z\n\x10\x61uthority_key_id\x18\x05 \x01(\x0b\x32@.google.cloud.security.privateca.v1.CertificateDescription.KeyId\x12\x1f\n\x17\x63rl_distribution_points\x18\x06 \x03(\t\x12$\n\x1c\x61ia_issuing_certificate_urls\x18\x07 \x03(\t\x12k\n\x10\x63\x65rt_fingerprint\x18\x08 \x01(\x0b\x32Q.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint\x12\x1e\n\x16tbs_certificate_digest\x18\t \x01(\t\x1a\xd2\x02\n\x12SubjectDescription\x12<\n\x07subject\x18\x01 \x01(\x0b\x32+.google.cloud.security.privateca.v1.Subject\x12M\n\x10subject_alt_name\x18\x02 \x01(\x0b\x32\x33.google.cloud.security.privateca.v1.SubjectAltNames\x12\x19\n\x11hex_serial_number\x18\x03 \x01(\t\x12+\n\x08lifetime\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x33\n\x0fnot_before_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0enot_after_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x1c\n\x05KeyId\x12\x13\n\x06key_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x16\x43\x65rtificateFingerprint\x12\x13\n\x0bsha256_hash\x18\x01 \x01(\t\"\'\n\x08ObjectId\x12\x1b\n\x0eobject_id_path\x18\x01 \x03(\x05\x42\x03\xe0\x41\x02\"\x80\x01\n\rX509Extension\x12\x44\n\tobject_id\x18\x01 \x01(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x02\x12\x15\n\x08\x63ritical\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x02\"\xa2\x05\n\x08KeyUsage\x12T\n\x0e\x62\x61se_key_usage\x18\x01 \x01(\x0b\x32<.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions\x12`\n\x12\x65xtended_key_usage\x18\x02 \x01(\x0b\x32\x44.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions\x12Q\n\x1bunknown_extended_key_usages\x18\x03 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectId\x1a\xe7\x01\n\x0fKeyUsageOptions\x12\x19\n\x11\x64igital_signature\x18\x01 \x01(\x08\x12\x1a\n\x12\x63ontent_commitment\x18\x02 \x01(\x08\x12\x18\n\x10key_encipherment\x18\x03 \x01(\x08\x12\x19\n\x11\x64\x61ta_encipherment\x18\x04 \x01(\x08\x12\x15\n\rkey_agreement\x18\x05 \x01(\x08\x12\x11\n\tcert_sign\x18\x06 \x01(\x08\x12\x10\n\x08\x63rl_sign\x18\x07 \x01(\x08\x12\x15\n\rencipher_only\x18\x08 \x01(\x08\x12\x15\n\rdecipher_only\x18\t \x01(\x08\x1a\xa0\x01\n\x17\x45xtendedKeyUsageOptions\x12\x13\n\x0bserver_auth\x18\x01 \x01(\x08\x12\x13\n\x0b\x63lient_auth\x18\x02 \x01(\x08\x12\x14\n\x0c\x63ode_signing\x18\x03 \x01(\x08\x12\x18\n\x10\x65mail_protection\x18\x04 \x01(\x08\x12\x15\n\rtime_stamping\x18\x05 \x01(\x08\x12\x14\n\x0cocsp_signing\x18\x06 \x01(\x08\"\xbe\x01\n\x15\x41ttributeTypeAndValue\x12\x41\n\x04type\x18\x01 \x01(\x0e\x32\x31.google.cloud.security.privateca.v1.AttributeTypeH\x00\x12\x41\n\tobject_id\x18\x02 \x01(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdH\x00\x12\r\n\x05value\x18\x03 \x01(\tB\x10\n\x0e\x61ttribute_type\"j\n\x19RelativeDistinguishedName\x12M\n\nattributes\x18\x01 \x03(\x0b\x32\x39.google.cloud.security.privateca.v1.AttributeTypeAndValue\"\x8d\x02\n\x07Subject\x12\x13\n\x0b\x63ommon_name\x18\x01 \x01(\t\x12\x14\n\x0c\x63ountry_code\x18\x02 \x01(\t\x12\x14\n\x0corganization\x18\x03 \x01(\t\x12\x1b\n\x13organizational_unit\x18\x04 \x01(\t\x12\x10\n\x08locality\x18\x05 \x01(\t\x12\x10\n\x08province\x18\x06 \x01(\t\x12\x16\n\x0estreet_address\x18\x07 \x01(\t\x12\x13\n\x0bpostal_code\x18\x08 \x01(\t\x12S\n\x0crdn_sequence\x18\t \x03(\x0b\x32=.google.cloud.security.privateca.v1.RelativeDistinguishedName\"\xa9\x01\n\x0fSubjectAltNames\x12\x11\n\tdns_names\x18\x01 \x03(\t\x12\x0c\n\x04uris\x18\x02 \x03(\t\x12\x17\n\x0f\x65mail_addresses\x18\x03 \x03(\t\x12\x14\n\x0cip_addresses\x18\x04 \x03(\t\x12\x46\n\x0b\x63ustom_sans\x18\x05 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1.X509Extension\"\xfa\x01\n\x1e\x43\x65rtificateIdentityConstraints\x12.\n\x0e\x63\x65l_expression\x18\x01 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12+\n\x19\x61llow_subject_passthrough\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x35\n#allow_subject_alt_names_passthrough\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x1c\n\x1a_allow_subject_passthroughB&\n$_allow_subject_alt_names_passthrough\"\xb4\x03\n\x1f\x43\x65rtificateExtensionConstraints\x12|\n\x10known_extensions\x18\x01 \x03(\x0e\x32].google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtensionB\x03\xe0\x41\x01\x12P\n\x15\x61\x64\x64itional_extensions\x18\x02 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x01\"\xc0\x01\n\x19KnownCertificateExtension\x12+\n\'KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41SE_KEY_USAGE\x10\x01\x12\x16\n\x12\x45XTENDED_KEY_USAGE\x10\x02\x12\x0e\n\nCA_OPTIONS\x10\x03\x12\x0e\n\nPOLICY_IDS\x10\x04\x12\x14\n\x10\x41IA_OCSP_SERVERS\x10\x05\x12\x14\n\x10NAME_CONSTRAINTS\x10\x06*\xbe\x01\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x43OMMON_NAME\x10\x01\x12\x10\n\x0c\x43OUNTRY_CODE\x10\x02\x12\x10\n\x0cORGANIZATION\x10\x03\x12\x17\n\x13ORGANIZATIONAL_UNIT\x10\x04\x12\x0c\n\x08LOCALITY\x10\x05\x12\x0c\n\x08PROVINCE\x10\x06\x12\x12\n\x0eSTREET_ADDRESS\x10\x07\x12\x0f\n\x0bPOSTAL_CODE\x10\x08*\x87\x02\n\x10RevocationReason\x12!\n\x1dREVOCATION_REASON_UNSPECIFIED\x10\x00\x12\x12\n\x0eKEY_COMPROMISE\x10\x01\x12$\n CERTIFICATE_AUTHORITY_COMPROMISE\x10\x02\x12\x17\n\x13\x41\x46\x46ILIATION_CHANGED\x10\x03\x12\x0e\n\nSUPERSEDED\x10\x04\x12\x1a\n\x16\x43\x45SSATION_OF_OPERATION\x10\x05\x12\x14\n\x10\x43\x45RTIFICATE_HOLD\x10\x06\x12\x17\n\x13PRIVILEGE_WITHDRAWN\x10\x07\x12\"\n\x1e\x41TTRIBUTE_AUTHORITY_COMPROMISE\x10\x08*o\n\x12SubjectRequestMode\x12$\n SUBJECT_REQUEST_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x10\n\x0cRDN_SEQUENCE\x10\x03\x12\x14\n\x10REFLECTED_SPIFFE\x10\x02\x42\xfc\x01\n&com.google.cloud.security.privateca.v1B\x17PrivateCaResourcesProtoP\x01ZDcloud.google.com/go/security/privateca/apiv1/privatecapb;privatecapb\xaa\x02\"Google.Cloud.Security.PrivateCA.V1\xca\x02\"Google\\Cloud\\Security\\PrivateCA\\V1\xea\x02&Google::Cloud::Security::PrivateCA::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Security + module PrivateCA + module V1 + CertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority").msgclass + CertificateAuthority::AccessUrls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls").msgclass + CertificateAuthority::KeyVersionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec").msgclass + CertificateAuthority::UserDefinedAccessUrls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.UserDefinedAccessUrls").msgclass + CertificateAuthority::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.Type").enummodule + CertificateAuthority::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.State").enummodule + CertificateAuthority::SignHashAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm").enummodule + CaPool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool").msgclass + CaPool::PublishingOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.PublishingOptions").msgclass + CaPool::PublishingOptions::EncodingFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat").enummodule + CaPool::IssuancePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy").msgclass + CaPool::IssuancePolicy::AllowedKeyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType").msgclass + CaPool::IssuancePolicy::AllowedKeyType::RsaKeyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType").msgclass + CaPool::IssuancePolicy::AllowedKeyType::EcKeyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType").msgclass + CaPool::IssuancePolicy::AllowedKeyType::EcKeyType::EcSignatureAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm").enummodule + CaPool::IssuancePolicy::IssuanceModes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes").msgclass + CaPool::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.Tier").enummodule + EncryptionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.EncryptionSpec").msgclass + CertificateRevocationList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateRevocationList").msgclass + CertificateRevocationList::RevokedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate").msgclass + CertificateRevocationList::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateRevocationList.State").enummodule + Certificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.Certificate").msgclass + Certificate::RevocationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.Certificate.RevocationDetails").msgclass + CertificateTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateTemplate").msgclass + X509Parameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.X509Parameters").msgclass + X509Parameters::CaOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.X509Parameters.CaOptions").msgclass + X509Parameters::NameConstraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.X509Parameters.NameConstraints").msgclass + SubordinateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.SubordinateConfig").msgclass + SubordinateConfig::SubordinateConfigChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain").msgclass + PublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.PublicKey").msgclass + PublicKey::KeyFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.PublicKey.KeyFormat").enummodule + CertificateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateConfig").msgclass + CertificateConfig::SubjectConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig").msgclass + CertificateConfig::KeyId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateConfig.KeyId").msgclass + CertificateDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateDescription").msgclass + CertificateDescription::SubjectDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription").msgclass + CertificateDescription::KeyId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateDescription.KeyId").msgclass + CertificateDescription::CertificateFingerprint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint").msgclass + ObjectId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ObjectId").msgclass + X509Extension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.X509Extension").msgclass + KeyUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.KeyUsage").msgclass + KeyUsage::KeyUsageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions").msgclass + KeyUsage::ExtendedKeyUsageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions").msgclass + AttributeTypeAndValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.AttributeTypeAndValue").msgclass + RelativeDistinguishedName = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.RelativeDistinguishedName").msgclass + Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.Subject").msgclass + SubjectAltNames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.SubjectAltNames").msgclass + CertificateIdentityConstraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateIdentityConstraints").msgclass + CertificateExtensionConstraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateExtensionConstraints").msgclass + CertificateExtensionConstraints::KnownCertificateExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension").enummodule + AttributeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.AttributeType").enummodule + RevocationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.RevocationReason").enummodule + SubjectRequestMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.SubjectRequestMode").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb new file mode 100644 index 000000000000..f329659efa1f --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/security/privateca/v1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/security/privateca/v1/resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/cloud/security/privateca/v1/service.proto\x12\"google.cloud.security.privateca.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/security/privateca/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x02\n\x18\x43reateCertificateRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x1b\n\x0e\x63\x65rtificate_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12I\n\x0b\x63\x65rtificate\x18\x03 \x01(\x0b\x32/.google.cloud.security.privateca.v1.CertificateB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n issuing_certificate_authority_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\"S\n\x15GetCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\"\xaf\x01\n\x17ListCertificatesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x18ListCertificatesResponse\x12\x45\n\x0c\x63\x65rtificates\x18\x01 \x03(\x0b\x32/.google.cloud.security.privateca.v1.Certificate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x18RevokeCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\x12I\n\x06reason\x18\x02 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReasonB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb4\x01\n\x18UpdateCertificateRequest\x12I\n\x0b\x63\x65rtificate\x18\x01 \x01(\x0b\x32/.google.cloud.security.privateca.v1.CertificateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x84\x02\n#ActivateCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\x12pem_ca_certificate\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x12subordinate_config\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.SubordinateConfigB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xfa\x01\n!CreateCertificateAuthorityRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12%\n\x18\x63\x65rtificate_authority_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x15\x63\x65rtificate_authority\x18\x03 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xb3\x01\n\"DisableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\'\n\x1aignore_dependent_resources\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x89\x01\n!EnableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"j\n#FetchCertificateAuthorityCsrRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"<\n$FetchCertificateAuthorityCsrResponse\x12\x14\n\x07pem_csr\x18\x01 \x01(\tB\x03\xe0\x41\x03\"e\n\x1eGetCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"\xb9\x01\n!ListCertificateAuthoritiesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n\"ListCertificateAuthoritiesResponse\x12Y\n\x17\x63\x65rtificate_authorities\x18\x01 \x03(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthority\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8b\x01\n#UndeleteCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xfb\x01\n!DeleteCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\'\n\x1aignore_active_certificates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x11skip_grace_period\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1aignore_dependent_resources\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xd8\x01\n!UpdateCertificateAuthorityRequest\x12\\\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xcc\x01\n\x13\x43reateCaPoolRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x17\n\nca_pool_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x07\x63\x61_pool\x18\x03 \x01(\x0b\x32*.google.cloud.security.privateca.v1.CaPoolB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xae\x01\n\x13UpdateCaPoolRequest\x12@\n\x07\x63\x61_pool\x18\x01 \x01(\x0b\x32*.google.cloud.security.privateca.v1.CaPoolB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x96\x01\n\x13\x44\x65leteCaPoolRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\'\n\x1aignore_dependent_resources\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"h\n\x13\x46\x65tchCaCertsRequest\x12\x38\n\x07\x63\x61_pool\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x14\x46\x65tchCaCertsResponse\x12T\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32\x42.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain\x1a!\n\tCertChain\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\t\"I\n\x10GetCaPoolRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\"\xac\x01\n\x12ListCaPoolsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n\x13ListCaPoolsResponse\x12<\n\x08\x63\x61_pools\x18\x01 \x03(\x0b\x32*.google.cloud.security.privateca.v1.CaPool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"o\n#GetCertificateRevocationListRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2privateca.googleapis.com/CertificateRevocationList\"\xcb\x01\n%ListCertificateRevocationListsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xbb\x01\n&ListCertificateRevocationListsResponse\x12\x63\n\x1c\x63\x65rtificate_revocation_lists\x18\x01 \x03(\x0b\x32=.google.cloud.security.privateca.v1.CertificateRevocationList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xe0\x01\n&UpdateCertificateRevocationListRequest\x12g\n\x1b\x63\x65rtificate_revocation_list\x18\x01 \x01(\x0b\x32=.google.cloud.security.privateca.v1.CertificateRevocationListB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n CreateCertificateTemplateRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12$\n\x17\x63\x65rtificate_template_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x14\x63\x65rtificate_template\x18\x03 \x01(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplateB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n DeleteCertificateTemplateRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"c\n\x1dGetCertificateTemplateRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\"\xb9\x01\n\x1fListCertificateTemplatesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa8\x01\n ListCertificateTemplatesResponse\x12V\n\x15\x63\x65rtificate_templates\x18\x01 \x03(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd5\x01\n UpdateCertificateTemplateRequest\x12Z\n\x14\x63\x65rtificate_template\x18\x01 \x01(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xfa;\n\x1b\x43\x65rtificateAuthorityService\x12\xf7\x01\n\x11\x43reateCertificate\x12<.google.cloud.security.privateca.v1.CreateCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"s\xda\x41!parent,certificate,certificate_id\x82\xd3\xe4\x93\x02I\":/v1/{parent=projects/*/locations/*/caPools/*}/certificates:\x0b\x63\x65rtificate\x12\xc7\x01\n\x0eGetCertificate\x12\x39.google.cloud.security.privateca.v1.GetCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/caPools/*/certificates/*}\x12\xda\x01\n\x10ListCertificates\x12;.google.cloud.security.privateca.v1.ListCertificatesRequest\x1a<.google.cloud.security.privateca.v1.ListCertificatesResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/caPools/*}/certificates\x12\xd7\x01\n\x11RevokeCertificate\x12<.google.cloud.security.privateca.v1.RevokeCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\"A/v1/{name=projects/*/locations/*/caPools/*/certificates/*}:revoke:\x01*\x12\xf9\x01\n\x11UpdateCertificate\x12<.google.cloud.security.privateca.v1.UpdateCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"u\xda\x41\x17\x63\x65rtificate,update_mask\x82\xd3\xe4\x93\x02U2F/v1/{certificate.name=projects/*/locations/*/caPools/*/certificates/*}:\x0b\x63\x65rtificate\x12\x94\x02\n\x1c\x41\x63tivateCertificateAuthority\x12G.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:activate:\x01*\x12\xcc\x02\n\x1a\x43reateCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x35parent,certificate_authority,certificate_authority_id\x82\xd3\xe4\x93\x02]\"D/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities:\x15\x63\x65rtificate_authority\x12\x91\x02\n\x1b\x44isableCertificateAuthority\x12\x46.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\"L/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:disable:\x01*\x12\x8e\x02\n\x1a\x45nableCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02P\"K/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:enable:\x01*\x12\x8c\x02\n\x1c\x46\x65tchCertificateAuthorityCsr\x12G.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest\x1aH.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:fetch\x12\xec\x01\n\x17GetCertificateAuthority\x12\x42.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest\x1a\x38.google.cloud.security.privateca.v1.CertificateAuthority\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}\x12\x82\x02\n\x1aListCertificateAuthorities\x12\x45.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest\x1a\x46.google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities\x12\x94\x02\n\x1cUndeleteCertificateAuthority\x12G.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:undelete:\x01*\x12\x83\x02\n\x1a\x44\x65leteCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}\x12\xce\x02\n\x1aUpdateCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41!certificate_authority,update_mask\x82\xd3\xe4\x93\x02s2Z/v1/{certificate_authority.name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:\x15\x63\x65rtificate_authority\x12\xde\x01\n\x0c\x43reateCaPool\x12\x37.google.cloud.security.privateca.v1.CreateCaPoolRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\x1b\n\x06\x43\x61Pool\x12\x11OperationMetadata\xda\x41\x19parent,ca_pool,ca_pool_id\x82\xd3\xe4\x93\x02\x36\"+/v1/{parent=projects/*/locations/*}/caPools:\x07\x63\x61_pool\x12\xe0\x01\n\x0cUpdateCaPool\x12\x37.google.cloud.security.privateca.v1.UpdateCaPoolRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x1b\n\x06\x43\x61Pool\x12\x11OperationMetadata\xda\x41\x13\x63\x61_pool,update_mask\x82\xd3\xe4\x93\x02>23/v1/{ca_pool.name=projects/*/locations/*/caPools/*}:\x07\x63\x61_pool\x12\xa9\x01\n\tGetCaPool\x12\x34.google.cloud.security.privateca.v1.GetCaPoolRequest\x1a*.google.cloud.security.privateca.v1.CaPool\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/caPools/*}\x12\xbc\x01\n\x0bListCaPools\x12\x36.google.cloud.security.privateca.v1.ListCaPoolsRequest\x1a\x37.google.cloud.security.privateca.v1.ListCaPoolsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/caPools\x12\xcf\x01\n\x0c\x44\x65leteCaPool\x12\x37.google.cloud.security.privateca.v1.DeleteCaPoolRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/caPools/*}\x12\xd3\x01\n\x0c\x46\x65tchCaCerts\x12\x37.google.cloud.security.privateca.v1.FetchCaCertsRequest\x1a\x38.google.cloud.security.privateca.v1.FetchCaCertsResponse\"P\xda\x41\x07\x63\x61_pool\x82\xd3\xe4\x93\x02@\";/v1/{ca_pool=projects/*/locations/*/caPools/*}:fetchCaCerts:\x01*\x12\x98\x02\n\x1cGetCertificateRevocationList\x12G.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest\x1a=.google.cloud.security.privateca.v1.CertificateRevocationList\"p\xda\x41\x04name\x82\xd3\xe4\x93\x02\x63\x12\x61/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}\x12\xab\x02\n\x1eListCertificateRevocationLists\x12I.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest\x1aJ.google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse\"r\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x63\x12\x61/v1/{parent=projects/*/locations/*/caPools/*/certificateAuthorities/*}/certificateRevocationLists\x12\x8d\x03\n\x1fUpdateCertificateRevocationList\x12J.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest\x1a\x1d.google.longrunning.Operation\"\xfe\x01\xca\x41.\n\x19\x43\x65rtificateRevocationList\x12\x11OperationMetadata\xda\x41\'certificate_revocation_list,update_mask\x82\xd3\xe4\x93\x02\x9c\x01\x32}/v1/{certificate_revocation_list.name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}:\x1b\x63\x65rtificate_revocation_list\x12\xba\x02\n\x19\x43reateCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41(\n\x13\x43\x65rtificateTemplate\x12\x11OperationMetadata\xda\x41\x33parent,certificate_template,certificate_template_id\x82\xd3\xe4\x93\x02P\"8/v1/{parent=projects/*/locations/*}/certificateTemplates:\x14\x63\x65rtificate_template\x12\x9a\x02\n\x19\x44\x65leteCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41M\n\x15google.protobuf.Empty\x12\x34google.cloud.security.privateca.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/certificateTemplates/*}\x12\xdd\x01\n\x16GetCertificateTemplate\x12\x41.google.cloud.security.privateca.v1.GetCertificateTemplateRequest\x1a\x37.google.cloud.security.privateca.v1.CertificateTemplate\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/certificateTemplates/*}\x12\xf0\x01\n\x18ListCertificateTemplates\x12\x43.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest\x1a\x44.google.cloud.security.privateca.v1.ListCertificateTemplatesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/certificateTemplates\x12\xbc\x02\n\x19UpdateCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41(\n\x13\x43\x65rtificateTemplate\x12\x11OperationMetadata\xda\x41 certificate_template,update_mask\x82\xd3\xe4\x93\x02\x65\x32M/v1/{certificate_template.name=projects/*/locations/*/certificateTemplates/*}:\x14\x63\x65rtificate_template\x1aL\xca\x41\x18privateca.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf3\x01\n&com.google.cloud.security.privateca.v1B\x0ePrivateCaProtoP\x01ZDcloud.google.com/go/security/privateca/apiv1/privatecapb;privatecapb\xaa\x02\"Google.Cloud.Security.PrivateCA.V1\xca\x02\"Google\\Cloud\\Security\\PrivateCA\\V1\xea\x02&Google::Cloud::Security::PrivateCA::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Security + module PrivateCA + module V1 + CreateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CreateCertificateRequest").msgclass + GetCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.GetCertificateRequest").msgclass + ListCertificatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificatesRequest").msgclass + ListCertificatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificatesResponse").msgclass + RevokeCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.RevokeCertificateRequest").msgclass + UpdateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UpdateCertificateRequest").msgclass + ActivateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest").msgclass + CreateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest").msgclass + DisableCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest").msgclass + EnableCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest").msgclass + FetchCertificateAuthorityCsrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest").msgclass + FetchCertificateAuthorityCsrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse").msgclass + GetCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.GetCertificateAuthorityRequest").msgclass + ListCertificateAuthoritiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest").msgclass + ListCertificateAuthoritiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse").msgclass + UndeleteCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest").msgclass + DeleteCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest").msgclass + UpdateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest").msgclass + CreateCaPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CreateCaPoolRequest").msgclass + UpdateCaPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UpdateCaPoolRequest").msgclass + DeleteCaPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.DeleteCaPoolRequest").msgclass + FetchCaCertsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.FetchCaCertsRequest").msgclass + FetchCaCertsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.FetchCaCertsResponse").msgclass + FetchCaCertsResponse::CertChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain").msgclass + GetCaPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.GetCaPoolRequest").msgclass + ListCaPoolsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCaPoolsRequest").msgclass + ListCaPoolsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCaPoolsResponse").msgclass + GetCertificateRevocationListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.GetCertificateRevocationListRequest").msgclass + ListCertificateRevocationListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest").msgclass + ListCertificateRevocationListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse").msgclass + UpdateCertificateRevocationListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest").msgclass + CreateCertificateTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CreateCertificateTemplateRequest").msgclass + DeleteCertificateTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest").msgclass + GetCertificateTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.GetCertificateTemplateRequest").msgclass + ListCertificateTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateTemplatesRequest").msgclass + ListCertificateTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateTemplatesResponse").msgclass + UpdateCertificateTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.OperationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb new file mode 100644 index 000000000000..a9cc50318222 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb @@ -0,0 +1,150 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/security/privateca/v1/service.proto for package 'Google.Cloud.Security.PrivateCA.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/security/privateca/v1/service_pb' + +module Google + module Cloud + module Security + module PrivateCA + module V1 + module CertificateAuthorityService + # [Certificate Authority + # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] + # manages private certificate authorities and issued certificates. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.security.privateca.v1.CertificateAuthorityService' + + # Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] + # in a given Project, Location from a particular + # [CaPool][google.cloud.security.privateca.v1.CaPool]. + rpc :CreateCertificate, ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1::Certificate + # Returns a [Certificate][google.cloud.security.privateca.v1.Certificate]. + rpc :GetCertificate, ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1::Certificate + # Lists [Certificates][google.cloud.security.privateca.v1.Certificate]. + rpc :ListCertificates, ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest, ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse + # Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate]. + rpc :RevokeCertificate, ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1::Certificate + # Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. + # Currently, the only field you can update is the + # [labels][google.cloud.security.privateca.v1.Certificate.labels] field. + rpc :UpdateCertificate, ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1::Certificate + # Activate a + # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + # that is in state + # [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] + # and is of type + # [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. + # After the parent Certificate Authority signs a certificate signing request + # from + # [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], + # this method can complete the activation process. + rpc :ActivateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Create a new + # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + # in a given Project and Location. + rpc :CreateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Disable a + # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc :DisableCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Enable a + # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc :EnableCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Fetch a certificate signing request (CSR) from a + # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + # that is in state + # [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] + # and is of type + # [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. + # The CSR must then be signed by the desired parent Certificate Authority, + # which could be another + # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + # resource, or could be an on-prem certificate authority. See also + # [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority]. + rpc :FetchCertificateAuthorityCsr, ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest, ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse + # Returns a + # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc :GetCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest, ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority + # Lists + # [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc :ListCertificateAuthorities, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse + # Undelete a + # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + # that has been deleted. + rpc :UndeleteCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Delete a + # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc :DeleteCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Update a + # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc :UpdateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Create a [CaPool][google.cloud.security.privateca.v1.CaPool]. + rpc :CreateCaPool, ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest, ::Google::Longrunning::Operation + # Update a [CaPool][google.cloud.security.privateca.v1.CaPool]. + rpc :UpdateCaPool, ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest, ::Google::Longrunning::Operation + # Returns a [CaPool][google.cloud.security.privateca.v1.CaPool]. + rpc :GetCaPool, ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest, ::Google::Cloud::Security::PrivateCA::V1::CaPool + # Lists [CaPools][google.cloud.security.privateca.v1.CaPool]. + rpc :ListCaPools, ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest, ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse + # Delete a [CaPool][google.cloud.security.privateca.v1.CaPool]. + rpc :DeleteCaPool, ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest, ::Google::Longrunning::Operation + # FetchCaCerts returns the current trust anchor for the + # [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA + # certificate chains for all certificate authorities in the ENABLED, + # DISABLED, or STAGED states. + rpc :FetchCaCerts, ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest, ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse + # Returns a + # [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. + rpc :GetCertificateRevocationList, ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest, ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList + # Lists + # [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList]. + rpc :ListCertificateRevocationLists, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse + # Update a + # [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. + rpc :UpdateCertificateRevocationList, ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest, ::Google::Longrunning::Operation + # Create a new + # [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] + # in a given Project and Location. + rpc :CreateCertificateTemplate, ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest, ::Google::Longrunning::Operation + # DeleteCertificateTemplate deletes a + # [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc :DeleteCertificateTemplate, ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest, ::Google::Longrunning::Operation + # Returns a + # [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc :GetCertificateTemplate, ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest, ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate + # Lists + # [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc :ListCertificateTemplates, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse + # Update a + # [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc :UpdateCertificateTemplate, ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/README.md new file mode 100644 index 000000000000..c573f864e64a --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Certificate Authority Service V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb new file mode 100644 index 000000000000..a49d13fd66e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb @@ -0,0 +1,1725 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # A + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # represents an individual Certificate Authority. A + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # can be used to create + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @!attribute [rw] type + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type] + # Required. Immutable. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type Type} of + # this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # @!attribute [rw] config + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateConfig] + # Required. Immutable. The config used to create a self-signed X.509 + # certificate or CSR. + # @!attribute [rw] lifetime + # @return [::Google::Protobuf::Duration] + # Required. Immutable. The desired lifetime of the CA certificate. Used to + # create the "not_before_time" and "not_after_time" fields inside an X.509 + # certificate. + # @!attribute [rw] key_spec + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::KeyVersionSpec] + # Required. Immutable. Used when issuing certificates for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # If this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # is a self-signed CertificateAuthority, this key is also used to sign the + # self-signed CA certificate. Otherwise, it is used to sign a CSR. + # @!attribute [rw] subordinate_config + # @return [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig] + # Optional. If this is a subordinate + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}, + # this field will be set with the subordinate configuration, which describes + # its issuers. This may be updated, but this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # must continue to validate. + # @!attribute [r] tier + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::Tier] + # Output only. The + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::Tier CaPool.Tier} of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} that includes this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # @!attribute [r] state + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State] + # Output only. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State State} for + # this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # @!attribute [r] pem_ca_certificates + # @return [::Array<::String>] + # Output only. This + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s + # certificate chain, including the current + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s + # certificate. Ordered such that the root issuer is the final element + # (consistent with RFC 5246). For a self-signed CA, this will only list the + # current + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s + # certificate. + # @!attribute [r] ca_certificate_descriptions + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateDescription>] + # Output only. A structured description of this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s + # CA certificate and its issuers. Ordered as self-to-root. + # @!attribute [rw] gcs_bucket + # @return [::String] + # Immutable. The name of a Cloud Storage bucket where this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # will publish content, such as the CA certificate and CRLs. This must be a + # bucket name, without any prefixes (such as `gs://`) or suffixes (such as + # `.googleapis.com`). For example, to use a bucket named `my-bucket`, you + # would simply specify `my-bucket`. If not specified, a managed bucket will + # be created. + # @!attribute [r] access_urls + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::AccessUrls] + # Output only. URLs for accessing content published by this CA, such as the + # CA certificate and CRLs. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # was last updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # was soft deleted, if it is in the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::DELETED DELETED} + # state. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # will be permanently purged, if it is in the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::DELETED DELETED} + # state. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels with user-defined metadata. + # @!attribute [rw] user_defined_access_urls + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::UserDefinedAccessUrls] + # Optional. User-defined URLs for CA certificate and CRLs. The service does + # not publish content to these URLs. It is up to the user to mirror content + # to these URLs. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Reserved for future use. + class CertificateAuthority + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # URLs where a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # will publish content. + # @!attribute [rw] ca_certificate_access_url + # @return [::String] + # The URL where this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s + # CA certificate is published. This will only be set for CAs that have been + # activated. + # @!attribute [rw] crl_access_urls + # @return [::Array<::String>] + # The URLs where this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s + # CRLs are published. This will only be set for CAs that have been + # activated. + class AccessUrls + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Cloud KMS key configuration that a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # will use. + # @!attribute [rw] cloud_kms_key_version + # @return [::String] + # The resource name for an existing Cloud KMS CryptoKeyVersion in the + # format + # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + # This option enables full flexibility in the key's capabilities and + # properties. + # + # Note: The following fields are mutually exclusive: `cloud_kms_key_version`, `algorithm`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] algorithm + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::SignHashAlgorithm] + # The algorithm to use for creating a managed Cloud KMS key for a for a + # simplified experience. All managed keys will be have their + # [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`. + # + # Note: The following fields are mutually exclusive: `algorithm`, `cloud_kms_key_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class KeyVersionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User-defined URLs for accessing content published by this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # @!attribute [rw] aia_issuing_certificate_urls + # @return [::Array<::String>] + # Optional. A list of URLs where the issuer CA certificate may be + # downloaded, which appears in the "Authority Information Access" extension + # in the certificate. If specified, the default [Cloud Storage + # URLs][google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.ca_certificate_access_url] + # will be omitted. + # @!attribute [rw] crl_access_urls + # @return [::Array<::String>] + # Optional. A list of URLs where to obtain CRL information, i.e. + # the DistributionPoint.fullName described by + # https://tools.ietf.org/html/rfc5280#section-4.2.1.13. + # If specified, the default + # [Cloud Storage + # URLs][google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.crl_access_urls] + # will be omitted. + class UserDefinedAccessUrls + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}, + # indicating its issuing chain. + module Type + # Not specified. + TYPE_UNSPECIFIED = 0 + + # Self-signed CA. + SELF_SIGNED = 1 + + # Subordinate CA. Could be issued by a Private CA + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # or an unmanaged CA. + SUBORDINATE = 2 + end + + # The state of a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}, + # indicating if it can be used. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # Certificates can be issued from this CA. CRLs will be generated for this + # CA. The CA will be part of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s trust anchor, and + # will be used to issue certificates from the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + ENABLED = 1 + + # Certificates cannot be issued from this CA. CRLs will still be generated. + # The CA will be part of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s trust anchor, but + # will not be used to issue certificates from the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + DISABLED = 2 + + # Certificates can be issued from this CA. CRLs will be generated for this + # CA. The CA will be part of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s trust anchor, but + # will not be used to issue certificates from the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + STAGED = 3 + + # Certificates cannot be issued from this CA. CRLs will not be generated. + # The CA will not be part of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s trust anchor, and + # will not be used to issue certificates from the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + AWAITING_USER_ACTIVATION = 4 + + # Certificates cannot be issued from this CA. CRLs will not be generated. + # The CA may still be recovered by calling + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#undelete_certificate_authority CertificateAuthorityService.UndeleteCertificateAuthority} + # before + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#expire_time expire_time}. + # The CA will not be part of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s trust anchor, and + # will not be used to issue certificates from the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + DELETED = 5 + end + + # The algorithm of a Cloud KMS CryptoKeyVersion of a + # [CryptoKey][google.cloud.kms.v1.CryptoKey] with the + # [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value + # `ASYMMETRIC_SIGN`. These values correspond to the + # [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + # values. For RSA signing algorithms, the PSS algorithms should be preferred, + # use PKCS1 algorithms if required for compatibility. For further + # recommendations, see + # https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations. + module SignHashAlgorithm + # Not specified. + SIGN_HASH_ALGORITHM_UNSPECIFIED = 0 + + # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256 + RSA_PSS_2048_SHA256 = 1 + + # maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256 + RSA_PSS_3072_SHA256 = 2 + + # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256 + RSA_PSS_4096_SHA256 = 3 + + # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256 + RSA_PKCS1_2048_SHA256 = 6 + + # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256 + RSA_PKCS1_3072_SHA256 = 7 + + # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256 + RSA_PKCS1_4096_SHA256 = 8 + + # maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256 + EC_P256_SHA256 = 4 + + # maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384 + EC_P384_SHA384 = 5 + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} represents a group of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} + # that form a trust anchor. A + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} can be used to manage + # issuance policies for one or more + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # resources and to rotate CA certificates in and out of the trust anchor. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format + # `projects/*/locations/*/caPools/*`. + # @!attribute [rw] tier + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::Tier] + # Required. Immutable. The + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::Tier Tier} of this + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # @!attribute [rw] issuance_policy + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy] + # Optional. The + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy IssuancePolicy} + # to control how + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} will be + # issued from this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # @!attribute [rw] publishing_options + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::PublishingOptions] + # Optional. The + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::PublishingOptions PublishingOptions} + # to follow when issuing + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} from any + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # @!attribute [rw] encryption_spec + # @return [::Google::Cloud::Security::PrivateCA::V1::EncryptionSpec] + # Optional. When + # {::Google::Cloud::Security::PrivateCA::V1::EncryptionSpec EncryptionSpec} is + # provided, the {::Google::Cloud::Security::PrivateCA::V1::Subject Subject}, + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames}, and + # the PEM-encoded certificate fields will be encrypted at rest. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels with user-defined metadata. + class CaPool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Options relating to the publication of each + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s + # CA certificate and CRLs and their inclusion as extensions in issued + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. The options + # set here apply to certificates issued by any + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # @!attribute [rw] publish_ca_cert + # @return [::Boolean] + # Optional. When true, publishes each + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s + # CA certificate and includes its URL in the "Authority Information Access" + # X.509 extension in all issued + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. If this + # is false, the CA certificate will not be published and the corresponding + # X.509 extension will not be written in issued certificates. + # @!attribute [rw] publish_crl + # @return [::Boolean] + # Optional. When true, publishes each + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s + # CRL and includes its URL in the "CRL Distribution Points" X.509 extension + # in all issued + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. If this + # is false, CRLs will not be published and the corresponding X.509 + # extension will not be written in issued certificates. CRLs will expire 7 + # days from their creation. However, we will rebuild daily. CRLs are also + # rebuilt shortly after a certificate is revoked. + # @!attribute [rw] encoding_format + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::PublishingOptions::EncodingFormat] + # Optional. Specifies the encoding format of each + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # resource's CA certificate and CRLs. If this is omitted, CA certificates + # and CRLs will be published in PEM. + class PublishingOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Supported encoding formats for publishing. + module EncodingFormat + # Not specified. By default, PEM format will be used. + ENCODING_FORMAT_UNSPECIFIED = 0 + + # The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s + # CA certificate and CRLs will be published in PEM format. + PEM = 1 + + # The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s + # CA certificate and CRLs will be published in DER format. + DER = 2 + end + end + + # Defines controls over all certificate issuance within a + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # @!attribute [rw] allowed_key_types + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType>] + # Optional. If any + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType AllowedKeyType} + # is specified, then the certificate request's public key must match one of + # the key types listed here. Otherwise, any key may be used. + # @!attribute [rw] backdate_duration + # @return [::Google::Protobuf::Duration] + # Optional. If set, all certificates issued from this + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} will be backdated by + # this duration. The 'not_before_time' will be the issuance time minus this + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#backdate_duration backdate_duration}, + # and the 'not_after_time' will be adjusted to preserve the requested + # lifetime. The maximum duration that a certificate can be backdated with + # these options is 48 hours in the past. + # This option cannot be set if + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#allow_requester_specified_not_before_time allow_requester_specified_not_before_time} + # is set. + # @!attribute [rw] allow_requester_specified_not_before_time + # @return [::Boolean] + # Optional. If set to true, allows requesters to specify the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate#requested_not_before_time requested_not_before_time} + # field when creating a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. + # Certificates requested with this option enabled will have a + # 'not_before_time' equal to the value specified in the request. The + # 'not_after_time' will be adjusted to preserve the requested lifetime. The + # maximum time that a certificate can be backdated with these options is 48 + # hours in the past. This option cannot be set if + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#backdate_duration backdate_duration} + # is set. + # @!attribute [rw] maximum_lifetime + # @return [::Google::Protobuf::Duration] + # Optional. The maximum lifetime allowed for issued + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. Note that + # if the issuing + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # expires before a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} resource's + # requested maximum_lifetime, the effective lifetime will be explicitly + # truncated to match it. + # @!attribute [rw] allowed_issuance_modes + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::IssuanceModes] + # Optional. If specified, then only methods allowed in the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::IssuanceModes IssuanceModes} + # may be used to issue + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. + # @!attribute [rw] baseline_values + # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters] + # Optional. A set of X.509 values that will be applied to all certificates + # issued through this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # If a certificate request includes conflicting values for the same + # properties, they will be overwritten by the values defined here. If a + # certificate request uses a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # that defines conflicting + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#predefined_values predefined_values} + # for the same properties, the certificate issuance request will fail. + # @!attribute [rw] identity_constraints + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateIdentityConstraints] + # Optional. Describes constraints on identities that may appear in + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} issued + # through this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. If this + # is omitted, then this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} + # will not add restrictions on a certificate's identity. + # @!attribute [rw] passthrough_extensions + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateExtensionConstraints] + # Optional. Describes the set of X.509 extensions that may appear in a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued + # through this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. If a + # certificate request sets extensions that don't appear in the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#passthrough_extensions passthrough_extensions}, + # those extensions will be dropped. If a certificate request uses a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # with + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#predefined_values predefined_values} + # that don't appear here, the certificate issuance request will fail. If + # this is omitted, then this + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} will not add + # restrictions on a certificate's X.509 extensions. These constraints do + # not apply to X.509 extensions set in this + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#baseline_values baseline_values}. + class IssuancePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a "type" of key that may be used in a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued from + # a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. Note that a single + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType AllowedKeyType} + # may refer to either a fully-qualified key algorithm, such as RSA 4096, or + # a family of key algorithms, such as any RSA key. + # @!attribute [rw] rsa + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType::RsaKeyType] + # Represents an allowed RSA key type. + # + # Note: The following fields are mutually exclusive: `rsa`, `elliptic_curve`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] elliptic_curve + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType::EcKeyType] + # Represents an allowed Elliptic Curve key type. + # + # Note: The following fields are mutually exclusive: `elliptic_curve`, `rsa`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AllowedKeyType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes an RSA key that may be used in a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued + # from a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # @!attribute [rw] min_modulus_size + # @return [::Integer] + # Optional. The minimum allowed RSA modulus size (inclusive), in bits. + # If this is not set, or if set to zero, the service-level min RSA + # modulus size will continue to apply. + # @!attribute [rw] max_modulus_size + # @return [::Integer] + # Optional. The maximum allowed RSA modulus size (inclusive), in bits. + # If this is not set, or if set to zero, the service will not enforce + # an explicit upper bound on RSA modulus sizes. + class RsaKeyType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes an Elliptic Curve key that may be used in a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued + # from a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # @!attribute [rw] signature_algorithm + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType::EcKeyType::EcSignatureAlgorithm] + # Optional. A signature algorithm that must be used. If this is + # omitted, any EC-based signature algorithm will be allowed. + class EcKeyType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes an elliptic curve-based signature algorithm that may be + # used in a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued + # from a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + module EcSignatureAlgorithm + # Not specified. Signifies that any signature algorithm may be used. + EC_SIGNATURE_ALGORITHM_UNSPECIFIED = 0 + + # Refers to the Elliptic Curve Digital Signature Algorithm over the + # NIST P-256 curve. + ECDSA_P256 = 1 + + # Refers to the Elliptic Curve Digital Signature Algorithm over the + # NIST P-384 curve. + ECDSA_P384 = 2 + + # Refers to the Edwards-curve Digital Signature Algorithm over curve + # 25519, as described in RFC 8410. + EDDSA_25519 = 3 + end + end + end + + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::IssuanceModes IssuanceModes} + # specifies the allowed ways in which + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} may be + # requested from this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # @!attribute [rw] allow_csr_based_issuance + # @return [::Boolean] + # Optional. When true, allows callers to create + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} by + # specifying a CSR. + # @!attribute [rw] allow_config_based_issuance + # @return [::Boolean] + # Optional. When true, allows callers to create + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} by + # specifying a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateConfig CertificateConfig}. + class IssuanceModes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The tier of a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}, + # indicating its supported functionality and/or billing SKU. + module Tier + # Not specified. + TIER_UNSPECIFIED = 0 + + # Enterprise tier. + ENTERPRISE = 1 + + # DevOps tier. + DEVOPS = 2 + end + end + + # The configuration used for encrypting data at rest. + # @!attribute [rw] cloud_kms_key + # @return [::String] + # The resource name for a Cloud KMS key in the format + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + class EncryptionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # corresponds to a signed X.509 certificate Revocation List (CRL). A CRL + # contains the serial numbers of certificates that should no longer be trusted. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # in the format `projects/*/locations/*/caPools/*certificateAuthorities/*/ + # certificateRevocationLists/*`. + # @!attribute [r] sequence_number + # @return [::Integer] + # Output only. The CRL sequence number that appears in pem_crl. + # @!attribute [r] revoked_certificates + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList::RevokedCertificate>] + # Output only. The revoked serial numbers that appear in pem_crl. + # @!attribute [r] pem_crl + # @return [::String] + # Output only. The PEM-encoded X.509 CRL. + # @!attribute [r] access_url + # @return [::String] + # Output only. The location where 'pem_crl' can be accessed. + # @!attribute [r] state + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList::State] + # Output only. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList::State State} + # for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # was updated. + # @!attribute [r] revision_id + # @return [::String] + # Output only. The revision ID of this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. + # A new revision is committed whenever a new CRL is published. The format is + # an 8-character hexadecimal string. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels with user-defined metadata. + class CertificateRevocationList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a revoked + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. + # @!attribute [rw] certificate + # @return [::String] + # The resource name for the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the + # format `projects/*/locations/*/caPools/*/certificates/*`. + # @!attribute [rw] hex_serial_number + # @return [::String] + # The serial number of the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. + # @!attribute [rw] revocation_reason + # @return [::Google::Cloud::Security::PrivateCA::V1::RevocationReason] + # The reason the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} was + # revoked. + class RevokedCertificate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}, + # indicating if it is current. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # is up to date. + ACTIVE = 1 + + # The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # is no longer current. + SUPERSEDED = 2 + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} corresponds + # to a signed X.509 certificate issued by a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the format + # `projects/*/locations/*/caPools/*/certificates/*`. + # @!attribute [rw] pem_csr + # @return [::String] + # Immutable. A pem-encoded X.509 certificate signing request (CSR). + # + # Note: The following fields are mutually exclusive: `pem_csr`, `config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] config + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateConfig] + # Immutable. A description of the certificate and key that does not require + # X.509 or ASN.1. + # + # Note: The following fields are mutually exclusive: `config`, `pem_csr`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] issuer_certificate_authority + # @return [::String] + # Output only. The resource name of the issuing + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @!attribute [rw] lifetime + # @return [::Google::Protobuf::Duration] + # Required. Immutable. The desired lifetime of a certificate. Used to create + # the "not_before_time" and "not_after_time" fields inside an X.509 + # certificate. Note that the lifetime may be truncated if it would extend + # past the life of any certificate authority in the issuing chain. + # @!attribute [rw] certificate_template + # @return [::String] + # Immutable. The resource name for a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # used to issue this certificate, in the format + # `projects/*/locations/*/certificateTemplates/*`. + # If this is specified, the caller must have the necessary permission to + # use this template. If this is omitted, no template will be used. + # This template must be in the same location as the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. + # @!attribute [rw] subject_mode + # @return [::Google::Cloud::Security::PrivateCA::V1::SubjectRequestMode] + # Immutable. Specifies how the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}'s identity + # fields are to be decided. If this is omitted, the `DEFAULT` subject mode + # will be used. + # @!attribute [r] revocation_details + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate::RevocationDetails] + # Output only. Details regarding the revocation of this + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. This + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} is considered + # revoked if and only if this field is present. + # @!attribute [r] pem_certificate + # @return [::String] + # Output only. The pem-encoded, signed X.509 certificate. + # @!attribute [r] certificate_description + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateDescription] + # Output only. A structured description of the issued X.509 certificate. + # @!attribute [r] pem_certificate_chain + # @return [::Array<::String>] + # Output only. The chain that may be used to verify the X.509 certificate. + # Expected to be in issuer-to-root order according to RFC 5246. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels with user-defined metadata. + # @!attribute [rw] requested_not_before_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The requested + # {::Google::Cloud::Security::PrivateCA::V1::CertificateDescription::SubjectDescription#not_before_time not_before_time} + # of this {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. This + # field may only be set if the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#allow_requester_specified_not_before_time CaPool.IssuancePolicy.allow_requester_specified_not_before_time} + # field is set to true for the issuing + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. + # + # If this field is specified, the certificate will be issued with this + # 'not_before_time'. If this is not specified, the 'not_before_time' will be + # set to the issuance time or issuance time minus + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#backdate_duration backdate_duration} + # depending on the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} + # configuration. + class Certificate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes fields that are relavent to the revocation of a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. + # @!attribute [rw] revocation_state + # @return [::Google::Cloud::Security::PrivateCA::V1::RevocationReason] + # Indicates why a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} was + # revoked. + # @!attribute [rw] revocation_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} was + # revoked. + class RevocationDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # refers to a managed template for certificate issuance. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # in the format `projects/*/locations/*/certificateTemplates/*`. + # @!attribute [rw] maximum_lifetime + # @return [::Google::Protobuf::Duration] + # Optional. The maximum lifetime allowed for issued + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} that use + # this template. If the issuing + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} resource's + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy IssuancePolicy} + # specifies a + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#maximum_lifetime maximum_lifetime} + # the minimum of the two durations will be the maximum lifetime for issued + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. Note that + # if the issuing + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # expires before a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}'s requested + # maximum_lifetime, the effective lifetime will be explicitly truncated + # to match it. + # @!attribute [rw] predefined_values + # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters] + # Optional. A set of X.509 values that will be applied to all issued + # certificates that use this template. If the certificate request includes + # conflicting values for the same properties, they will be overwritten by the + # values defined here. If the issuing + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy IssuancePolicy} + # defines conflicting + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#baseline_values baseline_values} + # for the same properties, the certificate issuance request will fail. + # @!attribute [rw] identity_constraints + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateIdentityConstraints] + # Optional. Describes constraints on identities that may be appear in + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} issued using + # this template. If this is omitted, then this template will not add + # restrictions on a certificate's identity. + # @!attribute [rw] passthrough_extensions + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateExtensionConstraints] + # Optional. Describes the set of X.509 extensions that may appear in a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued using + # this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. + # If a certificate request sets extensions that don't appear in the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#passthrough_extensions passthrough_extensions}, + # those extensions will be dropped. If the issuing + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy IssuancePolicy} + # defines + # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#baseline_values baseline_values} + # that don't appear here, the certificate issuance request will fail. If this + # is omitted, then this template will not add restrictions on a certificate's + # X.509 extensions. These constraints do not apply to X.509 extensions set in + # this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}'s + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#predefined_values predefined_values}. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of scenarios this template is + # intended for. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels with user-defined metadata. + class CertificateTemplate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An {::Google::Cloud::Security::PrivateCA::V1::X509Parameters X509Parameters} is + # used to describe certain fields of an X.509 certificate, such as the key + # usage fields, fields specific to CA certificates, certificate policy + # extensions and custom extensions. + # @!attribute [rw] key_usage + # @return [::Google::Cloud::Security::PrivateCA::V1::KeyUsage] + # Optional. Indicates the intended use for keys that correspond to a + # certificate. + # @!attribute [rw] ca_options + # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters::CaOptions] + # Optional. Describes options in this + # {::Google::Cloud::Security::PrivateCA::V1::X509Parameters X509Parameters} that + # are relevant in a CA certificate. If not specified, a default basic + # constraints extension with `is_ca=false` will be added for leaf + # certificates. + # @!attribute [rw] policy_ids + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::ObjectId>] + # Optional. Describes the X.509 certificate policy object identifiers, per + # https://tools.ietf.org/html/rfc5280#section-4.2.1.4. + # @!attribute [rw] aia_ocsp_servers + # @return [::Array<::String>] + # Optional. Describes Online Certificate Status Protocol (OCSP) endpoint + # addresses that appear in the "Authority Information Access" extension in + # the certificate. + # @!attribute [rw] name_constraints + # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters::NameConstraints] + # Optional. Describes the X.509 name constraints extension. + # @!attribute [rw] additional_extensions + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::X509Extension>] + # Optional. Describes custom X.509 extensions. + class X509Parameters + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the X.509 basic constraints extension, per [RFC 5280 + # section 4.2.1.9](https://tools.ietf.org/html/rfc5280#section-4.2.1.9) + # @!attribute [rw] is_ca + # @return [::Boolean] + # Optional. Refers to the "CA" boolean field in the X.509 extension. + # When this value is missing, the basic constraints extension will be + # omitted from the certificate. + # @!attribute [rw] max_issuer_path_length + # @return [::Integer] + # Optional. Refers to the path length constraint field in the X.509 + # extension. For a CA certificate, this value describes the depth of + # subordinate CA certificates that are allowed. If this value is less than + # 0, the request will fail. If this value is missing, the max path length + # will be omitted from the certificate. + class CaOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the X.509 name constraints extension, per + # https://tools.ietf.org/html/rfc5280#section-4.2.1.10 + # @!attribute [rw] critical + # @return [::Boolean] + # Indicates whether or not the name constraints are marked critical. + # @!attribute [rw] permitted_dns_names + # @return [::Array<::String>] + # Contains permitted DNS names. Any DNS name that can be + # constructed by simply adding zero or more labels to + # the left-hand side of the name satisfies the name constraint. + # For example, `example.com`, `www.example.com`, `www.sub.example.com` + # would satisfy `example.com` while `example1.com` does not. + # @!attribute [rw] excluded_dns_names + # @return [::Array<::String>] + # Contains excluded DNS names. Any DNS name that can be + # constructed by simply adding zero or more labels to + # the left-hand side of the name satisfies the name constraint. + # For example, `example.com`, `www.example.com`, `www.sub.example.com` + # would satisfy `example.com` while `example1.com` does not. + # @!attribute [rw] permitted_ip_ranges + # @return [::Array<::String>] + # Contains the permitted IP ranges. For IPv4 addresses, the ranges + # are expressed using CIDR notation as specified in RFC 4632. + # For IPv6 addresses, the ranges are expressed in similar encoding as IPv4 + # addresses. + # @!attribute [rw] excluded_ip_ranges + # @return [::Array<::String>] + # Contains the excluded IP ranges. For IPv4 addresses, the ranges + # are expressed using CIDR notation as specified in RFC 4632. + # For IPv6 addresses, the ranges are expressed in similar encoding as IPv4 + # addresses. + # @!attribute [rw] permitted_email_addresses + # @return [::Array<::String>] + # Contains the permitted email addresses. The value can be a particular + # email address, a hostname to indicate all email addresses on that host or + # a domain with a leading period (e.g. `.example.com`) to indicate + # all email addresses in that domain. + # @!attribute [rw] excluded_email_addresses + # @return [::Array<::String>] + # Contains the excluded email addresses. The value can be a particular + # email address, a hostname to indicate all email addresses on that host or + # a domain with a leading period (e.g. `.example.com`) to indicate + # all email addresses in that domain. + # @!attribute [rw] permitted_uris + # @return [::Array<::String>] + # Contains the permitted URIs that apply to the host part of the name. + # The value can be a hostname or a domain with a + # leading period (like `.example.com`) + # @!attribute [rw] excluded_uris + # @return [::Array<::String>] + # Contains the excluded URIs that apply to the host part of the name. + # The value can be a hostname or a domain with a + # leading period (like `.example.com`) + class NameConstraints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes a subordinate CA's issuers. This is either a resource name to a + # known issuing + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}, + # or a PEM issuer certificate chain. + # @!attribute [rw] certificate_authority + # @return [::String] + # Required. This can refer to a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # that was used to create a subordinate + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. + # This field is used for information and usability purposes only. The + # resource name is in the format + # `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # + # Note: The following fields are mutually exclusive: `certificate_authority`, `pem_issuer_chain`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pem_issuer_chain + # @return [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig::SubordinateConfigChain] + # Required. Contains the PEM certificate chain for the issuers of this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}, + # but not pem certificate for this CA itself. + # + # Note: The following fields are mutually exclusive: `pem_issuer_chain`, `certificate_authority`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SubordinateConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This message describes a subordinate CA's issuer certificate chain. This + # wrapper exists for compatibility reasons. + # @!attribute [rw] pem_certificates + # @return [::Array<::String>] + # Required. Expected to be in leaf-to-root order according to RFC 5246. + class SubordinateConfigChain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1::PublicKey PublicKey} describes a + # public key. + # @!attribute [rw] key + # @return [::String] + # Required. A public key. The padding and encoding + # must match with the `KeyFormat` value specified for the `format` field. + # @!attribute [rw] format + # @return [::Google::Cloud::Security::PrivateCA::V1::PublicKey::KeyFormat] + # Required. The format of the public key. + class PublicKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of public keys formats that are supported. Currently, only `PEM` + # format is supported. + module KeyFormat + # Default unspecified value. + KEY_FORMAT_UNSPECIFIED = 0 + + # The key is PEM-encoded as defined in [RFC + # 7468](https://tools.ietf.org/html/rfc7468). It can be any of the + # following: a PEM-encoded PKCS#1/RFC 3447 RSAPublicKey + # structure, an RFC 5280 + # [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) + # or a PEM-encoded X.509 certificate signing request (CSR). If a + # [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) + # is specified, it can contain a A PEM-encoded PKCS#1/RFC 3447 RSAPublicKey + # or a NIST P-256/secp256r1/prime256v1 or P-384 key. If a CSR is specified, + # it will used solely for the purpose of extracting the public key. When + # generated by the service, it will always be an RFC 5280 + # [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) + # structure containing an algorithm identifier and a key. + PEM = 1 + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1::CertificateConfig CertificateConfig} + # describes an X.509 certificate or CSR that is to be created, as an + # alternative to using ASN.1. + # @!attribute [rw] subject_config + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateConfig::SubjectConfig] + # Required. Specifies some of the values in a certificate that are related to + # the subject. + # @!attribute [rw] x509_config + # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters] + # Required. Describes how some of the technical X.509 fields in a certificate + # should be populated. + # @!attribute [rw] public_key + # @return [::Google::Cloud::Security::PrivateCA::V1::PublicKey] + # Optional. The public key that corresponds to this config. This is, for + # example, used when issuing + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}, but not + # when creating a self-signed + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # or + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # CSR. + # @!attribute [rw] subject_key_id + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateConfig::KeyId] + # Optional. When specified this provides a custom SKI to be used in the + # certificate. This should only be used to maintain a SKI of an existing CA + # originally created outside CA service, which was not generated using method + # (1) described in RFC 5280 section 4.2.1.2. + class CertificateConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # These values are used to create the distinguished name and subject + # alternative name fields in an X.509 certificate. + # @!attribute [rw] subject + # @return [::Google::Cloud::Security::PrivateCA::V1::Subject] + # Optional. Contains distinguished name fields such as the common name, + # location and organization. + # @!attribute [rw] subject_alt_name + # @return [::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames] + # Optional. The subject alternative name fields. + class SubjectConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A KeyId identifies a specific public key, usually by hashing the public + # key. + # @!attribute [rw] key_id + # @return [::String] + # Required. The value of this KeyId encoded in lowercase hexadecimal. This + # is most likely the 160 bit SHA-1 hash of the public key. + class KeyId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A + # {::Google::Cloud::Security::PrivateCA::V1::CertificateDescription CertificateDescription} + # describes an X.509 certificate or CSR that has been issued, as an alternative + # to using ASN.1 / X.509. + # @!attribute [rw] subject_description + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateDescription::SubjectDescription] + # Describes some of the values in a certificate that are related to the + # subject and lifetime. + # @!attribute [rw] x509_description + # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters] + # Describes some of the technical X.509 fields in a certificate. + # @!attribute [rw] public_key + # @return [::Google::Cloud::Security::PrivateCA::V1::PublicKey] + # The public key that corresponds to an issued certificate. + # @!attribute [rw] subject_key_id + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateDescription::KeyId] + # Provides a means of identifiying certificates that contain a particular + # public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2. + # @!attribute [rw] authority_key_id + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateDescription::KeyId] + # Identifies the subject_key_id of the parent certificate, per + # https://tools.ietf.org/html/rfc5280#section-4.2.1.1 + # @!attribute [rw] crl_distribution_points + # @return [::Array<::String>] + # Describes a list of locations to obtain CRL information, i.e. + # the DistributionPoint.fullName described by + # https://tools.ietf.org/html/rfc5280#section-4.2.1.13 + # @!attribute [rw] aia_issuing_certificate_urls + # @return [::Array<::String>] + # Describes lists of issuer CA certificate URLs that appear in the + # "Authority Information Access" extension in the certificate. + # @!attribute [rw] cert_fingerprint + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateDescription::CertificateFingerprint] + # The hash of the x.509 certificate. + # @!attribute [rw] tbs_certificate_digest + # @return [::String] + # The hash of the pre-signed certificate, which will be signed by the CA. + # Corresponds to the TBS Certificate in + # https://tools.ietf.org/html/rfc5280#section-4.1.2. The field will always be + # populated. + class CertificateDescription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # These values describe fields in an issued X.509 certificate such as the + # distinguished name, subject alternative names, serial number, and lifetime. + # @!attribute [rw] subject + # @return [::Google::Cloud::Security::PrivateCA::V1::Subject] + # Contains distinguished name fields such as the common name, location and + # / organization. + # @!attribute [rw] subject_alt_name + # @return [::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames] + # The subject alternative name fields. + # @!attribute [rw] hex_serial_number + # @return [::String] + # The serial number encoded in lowercase hexadecimal. + # @!attribute [rw] lifetime + # @return [::Google::Protobuf::Duration] + # For convenience, the actual lifetime of an issued certificate. + # @!attribute [rw] not_before_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the certificate becomes valid. + # @!attribute [rw] not_after_time + # @return [::Google::Protobuf::Timestamp] + # The time after which the certificate is expired. + # Per RFC 5280, the validity period for a certificate is the period of time + # from not_before_time through not_after_time, inclusive. + # Corresponds to 'not_before_time' + 'lifetime' - 1 second. + class SubjectDescription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A KeyId identifies a specific public key, usually by hashing the public + # key. + # @!attribute [rw] key_id + # @return [::String] + # Optional. The value of this KeyId encoded in lowercase hexadecimal. This + # is most likely the 160 bit SHA-1 hash of the public key. + class KeyId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A group of fingerprints for the x509 certificate. + # @!attribute [rw] sha256_hash + # @return [::String] + # The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate. + class CertificateFingerprint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An {::Google::Cloud::Security::PrivateCA::V1::ObjectId ObjectId} specifies an + # object identifier (OID). These provide context and describe types in ASN.1 + # messages. + # @!attribute [rw] object_id_path + # @return [::Array<::Integer>] + # Required. The parts of an OID path. The most significant parts of the path + # come first. + class ObjectId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An {::Google::Cloud::Security::PrivateCA::V1::X509Extension X509Extension} + # specifies an X.509 extension, which may be used in different parts of X.509 + # objects like certificates, CSRs, and CRLs. + # @!attribute [rw] object_id + # @return [::Google::Cloud::Security::PrivateCA::V1::ObjectId] + # Required. The OID for this X.509 extension. + # @!attribute [rw] critical + # @return [::Boolean] + # Optional. Indicates whether or not this extension is critical (i.e., if the + # client does not know how to handle this extension, the client should + # consider this to be an error). + # @!attribute [rw] value + # @return [::String] + # Required. The value of this X.509 extension. + class X509Extension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A {::Google::Cloud::Security::PrivateCA::V1::KeyUsage KeyUsage} describes key usage + # values that may appear in an X.509 certificate. + # @!attribute [rw] base_key_usage + # @return [::Google::Cloud::Security::PrivateCA::V1::KeyUsage::KeyUsageOptions] + # Describes high-level ways in which a key may be used. + # @!attribute [rw] extended_key_usage + # @return [::Google::Cloud::Security::PrivateCA::V1::KeyUsage::ExtendedKeyUsageOptions] + # Detailed scenarios in which a key may be used. + # @!attribute [rw] unknown_extended_key_usages + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::ObjectId>] + # Used to describe extended key usages that are not listed in the + # {::Google::Cloud::Security::PrivateCA::V1::KeyUsage::ExtendedKeyUsageOptions KeyUsage.ExtendedKeyUsageOptions} + # message. + class KeyUsage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # {::Google::Cloud::Security::PrivateCA::V1::KeyUsage::KeyUsageOptions KeyUsage.KeyUsageOptions} + # corresponds to the key usage values described in + # https://tools.ietf.org/html/rfc5280#section-4.2.1.3. + # @!attribute [rw] digital_signature + # @return [::Boolean] + # The key may be used for digital signatures. + # @!attribute [rw] content_commitment + # @return [::Boolean] + # The key may be used for cryptographic commitments. Note that this may + # also be referred to as "non-repudiation". + # @!attribute [rw] key_encipherment + # @return [::Boolean] + # The key may be used to encipher other keys. + # @!attribute [rw] data_encipherment + # @return [::Boolean] + # The key may be used to encipher data. + # @!attribute [rw] key_agreement + # @return [::Boolean] + # The key may be used in a key agreement protocol. + # @!attribute [rw] cert_sign + # @return [::Boolean] + # The key may be used to sign certificates. + # @!attribute [rw] crl_sign + # @return [::Boolean] + # The key may be used sign certificate revocation lists. + # @!attribute [rw] encipher_only + # @return [::Boolean] + # The key may be used to encipher only. + # @!attribute [rw] decipher_only + # @return [::Boolean] + # The key may be used to decipher only. + class KeyUsageOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # {::Google::Cloud::Security::PrivateCA::V1::KeyUsage::ExtendedKeyUsageOptions KeyUsage.ExtendedKeyUsageOptions} + # has fields that correspond to certain common OIDs that could be specified + # as an extended key usage value. + # @!attribute [rw] server_auth + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW + # server authentication", though regularly used for non-WWW TLS. + # @!attribute [rw] client_auth + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW + # client authentication", though regularly used for non-WWW TLS. + # @!attribute [rw] code_signing + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of + # downloadable executable code client authentication". + # @!attribute [rw] email_protection + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email + # protection". + # @!attribute [rw] time_stamping + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding + # the hash of an object to a time". + # @!attribute [rw] ocsp_signing + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing + # OCSP responses". + class ExtendedKeyUsageOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # {::Google::Cloud::Security::PrivateCA::V1::AttributeTypeAndValue AttributeTypeAndValue} + # specifies an attribute type and value. It can use either a OID or enum value + # to specify the attribute type. + # @!attribute [rw] type + # @return [::Google::Cloud::Security::PrivateCA::V1::AttributeType] + # The attribute type of the attribute and value pair. + # + # Note: The following fields are mutually exclusive: `type`, `object_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] object_id + # @return [::Google::Cloud::Security::PrivateCA::V1::ObjectId] + # Object ID for an attribute type of an attribute and value pair. + # + # Note: The following fields are mutually exclusive: `object_id`, `type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] value + # @return [::String] + # The value for the attribute type. + class AttributeTypeAndValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # {::Google::Cloud::Security::PrivateCA::V1::RelativeDistinguishedName RelativeDistinguishedName} + # specifies a relative distinguished name which will be used to build a + # distinguished name. + # @!attribute [rw] attributes + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::AttributeTypeAndValue>] + # Attributes describes the attribute value assertions in the RDN. + class RelativeDistinguishedName + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} describes parts of a + # distinguished name that, in turn, describes the subject of the certificate. + # @!attribute [rw] common_name + # @return [::String] + # The "common name" of the subject. + # @!attribute [rw] country_code + # @return [::String] + # The country code of the subject. + # @!attribute [rw] organization + # @return [::String] + # The organization of the subject. + # @!attribute [rw] organizational_unit + # @return [::String] + # The organizational_unit of the subject. + # @!attribute [rw] locality + # @return [::String] + # The locality or city of the subject. + # @!attribute [rw] province + # @return [::String] + # The province, territory, or regional state of the subject. + # @!attribute [rw] street_address + # @return [::String] + # The street address of the subject. + # @!attribute [rw] postal_code + # @return [::String] + # The postal code of the subject. + # @!attribute [rw] rdn_sequence + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::RelativeDistinguishedName>] + # This field can be used in place of the named subject fields. + class Subject + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} + # corresponds to a more modern way of listing what the asserted identity is in + # a certificate (i.e., compared to the "common name" in the distinguished + # name). + # @!attribute [rw] dns_names + # @return [::Array<::String>] + # Contains only valid, fully-qualified host names. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Contains only valid RFC 3986 URIs. + # @!attribute [rw] email_addresses + # @return [::Array<::String>] + # Contains only valid RFC 2822 E-mail addresses. + # @!attribute [rw] ip_addresses + # @return [::Array<::String>] + # Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses. + # @!attribute [rw] custom_sans + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::X509Extension>] + # Contains additional subject alternative name values. + # For each custom_san, the `value` field must contain an ASN.1 encoded + # UTF8String. + class SubjectAltNames + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes constraints on a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}'s + # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} and + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames}. + # @!attribute [rw] cel_expression + # @return [::Google::Type::Expr] + # Optional. A CEL expression that may be used to validate the resolved X.509 + # Subject and/or Subject Alternative Name before a certificate is signed. To + # see the full allowed syntax and some examples, see + # https://cloud.google.com/certificate-authority-service/docs/using-cel + # @!attribute [rw] allow_subject_passthrough + # @return [::Boolean] + # Required. If this is true, the + # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} field may be copied + # from a certificate request into the signed certificate. Otherwise, the + # requested {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} will be + # discarded. + # @!attribute [rw] allow_subject_alt_names_passthrough + # @return [::Boolean] + # Required. If this is true, the + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} + # extension may be copied from a certificate request into the signed + # certificate. Otherwise, the requested + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} will + # be discarded. + class CertificateIdentityConstraints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a set of X.509 extensions that may be part of some certificate + # issuance controls. + # @!attribute [rw] known_extensions + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateExtensionConstraints::KnownCertificateExtension>] + # Optional. A set of named X.509 extensions. Will be combined with + # {::Google::Cloud::Security::PrivateCA::V1::CertificateExtensionConstraints#additional_extensions additional_extensions} + # to determine the full set of X.509 extensions. + # @!attribute [rw] additional_extensions + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::ObjectId>] + # Optional. A set of {::Google::Cloud::Security::PrivateCA::V1::ObjectId ObjectIds} + # identifying custom X.509 extensions. Will be combined with + # {::Google::Cloud::Security::PrivateCA::V1::CertificateExtensionConstraints#known_extensions known_extensions} + # to determine the full set of X.509 extensions. + class CertificateExtensionConstraints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes well-known X.509 extensions that can appear in a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}, not + # including the + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} + # extension. + module KnownCertificateExtension + # Not specified. + KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED = 0 + + # Refers to a certificate's Key Usage extension, as described in [RFC 5280 + # section 4.2.1.3](https://tools.ietf.org/html/rfc5280#section-4.2.1.3). + # This corresponds to the + # {::Google::Cloud::Security::PrivateCA::V1::KeyUsage#base_key_usage KeyUsage.base_key_usage} + # field. + BASE_KEY_USAGE = 1 + + # Refers to a certificate's Extended Key Usage extension, as described in + # [RFC 5280 + # section 4.2.1.12](https://tools.ietf.org/html/rfc5280#section-4.2.1.12). + # This corresponds to the + # {::Google::Cloud::Security::PrivateCA::V1::KeyUsage#extended_key_usage KeyUsage.extended_key_usage} + # message. + EXTENDED_KEY_USAGE = 2 + + # Refers to a certificate's Basic Constraints extension, as described in + # [RFC 5280 + # section 4.2.1.9](https://tools.ietf.org/html/rfc5280#section-4.2.1.9). + # This corresponds to the + # {::Google::Cloud::Security::PrivateCA::V1::X509Parameters#ca_options X509Parameters.ca_options} + # field. + CA_OPTIONS = 3 + + # Refers to a certificate's Policy object identifiers, as described in + # [RFC 5280 + # section 4.2.1.4](https://tools.ietf.org/html/rfc5280#section-4.2.1.4). + # This corresponds to the + # {::Google::Cloud::Security::PrivateCA::V1::X509Parameters#policy_ids X509Parameters.policy_ids} + # field. + POLICY_IDS = 4 + + # Refers to OCSP servers in a certificate's Authority Information Access + # extension, as described in + # [RFC 5280 + # section 4.2.2.1](https://tools.ietf.org/html/rfc5280#section-4.2.2.1), + # This corresponds to the + # {::Google::Cloud::Security::PrivateCA::V1::X509Parameters#aia_ocsp_servers X509Parameters.aia_ocsp_servers} + # field. + AIA_OCSP_SERVERS = 5 + + # Refers to Name Constraints extension as described in + # [RFC 5280 + # section 4.2.1.10](https://tools.ietf.org/html/rfc5280#section-4.2.1.10) + NAME_CONSTRAINTS = 6 + end + end + + # {::Google::Cloud::Security::PrivateCA::V1::AttributeType AttributeType} specifies + # the type of Attribute in a relative distinguished name. + module AttributeType + # Attribute type is unspecified. + ATTRIBUTE_TYPE_UNSPECIFIED = 0 + + # The "common name" of the subject. + COMMON_NAME = 1 + + # The country code of the subject. + COUNTRY_CODE = 2 + + # The organization of the subject. + ORGANIZATION = 3 + + # The organizational unit of the subject. + ORGANIZATIONAL_UNIT = 4 + + # The locality or city of the subject. + LOCALITY = 5 + + # The province, territory, or regional state of the subject. + PROVINCE = 6 + + # The street address of the subject. + STREET_ADDRESS = 7 + + # The postal code of the subject. + POSTAL_CODE = 8 + end + + # A {::Google::Cloud::Security::PrivateCA::V1::RevocationReason RevocationReason} + # indicates whether a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} has been + # revoked, and the reason for revocation. These correspond to standard + # revocation reasons from RFC 5280. Note that the enum labels and values in + # this definition are not the same ASN.1 values defined in RFC 5280. These + # values will be translated to the correct ASN.1 values when a CRL is created. + module RevocationReason + # Default unspecified value. This value does indicate that a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} has been + # revoked, but that a reason has not been recorded. + REVOCATION_REASON_UNSPECIFIED = 0 + + # Key material for this + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} may have + # leaked. + KEY_COMPROMISE = 1 + + # The key material for a certificate authority in the issuing path may have + # leaked. + CERTIFICATE_AUTHORITY_COMPROMISE = 2 + + # The subject or other attributes in this + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} have changed. + AFFILIATION_CHANGED = 3 + + # This {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} has been + # superseded. + SUPERSEDED = 4 + + # This {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} or + # entities in the issuing path have ceased to operate. + CESSATION_OF_OPERATION = 5 + + # This {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} should + # not be considered valid, it is expected that it may become valid in the + # future. + CERTIFICATE_HOLD = 6 + + # This {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} no + # longer has permission to assert the listed attributes. + PRIVILEGE_WITHDRAWN = 7 + + # The authority which determines appropriate attributes for a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} may have been + # compromised. + ATTRIBUTE_AUTHORITY_COMPROMISE = 8 + end + + # Describes the way in which a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}'s + # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} and/or + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} will be + # resolved. + module SubjectRequestMode + # Not specified. + SUBJECT_REQUEST_MODE_UNSPECIFIED = 0 + + # The default mode used in most cases. Indicates that the certificate's + # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} and/or + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} are + # specified in the certificate request. This mode requires the caller to have + # the `privateca.certificates.create` permission. + DEFAULT = 1 + + # A mode used to get an accurate representation of the Subject + # field's distinguished name. Indicates that the certificate's + # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} and/or + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} are + # specified in the certificate request. When parsing a PEM CSR this mode will + # maintain the sequence of RDNs found in the CSR's subject field in the + # issued {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. This + # mode requires the caller to have the `privateca.certificates.create` + # permission. + RDN_SEQUENCE = 3 + + # A mode reserved for special cases. Indicates that the certificate should + # have one SPIFFE + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} set + # by the service based on the caller's identity. This mode will ignore any + # explicitly specified {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} + # and/or + # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} in + # the certificate request. This mode requires the caller to have the + # `privateca.certificates.createForSelf` permission. + REFLECTED_SPIFFE = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb new file mode 100644 index 000000000000..6a4a087b61da --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb @@ -0,0 +1,1041 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate CertificateAuthorityService.CreateCertificate}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}, in the + # format `projects/*/locations/*/caPools/*`. + # @!attribute [rw] certificate_id + # @return [::String] + # Optional. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the Enterprise + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#tier CertificateAuthority.tier}, + # but is optional and its value is ignored otherwise. + # @!attribute [rw] certificate + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # Required. A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} + # with initial field values. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, + # the server can check if original operation with the same request ID was + # received, and if so, will ignore the second request. This prevents clients + # from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If this is true, no + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} resource will + # be persisted regardless of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s + # {::Google::Cloud::Security::PrivateCA::V1::CaPool#tier tier}, and the returned + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} will not + # contain the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate#pem_certificate pem_certificate} + # field. + # @!attribute [rw] issuing_certificate_authority_id + # @return [::String] + # Optional. The resource ID of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # that should issue the certificate. This optional field will ignore the + # load-balancing scheme of the Pool and directly issue the certificate from + # the CA with the specified ID, contained in the same + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} referenced by `parent`. + # Per-CA quota rules apply. If left empty, a + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # will be chosen from the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} + # by the service. For example, to issue a + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} from a + # Certificate Authority with resource name + # "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", + # you can set the + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#parent parent} + # to "projects/my-project/locations/us-central1/caPools/my-pool" and the + # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#issuing_certificate_authority_id issuing_certificate_authority_id} + # to "my-ca". + class CreateCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate CertificateAuthorityService.GetCertificate}. + # @!attribute [rw] name + # @return [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1::Certificate#name name} + # of the {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} to + # get. + class GetCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificates CertificateAuthorityService.ListCertificates}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the parent associated with the + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}, in the + # format `projects/*/locations/*/caPools/*`. The parent resource name can be + # in one of two forms: + # + # 1. **Specific CA Pool:** To list certificates within a single CA Pool: + # `projects/*/locations/*/caPools/*` + # + # 2. **All CA Pools in a Location:** To list certificates across *all* CA + # Pools in a given project and location, use the wildcard character (`-`) + # in place of the CA Pool ID. + # Example: `projects/*/locations/*/caPools/-` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} to include + # in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} can + # subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. + # @!attribute [rw] filter + # @return [::String] + # Optional. Only include resources that match the filter in the response. For + # details on supported filters and syntax, see [Certificates Filtering + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specify how the results should be sorted. For details on + # supported fields and syntax, see [Certificates Sorting + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + class ListCertificatesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificates CertificateAuthorityService.ListCertificates}. + # @!attribute [rw] certificates + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::Certificate>] + # The list of {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. Pass this value in + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest#page_token ListCertificatesRequest.page_token} + # to retrieve the next page of results. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations (e.g. "us-west1") that could not be reached. + class ListCertificatesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#revoke_certificate CertificateAuthorityService.RevokeCertificate}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the format + # `projects/*/locations/*/caPools/*/certificates/*`. + # @!attribute [rw] reason + # @return [::Google::Cloud::Security::PrivateCA::V1::RevocationReason] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::RevocationReason RevocationReason} for + # revoking this certificate. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class RevokeCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate CertificateAuthorityService.UpdateCertificate}. + # @!attribute [rw] certificate + # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] + # Required. {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} + # with updated values. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A list of fields to be updated in this request. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#activate_certificate_authority CertificateAuthorityService.ActivateCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @!attribute [rw] pem_ca_certificate + # @return [::String] + # Required. The signed CA certificate issued from + # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. + # @!attribute [rw] subordinate_config + # @return [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig] + # Required. Must include information about the issuer of + # 'pem_ca_certificate', and any further issuers until the self-signed CA. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class ActivateCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_authority CertificateAuthorityService.CreateCertificateAuthority}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, + # in the format `projects/*/locations/*/caPools/*`. + # @!attribute [rw] certificate_authority_id + # @return [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @!attribute [rw] certificate_authority + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] + # Required. A + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # with initial field values. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#disable_certificate_authority CertificateAuthorityService.DisableCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] ignore_dependent_resources + # @return [::Boolean] + # Optional. This field allows this CA to be disabled even if it's being + # depended on by another resource. However, doing so may result in unintended + # and unrecoverable effects on any dependent resources since the CA will + # no longer be able to issue certificates. + class DisableCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#enable_certificate_authority CertificateAuthorityService.EnableCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class EnableCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr CertificateAuthorityService.FetchCertificateAuthorityCsr}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + class FetchCertificateAuthorityCsrRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr CertificateAuthorityService.FetchCertificateAuthorityCsr}. + # @!attribute [r] pem_csr + # @return [::String] + # Output only. The PEM-encoded signed certificate signing request (CSR). + class FetchCertificateAuthorityCsrResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_authority CertificateAuthorityService.GetCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # to get. + class GetCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_authorities CertificateAuthorityService.ListCertificateAuthorities}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, + # in the format `projects/*/locations/*/caPools/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} + # to include in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. + # @!attribute [rw] filter + # @return [::String] + # Optional. Only include resources that match the filter in the response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specify how the results should be sorted. + class ListCertificateAuthoritiesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_authorities CertificateAuthorityService.ListCertificateAuthorities}. + # @!attribute [rw] certificate_authorities + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority>] + # The list of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. Pass this value in + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest#page_token ListCertificateAuthoritiesRequest.page_token} + # to retrieve the next page of results. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations (e.g. "us-west1") that could not be reached. + class ListCertificateAuthoritiesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#undelete_certificate_authority CertificateAuthorityService.UndeleteCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UndeleteCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_authority CertificateAuthorityService.DeleteCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] ignore_active_certificates + # @return [::Boolean] + # Optional. This field allows the CA to be deleted even if the CA has + # active certs. Active certs include both unrevoked and unexpired certs. + # @!attribute [rw] skip_grace_period + # @return [::Boolean] + # Optional. If this flag is set, the Certificate Authority will be deleted as + # soon as possible without a 30-day grace period where undeletion would have + # been allowed. If you proceed, there will be no way to recover this CA. + # @!attribute [rw] ignore_dependent_resources + # @return [::Boolean] + # Optional. This field allows this CA to be deleted even if it's being + # depended on by another resource. However, doing so may result in unintended + # and unrecoverable effects on any dependent resources since the CA will + # no longer be able to issue certificates. + class DeleteCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_authority CertificateAuthorityService.UpdateCertificateAuthority}. + # @!attribute [rw] certificate_authority + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] + # Required. + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} + # with updated values. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A list of fields to be updated in this request. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_ca_pool CertificateAuthorityService.CreateCaPool}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}, in the format + # `projects/*/locations/*`. + # @!attribute [rw] ca_pool_id + # @return [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @!attribute [rw] ca_pool + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool] + # Required. A {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with + # initial field values. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateCaPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_ca_pool CertificateAuthorityService.UpdateCaPool}. + # @!attribute [rw] ca_pool + # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool] + # Required. {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with updated + # values. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A list of fields to be updated in this request. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateCaPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_ca_pool CertificateAuthorityService.DeleteCaPool}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format + # `projects/*/locations/*/caPools/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] ignore_dependent_resources + # @return [::Boolean] + # Optional. This field allows this pool to be deleted even if it's being + # depended on by another resource. However, doing so may result in unintended + # and unrecoverable effects on any dependent resources since the pool will + # no longer be able to issue certificates. + class DeleteCaPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_ca_certs CertificateAuthorityService.FetchCaCerts}. + # @!attribute [rw] ca_pool + # @return [::String] + # Required. The resource name for the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format + # `projects/*/locations/*/caPools/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class FetchCaCertsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_ca_certs CertificateAuthorityService.FetchCaCerts}. + # @!attribute [rw] ca_certs + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse::CertChain>] + # The PEM encoded CA certificate chains of all certificate authorities in + # this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the ENABLED, + # DISABLED, or STAGED states. + class FetchCaCertsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] certificates + # @return [::Array<::String>] + # The certificates that form the CA chain, from leaf to root order. + class CertChain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_ca_pool CertificateAuthorityService.GetCaPool}. + # @!attribute [rw] name + # @return [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1::CaPool#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} to get. + class GetCaPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_ca_pools CertificateAuthorityService.ListCaPools}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}, in the format + # `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} to include in the + # response. Further {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} can + # subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token}. + # @!attribute [rw] filter + # @return [::String] + # Optional. Only include resources that match the filter in the response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specify how the results should be sorted. + class ListCaPoolsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_ca_pools CertificateAuthorityService.ListCaPools}. + # @!attribute [rw] ca_pools + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CaPool>] + # The list of {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. Pass this value in + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest#page_token ListCertificateAuthoritiesRequest.page_token} + # to retrieve the next page of results. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations (e.g. "us-west1") that could not be reached. + class ListCaPoolsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_revocation_list CertificateAuthorityService.GetCertificateRevocationList}. + # @!attribute [rw] name + # @return [::String] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList#name name} + # of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # to get. + class GetCertificateRevocationListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_revocation_lists CertificateAuthorityService.ListCertificateRevocationLists}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}, + # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} + # to include in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. + # @!attribute [rw] filter + # @return [::String] + # Optional. Only include resources that match the filter in the response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specify how the results should be sorted. + class ListCertificateRevocationListsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_revocation_lists CertificateAuthorityService.ListCertificateRevocationLists}. + # @!attribute [rw] certificate_revocation_lists + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList>] + # The list of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. Pass this value in + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest#page_token ListCertificateRevocationListsRequest.page_token} + # to retrieve the next page of results. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations (e.g. "us-west1") that could not be reached. + class ListCertificateRevocationListsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_revocation_list CertificateAuthorityService.UpdateCertificateRevocationList}. + # @!attribute [rw] certificate_revocation_list + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] + # Required. + # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} + # with updated values. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A list of fields to be updated in this request. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateCertificateRevocationListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_template CertificateAuthorityService.CreateCertificateTemplate}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}, + # in the format `projects/*/locations/*`. + # @!attribute [rw] certificate_template_id + # @return [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @!attribute [rw] certificate_template + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] + # Required. A + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # with initial field values. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateCertificateTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_template CertificateAuthorityService.DeleteCertificateTemplate}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # in the format `projects/*/locations/*/certificateTemplates/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteCertificateTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_template CertificateAuthorityService.GetCertificateTemplate}. + # @!attribute [rw] name + # @return [::String] + # Required. The + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # to get. + class GetCertificateTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_templates CertificateAuthorityService.ListCertificateTemplates}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}, + # in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} + # to include in the response. Further + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token} + # in a subsequent request. If unspecified, the server will pick an + # appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token}. + # @!attribute [rw] filter + # @return [::String] + # Optional. Only include resources that match the filter in the response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specify how the results should be sorted. + class ListCertificateTemplatesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_templates CertificateAuthorityService.ListCertificateTemplates}. + # @!attribute [rw] certificate_templates + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate>] + # The list of + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. Pass this value in + # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest#page_token ListCertificateTemplatesRequest.page_token} + # to retrieve the next page of results. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations (e.g. "us-west1") that could not be reached. + class ListCertificateTemplatesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_template CertificateAuthorityService.UpdateCertificateTemplate}. + # @!attribute [rw] certificate_template + # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] + # Required. + # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} + # with updated values. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A list of fields to be updated in this request. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that + # if you must retry your request, the server will know to ignore the request + # if it has already been completed. The server will guarantee that for at + # least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateCertificateTemplateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/Gemfile new file mode 100644 index 000000000000..15d0144fd102 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-security-private_ca-v1", path: "../" +else + gem "google-cloud-security-private_ca-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.rb new file mode 100644 index 000000000000..2ca2884e3cdb --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the activate_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#activate_certificate_authority. +# +def activate_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new + + # Call the activate_certificate_authority method. + result = client.activate_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.rb new file mode 100644 index 000000000000..2086f329dd24 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCaPool_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the create_ca_pool call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_ca_pool. +# +def create_ca_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new + + # Call the create_ca_pool method. + result = client.create_ca_pool request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_CreateCaPool_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.rb new file mode 100644 index 000000000000..02ba1cd69a00 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificate_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the create_certificate call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate. +# +def create_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new + + # Call the create_certificate method. + result = client.create_certificate request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + p result +end +# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.rb new file mode 100644 index 000000000000..837bf4f5e52b --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the create_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_authority. +# +def create_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new + + # Call the create_certificate_authority method. + result = client.create_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.rb new file mode 100644 index 000000000000..04864381efcf --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the create_certificate_template call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_template. +# +def create_certificate_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new + + # Call the create_certificate_template method. + result = client.create_certificate_template request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.rb new file mode 100644 index 000000000000..d83ae4819dc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the delete_ca_pool call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_ca_pool. +# +def delete_ca_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new + + # Call the delete_ca_pool method. + result = client.delete_ca_pool request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.rb new file mode 100644 index 000000000000..25db9c72707e --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the delete_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_authority. +# +def delete_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new + + # Call the delete_certificate_authority method. + result = client.delete_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.rb new file mode 100644 index 000000000000..ffd2b9603f86 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the delete_certificate_template call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_template. +# +def delete_certificate_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new + + # Call the delete_certificate_template method. + result = client.delete_certificate_template request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.rb new file mode 100644 index 000000000000..cf6fffe863ae --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the disable_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#disable_certificate_authority. +# +def disable_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new + + # Call the disable_certificate_authority method. + result = client.disable_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.rb new file mode 100644 index 000000000000..66ab672c075a --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the enable_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#enable_certificate_authority. +# +def enable_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new + + # Call the enable_certificate_authority method. + result = client.enable_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.rb new file mode 100644 index 000000000000..939e386615d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the fetch_ca_certs call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_ca_certs. +# +def fetch_ca_certs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new + + # Call the fetch_ca_certs method. + result = client.fetch_ca_certs request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse. + p result +end +# [END privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb new file mode 100644 index 000000000000..f51e0bff99ab --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the fetch_certificate_authority_csr call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr. +# +def fetch_certificate_authority_csr + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new + + # Call the fetch_certificate_authority_csr method. + result = client.fetch_certificate_authority_csr request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse. + p result +end +# [END privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.rb new file mode 100644 index 000000000000..c82b3ce69063 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_GetCaPool_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the get_ca_pool call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_ca_pool. +# +def get_ca_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new + + # Call the get_ca_pool method. + result = client.get_ca_pool request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CaPool. + p result +end +# [END privateca_v1_generated_CertificateAuthorityService_GetCaPool_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.rb new file mode 100644 index 000000000000..ce87f3b91296 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificate_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the get_certificate call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate. +# +def get_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new + + # Call the get_certificate method. + result = client.get_certificate request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + p result +end +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.rb new file mode 100644 index 000000000000..0fb13b1d62ac --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the get_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_authority. +# +def get_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new + + # Call the get_certificate_authority method. + result = client.get_certificate_authority request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. + p result +end +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.rb new file mode 100644 index 000000000000..e840b4be9acc --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the get_certificate_revocation_list call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_revocation_list. +# +def get_certificate_revocation_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new + + # Call the get_certificate_revocation_list method. + result = client.get_certificate_revocation_list request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. + p result +end +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.rb new file mode 100644 index 000000000000..d084f7fa5d49 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the get_certificate_template call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_template. +# +def get_certificate_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new + + # Call the get_certificate_template method. + result = client.get_certificate_template request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. + p result +end +# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.rb new file mode 100644 index 000000000000..0de634246136 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_ListCaPools_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the list_ca_pools call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_ca_pools. +# +def list_ca_pools + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new + + # Call the list_ca_pools method. + result = client.list_ca_pools request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CaPool. + p item + end +end +# [END privateca_v1_generated_CertificateAuthorityService_ListCaPools_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.rb new file mode 100644 index 000000000000..c2e06a669891 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the list_certificate_authorities call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_authorities. +# +def list_certificate_authorities + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new + + # Call the list_certificate_authorities method. + result = client.list_certificate_authorities request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. + p item + end +end +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb new file mode 100644 index 000000000000..32d72bf58c5c --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the list_certificate_revocation_lists call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_revocation_lists. +# +def list_certificate_revocation_lists + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new + + # Call the list_certificate_revocation_lists method. + result = client.list_certificate_revocation_lists request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. + p item + end +end +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.rb new file mode 100644 index 000000000000..269ed16695f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the list_certificate_templates call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_templates. +# +def list_certificate_templates + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new + + # Call the list_certificate_templates method. + result = client.list_certificate_templates request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. + p item + end +end +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.rb new file mode 100644 index 000000000000..dfdcae76c14f --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_ListCertificates_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the list_certificates call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificates. +# +def list_certificates + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new + + # Call the list_certificates method. + result = client.list_certificates request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::Certificate. + p item + end +end +# [END privateca_v1_generated_CertificateAuthorityService_ListCertificates_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.rb new file mode 100644 index 000000000000..85e6363d58ac --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the revoke_certificate call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#revoke_certificate. +# +def revoke_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new + + # Call the revoke_certificate method. + result = client.revoke_certificate request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + p result +end +# [END privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.rb new file mode 100644 index 000000000000..0aaba870e26d --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the undelete_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#undelete_certificate_authority. +# +def undelete_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new + + # Call the undelete_certificate_authority method. + result = client.undelete_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.rb new file mode 100644 index 000000000000..ff687e1efbc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the update_ca_pool call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_ca_pool. +# +def update_ca_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new + + # Call the update_ca_pool method. + result = client.update_ca_pool request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.rb new file mode 100644 index 000000000000..82e041db102b --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the update_certificate call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate. +# +def update_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new + + # Call the update_certificate method. + result = client.update_certificate request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. + p result +end +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.rb new file mode 100644 index 000000000000..4f4aacbc82f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the update_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_authority. +# +def update_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new + + # Call the update_certificate_authority method. + result = client.update_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.rb new file mode 100644 index 000000000000..3f573ab17f29 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the update_certificate_revocation_list call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_revocation_list. +# +def update_certificate_revocation_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new + + # Call the update_certificate_revocation_list method. + result = client.update_certificate_revocation_list request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.rb new file mode 100644 index 000000000000..037307454cb4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_sync] +require "google/cloud/security/private_ca/v1" + +## +# Snippet for the update_certificate_template call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_template. +# +def update_certificate_template + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new + + # Call the update_certificate_template method. + result = client.update_certificate_template request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json new file mode 100644 index 000000000000..9534d7bc3fea --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json @@ -0,0 +1,1175 @@ +{ + "client_library": { + "name": "google-cloud-security-private_ca-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.security.privateca.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificate_sync", + "title": "Snippet for the create_certificate call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate.", + "file": "certificate_authority_service/create_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_certificate", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::Certificate", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "CreateCertificate", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_GetCertificate_sync", + "title": "Snippet for the get_certificate call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate.", + "file": "certificate_authority_service/get_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::Certificate", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "GetCertificate", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_ListCertificates_sync", + "title": "Snippet for the list_certificates call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificates.", + "file": "certificate_authority_service/list_certificates.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_certificates", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificates", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ListCertificates", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_sync", + "title": "Snippet for the revoke_certificate call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#revoke_certificate.", + "file": "certificate_authority_service/revoke_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "revoke_certificate", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#revoke_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::Certificate", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "RevokeCertificate", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_sync", + "title": "Snippet for the update_certificate call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate.", + "file": "certificate_authority_service/update_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_certificate", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::Certificate", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "UpdateCertificate", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync", + "title": "Snippet for the activate_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#activate_certificate_authority.", + "file": "certificate_authority_service/activate_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "activate_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#activate_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ActivateCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync", + "title": "Snippet for the create_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_authority.", + "file": "certificate_authority_service/create_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "CreateCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync", + "title": "Snippet for the disable_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#disable_certificate_authority.", + "file": "certificate_authority_service/disable_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#disable_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "DisableCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync", + "title": "Snippet for the enable_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#enable_certificate_authority.", + "file": "certificate_authority_service/enable_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#enable_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "EnableCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync", + "title": "Snippet for the fetch_certificate_authority_csr call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr.", + "file": "certificate_authority_service/fetch_certificate_authority_csr.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_certificate_authority_csr", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "FetchCertificateAuthorityCsr", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_sync", + "title": "Snippet for the get_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_authority.", + "file": "certificate_authority_service/get_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "GetCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync", + "title": "Snippet for the list_certificate_authorities call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_authorities.", + "file": "certificate_authority_service/list_certificate_authorities.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_certificate_authorities", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_authorities", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ListCertificateAuthorities", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_sync", + "title": "Snippet for the undelete_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#undelete_certificate_authority.", + "file": "certificate_authority_service/undelete_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "undelete_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#undelete_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "UndeleteCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_sync", + "title": "Snippet for the delete_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_authority.", + "file": "certificate_authority_service/delete_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "DeleteCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync", + "title": "Snippet for the update_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_authority.", + "file": "certificate_authority_service/update_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "UpdateCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_CreateCaPool_sync", + "title": "Snippet for the create_ca_pool call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_ca_pool.", + "file": "certificate_authority_service/create_ca_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_ca_pool", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_ca_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "CreateCaPool", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_sync", + "title": "Snippet for the update_ca_pool call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_ca_pool.", + "file": "certificate_authority_service/update_ca_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_ca_pool", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_ca_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "UpdateCaPool", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_GetCaPool_sync", + "title": "Snippet for the get_ca_pool call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_ca_pool.", + "file": "certificate_authority_service/get_ca_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_ca_pool", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_ca_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::CaPool", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "GetCaPool", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_ListCaPools_sync", + "title": "Snippet for the list_ca_pools call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_ca_pools.", + "file": "certificate_authority_service/list_ca_pools.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_ca_pools", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_ca_pools", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ListCaPools", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_sync", + "title": "Snippet for the delete_ca_pool call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_ca_pool.", + "file": "certificate_authority_service/delete_ca_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_ca_pool", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_ca_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "DeleteCaPool", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_sync", + "title": "Snippet for the fetch_ca_certs call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_ca_certs.", + "file": "certificate_authority_service/fetch_ca_certs.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_ca_certs", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_ca_certs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "FetchCaCerts", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync", + "title": "Snippet for the get_certificate_revocation_list call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_revocation_list.", + "file": "certificate_authority_service/get_certificate_revocation_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate_revocation_list", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_revocation_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "GetCertificateRevocationList", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync", + "title": "Snippet for the list_certificate_revocation_lists call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_revocation_lists.", + "file": "certificate_authority_service/list_certificate_revocation_lists.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_certificate_revocation_lists", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_revocation_lists", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ListCertificateRevocationLists", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync", + "title": "Snippet for the update_certificate_revocation_list call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_revocation_list.", + "file": "certificate_authority_service/update_certificate_revocation_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_certificate_revocation_list", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_revocation_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "UpdateCertificateRevocationList", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_sync", + "title": "Snippet for the create_certificate_template call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_template.", + "file": "certificate_authority_service/create_certificate_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_certificate_template", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "CreateCertificateTemplate", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_sync", + "title": "Snippet for the delete_certificate_template call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_template.", + "file": "certificate_authority_service/delete_certificate_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_certificate_template", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "DeleteCertificateTemplate", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_sync", + "title": "Snippet for the get_certificate_template call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_template.", + "file": "certificate_authority_service/get_certificate_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate_template", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "GetCertificateTemplate", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_sync", + "title": "Snippet for the list_certificate_templates call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_templates.", + "file": "certificate_authority_service/list_certificate_templates.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_certificate_templates", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_templates", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ListCertificateTemplates", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_sync", + "title": "Snippet for the update_certificate_template call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_template.", + "file": "certificate_authority_service/update_certificate_template.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_certificate_template", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_template", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "UpdateCertificateTemplate", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_test.rb new file mode 100644 index 000000000000..6e457af60f99 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/security/privateca/v1/service_pb" +require "google/cloud/security/privateca/v1/service_services_pb" +require "google/cloud/security/private_ca/v1/certificate_authority_service" + +class ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_test.rb new file mode 100644 index 000000000000..b5b52911b307 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_test.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/security/private_ca/v1/certificate_authority_service" + +class ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_ca_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.ca_pool_path project: "value0", location: "value1", ca_pool: "value2" + assert_equal "projects/value0/locations/value1/caPools/value2", path + end + end + + def test_certificate_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_path project: "value0", location: "value1", ca_pool: "value2", certificate: "value3" + assert_equal "projects/value0/locations/value1/caPools/value2/certificates/value3", path + end + end + + def test_certificate_authority_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_authority_path project: "value0", location: "value1", ca_pool: "value2", certificate_authority: "value3" + assert_equal "projects/value0/locations/value1/caPools/value2/certificateAuthorities/value3", path + end + end + + def test_certificate_revocation_list_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_revocation_list_path project: "value0", location: "value1", ca_pool: "value2", certificate_authority: "value3", certificate_revocation_list: "value4" + assert_equal "projects/value0/locations/value1/caPools/value2/certificateAuthorities/value3/certificateRevocationLists/value4", path + end + end + + def test_certificate_template_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_template_path project: "value0", location: "value1", certificate_template: "value2" + assert_equal "projects/value0/locations/value1/certificateTemplates/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_test.rb new file mode 100644 index 000000000000..7f1dd7fc1670 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_test.rb @@ -0,0 +1,1726 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/security/privateca/v1/service_pb" +require "google/cloud/security/private_ca/v1/certificate_authority_service/rest" + + +class ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_certificate + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate_id = "hello world" + certificate = {} + request_id = "hello world" + validate_only = true + issuing_certificate_authority_id = "hello world" + + create_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_certificate parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_certificate ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_certificate(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_certificate_client_stub.call_count + end + end + end + + def test_get_certificate + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_certificate({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_certificate name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_certificate ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_certificate({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_certificate(::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_client_stub.call_count + end + end + end + + def test_list_certificates + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificates_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_certificates_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_certificates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_certificates ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_certificates(::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_certificates_client_stub.call_count + end + end + end + + def test_revoke_certificate + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + reason = :REVOCATION_REASON_UNSPECIFIED + request_id = "hello world" + + revoke_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_revoke_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, revoke_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.revoke_certificate({ name: name, reason: reason, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.revoke_certificate name: name, reason: reason, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.revoke_certificate ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.revoke_certificate({ name: name, reason: reason, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.revoke_certificate(::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, revoke_certificate_client_stub.call_count + end + end + end + + def test_update_certificate + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + certificate = {} + update_mask = {} + request_id = "hello world" + + update_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_certificate certificate: certificate, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_certificate ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_certificate(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_certificate_client_stub.call_count + end + end + end + + def test_activate_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + pem_ca_certificate = "hello world" + subordinate_config = {} + request_id = "hello world" + + activate_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_activate_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, activate_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.activate_certificate_authority name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.activate_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.activate_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, activate_certificate_authority_client_stub.call_count + end + end + end + + def test_create_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate_authority_id = "hello world" + certificate_authority = {} + request_id = "hello world" + + create_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_certificate_authority parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_certificate_authority_client_stub.call_count + end + end + end + + def test_disable_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + ignore_dependent_resources = true + + disable_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_disable_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.disable_certificate_authority({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.disable_certificate_authority name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.disable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.disable_certificate_authority({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.disable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_certificate_authority_client_stub.call_count + end + end + end + + def test_enable_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + enable_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_enable_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.enable_certificate_authority({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.enable_certificate_authority name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.enable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.enable_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.enable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_certificate_authority_client_stub.call_count + end + end + end + + def test_fetch_certificate_authority_csr + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + fetch_certificate_authority_csr_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_fetch_certificate_authority_csr_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_certificate_authority_csr_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.fetch_certificate_authority_csr({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.fetch_certificate_authority_csr name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.fetch_certificate_authority_csr ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.fetch_certificate_authority_csr({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.fetch_certificate_authority_csr(::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_certificate_authority_csr_client_stub.call_count + end + end + end + + def test_get_certificate_authority + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_certificate_authority({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_certificate_authority name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_certificate_authority({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_authority_client_stub.call_count + end + end + end + + def test_list_certificate_authorities + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificate_authorities_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificate_authorities_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_certificate_authorities_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_certificate_authorities parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_certificate_authorities ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_certificate_authorities(::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_certificate_authorities_client_stub.call_count + end + end + end + + def test_undelete_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + undelete_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_undelete_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undelete_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.undelete_certificate_authority({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.undelete_certificate_authority name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.undelete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.undelete_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.undelete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undelete_certificate_authority_client_stub.call_count + end + end + end + + def test_delete_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + ignore_active_certificates = true + skip_grace_period = true + ignore_dependent_resources = true + + delete_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_delete_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_certificate_authority({ name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_certificate_authority name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_certificate_authority({ name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_certificate_authority_client_stub.call_count + end + end + end + + def test_update_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + certificate_authority = {} + update_mask = {} + request_id = "hello world" + + update_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_certificate_authority certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_certificate_authority_client_stub.call_count + end + end + end + + def test_create_ca_pool + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + ca_pool_id = "hello world" + ca_pool = {} + request_id = "hello world" + + create_ca_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_ca_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_ca_pool_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_ca_pool({ parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_ca_pool parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_ca_pool ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new(parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_ca_pool({ parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_ca_pool(::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new(parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_ca_pool_client_stub.call_count + end + end + end + + def test_update_ca_pool + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + ca_pool = {} + update_mask = {} + request_id = "hello world" + + update_ca_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_ca_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_ca_pool_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_ca_pool({ ca_pool: ca_pool, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_ca_pool ca_pool: ca_pool, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_ca_pool ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new(ca_pool: ca_pool, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_ca_pool({ ca_pool: ca_pool, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_ca_pool(::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new(ca_pool: ca_pool, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_ca_pool_client_stub.call_count + end + end + end + + def test_get_ca_pool + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::CaPool.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_ca_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_ca_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_ca_pool_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_ca_pool({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_ca_pool name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_ca_pool ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_ca_pool({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_ca_pool(::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_ca_pool_client_stub.call_count + end + end + end + + def test_list_ca_pools + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_ca_pools_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_ca_pools_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_ca_pools_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_ca_pools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_ca_pools parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_ca_pools ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_ca_pools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_ca_pools(::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_ca_pools_client_stub.call_count + end + end + end + + def test_delete_ca_pool + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + ignore_dependent_resources = true + + delete_ca_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_delete_ca_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_ca_pool_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_ca_pool({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_ca_pool name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_ca_pool ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_ca_pool({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_ca_pool(::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_ca_pool_client_stub.call_count + end + end + end + + def test_fetch_ca_certs + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + ca_pool = "hello world" + request_id = "hello world" + + fetch_ca_certs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_fetch_ca_certs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_ca_certs_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.fetch_ca_certs({ ca_pool: ca_pool, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.fetch_ca_certs ca_pool: ca_pool, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.fetch_ca_certs ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new(ca_pool: ca_pool, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.fetch_ca_certs({ ca_pool: ca_pool, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.fetch_ca_certs(::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new(ca_pool: ca_pool, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_ca_certs_client_stub.call_count + end + end + end + + def test_get_certificate_revocation_list + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_revocation_list_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_revocation_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_revocation_list_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_certificate_revocation_list({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_certificate_revocation_list name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_certificate_revocation_list({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_revocation_list_client_stub.call_count + end + end + end + + def test_list_certificate_revocation_lists + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificate_revocation_lists_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificate_revocation_lists_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_certificate_revocation_lists_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_certificate_revocation_lists parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_certificate_revocation_lists ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_certificate_revocation_lists(::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_certificate_revocation_lists_client_stub.call_count + end + end + end + + def test_update_certificate_revocation_list + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + certificate_revocation_list = {} + update_mask = {} + request_id = "hello world" + + update_certificate_revocation_list_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_revocation_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_certificate_revocation_list_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_certificate_revocation_list certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_certificate_revocation_list_client_stub.call_count + end + end + end + + def test_create_certificate_template + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate_template_id = "hello world" + certificate_template = {} + request_id = "hello world" + + create_certificate_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_certificate_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_certificate_template_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_certificate_template({ parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_certificate_template parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_certificate_template ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new(parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_certificate_template({ parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_certificate_template(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new(parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_certificate_template_client_stub.call_count + end + end + end + + def test_delete_certificate_template + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_certificate_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_delete_certificate_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_certificate_template_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_certificate_template({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_certificate_template name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_certificate_template ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_certificate_template({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_certificate_template(::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_certificate_template_client_stub.call_count + end + end + end + + def test_get_certificate_template + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_template_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_certificate_template({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_certificate_template name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_certificate_template ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_certificate_template({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_certificate_template(::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_template_client_stub.call_count + end + end + end + + def test_list_certificate_templates + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificate_templates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificate_templates_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_certificate_templates_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_certificate_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_certificate_templates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_certificate_templates ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_certificate_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_certificate_templates(::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_certificate_templates_client_stub.call_count + end + end + end + + def test_update_certificate_template + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + certificate_template = {} + update_mask = {} + request_id = "hello world" + + update_certificate_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_template_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_certificate_template_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_certificate_template({ certificate_template: certificate_template, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_certificate_template certificate_template: certificate_template, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_certificate_template ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new(certificate_template: certificate_template, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_certificate_template({ certificate_template: certificate_template, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_certificate_template(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new(certificate_template: certificate_template, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_certificate_template_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_test.rb new file mode 100644 index 000000000000..30f45ca1fa7c --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_test.rb @@ -0,0 +1,2017 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/security/privateca/v1/service_pb" +require "google/cloud/security/private_ca/v1/certificate_authority_service" + +class ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate_id = "hello world" + certificate = {} + request_id = "hello world" + validate_only = true + issuing_certificate_authority_id = "hello world" + + create_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_certificate, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["certificate_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::Certificate), request["certificate"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["issuing_certificate_authority_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_certificate parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_certificate ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_certificate(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_certificate_client_stub.call_rpc_count + end + end + + def test_get_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_certificate, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_certificate({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_certificate name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_certificate ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_certificate({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_certificate(::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_certificate_client_stub.call_rpc_count + end + end + + def test_list_certificates + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_certificates, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_certificates_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_certificates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_certificates ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_certificates(::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_certificates_client_stub.call_rpc_count + end + end + + def test_revoke_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + reason = :REVOCATION_REASON_UNSPECIFIED + request_id = "hello world" + + revoke_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :revoke_certificate, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest, request + assert_equal "hello world", request["name"] + assert_equal :REVOCATION_REASON_UNSPECIFIED, request["reason"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, revoke_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.revoke_certificate({ name: name, reason: reason, request_id: request_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.revoke_certificate name: name, reason: reason, request_id: request_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.revoke_certificate ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.revoke_certificate({ name: name, reason: reason, request_id: request_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.revoke_certificate(::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, revoke_certificate_client_stub.call_rpc_count + end + end + + def test_update_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + certificate = {} + update_mask = {} + request_id = "hello world" + + update_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_certificate, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::Certificate), request["certificate"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_certificate certificate: certificate, update_mask: update_mask, request_id: request_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_certificate ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_certificate(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_certificate_client_stub.call_rpc_count + end + end + + def test_activate_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + pem_ca_certificate = "hello world" + subordinate_config = {} + request_id = "hello world" + + activate_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :activate_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["pem_ca_certificate"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig), request["subordinate_config"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, activate_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.activate_certificate_authority name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.activate_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.activate_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, activate_certificate_authority_client_stub.call_rpc_count + end + end + + def test_create_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate_authority_id = "hello world" + certificate_authority = {} + request_id = "hello world" + + create_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["certificate_authority_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority), request["certificate_authority"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_certificate_authority parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_certificate_authority_client_stub.call_rpc_count + end + end + + def test_disable_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + ignore_dependent_resources = true + + disable_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["ignore_dependent_resources"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.disable_certificate_authority({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.disable_certificate_authority name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.disable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.disable_certificate_authority({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.disable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, disable_certificate_authority_client_stub.call_rpc_count + end + end + + def test_enable_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + enable_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.enable_certificate_authority({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.enable_certificate_authority name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.enable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.enable_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.enable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enable_certificate_authority_client_stub.call_rpc_count + end + end + + def test_fetch_certificate_authority_csr + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + fetch_certificate_authority_csr_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_certificate_authority_csr, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_certificate_authority_csr_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_certificate_authority_csr({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.fetch_certificate_authority_csr name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.fetch_certificate_authority_csr ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.fetch_certificate_authority_csr({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.fetch_certificate_authority_csr(::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_certificate_authority_csr_client_stub.call_rpc_count + end + end + + def test_get_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_certificate_authority({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_certificate_authority name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_certificate_authority({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_certificate_authority_client_stub.call_rpc_count + end + end + + def test_list_certificate_authorities + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificate_authorities_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_certificate_authorities, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_certificate_authorities_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_certificate_authorities parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_certificate_authorities ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_certificate_authorities(::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_certificate_authorities_client_stub.call_rpc_count + end + end + + def test_undelete_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + undelete_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undelete_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undelete_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.undelete_certificate_authority({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.undelete_certificate_authority name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.undelete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.undelete_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.undelete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, undelete_certificate_authority_client_stub.call_rpc_count + end + end + + def test_delete_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + ignore_active_certificates = true + skip_grace_period = true + ignore_dependent_resources = true + + delete_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["ignore_active_certificates"] + assert_equal true, request["skip_grace_period"] + assert_equal true, request["ignore_dependent_resources"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_certificate_authority({ name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_certificate_authority name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_certificate_authority({ name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_certificate_authority_client_stub.call_rpc_count + end + end + + def test_update_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + certificate_authority = {} + update_mask = {} + request_id = "hello world" + + update_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority), request["certificate_authority"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_certificate_authority certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_certificate_authority_client_stub.call_rpc_count + end + end + + def test_create_ca_pool + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + ca_pool_id = "hello world" + ca_pool = {} + request_id = "hello world" + + create_ca_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_ca_pool, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["ca_pool_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CaPool), request["ca_pool"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_ca_pool_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_ca_pool({ parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_ca_pool parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_ca_pool ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new(parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_ca_pool({ parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_ca_pool(::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new(parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_ca_pool_client_stub.call_rpc_count + end + end + + def test_update_ca_pool + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + ca_pool = {} + update_mask = {} + request_id = "hello world" + + update_ca_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_ca_pool, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CaPool), request["ca_pool"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_ca_pool_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_ca_pool({ ca_pool: ca_pool, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_ca_pool ca_pool: ca_pool, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_ca_pool ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new(ca_pool: ca_pool, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_ca_pool({ ca_pool: ca_pool, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_ca_pool(::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new(ca_pool: ca_pool, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_ca_pool_client_stub.call_rpc_count + end + end + + def test_get_ca_pool + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::CaPool.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_ca_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_ca_pool, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_ca_pool_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_ca_pool({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_ca_pool name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_ca_pool ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_ca_pool({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_ca_pool(::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_ca_pool_client_stub.call_rpc_count + end + end + + def test_list_ca_pools + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_ca_pools_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_ca_pools, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_ca_pools_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_ca_pools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_ca_pools parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_ca_pools ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_ca_pools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_ca_pools(::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_ca_pools_client_stub.call_rpc_count + end + end + + def test_delete_ca_pool + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + ignore_dependent_resources = true + + delete_ca_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_ca_pool, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["ignore_dependent_resources"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_ca_pool_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_ca_pool({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_ca_pool name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_ca_pool ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_ca_pool({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_ca_pool(::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_ca_pool_client_stub.call_rpc_count + end + end + + def test_fetch_ca_certs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + ca_pool = "hello world" + request_id = "hello world" + + fetch_ca_certs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_ca_certs, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest, request + assert_equal "hello world", request["ca_pool"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_ca_certs_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_ca_certs({ ca_pool: ca_pool, request_id: request_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.fetch_ca_certs ca_pool: ca_pool, request_id: request_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.fetch_ca_certs ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new(ca_pool: ca_pool, request_id: request_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.fetch_ca_certs({ ca_pool: ca_pool, request_id: request_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.fetch_ca_certs(::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new(ca_pool: ca_pool, request_id: request_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_ca_certs_client_stub.call_rpc_count + end + end + + def test_get_certificate_revocation_list + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_revocation_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_certificate_revocation_list, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_certificate_revocation_list_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_certificate_revocation_list({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_certificate_revocation_list name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_certificate_revocation_list({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_certificate_revocation_list_client_stub.call_rpc_count + end + end + + def test_list_certificate_revocation_lists + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificate_revocation_lists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_certificate_revocation_lists, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_certificate_revocation_lists_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_certificate_revocation_lists parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_certificate_revocation_lists ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_certificate_revocation_lists(::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_certificate_revocation_lists_client_stub.call_rpc_count + end + end + + def test_update_certificate_revocation_list + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + certificate_revocation_list = {} + update_mask = {} + request_id = "hello world" + + update_certificate_revocation_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_certificate_revocation_list, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList), request["certificate_revocation_list"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_certificate_revocation_list_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_certificate_revocation_list certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_certificate_revocation_list_client_stub.call_rpc_count + end + end + + def test_create_certificate_template + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate_template_id = "hello world" + certificate_template = {} + request_id = "hello world" + + create_certificate_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_certificate_template, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["certificate_template_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate), request["certificate_template"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_certificate_template_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_certificate_template({ parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_certificate_template parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_certificate_template ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new(parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_certificate_template({ parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_certificate_template(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new(parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_certificate_template_client_stub.call_rpc_count + end + end + + def test_delete_certificate_template + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_certificate_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_certificate_template, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_certificate_template_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_certificate_template({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_certificate_template name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_certificate_template ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_certificate_template({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_certificate_template(::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_certificate_template_client_stub.call_rpc_count + end + end + + def test_get_certificate_template + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_certificate_template, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_certificate_template_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_certificate_template({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_certificate_template name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_certificate_template ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_certificate_template({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_certificate_template(::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_certificate_template_client_stub.call_rpc_count + end + end + + def test_list_certificate_templates + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificate_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_certificate_templates, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_certificate_templates_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_certificate_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_certificate_templates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_certificate_templates ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_certificate_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_certificate_templates(::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_certificate_templates_client_stub.call_rpc_count + end + end + + def test_update_certificate_template + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + certificate_template = {} + update_mask = {} + request_id = "hello world" + + update_certificate_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_certificate_template, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate), request["certificate_template"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_certificate_template_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_certificate_template({ certificate_template: certificate_template, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_certificate_template certificate_template: certificate_template, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_certificate_template ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new(certificate_template: certificate_template, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_certificate_template({ certificate_template: certificate_template, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_certificate_template(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new(certificate_template: certificate_template, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_certificate_template_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/test/helper.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1/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-v1beta1/.gitignore b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.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-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..a2c53d30db17 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.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-v1beta1/latest", + "distribution_name": "google-cloud-security-private_ca-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "privateca", + "name_pretty": "Certificate Authority Service V1beta1 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). Note that google-cloud-security-private_ca-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security-private_ca instead. See the readme for more details.", + "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-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..fd09dadd27e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security-private_ca-v1beta1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-security-private_ca-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.yardopts b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.yardopts new file mode 100644 index 000000000000..0500d6ab419b --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Certificate Authority Service V1beta1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..af0fea24815e --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security-private_ca-v1beta1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-security-private_ca-v1beta1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/security/private_ca/v1beta1" + +client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new 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/v1beta1" + +::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-security-private_ca-v1beta1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/security/private_ca/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/Gemfile b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/README.md b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/README.md new file mode 100644 index 000000000000..6041d14d2b01 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Certificate Authority Service V1beta1 API + +API Client library for the Certificate Authority Service V1beta1 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). + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Certificate Authority Service V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-security-private_ca](https://rubygems.org/gems/google-cloud-security-private_ca). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-security-private_ca-v1beta1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/privateca.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/security/private_ca/v1beta1" + +client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new +request = ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new # (request fields as keyword arguments...) +response = client.create_certificate request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/certificate-authority-service/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/security/private_ca/v1beta1" +require "logger" + +client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-security-private_ca`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-security-private_ca-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-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-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-security-private_ca-v1beta1/Rakefile b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/Rakefile new file mode 100644 index 000000000000..26402e7d932d --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-security-private_ca-v1beta1 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/v1beta1/certificate_authority_service/credentials" + ::Google::Cloud::Security::PrivateCA::V1beta1::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-v1beta1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security-private_ca-v1beta1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security-private_ca-v1beta1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-security-private_ca-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security-private_ca-v1beta1" + header "google-cloud-security-private_ca-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security-private_ca-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security-private_ca-v1beta1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-security-private_ca-v1beta1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-security-private_ca-v1beta1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..7a5ef08f6ba7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/gapic_metadata.json @@ -0,0 +1,118 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.security.privateca.v1beta1", + "libraryPackage": "::Google::Cloud::Security::PrivateCA::V1beta1", + "services": { + "CertificateAuthorityService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client", + "rpcs": { + "CreateCertificate": { + "methods": [ + "create_certificate" + ] + }, + "GetCertificate": { + "methods": [ + "get_certificate" + ] + }, + "ListCertificates": { + "methods": [ + "list_certificates" + ] + }, + "RevokeCertificate": { + "methods": [ + "revoke_certificate" + ] + }, + "UpdateCertificate": { + "methods": [ + "update_certificate" + ] + }, + "ActivateCertificateAuthority": { + "methods": [ + "activate_certificate_authority" + ] + }, + "CreateCertificateAuthority": { + "methods": [ + "create_certificate_authority" + ] + }, + "DisableCertificateAuthority": { + "methods": [ + "disable_certificate_authority" + ] + }, + "EnableCertificateAuthority": { + "methods": [ + "enable_certificate_authority" + ] + }, + "FetchCertificateAuthorityCsr": { + "methods": [ + "fetch_certificate_authority_csr" + ] + }, + "GetCertificateAuthority": { + "methods": [ + "get_certificate_authority" + ] + }, + "ListCertificateAuthorities": { + "methods": [ + "list_certificate_authorities" + ] + }, + "RestoreCertificateAuthority": { + "methods": [ + "restore_certificate_authority" + ] + }, + "ScheduleDeleteCertificateAuthority": { + "methods": [ + "schedule_delete_certificate_authority" + ] + }, + "UpdateCertificateAuthority": { + "methods": [ + "update_certificate_authority" + ] + }, + "GetCertificateRevocationList": { + "methods": [ + "get_certificate_revocation_list" + ] + }, + "ListCertificateRevocationLists": { + "methods": [ + "list_certificate_revocation_lists" + ] + }, + "UpdateCertificateRevocationList": { + "methods": [ + "update_certificate_revocation_list" + ] + }, + "GetReusableConfig": { + "methods": [ + "get_reusable_config" + ] + }, + "ListReusableConfigs": { + "methods": [ + "list_reusable_configs" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/google-cloud-security-private_ca-v1beta1.gemspec b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/google-cloud-security-private_ca-v1beta1.gemspec new file mode 100644 index 000000000000..7d37d8f73423 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/google-cloud-security-private_ca-v1beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security/private_ca/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security-private_ca-v1beta1" + gem.version = Google::Cloud::Security::PrivateCA::V1beta1::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). Note that google-cloud-security-private_ca-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security-private_ca instead. See the readme for more details." + gem.summary = "API Client library for the Certificate Authority Service V1beta1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google-cloud-security-private_ca-v1beta1.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google-cloud-security-private_ca-v1beta1.rb new file mode 100644 index 000000000000..472d24065727 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google-cloud-security-private_ca-v1beta1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/security/private_ca/v1beta1" diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1.rb new file mode 100644 index 000000000000..d311a3538d33 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service" +require "google/cloud/security/private_ca/v1beta1/version" + +module Google + module Cloud + module Security + module PrivateCA + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/security/private_ca/v1beta1" + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/security/private_ca/v1beta1" + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + module V1beta1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/security/private_ca/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.rb new file mode 100644 index 000000000000..e8e34962137a --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security/private_ca/v1beta1/version" + +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/client" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest" + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + ## + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client Certificate Authority Service} manages private + # certificate authorities and issued certificates. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/security/private_ca/v1beta1/certificate_authority_service" + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest" + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + module CertificateAuthorityService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "certificate_authority_service", "helpers.rb" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.rb new file mode 100644 index 000000000000..732510db8176 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.rb @@ -0,0 +1,2616 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/security/privateca/v1beta1/service_pb" + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + module CertificateAuthorityService + ## + # Client for the CertificateAuthorityService service. + # + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client Certificate Authority Service} manages private + # certificate authorities and issued certificates. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :certificate_authority_service_stub + + ## + # Configure the CertificateAuthorityService Client class. + # + # See {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CertificateAuthorityService clients + # ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Security", "PrivateCA", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CertificateAuthorityService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @certificate_authority_service_stub.universe_domain + end + + ## + # Create a new CertificateAuthorityService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CertificateAuthorityService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/security/privateca/v1beta1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @certificate_authority_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @certificate_authority_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @certificate_authority_service_stub.logger + end + + # Service calls + + ## + # Create a new {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in a given Project, Location from a particular + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # + # @overload create_certificate(request, options = nil) + # Pass arguments to `create_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil) + # Pass arguments to `create_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location and {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} + # associated with the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}, in the format + # `projects/*/locations/*/certificateAuthorities/*`. + # @param certificate_id [::String] + # Optional. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the Enterprise {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Tier CertificateAuthority.Tier}, + # but is optional and its value is ignored otherwise. + # @param certificate [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate, ::Hash] + # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new + # + # # Call the create_certificate method. + # result = client.create_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + # p result + # + def create_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :create_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. + # + # @overload get_certificate(request, options = nil) + # Pass arguments to `get_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_certificate(name: nil) + # Pass arguments to `get_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new + # + # # Call the get_certificate method. + # result = client.get_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + # p result + # + def get_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :get_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. + # + # @overload list_certificates(request, options = nil) + # Pass arguments to `list_certificates` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}, in the format + # `projects/*/locations/*/certificateauthorities/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} to include in the + # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} can subsequently be obtained + # by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} in a subsequent + # request. If unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. For details + # on supported filters and syntax, see [Certificates Filtering + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + # @param order_by [::String] + # Optional. Specify how the results should be sorted. For details on supported fields + # and syntax, see [Certificates Sorting + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::Certificate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::Certificate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new + # + # # Call the list_certificates method. + # result = client.list_certificates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + # p item + # end + # + def list_certificates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_certificates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_certificates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_certificates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :list_certificates, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificates, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Revoke a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. + # + # @overload revoke_certificate(request, options = nil) + # Pass arguments to `revoke_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload revoke_certificate(name: nil, reason: nil, request_id: nil) + # Pass arguments to `revoke_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in the + # format `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + # @param reason [::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason RevocationReason} for revoking this certificate. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new + # + # # Call the revoke_certificate method. + # result = client.revoke_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + # p result + # + def revoke_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.revoke_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.revoke_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :revoke_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. Currently, the only field you can update is the + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate#labels labels} field. + # + # @overload update_certificate(request, options = nil) + # Pass arguments to `update_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_certificate(certificate: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate, ::Hash] + # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new + # + # # Call the update_certificate method. + # result = client.update_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + # p result + # + def update_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.certificate&.name + header_params["certificate.name"] = request.certificate.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :update_certificate, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Activate a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} that is in state + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State::PENDING_ACTIVATION PENDING_ACTIVATION} and is + # of type {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. After the + # parent Certificate Authority signs a certificate signing request from + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr FetchCertificateAuthorityCsr}, this method can complete the activation + # process. + # + # @overload activate_certificate_authority(request, options = nil) + # Pass arguments to `activate_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil) + # Pass arguments to `activate_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @param pem_ca_certificate [::String] + # Required. The signed CA certificate issued from + # {::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. + # @param subordinate_config [::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig, ::Hash] + # Required. Must include information about the issuer of 'pem_ca_certificate', and any + # further issuers until the self-signed CA. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new + # + # # Call the activate_certificate_authority method. + # result = client.activate_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def activate_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.activate_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.activate_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :activate_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a new {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in a given Project and Location. + # + # @overload create_certificate_authority(request, options = nil) + # Pass arguments to `create_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil) + # Pass arguments to `create_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format + # `projects/*/locations/*`. + # @param certificate_authority_id [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority, ::Hash] + # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new + # + # # Call the create_certificate_authority method. + # result = client.create_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :create_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # + # @overload disable_certificate_authority(request, options = nil) + # Pass arguments to `disable_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload disable_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `disable_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new + # + # # Call the disable_certificate_authority method. + # result = client.disable_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def disable_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.disable_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :disable_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # + # @overload enable_certificate_authority(request, options = nil) + # Pass arguments to `enable_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enable_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `enable_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new + # + # # Call the enable_certificate_authority method. + # result = client.enable_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def enable_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enable_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :enable_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch a certificate signing request (CSR) from a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} + # that is in state + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State::PENDING_ACTIVATION PENDING_ACTIVATION} and is + # of type {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. The CSR must + # then be signed by the desired parent Certificate Authority, which could be + # another {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} resource, or could be an on-prem + # certificate authority. See also {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#activate_certificate_authority ActivateCertificateAuthority}. + # + # @overload fetch_certificate_authority_csr(request, options = nil) + # Pass arguments to `fetch_certificate_authority_csr` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_certificate_authority_csr(name: nil) + # Pass arguments to `fetch_certificate_authority_csr` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new + # + # # Call the fetch_certificate_authority_csr method. + # result = client.fetch_certificate_authority_csr request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse. + # p result + # + def fetch_certificate_authority_csr request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_certificate_authority_csr.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :fetch_certificate_authority_csr, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # + # @overload get_certificate_authority(request, options = nil) + # Pass arguments to `get_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_certificate_authority(name: nil) + # Pass arguments to `get_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} to + # get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new + # + # # Call the get_certificate_authority method. + # result = client.get_certificate_authority request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. + # p result + # + def get_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :get_certificate_authority, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}. + # + # @overload list_certificate_authorities(request, options = nil) + # Pass arguments to `list_certificate_authorities` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_certificate_authorities(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_authorities` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format + # `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} to + # include in the response. + # Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} can subsequently be + # obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} in a subsequent + # request. If unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new + # + # # Call the list_certificate_authorities method. + # result = client.list_certificate_authorities request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. + # p item + # end + # + def list_certificate_authorities request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_certificate_authorities.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_certificate_authorities.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :list_certificate_authorities, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_authorities, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restore a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} that is scheduled for deletion. + # + # @overload restore_certificate_authority(request, options = nil) + # Pass arguments to `restore_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restore_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `restore_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new + # + # # Call the restore_certificate_authority method. + # result = client.restore_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restore_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.restore_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restore_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :restore_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Schedule a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} for deletion. + # + # @overload schedule_delete_certificate_authority(request, options = nil) + # Pass arguments to `schedule_delete_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload schedule_delete_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `schedule_delete_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new + # + # # Call the schedule_delete_certificate_authority method. + # result = client.schedule_delete_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def schedule_delete_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.schedule_delete_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.schedule_delete_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.schedule_delete_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :schedule_delete_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # + # @overload update_certificate_authority(request, options = nil) + # Pass arguments to `update_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_certificate_authority(certificate_authority: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority, ::Hash] + # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new + # + # # Call the update_certificate_authority method. + # result = client.update_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.certificate_authority&.name + header_params["certificate_authority.name"] = request.certificate_authority.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :update_certificate_authority, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}. + # + # @overload get_certificate_revocation_list(request, options = nil) + # Pass arguments to `get_certificate_revocation_list` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_certificate_revocation_list(name: nil) + # Pass arguments to `get_certificate_revocation_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new + # + # # Call the get_certificate_revocation_list method. + # result = client.get_certificate_revocation_list request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. + # p result + # + def get_certificate_revocation_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_certificate_revocation_list.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :get_certificate_revocation_list, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}. + # + # @overload list_certificate_revocation_lists(request, options = nil) + # Pass arguments to `list_certificate_revocation_lists` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_certificate_revocation_lists(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_revocation_lists` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}, in the format + # `projects/*/locations/*/certificateauthorities/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} to include in the + # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} in a subsequent + # request. If unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new + # + # # Call the list_certificate_revocation_lists method. + # result = client.list_certificate_revocation_lists request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. + # p item + # end + # + def list_certificate_revocation_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_certificate_revocation_lists.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :list_certificate_revocation_lists, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_revocation_lists, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}. + # + # @overload update_certificate_revocation_list(request, options = nil) + # Pass arguments to `update_certificate_revocation_list` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_certificate_revocation_list(certificate_revocation_list: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate_revocation_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_revocation_list [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList, ::Hash] + # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new + # + # # Call the update_certificate_revocation_list method. + # result = client.update_certificate_revocation_list request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_certificate_revocation_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_certificate_revocation_list.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.certificate_revocation_list&.name + header_params["certificate_revocation_list.name"] = request.certificate_revocation_list.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :update_certificate_revocation_list, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig}. + # + # @overload get_reusable_config(request, options = nil) + # Pass arguments to `get_reusable_config` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_reusable_config(name: nil) + # Pass arguments to `get_reusable_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new + # + # # Call the get_reusable_config method. + # result = client.get_reusable_config request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. + # p result + # + def get_reusable_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_reusable_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_reusable_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_reusable_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :get_reusable_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}. + # + # @overload list_reusable_configs(request, options = nil) + # Pass arguments to `list_reusable_configs` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_reusable_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_reusable_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}, in the format + # `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} to include in the response. + # Further {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} can subsequently be + # obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token} in a subsequent request. If + # unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new + # + # # Call the list_reusable_configs method. + # result = client.list_reusable_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. + # p item + # end + # + def list_reusable_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_reusable_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_reusable_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_reusable_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.call_rpc :list_reusable_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_reusable_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CertificateAuthorityService API. + # + # This class represents the configuration for CertificateAuthorityService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_certificate to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_certificate.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_certificate.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "privateca.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CertificateAuthorityService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate + ## + # RPC-specific configuration for `get_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate + ## + # RPC-specific configuration for `list_certificates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificates + ## + # RPC-specific configuration for `revoke_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :revoke_certificate + ## + # RPC-specific configuration for `update_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate + ## + # RPC-specific configuration for `activate_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :activate_certificate_authority + ## + # RPC-specific configuration for `create_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_authority + ## + # RPC-specific configuration for `disable_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_certificate_authority + ## + # RPC-specific configuration for `enable_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_certificate_authority + ## + # RPC-specific configuration for `fetch_certificate_authority_csr` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_certificate_authority_csr + ## + # RPC-specific configuration for `get_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_authority + ## + # RPC-specific configuration for `list_certificate_authorities` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_authorities + ## + # RPC-specific configuration for `restore_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_certificate_authority + ## + # RPC-specific configuration for `schedule_delete_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :schedule_delete_certificate_authority + ## + # RPC-specific configuration for `update_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_authority + ## + # RPC-specific configuration for `get_certificate_revocation_list` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_revocation_list + ## + # RPC-specific configuration for `list_certificate_revocation_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_revocation_lists + ## + # RPC-specific configuration for `update_certificate_revocation_list` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_revocation_list + ## + # RPC-specific configuration for `get_reusable_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reusable_config + ## + # RPC-specific configuration for `list_reusable_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reusable_configs + + # @private + def initialize parent_rpcs = nil + create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate + @create_certificate = ::Gapic::Config::Method.new create_certificate_config + get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate + @get_certificate = ::Gapic::Config::Method.new get_certificate_config + list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates + @list_certificates = ::Gapic::Config::Method.new list_certificates_config + revoke_certificate_config = parent_rpcs.revoke_certificate if parent_rpcs.respond_to? :revoke_certificate + @revoke_certificate = ::Gapic::Config::Method.new revoke_certificate_config + update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate + @update_certificate = ::Gapic::Config::Method.new update_certificate_config + activate_certificate_authority_config = parent_rpcs.activate_certificate_authority if parent_rpcs.respond_to? :activate_certificate_authority + @activate_certificate_authority = ::Gapic::Config::Method.new activate_certificate_authority_config + create_certificate_authority_config = parent_rpcs.create_certificate_authority if parent_rpcs.respond_to? :create_certificate_authority + @create_certificate_authority = ::Gapic::Config::Method.new create_certificate_authority_config + disable_certificate_authority_config = parent_rpcs.disable_certificate_authority if parent_rpcs.respond_to? :disable_certificate_authority + @disable_certificate_authority = ::Gapic::Config::Method.new disable_certificate_authority_config + enable_certificate_authority_config = parent_rpcs.enable_certificate_authority if parent_rpcs.respond_to? :enable_certificate_authority + @enable_certificate_authority = ::Gapic::Config::Method.new enable_certificate_authority_config + fetch_certificate_authority_csr_config = parent_rpcs.fetch_certificate_authority_csr if parent_rpcs.respond_to? :fetch_certificate_authority_csr + @fetch_certificate_authority_csr = ::Gapic::Config::Method.new fetch_certificate_authority_csr_config + get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority + @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config + list_certificate_authorities_config = parent_rpcs.list_certificate_authorities if parent_rpcs.respond_to? :list_certificate_authorities + @list_certificate_authorities = ::Gapic::Config::Method.new list_certificate_authorities_config + restore_certificate_authority_config = parent_rpcs.restore_certificate_authority if parent_rpcs.respond_to? :restore_certificate_authority + @restore_certificate_authority = ::Gapic::Config::Method.new restore_certificate_authority_config + schedule_delete_certificate_authority_config = parent_rpcs.schedule_delete_certificate_authority if parent_rpcs.respond_to? :schedule_delete_certificate_authority + @schedule_delete_certificate_authority = ::Gapic::Config::Method.new schedule_delete_certificate_authority_config + update_certificate_authority_config = parent_rpcs.update_certificate_authority if parent_rpcs.respond_to? :update_certificate_authority + @update_certificate_authority = ::Gapic::Config::Method.new update_certificate_authority_config + get_certificate_revocation_list_config = parent_rpcs.get_certificate_revocation_list if parent_rpcs.respond_to? :get_certificate_revocation_list + @get_certificate_revocation_list = ::Gapic::Config::Method.new get_certificate_revocation_list_config + list_certificate_revocation_lists_config = parent_rpcs.list_certificate_revocation_lists if parent_rpcs.respond_to? :list_certificate_revocation_lists + @list_certificate_revocation_lists = ::Gapic::Config::Method.new list_certificate_revocation_lists_config + update_certificate_revocation_list_config = parent_rpcs.update_certificate_revocation_list if parent_rpcs.respond_to? :update_certificate_revocation_list + @update_certificate_revocation_list = ::Gapic::Config::Method.new update_certificate_revocation_list_config + get_reusable_config_config = parent_rpcs.get_reusable_config if parent_rpcs.respond_to? :get_reusable_config + @get_reusable_config = ::Gapic::Config::Method.new get_reusable_config_config + list_reusable_configs_config = parent_rpcs.list_reusable_configs if parent_rpcs.respond_to? :list_reusable_configs + @list_reusable_configs = ::Gapic::Config::Method.new list_reusable_configs_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.rb new file mode 100644 index 000000000000..4790c8bbb309 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + module CertificateAuthorityService + # Credentials for the CertificateAuthorityService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "PRIVATE_CA_CREDENTIALS", + "PRIVATE_CA_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "PRIVATE_CA_CREDENTIALS_JSON", + "PRIVATE_CA_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.rb new file mode 100644 index 000000000000..10eabef020dc --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.rb @@ -0,0 +1,845 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + module CertificateAuthorityService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CertificateAuthorityService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CertificateAuthorityService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "privateca.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb new file mode 100644 index 000000000000..ba157f7e9c6d --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb @@ -0,0 +1,132 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1beta1 + module CertificateAuthorityService + # Path helper methods for the CertificateAuthorityService API. + module Paths + ## + # Create a fully-qualified Certificate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificates/{certificate}` + # + # @param project [String] + # @param location [String] + # @param certificate_authority [String] + # @param certificate [String] + # + # @return [::String] + def certificate_path project:, location:, certificate_authority:, certificate: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "certificate_authority cannot contain /" if certificate_authority.to_s.include? "/" + + "projects/#{project}/locations/#{location}/certificateAuthorities/#{certificate_authority}/certificates/#{certificate}" + end + + ## + # Create a fully-qualified CertificateAuthority resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}` + # + # @param project [String] + # @param location [String] + # @param certificate_authority [String] + # + # @return [::String] + def certificate_authority_path project:, location:, certificate_authority: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/certificateAuthorities/#{certificate_authority}" + end + + ## + # Create a fully-qualified CertificateRevocationList resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}` + # + # @param project [String] + # @param location [String] + # @param certificate_authority [String] + # @param certificate_revocation_list [String] + # + # @return [::String] + def certificate_revocation_list_path project:, location:, certificate_authority:, certificate_revocation_list: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "certificate_authority cannot contain /" if certificate_authority.to_s.include? "/" + + "projects/#{project}/locations/#{location}/certificateAuthorities/#{certificate_authority}/certificateRevocationLists/#{certificate_revocation_list}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified ReusableConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/reusableConfigs/{reusable_config}` + # + # @param project [String] + # @param location [String] + # @param reusable_config [String] + # + # @return [::String] + def reusable_config_path project:, location:, reusable_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/reusableConfigs/#{reusable_config}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.rb new file mode 100644 index 000000000000..8e50943b6059 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security/private_ca/v1beta1/version" + +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client" + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + ## + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client Certificate Authority Service} manages private + # certificate authorities and issued certificates. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest" + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + module CertificateAuthorityService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.rb new file mode 100644 index 000000000000..8338b5e6ab6d --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.rb @@ -0,0 +1,2433 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/security/privateca/v1beta1/service_pb" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub" + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + module CertificateAuthorityService + module Rest + ## + # REST client for the CertificateAuthorityService service. + # + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client Certificate Authority Service} manages private + # certificate authorities and issued certificates. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :certificate_authority_service_stub + + ## + # Configure the CertificateAuthorityService Client class. + # + # See {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CertificateAuthorityService clients + # ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Security", "PrivateCA", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CertificateAuthorityService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @certificate_authority_service_stub.universe_domain + end + + ## + # Create a new CertificateAuthorityService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CertificateAuthorityService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @certificate_authority_service_stub = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @certificate_authority_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @certificate_authority_service_stub.logger + end + + # Service calls + + ## + # Create a new {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in a given Project, Location from a particular + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # + # @overload create_certificate(request, options = nil) + # Pass arguments to `create_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil) + # Pass arguments to `create_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location and {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} + # associated with the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}, in the format + # `projects/*/locations/*/certificateAuthorities/*`. + # @param certificate_id [::String] + # Optional. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the Enterprise {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Tier CertificateAuthority.Tier}, + # but is optional and its value is ignored otherwise. + # @param certificate [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate, ::Hash] + # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new + # + # # Call the create_certificate method. + # result = client.create_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + # p result + # + def create_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.create_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. + # + # @overload get_certificate(request, options = nil) + # Pass arguments to `get_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_certificate(name: nil) + # Pass arguments to `get_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new + # + # # Call the get_certificate method. + # result = client.get_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + # p result + # + def get_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.get_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. + # + # @overload list_certificates(request, options = nil) + # Pass arguments to `list_certificates` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}, in the format + # `projects/*/locations/*/certificateauthorities/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} to include in the + # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} can subsequently be obtained + # by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} in a subsequent + # request. If unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. For details + # on supported filters and syntax, see [Certificates Filtering + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + # @param order_by [::String] + # Optional. Specify how the results should be sorted. For details on supported fields + # and syntax, see [Certificates Sorting + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::Certificate>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::Certificate>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new + # + # # Call the list_certificates method. + # result = client.list_certificates request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + # p item + # end + # + def list_certificates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_certificates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_certificates.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_certificates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.list_certificates request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificates, "certificates", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Revoke a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. + # + # @overload revoke_certificate(request, options = nil) + # Pass arguments to `revoke_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload revoke_certificate(name: nil, reason: nil, request_id: nil) + # Pass arguments to `revoke_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in the + # format `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + # @param reason [::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason RevocationReason} for revoking this certificate. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new + # + # # Call the revoke_certificate method. + # result = client.revoke_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + # p result + # + def revoke_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.revoke_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.revoke_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.revoke_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. Currently, the only field you can update is the + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate#labels labels} field. + # + # @overload update_certificate(request, options = nil) + # Pass arguments to `update_certificate` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_certificate(certificate: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate, ::Hash] + # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new + # + # # Call the update_certificate method. + # result = client.update_certificate request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + # p result + # + def update_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_certificate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.update_certificate request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Activate a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} that is in state + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State::PENDING_ACTIVATION PENDING_ACTIVATION} and is + # of type {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. After the + # parent Certificate Authority signs a certificate signing request from + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client#fetch_certificate_authority_csr FetchCertificateAuthorityCsr}, this method can complete the activation + # process. + # + # @overload activate_certificate_authority(request, options = nil) + # Pass arguments to `activate_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil) + # Pass arguments to `activate_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @param pem_ca_certificate [::String] + # Required. The signed CA certificate issued from + # {::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. + # @param subordinate_config [::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig, ::Hash] + # Required. Must include information about the issuer of 'pem_ca_certificate', and any + # further issuers until the self-signed CA. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new + # + # # Call the activate_certificate_authority method. + # result = client.activate_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def activate_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.activate_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.activate_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.activate_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a new {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in a given Project and Location. + # + # @overload create_certificate_authority(request, options = nil) + # Pass arguments to `create_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil) + # Pass arguments to `create_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format + # `projects/*/locations/*`. + # @param certificate_authority_id [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority, ::Hash] + # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with initial field values. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new + # + # # Call the create_certificate_authority method. + # result = client.create_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.create_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # + # @overload disable_certificate_authority(request, options = nil) + # Pass arguments to `disable_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload disable_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `disable_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new + # + # # Call the disable_certificate_authority method. + # result = client.disable_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def disable_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.disable_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.disable_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # + # @overload enable_certificate_authority(request, options = nil) + # Pass arguments to `enable_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enable_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `enable_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new + # + # # Call the enable_certificate_authority method. + # result = client.enable_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def enable_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enable_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.enable_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetch a certificate signing request (CSR) from a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} + # that is in state + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State::PENDING_ACTIVATION PENDING_ACTIVATION} and is + # of type {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. The CSR must + # then be signed by the desired parent Certificate Authority, which could be + # another {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} resource, or could be an on-prem + # certificate authority. See also {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client#activate_certificate_authority ActivateCertificateAuthority}. + # + # @overload fetch_certificate_authority_csr(request, options = nil) + # Pass arguments to `fetch_certificate_authority_csr` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_certificate_authority_csr(name: nil) + # Pass arguments to `fetch_certificate_authority_csr` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new + # + # # Call the fetch_certificate_authority_csr method. + # result = client.fetch_certificate_authority_csr request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse. + # p result + # + def fetch_certificate_authority_csr request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_certificate_authority_csr.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.fetch_certificate_authority_csr request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # + # @overload get_certificate_authority(request, options = nil) + # Pass arguments to `get_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_certificate_authority(name: nil) + # Pass arguments to `get_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} to + # get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new + # + # # Call the get_certificate_authority method. + # result = client.get_certificate_authority request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. + # p result + # + def get_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.get_certificate_authority request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}. + # + # @overload list_certificate_authorities(request, options = nil) + # Pass arguments to `list_certificate_authorities` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_certificate_authorities(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_authorities` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format + # `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} to + # include in the response. + # Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} can subsequently be + # obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} in a subsequent + # request. If unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new + # + # # Call the list_certificate_authorities method. + # result = client.list_certificate_authorities request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. + # p item + # end + # + def list_certificate_authorities request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_certificate_authorities.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_certificate_authorities.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.list_certificate_authorities request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_authorities, "certificate_authorities", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Restore a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} that is scheduled for deletion. + # + # @overload restore_certificate_authority(request, options = nil) + # Pass arguments to `restore_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restore_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `restore_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new + # + # # Call the restore_certificate_authority method. + # result = client.restore_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restore_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.restore_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restore_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.restore_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Schedule a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} for deletion. + # + # @overload schedule_delete_certificate_authority(request, options = nil) + # Pass arguments to `schedule_delete_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload schedule_delete_certificate_authority(name: nil, request_id: nil) + # Pass arguments to `schedule_delete_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new + # + # # Call the schedule_delete_certificate_authority method. + # result = client.schedule_delete_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def schedule_delete_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.schedule_delete_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.schedule_delete_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.schedule_delete_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.schedule_delete_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # + # @overload update_certificate_authority(request, options = nil) + # Pass arguments to `update_certificate_authority` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_certificate_authority(certificate_authority: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate_authority` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority, ::Hash] + # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new + # + # # Call the update_certificate_authority method. + # result = client.update_certificate_authority request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_certificate_authority.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.update_certificate_authority request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}. + # + # @overload get_certificate_revocation_list(request, options = nil) + # Pass arguments to `get_certificate_revocation_list` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_certificate_revocation_list(name: nil) + # Pass arguments to `get_certificate_revocation_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new + # + # # Call the get_certificate_revocation_list method. + # result = client.get_certificate_revocation_list request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. + # p result + # + def get_certificate_revocation_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_certificate_revocation_list.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.get_certificate_revocation_list request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}. + # + # @overload list_certificate_revocation_lists(request, options = nil) + # Pass arguments to `list_certificate_revocation_lists` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_certificate_revocation_lists(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_revocation_lists` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}, in the format + # `projects/*/locations/*/certificateauthorities/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} to include in the + # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} in a subsequent + # request. If unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new + # + # # Call the list_certificate_revocation_lists method. + # result = client.list_certificate_revocation_lists request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. + # p item + # end + # + def list_certificate_revocation_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_certificate_revocation_lists.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.list_certificate_revocation_lists request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_revocation_lists, "certificate_revocation_lists", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}. + # + # @overload update_certificate_revocation_list(request, options = nil) + # Pass arguments to `update_certificate_revocation_list` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_certificate_revocation_list(certificate_revocation_list: nil, update_mask: nil, request_id: nil) + # Pass arguments to `update_certificate_revocation_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_revocation_list [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList, ::Hash] + # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} with updated values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A list of fields to be updated in this request. + # @param request_id [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new + # + # # Call the update_certificate_revocation_list method. + # result = client.update_certificate_revocation_list request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_certificate_revocation_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_certificate_revocation_list.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.update_certificate_revocation_list request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig}. + # + # @overload get_reusable_config(request, options = nil) + # Pass arguments to `get_reusable_config` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_reusable_config(name: nil) + # Pass arguments to `get_reusable_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new + # + # # Call the get_reusable_config method. + # result = client.get_reusable_config request + # + # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. + # p result + # + def get_reusable_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_reusable_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_reusable_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_reusable_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.get_reusable_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}. + # + # @overload list_reusable_configs(request, options = nil) + # Pass arguments to `list_reusable_configs` via a request object, either of type + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_reusable_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_reusable_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}, in the format + # `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} to include in the response. + # Further {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} can subsequently be + # obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token} in a subsequent request. If + # unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token}. + # @param filter [::String] + # Optional. Only include resources that match the filter in the response. + # @param order_by [::String] + # Optional. Specify how the results should be sorted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security/private_ca/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new + # + # # Call the list_reusable_configs method. + # result = client.list_reusable_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. + # p item + # end + # + def list_reusable_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_reusable_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_reusable_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_reusable_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_authority_service_stub.list_reusable_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_reusable_configs, "reusable_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CertificateAuthorityService REST API. + # + # This class represents the configuration for CertificateAuthorityService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_certificate to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_certificate.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_certificate.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "privateca.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the CertificateAuthorityService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate + ## + # RPC-specific configuration for `get_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate + ## + # RPC-specific configuration for `list_certificates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificates + ## + # RPC-specific configuration for `revoke_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :revoke_certificate + ## + # RPC-specific configuration for `update_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate + ## + # RPC-specific configuration for `activate_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :activate_certificate_authority + ## + # RPC-specific configuration for `create_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_authority + ## + # RPC-specific configuration for `disable_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_certificate_authority + ## + # RPC-specific configuration for `enable_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_certificate_authority + ## + # RPC-specific configuration for `fetch_certificate_authority_csr` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_certificate_authority_csr + ## + # RPC-specific configuration for `get_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_authority + ## + # RPC-specific configuration for `list_certificate_authorities` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_authorities + ## + # RPC-specific configuration for `restore_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_certificate_authority + ## + # RPC-specific configuration for `schedule_delete_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :schedule_delete_certificate_authority + ## + # RPC-specific configuration for `update_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_authority + ## + # RPC-specific configuration for `get_certificate_revocation_list` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_revocation_list + ## + # RPC-specific configuration for `list_certificate_revocation_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_revocation_lists + ## + # RPC-specific configuration for `update_certificate_revocation_list` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_revocation_list + ## + # RPC-specific configuration for `get_reusable_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reusable_config + ## + # RPC-specific configuration for `list_reusable_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reusable_configs + + # @private + def initialize parent_rpcs = nil + create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate + @create_certificate = ::Gapic::Config::Method.new create_certificate_config + get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate + @get_certificate = ::Gapic::Config::Method.new get_certificate_config + list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates + @list_certificates = ::Gapic::Config::Method.new list_certificates_config + revoke_certificate_config = parent_rpcs.revoke_certificate if parent_rpcs.respond_to? :revoke_certificate + @revoke_certificate = ::Gapic::Config::Method.new revoke_certificate_config + update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate + @update_certificate = ::Gapic::Config::Method.new update_certificate_config + activate_certificate_authority_config = parent_rpcs.activate_certificate_authority if parent_rpcs.respond_to? :activate_certificate_authority + @activate_certificate_authority = ::Gapic::Config::Method.new activate_certificate_authority_config + create_certificate_authority_config = parent_rpcs.create_certificate_authority if parent_rpcs.respond_to? :create_certificate_authority + @create_certificate_authority = ::Gapic::Config::Method.new create_certificate_authority_config + disable_certificate_authority_config = parent_rpcs.disable_certificate_authority if parent_rpcs.respond_to? :disable_certificate_authority + @disable_certificate_authority = ::Gapic::Config::Method.new disable_certificate_authority_config + enable_certificate_authority_config = parent_rpcs.enable_certificate_authority if parent_rpcs.respond_to? :enable_certificate_authority + @enable_certificate_authority = ::Gapic::Config::Method.new enable_certificate_authority_config + fetch_certificate_authority_csr_config = parent_rpcs.fetch_certificate_authority_csr if parent_rpcs.respond_to? :fetch_certificate_authority_csr + @fetch_certificate_authority_csr = ::Gapic::Config::Method.new fetch_certificate_authority_csr_config + get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority + @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config + list_certificate_authorities_config = parent_rpcs.list_certificate_authorities if parent_rpcs.respond_to? :list_certificate_authorities + @list_certificate_authorities = ::Gapic::Config::Method.new list_certificate_authorities_config + restore_certificate_authority_config = parent_rpcs.restore_certificate_authority if parent_rpcs.respond_to? :restore_certificate_authority + @restore_certificate_authority = ::Gapic::Config::Method.new restore_certificate_authority_config + schedule_delete_certificate_authority_config = parent_rpcs.schedule_delete_certificate_authority if parent_rpcs.respond_to? :schedule_delete_certificate_authority + @schedule_delete_certificate_authority = ::Gapic::Config::Method.new schedule_delete_certificate_authority_config + update_certificate_authority_config = parent_rpcs.update_certificate_authority if parent_rpcs.respond_to? :update_certificate_authority + @update_certificate_authority = ::Gapic::Config::Method.new update_certificate_authority_config + get_certificate_revocation_list_config = parent_rpcs.get_certificate_revocation_list if parent_rpcs.respond_to? :get_certificate_revocation_list + @get_certificate_revocation_list = ::Gapic::Config::Method.new get_certificate_revocation_list_config + list_certificate_revocation_lists_config = parent_rpcs.list_certificate_revocation_lists if parent_rpcs.respond_to? :list_certificate_revocation_lists + @list_certificate_revocation_lists = ::Gapic::Config::Method.new list_certificate_revocation_lists_config + update_certificate_revocation_list_config = parent_rpcs.update_certificate_revocation_list if parent_rpcs.respond_to? :update_certificate_revocation_list + @update_certificate_revocation_list = ::Gapic::Config::Method.new update_certificate_revocation_list_config + get_reusable_config_config = parent_rpcs.get_reusable_config if parent_rpcs.respond_to? :get_reusable_config + @get_reusable_config = ::Gapic::Config::Method.new get_reusable_config_config + list_reusable_configs_config = parent_rpcs.list_reusable_configs if parent_rpcs.respond_to? :list_reusable_configs + @list_reusable_configs = ::Gapic::Config::Method.new list_reusable_configs_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.rb new file mode 100644 index 000000000000..aa973e7c95cb --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.rb @@ -0,0 +1,929 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + module CertificateAuthorityService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CertificateAuthorityService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CertificateAuthorityService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "privateca.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.rb new file mode 100644 index 000000000000..0dd294029796 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.rb @@ -0,0 +1,1314 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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/privateca/v1beta1/service_pb" + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + module CertificateAuthorityService + module Rest + ## + # REST service stub for the CertificateAuthorityService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # A result object deserialized from the server's reply + def create_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # A result object deserialized from the server's reply + def get_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_certificates REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse] + # A result object deserialized from the server's reply + def list_certificates request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_certificates_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_certificates", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the revoke_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # A result object deserialized from the server's reply + def revoke_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_revoke_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "revoke_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # A result object deserialized from the server's reply + def update_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the activate_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def activate_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_activate_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "activate_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the disable_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def disable_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "disable_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enable_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def enable_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "enable_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_certificate_authority_csr REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] + # A result object deserialized from the server's reply + def fetch_certificate_authority_csr request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_certificate_authority_csr_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_certificate_authority_csr", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] + # A result object deserialized from the server's reply + def get_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_certificate_authorities REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse] + # A result object deserialized from the server's reply + def list_certificate_authorities request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_authorities_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_certificate_authorities", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the restore_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def restore_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restore_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "restore_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the schedule_delete_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def schedule_delete_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_schedule_delete_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "schedule_delete_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_authority_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_certificate_revocation_list REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] + # A result object deserialized from the server's reply + def get_certificate_revocation_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_revocation_list_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_certificate_revocation_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_certificate_revocation_lists REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse] + # A result object deserialized from the server's reply + def list_certificate_revocation_lists request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_revocation_lists_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_certificate_revocation_lists", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_certificate_revocation_list REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_certificate_revocation_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_revocation_list_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_certificate_revocation_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_reusable_config REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] + # A result object deserialized from the server's reply + def get_reusable_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_reusable_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_reusable_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_reusable_configs REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse] + # A result object deserialized from the server's reply + def list_reusable_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_reusable_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_reusable_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/certificates", + body: "certificate", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_certificates REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_certificates_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/certificates", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the revoke_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_revoke_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:revoke", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_certificate REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{certificate.name}", + body: "certificate", + matches: [ + ["certificate.name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the activate_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_activate_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:activate", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/certificateAuthorities", + body: "certificate_authority", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_disable_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:disable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enable_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:enable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_certificate_authority_csr REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_certificate_authority_csr_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}:fetch", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_certificate_authorities REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_certificate_authorities_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/certificateAuthorities", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restore_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restore_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:restore", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the schedule_delete_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_schedule_delete_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:scheduleDelete", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{certificate_authority.name}", + body: "certificate_authority", + matches: [ + ["certificate_authority.name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_certificate_revocation_list REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_certificate_revocation_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_certificate_revocation_lists REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_certificate_revocation_lists_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/certificateRevocationLists", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_certificate_revocation_list REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_certificate_revocation_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{certificate_revocation_list.name}", + body: "certificate_revocation_list", + matches: [ + ["certificate_revocation_list.name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_reusable_config REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_reusable_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reusableConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_reusable_configs REST call + # + # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_reusable_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/reusableConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.rb new file mode 100644 index 000000000000..0edf85a556a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest" +require "google/cloud/security/private_ca/v1beta1/version" + +module Google + module Cloud + module Security + module PrivateCA + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/security/private_ca/v1beta1/rest" + # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new + # + module V1beta1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/version.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/version.rb new file mode 100644 index 000000000000..348951b0ad41 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/resources_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/resources_pb.rb new file mode 100644 index 000000000000..0a964f805bc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/resources_pb.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/security/privateca/v1beta1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n7google/cloud/security/privateca/v1beta1/resources.proto\x12\'google.cloud.security.privateca.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xa8\x1c\n\x14\x43\x65rtificateAuthority\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12X\n\x04type\x18\x02 \x01(\x0e\x32\x42.google.cloud.security.privateca.v1beta1.CertificateAuthority.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12X\n\x04tier\x18\x03 \x01(\x0e\x32\x42.google.cloud.security.privateca.v1beta1.CertificateAuthority.TierB\x06\xe0\x41\x02\xe0\x41\x05\x12R\n\x06\x63onfig\x18\x04 \x01(\x0b\x32:.google.cloud.security.privateca.v1beta1.CertificateConfigB\x06\xe0\x41\x02\xe0\x41\x05\x12\x30\n\x08lifetime\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x66\n\x08key_spec\x18\x06 \x01(\x0b\x32L.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpecB\x06\xe0\x41\x02\xe0\x41\x05\x12y\n\x12\x63\x65rtificate_policy\x18\x07 \x01(\x0b\x32X.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicyB\x03\xe0\x41\x01\x12j\n\x0fissuing_options\x18\x08 \x01(\x0b\x32L.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptionsB\x03\xe0\x41\x01\x12[\n\x12subordinate_config\x18\x13 \x01(\x0b\x32:.google.cloud.security.privateca.v1beta1.SubordinateConfigB\x03\xe0\x41\x01\x12W\n\x05state\x18\n \x01(\x0e\x32\x43.google.cloud.security.privateca.v1beta1.CertificateAuthority.StateB\x03\xe0\x41\x03\x12 \n\x13pem_ca_certificates\x18\t \x03(\tB\x03\xe0\x41\x03\x12i\n\x1b\x63\x61_certificate_descriptions\x18\x0c \x03(\x0b\x32?.google.cloud.security.privateca.v1beta1.CertificateDescriptionB\x03\xe0\x41\x03\x12\x17\n\ngcs_bucket\x18\r \x01(\tB\x03\xe0\x41\x05\x12\x62\n\x0b\x61\x63\x63\x65ss_urls\x18\x0e \x01(\x0b\x32H.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrlsB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12^\n\x06labels\x18\x12 \x03(\x0b\x32I.google.cloud.security.privateca.v1beta1.CertificateAuthority.LabelsEntryB\x03\xe0\x41\x01\x1aW\n\x0eIssuingOptions\x12 \n\x13include_ca_cert_url\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12#\n\x16include_crl_access_url\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x1a\xbe\t\n\x1a\x43\x65rtificateAuthorityPolicy\x12\x8e\x01\n\x13\x61llowed_config_list\x18\x01 \x01(\x0b\x32j.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigListB\x03\xe0\x41\x01H\x00\x12\x66\n\x17overwrite_config_values\x18\x02 \x01(\x0b\x32>.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperB\x03\xe0\x41\x01H\x00\x12\x62\n#allowed_locations_and_organizations\x18\x03 \x03(\x0b\x32\x30.google.cloud.security.privateca.v1beta1.SubjectB\x03\xe0\x41\x01\x12!\n\x14\x61llowed_common_names\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x8a\x01\n\x0c\x61llowed_sans\x18\x05 \x01(\x0b\x32o.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNamesB\x03\xe0\x41\x01\x12\x38\n\x10maximum_lifetime\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x8b\x01\n\x16\x61llowed_issuance_modes\x18\x08 \x01(\x0b\x32\x66.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModesB\x03\xe0\x41\x01\x1aw\n\x11\x41llowedConfigList\x12\x62\n\x15\x61llowed_config_values\x18\x01 \x03(\x0b\x32>.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperB\x03\xe0\x41\x02\x1a\xde\x01\n\x16\x41llowedSubjectAltNames\x12\x1e\n\x11\x61llowed_dns_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61llowed_uris\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17\x61llowed_email_addresses\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61llowed_ips\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12)\n\x1c\x61llow_globbing_dns_wildcards\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x11\x61llow_custom_sans\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a`\n\rIssuanceModes\x12%\n\x18\x61llow_csr_based_issuance\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12(\n\x1b\x61llow_config_based_issuance\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x42\x0f\n\rconfig_policy\x1aG\n\nAccessUrls\x12!\n\x19\x63\x61_certificate_access_url\x18\x01 \x01(\t\x12\x16\n\x0e\x63rl_access_url\x18\x02 \x01(\t\x1a\xaf\x01\n\x0eKeyVersionSpec\x12$\n\x15\x63loud_kms_key_version\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x12i\n\talgorithm\x18\x02 \x01(\x0e\x32O.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithmB\x03\xe0\x41\x02H\x00\x42\x0c\n\nKeyVersion\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSELF_SIGNED\x10\x01\x12\x0f\n\x0bSUBORDINATE\x10\x02\"8\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\n\n\x06\x44\x45VOPS\x10\x02\"g\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\x16\n\x12PENDING_ACTIVATION\x10\x03\x12\x14\n\x10PENDING_DELETION\x10\x04\"\xfc\x01\n\x11SignHashAlgorithm\x12#\n\x1fSIGN_HASH_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x19\n\x15RSA_PKCS1_2048_SHA256\x10\x06\x12\x19\n\x15RSA_PKCS1_3072_SHA256\x10\x07\x12\x19\n\x15RSA_PKCS1_4096_SHA256\x10\x08\x12\x12\n\x0e\x45\x43_P256_SHA256\x10\x04\x12\x12\n\x0e\x45\x43_P384_SHA384\x10\x05:\x8b\x01\xea\x41\x87\x01\n-privateca.googleapis.com/CertificateAuthority\x12Vprojects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}\"\xf9\x07\n\x19\x43\x65rtificateRevocationList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fsequence_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12x\n\x14revoked_certificates\x18\x03 \x03(\x0b\x32U.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificateB\x03\xe0\x41\x03\x12\x14\n\x07pem_crl\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naccess_url\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x05state\x18\x06 \x01(\x0e\x32H.google.cloud.security.privateca.v1beta1.CertificateRevocationList.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x63\n\x06labels\x18\t \x03(\x0b\x32N.google.cloud.security.privateca.v1beta1.CertificateRevocationList.LabelsEntryB\x03\xe0\x41\x01\x1a\x9a\x01\n\x12RevokedCertificate\x12\x13\n\x0b\x63\x65rtificate\x18\x01 \x01(\t\x12\x19\n\x11hex_serial_number\x18\x02 \x01(\t\x12T\n\x11revocation_reason\x18\x03 \x01(\x0e\x32\x39.google.cloud.security.privateca.v1beta1.RevocationReason\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0e\n\nSUPERSEDED\x10\x02:\xca\x01\xea\x41\xc6\x01\n2privateca.googleapis.com/CertificateRevocationList\x12\x8f\x01projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}\"\x9a\x08\n\x0b\x43\x65rtificate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x07pem_csr\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x12Q\n\x06\x63onfig\x18\x03 \x01(\x0b\x32:.google.cloud.security.privateca.v1beta1.CertificateConfigB\x03\xe0\x41\x05H\x00\x12\x33\n\x08lifetime\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x06\xe0\x41\x02\xe0\x41\x05\x12g\n\x12revocation_details\x18\x05 \x01(\x0b\x32\x46.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetailsB\x03\xe0\x41\x03\x12\x1c\n\x0fpem_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x65\n\x17\x63\x65rtificate_description\x18\x07 \x01(\x0b\x32?.google.cloud.security.privateca.v1beta1.CertificateDescriptionB\x03\xe0\x41\x03\x12\"\n\x15pem_certificate_chain\x18\x08 \x03(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12U\n\x06labels\x18\x0b \x03(\x0b\x32@.google.cloud.security.privateca.v1beta1.Certificate.LabelsEntryB\x03\xe0\x41\x01\x1a\x9d\x01\n\x11RevocationDetails\x12S\n\x10revocation_state\x18\x01 \x01(\x0e\x32\x39.google.cloud.security.privateca.v1beta1.RevocationReason\x12\x33\n\x0frevocation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9d\x01\xea\x41\x99\x01\n$privateca.googleapis.com/Certificate\x12qprojects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificates/{certificate}B\x14\n\x12\x63\x65rtificate_config\"\xff\x03\n\x0eReusableConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12R\n\x06values\x18\x02 \x01(\x0b\x32=.google.cloud.security.privateca.v1beta1.ReusableConfigValuesB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12X\n\x06labels\x18\x06 \x03(\x0b\x32\x43.google.cloud.security.privateca.v1beta1.ReusableConfig.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:w\xea\x41t\n\'privateca.googleapis.com/ReusableConfig\x12Iprojects/{project}/locations/{location}/reusableConfigs/{reusable_config}\"\x89\x04\n\x14ReusableConfigValues\x12I\n\tkey_usage\x18\x01 \x01(\x0b\x32\x31.google.cloud.security.privateca.v1beta1.KeyUsageB\x03\xe0\x41\x01\x12`\n\nca_options\x18\x02 \x01(\x0b\x32G.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptionsB\x03\xe0\x41\x01\x12J\n\npolicy_ids\x18\x03 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1beta1.ObjectIdB\x03\xe0\x41\x01\x12\x1d\n\x10\x61ia_ocsp_servers\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12Z\n\x15\x61\x64\x64itional_extensions\x18\x05 \x03(\x0b\x32\x36.google.cloud.security.privateca.v1beta1.X509ExtensionB\x03\xe0\x41\x01\x1a}\n\tCaOptions\x12.\n\x05is_ca\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12@\n\x16max_issuer_path_length\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x01\"\xae\x01\n\x15ReusableConfigWrapper\x12\x1e\n\x0freusable_config\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x12\x64\n\x16reusable_config_values\x18\x02 \x01(\x0b\x32=.google.cloud.security.privateca.v1beta1.ReusableConfigValuesB\x03\xe0\x41\x02H\x00\x42\x0f\n\rconfig_values\"\xfc\x01\n\x11SubordinateConfig\x12$\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x12r\n\x10pem_issuer_chain\x18\x02 \x01(\x0b\x32Q.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChainB\x03\xe0\x41\x02H\x00\x1a\x37\n\x16SubordinateConfigChain\x12\x1d\n\x10pem_certificates\x18\x01 \x03(\tB\x03\xe0\x41\x02\x42\x14\n\x12subordinate_config\"\xb2\x01\n\tPublicKey\x12M\n\x04type\x18\x01 \x01(\x0e\x32:.google.cloud.security.privateca.v1beta1.PublicKey.KeyTypeB\x03\xe0\x41\x02\x12\x10\n\x03key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"D\n\x07KeyType\x12\x18\n\x14KEY_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPEM_RSA_KEY\x10\x01\x12\x0e\n\nPEM_EC_KEY\x10\x02\"\xf2\x03\n\x11\x43\x65rtificateConfig\x12\x65\n\x0esubject_config\x18\x01 \x01(\x0b\x32H.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfigB\x03\xe0\x41\x02\x12\\\n\x0freusable_config\x18\x02 \x01(\x0b\x32>.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperB\x03\xe0\x41\x02\x12K\n\npublic_key\x18\x03 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1beta1.PublicKeyB\x03\xe0\x41\x01\x1a\xca\x01\n\rSubjectConfig\x12\x46\n\x07subject\x18\x01 \x01(\x0b\x32\x30.google.cloud.security.privateca.v1beta1.SubjectB\x03\xe0\x41\x02\x12\x18\n\x0b\x63ommon_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12W\n\x10subject_alt_name\x18\x03 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1beta1.SubjectAltNamesB\x03\xe0\x41\x01\"\xe1\x08\n\x16\x43\x65rtificateDescription\x12o\n\x13subject_description\x18\x01 \x01(\x0b\x32R.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription\x12T\n\rconfig_values\x18\x02 \x01(\x0b\x32=.google.cloud.security.privateca.v1beta1.ReusableConfigValues\x12\x46\n\npublic_key\x18\x03 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1beta1.PublicKey\x12]\n\x0esubject_key_id\x18\x04 \x01(\x0b\x32\x45.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId\x12_\n\x10\x61uthority_key_id\x18\x05 \x01(\x0b\x32\x45.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId\x12\x1f\n\x17\x63rl_distribution_points\x18\x06 \x03(\t\x12$\n\x1c\x61ia_issuing_certificate_urls\x18\x07 \x03(\t\x12p\n\x10\x63\x65rt_fingerprint\x18\x08 \x01(\x0b\x32V.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint\x1a\xf1\x02\n\x12SubjectDescription\x12\x41\n\x07subject\x18\x01 \x01(\x0b\x32\x30.google.cloud.security.privateca.v1beta1.Subject\x12\x13\n\x0b\x63ommon_name\x18\x02 \x01(\t\x12R\n\x10subject_alt_name\x18\x03 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1beta1.SubjectAltNames\x12\x19\n\x11hex_serial_number\x18\x04 \x01(\t\x12+\n\x08lifetime\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x33\n\x0fnot_before_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0enot_after_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x1c\n\x05KeyId\x12\x13\n\x06key_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x16\x43\x65rtificateFingerprint\x12\x13\n\x0bsha256_hash\x18\x01 \x01(\t\"\'\n\x08ObjectId\x12\x1b\n\x0eobject_id_path\x18\x01 \x03(\x05\x42\x03\xe0\x41\x02\"\x85\x01\n\rX509Extension\x12I\n\tobject_id\x18\x01 \x01(\x0b\x32\x31.google.cloud.security.privateca.v1beta1.ObjectIdB\x03\xe0\x41\x02\x12\x15\n\x08\x63ritical\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x02\"\xb1\x05\n\x08KeyUsage\x12Y\n\x0e\x62\x61se_key_usage\x18\x01 \x01(\x0b\x32\x41.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions\x12\x65\n\x12\x65xtended_key_usage\x18\x02 \x01(\x0b\x32I.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions\x12V\n\x1bunknown_extended_key_usages\x18\x03 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1beta1.ObjectId\x1a\xe7\x01\n\x0fKeyUsageOptions\x12\x19\n\x11\x64igital_signature\x18\x01 \x01(\x08\x12\x1a\n\x12\x63ontent_commitment\x18\x02 \x01(\x08\x12\x18\n\x10key_encipherment\x18\x03 \x01(\x08\x12\x19\n\x11\x64\x61ta_encipherment\x18\x04 \x01(\x08\x12\x15\n\rkey_agreement\x18\x05 \x01(\x08\x12\x11\n\tcert_sign\x18\x06 \x01(\x08\x12\x10\n\x08\x63rl_sign\x18\x07 \x01(\x08\x12\x15\n\rencipher_only\x18\x08 \x01(\x08\x12\x15\n\rdecipher_only\x18\t \x01(\x08\x1a\xa0\x01\n\x17\x45xtendedKeyUsageOptions\x12\x13\n\x0bserver_auth\x18\x01 \x01(\x08\x12\x13\n\x0b\x63lient_auth\x18\x02 \x01(\x08\x12\x14\n\x0c\x63ode_signing\x18\x03 \x01(\x08\x12\x18\n\x10\x65mail_protection\x18\x04 \x01(\x08\x12\x15\n\rtime_stamping\x18\x05 \x01(\x08\x12\x14\n\x0cocsp_signing\x18\x06 \x01(\x08\"\xa3\x01\n\x07Subject\x12\x14\n\x0c\x63ountry_code\x18\x01 \x01(\t\x12\x14\n\x0corganization\x18\x02 \x01(\t\x12\x1b\n\x13organizational_unit\x18\x03 \x01(\t\x12\x10\n\x08locality\x18\x04 \x01(\t\x12\x10\n\x08province\x18\x05 \x01(\t\x12\x16\n\x0estreet_address\x18\x06 \x01(\t\x12\x13\n\x0bpostal_code\x18\x07 \x01(\t\"\xae\x01\n\x0fSubjectAltNames\x12\x11\n\tdns_names\x18\x01 \x03(\t\x12\x0c\n\x04uris\x18\x02 \x03(\t\x12\x17\n\x0f\x65mail_addresses\x18\x03 \x03(\t\x12\x14\n\x0cip_addresses\x18\x04 \x03(\t\x12K\n\x0b\x63ustom_sans\x18\x05 \x03(\x0b\x32\x36.google.cloud.security.privateca.v1beta1.X509Extension*\x87\x02\n\x10RevocationReason\x12!\n\x1dREVOCATION_REASON_UNSPECIFIED\x10\x00\x12\x12\n\x0eKEY_COMPROMISE\x10\x01\x12$\n CERTIFICATE_AUTHORITY_COMPROMISE\x10\x02\x12\x17\n\x13\x41\x46\x46ILIATION_CHANGED\x10\x03\x12\x0e\n\nSUPERSEDED\x10\x04\x12\x1a\n\x16\x43\x45SSATION_OF_OPERATION\x10\x05\x12\x14\n\x10\x43\x45RTIFICATE_HOLD\x10\x06\x12\x17\n\x13PRIVILEGE_WITHDRAWN\x10\x07\x12\"\n\x1e\x41TTRIBUTE_AUTHORITY_COMPROMISE\x10\x08\x42\x98\x02\n+com.google.cloud.security.privateca.v1beta1B\x17PrivateCaResourcesProtoP\x01ZIcloud.google.com/go/security/privateca/apiv1beta1/privatecapb;privatecapb\xf8\x01\x01\xaa\x02\'Google.Cloud.Security.PrivateCA.V1Beta1\xca\x02\'Google\\Cloud\\Security\\PrivateCA\\V1beta1\xea\x02+Google::Cloud::Security::PrivateCA::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + CertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority").msgclass + CertificateAuthority::IssuingOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions").msgclass + CertificateAuthority::CertificateAuthorityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy").msgclass + CertificateAuthority::CertificateAuthorityPolicy::AllowedConfigList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList").msgclass + CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames").msgclass + CertificateAuthority::CertificateAuthorityPolicy::IssuanceModes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes").msgclass + CertificateAuthority::AccessUrls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls").msgclass + CertificateAuthority::KeyVersionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec").msgclass + CertificateAuthority::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.Type").enummodule + CertificateAuthority::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier").enummodule + CertificateAuthority::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.State").enummodule + CertificateAuthority::SignHashAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm").enummodule + CertificateRevocationList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateRevocationList").msgclass + CertificateRevocationList::RevokedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate").msgclass + CertificateRevocationList::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateRevocationList.State").enummodule + Certificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.Certificate").msgclass + Certificate::RevocationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails").msgclass + ReusableConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ReusableConfig").msgclass + ReusableConfigValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ReusableConfigValues").msgclass + ReusableConfigValues::CaOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions").msgclass + ReusableConfigWrapper = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ReusableConfigWrapper").msgclass + SubordinateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.SubordinateConfig").msgclass + SubordinateConfig::SubordinateConfigChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain").msgclass + PublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.PublicKey").msgclass + PublicKey::KeyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.PublicKey.KeyType").enummodule + CertificateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateConfig").msgclass + CertificateConfig::SubjectConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig").msgclass + CertificateDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateDescription").msgclass + CertificateDescription::SubjectDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription").msgclass + CertificateDescription::KeyId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId").msgclass + CertificateDescription::CertificateFingerprint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint").msgclass + ObjectId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ObjectId").msgclass + X509Extension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.X509Extension").msgclass + KeyUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.KeyUsage").msgclass + KeyUsage::KeyUsageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions").msgclass + KeyUsage::ExtendedKeyUsageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions").msgclass + Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.Subject").msgclass + SubjectAltNames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.SubjectAltNames").msgclass + RevocationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.RevocationReason").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_pb.rb new file mode 100644 index 000000000000..a760dc678bed --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_pb.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/security/privateca/v1beta1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/security/privateca/v1beta1/resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/security/privateca/v1beta1/service.proto\x12\'google.cloud.security.privateca.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x37google/cloud/security/privateca/v1beta1/resources.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe7\x01\n\x18\x43reateCertificateRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1b\n\x0e\x63\x65rtificate_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0b\x63\x65rtificate\x18\x03 \x01(\x0b\x32\x34.google.cloud.security.privateca.v1beta1.CertificateB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"S\n\x15GetCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\"\xbd\x01\n\x17ListCertificatesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x18ListCertificatesResponse\x12J\n\x0c\x63\x65rtificates\x18\x01 \x03(\x0b\x32\x34.google.cloud.security.privateca.v1beta1.Certificate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbf\x01\n\x18RevokeCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\x12N\n\x06reason\x18\x02 \x01(\x0e\x32\x39.google.cloud.security.privateca.v1beta1.RevocationReasonB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb9\x01\n\x18UpdateCertificateRequest\x12N\n\x0b\x63\x65rtificate\x18\x01 \x01(\x0b\x32\x34.google.cloud.security.privateca.v1beta1.CertificateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x81\x02\n#ActivateCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\x12pem_ca_certificate\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12[\n\x12subordinate_config\x18\x03 \x01(\x0b\x32:.google.cloud.security.privateca.v1beta1.SubordinateConfigB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x81\x02\n!CreateCertificateAuthorityRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12%\n\x18\x63\x65rtificate_authority_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\x15\x63\x65rtificate_authority\x18\x03 \x01(\x0b\x32=.google.cloud.security.privateca.v1beta1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\"DisableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n!EnableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"j\n#FetchCertificateAuthorityCsrRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"<\n$FetchCertificateAuthorityCsrResponse\x12\x14\n\x07pem_csr\x18\x01 \x01(\tB\x03\xe0\x41\x03\"e\n\x1eGetCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"\xbb\x01\n!ListCertificateAuthoritiesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xb2\x01\n\"ListCertificateAuthoritiesResponse\x12^\n\x17\x63\x65rtificate_authorities\x18\x01 \x03(\x0b\x32=.google.cloud.security.privateca.v1beta1.CertificateAuthority\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x82\x01\n\"RestoreCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x89\x01\n)ScheduleDeleteCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xd5\x01\n!UpdateCertificateAuthorityRequest\x12\x61\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\x0b\x32=.google.cloud.security.privateca.v1beta1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"o\n#GetCertificateRevocationListRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2privateca.googleapis.com/CertificateRevocationList\"\xcb\x01\n%ListCertificateRevocationListsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xc0\x01\n&ListCertificateRevocationListsResponse\x12h\n\x1c\x63\x65rtificate_revocation_lists\x18\x01 \x03(\x0b\x32\x42.google.cloud.security.privateca.v1beta1.CertificateRevocationList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xe5\x01\n&UpdateCertificateRevocationListRequest\x12l\n\x1b\x63\x65rtificate_revocation_list\x18\x01 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1beta1.CertificateRevocationListB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Y\n\x18GetReusableConfigRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'privateca.googleapis.com/ReusableConfig\"\xb4\x01\n\x1aListReusableConfigsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9e\x01\n\x1bListReusableConfigsResponse\x12Q\n\x10reusable_configs\x18\x01 \x03(\x0b\x32\x37.google.cloud.security.privateca.v1beta1.ReusableConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xd1,\n\x1b\x43\x65rtificateAuthorityService\x12\x96\x02\n\x11\x43reateCertificate\x12\x41.google.cloud.security.privateca.v1beta1.CreateCertificateRequest\x1a\x34.google.cloud.security.privateca.v1beta1.Certificate\"\x87\x01\xda\x41!parent,certificate,certificate_id\x82\xd3\xe4\x93\x02]\"N/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates:\x0b\x63\x65rtificate\x12\xe5\x01\n\x0eGetCertificate\x12>.google.cloud.security.privateca.v1beta1.GetCertificateRequest\x1a\x34.google.cloud.security.privateca.v1beta1.Certificate\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\x12N/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}\x12\xf8\x01\n\x10ListCertificates\x12@.google.cloud.security.privateca.v1beta1.ListCertificatesRequest\x1a\x41.google.cloud.security.privateca.v1beta1.ListCertificatesResponse\"_\xda\x41\x06parent\x82\xd3\xe4\x93\x02P\x12N/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates\x12\xf5\x01\n\x11RevokeCertificate\x12\x41.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest\x1a\x34.google.cloud.security.privateca.v1beta1.Certificate\"g\xda\x41\x04name\x82\xd3\xe4\x93\x02Z\"U/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}:revoke:\x01*\x12\x98\x02\n\x11UpdateCertificate\x12\x41.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest\x1a\x34.google.cloud.security.privateca.v1beta1.Certificate\"\x89\x01\xda\x41\x17\x63\x65rtificate,update_mask\x82\xd3\xe4\x93\x02i2Z/v1beta1/{certificate.name=projects/*/locations/*/certificateAuthorities/*/certificates/*}:\x0b\x63\x65rtificate\x12\x94\x02\n\x1c\x41\x63tivateCertificateAuthority\x12L.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02M\"H/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:activate:\x01*\x12\xcc\x02\n\x1a\x43reateCertificateAuthority\x12J.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc2\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x35parent,certificate_authority,certificate_authority_id\x82\xd3\xe4\x93\x02X\"?/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities:\x15\x63\x65rtificate_authority\x12\x91\x02\n\x1b\x44isableCertificateAuthority\x12K.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:disable:\x01*\x12\x8e\x02\n\x1a\x45nableCertificateAuthority\x12J.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02K\"F/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:enable:\x01*\x12\x91\x02\n\x1c\x46\x65tchCertificateAuthorityCsr\x12L.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest\x1aM.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:fetch\x12\xf1\x01\n\x17GetCertificateAuthority\x12G.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest\x1a=.google.cloud.security.privateca.v1beta1.CertificateAuthority\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}\x12\x87\x02\n\x1aListCertificateAuthorities\x12J.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest\x1aK.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities\x12\x91\x02\n\x1bRestoreCertificateAuthority\x12K.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:restore:\x01*\x12\xa6\x02\n\"ScheduleDeleteCertificateAuthority\x12R.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"N/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:scheduleDelete:\x01*\x12\xce\x02\n\x1aUpdateCertificateAuthority\x12J.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41!certificate_authority,update_mask\x82\xd3\xe4\x93\x02n2U/v1beta1/{certificate_authority.name=projects/*/locations/*/certificateAuthorities/*}:\x15\x63\x65rtificate_authority\x12\x9d\x02\n\x1cGetCertificateRevocationList\x12L.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest\x1a\x42.google.cloud.security.privateca.v1beta1.CertificateRevocationList\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^\x12\\/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}\x12\xb0\x02\n\x1eListCertificateRevocationLists\x12N.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest\x1aO.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse\"m\xda\x41\x06parent\x82\xd3\xe4\x93\x02^\x12\\/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists\x12\x8d\x03\n\x1fUpdateCertificateRevocationList\x12O.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest\x1a\x1d.google.longrunning.Operation\"\xf9\x01\xca\x41.\n\x19\x43\x65rtificateRevocationList\x12\x11OperationMetadata\xda\x41\'certificate_revocation_list,update_mask\x82\xd3\xe4\x93\x02\x97\x01\x32x/v1beta1/{certificate_revocation_list.name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}:\x1b\x63\x65rtificate_revocation_list\x12\xd8\x01\n\x11GetReusableConfig\x12\x41.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest\x1a\x37.google.cloud.security.privateca.v1beta1.ReusableConfig\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}\x12\xeb\x01\n\x13ListReusableConfigs\x12\x43.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest\x1a\x44.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1beta1/{parent=projects/*/locations/*}/reusableConfigs\x1aL\xca\x41\x18privateca.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8f\x02\n+com.google.cloud.security.privateca.v1beta1B\x0ePrivateCaProtoP\x01ZIcloud.google.com/go/security/privateca/apiv1beta1/privatecapb;privatecapb\xf8\x01\x01\xaa\x02\'Google.Cloud.Security.PrivateCA.V1Beta1\xca\x02\'Google\\Cloud\\Security\\PrivateCA\\V1beta1\xea\x02+Google::Cloud::Security::PrivateCA::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + CreateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CreateCertificateRequest").msgclass + GetCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.GetCertificateRequest").msgclass + ListCertificatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificatesRequest").msgclass + ListCertificatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificatesResponse").msgclass + RevokeCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.RevokeCertificateRequest").msgclass + UpdateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.UpdateCertificateRequest").msgclass + ActivateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest").msgclass + CreateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest").msgclass + DisableCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest").msgclass + EnableCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest").msgclass + FetchCertificateAuthorityCsrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest").msgclass + FetchCertificateAuthorityCsrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse").msgclass + GetCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest").msgclass + ListCertificateAuthoritiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest").msgclass + ListCertificateAuthoritiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse").msgclass + RestoreCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest").msgclass + ScheduleDeleteCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest").msgclass + UpdateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest").msgclass + GetCertificateRevocationListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest").msgclass + ListCertificateRevocationListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest").msgclass + ListCertificateRevocationListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse").msgclass + UpdateCertificateRevocationListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest").msgclass + GetReusableConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.GetReusableConfigRequest").msgclass + ListReusableConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest").msgclass + ListReusableConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.OperationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb new file mode 100644 index 000000000000..5d3942b0c029 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb @@ -0,0 +1,99 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/security/privateca/v1beta1/service.proto for package 'Google.Cloud.Security.PrivateCA.V1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/security/privateca/v1beta1/service_pb' + +module Google + module Cloud + module Security + module PrivateCA + module V1beta1 + module CertificateAuthorityService + # [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private + # certificate authorities and issued certificates. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.security.privateca.v1beta1.CertificateAuthorityService' + + # Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular + # [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc :CreateCertificate, ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate + # Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + rpc :GetCertificate, ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate + # Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + rpc :ListCertificates, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse + # Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + rpc :RevokeCertificate, ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate + # Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the only field you can update is the + # [labels][google.cloud.security.privateca.v1beta1.Certificate.labels] field. + rpc :UpdateCertificate, ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate + # Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state + # [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is + # of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the + # parent Certificate Authority signs a certificate signing request from + # [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation + # process. + rpc :ActivateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location. + rpc :CreateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc :DisableCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc :EnableCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + # that is in state + # [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is + # of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must + # then be signed by the desired parent Certificate Authority, which could be + # another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem + # certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority]. + rpc :FetchCertificateAuthorityCsr, ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse + # Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc :GetCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority + # Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc :ListCertificateAuthorities, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse + # Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion. + rpc :RestoreCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion. + rpc :ScheduleDeleteCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc :UpdateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest, ::Google::Longrunning::Operation + # Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + rpc :GetCertificateRevocationList, ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList + # Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + rpc :ListCertificateRevocationLists, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse + # Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + rpc :UpdateCertificateRevocationList, ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest, ::Google::Longrunning::Operation + # Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + rpc :GetReusableConfig, ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig + # Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig]. + rpc :ListReusableConfigs, ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..3e513ef757bc --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Certificate Authority Service V1beta1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.rb new file mode 100644 index 000000000000..195a33eff695 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.rb @@ -0,0 +1,1001 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1beta1 + # A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} represents an individual Certificate Authority. + # A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} can be used to create {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @!attribute [rw] type + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type] + # Required. Immutable. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type Type} of this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # @!attribute [rw] tier + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Tier] + # Required. Immutable. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Tier Tier} of this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # @!attribute [rw] config + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateConfig] + # Required. Immutable. The config used to create a self-signed X.509 certificate or CSR. + # @!attribute [rw] lifetime + # @return [::Google::Protobuf::Duration] + # Required. The desired lifetime of the CA certificate. Used to create the + # "not_before_time" and "not_after_time" fields inside an X.509 + # certificate. + # @!attribute [rw] key_spec + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::KeyVersionSpec] + # Required. Immutable. Used when issuing certificates for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. If this + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} is a self-signed CertificateAuthority, this key + # is also used to sign the self-signed CA certificate. Otherwise, it + # is used to sign a CSR. + # @!attribute [rw] certificate_policy + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy] + # Optional. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy CertificateAuthorityPolicy} to enforce when issuing + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} from this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # @!attribute [rw] issuing_options + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::IssuingOptions] + # Optional. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::IssuingOptions IssuingOptions} to follow when issuing {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} + # from this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # @!attribute [rw] subordinate_config + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig] + # Optional. If this is a subordinate {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, this field will be set + # with the subordinate configuration, which describes its issuers. This may + # be updated, but this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} must continue to validate. + # @!attribute [r] state + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State] + # Output only. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State State} for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # @!attribute [r] pem_ca_certificates + # @return [::Array<::String>] + # Output only. This {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s certificate chain, including the current + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s certificate. Ordered such that the root issuer + # is the final element (consistent with RFC 5246). For a self-signed CA, this + # will only list the current {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s certificate. + # @!attribute [r] ca_certificate_descriptions + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription>] + # Output only. A structured description of this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s CA certificate + # and its issuers. Ordered as self-to-root. + # @!attribute [rw] gcs_bucket + # @return [::String] + # Immutable. The name of a Cloud Storage bucket where this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} will + # publish content, such as the CA certificate and CRLs. This must be a bucket + # name, without any prefixes (such as `gs://`) or suffixes (such as + # `.googleapis.com`). For example, to use a bucket named `my-bucket`, you + # would simply specify `my-bucket`. If not specified, a managed bucket will + # be created. + # @!attribute [r] access_urls + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::AccessUrls] + # Output only. URLs for accessing content published by this CA, such as the CA certificate + # and CRLs. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} was updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} will be deleted, if + # scheduled for deletion. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels with user-defined metadata. + class CertificateAuthority + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Options that affect all certificates issued by a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # @!attribute [rw] include_ca_cert_url + # @return [::Boolean] + # Required. When true, includes a URL to the issuing CA certificate in the + # "authority information access" X.509 extension. + # @!attribute [rw] include_crl_access_url + # @return [::Boolean] + # Required. When true, includes a URL to the CRL corresponding to certificates + # issued from a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # CRLs will expire 7 days from their creation. However, we will rebuild + # daily. CRLs are also rebuilt shortly after a certificate is revoked. + class IssuingOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The issuing policy for a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} will not be successfully issued from this + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} if they violate the policy. + # @!attribute [rw] allowed_config_list + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedConfigList] + # Optional. All {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} + # must match at least one listed {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper ReusableConfigWrapper} in the list. + # + # Note: The following fields are mutually exclusive: `allowed_config_list`, `overwrite_config_values`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] overwrite_config_values + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper] + # Optional. All {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} + # will use the provided configuration values, overwriting any requested + # configuration values. + # + # Note: The following fields are mutually exclusive: `overwrite_config_values`, `allowed_config_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] allowed_locations_and_organizations + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::Subject>] + # Optional. If any {::Google::Cloud::Security::PrivateCA::V1beta1::Subject Subject} is specified here, then all + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} must + # match at least one listed {::Google::Cloud::Security::PrivateCA::V1beta1::Subject Subject}. If a {::Google::Cloud::Security::PrivateCA::V1beta1::Subject Subject} has an empty + # field, any value will be allowed for that field. + # @!attribute [rw] allowed_common_names + # @return [::Array<::String>] + # Optional. If any value is specified here, then all + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} must + # match at least one listed value. If no value is specified, all values + # will be allowed for this fied. Glob patterns are also supported. + # @!attribute [rw] allowed_sans + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames] + # Optional. If a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames AllowedSubjectAltNames} is specified here, then all + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} must + # match {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames AllowedSubjectAltNames}. If no value or an empty value + # is specified, any value will be allowed for the {::Google::Cloud::Security::PrivateCA::V1beta1::SubjectAltNames SubjectAltNames} + # field. + # @!attribute [rw] maximum_lifetime + # @return [::Google::Protobuf::Duration] + # Optional. The maximum lifetime allowed by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. Note that + # if the any part if the issuing chain expires before a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}'s + # requested maximum_lifetime, the effective lifetime will be explicitly + # truncated. + # @!attribute [rw] allowed_issuance_modes + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::IssuanceModes] + # Optional. If specified, then only methods allowed in the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::IssuanceModes IssuanceModes} may be + # used to issue {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. + class CertificateAuthorityPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] allowed_config_values + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper>] + # Required. All {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} + # must match at least one listed {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper ReusableConfigWrapper}. If a + # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper ReusableConfigWrapper} has an empty field, any value will be + # allowed for that field. + class AllowedConfigList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames AllowedSubjectAltNames} specifies the allowed values for + # {::Google::Cloud::Security::PrivateCA::V1beta1::SubjectAltNames SubjectAltNames} by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} when issuing + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. + # @!attribute [rw] allowed_dns_names + # @return [::Array<::String>] + # Optional. Contains valid, fully-qualified host names. Glob patterns are also + # supported. To allow an explicit wildcard certificate, escape with + # backlash (i.e. `\*`). + # E.g. for globbed entries: `*bar.com` will allow `foo.bar.com`, but not + # `*.bar.com`, unless the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames#allow_globbing_dns_wildcards allow_globbing_dns_wildcards} field is set. + # E.g. for wildcard entries: `\*.bar.com` will allow `*.bar.com`, but not + # `foo.bar.com`. + # @!attribute [rw] allowed_uris + # @return [::Array<::String>] + # Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To + # match across path seperators (i.e. '/') use the double star glob + # pattern (i.e. '**'). + # @!attribute [rw] allowed_email_addresses + # @return [::Array<::String>] + # Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also + # supported. + # @!attribute [rw] allowed_ips + # @return [::Array<::String>] + # Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6 + # addresses and subnet ranges. Subnet ranges are specified using the + # '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns + # are supported only for ip address entries (i.e. not for subnet ranges). + # @!attribute [rw] allow_globbing_dns_wildcards + # @return [::Boolean] + # Optional. Specifies if glob patterns used for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames#allowed_dns_names allowed_dns_names} allows + # wildcard certificates. + # @!attribute [rw] allow_custom_sans + # @return [::Boolean] + # Optional. Specifies if to allow custom X509Extension values. + class AllowedSubjectAltNames + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::IssuanceModes IssuanceModes} specifies the allowed ways in which + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} may be requested from this + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # @!attribute [rw] allow_csr_based_issuance + # @return [::Boolean] + # Required. When true, allows callers to create {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} by + # specifying a CSR. + # @!attribute [rw] allow_config_based_issuance + # @return [::Boolean] + # Required. When true, allows callers to create {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} by + # specifying a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateConfig CertificateConfig}. + class IssuanceModes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # URLs where a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} will publish content. + # @!attribute [rw] ca_certificate_access_url + # @return [::String] + # The URL where this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s CA certificate is + # published. This will only be set for CAs that have been activated. + # @!attribute [rw] crl_access_url + # @return [::String] + # The URL where this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s CRLs are published. This + # will only be set for CAs that have been activated. + class AccessUrls + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Cloud KMS key configuration that a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} will use. + # @!attribute [rw] cloud_kms_key_version + # @return [::String] + # Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the + # format + # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + # This option enables full flexibility in the key's capabilities and + # properties. + # + # Note: The following fields are mutually exclusive: `cloud_kms_key_version`, `algorithm`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] algorithm + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::SignHashAlgorithm] + # Required. The algorithm to use for creating a managed Cloud KMS key for a for a + # simplified experience. All managed keys will be have their + # [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`. + # + # Note: The following fields are mutually exclusive: `algorithm`, `cloud_kms_key_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class KeyVersionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, indicating its issuing chain. + module Type + # Not specified. + TYPE_UNSPECIFIED = 0 + + # Self-signed CA. + SELF_SIGNED = 1 + + # Subordinate CA. Could be issued by a Private CA {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} + # or an unmanaged CA. + SUBORDINATE = 2 + end + + # The tier of a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, indicating its supported + # functionality and/or billing SKU. + module Tier + # Not specified. + TIER_UNSPECIFIED = 0 + + # Enterprise tier. + ENTERPRISE = 1 + + # DevOps tier. + DEVOPS = 2 + end + + # The state of a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, indicating if it can be used. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # Certificates can be issued from this CA. CRLs will be generated for this + # CA. + ENABLED = 1 + + # Certificates cannot be issued from this CA. CRLs will still be generated. + DISABLED = 2 + + # Certificates cannot be issued from this CA. CRLs will not be generated. + PENDING_ACTIVATION = 3 + + # Certificates cannot be issued from this CA. CRLs will not be generated. + PENDING_DELETION = 4 + end + + # The algorithm of a Cloud KMS CryptoKeyVersion of a + # [CryptoKey][google.cloud.kms.v1.CryptoKey] with the + # [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value + # `ASYMMETRIC_SIGN`. These values correspond to the + # [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + # values. For RSA signing algorithms, the PSS algorithms should be preferred, + # use PKCS1 algorithms if required for compatibility. For further + # recommandations, see + # https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations. + module SignHashAlgorithm + # Not specified. + SIGN_HASH_ALGORITHM_UNSPECIFIED = 0 + + # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256 + RSA_PSS_2048_SHA256 = 1 + + # maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256 + RSA_PSS_3072_SHA256 = 2 + + # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256 + RSA_PSS_4096_SHA256 = 3 + + # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256 + RSA_PKCS1_2048_SHA256 = 6 + + # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256 + RSA_PKCS1_3072_SHA256 = 7 + + # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256 + RSA_PKCS1_4096_SHA256 = 8 + + # maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256 + EC_P256_SHA256 = 4 + + # maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384 + EC_P384_SHA384 = 5 + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} corresponds to a signed X.509 certificate + # Revocation List (CRL). A CRL contains the serial numbers of certificates that + # should no longer be trusted. + # @!attribute [r] name + # @return [::String] + # Output only. The resource path for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} in + # the format + # `projects/*/locations/*/certificateAuthorities/*/ + # certificateRevocationLists/*`. + # @!attribute [r] sequence_number + # @return [::Integer] + # Output only. The CRL sequence number that appears in pem_crl. + # @!attribute [r] revoked_certificates + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList::RevokedCertificate>] + # Output only. The revoked serial numbers that appear in pem_crl. + # @!attribute [r] pem_crl + # @return [::String] + # Output only. The PEM-encoded X.509 CRL. + # @!attribute [r] access_url + # @return [::String] + # Output only. The location where 'pem_crl' can be accessed. + # @!attribute [r] state + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList::State] + # Output only. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList::State State} for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels with user-defined metadata. + class CertificateRevocationList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a revoked {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. + # @!attribute [rw] certificate + # @return [::String] + # The resource path for the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in the format + # `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + # @!attribute [rw] hex_serial_number + # @return [::String] + # The serial number of the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. + # @!attribute [rw] revocation_reason + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason] + # The reason the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} was revoked. + class RevokedCertificate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}, indicating if it is current. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} is up to date. + ACTIVE = 1 + + # The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} is no longer current. + SUPERSEDED = 2 + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} corresponds to a signed X.509 certificate issued by a + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. + # @!attribute [r] name + # @return [::String] + # Output only. The resource path for this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in the format + # `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + # @!attribute [rw] pem_csr + # @return [::String] + # Immutable. A pem-encoded X.509 certificate signing request (CSR). + # + # Note: The following fields are mutually exclusive: `pem_csr`, `config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] config + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateConfig] + # Immutable. A description of the certificate and key that does not require X.509 or + # ASN.1. + # + # Note: The following fields are mutually exclusive: `config`, `pem_csr`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] lifetime + # @return [::Google::Protobuf::Duration] + # Required. Immutable. The desired lifetime of a certificate. Used to create the + # "not_before_time" and "not_after_time" fields inside an X.509 + # certificate. Note that the lifetime may be truncated if it would extend + # past the life of any certificate authority in the issuing chain. + # @!attribute [r] revocation_details + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate::RevocationDetails] + # Output only. Details regarding the revocation of this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. This + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} is considered revoked if and only if this field is present. + # @!attribute [r] pem_certificate + # @return [::String] + # Output only. The pem-encoded, signed X.509 certificate. + # @!attribute [r] certificate_description + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription] + # Output only. A structured description of the issued X.509 certificate. + # @!attribute [r] pem_certificate_chain + # @return [::Array<::String>] + # Output only. The chain that may be used to verify the X.509 certificate. Expected to be + # in issuer-to-root order according to RFC 5246. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels with user-defined metadata. + class Certificate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes fields that are relavent to the revocation of a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. + # @!attribute [rw] revocation_state + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason] + # Indicates why a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} was revoked. + # @!attribute [rw] revocation_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} was revoked. + class RevocationDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig} refers to a managed {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues ReusableConfigValues}. Those, in + # turn, are used to describe certain fields of an X.509 certificate, such as + # the key usage fields, fields specific to CA certificates, certificate policy + # extensions and custom extensions. + # @!attribute [r] name + # @return [::String] + # Output only. The resource path for this {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig} in the format + # `projects/*/locations/*/reusableConfigs/*`. + # @!attribute [rw] values + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues] + # Required. The config values. + # @!attribute [rw] description + # @return [::String] + # Optional. A human-readable description of scenarios these ReusableConfigValues may be + # compatible with. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig} was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig} was updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels with user-defined metadata. + class ReusableConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues ReusableConfigValues} is used to describe certain fields of an + # X.509 certificate, such as the key usage fields, fields specific to CA + # certificates, certificate policy extensions and custom extensions. + # @!attribute [rw] key_usage + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage] + # Optional. Indicates the intended use for keys that correspond to a certificate. + # @!attribute [rw] ca_options + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues::CaOptions] + # Optional. Describes options in this {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues ReusableConfigValues} that are + # relevant in a CA certificate. + # @!attribute [rw] policy_ids + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId>] + # Optional. Describes the X.509 certificate policy object identifiers, per + # https://tools.ietf.org/html/rfc5280#section-4.2.1.4. + # @!attribute [rw] aia_ocsp_servers + # @return [::Array<::String>] + # Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses + # that appear in the "Authority Information Access" extension in the + # certificate. + # @!attribute [rw] additional_extensions + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::X509Extension>] + # Optional. Describes custom X.509 extensions. + class ReusableConfigValues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes values that are relevant in a CA certificate. + # @!attribute [rw] is_ca + # @return [::Google::Protobuf::BoolValue] + # Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this + # value is missing, the extension will be omitted from the CA certificate. + # @!attribute [rw] max_issuer_path_length + # @return [::Google::Protobuf::Int32Value] + # Optional. Refers to the path length restriction X.509 extension. For a CA + # certificate, this value describes the depth of subordinate CA + # certificates that are allowed. + # If this value is less than 0, the request will fail. + # If this value is missing, the max path length will be omitted from the + # CA certificate. + class CaOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper ReusableConfigWrapper} describes values that may assist in creating an + # X.509 certificate, or a reference to a pre-defined set of values. + # @!attribute [rw] reusable_config + # @return [::String] + # Required. A resource path to a {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig} in the format + # `projects/*/locations/*/reusableConfigs/*`. + # + # Note: The following fields are mutually exclusive: `reusable_config`, `reusable_config_values`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] reusable_config_values + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues] + # Required. A user-specified inline {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues ReusableConfigValues}. + # + # Note: The following fields are mutually exclusive: `reusable_config_values`, `reusable_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ReusableConfigWrapper + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a subordinate CA's issuers. This is either a resource path to a + # known issuing {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, or a PEM issuer certificate chain. + # @!attribute [rw] certificate_authority + # @return [::String] + # Required. This can refer to a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the same project that + # was used to create a subordinate {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. This field + # is used for information and usability purposes only. The resource name + # is in the format `projects/*/locations/*/certificateAuthorities/*`. + # + # Note: The following fields are mutually exclusive: `certificate_authority`, `pem_issuer_chain`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pem_issuer_chain + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig::SubordinateConfigChain] + # Required. Contains the PEM certificate chain for the issuers of this + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, but not pem certificate for this CA itself. + # + # Note: The following fields are mutually exclusive: `pem_issuer_chain`, `certificate_authority`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SubordinateConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This message describes a subordinate CA's issuer certificate chain. This + # wrapper exists for compatibility reasons. + # @!attribute [rw] pem_certificates + # @return [::Array<::String>] + # Required. Expected to be in leaf-to-root order according to RFC 5246. + class SubordinateConfigChain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey PublicKey} describes a public key. + # @!attribute [rw] type + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey::KeyType] + # Required. The type of public key. + # @!attribute [rw] key + # @return [::String] + # Required. A public key. Padding and encoding varies by 'KeyType' and is described + # along with the KeyType values. + class PublicKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of public keys that are supported. + # At a minimum, we support RSA and ECDSA, for the key sizes or curves listed: + # https://cloud.google.com/kms/docs/algorithms#asymmetric_signing_algorithms + module KeyType + # Default unspecified value. + KEY_TYPE_UNSPECIFIED = 0 + + # A PEM-encoded PKCS#1/RFC 3447 RSAPrivateKey structure. + PEM_RSA_KEY = 1 + + # A PEM-encoded compressed NIST P-256/secp256r1/prime256v1 or P-384 key. + PEM_EC_KEY = 2 + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateConfig CertificateConfig} describes an X.509 certificate or CSR that is to be + # created, as an alternative to using ASN.1. + # @!attribute [rw] subject_config + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateConfig::SubjectConfig] + # Required. Specifies some of the values in a certificate that are related to the + # subject. + # @!attribute [rw] reusable_config + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper] + # Required. Describes how some of the technical fields in a certificate should be + # populated. + # @!attribute [rw] public_key + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey] + # Optional. The public key that corresponds to this config. This is, for example, used + # when issuing {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}, but not when creating a + # self-signed {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} or {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} CSR. + class CertificateConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # These values are used to create the distinguished name and subject + # alternative name fields in an X.509 certificate. + # @!attribute [rw] subject + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Subject] + # Required. Contains distinguished name fields such as the location and organization. + # @!attribute [rw] common_name + # @return [::String] + # Optional. The "common name" of the distinguished name. + # @!attribute [rw] subject_alt_name + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::SubjectAltNames] + # Optional. The subject alternative name fields. + class SubjectConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription CertificateDescription} describes an X.509 certificate or CSR that has + # been issued, as an alternative to using ASN.1 / X.509. + # @!attribute [rw] subject_description + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription::SubjectDescription] + # Describes some of the values in a certificate that are related to the + # subject and lifetime. + # @!attribute [rw] config_values + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues] + # Describes some of the technical fields in a certificate. + # @!attribute [rw] public_key + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey] + # The public key that corresponds to an issued certificate. + # @!attribute [rw] subject_key_id + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription::KeyId] + # Provides a means of identifiying certificates that contain a particular + # public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2. + # @!attribute [rw] authority_key_id + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription::KeyId] + # Identifies the subject_key_id of the parent certificate, per + # https://tools.ietf.org/html/rfc5280#section-4.2.1.1 + # @!attribute [rw] crl_distribution_points + # @return [::Array<::String>] + # Describes a list of locations to obtain CRL information, i.e. + # the DistributionPoint.fullName described by + # https://tools.ietf.org/html/rfc5280#section-4.2.1.13 + # @!attribute [rw] aia_issuing_certificate_urls + # @return [::Array<::String>] + # Describes lists of issuer CA certificate URLs that appear in the + # "Authority Information Access" extension in the certificate. + # @!attribute [rw] cert_fingerprint + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription::CertificateFingerprint] + # The hash of the x.509 certificate. + class CertificateDescription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # These values describe fields in an issued X.509 certificate such as the + # distinguished name, subject alternative names, serial number, and lifetime. + # @!attribute [rw] subject + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Subject] + # Contains distinguished name fields such as the location and organization. + # @!attribute [rw] common_name + # @return [::String] + # The "common name" of the distinguished name. + # @!attribute [rw] subject_alt_name + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::SubjectAltNames] + # The subject alternative name fields. + # @!attribute [rw] hex_serial_number + # @return [::String] + # The serial number encoded in lowercase hexadecimal. + # @!attribute [rw] lifetime + # @return [::Google::Protobuf::Duration] + # For convenience, the actual lifetime of an issued certificate. + # Corresponds to 'not_after_time' - 'not_before_time'. + # @!attribute [rw] not_before_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the certificate becomes valid. + # @!attribute [rw] not_after_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the certificate expires. + class SubjectDescription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A KeyId identifies a specific public key, usually by hashing the public + # key. + # @!attribute [rw] key_id + # @return [::String] + # Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most + # likely the 160 bit SHA-1 hash of the public key. + class KeyId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A group of fingerprints for the x509 certificate. + # @!attribute [rw] sha256_hash + # @return [::String] + # The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate. + class CertificateFingerprint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # An {::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId ObjectId} specifies an object identifier (OID). These provide context + # and describe types in ASN.1 messages. + # @!attribute [rw] object_id_path + # @return [::Array<::Integer>] + # Required. The parts of an OID path. The most significant parts of the path come + # first. + class ObjectId + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An {::Google::Cloud::Security::PrivateCA::V1beta1::X509Extension X509Extension} specifies an X.509 extension, which may be used in + # different parts of X.509 objects like certificates, CSRs, and CRLs. + # @!attribute [rw] object_id + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId] + # Required. The OID for this X.509 extension. + # @!attribute [rw] critical + # @return [::Boolean] + # Required. Indicates whether or not this extension is critical (i.e., if the client + # does not know how to handle this extension, the client should consider this + # to be an error). + # @!attribute [rw] value + # @return [::String] + # Required. The value of this X.509 extension. + class X509Extension + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A {::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage KeyUsage} describes key usage values that may appear in an X.509 + # certificate. + # @!attribute [rw] base_key_usage + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::KeyUsageOptions] + # Describes high-level ways in which a key may be used. + # @!attribute [rw] extended_key_usage + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions] + # Detailed scenarios in which a key may be used. + # @!attribute [rw] unknown_extended_key_usages + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId>] + # Used to describe extended key usages that are not listed in the + # {::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions KeyUsage.ExtendedKeyUsageOptions} message. + class KeyUsage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # {::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::KeyUsageOptions KeyUsage.KeyUsageOptions} corresponds to the key usage values + # described in https://tools.ietf.org/html/rfc5280#section-4.2.1.3. + # @!attribute [rw] digital_signature + # @return [::Boolean] + # The key may be used for digital signatures. + # @!attribute [rw] content_commitment + # @return [::Boolean] + # The key may be used for cryptographic commitments. Note that this may + # also be referred to as "non-repudiation". + # @!attribute [rw] key_encipherment + # @return [::Boolean] + # The key may be used to encipher other keys. + # @!attribute [rw] data_encipherment + # @return [::Boolean] + # The key may be used to encipher data. + # @!attribute [rw] key_agreement + # @return [::Boolean] + # The key may be used in a key agreement protocol. + # @!attribute [rw] cert_sign + # @return [::Boolean] + # The key may be used to sign certificates. + # @!attribute [rw] crl_sign + # @return [::Boolean] + # The key may be used sign certificate revocation lists. + # @!attribute [rw] encipher_only + # @return [::Boolean] + # The key may be used to encipher only. + # @!attribute [rw] decipher_only + # @return [::Boolean] + # The key may be used to decipher only. + class KeyUsageOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # {::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions KeyUsage.ExtendedKeyUsageOptions} has fields that correspond to + # certain common OIDs that could be specified as an extended key usage value. + # @!attribute [rw] server_auth + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW + # server authentication", though regularly used for non-WWW TLS. + # @!attribute [rw] client_auth + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW + # client authentication", though regularly used for non-WWW TLS. + # @!attribute [rw] code_signing + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of + # downloadable executable code client authentication". + # @!attribute [rw] email_protection + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email + # protection". + # @!attribute [rw] time_stamping + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding + # the hash of an object to a time". + # @!attribute [rw] ocsp_signing + # @return [::Boolean] + # Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing + # OCSP responses". + class ExtendedKeyUsageOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # {::Google::Cloud::Security::PrivateCA::V1beta1::Subject Subject} describes parts of a distinguished name that, in turn, + # describes the subject of the certificate. + # @!attribute [rw] country_code + # @return [::String] + # The country code of the subject. + # @!attribute [rw] organization + # @return [::String] + # The organization of the subject. + # @!attribute [rw] organizational_unit + # @return [::String] + # The organizational_unit of the subject. + # @!attribute [rw] locality + # @return [::String] + # The locality or city of the subject. + # @!attribute [rw] province + # @return [::String] + # The province, territory, or regional state of the subject. + # @!attribute [rw] street_address + # @return [::String] + # The street address of the subject. + # @!attribute [rw] postal_code + # @return [::String] + # The postal code of the subject. + class Subject + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # {::Google::Cloud::Security::PrivateCA::V1beta1::SubjectAltNames SubjectAltNames} corresponds to a more modern way of listing what + # the asserted identity is in a certificate (i.e., compared to the "common + # name" in the distinguished name). + # @!attribute [rw] dns_names + # @return [::Array<::String>] + # Contains only valid, fully-qualified host names. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Contains only valid RFC 3986 URIs. + # @!attribute [rw] email_addresses + # @return [::Array<::String>] + # Contains only valid RFC 2822 E-mail addresses. + # @!attribute [rw] ip_addresses + # @return [::Array<::String>] + # Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses. + # @!attribute [rw] custom_sans + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::X509Extension>] + # Contains additional subject alternative name values. + class SubjectAltNames + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A {::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason RevocationReason} indicates whether a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} has been revoked, + # and the reason for revocation. These correspond to standard revocation + # reasons from RFC 5280. Note that the enum labels and values in this + # definition are not the same ASN.1 values defined in RFC 5280. These values + # will be translated to the correct ASN.1 values when a CRL is created. + module RevocationReason + # Default unspecified value. This value does indicate that a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} + # has been revoked, but that a reason has not been recorded. + REVOCATION_REASON_UNSPECIFIED = 0 + + # Key material for this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} may have leaked. + KEY_COMPROMISE = 1 + + # The key material for a certificate authority in the issuing path may have + # leaked. + CERTIFICATE_AUTHORITY_COMPROMISE = 2 + + # The subject or other attributes in this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} have changed. + AFFILIATION_CHANGED = 3 + + # This {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} has been superseded. + SUPERSEDED = 4 + + # This {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} or entities in the issuing path have ceased to + # operate. + CESSATION_OF_OPERATION = 5 + + # This {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} should not be considered valid, it is expected that it + # may become valid in the future. + CERTIFICATE_HOLD = 6 + + # This {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} no longer has permission to assert the listed + # attributes. + PRIVILEGE_WITHDRAWN = 7 + + # The authority which determines appropriate attributes for a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} + # may have been compromised. + ATTRIBUTE_AUTHORITY_COMPROMISE = 8 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.rb new file mode 100644 index 000000000000..6a9041ea2415 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.rb @@ -0,0 +1,633 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1beta1 + # Request message for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate CertificateAuthorityService.CreateCertificate}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location and {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} + # associated with the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}, in the format + # `projects/*/locations/*/certificateAuthorities/*`. + # @!attribute [rw] certificate_id + # @return [::String] + # Optional. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the Enterprise {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Tier CertificateAuthority.Tier}, + # but is optional and its value is ignored otherwise. + # @!attribute [rw] certificate + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with initial field values. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate CertificateAuthorityService.GetCertificate}. + # @!attribute [rw] name + # @return [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} to get. + class GetCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificates CertificateAuthorityService.ListCertificates}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}, in the format + # `projects/*/locations/*/certificateauthorities/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} to include in the + # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} can subsequently be obtained + # by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} in a subsequent + # request. If unspecified, the server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. + # @!attribute [rw] filter + # @return [::String] + # Optional. Only include resources that match the filter in the response. For details + # on supported filters and syntax, see [Certificates Filtering + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specify how the results should be sorted. For details on supported fields + # and syntax, see [Certificates Sorting + # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + class ListCertificatesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificates CertificateAuthorityService.ListCertificates}. + # @!attribute [rw] certificates + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::Certificate>] + # The list of {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. Pass this value in + # [ListCertificatesRequest.next_page_token][] to retrieve the + # next page of results. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations (e.g. "us-west1") that could not be reached. + class ListCertificatesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#revoke_certificate CertificateAuthorityService.RevokeCertificate}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in the + # format `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + # @!attribute [rw] reason + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason RevocationReason} for revoking this certificate. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class RevokeCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate CertificateAuthorityService.UpdateCertificate}. + # @!attribute [rw] certificate + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] + # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with updated values. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A list of fields to be updated in this request. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#activate_certificate_authority CertificateAuthorityService.ActivateCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @!attribute [rw] pem_ca_certificate + # @return [::String] + # Required. The signed CA certificate issued from + # {::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. + # @!attribute [rw] subordinate_config + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig] + # Required. Must include information about the issuer of 'pem_ca_certificate', and any + # further issuers until the self-signed CA. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class ActivateCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate_authority CertificateAuthorityService.CreateCertificateAuthority}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format + # `projects/*/locations/*`. + # @!attribute [rw] certificate_authority_id + # @return [::String] + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]{1,63}` + # @!attribute [rw] certificate_authority + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] + # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with initial field values. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#disable_certificate_authority CertificateAuthorityService.DisableCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DisableCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#enable_certificate_authority CertificateAuthorityService.EnableCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class EnableCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr CertificateAuthorityService.FetchCertificateAuthorityCsr}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + class FetchCertificateAuthorityCsrRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr CertificateAuthorityService.FetchCertificateAuthorityCsr}. + # @!attribute [r] pem_csr + # @return [::String] + # Output only. The PEM-encoded signed certificate signing request (CSR). + class FetchCertificateAuthorityCsrResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_authority CertificateAuthorityService.GetCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} to + # get. + class GetCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_authorities CertificateAuthorityService.ListCertificateAuthorities}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format + # `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Limit on the number of {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} to + # include in the response. + # Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} can subsequently be + # obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} in a subsequent + # request. If unspecified, the server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. + # @!attribute [rw] filter + # @return [::String] + # Optional. Only include resources that match the filter in the response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specify how the results should be sorted. + class ListCertificateAuthoritiesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_authorities CertificateAuthorityService.ListCertificateAuthorities}. + # @!attribute [rw] certificate_authorities + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority>] + # The list of {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. Pass this value in + # [ListCertificateAuthoritiesRequest.next_page_token][] to retrieve the next + # page of results. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations (e.g. "us-west1") that could not be reached. + class ListCertificateAuthoritiesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#restore_certificate_authority CertificateAuthorityService.RestoreCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class RestoreCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#schedule_delete_certificate_authority CertificateAuthorityService.ScheduleDeleteCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the + # format `projects/*/locations/*/certificateAuthorities/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class ScheduleDeleteCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_authority CertificateAuthorityService.UpdateCertificateAuthority}. + # @!attribute [rw] certificate_authority + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] + # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with updated values. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A list of fields to be updated in this request. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_revocation_list CertificateAuthorityService.GetCertificateRevocationList}. + # @!attribute [rw] name + # @return [::String] + # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList#name name} of the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} to get. + class GetCertificateRevocationListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_revocation_lists CertificateAuthorityService.ListCertificateRevocationLists}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}, in the format + # `projects/*/locations/*/certificateauthorities/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} to include in the + # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} + # can subsequently be obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} in a subsequent + # request. If unspecified, the server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. + # @!attribute [rw] filter + # @return [::String] + # Optional. Only include resources that match the filter in the response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specify how the results should be sorted. + class ListCertificateRevocationListsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_revocation_lists CertificateAuthorityService.ListCertificateRevocationLists}. + # @!attribute [rw] certificate_revocation_lists + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList>] + # The list of {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. Pass this value in + # [ListCertificateRevocationListsRequest.next_page_token][] to retrieve the + # next page of results. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations (e.g. "us-west1") that could not be reached. + class ListCertificateRevocationListsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_revocation_list CertificateAuthorityService.UpdateCertificateRevocationList}. + # @!attribute [rw] certificate_revocation_list + # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] + # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} with updated values. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A list of fields to be updated in this request. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An ID to identify requests. Specify a unique request ID so that if you must + # retry your request, the server will know to ignore the request if it has + # already been completed. The server will guarantee that for at least 60 + # minutes since the first request. + # + # For example, consider a situation where you make an initial request and t + # he request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateCertificateRevocationListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_reusable_config CertificateAuthorityService.GetReusableConfig}. + # @!attribute [rw] name + # @return [::String] + # Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. + class GetReusableConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_reusable_configs CertificateAuthorityService.ListReusableConfigs}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the location associated with the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}, in the format + # `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Limit on the number of + # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} to include in the response. + # Further {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} can subsequently be + # obtained by including the + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token} in a subsequent request. If + # unspecified, the server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Pagination token, returned earlier via + # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token}. + # @!attribute [rw] filter + # @return [::String] + # Optional. Only include resources that match the filter in the response. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specify how the results should be sorted. + class ListReusableConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_reusable_configs CertificateAuthorityService.ListReusableConfigs}. + # @!attribute [rw] reusable_configs + # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig>] + # The list of {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve next page of results. Pass this value in + # [ListReusableConfigsRequest.next_page_token][] to retrieve + # the next page of results. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations (e.g. "us-west1") that could not be reached. + class ListReusableConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have [Operation.error][] value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..adf37d01f04f --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-security-private_ca-v1beta1", path: "../" +else + gem "google-cloud-security-private_ca-v1beta1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.rb new file mode 100644 index 000000000000..ab8a12841445 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the activate_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#activate_certificate_authority. +# +def activate_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new + + # Call the activate_certificate_authority method. + result = client.activate_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.rb new file mode 100644 index 000000000000..f6c5d439434c --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the create_certificate call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate. +# +def create_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new + + # Call the create_certificate method. + result = client.create_certificate request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + p result +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.rb new file mode 100644 index 000000000000..b2fe7f84db0b --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the create_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate_authority. +# +def create_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new + + # Call the create_certificate_authority method. + result = client.create_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.rb new file mode 100644 index 000000000000..6613651f079c --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the disable_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#disable_certificate_authority. +# +def disable_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new + + # Call the disable_certificate_authority method. + result = client.disable_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.rb new file mode 100644 index 000000000000..156ab4130e0f --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the enable_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#enable_certificate_authority. +# +def enable_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new + + # Call the enable_certificate_authority method. + result = client.enable_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb new file mode 100644 index 000000000000..bce7583a24ab --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the fetch_certificate_authority_csr call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr. +# +def fetch_certificate_authority_csr + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new + + # Call the fetch_certificate_authority_csr method. + result = client.fetch_certificate_authority_csr request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse. + p result +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.rb new file mode 100644 index 000000000000..962f824a4495 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the get_certificate call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate. +# +def get_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new + + # Call the get_certificate method. + result = client.get_certificate request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + p result +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.rb new file mode 100644 index 000000000000..b9a58c2a9ff6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the get_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_authority. +# +def get_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new + + # Call the get_certificate_authority method. + result = client.get_certificate_authority request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. + p result +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.rb new file mode 100644 index 000000000000..a380979a1c64 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the get_certificate_revocation_list call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_revocation_list. +# +def get_certificate_revocation_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new + + # Call the get_certificate_revocation_list method. + result = client.get_certificate_revocation_list request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. + p result +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.rb new file mode 100644 index 000000000000..6a7a96769e22 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the get_reusable_config call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_reusable_config. +# +def get_reusable_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new + + # Call the get_reusable_config method. + result = client.get_reusable_config request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. + p result +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.rb new file mode 100644 index 000000000000..fdb7607043c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the list_certificate_authorities call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_authorities. +# +def list_certificate_authorities + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new + + # Call the list_certificate_authorities method. + result = client.list_certificate_authorities request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. + p item + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb new file mode 100644 index 000000000000..158024198454 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the list_certificate_revocation_lists call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_revocation_lists. +# +def list_certificate_revocation_lists + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new + + # Call the list_certificate_revocation_lists method. + result = client.list_certificate_revocation_lists request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. + p item + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.rb new file mode 100644 index 000000000000..2b396f505408 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the list_certificates call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificates. +# +def list_certificates + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new + + # Call the list_certificates method. + result = client.list_certificates request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + p item + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.rb new file mode 100644 index 000000000000..d437b3c44dc1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the list_reusable_configs call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_reusable_configs. +# +def list_reusable_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new + + # Call the list_reusable_configs method. + result = client.list_reusable_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. + p item + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.rb new file mode 100644 index 000000000000..e19de799588b --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the restore_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#restore_certificate_authority. +# +def restore_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new + + # Call the restore_certificate_authority method. + result = client.restore_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.rb new file mode 100644 index 000000000000..08d0bd7161b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the revoke_certificate call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#revoke_certificate. +# +def revoke_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new + + # Call the revoke_certificate method. + result = client.revoke_certificate request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + p result +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.rb new file mode 100644 index 000000000000..2b22da6654c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the schedule_delete_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#schedule_delete_certificate_authority. +# +def schedule_delete_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new + + # Call the schedule_delete_certificate_authority method. + result = client.schedule_delete_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.rb new file mode 100644 index 000000000000..eb82a46e2dc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the update_certificate call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate. +# +def update_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new + + # Call the update_certificate method. + result = client.update_certificate request + + # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. + p result +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.rb new file mode 100644 index 000000000000..62a552d0ae19 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the update_certificate_authority call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_authority. +# +def update_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new + + # Call the update_certificate_authority method. + result = client.update_certificate_authority request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.rb new file mode 100644 index 000000000000..2755200a457d --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] +require "google/cloud/security/private_ca/v1beta1" + +## +# Snippet for the update_certificate_revocation_list call in the CertificateAuthorityService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_revocation_list. +# +def update_certificate_revocation_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new + + # Call the update_certificate_revocation_list method. + result = client.update_certificate_revocation_list request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/snippet_metadata_google.cloud.security.privateca.v1beta1.json b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/snippet_metadata_google.cloud.security.privateca.v1beta1.json new file mode 100644 index 000000000000..78cd94bd4302 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/snippet_metadata_google.cloud.security.privateca.v1beta1.json @@ -0,0 +1,815 @@ +{ + "client_library": { + "name": "google-cloud-security-private_ca-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.security.privateca.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_sync", + "title": "Snippet for the create_certificate call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate.", + "file": "certificate_authority_service/create_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_certificate", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::Certificate", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "CreateCertificate", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_sync", + "title": "Snippet for the get_certificate call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate.", + "file": "certificate_authority_service/get_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::Certificate", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "GetCertificate", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_sync", + "title": "Snippet for the list_certificates call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificates.", + "file": "certificate_authority_service/list_certificates.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_certificates", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificates", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ListCertificates", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_sync", + "title": "Snippet for the revoke_certificate call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#revoke_certificate.", + "file": "certificate_authority_service/revoke_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "revoke_certificate", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#revoke_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::Certificate", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "RevokeCertificate", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_sync", + "title": "Snippet for the update_certificate call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate.", + "file": "certificate_authority_service/update_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_certificate", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::Certificate", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "UpdateCertificate", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync", + "title": "Snippet for the activate_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#activate_certificate_authority.", + "file": "certificate_authority_service/activate_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "activate_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#activate_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ActivateCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync", + "title": "Snippet for the create_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate_authority.", + "file": "certificate_authority_service/create_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "CreateCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync", + "title": "Snippet for the disable_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#disable_certificate_authority.", + "file": "certificate_authority_service/disable_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#disable_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "DisableCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync", + "title": "Snippet for the enable_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#enable_certificate_authority.", + "file": "certificate_authority_service/enable_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#enable_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "EnableCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync", + "title": "Snippet for the fetch_certificate_authority_csr call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr.", + "file": "certificate_authority_service/fetch_certificate_authority_csr.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_certificate_authority_csr", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "FetchCertificateAuthorityCsr", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_sync", + "title": "Snippet for the get_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_authority.", + "file": "certificate_authority_service/get_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "GetCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync", + "title": "Snippet for the list_certificate_authorities call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_authorities.", + "file": "certificate_authority_service/list_certificate_authorities.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_certificate_authorities", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_authorities", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ListCertificateAuthorities", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_sync", + "title": "Snippet for the restore_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#restore_certificate_authority.", + "file": "certificate_authority_service/restore_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "restore_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#restore_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "RestoreCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_sync", + "title": "Snippet for the schedule_delete_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#schedule_delete_certificate_authority.", + "file": "certificate_authority_service/schedule_delete_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "schedule_delete_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#schedule_delete_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ScheduleDeleteCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync", + "title": "Snippet for the update_certificate_authority call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_authority.", + "file": "certificate_authority_service/update_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_certificate_authority", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "UpdateCertificateAuthority", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync", + "title": "Snippet for the get_certificate_revocation_list call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_revocation_list.", + "file": "certificate_authority_service/get_certificate_revocation_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate_revocation_list", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_revocation_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "GetCertificateRevocationList", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync", + "title": "Snippet for the list_certificate_revocation_lists call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_revocation_lists.", + "file": "certificate_authority_service/list_certificate_revocation_lists.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_certificate_revocation_lists", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_revocation_lists", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ListCertificateRevocationLists", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync", + "title": "Snippet for the update_certificate_revocation_list call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_revocation_list.", + "file": "certificate_authority_service/update_certificate_revocation_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_certificate_revocation_list", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_revocation_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "UpdateCertificateRevocationList", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_sync", + "title": "Snippet for the get_reusable_config call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_reusable_config.", + "file": "certificate_authority_service/get_reusable_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_reusable_config", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_reusable_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "GetReusableConfig", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_sync", + "title": "Snippet for the list_reusable_configs call in the CertificateAuthorityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_reusable_configs.", + "file": "certificate_authority_service/list_reusable_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_reusable_configs", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_reusable_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse", + "client": { + "short_name": "CertificateAuthorityService::Client", + "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" + }, + "method": { + "short_name": "ListReusableConfigs", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs", + "service": { + "short_name": "CertificateAuthorityService", + "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_test.rb new file mode 100644 index 000000000000..6654ab235241 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/security/privateca/v1beta1/service_pb" +require "google/cloud/security/privateca/v1beta1/service_services_pb" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service" + +class ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_test.rb new file mode 100644 index 000000000000..7c0d1c542ef3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_test.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service" + +class ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_certificate_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_path project: "value0", location: "value1", certificate_authority: "value2", certificate: "value3" + assert_equal "projects/value0/locations/value1/certificateAuthorities/value2/certificates/value3", path + end + end + + def test_certificate_authority_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_authority_path project: "value0", location: "value1", certificate_authority: "value2" + assert_equal "projects/value0/locations/value1/certificateAuthorities/value2", path + end + end + + def test_certificate_revocation_list_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_revocation_list_path project: "value0", location: "value1", certificate_authority: "value2", certificate_revocation_list: "value3" + assert_equal "projects/value0/locations/value1/certificateAuthorities/value2/certificateRevocationLists/value3", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_reusable_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reusable_config_path project: "value0", location: "value1", reusable_config: "value2" + assert_equal "projects/value0/locations/value1/reusableConfigs/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_test.rb new file mode 100644 index 000000000000..b0a4a632973e --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_test.rb @@ -0,0 +1,1216 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/security/privateca/v1beta1/service_pb" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest" + + +class ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_certificate + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate_id = "hello world" + certificate = {} + request_id = "hello world" + + create_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_certificate parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_certificate_client_stub.call_count + end + end + end + + def test_get_certificate + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_certificate({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_certificate name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_certificate({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_client_stub.call_count + end + end + end + + def test_list_certificates + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificates_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_certificates_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_certificates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_certificates ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_certificates(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_certificates_client_stub.call_count + end + end + end + + def test_revoke_certificate + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + reason = :REVOCATION_REASON_UNSPECIFIED + request_id = "hello world" + + revoke_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_revoke_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, revoke_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.revoke_certificate({ name: name, reason: reason, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.revoke_certificate name: name, reason: reason, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.revoke_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.revoke_certificate({ name: name, reason: reason, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.revoke_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, revoke_certificate_client_stub.call_count + end + end + end + + def test_update_certificate + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + certificate = {} + update_mask = {} + request_id = "hello world" + + update_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_certificate certificate: certificate, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_certificate_client_stub.call_count + end + end + end + + def test_activate_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + pem_ca_certificate = "hello world" + subordinate_config = {} + request_id = "hello world" + + activate_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_activate_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, activate_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.activate_certificate_authority name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.activate_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.activate_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, activate_certificate_authority_client_stub.call_count + end + end + end + + def test_create_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate_authority_id = "hello world" + certificate_authority = {} + request_id = "hello world" + + create_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_certificate_authority parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_certificate_authority_client_stub.call_count + end + end + end + + def test_disable_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + disable_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_disable_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.disable_certificate_authority({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.disable_certificate_authority name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.disable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.disable_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.disable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_certificate_authority_client_stub.call_count + end + end + end + + def test_enable_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + enable_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_enable_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.enable_certificate_authority({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.enable_certificate_authority name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.enable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.enable_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.enable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_certificate_authority_client_stub.call_count + end + end + end + + def test_fetch_certificate_authority_csr + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + fetch_certificate_authority_csr_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_fetch_certificate_authority_csr_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_certificate_authority_csr_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.fetch_certificate_authority_csr({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.fetch_certificate_authority_csr name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.fetch_certificate_authority_csr ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.fetch_certificate_authority_csr({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.fetch_certificate_authority_csr(::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_certificate_authority_csr_client_stub.call_count + end + end + end + + def test_get_certificate_authority + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_certificate_authority({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_certificate_authority name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_certificate_authority({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_authority_client_stub.call_count + end + end + end + + def test_list_certificate_authorities + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificate_authorities_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificate_authorities_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_certificate_authorities_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_certificate_authorities parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_certificate_authorities ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_certificate_authorities(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_certificate_authorities_client_stub.call_count + end + end + end + + def test_restore_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + restore_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_restore_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restore_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.restore_certificate_authority({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.restore_certificate_authority name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.restore_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.restore_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.restore_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restore_certificate_authority_client_stub.call_count + end + end + end + + def test_schedule_delete_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + schedule_delete_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_schedule_delete_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, schedule_delete_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.schedule_delete_certificate_authority({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.schedule_delete_certificate_authority name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.schedule_delete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.schedule_delete_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.schedule_delete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, schedule_delete_certificate_authority_client_stub.call_count + end + end + end + + def test_update_certificate_authority + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + certificate_authority = {} + update_mask = {} + request_id = "hello world" + + update_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_certificate_authority certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_certificate_authority_client_stub.call_count + end + end + end + + def test_get_certificate_revocation_list + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_revocation_list_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_revocation_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_revocation_list_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_certificate_revocation_list({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_certificate_revocation_list name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_certificate_revocation_list({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_revocation_list_client_stub.call_count + end + end + end + + def test_list_certificate_revocation_lists + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificate_revocation_lists_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificate_revocation_lists_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_certificate_revocation_lists_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_certificate_revocation_lists parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_certificate_revocation_lists ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_certificate_revocation_lists(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_certificate_revocation_lists_client_stub.call_count + end + end + end + + def test_update_certificate_revocation_list + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + certificate_revocation_list = {} + update_mask = {} + request_id = "hello world" + + update_certificate_revocation_list_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_revocation_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_certificate_revocation_list_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_certificate_revocation_list certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_certificate_revocation_list_client_stub.call_count + end + end + end + + def test_get_reusable_config + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_reusable_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_reusable_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_reusable_config_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_reusable_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_reusable_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_reusable_config ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_reusable_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_reusable_config(::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_reusable_config_client_stub.call_count + end + end + end + + def test_list_reusable_configs + # Create test objects. + client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_reusable_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_reusable_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_reusable_configs_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_reusable_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_reusable_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_reusable_configs ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_reusable_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_reusable_configs(::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_reusable_configs_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_test.rb new file mode 100644 index 000000000000..e36ce9642f13 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_test.rb @@ -0,0 +1,1412 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/security/privateca/v1beta1/service_pb" +require "google/cloud/security/private_ca/v1beta1/certificate_authority_service" + +class ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate_id = "hello world" + certificate = {} + request_id = "hello world" + + create_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_certificate, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["certificate_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate), request["certificate"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_certificate parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_certificate_client_stub.call_rpc_count + end + end + + def test_get_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_certificate, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_certificate({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_certificate name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_certificate({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_certificate_client_stub.call_rpc_count + end + end + + def test_list_certificates + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_certificates, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_certificates_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_certificates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_certificates ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_certificates(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_certificates_client_stub.call_rpc_count + end + end + + def test_revoke_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + reason = :REVOCATION_REASON_UNSPECIFIED + request_id = "hello world" + + revoke_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :revoke_certificate, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest, request + assert_equal "hello world", request["name"] + assert_equal :REVOCATION_REASON_UNSPECIFIED, request["reason"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, revoke_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.revoke_certificate({ name: name, reason: reason, request_id: request_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.revoke_certificate name: name, reason: reason, request_id: request_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.revoke_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.revoke_certificate({ name: name, reason: reason, request_id: request_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.revoke_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, revoke_certificate_client_stub.call_rpc_count + end + end + + def test_update_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + certificate = {} + update_mask = {} + request_id = "hello world" + + update_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_certificate, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate), request["certificate"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_certificate_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_certificate certificate: certificate, update_mask: update_mask, request_id: request_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_certificate_client_stub.call_rpc_count + end + end + + def test_activate_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + pem_ca_certificate = "hello world" + subordinate_config = {} + request_id = "hello world" + + activate_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :activate_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["pem_ca_certificate"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig), request["subordinate_config"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, activate_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.activate_certificate_authority name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.activate_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.activate_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, activate_certificate_authority_client_stub.call_rpc_count + end + end + + def test_create_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + certificate_authority_id = "hello world" + certificate_authority = {} + request_id = "hello world" + + create_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["certificate_authority_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority), request["certificate_authority"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_certificate_authority parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_certificate_authority_client_stub.call_rpc_count + end + end + + def test_disable_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + disable_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.disable_certificate_authority({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.disable_certificate_authority name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.disable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.disable_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.disable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, disable_certificate_authority_client_stub.call_rpc_count + end + end + + def test_enable_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + enable_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.enable_certificate_authority({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.enable_certificate_authority name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.enable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.enable_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.enable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enable_certificate_authority_client_stub.call_rpc_count + end + end + + def test_fetch_certificate_authority_csr + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + fetch_certificate_authority_csr_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_certificate_authority_csr, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_certificate_authority_csr_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_certificate_authority_csr({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.fetch_certificate_authority_csr name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.fetch_certificate_authority_csr ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.fetch_certificate_authority_csr({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.fetch_certificate_authority_csr(::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_certificate_authority_csr_client_stub.call_rpc_count + end + end + + def test_get_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_certificate_authority({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_certificate_authority name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_certificate_authority({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_certificate_authority_client_stub.call_rpc_count + end + end + + def test_list_certificate_authorities + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificate_authorities_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_certificate_authorities, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_certificate_authorities_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_certificate_authorities parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_certificate_authorities ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_certificate_authorities(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_certificate_authorities_client_stub.call_rpc_count + end + end + + def test_restore_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + restore_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restore_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, restore_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.restore_certificate_authority({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.restore_certificate_authority name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.restore_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.restore_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.restore_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, restore_certificate_authority_client_stub.call_rpc_count + end + end + + def test_schedule_delete_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + schedule_delete_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :schedule_delete_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, schedule_delete_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.schedule_delete_certificate_authority({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.schedule_delete_certificate_authority name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.schedule_delete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.schedule_delete_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.schedule_delete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, schedule_delete_certificate_authority_client_stub.call_rpc_count + end + end + + def test_update_certificate_authority + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + certificate_authority = {} + update_mask = {} + request_id = "hello world" + + update_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_certificate_authority, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority), request["certificate_authority"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_certificate_authority_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_certificate_authority certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_certificate_authority_client_stub.call_rpc_count + end + end + + def test_get_certificate_revocation_list + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_revocation_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_certificate_revocation_list, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_certificate_revocation_list_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_certificate_revocation_list({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_certificate_revocation_list name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_certificate_revocation_list({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_certificate_revocation_list_client_stub.call_rpc_count + end + end + + def test_list_certificate_revocation_lists + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_certificate_revocation_lists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_certificate_revocation_lists, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_certificate_revocation_lists_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_certificate_revocation_lists parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_certificate_revocation_lists ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_certificate_revocation_lists(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_certificate_revocation_lists_client_stub.call_rpc_count + end + end + + def test_update_certificate_revocation_list + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + certificate_revocation_list = {} + update_mask = {} + request_id = "hello world" + + update_certificate_revocation_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_certificate_revocation_list, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList), request["certificate_revocation_list"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_certificate_revocation_list_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_certificate_revocation_list certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_certificate_revocation_list_client_stub.call_rpc_count + end + end + + def test_get_reusable_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_reusable_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_reusable_config, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_reusable_config_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_reusable_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_reusable_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_reusable_config ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_reusable_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_reusable_config(::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_reusable_config_client_stub.call_rpc_count + end + end + + def test_list_reusable_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_reusable_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_reusable_configs, name + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_reusable_configs_client_stub do + # Create client + c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_reusable_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_reusable_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_reusable_configs ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_reusable_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_reusable_configs(::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_reusable_configs_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/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-v1/.gitignore b/owl-bot-staging/google-cloud-security_center-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/.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-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json new file mode 100644 index 000000000000..1db7926905f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/.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-v1/latest", + "distribution_name": "google-cloud-security_center-v1", + "is_cloud": true, + "language": "ruby", + "name": "securitycenter", + "name_pretty": "Cloud Security Command Center V1 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. Note that google-cloud-security_center-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details.", + "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-v1/.rubocop.yml b/owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml new file mode 100644 index 000000000000..cd91eea56b45 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security_center-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-security_center-v1.rb" diff --git a/owl-bot-staging/google-cloud-security_center-v1/.toys.rb b/owl-bot-staging/google-cloud-security_center-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/.yardopts b/owl-bot-staging/google-cloud-security_center-v1/.yardopts new file mode 100644 index 000000000000..1a401945abab --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Security Command Center V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..ba9af184f351 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security_center-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-security_center-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/security_center/v1" + +client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/security_center/v1" + +::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-security_center-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/security_center/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security_center-v1/Gemfile b/owl-bot-staging/google-cloud-security_center-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-v1/LICENSE.md b/owl-bot-staging/google-cloud-security_center-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-security_center-v1/README.md b/owl-bot-staging/google-cloud-security_center-v1/README.md new file mode 100644 index 000000000000..cfc90100104f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Security Command Center V1 API + +Security Command Center API provides access to temporal views of assets and findings within an organization. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Security Command Center V1 API. Most users should consider using +the main client gem, +[google-cloud-security_center](https://rubygems.org/gems/google-cloud-security_center). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-security_center-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/securitycenter.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/security_center/v1" + +client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new +request = ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new # (request fields as keyword arguments...) +response = client.bulk_mute_findings request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/security-command-center) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/security_center/v1" +require "logger" + +client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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-v1/Rakefile b/owl-bot-staging/google-cloud-security_center-v1/Rakefile new file mode 100644 index 000000000000..11860dec5013 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-security_center-v1 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/v1/security_center/credentials" + ::Google::Cloud::SecurityCenter::V1::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-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security_center-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security_center-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-security_center-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security_center-v1" + header "google-cloud-security_center-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security_center-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security_center-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-security_center-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-security_center-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json new file mode 100644 index 000000000000..2a9d62ebb4ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json @@ -0,0 +1,333 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.securitycenter.v1", + "libraryPackage": "::Google::Cloud::SecurityCenter::V1", + "services": { + "SecurityCenter": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client", + "rpcs": { + "BulkMuteFindings": { + "methods": [ + "bulk_mute_findings" + ] + }, + "CreateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "create_security_health_analytics_custom_module" + ] + }, + "CreateSource": { + "methods": [ + "create_source" + ] + }, + "CreateFinding": { + "methods": [ + "create_finding" + ] + }, + "CreateMuteConfig": { + "methods": [ + "create_mute_config" + ] + }, + "CreateNotificationConfig": { + "methods": [ + "create_notification_config" + ] + }, + "DeleteMuteConfig": { + "methods": [ + "delete_mute_config" + ] + }, + "DeleteNotificationConfig": { + "methods": [ + "delete_notification_config" + ] + }, + "DeleteSecurityHealthAnalyticsCustomModule": { + "methods": [ + "delete_security_health_analytics_custom_module" + ] + }, + "GetSimulation": { + "methods": [ + "get_simulation" + ] + }, + "GetValuedResource": { + "methods": [ + "get_valued_resource" + ] + }, + "GetBigQueryExport": { + "methods": [ + "get_big_query_export" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "GetMuteConfig": { + "methods": [ + "get_mute_config" + ] + }, + "GetNotificationConfig": { + "methods": [ + "get_notification_config" + ] + }, + "GetOrganizationSettings": { + "methods": [ + "get_organization_settings" + ] + }, + "GetEffectiveSecurityHealthAnalyticsCustomModule": { + "methods": [ + "get_effective_security_health_analytics_custom_module" + ] + }, + "GetSecurityHealthAnalyticsCustomModule": { + "methods": [ + "get_security_health_analytics_custom_module" + ] + }, + "GetSource": { + "methods": [ + "get_source" + ] + }, + "GroupAssets": { + "methods": [ + "group_assets" + ] + }, + "GroupFindings": { + "methods": [ + "group_findings" + ] + }, + "ListAssets": { + "methods": [ + "list_assets" + ] + }, + "ListDescendantSecurityHealthAnalyticsCustomModules": { + "methods": [ + "list_descendant_security_health_analytics_custom_modules" + ] + }, + "ListFindings": { + "methods": [ + "list_findings" + ] + }, + "ListMuteConfigs": { + "methods": [ + "list_mute_configs" + ] + }, + "ListNotificationConfigs": { + "methods": [ + "list_notification_configs" + ] + }, + "ListEffectiveSecurityHealthAnalyticsCustomModules": { + "methods": [ + "list_effective_security_health_analytics_custom_modules" + ] + }, + "ListSecurityHealthAnalyticsCustomModules": { + "methods": [ + "list_security_health_analytics_custom_modules" + ] + }, + "ListSources": { + "methods": [ + "list_sources" + ] + }, + "RunAssetDiscovery": { + "methods": [ + "run_asset_discovery" + ] + }, + "SetFindingState": { + "methods": [ + "set_finding_state" + ] + }, + "SetMute": { + "methods": [ + "set_mute" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "SimulateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "simulate_security_health_analytics_custom_module" + ] + }, + "UpdateExternalSystem": { + "methods": [ + "update_external_system" + ] + }, + "UpdateFinding": { + "methods": [ + "update_finding" + ] + }, + "UpdateMuteConfig": { + "methods": [ + "update_mute_config" + ] + }, + "UpdateNotificationConfig": { + "methods": [ + "update_notification_config" + ] + }, + "UpdateOrganizationSettings": { + "methods": [ + "update_organization_settings" + ] + }, + "UpdateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "update_security_health_analytics_custom_module" + ] + }, + "UpdateSource": { + "methods": [ + "update_source" + ] + }, + "UpdateSecurityMarks": { + "methods": [ + "update_security_marks" + ] + }, + "CreateBigQueryExport": { + "methods": [ + "create_big_query_export" + ] + }, + "DeleteBigQueryExport": { + "methods": [ + "delete_big_query_export" + ] + }, + "UpdateBigQueryExport": { + "methods": [ + "update_big_query_export" + ] + }, + "ListBigQueryExports": { + "methods": [ + "list_big_query_exports" + ] + }, + "CreateEventThreatDetectionCustomModule": { + "methods": [ + "create_event_threat_detection_custom_module" + ] + }, + "DeleteEventThreatDetectionCustomModule": { + "methods": [ + "delete_event_threat_detection_custom_module" + ] + }, + "GetEventThreatDetectionCustomModule": { + "methods": [ + "get_event_threat_detection_custom_module" + ] + }, + "ListDescendantEventThreatDetectionCustomModules": { + "methods": [ + "list_descendant_event_threat_detection_custom_modules" + ] + }, + "ListEventThreatDetectionCustomModules": { + "methods": [ + "list_event_threat_detection_custom_modules" + ] + }, + "UpdateEventThreatDetectionCustomModule": { + "methods": [ + "update_event_threat_detection_custom_module" + ] + }, + "ValidateEventThreatDetectionCustomModule": { + "methods": [ + "validate_event_threat_detection_custom_module" + ] + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "methods": [ + "get_effective_event_threat_detection_custom_module" + ] + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "methods": [ + "list_effective_event_threat_detection_custom_modules" + ] + }, + "BatchCreateResourceValueConfigs": { + "methods": [ + "batch_create_resource_value_configs" + ] + }, + "DeleteResourceValueConfig": { + "methods": [ + "delete_resource_value_config" + ] + }, + "GetResourceValueConfig": { + "methods": [ + "get_resource_value_config" + ] + }, + "ListResourceValueConfigs": { + "methods": [ + "list_resource_value_configs" + ] + }, + "UpdateResourceValueConfig": { + "methods": [ + "update_resource_value_config" + ] + }, + "ListValuedResources": { + "methods": [ + "list_valued_resources" + ] + }, + "ListAttackPaths": { + "methods": [ + "list_attack_paths" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec b/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec new file mode 100644 index 000000000000..2ea96cde071b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security_center/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security_center-v1" + gem.version = Google::Cloud::SecurityCenter::V1::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. Note that google-cloud-security_center-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details." + gem.summary = "Security Command Center API provides access to temporal views of assets and findings within an organization." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb new file mode 100644 index 000000000000..b1f8c90a70d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/security_center/v1" diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb new file mode 100644 index 000000000000..64e25fbd3ded --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center/v1/security_center" +require "google/cloud/security_center/v1/version" + +module Google + module Cloud + module SecurityCenter + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/security_center/v1" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/security_center/v1" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/security_center/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb new file mode 100644 index 000000000000..c11148195761 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center/v1/security_center/rest" +require "google/cloud/security_center/v1/version" + +module Google + module Cloud + module SecurityCenter + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/security_center/v1/rest" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb new file mode 100644 index 000000000000..20883d6fbc43 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security_center/v1/version" + +require "google/cloud/security_center/v1/security_center/credentials" +require "google/cloud/security_center/v1/security_center/paths" +require "google/cloud/security_center/v1/security_center/operations" +require "google/cloud/security_center/v1/security_center/client" +require "google/cloud/security_center/v1/security_center/rest" + +module Google + module Cloud + module SecurityCenter + module V1 + ## + # V1 APIs for Security Center service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/security_center/v1/security_center" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/security_center/v1/security_center/rest" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + module SecurityCenter + end + end + end + end +end + +helper_path = ::File.join __dir__, "security_center", "helpers.rb" +require "google/cloud/security_center/v1/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb new file mode 100644 index 000000000000..23fb68a1046e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb @@ -0,0 +1,7460 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securitycenter/v1/securitycenter_service_pb" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + ## + # Client for the SecurityCenter service. + # + # V1 APIs for Security Center service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :security_center_stub + + ## + # Configure the SecurityCenter Client class. + # + # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenter clients + # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecurityCenter", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.create_source.timeout = 60.0 + + default_config.rpcs.create_finding.timeout = 60.0 + + default_config.rpcs.create_notification_config.timeout = 60.0 + + default_config.rpcs.delete_notification_config.timeout = 60.0 + + default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_notification_config.timeout = 60.0 + default_config.rpcs.get_notification_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_organization_settings.timeout = 60.0 + default_config.rpcs.get_organization_settings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_source.timeout = 60.0 + default_config.rpcs.get_source.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_assets.timeout = 480.0 + default_config.rpcs.group_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_findings.timeout = 480.0 + default_config.rpcs.group_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_assets.timeout = 480.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_findings.timeout = 480.0 + default_config.rpcs.list_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_notification_configs.timeout = 60.0 + default_config.rpcs.list_notification_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_sources.timeout = 60.0 + default_config.rpcs.list_sources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.run_asset_discovery.timeout = 60.0 + + default_config.rpcs.set_finding_state.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_finding.timeout = 60.0 + + default_config.rpcs.update_notification_config.timeout = 60.0 + + default_config.rpcs.update_organization_settings.timeout = 60.0 + + default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.update_source.timeout = 60.0 + + default_config.rpcs.update_security_marks.timeout = 480.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @security_center_stub.universe_domain + end + + ## + # Create a new SecurityCenter client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecurityCenter client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/securitycenter/v1/securitycenter_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @security_center_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @security_center_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @security_center_stub.logger + end + + # Service calls + + ## + # Kicks off an LRO to bulk mute findings for a parent based on a filter. The + # parent can be either an organization, folder or project. The findings + # matched by the filter will be muted after the LRO is done. + # + # @overload bulk_mute_findings(request, options = nil) + # Pass arguments to `bulk_mute_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil, mute_state: nil) + # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, at which bulk action needs to be applied. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param filter [::String] + # Expression that identifies findings that should be updated. + # The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @param mute_annotation [::String] + # This can be a mute configuration name or any identifier for mute/unmute + # of findings based on the filter. + # @param mute_state [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] + # Optional. All findings matching the given filter will have their mute state + # set to this value. The default value is `MUTED`. Setting this to + # `UNDEFINED` will clear the mute state on all matching findings. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new + # + # # Call the bulk_mute_findings method. + # result = client.bulk_mute_findings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_mute_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.bulk_mute_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_mute_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :bulk_mute_findings, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the + # given CRM parent, and also creates inherited + # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given + # parent. These modules are enabled by default. + # + # @overload create_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil) + # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new custom module's parent. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. SecurityHealthAnalytics custom module to create. The provided + # name is ignored and reset with provided parent information and + # server-generated ID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the create_security_health_analytics_custom_module method. + # result = client.create_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def create_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a source. + # + # @overload create_source(request, options = nil) + # Pass arguments to `create_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_source(parent: nil, source: nil) + # Pass arguments to `create_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new source's parent. Its format should be + # `organizations/[organization_id]`. + # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] + # Required. The Source being created, only the display_name and description + # will be used. All other fields will be ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new + # + # # Call the create_source method. + # result = client.create_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def create_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a finding. The corresponding source must exist for finding creation + # to succeed. + # + # @overload create_finding(request, options = nil) + # Pass arguments to `create_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_finding(parent: nil, finding_id: nil, finding: nil) + # Pass arguments to `create_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new finding's parent. Its format should be + # `organizations/[organization_id]/sources/[source_id]`. + # @param finding_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be alphanumeric and less than or equal to 32 characters and + # greater than 0 characters in length. + # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] + # Required. The Finding being created. The name and security_marks will be + # ignored as they are both output only fields on this resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new + # + # # Call the create_finding method. + # result = client.create_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def create_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_finding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_finding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a mute config. + # + # @overload create_mute_config(request, options = nil) + # Pass arguments to `create_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) + # Pass arguments to `create_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new mute configs's parent. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] + # Required. The mute config being created. + # @param mute_config_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new + # + # # Call the create_mute_config method. + # result = client.create_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def create_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a notification config. + # + # @overload create_notification_config(request, options = nil) + # Pass arguments to `create_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) + # Pass arguments to `create_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new notification config's parent. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param config_id [::String] + # Required. + # Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters and contain alphanumeric + # characters, underscores, or hyphens only. + # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] + # Required. The notification config being created. The name and the service + # account will be ignored as they are both output only fields on this + # resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new + # + # # Call the create_notification_config method. + # result = client.create_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def create_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing mute config. + # + # @overload delete_mute_config(request, options = nil) + # Pass arguments to `delete_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_mute_config(name: nil) + # Pass arguments to `delete_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to delete. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new + # + # # Call the delete_mute_config method. + # result = client.delete_mute_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a notification config. + # + # @overload delete_notification_config(request, options = nil) + # Pass arguments to `delete_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_notification_config(name: nil) + # Pass arguments to `delete_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to delete. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new + # + # # Call the delete_notification_config method. + # result = client.delete_notification_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its + # descendants in the CRM hierarchy. This method is only supported for + # resident custom modules. + # + # @overload delete_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_security_health_analytics_custom_module(name: nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to delete. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the delete_security_health_analytics_custom_module method. + # result = client.delete_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the simulation by name or the latest simulation for the given + # organization. + # + # @overload get_simulation(request, options = nil) + # Pass arguments to `get_simulation` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSimulationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_simulation(name: nil) + # Pass arguments to `get_simulation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The organization name or simulation name of this simulation + # + # Valid format: + # `organizations/{organization}/simulations/latest` + # `organizations/{organization}/simulations/{simulation}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Simulation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Simulation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new + # + # # Call the get_simulation method. + # result = client.get_simulation request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. + # p result + # + def get_simulation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_simulation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_simulation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_simulation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the valued resource by name + # + # @overload get_valued_resource(request, options = nil) + # Pass arguments to `get_valued_resource` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_valued_resource(name: nil) + # Pass arguments to `get_valued_resource` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of this valued resource + # + # Valid format: + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new + # + # # Call the get_valued_resource method. + # result = client.get_valued_resource request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. + # p result + # + def get_valued_resource request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_valued_resource.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_valued_resource.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_valued_resource, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a BigQuery export. + # + # @overload get_big_query_export(request, options = nil) + # Pass arguments to `get_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_big_query_export(name: nil) + # Pass arguments to `get_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the BigQuery export to retrieve. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new + # + # # Call the get_big_query_export method. + # result = client.get_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def get_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy on the specified Source. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a mute config. + # + # @overload get_mute_config(request, options = nil) + # Pass arguments to `get_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_mute_config(name: nil) + # Pass arguments to `get_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to retrieve. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new + # + # # Call the get_mute_config method. + # result = client.get_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def get_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a notification config. + # + # @overload get_notification_config(request, options = nil) + # Pass arguments to `get_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_notification_config(name: nil) + # Pass arguments to `get_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to get. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new + # + # # Call the get_notification_config method. + # result = client.get_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def get_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the settings for an organization. + # + # @overload get_organization_settings(request, options = nil) + # Pass arguments to `get_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_organization_settings(name: nil) + # Pass arguments to `get_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the organization to get organization settings for. Its + # format is `organizations/[organization_id]/organizationSettings`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new + # + # # Call the get_organization_settings method. + # result = client.get_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + # p result + # + def get_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_organization_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. + # + # @overload get_effective_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_effective_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the effective custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_effective_security_health_analytics_custom_module method. + # result = client.get_effective_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p result + # + def get_effective_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_effective_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a SecurityHealthAnalyticsCustomModule. + # + # @overload get_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_security_health_analytics_custom_module method. + # result = client.get_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def get_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a source. + # + # @overload get_source(request, options = nil) + # Pass arguments to `get_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_source(name: nil) + # Pass arguments to `get_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Relative resource name of the source. Its format is + # `organizations/[organization_id]/source/[source_id]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new + # + # # Call the get_source method. + # result = client.get_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def get_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization's assets and groups them by their specified + # properties. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload group_assets(request, options = nil) + # Pass arguments to `group_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent to group the assets by. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: + # "security_center_properties.resource_project,security_center_properties.project". + # + # The following fields are supported when compare_duration is not set: + # + # * security_center_properties.resource_project + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_type + # * security_center_properties.resource_parent + # * security_center_properties.resource_parent_display_name + # + # The following fields are supported when compare_duration is set: + # + # * security_center_properties.resource_type + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_parent_display_name + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" property is + # updated to indicate whether the asset was added, removed, or remained + # present during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at reference_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at reference_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and reference_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param page_token [::String] + # The value returned by the last `GroupAssetsResponse`; indicates + # that this is a continuation of a prior `GroupAssets` call, and that the + # system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new + # + # # Call the group_assets method. + # result = client.group_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + # p item + # end + # + def group_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.group_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.group_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.group_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :group_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_assets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization or source's findings and groups them by their + # specified properties. + # + # To group across all sources provide a `-` as the source id. + # Example: /v1/organizations/\\{organization_id}/sources/-/findings, + # /v1/folders/\\{folder_id}/sources/-/findings, + # /v1/projects/\\{project_id}/sources/-/findings + # + # @overload group_findings(request, options = nil) + # Pass arguments to `group_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source to groupBy. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, + # or `projects/{project_id}/sources/-` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping + # (including `state_change`). The string value should follow SQL syntax: + # comma separated list of fields. For example: "parent,resource_name". + # + # The following fields are supported when compare_duration is set: + # + # * state_change + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" attribute is + # updated to indicate whether the finding had its state changed, the + # finding's state remained unchanged, or if the finding was added during the + # compare_duration period of time that precedes the read_time. This is the + # time between (read_time - compare_duration) and read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present + # at read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param page_token [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new + # + # # Call the group_findings method. + # result = client.group_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + # p item + # end + # + def group_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.group_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.group_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.group_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :group_findings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_findings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization's assets. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource that contains the assets. The + # value that you can specify on parent depends on the method in which you + # specify parent. You can specify one of the following values: + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following are the allowed field and operator combinations: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,resource_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,resource_properties.a_property" and " + # name desc , resource_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # update_time + # resource_properties + # security_marks.marks + # security_center_properties.resource_name + # security_center_properties.resource_display_name + # security_center_properties.resource_parent + # security_center_properties.resource_parent_display_name + # security_center_properties.resource_project + # security_center_properties.resource_project_display_name + # security_center_properties.resource_type + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListAssetsResult's "state_change" + # attribute is updated to indicate whether the asset was added, removed, or + # remained present during the compare_duration period of time that precedes + # the read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at read_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at read_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the ListAssetsResult fields to be listed in the + # response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListAssetsResponse`; indicates + # that this is a continuation of a prior `ListAssets` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_assets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all resident SecurityHealthAnalyticsCustomModules under + # the given CRM parent and all of the parent’s CRM descendants. + # + # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list descendant custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_descendant_security_health_analytics_custom_modules method. + # result = client.list_descendant_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_descendant_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_descendant_security_health_analytics_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_descendant_security_health_analytics_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization or source's findings. + # + # To list across all sources provide a `-` as the source id. + # Example: /v1/organizations/\\{organization_id}/sources/-/findings + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source the findings belong to. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To list across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-`, + # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.display_name: `=`, `:` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,source_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,source_properties.a_property" and " + # name desc , source_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # source_properties + # security_marks.marks + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListFindingsResult's "state_change" + # attribute is updated to indicate whether the finding had its state changed, + # the finding's state remained unchanged, or if the finding was added in any + # state during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_findings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_findings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists mute configs. + # + # @overload list_mute_configs(request, options = nil) + # Pass arguments to `list_mute_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_mute_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of mute configs. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListMuteConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMuteConfigs` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new + # + # # Call the list_mute_configs method. + # result = client.list_mute_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. + # p item + # end + # + def list_mute_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_mute_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_mute_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_mute_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_mute_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists notification configs. + # + # @overload list_notification_configs(request, options = nil) + # Pass arguments to `list_notification_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_notification_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent in which to list the notification + # configurations. Its format is "organizations/[organization_id]", + # "folders/[folder_id]", or "projects/[project_id]". + # @param page_token [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new + # + # # Call the list_notification_configs method. + # result = client.list_notification_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p item + # end + # + def list_notification_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_notification_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_notification_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_notification_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_notification_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the + # given parent. This includes resident modules defined at the scope of the + # parent, and inherited modules, inherited from CRM ancestors. + # + # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list effective custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_effective_security_health_analytics_custom_modules method. + # result = client.list_effective_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_effective_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_effective_security_health_analytics_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_effective_security_health_analytics_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all SecurityHealthAnalyticsCustomModules for the given + # parent. This includes resident modules defined at the scope of the parent, + # and inherited modules, inherited from CRM ancestors. + # + # @overload list_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_security_health_analytics_custom_modules method. + # result = client.list_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_security_health_analytics_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_security_health_analytics_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all sources belonging to an organization. + # + # @overload list_sources(request, options = nil) + # Pass arguments to `list_sources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent of sources to list. Its format should + # be `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param page_token [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new + # + # # Call the list_sources method. + # result = client.list_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. + # p item + # end + # + def list_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs asset discovery. The discovery is tracked with a long-running + # operation. + # + # This API can only be called with limited frequency for an organization. If + # it is called too frequently the caller will receive a TOO_MANY_REQUESTS + # error. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload run_asset_discovery(request, options = nil) + # Pass arguments to `run_asset_discovery` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_asset_discovery(parent: nil) + # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization to run asset discovery for. Its format + # is `organizations/[organization_id]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new + # + # # Call the run_asset_discovery method. + # result = client.run_asset_discovery request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_asset_discovery request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_asset_discovery.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_asset_discovery.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :run_asset_discovery, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the state of a finding. + # + # @overload set_finding_state(request, options = nil) + # Pass arguments to `set_finding_state` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_finding_state(name: nil, state: nil, start_time: nil) + # Pass arguments to `set_finding_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @param state [::Google::Cloud::SecurityCenter::V1::Finding::State] + # Required. The desired State of the finding. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The time at which the updated state takes effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new + # + # # Call the set_finding_state method. + # result = client.set_finding_state request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def set_finding_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_finding_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_finding_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :set_finding_state, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the mute state of a finding. + # + # @overload set_mute(request, options = nil) + # Pass arguments to `set_mute` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SetMuteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_mute(name: nil, mute: nil) + # Pass arguments to `set_mute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute] + # Required. The desired state of the Mute. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new + # + # # Call the set_mute method. + # result = client.set_mute request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def set_mute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetMuteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_mute.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_mute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_mute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :set_mute, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified Source. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has on the specified source. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + # + # @overload simulate_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative resource name of the organization, project, or + # folder. For more information about relative resource names, see [Relative + # Resource + # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # Example: `organizations/{organization_id}` + # @param custom_config [::Google::Cloud::SecurityCenter::V1::CustomConfig, ::Hash] + # Required. The custom configuration that you need to test. + # @param resource [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] + # Required. Resource data to simulate custom module against. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the simulate_security_health_analytics_custom_module method. + # result = client.simulate_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. + # p result + # + def simulate_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :simulate_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates external system. This is for a given finding. + # + # @overload update_external_system(request, options = nil) + # Pass arguments to `update_external_system` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_external_system(external_system: nil, update_mask: nil) + # Pass arguments to `update_external_system` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param external_system [::Google::Cloud::SecurityCenter::V1::ExternalSystem, ::Hash] + # Required. The external system resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the external system resource. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new + # + # # Call the update_external_system method. + # result = client.update_external_system request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. + # p result + # + def update_external_system request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_external_system.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.external_system&.name + header_params["external_system.name"] = request.external_system.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_external_system.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_external_system, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a finding. The corresponding source must exist for a + # finding creation to succeed. + # + # @overload update_finding(request, options = nil) + # Pass arguments to `update_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_finding(finding: nil, update_mask: nil) + # Pass arguments to `update_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] + # Required. The finding resource to update or create if it does not already + # exist. parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new + # + # # Call the update_finding method. + # result = client.update_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def update_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.finding&.name + header_params["finding.name"] = request.finding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_finding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_finding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a mute config. + # + # @overload update_mute_config(request, options = nil) + # Pass arguments to `update_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_mute_config(mute_config: nil, update_mask: nil) + # Pass arguments to `update_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] + # Required. The mute config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new + # + # # Call the update_mute_config method. + # result = client.update_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def update_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.mute_config&.name + header_params["mute_config.name"] = request.mute_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + # + # @overload update_notification_config(request, options = nil) + # Pass arguments to `update_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_notification_config(notification_config: nil, update_mask: nil) + # Pass arguments to `update_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] + # Required. The notification config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new + # + # # Call the update_notification_config method. + # result = client.update_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def update_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.notification_config&.name + header_params["notification_config.name"] = request.notification_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an organization's settings. + # + # @overload update_organization_settings(request, options = nil) + # Pass arguments to `update_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_organization_settings(organization_settings: nil, update_mask: nil) + # Pass arguments to `update_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param organization_settings [::Google::Cloud::SecurityCenter::V1::OrganizationSettings, ::Hash] + # Required. The organization settings resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the settings resource. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new + # + # # Call the update_organization_settings method. + # result = client.update_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + # p result + # + def update_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.organization_settings&.name + header_params["organization_settings.name"] = request.organization_settings.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_organization_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the SecurityHealthAnalyticsCustomModule under the given name based + # on the given update mask. Updating the enablement state is supported on + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name and custom + # config of a module is supported on resident modules only. + # + # @overload update_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_security_health_analytics_custom_module(security_health_analytics_custom_module: nil, update_mask: nil) + # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. The SecurityHealthAnalytics custom module to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. The only fields that can be updated are + # `enablement_state` and `custom_config`. If empty or set to the wildcard + # value `*`, both `enablement_state` and `custom_config` are updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the update_security_health_analytics_custom_module method. + # result = client.update_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def update_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.security_health_analytics_custom_module&.name + header_params["security_health_analytics_custom_module.name"] = request.security_health_analytics_custom_module.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a source. + # + # @overload update_source(request, options = nil) + # Pass arguments to `update_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_source(source: nil, update_mask: nil) + # Pass arguments to `update_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] + # Required. The source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new + # + # # Call the update_source method. + # result = client.update_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def update_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.source&.name + header_params["source.name"] = request.source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates security marks. + # + # @overload update_security_marks(request, options = nil) + # Pass arguments to `update_security_marks` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) + # Pass arguments to `update_security_marks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_marks [::Google::Cloud::SecurityCenter::V1::SecurityMarks, ::Hash] + # Required. The security marks resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # The time at which the updated SecurityMarks take effect. + # If not set uses current server time. Updates will be applied to the + # SecurityMarks that are active immediately preceding this time. Must be + # earlier or equal to the server time. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new + # + # # Call the update_security_marks method. + # result = client.update_security_marks request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. + # p result + # + def update_security_marks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_security_marks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.security_marks&.name + header_params["security_marks.name"] = request.security_marks.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_security_marks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_security_marks, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a BigQuery export. + # + # @overload create_big_query_export(request, options = nil) + # Pass arguments to `create_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) + # Pass arguments to `create_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource of the new BigQuery export. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] + # Required. The BigQuery export being created. + # @param big_query_export_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new + # + # # Call the create_big_query_export method. + # result = client.create_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def create_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing BigQuery export. + # + # @overload delete_big_query_export(request, options = nil) + # Pass arguments to `delete_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_big_query_export(name: nil) + # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the BigQuery export to delete. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new + # + # # Call the delete_big_query_export method. + # result = client.delete_big_query_export request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a BigQuery export. + # + # @overload update_big_query_export(request, options = nil) + # Pass arguments to `update_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_big_query_export(big_query_export: nil, update_mask: nil) + # Pass arguments to `update_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] + # Required. The BigQuery export being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new + # + # # Call the update_big_query_export method. + # result = client.update_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def update_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.big_query_export&.name + header_params["big_query_export.name"] = request.big_query_export.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BigQuery exports. Note that when requesting BigQuery exports at a + # given level all exports under that level are also returned e.g. if + # requesting BigQuery exports under a folder, then all BigQuery exports + # immediately under the folder plus the ones created under the projects + # within the folder are returned. + # + # @overload list_big_query_exports(request, options = nil) + # Pass arguments to `list_big_query_exports` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of BigQuery exports. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListBigQueryExports` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListBigQueryExports` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new + # + # # Call the list_big_query_exports method. + # result = client.list_big_query_exports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p item + # end + # + def list_big_query_exports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_big_query_exports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_big_query_exports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_big_query_exports, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_big_query_exports, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident Event Threat Detection custom module at the scope of the + # given Resource Manager parent, and also creates inherited custom modules + # for all descendants of the given parent. These modules are enabled by + # default. + # + # @overload create_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil) + # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The new custom module's parent. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module to create. The + # event_threat_detection_custom_module.name will be ignored and server + # generated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new + # + # # Call the create_event_threat_detection_custom_module method. + # result = client.create_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def create_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified Event Threat Detection custom module and all of its + # descendants in the Resource Manager hierarchy. This method is only + # supported for resident custom modules. + # + # @overload delete_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_event_threat_detection_custom_module(name: nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to delete. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new + # + # # Call the delete_event_threat_detection_custom_module method. + # result = client.delete_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Event Threat Detection custom module. + # + # @overload get_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to get. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_event_threat_detection_custom_module method. + # result = client.get_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def get_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all resident Event Threat Detection custom modules under the + # given Resource Manager parent and its descendants. + # + # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDescendantEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_descendant_event_threat_detection_custom_modules method. + # result = client.list_descendant_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_descendant_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_descendant_event_threat_detection_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_descendant_event_threat_detection_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Event Threat Detection custom modules for the given + # Resource Manager parent. This includes resident modules defined at the + # scope of the parent along with modules inherited from ancestors. + # + # @overload list_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListEventThreatDetectionCustomModules` must match the call that provided + # the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_event_threat_detection_custom_modules method. + # result = client.list_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_event_threat_detection_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_event_threat_detection_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Event Threat Detection custom module with the given name based + # on the given update mask. Updating the enablement state is supported for + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name or + # configuration of a module is supported for resident modules only. The type + # of a module cannot be changed. + # + # @overload update_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_event_threat_detection_custom_module(event_threat_detection_custom_module: nil, update_mask: nil) + # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new + # + # # Call the update_event_threat_detection_custom_module method. + # result = client.update_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def update_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.event_threat_detection_custom_module&.name + header_params["event_threat_detection_custom_module.name"] = request.event_threat_detection_custom_module.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Validates the given Event Threat Detection custom module. + # + # @overload validate_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent to validate the Custom Module under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param raw_text [::String] + # Required. The raw text of the module's contents. Used to generate error + # messages. + # @param type [::String] + # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new + # + # # Call the validate_event_threat_detection_custom_module method. + # result = client.validate_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. + # p result + # + def validate_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :validate_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an effective Event Threat Detection custom module at the given level. + # + # @overload get_effective_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_effective_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the effective Event Threat Detection custom + # module. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_effective_event_threat_detection_custom_module method. + # result = client.get_effective_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + # p result + # + def get_effective_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_effective_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all effective Event Threat Detection custom modules for the + # given parent. This includes resident modules defined at the scope of the + # parent along with modules inherited from its ancestors. + # + # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules for. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListEffectiveEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_effective_event_threat_detection_custom_modules method. + # result = client.list_effective_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + # p item + # end + # + def list_effective_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_effective_event_threat_detection_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_effective_event_threat_detection_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a ResourceValueConfig for an organization. Maps user's tags to + # difference resource values for use by the attack path simulation. + # + # @overload batch_create_resource_value_configs(request, options = nil) + # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_create_resource_value_configs(parent: nil, requests: nil) + # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # The parent field in the CreateResourceValueConfigRequest + # messages must either be empty or match this field. + # @param requests [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, ::Hash>] + # Required. The resource value configs to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new + # + # # Call the batch_create_resource_value_configs method. + # result = client.batch_create_resource_value_configs request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. + # p result + # + def batch_create_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :batch_create_resource_value_configs, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a ResourceValueConfig. + # + # @overload delete_resource_value_config(request, options = nil) + # Pass arguments to `delete_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_resource_value_config(name: nil) + # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the ResourceValueConfig to delete + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new + # + # # Call the delete_resource_value_config method. + # result = client.delete_resource_value_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_resource_value_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a ResourceValueConfig. + # + # @overload get_resource_value_config(request, options = nil) + # Pass arguments to `get_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_resource_value_config(name: nil) + # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource value config to retrieve. Its format is + # `organizations/{organization}/resourceValueConfigs/{config_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new + # + # # Call the get_resource_value_config method. + # result = client.get_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p result + # + def get_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_resource_value_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all ResourceValueConfigs. + # + # @overload list_resource_value_configs(request, options = nil) + # Pass arguments to `list_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of resource value configs. + # Its format is + # `organizations/[organization_id]` + # @param page_size [::Integer] + # The number of results to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListResourceValueConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListResourceValueConfigs` must match the call that provided the + # page token. + # + # page_size can be specified, and the new page_size will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new + # + # # Call the list_resource_value_configs method. + # result = client.list_resource_value_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p item + # end + # + def list_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_resource_value_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing ResourceValueConfigs with new rules. + # + # @overload update_resource_value_config(request, options = nil) + # Pass arguments to `update_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) + # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_value_config [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig, ::Hash] + # Required. The resource value config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new + # + # # Call the update_resource_value_config method. + # result = client.update_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p result + # + def update_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_value_config&.name + header_params["resource_value_config.name"] = request.resource_value_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_resource_value_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the valued resources for a set of simulation results and filter. + # + # @overload list_valued_resources(request, options = nil) + # Pass arguments to `list_valued_resources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) + # Pass arguments to `list_valued_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list valued resources. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # @param filter [::String] + # The filter expression that filters the valued resources in the response. + # Supported fields: + # + # * `resource_value` supports = + # * `resource_type` supports = + # @param page_token [::String] + # The value returned by the last `ListValuedResourcesResponse`; indicates + # that this is a continuation of a prior `ListValuedResources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param order_by [::String] + # Optional. The fields by which to order the valued resources response. + # + # Supported fields: + # + # * `exposed_score` + # + # * `resource_value` + # + # * `resource_type` + # + # * `resource` + # + # * `display_name` + # + # Values should be a comma separated list of fields. For example: + # `exposed_score,resource_value`. + # + # The default sorting order is descending. To specify ascending or descending + # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for + # example: `exposed_score DESC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new + # + # # Call the list_valued_resources method. + # result = client.list_valued_resources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. + # p item + # end + # + def list_valued_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_valued_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_valued_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_valued_resources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_valued_resources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the attack paths for a set of simulation results or valued resources + # and filter. + # + # @overload list_attack_paths(request, options = nil) + # Pass arguments to `list_attack_paths` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_attack_paths` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list attack paths. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @param filter [::String] + # The filter expression that filters the attack path in the response. + # Supported fields: + # + # * `valued_resources` supports = + # @param page_token [::String] + # The value returned by the last `ListAttackPathsResponse`; indicates + # that this is a continuation of a prior `ListAttackPaths` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new + # + # # Call the list_attack_paths method. + # result = client.list_attack_paths request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. + # p item + # end + # + def list_attack_paths request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_attack_paths.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_attack_paths.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_attack_paths, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_attack_paths, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecurityCenter API. + # + # This class represents the configuration for SecurityCenter, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # bulk_mute_findings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.bulk_mute_findings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.bulk_mute_findings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SecurityCenter API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `bulk_mute_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_mute_findings + ## + # RPC-specific configuration for `create_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_security_health_analytics_custom_module + ## + # RPC-specific configuration for `create_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_source + ## + # RPC-specific configuration for `create_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_finding + ## + # RPC-specific configuration for `create_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_mute_config + ## + # RPC-specific configuration for `create_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_config + ## + # RPC-specific configuration for `delete_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_mute_config + ## + # RPC-specific configuration for `delete_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_config + ## + # RPC-specific configuration for `delete_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_simulation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_simulation + ## + # RPC-specific configuration for `get_valued_resource` + # @return [::Gapic::Config::Method] + # + attr_reader :get_valued_resource + ## + # RPC-specific configuration for `get_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :get_big_query_export + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `get_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mute_config + ## + # RPC-specific configuration for `get_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_config + ## + # RPC-specific configuration for `get_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_organization_settings + ## + # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_source + ## + # RPC-specific configuration for `group_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :group_assets + ## + # RPC-specific configuration for `group_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :group_findings + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_mute_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_mute_configs + ## + # RPC-specific configuration for `list_notification_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_configs + ## + # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sources + ## + # RPC-specific configuration for `run_asset_discovery` + # @return [::Gapic::Config::Method] + # + attr_reader :run_asset_discovery + ## + # RPC-specific configuration for `set_finding_state` + # @return [::Gapic::Config::Method] + # + attr_reader :set_finding_state + ## + # RPC-specific configuration for `set_mute` + # @return [::Gapic::Config::Method] + # + attr_reader :set_mute + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `simulate_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :simulate_security_health_analytics_custom_module + ## + # RPC-specific configuration for `update_external_system` + # @return [::Gapic::Config::Method] + # + attr_reader :update_external_system + ## + # RPC-specific configuration for `update_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_finding + ## + # RPC-specific configuration for `update_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_mute_config + ## + # RPC-specific configuration for `update_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_config + ## + # RPC-specific configuration for `update_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_organization_settings + ## + # RPC-specific configuration for `update_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_health_analytics_custom_module + ## + # RPC-specific configuration for `update_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_source + ## + # RPC-specific configuration for `update_security_marks` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_marks + ## + # RPC-specific configuration for `create_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :create_big_query_export + ## + # RPC-specific configuration for `delete_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_big_query_export + ## + # RPC-specific configuration for `update_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :update_big_query_export + ## + # RPC-specific configuration for `list_big_query_exports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_big_query_exports + ## + # RPC-specific configuration for `create_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_event_threat_detection_custom_module + ## + # RPC-specific configuration for `delete_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_event_threat_detection_custom_module + ## + # RPC-specific configuration for `get_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_event_threat_detection_custom_module + ## + # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `list_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `update_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_event_threat_detection_custom_module + ## + # RPC-specific configuration for `validate_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :validate_event_threat_detection_custom_module + ## + # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_event_threat_detection_custom_module + ## + # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `batch_create_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_resource_value_configs + ## + # RPC-specific configuration for `delete_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_resource_value_config + ## + # RPC-specific configuration for `get_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_value_config + ## + # RPC-specific configuration for `list_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_value_configs + ## + # RPC-specific configuration for `update_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_resource_value_config + ## + # RPC-specific configuration for `list_valued_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_valued_resources + ## + # RPC-specific configuration for `list_attack_paths` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attack_paths + + # @private + def initialize parent_rpcs = nil + bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings + @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config + create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module + @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config + create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source + @create_source = ::Gapic::Config::Method.new create_source_config + create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding + @create_finding = ::Gapic::Config::Method.new create_finding_config + create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config + @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config + create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config + @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config + delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config + @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config + delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config + @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config + delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module + @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config + get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation + @get_simulation = ::Gapic::Config::Method.new get_simulation_config + get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource + @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config + get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export + @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config + @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config + get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config + @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config + get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings + @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config + get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module + @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config + get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module + @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config + get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source + @get_source = ::Gapic::Config::Method.new get_source_config + group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets + @group_assets = ::Gapic::Config::Method.new group_assets_config + group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings + @group_findings = ::Gapic::Config::Method.new group_findings_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules + @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs + @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config + list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs + @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config + list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules + @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config + list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules + @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config + list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources + @list_sources = ::Gapic::Config::Method.new list_sources_config + run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery + @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config + set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state + @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config + set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute + @set_mute = ::Gapic::Config::Method.new set_mute_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module + @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config + update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system + @update_external_system = ::Gapic::Config::Method.new update_external_system_config + update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding + @update_finding = ::Gapic::Config::Method.new update_finding_config + update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config + @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config + update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config + @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config + update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings + @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config + update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module + @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config + update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source + @update_source = ::Gapic::Config::Method.new update_source_config + update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks + @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config + create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export + @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config + delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export + @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config + update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export + @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config + list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports + @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config + create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module + @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config + delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module + @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config + get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module + @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config + list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules + @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config + list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules + @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config + update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module + @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config + validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module + @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config + get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module + @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config + list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules + @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config + batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs + @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config + delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config + @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config + get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config + @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config + list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs + @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config + update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config + @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config + list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources + @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config + list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths + @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb new file mode 100644 index 000000000000..4bb0187caca1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + # Credentials for the SecurityCenter API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SECURITY_CENTER_CREDENTIALS", + "SECURITY_CENTER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SECURITY_CENTER_CREDENTIALS_JSON", + "SECURITY_CENTER_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb new file mode 100644 index 000000000000..178841746c30 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SecurityCenter Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb new file mode 100644 index 000000000000..74f6066a7b65 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb @@ -0,0 +1,1127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + module SecurityCenter + # Path helper methods for the SecurityCenter API. + module Paths + ## + # Create a fully-qualified BigQueryExport resource string. + # + # @overload big_query_export_path(organization:, export:) + # The resource will be in the following format: + # + # `organizations/{organization}/bigQueryExports/{export}` + # + # @param organization [String] + # @param export [String] + # + # @overload big_query_export_path(folder:, export:) + # The resource will be in the following format: + # + # `folders/{folder}/bigQueryExports/{export}` + # + # @param folder [String] + # @param export [String] + # + # @overload big_query_export_path(project:, export:) + # The resource will be in the following format: + # + # `projects/{project}/bigQueryExports/{export}` + # + # @param project [String] + # @param export [String] + # + # @return [::String] + def big_query_export_path **args + resources = { + "export:organization" => (proc do |organization:, export:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/bigQueryExports/#{export}" + end), + "export:folder" => (proc do |folder:, export:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/bigQueryExports/#{export}" + end), + "export:project" => (proc do |project:, export:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/bigQueryExports/#{export}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified DlpJob resource string. + # + # @overload dlp_job_path(project:, dlp_job:) + # The resource will be in the following format: + # + # `projects/{project}/dlpJobs/{dlp_job}` + # + # @param project [String] + # @param dlp_job [String] + # + # @overload dlp_job_path(project:, location:, dlp_job:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dlpJobs/{dlp_job}` + # + # @param project [String] + # @param location [String] + # @param dlp_job [String] + # + # @return [::String] + def dlp_job_path **args + resources = { + "dlp_job:project" => (proc do |project:, dlp_job:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/dlpJobs/#{dlp_job}" + end), + "dlp_job:location:project" => (proc do |project:, location:, dlp_job:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dlpJobs/#{dlp_job}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified EffectiveEventThreatDetectionCustomModule resource string. + # + # @overload effective_event_threat_detection_custom_module_path(organization:, module:) + # The resource will be in the following format: + # + # `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}` + # + # @param organization [String] + # @param module [String] + # + # @overload effective_event_threat_detection_custom_module_path(folder:, module:) + # The resource will be in the following format: + # + # `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}` + # + # @param folder [String] + # @param module [String] + # + # @overload effective_event_threat_detection_custom_module_path(project:, module:) + # The resource will be in the following format: + # + # `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}` + # + # @param project [String] + # @param module [String] + # + # @return [::String] + def effective_event_threat_detection_custom_module_path **args + resources = { + "module:organization" => (proc do |organization:, module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" + end), + "folder:module" => (proc do |folder:, module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" + end), + "module:project" => (proc do |project:, module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified EffectiveSecurityHealthAnalyticsCustomModule resource string. + # + # @overload effective_security_health_analytics_custom_module_path(organization:, effective_custom_module:) + # The resource will be in the following format: + # + # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` + # + # @param organization [String] + # @param effective_custom_module [String] + # + # @overload effective_security_health_analytics_custom_module_path(folder:, effective_custom_module:) + # The resource will be in the following format: + # + # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` + # + # @param folder [String] + # @param effective_custom_module [String] + # + # @overload effective_security_health_analytics_custom_module_path(project:, effective_custom_module:) + # The resource will be in the following format: + # + # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` + # + # @param project [String] + # @param effective_custom_module [String] + # + # @return [::String] + def effective_security_health_analytics_custom_module_path **args + resources = { + "effective_custom_module:organization" => (proc do |organization:, effective_custom_module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" + end), + "effective_custom_module:folder" => (proc do |folder:, effective_custom_module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" + end), + "effective_custom_module:project" => (proc do |project:, effective_custom_module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified EventThreatDetectionCustomModule resource string. + # + # @overload event_threat_detection_custom_module_path(organization:, module:) + # The resource will be in the following format: + # + # `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}` + # + # @param organization [String] + # @param module [String] + # + # @overload event_threat_detection_custom_module_path(folder:, module:) + # The resource will be in the following format: + # + # `folders/{folder}/eventThreatDetectionSettings/customModules/{module}` + # + # @param folder [String] + # @param module [String] + # + # @overload event_threat_detection_custom_module_path(project:, module:) + # The resource will be in the following format: + # + # `projects/{project}/eventThreatDetectionSettings/customModules/{module}` + # + # @param project [String] + # @param module [String] + # + # @return [::String] + def event_threat_detection_custom_module_path **args + resources = { + "module:organization" => (proc do |organization:, module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" + end), + "folder:module" => (proc do |folder:, module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" + end), + "module:project" => (proc do |project:, module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified EventThreatDetectionSettings resource string. + # + # @overload event_threat_detection_settings_path(organization:) + # The resource will be in the following format: + # + # `organizations/{organization}/eventThreatDetectionSettings` + # + # @param organization [String] + # + # @overload event_threat_detection_settings_path(folder:) + # The resource will be in the following format: + # + # `folders/{folder}/eventThreatDetectionSettings` + # + # @param folder [String] + # + # @overload event_threat_detection_settings_path(project:) + # The resource will be in the following format: + # + # `projects/{project}/eventThreatDetectionSettings` + # + # @param project [String] + # + # @return [::String] + def event_threat_detection_settings_path **args + resources = { + "organization" => (proc do |organization:| + "organizations/#{organization}/eventThreatDetectionSettings" + end), + "folder" => (proc do |folder:| + "folders/#{folder}/eventThreatDetectionSettings" + end), + "project" => (proc do |project:| + "projects/#{project}/eventThreatDetectionSettings" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified ExternalSystem resource string. + # + # @overload external_system_path(organization:, source:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param organization [String] + # @param source [String] + # @param finding [String] + # @param externalsystem [String] + # + # @overload external_system_path(folder:, source:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param folder [String] + # @param source [String] + # @param finding [String] + # @param externalsystem [String] + # + # @overload external_system_path(project:, source:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param project [String] + # @param source [String] + # @param finding [String] + # @param externalsystem [String] + # + # @return [::String] + def external_system_path **args + resources = { + "externalsystem:finding:organization:source" => (proc do |organization:, source:, finding:, externalsystem:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" + end), + "externalsystem:finding:folder:source" => (proc do |folder:, source:, finding:, externalsystem:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" + end), + "externalsystem:finding:project:source" => (proc do |project:, source:, finding:, externalsystem:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "projects/#{project}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Finding resource string. + # + # @overload finding_path(organization:, source:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/findings/{finding}` + # + # @param organization [String] + # @param source [String] + # @param finding [String] + # + # @overload finding_path(folder:, source:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/findings/{finding}` + # + # @param folder [String] + # @param source [String] + # @param finding [String] + # + # @overload finding_path(project:, source:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/findings/{finding}` + # + # @param project [String] + # @param source [String] + # @param finding [String] + # + # @return [::String] + def finding_path **args + resources = { + "finding:organization:source" => (proc do |organization:, source:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/findings/#{finding}" + end), + "finding:folder:source" => (proc do |folder:, source:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/findings/#{finding}" + end), + "finding:project:source" => (proc do |project:, source:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "projects/#{project}/sources/#{source}/findings/#{finding}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Folder resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}` + # + # @param folder [String] + # + # @return [::String] + def folder_path folder: + "folders/#{folder}" + end + + ## + # Create a fully-qualified FolderLocation resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @return [::String] + def folder_location_path folder:, location: + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified MuteConfig resource string. + # + # @overload mute_config_path(organization:, mute_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/muteConfigs/{mute_config}` + # + # @param organization [String] + # @param mute_config [String] + # + # @overload mute_config_path(folder:, mute_config:) + # The resource will be in the following format: + # + # `folders/{folder}/muteConfigs/{mute_config}` + # + # @param folder [String] + # @param mute_config [String] + # + # @overload mute_config_path(project:, mute_config:) + # The resource will be in the following format: + # + # `projects/{project}/muteConfigs/{mute_config}` + # + # @param project [String] + # @param mute_config [String] + # + # @overload mute_config_path(organization:, location:, mute_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/muteConfigs/{mute_config}` + # + # @param organization [String] + # @param location [String] + # @param mute_config [String] + # + # @overload mute_config_path(folder:, location:, mute_config:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + # + # @param folder [String] + # @param location [String] + # @param mute_config [String] + # + # @overload mute_config_path(project:, location:, mute_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/muteConfigs/{mute_config}` + # + # @param project [String] + # @param location [String] + # @param mute_config [String] + # + # @return [::String] + def mute_config_path **args + resources = { + "mute_config:organization" => (proc do |organization:, mute_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/muteConfigs/#{mute_config}" + end), + "folder:mute_config" => (proc do |folder:, mute_config:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/muteConfigs/#{mute_config}" + end), + "mute_config:project" => (proc do |project:, mute_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/muteConfigs/#{mute_config}" + end), + "location:mute_config:organization" => (proc do |organization:, location:, mute_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/muteConfigs/#{mute_config}" + end), + "folder:location:mute_config" => (proc do |folder:, location:, mute_config:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/muteConfigs/#{mute_config}" + end), + "location:mute_config:project" => (proc do |project:, location:, mute_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/muteConfigs/#{mute_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified NotificationConfig resource string. + # + # @overload notification_config_path(organization:, notification_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/notificationConfigs/{notification_config}` + # + # @param organization [String] + # @param notification_config [String] + # + # @overload notification_config_path(folder:, notification_config:) + # The resource will be in the following format: + # + # `folders/{folder}/notificationConfigs/{notification_config}` + # + # @param folder [String] + # @param notification_config [String] + # + # @overload notification_config_path(project:, notification_config:) + # The resource will be in the following format: + # + # `projects/{project}/notificationConfigs/{notification_config}` + # + # @param project [String] + # @param notification_config [String] + # + # @return [::String] + def notification_config_path **args + resources = { + "notification_config:organization" => (proc do |organization:, notification_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/notificationConfigs/#{notification_config}" + end), + "folder:notification_config" => (proc do |folder:, notification_config:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/notificationConfigs/#{notification_config}" + end), + "notification_config:project" => (proc do |project:, notification_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/notificationConfigs/#{notification_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Organization resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}` + # + # @param organization [String] + # + # @return [::String] + def organization_path organization: + "organizations/#{organization}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationSettings resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/organizationSettings` + # + # @param organization [String] + # + # @return [::String] + def organization_settings_path organization: + "organizations/#{organization}/organizationSettings" + end + + ## + # Create a fully-qualified OrganizationSimulation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/simulations/{simulation}` + # + # @param organization [String] + # @param simulation [String] + # + # @return [::String] + def organization_simulation_path organization:, simulation: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/simulations/#{simulation}" + end + + ## + # Create a fully-qualified Policy resource string. + # + # @overload policy_path(organization:, constraint_name:) + # The resource will be in the following format: + # + # `organizations/{organization}/policies/{constraint_name}` + # + # @param organization [String] + # @param constraint_name [String] + # + # @overload policy_path(folder:, constraint_name:) + # The resource will be in the following format: + # + # `folders/{folder}/policies/{constraint_name}` + # + # @param folder [String] + # @param constraint_name [String] + # + # @overload policy_path(project:, constraint_name:) + # The resource will be in the following format: + # + # `projects/{project}/policies/{constraint_name}` + # + # @param project [String] + # @param constraint_name [String] + # + # @return [::String] + def policy_path **args + resources = { + "constraint_name:organization" => (proc do |organization:, constraint_name:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/policies/#{constraint_name}" + end), + "constraint_name:folder" => (proc do |folder:, constraint_name:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/policies/#{constraint_name}" + end), + "constraint_name:project" => (proc do |project:, constraint_name:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/policies/#{constraint_name}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified ResourceValueConfig resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/resourceValueConfigs/{resource_value_config}` + # + # @param organization [String] + # @param resource_value_config [String] + # + # @return [::String] + def resource_value_config_path organization:, resource_value_config: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/resourceValueConfigs/#{resource_value_config}" + end + + ## + # Create a fully-qualified SecurityHealthAnalyticsCustomModule resource string. + # + # @overload security_health_analytics_custom_module_path(organization:, custom_module:) + # The resource will be in the following format: + # + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{custom_module}` + # + # @param organization [String] + # @param custom_module [String] + # + # @overload security_health_analytics_custom_module_path(folder:, custom_module:) + # The resource will be in the following format: + # + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{custom_module}` + # + # @param folder [String] + # @param custom_module [String] + # + # @overload security_health_analytics_custom_module_path(project:, custom_module:) + # The resource will be in the following format: + # + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{custom_module}` + # + # @param project [String] + # @param custom_module [String] + # + # @return [::String] + def security_health_analytics_custom_module_path **args + resources = { + "custom_module:organization" => (proc do |organization:, custom_module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/securityHealthAnalyticsSettings/customModules/#{custom_module}" + end), + "custom_module:folder" => (proc do |folder:, custom_module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/securityHealthAnalyticsSettings/customModules/#{custom_module}" + end), + "custom_module:project" => (proc do |project:, custom_module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/securityHealthAnalyticsSettings/customModules/#{custom_module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified SecurityHealthAnalyticsSettings resource string. + # + # @overload security_health_analytics_settings_path(organization:) + # The resource will be in the following format: + # + # `organizations/{organization}/securityHealthAnalyticsSettings` + # + # @param organization [String] + # + # @overload security_health_analytics_settings_path(folder:) + # The resource will be in the following format: + # + # `folders/{folder}/securityHealthAnalyticsSettings` + # + # @param folder [String] + # + # @overload security_health_analytics_settings_path(project:) + # The resource will be in the following format: + # + # `projects/{project}/securityHealthAnalyticsSettings` + # + # @param project [String] + # + # @return [::String] + def security_health_analytics_settings_path **args + resources = { + "organization" => (proc do |organization:| + "organizations/#{organization}/securityHealthAnalyticsSettings" + end), + "folder" => (proc do |folder:| + "folders/#{folder}/securityHealthAnalyticsSettings" + end), + "project" => (proc do |project:| + "projects/#{project}/securityHealthAnalyticsSettings" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified SecurityMarks resource string. + # + # @overload security_marks_path(organization:, asset:) + # The resource will be in the following format: + # + # `organizations/{organization}/assets/{asset}/securityMarks` + # + # @param organization [String] + # @param asset [String] + # + # @overload security_marks_path(organization:, source:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/findings/{finding}/securityMarks` + # + # @param organization [String] + # @param source [String] + # @param finding [String] + # + # @overload security_marks_path(folder:, asset:) + # The resource will be in the following format: + # + # `folders/{folder}/assets/{asset}/securityMarks` + # + # @param folder [String] + # @param asset [String] + # + # @overload security_marks_path(project:, asset:) + # The resource will be in the following format: + # + # `projects/{project}/assets/{asset}/securityMarks` + # + # @param project [String] + # @param asset [String] + # + # @overload security_marks_path(folder:, source:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/findings/{finding}/securityMarks` + # + # @param folder [String] + # @param source [String] + # @param finding [String] + # + # @overload security_marks_path(project:, source:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/findings/{finding}/securityMarks` + # + # @param project [String] + # @param source [String] + # @param finding [String] + # + # @return [::String] + def security_marks_path **args + resources = { + "asset:organization" => (proc do |organization:, asset:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/assets/#{asset}/securityMarks" + end), + "finding:organization:source" => (proc do |organization:, source:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/findings/#{finding}/securityMarks" + end), + "asset:folder" => (proc do |folder:, asset:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/assets/#{asset}/securityMarks" + end), + "asset:project" => (proc do |project:, asset:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/assets/#{asset}/securityMarks" + end), + "finding:folder:source" => (proc do |folder:, source:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/findings/#{finding}/securityMarks" + end), + "finding:project:source" => (proc do |project:, source:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "projects/#{project}/sources/#{source}/findings/#{finding}/securityMarks" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Simulation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/simulations/{simulation}` + # + # @param organization [String] + # @param simulation [String] + # + # @return [::String] + def simulation_path organization:, simulation: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/simulations/#{simulation}" + end + + ## + # Create a fully-qualified Source resource string. + # + # @overload source_path(organization:, source:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}` + # + # @param organization [String] + # @param source [String] + # + # @overload source_path(folder:, source:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}` + # + # @param folder [String] + # @param source [String] + # + # @overload source_path(project:, source:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}` + # + # @param project [String] + # @param source [String] + # + # @return [::String] + def source_path **args + resources = { + "organization:source" => (proc do |organization:, source:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}" + end), + "folder:source" => (proc do |folder:, source:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/sources/#{source}" + end), + "project:source" => (proc do |project:, source:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/sources/#{source}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified TableDataProfile resource string. + # + # @overload table_data_profile_path(project:, table_profile:) + # The resource will be in the following format: + # + # `projects/{project}/tableProfiles/{table_profile}` + # + # @param project [String] + # @param table_profile [String] + # + # @overload table_data_profile_path(project:, location:, table_profile:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/tableProfiles/{table_profile}` + # + # @param project [String] + # @param location [String] + # @param table_profile [String] + # + # @return [::String] + def table_data_profile_path **args + resources = { + "project:table_profile" => (proc do |project:, table_profile:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/tableProfiles/#{table_profile}" + end), + "location:project:table_profile" => (proc do |project:, location:, table_profile:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/tableProfiles/#{table_profile}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Topic resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/topics/{topic}` + # + # @param project [String] + # @param topic [String] + # + # @return [::String] + def topic_path project:, topic: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/topics/#{topic}" + end + + ## + # Create a fully-qualified ValuedResource resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # + # @param organization [String] + # @param simulation [String] + # @param valued_resource [String] + # + # @return [::String] + def valued_resource_path organization:, simulation:, valued_resource: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" + + "organizations/#{organization}/simulations/#{simulation}/valuedResources/#{valued_resource}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb new file mode 100644 index 000000000000..9148bffe706d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security_center/v1/version" + +require "google/cloud/security_center/v1/security_center/credentials" +require "google/cloud/security_center/v1/security_center/paths" +require "google/cloud/security_center/v1/security_center/rest/operations" +require "google/cloud/security_center/v1/security_center/rest/client" + +module Google + module Cloud + module SecurityCenter + module V1 + ## + # V1 APIs for Security Center service. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/security_center/v1/security_center/rest" + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + module SecurityCenter + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/security_center/v1/security_center/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb new file mode 100644 index 000000000000..f6a0a8b930bb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb @@ -0,0 +1,6970 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securitycenter/v1/securitycenter_service_pb" +require "google/cloud/security_center/v1/security_center/rest/service_stub" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + module Rest + ## + # REST client for the SecurityCenter service. + # + # V1 APIs for Security Center service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :security_center_stub + + ## + # Configure the SecurityCenter Client class. + # + # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenter clients + # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecurityCenter", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.create_source.timeout = 60.0 + + default_config.rpcs.create_finding.timeout = 60.0 + + default_config.rpcs.create_notification_config.timeout = 60.0 + + default_config.rpcs.delete_notification_config.timeout = 60.0 + + default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_notification_config.timeout = 60.0 + default_config.rpcs.get_notification_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_organization_settings.timeout = 60.0 + default_config.rpcs.get_organization_settings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_source.timeout = 60.0 + default_config.rpcs.get_source.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_assets.timeout = 480.0 + default_config.rpcs.group_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_findings.timeout = 480.0 + default_config.rpcs.group_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_assets.timeout = 480.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_findings.timeout = 480.0 + default_config.rpcs.list_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_notification_configs.timeout = 60.0 + default_config.rpcs.list_notification_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_sources.timeout = 60.0 + default_config.rpcs.list_sources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.run_asset_discovery.timeout = 60.0 + + default_config.rpcs.set_finding_state.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_finding.timeout = 60.0 + + default_config.rpcs.update_notification_config.timeout = 60.0 + + default_config.rpcs.update_organization_settings.timeout = 60.0 + + default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.update_source.timeout = 60.0 + + default_config.rpcs.update_security_marks.timeout = 480.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @security_center_stub.universe_domain + end + + ## + # Create a new SecurityCenter REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecurityCenter client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @security_center_stub = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @security_center_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @security_center_stub.logger + end + + # Service calls + + ## + # Kicks off an LRO to bulk mute findings for a parent based on a filter. The + # parent can be either an organization, folder or project. The findings + # matched by the filter will be muted after the LRO is done. + # + # @overload bulk_mute_findings(request, options = nil) + # Pass arguments to `bulk_mute_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil, mute_state: nil) + # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, at which bulk action needs to be applied. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param filter [::String] + # Expression that identifies findings that should be updated. + # The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @param mute_annotation [::String] + # This can be a mute configuration name or any identifier for mute/unmute + # of findings based on the filter. + # @param mute_state [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] + # Optional. All findings matching the given filter will have their mute state + # set to this value. The default value is `MUTED`. Setting this to + # `UNDEFINED` will clear the mute state on all matching findings. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new + # + # # Call the bulk_mute_findings method. + # result = client.bulk_mute_findings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_mute_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.bulk_mute_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_mute_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.bulk_mute_findings request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the + # given CRM parent, and also creates inherited + # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given + # parent. These modules are enabled by default. + # + # @overload create_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil) + # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new custom module's parent. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. SecurityHealthAnalytics custom module to create. The provided + # name is ignored and reset with provided parent information and + # server-generated ID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the create_security_health_analytics_custom_module method. + # result = client.create_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def create_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a source. + # + # @overload create_source(request, options = nil) + # Pass arguments to `create_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_source(parent: nil, source: nil) + # Pass arguments to `create_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new source's parent. Its format should be + # `organizations/[organization_id]`. + # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] + # Required. The Source being created, only the display_name and description + # will be used. All other fields will be ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new + # + # # Call the create_source method. + # result = client.create_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def create_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a finding. The corresponding source must exist for finding creation + # to succeed. + # + # @overload create_finding(request, options = nil) + # Pass arguments to `create_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_finding(parent: nil, finding_id: nil, finding: nil) + # Pass arguments to `create_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new finding's parent. Its format should be + # `organizations/[organization_id]/sources/[source_id]`. + # @param finding_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be alphanumeric and less than or equal to 32 characters and + # greater than 0 characters in length. + # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] + # Required. The Finding being created. The name and security_marks will be + # ignored as they are both output only fields on this resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new + # + # # Call the create_finding method. + # result = client.create_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def create_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_finding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_finding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a mute config. + # + # @overload create_mute_config(request, options = nil) + # Pass arguments to `create_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) + # Pass arguments to `create_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new mute configs's parent. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] + # Required. The mute config being created. + # @param mute_config_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new + # + # # Call the create_mute_config method. + # result = client.create_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def create_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a notification config. + # + # @overload create_notification_config(request, options = nil) + # Pass arguments to `create_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) + # Pass arguments to `create_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new notification config's parent. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param config_id [::String] + # Required. + # Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters and contain alphanumeric + # characters, underscores, or hyphens only. + # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] + # Required. The notification config being created. The name and the service + # account will be ignored as they are both output only fields on this + # resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new + # + # # Call the create_notification_config method. + # result = client.create_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def create_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing mute config. + # + # @overload delete_mute_config(request, options = nil) + # Pass arguments to `delete_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_mute_config(name: nil) + # Pass arguments to `delete_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to delete. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new + # + # # Call the delete_mute_config method. + # result = client.delete_mute_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a notification config. + # + # @overload delete_notification_config(request, options = nil) + # Pass arguments to `delete_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_notification_config(name: nil) + # Pass arguments to `delete_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to delete. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new + # + # # Call the delete_notification_config method. + # result = client.delete_notification_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its + # descendants in the CRM hierarchy. This method is only supported for + # resident custom modules. + # + # @overload delete_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_security_health_analytics_custom_module(name: nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to delete. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the delete_security_health_analytics_custom_module method. + # result = client.delete_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the simulation by name or the latest simulation for the given + # organization. + # + # @overload get_simulation(request, options = nil) + # Pass arguments to `get_simulation` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSimulationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_simulation(name: nil) + # Pass arguments to `get_simulation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The organization name or simulation name of this simulation + # + # Valid format: + # `organizations/{organization}/simulations/latest` + # `organizations/{organization}/simulations/{simulation}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Simulation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Simulation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new + # + # # Call the get_simulation method. + # result = client.get_simulation request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. + # p result + # + def get_simulation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_simulation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_simulation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_simulation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the valued resource by name + # + # @overload get_valued_resource(request, options = nil) + # Pass arguments to `get_valued_resource` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_valued_resource(name: nil) + # Pass arguments to `get_valued_resource` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of this valued resource + # + # Valid format: + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new + # + # # Call the get_valued_resource method. + # result = client.get_valued_resource request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. + # p result + # + def get_valued_resource request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_valued_resource.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_valued_resource.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_valued_resource request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a BigQuery export. + # + # @overload get_big_query_export(request, options = nil) + # Pass arguments to `get_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_big_query_export(name: nil) + # Pass arguments to `get_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the BigQuery export to retrieve. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new + # + # # Call the get_big_query_export method. + # result = client.get_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def get_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy on the specified Source. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a mute config. + # + # @overload get_mute_config(request, options = nil) + # Pass arguments to `get_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_mute_config(name: nil) + # Pass arguments to `get_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to retrieve. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new + # + # # Call the get_mute_config method. + # result = client.get_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def get_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a notification config. + # + # @overload get_notification_config(request, options = nil) + # Pass arguments to `get_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_notification_config(name: nil) + # Pass arguments to `get_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to get. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new + # + # # Call the get_notification_config method. + # result = client.get_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def get_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the settings for an organization. + # + # @overload get_organization_settings(request, options = nil) + # Pass arguments to `get_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_organization_settings(name: nil) + # Pass arguments to `get_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the organization to get organization settings for. Its + # format is `organizations/[organization_id]/organizationSettings`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new + # + # # Call the get_organization_settings method. + # result = client.get_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + # p result + # + def get_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_organization_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. + # + # @overload get_effective_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_effective_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the effective custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_effective_security_health_analytics_custom_module method. + # result = client.get_effective_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p result + # + def get_effective_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_effective_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a SecurityHealthAnalyticsCustomModule. + # + # @overload get_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_security_health_analytics_custom_module method. + # result = client.get_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def get_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a source. + # + # @overload get_source(request, options = nil) + # Pass arguments to `get_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_source(name: nil) + # Pass arguments to `get_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Relative resource name of the source. Its format is + # `organizations/[organization_id]/source/[source_id]`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new + # + # # Call the get_source method. + # result = client.get_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def get_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization's assets and groups them by their specified + # properties. + # + # @overload group_assets(request, options = nil) + # Pass arguments to `group_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent to group the assets by. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: + # "security_center_properties.resource_project,security_center_properties.project". + # + # The following fields are supported when compare_duration is not set: + # + # * security_center_properties.resource_project + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_type + # * security_center_properties.resource_parent + # * security_center_properties.resource_parent_display_name + # + # The following fields are supported when compare_duration is set: + # + # * security_center_properties.resource_type + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_parent_display_name + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" property is + # updated to indicate whether the asset was added, removed, or remained + # present during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at reference_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at reference_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and reference_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param page_token [::String] + # The value returned by the last `GroupAssetsResponse`; indicates + # that this is a continuation of a prior `GroupAssets` call, and that the + # system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new + # + # # Call the group_assets method. + # result = client.group_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + # p item + # end + # + def group_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.group_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.group_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.group_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.group_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_assets, "group_by_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization or source's findings and groups them by their + # specified properties. + # + # To group across all sources provide a `-` as the source id. + # Example: /v1/organizations/\\{organization_id}/sources/-/findings, + # /v1/folders/\\{folder_id}/sources/-/findings, + # /v1/projects/\\{project_id}/sources/-/findings + # + # @overload group_findings(request, options = nil) + # Pass arguments to `group_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source to groupBy. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, + # or `projects/{project_id}/sources/-` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping + # (including `state_change`). The string value should follow SQL syntax: + # comma separated list of fields. For example: "parent,resource_name". + # + # The following fields are supported when compare_duration is set: + # + # * state_change + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" attribute is + # updated to indicate whether the finding had its state changed, the + # finding's state remained unchanged, or if the finding was added during the + # compare_duration period of time that precedes the read_time. This is the + # time between (read_time - compare_duration) and read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present + # at read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param page_token [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new + # + # # Call the group_findings method. + # result = client.group_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + # p item + # end + # + def group_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.group_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.group_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.group_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.group_findings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization's assets. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource that contains the assets. The + # value that you can specify on parent depends on the method in which you + # specify parent. You can specify one of the following values: + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following are the allowed field and operator combinations: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,resource_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,resource_properties.a_property" and " + # name desc , resource_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # update_time + # resource_properties + # security_marks.marks + # security_center_properties.resource_name + # security_center_properties.resource_display_name + # security_center_properties.resource_parent + # security_center_properties.resource_parent_display_name + # security_center_properties.resource_project + # security_center_properties.resource_project_display_name + # security_center_properties.resource_type + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListAssetsResult's "state_change" + # attribute is updated to indicate whether the asset was added, removed, or + # remained present during the compare_duration period of time that precedes + # the read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at read_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at read_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the ListAssetsResult fields to be listed in the + # response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListAssetsResponse`; indicates + # that this is a continuation of a prior `ListAssets` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_assets, "list_assets_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all resident SecurityHealthAnalyticsCustomModules under + # the given CRM parent and all of the parent’s CRM descendants. + # + # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list descendant custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_descendant_security_health_analytics_custom_modules method. + # result = client.list_descendant_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_descendant_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_descendant_security_health_analytics_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization or source's findings. + # + # To list across all sources provide a `-` as the source id. + # Example: /v1/organizations/\\{organization_id}/sources/-/findings + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source the findings belong to. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To list across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-`, + # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.display_name: `=`, `:` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,source_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,source_properties.a_property" and " + # name desc , source_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # source_properties + # security_marks.marks + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListFindingsResult's "state_change" + # attribute is updated to indicate whether the finding had its state changed, + # the finding's state remained unchanged, or if the finding was added in any + # state during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_findings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists mute configs. + # + # @overload list_mute_configs(request, options = nil) + # Pass arguments to `list_mute_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_mute_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of mute configs. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListMuteConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMuteConfigs` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new + # + # # Call the list_mute_configs method. + # result = client.list_mute_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. + # p item + # end + # + def list_mute_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_mute_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_mute_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_mute_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_mute_configs, "mute_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists notification configs. + # + # @overload list_notification_configs(request, options = nil) + # Pass arguments to `list_notification_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_notification_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent in which to list the notification + # configurations. Its format is "organizations/[organization_id]", + # "folders/[folder_id]", or "projects/[project_id]". + # @param page_token [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new + # + # # Call the list_notification_configs method. + # result = client.list_notification_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p item + # end + # + def list_notification_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_notification_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_notification_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_notification_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the + # given parent. This includes resident modules defined at the scope of the + # parent, and inherited modules, inherited from CRM ancestors. + # + # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list effective custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_effective_security_health_analytics_custom_modules method. + # result = client.list_effective_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_effective_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_effective_security_health_analytics_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_security_health_analytics_custom_modules, "effective_security_health_analytics_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all SecurityHealthAnalyticsCustomModules for the given + # parent. This includes resident modules defined at the scope of the parent, + # and inherited modules, inherited from CRM ancestors. + # + # @overload list_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # The value returned by the last call indicating a continuation + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_security_health_analytics_custom_modules method. + # result = client.list_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_security_health_analytics_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all sources belonging to an organization. + # + # @overload list_sources(request, options = nil) + # Pass arguments to `list_sources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent of sources to list. Its format should + # be `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param page_token [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new + # + # # Call the list_sources method. + # result = client.list_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. + # p item + # end + # + def list_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs asset discovery. The discovery is tracked with a long-running + # operation. + # + # This API can only be called with limited frequency for an organization. If + # it is called too frequently the caller will receive a TOO_MANY_REQUESTS + # error. + # + # @overload run_asset_discovery(request, options = nil) + # Pass arguments to `run_asset_discovery` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_asset_discovery(parent: nil) + # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization to run asset discovery for. Its format + # is `organizations/[organization_id]`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new + # + # # Call the run_asset_discovery method. + # result = client.run_asset_discovery request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_asset_discovery request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_asset_discovery.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_asset_discovery.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.run_asset_discovery request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the state of a finding. + # + # @overload set_finding_state(request, options = nil) + # Pass arguments to `set_finding_state` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_finding_state(name: nil, state: nil, start_time: nil) + # Pass arguments to `set_finding_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @param state [::Google::Cloud::SecurityCenter::V1::Finding::State] + # Required. The desired State of the finding. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The time at which the updated state takes effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new + # + # # Call the set_finding_state method. + # result = client.set_finding_state request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def set_finding_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_finding_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_finding_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.set_finding_state request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the mute state of a finding. + # + # @overload set_mute(request, options = nil) + # Pass arguments to `set_mute` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SetMuteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_mute(name: nil, mute: nil) + # Pass arguments to `set_mute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute] + # Required. The desired state of the Mute. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new + # + # # Call the set_mute method. + # result = client.set_mute request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def set_mute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetMuteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_mute.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_mute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_mute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.set_mute request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified Source. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has on the specified source. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + # + # @overload simulate_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative resource name of the organization, project, or + # folder. For more information about relative resource names, see [Relative + # Resource + # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # Example: `organizations/{organization_id}` + # @param custom_config [::Google::Cloud::SecurityCenter::V1::CustomConfig, ::Hash] + # Required. The custom configuration that you need to test. + # @param resource [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] + # Required. Resource data to simulate custom module against. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the simulate_security_health_analytics_custom_module method. + # result = client.simulate_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. + # p result + # + def simulate_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.simulate_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates external system. This is for a given finding. + # + # @overload update_external_system(request, options = nil) + # Pass arguments to `update_external_system` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_external_system(external_system: nil, update_mask: nil) + # Pass arguments to `update_external_system` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param external_system [::Google::Cloud::SecurityCenter::V1::ExternalSystem, ::Hash] + # Required. The external system resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the external system resource. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new + # + # # Call the update_external_system method. + # result = client.update_external_system request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. + # p result + # + def update_external_system request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_external_system.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_external_system.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_external_system request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a finding. The corresponding source must exist for a + # finding creation to succeed. + # + # @overload update_finding(request, options = nil) + # Pass arguments to `update_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_finding(finding: nil, update_mask: nil) + # Pass arguments to `update_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] + # Required. The finding resource to update or create if it does not already + # exist. parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new + # + # # Call the update_finding method. + # result = client.update_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + # p result + # + def update_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_finding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_finding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a mute config. + # + # @overload update_mute_config(request, options = nil) + # Pass arguments to `update_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_mute_config(mute_config: nil, update_mask: nil) + # Pass arguments to `update_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] + # Required. The mute config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new + # + # # Call the update_mute_config method. + # result = client.update_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + # p result + # + def update_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + # + # @overload update_notification_config(request, options = nil) + # Pass arguments to `update_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_notification_config(notification_config: nil, update_mask: nil) + # Pass arguments to `update_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] + # Required. The notification config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new + # + # # Call the update_notification_config method. + # result = client.update_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + # p result + # + def update_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an organization's settings. + # + # @overload update_organization_settings(request, options = nil) + # Pass arguments to `update_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_organization_settings(organization_settings: nil, update_mask: nil) + # Pass arguments to `update_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param organization_settings [::Google::Cloud::SecurityCenter::V1::OrganizationSettings, ::Hash] + # Required. The organization settings resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the settings resource. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new + # + # # Call the update_organization_settings method. + # result = client.update_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + # p result + # + def update_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_organization_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the SecurityHealthAnalyticsCustomModule under the given name based + # on the given update mask. Updating the enablement state is supported on + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name and custom + # config of a module is supported on resident modules only. + # + # @overload update_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_security_health_analytics_custom_module(security_health_analytics_custom_module: nil, update_mask: nil) + # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. The SecurityHealthAnalytics custom module to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. The only fields that can be updated are + # `enablement_state` and `custom_config`. If empty or set to the wildcard + # value `*`, both `enablement_state` and `custom_config` are updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the update_security_health_analytics_custom_module method. + # result = client.update_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def update_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a source. + # + # @overload update_source(request, options = nil) + # Pass arguments to `update_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_source(source: nil, update_mask: nil) + # Pass arguments to `update_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] + # Required. The source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new + # + # # Call the update_source method. + # result = client.update_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + # p result + # + def update_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates security marks. + # + # @overload update_security_marks(request, options = nil) + # Pass arguments to `update_security_marks` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) + # Pass arguments to `update_security_marks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_marks [::Google::Cloud::SecurityCenter::V1::SecurityMarks, ::Hash] + # Required. The security marks resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # The time at which the updated SecurityMarks take effect. + # If not set uses current server time. Updates will be applied to the + # SecurityMarks that are active immediately preceding this time. Must be + # earlier or equal to the server time. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new + # + # # Call the update_security_marks method. + # result = client.update_security_marks request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. + # p result + # + def update_security_marks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_security_marks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_security_marks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_security_marks request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a BigQuery export. + # + # @overload create_big_query_export(request, options = nil) + # Pass arguments to `create_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) + # Pass arguments to `create_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource of the new BigQuery export. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] + # Required. The BigQuery export being created. + # @param big_query_export_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new + # + # # Call the create_big_query_export method. + # result = client.create_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def create_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing BigQuery export. + # + # @overload delete_big_query_export(request, options = nil) + # Pass arguments to `delete_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_big_query_export(name: nil) + # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the BigQuery export to delete. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new + # + # # Call the delete_big_query_export method. + # result = client.delete_big_query_export request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a BigQuery export. + # + # @overload update_big_query_export(request, options = nil) + # Pass arguments to `update_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_big_query_export(big_query_export: nil, update_mask: nil) + # Pass arguments to `update_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] + # Required. The BigQuery export being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new + # + # # Call the update_big_query_export method. + # result = client.update_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p result + # + def update_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BigQuery exports. Note that when requesting BigQuery exports at a + # given level all exports under that level are also returned e.g. if + # requesting BigQuery exports under a folder, then all BigQuery exports + # immediately under the folder plus the ones created under the projects + # within the folder are returned. + # + # @overload list_big_query_exports(request, options = nil) + # Pass arguments to `list_big_query_exports` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of BigQuery exports. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListBigQueryExports` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListBigQueryExports` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new + # + # # Call the list_big_query_exports method. + # result = client.list_big_query_exports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. + # p item + # end + # + def list_big_query_exports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_big_query_exports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_big_query_exports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_big_query_exports request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_big_query_exports, "big_query_exports", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident Event Threat Detection custom module at the scope of the + # given Resource Manager parent, and also creates inherited custom modules + # for all descendants of the given parent. These modules are enabled by + # default. + # + # @overload create_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil) + # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The new custom module's parent. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module to create. The + # event_threat_detection_custom_module.name will be ignored and server + # generated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new + # + # # Call the create_event_threat_detection_custom_module method. + # result = client.create_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def create_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified Event Threat Detection custom module and all of its + # descendants in the Resource Manager hierarchy. This method is only + # supported for resident custom modules. + # + # @overload delete_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_event_threat_detection_custom_module(name: nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to delete. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new + # + # # Call the delete_event_threat_detection_custom_module method. + # result = client.delete_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Event Threat Detection custom module. + # + # @overload get_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the custom module to get. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_event_threat_detection_custom_module method. + # result = client.get_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def get_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all resident Event Threat Detection custom modules under the + # given Resource Manager parent and its descendants. + # + # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDescendantEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_descendant_event_threat_detection_custom_modules method. + # result = client.list_descendant_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_descendant_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_descendant_event_threat_detection_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Event Threat Detection custom modules for the given + # Resource Manager parent. This includes resident modules defined at the + # scope of the parent along with modules inherited from ancestors. + # + # @overload list_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListEventThreatDetectionCustomModules` must match the call that provided + # the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_event_threat_detection_custom_modules method. + # result = client.list_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_event_threat_detection_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Event Threat Detection custom module with the given name based + # on the given update mask. Updating the enablement state is supported for + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name or + # configuration of a module is supported for resident modules only. The type + # of a module cannot be changed. + # + # @overload update_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_event_threat_detection_custom_module(event_threat_detection_custom_module: nil, update_mask: nil) + # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new + # + # # Call the update_event_threat_detection_custom_module method. + # result = client.update_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + # p result + # + def update_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Validates the given Event Threat Detection custom module. + # + # @overload validate_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent to validate the Custom Module under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param raw_text [::String] + # Required. The raw text of the module's contents. Used to generate error + # messages. + # @param type [::String] + # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new + # + # # Call the validate_event_threat_detection_custom_module method. + # result = client.validate_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. + # p result + # + def validate_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.validate_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an effective Event Threat Detection custom module at the given level. + # + # @overload get_effective_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_effective_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the effective Event Threat Detection custom + # module. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_effective_event_threat_detection_custom_module method. + # result = client.get_effective_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + # p result + # + def get_effective_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_effective_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all effective Event Threat Detection custom modules for the + # given parent. This includes resident modules defined at the scope of the + # parent along with modules inherited from its ancestors. + # + # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent to list custom modules for. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @param page_token [::String] + # A page token, received from a previous + # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListEffectiveEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @param page_size [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_effective_event_threat_detection_custom_modules method. + # result = client.list_effective_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + # p item + # end + # + def list_effective_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_effective_event_threat_detection_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_event_threat_detection_custom_modules, "effective_event_threat_detection_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a ResourceValueConfig for an organization. Maps user's tags to + # difference resource values for use by the attack path simulation. + # + # @overload batch_create_resource_value_configs(request, options = nil) + # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_create_resource_value_configs(parent: nil, requests: nil) + # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # The parent field in the CreateResourceValueConfigRequest + # messages must either be empty or match this field. + # @param requests [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, ::Hash>] + # Required. The resource value configs to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new + # + # # Call the batch_create_resource_value_configs method. + # result = client.batch_create_resource_value_configs request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. + # p result + # + def batch_create_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.batch_create_resource_value_configs request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a ResourceValueConfig. + # + # @overload delete_resource_value_config(request, options = nil) + # Pass arguments to `delete_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_resource_value_config(name: nil) + # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the ResourceValueConfig to delete + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new + # + # # Call the delete_resource_value_config method. + # result = client.delete_resource_value_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_resource_value_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a ResourceValueConfig. + # + # @overload get_resource_value_config(request, options = nil) + # Pass arguments to `get_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_resource_value_config(name: nil) + # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource value config to retrieve. Its format is + # `organizations/{organization}/resourceValueConfigs/{config_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new + # + # # Call the get_resource_value_config method. + # result = client.get_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p result + # + def get_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_resource_value_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all ResourceValueConfigs. + # + # @overload list_resource_value_configs(request, options = nil) + # Pass arguments to `list_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of resource value configs. + # Its format is + # `organizations/[organization_id]` + # @param page_size [::Integer] + # The number of results to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListResourceValueConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListResourceValueConfigs` must match the call that provided the + # page token. + # + # page_size can be specified, and the new page_size will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new + # + # # Call the list_resource_value_configs method. + # result = client.list_resource_value_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p item + # end + # + def list_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_resource_value_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, "resource_value_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing ResourceValueConfigs with new rules. + # + # @overload update_resource_value_config(request, options = nil) + # Pass arguments to `update_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) + # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_value_config [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig, ::Hash] + # Required. The resource value config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new + # + # # Call the update_resource_value_config method. + # result = client.update_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + # p result + # + def update_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_resource_value_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the valued resources for a set of simulation results and filter. + # + # @overload list_valued_resources(request, options = nil) + # Pass arguments to `list_valued_resources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) + # Pass arguments to `list_valued_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list valued resources. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # @param filter [::String] + # The filter expression that filters the valued resources in the response. + # Supported fields: + # + # * `resource_value` supports = + # * `resource_type` supports = + # @param page_token [::String] + # The value returned by the last `ListValuedResourcesResponse`; indicates + # that this is a continuation of a prior `ListValuedResources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param order_by [::String] + # Optional. The fields by which to order the valued resources response. + # + # Supported fields: + # + # * `exposed_score` + # + # * `resource_value` + # + # * `resource_type` + # + # * `resource` + # + # * `display_name` + # + # Values should be a comma separated list of fields. For example: + # `exposed_score,resource_value`. + # + # The default sorting order is descending. To specify ascending or descending + # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for + # example: `exposed_score DESC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new + # + # # Call the list_valued_resources method. + # result = client.list_valued_resources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. + # p item + # end + # + def list_valued_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_valued_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_valued_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_valued_resources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_valued_resources, "valued_resources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the attack paths for a set of simulation results or valued resources + # and filter. + # + # @overload list_attack_paths(request, options = nil) + # Pass arguments to `list_attack_paths` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_attack_paths` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list attack paths. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @param filter [::String] + # The filter expression that filters the attack path in the response. + # Supported fields: + # + # * `valued_resources` supports = + # @param page_token [::String] + # The value returned by the last `ListAttackPathsResponse`; indicates + # that this is a continuation of a prior `ListAttackPaths` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new + # + # # Call the list_attack_paths method. + # result = client.list_attack_paths request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. + # p item + # end + # + def list_attack_paths request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_attack_paths.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_attack_paths.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_attack_paths request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_attack_paths, "attack_paths", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecurityCenter REST API. + # + # This class represents the configuration for SecurityCenter REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # bulk_mute_findings to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.bulk_mute_findings.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.bulk_mute_findings.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the SecurityCenter API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `bulk_mute_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_mute_findings + ## + # RPC-specific configuration for `create_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_security_health_analytics_custom_module + ## + # RPC-specific configuration for `create_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_source + ## + # RPC-specific configuration for `create_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_finding + ## + # RPC-specific configuration for `create_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_mute_config + ## + # RPC-specific configuration for `create_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_config + ## + # RPC-specific configuration for `delete_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_mute_config + ## + # RPC-specific configuration for `delete_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_config + ## + # RPC-specific configuration for `delete_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_simulation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_simulation + ## + # RPC-specific configuration for `get_valued_resource` + # @return [::Gapic::Config::Method] + # + attr_reader :get_valued_resource + ## + # RPC-specific configuration for `get_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :get_big_query_export + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `get_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mute_config + ## + # RPC-specific configuration for `get_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_config + ## + # RPC-specific configuration for `get_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_organization_settings + ## + # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_security_health_analytics_custom_module + ## + # RPC-specific configuration for `get_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_source + ## + # RPC-specific configuration for `group_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :group_assets + ## + # RPC-specific configuration for `group_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :group_findings + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_mute_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_mute_configs + ## + # RPC-specific configuration for `list_notification_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_configs + ## + # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sources + ## + # RPC-specific configuration for `run_asset_discovery` + # @return [::Gapic::Config::Method] + # + attr_reader :run_asset_discovery + ## + # RPC-specific configuration for `set_finding_state` + # @return [::Gapic::Config::Method] + # + attr_reader :set_finding_state + ## + # RPC-specific configuration for `set_mute` + # @return [::Gapic::Config::Method] + # + attr_reader :set_mute + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `simulate_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :simulate_security_health_analytics_custom_module + ## + # RPC-specific configuration for `update_external_system` + # @return [::Gapic::Config::Method] + # + attr_reader :update_external_system + ## + # RPC-specific configuration for `update_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_finding + ## + # RPC-specific configuration for `update_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_mute_config + ## + # RPC-specific configuration for `update_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_config + ## + # RPC-specific configuration for `update_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_organization_settings + ## + # RPC-specific configuration for `update_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_health_analytics_custom_module + ## + # RPC-specific configuration for `update_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_source + ## + # RPC-specific configuration for `update_security_marks` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_marks + ## + # RPC-specific configuration for `create_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :create_big_query_export + ## + # RPC-specific configuration for `delete_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_big_query_export + ## + # RPC-specific configuration for `update_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :update_big_query_export + ## + # RPC-specific configuration for `list_big_query_exports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_big_query_exports + ## + # RPC-specific configuration for `create_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_event_threat_detection_custom_module + ## + # RPC-specific configuration for `delete_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_event_threat_detection_custom_module + ## + # RPC-specific configuration for `get_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_event_threat_detection_custom_module + ## + # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `list_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `update_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_event_threat_detection_custom_module + ## + # RPC-specific configuration for `validate_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :validate_event_threat_detection_custom_module + ## + # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_event_threat_detection_custom_module + ## + # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `batch_create_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_resource_value_configs + ## + # RPC-specific configuration for `delete_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_resource_value_config + ## + # RPC-specific configuration for `get_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_value_config + ## + # RPC-specific configuration for `list_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_value_configs + ## + # RPC-specific configuration for `update_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_resource_value_config + ## + # RPC-specific configuration for `list_valued_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_valued_resources + ## + # RPC-specific configuration for `list_attack_paths` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attack_paths + + # @private + def initialize parent_rpcs = nil + bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings + @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config + create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module + @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config + create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source + @create_source = ::Gapic::Config::Method.new create_source_config + create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding + @create_finding = ::Gapic::Config::Method.new create_finding_config + create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config + @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config + create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config + @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config + delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config + @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config + delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config + @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config + delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module + @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config + get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation + @get_simulation = ::Gapic::Config::Method.new get_simulation_config + get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource + @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config + get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export + @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config + @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config + get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config + @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config + get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings + @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config + get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module + @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config + get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module + @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config + get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source + @get_source = ::Gapic::Config::Method.new get_source_config + group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets + @group_assets = ::Gapic::Config::Method.new group_assets_config + group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings + @group_findings = ::Gapic::Config::Method.new group_findings_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules + @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs + @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config + list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs + @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config + list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules + @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config + list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules + @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config + list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources + @list_sources = ::Gapic::Config::Method.new list_sources_config + run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery + @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config + set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state + @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config + set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute + @set_mute = ::Gapic::Config::Method.new set_mute_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module + @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config + update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system + @update_external_system = ::Gapic::Config::Method.new update_external_system_config + update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding + @update_finding = ::Gapic::Config::Method.new update_finding_config + update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config + @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config + update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config + @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config + update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings + @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config + update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module + @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config + update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source + @update_source = ::Gapic::Config::Method.new update_source_config + update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks + @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config + create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export + @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config + delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export + @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config + update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export + @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config + list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports + @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config + create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module + @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config + delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module + @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config + get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module + @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config + list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules + @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config + list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules + @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config + update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module + @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config + validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module + @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config + get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module + @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config + list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules + @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config + batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs + @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config + delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config + @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config + get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config + @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config + list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs + @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config + update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config + @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config + list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources + @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config + list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths + @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb new file mode 100644 index 000000000000..dd74065d2724 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb @@ -0,0 +1,926 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SecurityCenter Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb new file mode 100644 index 000000000000..6b84754bb951 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb @@ -0,0 +1,4766 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/securitycenter/v1/securitycenter_service_pb" + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + module Rest + ## + # REST service stub for the SecurityCenter service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the bulk_mute_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def bulk_mute_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_mute_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "bulk_mute_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def create_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # A result object deserialized from the server's reply + def create_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # A result object deserialized from the server's reply + def create_finding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_finding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_finding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # A result object deserialized from the server's reply + def create_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # A result object deserialized from the server's reply + def create_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_simulation REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Simulation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Simulation] + # A result object deserialized from the server's reply + def get_simulation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_simulation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_simulation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Simulation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_valued_resource REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] + # A result object deserialized from the server's reply + def get_valued_resource request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_valued_resource_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_valued_resource", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ValuedResource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # A result object deserialized from the server's reply + def get_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # A result object deserialized from the server's reply + def get_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # A result object deserialized from the server's reply + def get_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # A result object deserialized from the server's reply + def get_organization_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_organization_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_organization_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_effective_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def get_effective_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_effective_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def get_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # A result object deserialized from the server's reply + def get_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the group_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse] + # A result object deserialized from the server's reply + def group_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_group_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "group_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the group_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse] + # A result object deserialized from the server's reply + def group_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_group_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "group_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse] + # A result object deserialized from the server's reply + def list_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_descendant_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] + # A result object deserialized from the server's reply + def list_descendant_security_health_analytics_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_descendant_security_health_analytics_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse] + # A result object deserialized from the server's reply + def list_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_mute_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse] + # A result object deserialized from the server's reply + def list_mute_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_mute_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_mute_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_notification_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse] + # A result object deserialized from the server's reply + def list_notification_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_notification_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_effective_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] + # A result object deserialized from the server's reply + def list_effective_security_health_analytics_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_security_health_analytics_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_effective_security_health_analytics_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse] + # A result object deserialized from the server's reply + def list_security_health_analytics_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_security_health_analytics_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_security_health_analytics_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_sources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListSourcesResponse] + # A result object deserialized from the server's reply + def list_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the run_asset_discovery REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def run_asset_discovery request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_asset_discovery_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_asset_discovery", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_finding_state REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # A result object deserialized from the server's reply + def set_finding_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_finding_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_finding_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_mute REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetMuteRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # A result object deserialized from the server's reply + def set_mute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_mute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_mute", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the simulate_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # A result object deserialized from the server's reply + def simulate_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_simulate_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "simulate_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_external_system REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # A result object deserialized from the server's reply + def update_external_system request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_external_system_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_external_system", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # A result object deserialized from the server's reply + def update_finding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_finding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_finding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # A result object deserialized from the server's reply + def update_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # A result object deserialized from the server's reply + def update_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # A result object deserialized from the server's reply + def update_organization_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_organization_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_organization_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def update_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # A result object deserialized from the server's reply + def update_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_security_marks REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # A result object deserialized from the server's reply + def update_security_marks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_security_marks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_security_marks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # A result object deserialized from the server's reply + def create_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # A result object deserialized from the server's reply + def update_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_big_query_exports REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse] + # A result object deserialized from the server's reply + def list_big_query_exports request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_big_query_exports_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_big_query_exports", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def create_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def get_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_descendant_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse] + # A result object deserialized from the server's reply + def list_descendant_event_threat_detection_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_descendant_event_threat_detection_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse] + # A result object deserialized from the server's reply + def list_event_threat_detection_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_event_threat_detection_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_event_threat_detection_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def update_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the validate_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] + # A result object deserialized from the server's reply + def validate_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_validate_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "validate_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_effective_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def get_effective_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_effective_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_effective_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] + # A result object deserialized from the server's reply + def list_effective_event_threat_detection_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_event_threat_detection_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_effective_event_threat_detection_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_create_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] + # A result object deserialized from the server's reply + def batch_create_resource_value_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_resource_value_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_create_resource_value_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_resource_value_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_resource_value_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_resource_value_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # A result object deserialized from the server's reply + def get_resource_value_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_value_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_resource_value_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse] + # A result object deserialized from the server's reply + def list_resource_value_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_value_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_resource_value_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # A result object deserialized from the server's reply + def update_resource_value_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_resource_value_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_resource_value_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_valued_resources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse] + # A result object deserialized from the server's reply + def list_valued_resources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_valued_resources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_valued_resources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_attack_paths REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse] + # A result object deserialized from the server's reply + def list_attack_paths request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_attack_paths_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_attack_paths", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_mute_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_mute_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "security_health_analytics_custom_module", + matches: [ + ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "security_health_analytics_custom_module", + matches: [ + ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "security_health_analytics_custom_module", + matches: [ + ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/sources", + body: "source", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_finding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings", + body: "finding", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_simulation REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_simulation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_valued_resource REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_valued_resource_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_organization_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/organizationSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_effective_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_effective_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the group_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_group_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets:group", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets:group", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets:group", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the group_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_group_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assets", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assets", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assets", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_descendant_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/findings", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/findings", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/findings", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_mute_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_mute_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/muteConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/muteConfigs", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/muteConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_notification_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_notification_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_effective_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_effective_security_health_analytics_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_security_health_analytics_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/sources", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/sources", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/sources", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_asset_discovery REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_asset_discovery_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assets:runDiscovery", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_finding_state REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_finding_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setState", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setState", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setState", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_mute REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetMuteRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_mute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the simulate_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_simulate_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules:simulate", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules:simulate", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules:simulate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_external_system REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_external_system_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_finding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_organization_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{organization_settings.name}", + body: "organization_settings", + matches: [ + ["organization_settings.name", %r{^organizations/[^/]+/organizationSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_health_analytics_custom_module.name}", + body: "security_health_analytics_custom_module", + matches: [ + ["security_health_analytics_custom_module.name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_health_analytics_custom_module.name}", + body: "security_health_analytics_custom_module", + matches: [ + ["security_health_analytics_custom_module.name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_health_analytics_custom_module.name}", + body: "security_health_analytics_custom_module", + matches: [ + ["security_health_analytics_custom_module.name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{source.name}", + body: "source", + matches: [ + ["source.name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_security_marks REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_security_marks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_big_query_exports REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_big_query_exports_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "event_threat_detection_custom_module", + matches: [ + ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "event_threat_detection_custom_module", + matches: [ + ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customModules", + body: "event_threat_detection_custom_module", + matches: [ + ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_descendant_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules:listDescendant", + matches: [ + ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_event_threat_detection_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customModules", + matches: [ + ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{event_threat_detection_custom_module.name}", + body: "event_threat_detection_custom_module", + matches: [ + ["event_threat_detection_custom_module.name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{event_threat_detection_custom_module.name}", + body: "event_threat_detection_custom_module", + matches: [ + ["event_threat_detection_custom_module.name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{event_threat_detection_custom_module.name}", + body: "event_threat_detection_custom_module", + matches: [ + ["event_threat_detection_custom_module.name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the validate_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_validate_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:validateCustomModule", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:validateCustomModule", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:validateCustomModule", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_effective_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_effective_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_effective_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_effective_event_threat_detection_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveCustomModules", + matches: [ + ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_create_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_create_resource_value_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/resourceValueConfigs:batchCreate", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_resource_value_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_resource_value_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_resource_value_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/resourceValueConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_resource_value_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{resource_value_config.name}", + body: "resource_value_config", + matches: [ + ["resource_value_config.name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_valued_resources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_valued_resources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/valuedResources", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/valuedResources", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_attack_paths REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_attack_paths_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb new file mode 100644 index 000000000000..1c19ab7f4c05 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb new file mode 100644 index 000000000000..65cfc17f9bbb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/access.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/securitycenter/v1/access.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x89\x03\n\x06\x41\x63\x63\x65ss\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x11\n\tcaller_ip\x18\x02 \x01(\t\x12\x42\n\rcaller_ip_geo\x18\x03 \x01(\x0b\x32+.google.cloud.securitycenter.v1.Geolocation\x12\x19\n\x11user_agent_family\x18\x04 \x01(\t\x12\x12\n\nuser_agent\x18\x0c \x01(\t\x12\x14\n\x0cservice_name\x18\x05 \x01(\t\x12\x13\n\x0bmethod_name\x18\x06 \x01(\t\x12\x19\n\x11principal_subject\x18\x07 \x01(\t\x12 \n\x18service_account_key_name\x18\x08 \x01(\t\x12\x65\n\x1fservice_account_delegation_info\x18\t \x03(\x0b\x32<.google.cloud.securitycenter.v1.ServiceAccountDelegationInfo\x12\x11\n\tuser_name\x18\x0b \x01(\t\"R\n\x1cServiceAccountDelegationInfo\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x19\n\x11principal_subject\x18\x02 \x01(\t\"\"\n\x0bGeolocation\x12\x13\n\x0bregion_code\x18\x01 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v1B\x0b\x41\x63\x63\x65ssProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Access = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Access").msgclass + ServiceAccountDelegationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ServiceAccountDelegationInfo").msgclass + Geolocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Geolocation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb new file mode 100644 index 000000000000..4798bdd4a508 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/agent_anomaly.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v1/agent_anomaly.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xcc\x01\n\x0c\x41gentAnomaly\x12\x18\n\x10\x63onfidence_score\x18\x01 \x01(\x01\x12N\n\x13\x64\x65tector_references\x18\x02 \x03(\x0b\x32\x31.google.cloud.securitycenter.v1.DetectorReference\x12R\n\x15invocation_references\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v1.InvocationReference\"\x8c\x02\n\x11\x44\x65tectorReference\x12L\n\x08severity\x18\x01 \x01(\x0e\x32:.google.cloud.securitycenter.v1.DetectorReference.Severity\x12\x13\n\x0b\x64\x65tector_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x65xplanation\x18\x04 \x01(\t\x12\x16\n\x0erecommendation\x18\x05 \x01(\t\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\",\n\x13InvocationReference\x12\x15\n\rinvocation_id\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11\x41gentAnomalyProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + AgentAnomaly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AgentAnomaly").msgclass + DetectorReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DetectorReference").msgclass + DetectorReference::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DetectorReference.Severity").enummodule + InvocationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.InvocationReference").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb new file mode 100644 index 000000000000..8663de889b80 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/agent.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/cloud/securitycenter/v1/agent.proto\x12\x1egoogle.cloud.securitycenter.v1\")\n\x05\x41gent\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\tB\xe4\x01\n\"com.google.cloud.securitycenter.v1B\nAgentProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Agent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Agent").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb new file mode 100644 index 000000000000..a342edc533b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/agent_session.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v1/agent_session.proto\x12\x1egoogle.cloud.securitycenter.v1\"\"\n\x0c\x41gentSession\x12\x12\n\nsession_id\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11\x41gentSessionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + AgentSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AgentSession").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb new file mode 100644 index 000000000000..716a87e5400a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/application.proto + +require 'google/protobuf' + + +descriptor_data = "\n0google/cloud/securitycenter/v1/application.proto\x12\x1egoogle.cloud.securitycenter.v1\"1\n\x0b\x41pplication\x12\x10\n\x08\x62\x61se_uri\x18\x01 \x01(\t\x12\x10\n\x08\x66ull_uri\x18\x02 \x01(\tB\xea\x01\n\"com.google.cloud.securitycenter.v1B\x10\x41pplicationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Application = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Application").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb new file mode 100644 index 000000000000..7bbe0a82baf9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/asset.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v1/folder_pb' +require 'google/cloud/securitycenter/v1/security_marks_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n*google/cloud/securitycenter/v1/asset.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v1/folder.proto\x1a\x33google/cloud/securitycenter/v1/security_marks.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb8\x08\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x62\n\x1asecurity_center_properties\x18\x02 \x01(\x0b\x32>.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties\x12Z\n\x13resource_properties\x18\x07 \x03(\x0b\x32=.google.cloud.securitycenter.v1.Asset.ResourcePropertiesEntry\x12\x45\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarks\x12/\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\niam_policy\x18\x0b \x01(\x0b\x32/.google.cloud.securitycenter.v1.Asset.IamPolicy\x12\x16\n\x0e\x63\x61nonical_name\x18\r \x01(\t\x1a\xb9\x02\n\x18SecurityCenterProperties\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x17\n\x0fresource_parent\x18\x03 \x01(\t\x12\x18\n\x10resource_project\x18\x04 \x01(\t\x12\x17\n\x0fresource_owners\x18\x05 \x03(\t\x12\x1d\n\x15resource_display_name\x18\x06 \x01(\t\x12$\n\x1cresource_parent_display_name\x18\x07 \x01(\t\x12%\n\x1dresource_project_display_name\x18\x08 \x01(\t\x12\x37\n\x07\x66olders\x18\n \x03(\x0b\x32&.google.cloud.securitycenter.v1.Folder\x1a \n\tIamPolicy\x12\x13\n\x0bpolicy_blob\x18\x01 \x01(\t\x1aQ\n\x17ResourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01:\xa9\x01\xea\x41\xa5\x01\n#securitycenter.googleapis.com/Asset\x12+organizations/{organization}/assets/{asset}\x12\x1f\x66olders/{folder}/assets/{asset}\x12!projects/{project}/assets/{asset}*\x06\x61ssets2\x05\x61ssetB\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset").msgclass + Asset::SecurityCenterProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset.SecurityCenterProperties").msgclass + Asset::IamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset.IamPolicy").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb new file mode 100644 index 000000000000..874c9ce74d43 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/attack_exposure.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v1/attack_exposure.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8a\x03\n\x0e\x41ttackExposure\x12\r\n\x05score\x18\x01 \x01(\x01\x12;\n\x17latest_calculation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1e\n\x16\x61ttack_exposure_result\x18\x03 \x01(\t\x12\x43\n\x05state\x18\x04 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.AttackExposure.State\x12*\n\"exposed_high_value_resources_count\x18\x05 \x01(\x05\x12,\n$exposed_medium_value_resources_count\x18\x06 \x01(\x05\x12)\n!exposed_low_value_resources_count\x18\x07 \x01(\x05\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nCALCULATED\x10\x01\x12\x12\n\x0eNOT_CALCULATED\x10\x02\x42\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x41ttackExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + AttackExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackExposure").msgclass + AttackExposure::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackExposure.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb new file mode 100644 index 000000000000..9a0cc9065451 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/attack_path.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n0google/cloud/securitycenter/v1/attack_path.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xe7\t\n\nAttackPath\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\npath_nodes\x18\x02 \x03(\x0b\x32\x39.google.cloud.securitycenter.v1.AttackPath.AttackPathNode\x12H\n\x05\x65\x64ges\x18\x03 \x03(\x0b\x32\x39.google.cloud.securitycenter.v1.AttackPath.AttackPathEdge\x1a\xbd\x06\n\x0e\x41ttackPathNode\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12p\n\x13\x61ssociated_findings\x18\x04 \x03(\x0b\x32S.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding\x12\x0c\n\x04uuid\x18\x05 \x01(\t\x12^\n\x0c\x61ttack_steps\x18\x06 \x03(\x0b\x32H.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode\x1a^\n\x19PathNodeAssociatedFinding\x12\x19\n\x11\x63\x61nonical_finding\x18\x01 \x01(\t\x12\x18\n\x10\x66inding_category\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x1a\xb0\x02\n\x0e\x41ttackStepNode\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12P\n\x04type\x18\x02 \x01(\x0e\x32\x42.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x64\n\x06labels\x18\x04 \x03(\x0b\x32T.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"y\n\x08NodeType\x12\x19\n\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rNODE_TYPE_AND\x10\x01\x12\x10\n\x0cNODE_TYPE_OR\x10\x02\x12\x15\n\x11NODE_TYPE_DEFENSE\x10\x03\x12\x16\n\x12NODE_TYPE_ATTACKER\x10\x04\x1a\x35\n\x0e\x41ttackPathEdge\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x02 \x01(\t:\xba\x01\xea\x41\xb6\x01\n(securitycenter.googleapis.com/AttackPath\x12qorganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}*\x0b\x61ttackPaths2\nattackPathB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x41ttackPathProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + AttackPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath").msgclass + AttackPath::AttackPathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode").msgclass + AttackPath::AttackPathNode::PathNodeAssociatedFinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding").msgclass + AttackPath::AttackPathNode::AttackStepNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode").msgclass + AttackPath::AttackPathNode::NodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType").enummodule + AttackPath::AttackPathEdge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathEdge").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb new file mode 100644 index 000000000000..0e004d7fc559 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/backup_disaster_recovery.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n=google/cloud/securitycenter/v1/backup_disaster_recovery.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x86\x02\n\x16\x42\x61\x63kupDisasterRecovery\x12\x17\n\x0f\x62\x61\x63kup_template\x18\x01 \x01(\t\x12\x10\n\x08policies\x18\x02 \x03(\t\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x14\n\x0c\x61pplications\x18\x04 \x03(\t\x12\x14\n\x0cstorage_pool\x18\x05 \x01(\t\x12\x16\n\x0epolicy_options\x18\x06 \x03(\t\x12\x0f\n\x07profile\x18\x07 \x01(\t\x12\x11\n\tappliance\x18\x08 \x01(\t\x12\x13\n\x0b\x62\x61\x63kup_type\x18\t \x01(\t\x12\x36\n\x12\x62\x61\x63kup_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xf5\x01\n\"com.google.cloud.securitycenter.v1B\x1b\x42\x61\x63kupDisasterRecoveryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + BackupDisasterRecovery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BackupDisasterRecovery").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb new file mode 100644 index 000000000000..dd2586de3962 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/bigquery_export.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v1/bigquery_export.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xde\x03\n\x0e\x42igQueryExport\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x04 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tprincipal\x18\x08 \x01(\tB\x03\xe0\x41\x03:\xe2\x01\xea\x41\xde\x01\n,securitycenter.googleapis.com/BigQueryExport\x12\x35organizations/{organization}/bigQueryExports/{export}\x12)folders/{folder}/bigQueryExports/{export}\x12+projects/{project}/bigQueryExports/{export}*\x0f\x62igQueryExports2\x0e\x62igQueryExportB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x42igQueryExportProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BigQueryExport").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb new file mode 100644 index 000000000000..bcdd9d0754f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/chokepoint.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v1/chokepoint.proto\x12\x1egoogle.cloud.securitycenter.v1\"&\n\nChokepoint\x12\x18\n\x10related_findings\x18\x01 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43hokepointProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Chokepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Chokepoint").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb new file mode 100644 index 000000000000..5d2aca35a2a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/cloud_armor.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n0google/cloud/securitycenter/v1/cloud_armor.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1egoogle/protobuf/duration.proto\"\xde\x02\n\nCloudArmor\x12G\n\x0fsecurity_policy\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.SecurityPolicy\x12:\n\x08requests\x18\x02 \x01(\x0b\x32(.google.cloud.securitycenter.v1.Requests\x12O\n\x13\x61\x64\x61ptive_protection\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.AdaptiveProtection\x12\x36\n\x06\x61ttack\x18\x04 \x01(\x0b\x32&.google.cloud.securitycenter.v1.Attack\x12\x15\n\rthreat_vector\x18\x05 \x01(\t\x12+\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\"=\n\x0eSecurityPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x07preview\x18\x03 \x01(\x08\"j\n\x08Requests\x12\r\n\x05ratio\x18\x01 \x01(\x01\x12\x1a\n\x12short_term_allowed\x18\x02 \x01(\x05\x12\x19\n\x11long_term_allowed\x18\x03 \x01(\x05\x12\x18\n\x10long_term_denied\x18\x04 \x01(\x05\"(\n\x12\x41\x64\x61ptiveProtection\x12\x12\n\nconfidence\x18\x01 \x01(\x01\"H\n\x06\x41ttack\x12\x12\n\nvolume_pps\x18\x01 \x01(\x05\x12\x12\n\nvolume_bps\x18\x02 \x01(\x05\x12\x16\n\x0e\x63lassification\x18\x03 \x01(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43loudArmorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + CloudArmor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudArmor").msgclass + SecurityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SecurityPolicy").msgclass + Requests = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Requests").msgclass + AdaptiveProtection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AdaptiveProtection").msgclass + Attack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Attack").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb new file mode 100644 index 000000000000..96dd00769215 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n;google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xb2\x02\n\x13\x43loudDlpDataProfile\x12>\n\x0c\x64\x61ta_profile\x18\x01 \x01(\tB(\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\x12S\n\x0bparent_type\x18\x02 \x01(\x0e\x32>.google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType\x12<\n\ninfo_types\x18\x03 \x03(\x0b\x32(.google.cloud.securitycenter.v1.InfoType\"H\n\nParentType\x12\x1b\n\x17PARENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cORGANIZATION\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\"v\n\x08InfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12K\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.SensitivityScore\"\x8a\x02\n\x10SensitivityScore\x12U\n\x05score\x18\x01 \x01(\x0e\x32\x46.google.cloud.securitycenter.v1.SensitivityScore.SensitivityScoreLevel\"\x9e\x01\n\x15SensitivityScoreLevel\x12\'\n#SENSITIVITY_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x13\n\x0fSENSITIVITY_LOW\x10\n\x12\x17\n\x13SENSITIVITY_UNKNOWN\x10\x0c\x12\x18\n\x14SENSITIVITY_MODERATE\x10\x14\x12\x14\n\x10SENSITIVITY_HIGH\x10\x1e\x42\x94\x03\n\"com.google.cloud.securitycenter.v1B\x18\x43loudDlpDataProfileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41\x9e\x01\n#dlp.googleapis.com/TableDataProfile\x12\x30projects/{project}/tableProfiles/{table_profile}\x12\x45projects/{project}/locations/{location}/tableProfiles/{table_profile}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + CloudDlpDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpDataProfile").msgclass + CloudDlpDataProfile::ParentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType").enummodule + InfoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.InfoType").msgclass + SensitivityScore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SensitivityScore").msgclass + SensitivityScore::SensitivityScoreLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SensitivityScore.SensitivityScoreLevel").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb new file mode 100644 index 000000000000..6908abf33a2c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/cloud_dlp_inspection.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/cloud/securitycenter/v1/cloud_dlp_inspection.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\x88\x01\n\x12\x43loudDlpInspection\x12\x33\n\x0binspect_job\x18\x01 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x11\n\tinfo_type\x18\x02 \x01(\t\x12\x17\n\x0finfo_type_count\x18\x03 \x01(\x03\x12\x11\n\tfull_scan\x18\x04 \x01(\x08\x42\xf0\x02\n\"com.google.cloud.securitycenter.v1B\x17\x43loudDlpInspectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + CloudDlpInspection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpInspection").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb new file mode 100644 index 000000000000..db60def7251c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/compliance.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v1/compliance.proto\x12\x1egoogle.cloud.securitycenter.v1\"<\n\nCompliance\x12\x10\n\x08standard\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x0b\n\x03ids\x18\x03 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43omplianceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Compliance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Compliance").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb new file mode 100644 index 000000000000..eb0b9ee52115 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/connection.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v1/connection.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x81\x02\n\nConnection\x12\x16\n\x0e\x64\x65stination_ip\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_port\x18\x02 \x01(\x05\x12\x11\n\tsource_ip\x18\x03 \x01(\t\x12\x13\n\x0bsource_port\x18\x04 \x01(\x05\x12\x45\n\x08protocol\x18\x05 \x01(\x0e\x32\x33.google.cloud.securitycenter.v1.Connection.Protocol\"R\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x08\n\x04ICMP\x10\x01\x12\x07\n\x03TCP\x10\x06\x12\x07\n\x03UDP\x10\x11\x12\x07\n\x03GRE\x10/\x12\x07\n\x03\x45SP\x10\x32\x42\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43onnectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Connection").msgclass + Connection::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Connection.Protocol").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb new file mode 100644 index 000000000000..82b5fea649e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/contact_details.proto + +require 'google/protobuf' + + +descriptor_data = "\n4google/cloud/securitycenter/v1/contact_details.proto\x12\x1egoogle.cloud.securitycenter.v1\"K\n\x0e\x43ontactDetails\x12\x39\n\x08\x63ontacts\x18\x01 \x03(\x0b\x32\'.google.cloud.securitycenter.v1.Contact\"\x18\n\x07\x43ontact\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x43ontactDetailsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + ContactDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ContactDetails").msgclass + Contact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Contact").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb new file mode 100644 index 000000000000..114721a06e25 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/container.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v1/label_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/securitycenter/v1/container.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a*google/cloud/securitycenter/v1/label.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\x01\n\tContainer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08image_id\x18\x03 \x01(\t\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.google.cloud.securitycenter.v1.Label\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe8\x01\n\"com.google.cloud.securitycenter.v1B\x0e\x43ontainerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Container").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb new file mode 100644 index 000000000000..14a2d4b30426 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/database.proto + +require 'google/protobuf' + + +descriptor_data = "\n-google/cloud/securitycenter/v1/database.proto\x12\x1egoogle.cloud.securitycenter.v1\"s\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x11\n\tuser_name\x18\x03 \x01(\t\x12\r\n\x05query\x18\x04 \x01(\t\x12\x10\n\x08grantees\x18\x05 \x03(\t\x12\x0f\n\x07version\x18\x06 \x01(\tB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rDatabaseProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Database").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb new file mode 100644 index 000000000000..b7cff88c9276 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/struct_pb' + + +descriptor_data = "\nSgoogle/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xc9\x05\n)EffectiveEventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12,\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12x\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32Y.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\xc8\x02\xea\x41\xc4\x02\nGsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12Yorganizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}\x12Mfolders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}\x12Oprojects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}B\x88\x02\n\"com.google.cloud.securitycenter.v1B.EffectiveEventThreatDetectionCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + EffectiveEventThreatDetectionCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule").msgclass + EffectiveEventThreatDetectionCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb new file mode 100644 index 000000000000..398d13b78b09 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v1/security_health_analytics_custom_config_pb' + + +descriptor_data = "\nVgoogle/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aLgoogle/cloud/securitycenter/v1/security_health_analytics_custom_config.proto\"\xfd\x05\n,EffectiveSecurityHealthAnalyticsCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12H\n\rcustom_config\x18\x02 \x01(\x0b\x32,.google.cloud.securitycenter.v1.CustomConfigB\x03\xe0\x41\x03\x12{\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32\\.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\x87\x03\xea\x41\x83\x03\nJsecuritycenter.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\x12morganizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}\x12\x61\x66olders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}\x12\x63projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}B\x8b\x02\n\"com.google.cloud.securitycenter.v1B1EffectiveSecurityHealthAnalyticsCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + EffectiveSecurityHealthAnalyticsCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule").msgclass + EffectiveSecurityHealthAnalyticsCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb new file mode 100644 index 000000000000..2b24bf1f56c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/event_threat_detection_custom_module.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nIgoogle/cloud/securitycenter/v1/event_threat_detection_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x06\n EventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\'\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12_\n\x0f\x61ncestor_module\x18\x03 \x01(\tBF\xe0\x41\x03\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12j\n\x10\x65nablement_state\x18\x04 \x01(\x0e\x32P.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState\x12\x0c\n\x04type\x18\x05 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\t \x01(\tB\x03\xe0\x41\x03\"]\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tINHERITED\x10\x03:\xa4\x02\xea\x41\xa0\x02\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12Porganizations/{organization}/eventThreatDetectionSettings/customModules/{module}\x12\x44\x66olders/{folder}/eventThreatDetectionSettings/customModules/{module}\x12\x46projects/{project}/eventThreatDetectionSettings/customModules/{module}B\xff\x01\n\"com.google.cloud.securitycenter.v1B%EventThreatDetectionCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + EventThreatDetectionCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EventThreatDetectionCustomModule").msgclass + EventThreatDetectionCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb new file mode 100644 index 000000000000..d900e952525b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto + +require 'google/protobuf' + + +descriptor_data = "\n[google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto\x12\x1egoogle.cloud.securitycenter.v1\"k\n\x1c\x43ustomModuleValidationErrors\x12K\n\x06\x65rrors\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v1.CustomModuleValidationError\"\xd2\x01\n\x1b\x43ustomModuleValidationError\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x12\n\nfield_path\x18\x02 \x01(\t\x12<\n\x05start\x18\x03 \x01(\x0b\x32(.google.cloud.securitycenter.v1.PositionH\x00\x88\x01\x01\x12:\n\x03\x65nd\x18\x04 \x01(\x0b\x32(.google.cloud.securitycenter.v1.PositionH\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"6\n\x08Position\x12\x13\n\x0bline_number\x18\x01 \x01(\x05\x12\x15\n\rcolumn_number\x18\x02 \x01(\x05\x42\x8f\x02\n\"com.google.cloud.securitycenter.v1B5EventThreatDetectionCustomModuleValidationErrorsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + CustomModuleValidationErrors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CustomModuleValidationErrors").msgclass + CustomModuleValidationError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CustomModuleValidationError").msgclass + Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Position").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb new file mode 100644 index 000000000000..f444b911b8fd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/exfiltration.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/cloud/securitycenter/v1/exfiltration.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xaf\x01\n\x0c\x45xfiltration\x12>\n\x07sources\x18\x01 \x03(\x0b\x32-.google.cloud.securitycenter.v1.ExfilResource\x12>\n\x07targets\x18\x02 \x03(\x0b\x32-.google.cloud.securitycenter.v1.ExfilResource\x12\x1f\n\x17total_exfiltrated_bytes\x18\x03 \x01(\x03\"1\n\rExfilResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ncomponents\x18\x02 \x03(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11\x45xfiltrationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Exfiltration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Exfiltration").msgclass + ExfilResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExfilResource").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb new file mode 100644 index 000000000000..637251a7df01 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/external_exposure.proto + +require 'google/protobuf' + +require 'google/api/field_info_pb' + + +descriptor_data = "\n6google/cloud/securitycenter/v1/external_exposure.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1bgoogle/api/field_info.proto\"\xed\x02\n\x10\x45xternalExposure\x12$\n\x12private_ip_address\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x14\n\x0cprivate_port\x18\x02 \x01(\t\x12\x17\n\x0f\x65xposed_service\x18\x03 \x01(\t\x12#\n\x11public_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x13\n\x0bpublic_port\x18\x05 \x01(\t\x12\x18\n\x10\x65xposed_endpoint\x18\x06 \x01(\t\x12%\n\x1dload_balancer_firewall_policy\x18\x07 \x01(\t\x12\x1f\n\x17service_firewall_policy\x18\x08 \x01(\t\x12\x17\n\x0f\x66orwarding_rule\x18\t \x01(\t\x12\x17\n\x0f\x62\x61\x63kend_service\x18\n \x01(\t\x12\x16\n\x0einstance_group\x18\x0b \x01(\t\x12\x1e\n\x16network_endpoint_group\x18\x0c \x01(\tB\xef\x01\n\"com.google.cloud.securitycenter.v1B\x15\x45xternalExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + ExternalExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalExposure").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb new file mode 100644 index 000000000000..6b43636594f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/external_system.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v1/external_system.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa3\x07\n\x0e\x45xternalSystem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tassignees\x18\x02 \x03(\t\x12\x14\n\x0c\x65xternal_uid\x18\x03 \x01(\t\x12\x0e\n\x06status\x18\x04 \x01(\t\x12?\n\x1b\x65xternal_system_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x63\x61se_uri\x18\x06 \x01(\t\x12\x15\n\rcase_priority\x18\x07 \x01(\t\x12,\n\x08\x63\x61se_sla\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10\x63\x61se_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63\x61se_close_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\x0bticket_info\x18\x08 \x01(\x0b\x32\x39.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo\x1a\x8d\x01\n\nTicketInfo\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61ssignee\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0b\n\x03uri\x18\x04 \x01(\t\x12\x0e\n\x06status\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xe6\x02\xea\x41\xe2\x02\n,securitycenter.googleapis.com/ExternalSystem\x12\x61organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12Ufolders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12Wprojects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}*\x0f\x65xternalSystems2\x0e\x65xternalSystemB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x45xternalSystemProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + ExternalSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalSystem").msgclass + ExternalSystem::TicketInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalSystem.TicketInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb new file mode 100644 index 000000000000..1b28cd79a63b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/file.proto + +require 'google/protobuf' + + +descriptor_data = "\n)google/cloud/securitycenter/v1/file.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xf0\x01\n\x04\x46ile\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x03\x12\x0e\n\x06sha256\x18\x03 \x01(\t\x12\x13\n\x0bhashed_size\x18\x04 \x01(\x03\x12\x18\n\x10partially_hashed\x18\x05 \x01(\x08\x12\x10\n\x08\x63ontents\x18\x06 \x01(\t\x12@\n\tdisk_path\x18\x07 \x01(\x0b\x32-.google.cloud.securitycenter.v1.File.DiskPath\x1a\x39\n\x08\x44iskPath\x12\x16\n\x0epartition_uuid\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\tB\xe3\x01\n\"com.google.cloud.securitycenter.v1B\tFileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.File").msgclass + File::DiskPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.File.DiskPath").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb new file mode 100644 index 000000000000..d83c4821a3ab --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/finding.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v1/access_pb' +require 'google/cloud/securitycenter/v1/agent_pb' +require 'google/cloud/securitycenter/v1/agent_anomaly_pb' +require 'google/cloud/securitycenter/v1/agent_session_pb' +require 'google/cloud/securitycenter/v1/application_pb' +require 'google/cloud/securitycenter/v1/attack_exposure_pb' +require 'google/cloud/securitycenter/v1/backup_disaster_recovery_pb' +require 'google/cloud/securitycenter/v1/chokepoint_pb' +require 'google/cloud/securitycenter/v1/cloud_armor_pb' +require 'google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb' +require 'google/cloud/securitycenter/v1/cloud_dlp_inspection_pb' +require 'google/cloud/securitycenter/v1/compliance_pb' +require 'google/cloud/securitycenter/v1/connection_pb' +require 'google/cloud/securitycenter/v1/contact_details_pb' +require 'google/cloud/securitycenter/v1/container_pb' +require 'google/cloud/securitycenter/v1/database_pb' +require 'google/cloud/securitycenter/v1/exfiltration_pb' +require 'google/cloud/securitycenter/v1/external_exposure_pb' +require 'google/cloud/securitycenter/v1/external_system_pb' +require 'google/cloud/securitycenter/v1/file_pb' +require 'google/cloud/securitycenter/v1/group_membership_pb' +require 'google/cloud/securitycenter/v1/iam_binding_pb' +require 'google/cloud/securitycenter/v1/indicator_pb' +require 'google/cloud/securitycenter/v1/kernel_rootkit_pb' +require 'google/cloud/securitycenter/v1/kubernetes_pb' +require 'google/cloud/securitycenter/v1/load_balancer_pb' +require 'google/cloud/securitycenter/v1/log_entry_pb' +require 'google/cloud/securitycenter/v1/mitre_attack_pb' +require 'google/cloud/securitycenter/v1/notebook_pb' +require 'google/cloud/securitycenter/v1/org_policy_pb' +require 'google/cloud/securitycenter/v1/process_pb' +require 'google/cloud/securitycenter/v1/security_marks_pb' +require 'google/cloud/securitycenter/v1/security_posture_pb' +require 'google/cloud/securitycenter/v1/toxic_combination_pb' +require 'google/cloud/securitycenter/v1/vulnerability_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/securitycenter/v1/finding.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v1/access.proto\x1a*google/cloud/securitycenter/v1/agent.proto\x1a\x32google/cloud/securitycenter/v1/agent_anomaly.proto\x1a\x32google/cloud/securitycenter/v1/agent_session.proto\x1a\x30google/cloud/securitycenter/v1/application.proto\x1a\x34google/cloud/securitycenter/v1/attack_exposure.proto\x1a=google/cloud/securitycenter/v1/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v1/chokepoint.proto\x1a\x30google/cloud/securitycenter/v1/cloud_armor.proto\x1a;google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v1/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v1/compliance.proto\x1a/google/cloud/securitycenter/v1/connection.proto\x1a\x34google/cloud/securitycenter/v1/contact_details.proto\x1a.google/cloud/securitycenter/v1/container.proto\x1a-google/cloud/securitycenter/v1/database.proto\x1a\x31google/cloud/securitycenter/v1/exfiltration.proto\x1a\x36google/cloud/securitycenter/v1/external_exposure.proto\x1a\x34google/cloud/securitycenter/v1/external_system.proto\x1a)google/cloud/securitycenter/v1/file.proto\x1a\x35google/cloud/securitycenter/v1/group_membership.proto\x1a\x30google/cloud/securitycenter/v1/iam_binding.proto\x1a.google/cloud/securitycenter/v1/indicator.proto\x1a\x33google/cloud/securitycenter/v1/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v1/kubernetes.proto\x1a\x32google/cloud/securitycenter/v1/load_balancer.proto\x1a.google/cloud/securitycenter/v1/log_entry.proto\x1a\x31google/cloud/securitycenter/v1/mitre_attack.proto\x1a-google/cloud/securitycenter/v1/notebook.proto\x1a/google/cloud/securitycenter/v1/org_policy.proto\x1a,google/cloud/securitycenter/v1/process.proto\x1a\x33google/cloud/securitycenter/v1/security_marks.proto\x1a\x35google/cloud/securitycenter/v1/security_posture.proto\x1a\x36google/cloud/securitycenter/v1/toxic_combination.proto\x1a\x32google/cloud/securitycenter/v1/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99$\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\t\x12<\n\x05state\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v1.Finding.State\x12\x10\n\x08\x63\x61tegory\x18\x05 \x01(\t\x12\x14\n\x0c\x65xternal_uri\x18\x06 \x01(\t\x12X\n\x11source_properties\x18\x07 \x03(\x0b\x32=.google.cloud.securitycenter.v1.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x08severity\x18\x0c \x01(\x0e\x32\x30.google.cloud.securitycenter.v1.Finding.Severity\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12K\n\rfinding_class\x18\x11 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.Finding.FindingClass\x12<\n\tindicator\x18\x12 \x01(\x0b\x32).google.cloud.securitycenter.v1.Indicator\x12\x44\n\rvulnerability\x18\x14 \x01(\x0b\x32-.google.cloud.securitycenter.v1.Vulnerability\x12\x39\n\x10mute_update_time\x18\x15 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x16 \x03(\x0b\x32<.google.cloud.securitycenter.v1.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x19 \x01(\x0b\x32+.google.cloud.securitycenter.v1.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x1a \x01(\x0b\x32&.google.cloud.securitycenter.v1.Access\x12?\n\x0b\x63onnections\x18\x1f \x03(\x0b\x32*.google.cloud.securitycenter.v1.Connection\x12\x16\n\x0emute_initiator\x18\x1c \x01(\t\x12H\n\tmute_info\x18= \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.Finding.MuteInfoB\x03\xe0\x41\x03\x12:\n\tprocesses\x18\x1e \x03(\x0b\x32\'.google.cloud.securitycenter.v1.Process\x12L\n\x08\x63ontacts\x18! \x03(\x0b\x32\x35.google.cloud.securitycenter.v1.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\" \x03(\x0b\x32*.google.cloud.securitycenter.v1.Compliance\x12 \n\x13parent_display_name\x18$ \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18% \x01(\t\x12\x42\n\x0c\x65xfiltration\x18& \x01(\x0b\x32,.google.cloud.securitycenter.v1.Exfiltration\x12@\n\x0ciam_bindings\x18\' \x03(\x0b\x32*.google.cloud.securitycenter.v1.IamBinding\x12\x12\n\nnext_steps\x18( \x01(\t\x12\x13\n\x0bmodule_name\x18) \x01(\t\x12=\n\ncontainers\x18* \x03(\x0b\x32).google.cloud.securitycenter.v1.Container\x12>\n\nkubernetes\x18+ \x01(\x0b\x32*.google.cloud.securitycenter.v1.Kubernetes\x12:\n\x08\x64\x61tabase\x18, \x01(\x0b\x32(.google.cloud.securitycenter.v1.Database\x12G\n\x0f\x61ttack_exposure\x18- \x01(\x0b\x32..google.cloud.securitycenter.v1.AttackExposure\x12\x33\n\x05\x66iles\x18. \x03(\x0b\x32$.google.cloud.securitycenter.v1.File\x12P\n\x14\x63loud_dlp_inspection\x18\x30 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18\x31 \x01(\x0b\x32\x33.google.cloud.securitycenter.v1.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18\x32 \x01(\x0b\x32-.google.cloud.securitycenter.v1.KernelRootkit\x12?\n\x0corg_policies\x18\x33 \x03(\x0b\x32).google.cloud.securitycenter.v1.OrgPolicy\x12@\n\x0b\x61pplication\x18\x35 \x01(\x0b\x32+.google.cloud.securitycenter.v1.Application\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18\x37 \x01(\x0b\x32\x36.google.cloud.securitycenter.v1.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x38 \x01(\x0b\x32/.google.cloud.securitycenter.v1.SecurityPosture\x12=\n\x0blog_entries\x18\x39 \x03(\x0b\x32(.google.cloud.securitycenter.v1.LogEntry\x12\x44\n\x0eload_balancers\x18: \x03(\x0b\x32,.google.cloud.securitycenter.v1.LoadBalancer\x12?\n\x0b\x63loud_armor\x18; \x01(\x0b\x32*.google.cloud.securitycenter.v1.CloudArmor\x12:\n\x08notebook\x18? \x01(\x0b\x32(.google.cloud.securitycenter.v1.Notebook\x12K\n\x11toxic_combination\x18@ \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ToxicCombination\x12J\n\x11group_memberships\x18\x41 \x03(\x0b\x32/.google.cloud.securitycenter.v1.GroupMembership\x12>\n\nchokepoint\x18M \x01(\x0b\x32*.google.cloud.securitycenter.v1.Chokepoint\x12K\n\x11\x65xternal_exposure\x18T \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ExternalExposure\x12\x34\n\x05\x61gent\x18X \x01(\x0b\x32%.google.cloud.securitycenter.v1.Agent\x12\x44\n\x0e\x61gent_sessions\x18Y \x03(\x0b\x32,.google.cloud.securitycenter.v1.AgentSession\x12\x43\n\ragent_anomaly\x18Z \x01(\x0b\x32,.google.cloud.securitycenter.v1.AgentAnomaly\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12.\n\napply_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aX\n\x11\x44ynamicMuteRecord\x12\x13\n\x0bmute_config\x18\x01 \x01(\t\x12.\n\nmatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x66\n\x14\x45xternalSystemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ExternalSystem:\x02\x38\x01\x1a_\n\rContactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ContactDetails:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"C\n\x04Mute\x12\x14\n\x10MUTE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\x0b\n\x07UNMUTED\x10\x02\x12\r\n\tUNDEFINED\x10\x04\"\xf0\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t\x12\x15\n\x11\x45XTERNAL_EXPOSURE\x10\n:\xee\x01\xea\x41\xea\x01\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding").msgclass + Finding::MuteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo").msgclass + Finding::MuteInfo::StaticMute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute").msgclass + Finding::MuteInfo::DynamicMuteRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord").msgclass + Finding::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.State").enummodule + Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.Severity").enummodule + Finding::Mute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.Mute").enummodule + Finding::FindingClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.FindingClass").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb new file mode 100644 index 000000000000..e25a1821948f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/folder.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/securitycenter/v1/folder.proto\x12\x1egoogle.cloud.securitycenter.v1\"G\n\x06\x46older\x12\x17\n\x0fresource_folder\x18\x01 \x01(\t\x12$\n\x1cresource_folder_display_name\x18\x02 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v1B\x0b\x46olderProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Folder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Folder").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb new file mode 100644 index 000000000000..1f47d17f32d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/group_membership.proto + +require 'google/protobuf' + + +descriptor_data = "\n5google/cloud/securitycenter/v1/group_membership.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd8\x01\n\x0fGroupMembership\x12M\n\ngroup_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.GroupMembership.GroupType\x12\x10\n\x08group_id\x18\x02 \x01(\t\"d\n\tGroupType\x12\x1a\n\x16GROUP_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cGROUP_TYPE_TOXIC_COMBINATION\x10\x01\x12\x19\n\x15GROUP_TYPE_CHOKEPOINT\x10\x03\x42\xee\x01\n\"com.google.cloud.securitycenter.v1B\x14GroupMembershipProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + GroupMembership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupMembership").msgclass + GroupMembership::GroupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupMembership.GroupType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb new file mode 100644 index 000000000000..7a11d5d9ab1f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/iam_binding.proto + +require 'google/protobuf' + + +descriptor_data = "\n0google/cloud/securitycenter/v1/iam_binding.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xa4\x01\n\nIamBinding\x12\x41\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v1.IamBinding.Action\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x0e\n\x06member\x18\x03 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x42\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fIamBindingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + IamBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.IamBinding").msgclass + IamBinding::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.IamBinding.Action").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb new file mode 100644 index 000000000000..6fd4289eea6b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/indicator.proto + +require 'google/protobuf' + + +descriptor_data = "\n.google/cloud/securitycenter/v1/indicator.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd9\x06\n\tIndicator\x12\x14\n\x0cip_addresses\x18\x01 \x03(\t\x12\x0f\n\x07\x64omains\x18\x02 \x03(\t\x12N\n\nsignatures\x18\x03 \x03(\x0b\x32:.google.cloud.securitycenter.v1.Indicator.ProcessSignature\x12\x0c\n\x04uris\x18\x04 \x03(\t\x1a\xc6\x05\n\x10ProcessSignature\x12o\n\x15memory_hash_signature\x18\x06 \x01(\x0b\x32N.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureH\x00\x12k\n\x13yara_rule_signature\x18\x07 \x01(\x0b\x32L.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureH\x00\x12`\n\x0esignature_type\x18\x08 \x01(\x0e\x32H.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType\x1a\xd6\x01\n\x13MemoryHashSignature\x12\x15\n\rbinary_family\x18\x01 \x01(\t\x12l\n\ndetections\x18\x04 \x03(\x0b\x32X.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection\x1a:\n\tDetection\x12\x0e\n\x06\x62inary\x18\x02 \x01(\t\x12\x1d\n\x15percent_pages_matched\x18\x03 \x01(\x01\x1a&\n\x11YaraRuleSignature\x12\x11\n\tyara_rule\x18\x05 \x01(\t\"d\n\rSignatureType\x12\x1e\n\x1aSIGNATURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SIGNATURE_TYPE_PROCESS\x10\x01\x12\x17\n\x13SIGNATURE_TYPE_FILE\x10\x02\x42\x0b\n\tsignatureB\xe8\x01\n\"com.google.cloud.securitycenter.v1B\x0eIndicatorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Indicator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator").msgclass + Indicator::ProcessSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature").msgclass + Indicator::ProcessSignature::MemoryHashSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature").msgclass + Indicator::ProcessSignature::MemoryHashSignature::Detection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection").msgclass + Indicator::ProcessSignature::YaraRuleSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature").msgclass + Indicator::ProcessSignature::SignatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb new file mode 100644 index 000000000000..20e8cb2e66b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/kernel_rootkit.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/cloud/securitycenter/v1/kernel_rootkit.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd7\x02\n\rKernelRootkit\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x1cunexpected_code_modification\x18\x02 \x01(\x08\x12.\n&unexpected_read_only_data_modification\x18\x03 \x01(\x08\x12!\n\x19unexpected_ftrace_handler\x18\x04 \x01(\x08\x12!\n\x19unexpected_kprobe_handler\x18\x05 \x01(\x08\x12$\n\x1cunexpected_kernel_code_pages\x18\x06 \x01(\x08\x12&\n\x1eunexpected_system_call_handler\x18\x07 \x01(\x08\x12$\n\x1cunexpected_interrupt_handler\x18\x08 \x01(\x08\x12(\n unexpected_processes_in_runqueue\x18\t \x01(\x08\x42\xec\x01\n\"com.google.cloud.securitycenter.v1B\x12KernelRootkitProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + KernelRootkit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.KernelRootkit").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb new file mode 100644 index 000000000000..469575235393 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/kubernetes.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v1/container_pb' +require 'google/cloud/securitycenter/v1/label_pb' + + +descriptor_data = "\n/google/cloud/securitycenter/v1/kubernetes.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a.google/cloud/securitycenter/v1/container.proto\x1a*google/cloud/securitycenter/v1/label.proto\"\x82\x0c\n\nKubernetes\x12<\n\x04pods\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.Kubernetes.Pod\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Node\x12G\n\nnode_pools\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v1.Kubernetes.NodePool\x12>\n\x05roles\x18\x04 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Role\x12\x44\n\x08\x62indings\x18\x05 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.Kubernetes.Binding\x12O\n\x0e\x61\x63\x63\x65ss_reviews\x18\x06 \x03(\x0b\x32\x37.google.cloud.securitycenter.v1.Kubernetes.AccessReview\x12\x42\n\x07objects\x18\x07 \x03(\x0b\x32\x31.google.cloud.securitycenter.v1.Kubernetes.Object\x1a\x95\x01\n\x03Pod\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x35\n\x06labels\x18\x03 \x03(\x0b\x32%.google.cloud.securitycenter.v1.Label\x12=\n\ncontainers\x18\x04 \x03(\x0b\x32).google.cloud.securitycenter.v1.Container\x1a\x14\n\x04Node\x12\x0c\n\x04name\x18\x01 \x01(\t\x1aX\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Node\x1a\x9e\x01\n\x04Role\x12\x42\n\x04kind\x18\x01 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.Kubernetes.Role.Kind\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"8\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x08\n\x04ROLE\x10\x01\x12\x10\n\x0c\x43LUSTER_ROLE\x10\x02\x1a\xa8\x01\n\x07\x42inding\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12=\n\x04role\x18\x03 \x01(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Role\x12\x44\n\x08subjects\x18\x04 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.Kubernetes.Subject\x1a\xbe\x01\n\x07Subject\x12I\n\x04kind\x18\x01 \x01(\x0e\x32;.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"N\n\x08\x41uthType\x12\x19\n\x15\x41UTH_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x12\n\x0eSERVICEACCOUNT\x10\x02\x12\t\n\x05GROUP\x10\x03\x1a}\n\x0c\x41\x63\x63\x65ssReview\x12\r\n\x05group\x18\x01 \x01(\t\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x13\n\x0bsubresource\x18\x05 \x01(\t\x12\x0c\n\x04verb\x18\x06 \x01(\t\x12\x0f\n\x07version\x18\x07 \x01(\t\x1a~\n\x06Object\x12\r\n\x05group\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\n\n\x02ns\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12=\n\ncontainers\x18\x05 \x03(\x0b\x32).google.cloud.securitycenter.v1.ContainerB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fKubernetesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Kubernetes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes").msgclass + Kubernetes::Pod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Pod").msgclass + Kubernetes::Node = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Node").msgclass + Kubernetes::NodePool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.NodePool").msgclass + Kubernetes::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Role").msgclass + Kubernetes::Role::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Role.Kind").enummodule + Kubernetes::Binding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Binding").msgclass + Kubernetes::Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Subject").msgclass + Kubernetes::Subject::AuthType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType").enummodule + Kubernetes::AccessReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.AccessReview").msgclass + Kubernetes::Object = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Object").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb new file mode 100644 index 000000000000..814fe4dfd80b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/label.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/cloud/securitycenter/v1/label.proto\x12\x1egoogle.cloud.securitycenter.v1\"$\n\x05Label\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB\xe4\x01\n\"com.google.cloud.securitycenter.v1B\nLabelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Label").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb new file mode 100644 index 000000000000..486b320844ef --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/load_balancer.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v1/load_balancer.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x1c\n\x0cLoadBalancer\x12\x0c\n\x04name\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11LoadBalancerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + LoadBalancer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.LoadBalancer").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb new file mode 100644 index 000000000000..edec9da51f37 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/log_entry.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/securitycenter/v1/log_entry.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"i\n\x08LogEntry\x12P\n\x13\x63loud_logging_entry\x18\x01 \x01(\x0b\x32\x31.google.cloud.securitycenter.v1.CloudLoggingEntryH\x00\x42\x0b\n\tlog_entry\"\x81\x01\n\x11\x43loudLoggingEntry\x12\x11\n\tinsert_id\x18\x01 \x01(\t\x12\x0e\n\x06log_id\x18\x02 \x01(\t\x12\x1a\n\x12resource_container\x18\x03 \x01(\t\x12-\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rLogEntryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.LogEntry").msgclass + CloudLoggingEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudLoggingEntry").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb new file mode 100644 index 000000000000..76a147892b01 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/mitre_attack.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/cloud/securitycenter/v1/mitre_attack.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xbc\x13\n\x0bMitreAttack\x12J\n\x0eprimary_tactic\x18\x01 \x01(\x0e\x32\x32.google.cloud.securitycenter.v1.MitreAttack.Tactic\x12Q\n\x12primary_techniques\x18\x02 \x03(\x0e\x32\x35.google.cloud.securitycenter.v1.MitreAttack.Technique\x12N\n\x12\x61\x64\x64itional_tactics\x18\x03 \x03(\x0e\x32\x32.google.cloud.securitycenter.v1.MitreAttack.Tactic\x12T\n\x15\x61\x64\x64itional_techniques\x18\x04 \x03(\x0e\x32\x35.google.cloud.securitycenter.v1.MitreAttack.Technique\x12\x0f\n\x07version\x18\x05 \x01(\t\"\xb4\x02\n\x06Tactic\x12\x16\n\x12TACTIC_UNSPECIFIED\x10\x00\x12\x12\n\x0eRECONNAISSANCE\x10\x01\x12\x18\n\x14RESOURCE_DEVELOPMENT\x10\x02\x12\x12\n\x0eINITIAL_ACCESS\x10\x05\x12\r\n\tEXECUTION\x10\x03\x12\x0f\n\x0bPERSISTENCE\x10\x06\x12\x18\n\x14PRIVILEGE_ESCALATION\x10\x08\x12\x13\n\x0f\x44\x45\x46\x45NSE_EVASION\x10\x07\x12\x15\n\x11\x43REDENTIAL_ACCESS\x10\t\x12\r\n\tDISCOVERY\x10\n\x12\x14\n\x10LATERAL_MOVEMENT\x10\x0b\x12\x0e\n\nCOLLECTION\x10\x0c\x12\x17\n\x13\x43OMMAND_AND_CONTROL\x10\x04\x12\x10\n\x0c\x45XFILTRATION\x10\r\x12\n\n\x06IMPACT\x10\x0e\"\x9f\x0e\n\tTechnique\x12\x19\n\x15TECHNIQUE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMASQUERADING\x10\x31\x12%\n!MATCH_LEGITIMATE_NAME_OR_LOCATION\x10\x32\x12(\n$BOOT_OR_LOGON_INITIALIZATION_SCRIPTS\x10%\x12\x11\n\rSTARTUP_ITEMS\x10&\x12\x1d\n\x19NETWORK_SERVICE_DISCOVERY\x10 \x12\x15\n\x11PROCESS_DISCOVERY\x10\x38\x12%\n!COMMAND_AND_SCRIPTING_INTERPRETER\x10\x06\x12\x0e\n\nUNIX_SHELL\x10\x07\x12\n\n\x06PYTHON\x10;\x12)\n%EXPLOITATION_FOR_PRIVILEGE_ESCALATION\x10?\x12\x1f\n\x1bPERMISSION_GROUPS_DISCOVERY\x10\x12\x12\x10\n\x0c\x43LOUD_GROUPS\x10\x13\x12#\n\x1fINDICATOR_REMOVAL_FILE_DELETION\x10@\x12\x1e\n\x1a\x41PPLICATION_LAYER_PROTOCOL\x10-\x12\x07\n\x03\x44NS\x10.\x12\x1d\n\x19SOFTWARE_DEPLOYMENT_TOOLS\x10/\x12\x12\n\x0eVALID_ACCOUNTS\x10\x0e\x12\x14\n\x10\x44\x45\x46\x41ULT_ACCOUNTS\x10#\x12\x12\n\x0eLOCAL_ACCOUNTS\x10\x0f\x12\x12\n\x0e\x43LOUD_ACCOUNTS\x10\x10\x12\t\n\x05PROXY\x10\t\x12\x12\n\x0e\x45XTERNAL_PROXY\x10\n\x12\x13\n\x0fMULTI_HOP_PROXY\x10\x0b\x12\x18\n\x14\x41\x43\x43OUNT_MANIPULATION\x10\x16\x12 \n\x1c\x41\x44\x44ITIONAL_CLOUD_CREDENTIALS\x10(\x12\x17\n\x13SSH_AUTHORIZED_KEYS\x10\x17\x12&\n\"ADDITIONAL_CONTAINER_CLUSTER_ROLES\x10:\x12\x19\n\x15INGRESS_TOOL_TRANSFER\x10\x03\x12\x0e\n\nNATIVE_API\x10\x04\x12\x0f\n\x0b\x42RUTE_FORCE\x10,\x12\x12\n\x0eSHARED_MODULES\x10\x05\x12\x1d\n\x19\x41\x43\x43\x45SS_TOKEN_MANIPULATION\x10!\x12 \n\x1cTOKEN_IMPERSONATION_OR_THEFT\x10\'\x12%\n!EXPLOIT_PUBLIC_FACING_APPLICATION\x10\x1b\x12\x1e\n\x1a\x44OMAIN_POLICY_MODIFICATION\x10\x1e\x12\x14\n\x10\x44\x41TA_DESTRUCTION\x10\x1d\x12\x10\n\x0cSERVICE_STOP\x10\x34\x12\x1b\n\x17INHIBIT_SYSTEM_RECOVERY\x10$\x12\x16\n\x12RESOURCE_HIJACKING\x10\x08\x12\x1d\n\x19NETWORK_DENIAL_OF_SERVICE\x10\x11\x12\x1b\n\x17\x43LOUD_SERVICE_DISCOVERY\x10\x30\x12\"\n\x1eSTEAL_APPLICATION_ACCESS_TOKEN\x10*\x12\x1a\n\x16\x41\x43\x43OUNT_ACCESS_REMOVAL\x10\x33\x12\x1c\n\x18STEAL_WEB_SESSION_COOKIE\x10\x19\x12#\n\x1f\x43REATE_OR_MODIFY_SYSTEM_PROCESS\x10\x18\x12%\n!ABUSE_ELEVATION_CONTROL_MECHANISM\x10\"\x12\x19\n\x15UNSECURED_CREDENTIALS\x10\r\x12!\n\x1dMODIFY_AUTHENTICATION_PROCESS\x10\x1c\x12\x13\n\x0fIMPAIR_DEFENSES\x10\x1f\x12\x1b\n\x17\x44ISABLE_OR_MODIFY_TOOLS\x10\x37\x12!\n\x1d\x45XFILTRATION_OVER_WEB_SERVICE\x10\x14\x12!\n\x1d\x45XFILTRATION_TO_CLOUD_STORAGE\x10\x15\x12\x16\n\x12\x44YNAMIC_RESOLUTION\x10\x0c\x12\x19\n\x15LATERAL_TOOL_TRANSFER\x10)\x12\'\n#MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE\x10\x1a\x12\x13\n\x0f\x43REATE_SNAPSHOT\x10\x36\x12\"\n\x1e\x43LOUD_INFRASTRUCTURE_DISCOVERY\x10\x35\x12\x17\n\x13OBTAIN_CAPABILITIES\x10+\x12\x13\n\x0f\x41\x43TIVE_SCANNING\x10\x01\x12\x16\n\x12SCANNING_IP_BLOCKS\x10\x02\x12$\n CONTAINER_ADMINISTRATION_COMMAND\x10<\x12\x12\n\x0e\x45SCAPE_TO_HOST\x10=\x12$\n CONTAINER_AND_RESOURCE_DISCOVERY\x10\x39\x12.\n*STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES\x10>B\xea\x01\n\"com.google.cloud.securitycenter.v1B\x10MitreAttackProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + MitreAttack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack").msgclass + MitreAttack::Tactic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack.Tactic").enummodule + MitreAttack::Technique = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack.Technique").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb new file mode 100644 index 000000000000..6f270729b563 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/mute_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/cloud/securitycenter/v1/mute_config.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x06\n\nMuteConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x02\x18\x01\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12L\n\x04type\x18\x08 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.MuteConfig.MuteConfigTypeB\x03\xe0\x41\x01\x12\x34\n\x0b\x65xpiry_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"K\n\x0eMuteConfigType\x12 \n\x1cMUTE_CONFIG_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STATIC\x10\x01\x12\x0b\n\x07\x44YNAMIC\x10\x02:\xaa\x03\xea\x41\xa6\x03\n(securitycenter.googleapis.com/MuteConfig\x12\x36organizations/{organization}/muteConfigs/{mute_config}\x12*folders/{folder}/muteConfigs/{mute_config}\x12,projects/{project}/muteConfigs/{mute_config}\x12Korganizations/{organization}/locations/{location}/muteConfigs/{mute_config}\x12?folders/{folder}/locations/{location}/muteConfigs/{mute_config}\x12\x41projects/{project}/locations/{location}/muteConfigs/{mute_config}*\x0bmuteConfigs2\nmuteConfigB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fMuteConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + MuteConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MuteConfig").msgclass + MuteConfig::MuteConfigType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MuteConfig.MuteConfigType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb new file mode 100644 index 000000000000..f8cc3f85eb77 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/notebook.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/securitycenter/v1/notebook.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"x\n\x08Notebook\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x13\n\x0blast_author\x18\x03 \x01(\t\x12\x38\n\x14notebook_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rNotebookProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Notebook").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb new file mode 100644 index 000000000000..df0bb0cecc79 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/notification_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n8google/cloud/securitycenter/v1/notification_config.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc5\x04\n\x12NotificationConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x36\n\x0cpubsub_topic\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x1c\n\x0fservice_account\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x10streaming_config\x18\x05 \x01(\x0b\x32\x42.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfigH\x00\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t:\xa1\x02\xea\x41\x9d\x02\n0securitycenter.googleapis.com/NotificationConfig\x12\x46organizations/{organization}/notificationConfigs/{notification_config}\x12:folders/{folder}/notificationConfigs/{notification_config}\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"i\n\x1f\x44\x65leteNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"\x8b\x01\n0DeleteSecurityHealthAnalyticsCustomModuleRequest\x12W\n\x04name\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\nAsecuritycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\"^\n\x18GetBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"V\n\x14GetMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"f\n\x1cGetNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"j\n\x1eGetOrganizationSettingsRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2securitycenter.googleapis.com/OrganizationSettings\"\x9a\x01\n6GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x12`\n\x04name\x18\x01 \x01(\tBR\xe0\x41\x02\xfa\x41L\nJsecuritycenter.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\"\x88\x01\n-GetSecurityHealthAnalyticsCustomModuleRequest\x12W\n\x04name\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\nAsecuritycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\x83\x02\n\x12GroupAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x10\x63ompare_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xb8\x01\n\x13GroupAssetsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\x86\x02\n\x14GroupFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xba\x01\n\x15GroupFindingsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\xb8\x01\n\x0bGroupResult\x12O\n\nproperties\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v1.GroupResult.PropertiesEntry\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x1aI\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"\xbd\x01\n9ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xcc\x01\n:ListDescendantSecurityHealthAnalyticsCustomModulesResponse\x12u\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb0\x01\n\x1aListValuedResourcesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/ValuedResource\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x1bListValuedResourcesResponse\x12H\n\x10valued_resources\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.ValuedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x91\x01\n\x16ListAttackPathsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/AttackPath\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"t\n\x17ListAttackPathsResponse\x12@\n\x0c\x61ttack_paths\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v1.AttackPath\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x14GetSimulationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/Simulation\"^\n\x18GetValuedResourceRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/ValuedResource\"\x81\x01\n\x16ListMuteConfigsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x17ListMuteConfigsResponse\x12@\n\x0cmute_configs\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v1.MuteConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x91\x01\n\x1eListNotificationConfigsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x8c\x01\n\x1fListNotificationConfigsResponse\x12P\n\x14notification_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbc\x01\n8ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xdf\x01\n9ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\x12\x88\x01\n2effective_security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32L.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb3\x01\n/ListSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xc2\x01\n0ListSecurityHealthAnalyticsCustomModulesResponse\x12u\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x12ListSourcesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$securitycenter.googleapis.com/Source\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x07 \x01(\x05\"g\n\x13ListSourcesResponse\x12\x37\n\x07sources\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v1.Source\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x02\n\x11ListAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xc3\x03\n\x12ListAssetsResponse\x12`\n\x13list_assets_results\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xee\x01\n\x10ListAssetsResult\x12\x34\n\x05\x61sset\x18\x01 \x01(\x0b\x32%.google.cloud.securitycenter.v1.Asset\x12\x65\n\x0cstate_change\x18\x02 \x01(\x0e\x32O.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange\"=\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x01\x12\x0b\n\x07REMOVED\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\"\xb0\x02\n\x13ListFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xb8\t\n\x14ListFindingsResponse\x12\x66\n\x15list_findings_results\x18\x01 \x03(\x0b\x32G.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xdb\x07\n\x12ListFindingsResult\x12\x38\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Finding\x12i\n\x0cstate_change\x18\x02 \x01(\x0e\x32S.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange\x12g\n\x08resource\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xe7\x04\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x08 \x01(\t\x12\x0c\n\x04type\x18\x06 \x01(\t\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x1c\n\x14project_display_name\x18\x03 \x01(\t\x12\x13\n\x0bparent_name\x18\x04 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x05 \x01(\t\x12\x37\n\x07\x66olders\x18\x07 \x03(\x0b\x32&.google.cloud.securitycenter.v1.Folder\x12\x45\n\x0e\x63loud_provider\x18\t \x01(\x0e\x32-.google.cloud.securitycenter.v1.CloudProvider\x12\x14\n\x0corganization\x18\n \x01(\t\x12\x0f\n\x07service\x18\x0b \x01(\t\x12\x10\n\x08location\x18\x0c \x01(\t\x12\x43\n\x0c\x61ws_metadata\x18\x10 \x01(\x0b\x32+.google.cloud.securitycenter.v1.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\x11 \x01(\x0b\x32-.google.cloud.securitycenter.v1.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\x12 \x01(\x0b\x32,.google.cloud.securitycenter.v1.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x13 \x01(\tB\x19\n\x17\x63loud_provider_metadata\"M\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\x0b\n\x07\x43HANGED\x10\x01\x12\r\n\tUNCHANGED\x10\x02\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x03\x12\x0b\n\x07REMOVED\x10\x04\"\xcd\x01\n\x16SetFindingStateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v1.Finding.StateB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\x8e\x01\n\x0eSetMuteRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12?\n\x04mute\x18\x02 \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.MuteB\x03\xe0\x41\x02\"d\n\x18RunAssetDiscoveryRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\"\xac\x03\n2SimulateSecurityHealthAnalyticsCustomModuleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\rcustom_config\x18\x02 \x01(\x0b\x32,.google.cloud.securitycenter.v1.CustomConfigB\x03\xe0\x41\x02\x12{\n\x08resource\x18\x03 \x01(\x0b\x32\x64.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResourceB\x03\xe0\x41\x02\x1a\x99\x01\n\x11SimulatedResource\x12\x1a\n\rresource_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\rresource_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x33\n\x0fiam_policy_data\x18\x03 \x01(\x0b\x32\x15.google.iam.v1.PolicyB\x03\xe0\x41\x01\"\xd9\x02\n3SimulateSecurityHealthAnalyticsCustomModuleResponse\x12s\n\x06result\x18\x01 \x01(\x0b\x32\x63.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult\x1a\xac\x01\n\x0fSimulatedResult\x12:\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.FindingH\x00\x12.\n\x0cno_violation\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12#\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42\x08\n\x06result\"\x9c\x01\n\x1bUpdateExternalSystemRequest\x12L\n\x0f\x65xternal_system\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.ExternalSystemB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x86\x01\n\x14UpdateFindingRequest\x12=\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.FindingB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x90\x01\n\x17UpdateMuteConfigRequest\x12\x44\n\x0bmute_config\x18\x01 \x01(\x0b\x32*.google.cloud.securitycenter.v1.MuteConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa8\x01\n\x1fUpdateNotificationConfigRequest\x12T\n\x13notification_config\x18\x01 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xae\x01\n!UpdateOrganizationSettingsRequest\x12X\n\x15organization_settings\x18\x01 \x01(\x0b\x32\x34.google.cloud.securitycenter.v1.OrganizationSettingsB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xde\x01\n0UpdateSecurityHealthAnalyticsCustomModuleRequest\x12y\n\'security_health_analytics_custom_module\x18\x01 \x01(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x83\x01\n\x13UpdateSourceRequest\x12;\n\x06source\x18\x01 \x01(\x0b\x32&.google.cloud.securitycenter.v1.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xc9\x01\n\x1aUpdateSecurityMarksRequest\x12J\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarksB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd4\x01\n\x1b\x43reateBigQueryExportRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12M\n\x10\x62ig_query_export\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExportB\x03\xe0\x41\x02\x12 \n\x13\x62ig_query_export_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9d\x01\n\x1bUpdateBigQueryExportRequest\x12M\n\x10\x62ig_query_export\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExportB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x89\x01\n\x1aListBigQueryExportsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x1bListBigQueryExportsResponse\x12I\n\x11\x62ig_query_exports\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x1b\x44\x65leteBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"\xfc\x01\n-CreateEventThreatDetectionCustomModuleRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12s\n$event_threat_detection_custom_module\x18\x02 \x01(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\"\xb3\x01\n/ValidateEventThreatDetectionCustomModuleRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x15\n\x08raw_text\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x80\x01\n0ValidateEventThreatDetectionCustomModuleResponse\x12L\n\x06\x65rrors\x18\x02 \x01(\x0b\x32<.google.cloud.securitycenter.v1.CustomModuleValidationErrors\"\x85\x01\n-DeleteEventThreatDetectionCustomModuleRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\"\x82\x01\n*GetEventThreatDetectionCustomModuleRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\"\xb7\x01\n6ListDescendantEventThreatDetectionCustomModulesRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xc3\x01\n7ListDescendantEventThreatDetectionCustomModulesResponse\x12o\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n,ListEventThreatDetectionCustomModulesRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xb9\x01\n-ListEventThreatDetectionCustomModulesResponse\x12o\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd5\x01\n-UpdateEventThreatDetectionCustomModuleRequest\x12s\n$event_threat_detection_custom_module\x18\x01 \x01(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x94\x01\n3GetEffectiveEventThreatDetectionCustomModuleRequest\x12]\n\x04name\x18\x01 \x01(\tBO\xe0\x41\x02\xfa\x41I\nGsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\"\xbf\x01\n5ListEffectiveEventThreatDetectionCustomModulesRequest\x12_\n\x06parent\x18\x01 \x01(\tBO\xe0\x41\x02\xfa\x41I\x12Gsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xd6\x01\n6ListEffectiveEventThreatDetectionCustomModulesResponse\x12\x82\x01\n/effective_event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32I.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf7\xb2\x01\n\x0eSecurityCenter\x12\xe2\x02\n\x10\x42ulkMuteFindings\x12\x37.google.cloud.securitycenter.v1.BulkMuteFindingsRequest\x1a\x1d.google.longrunning.Operation\"\xf5\x01\xca\x41P\n7google.cloud.securitycenter.v1.BulkMuteFindingsResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x92\x01\"./v1/{parent=organizations/*}/findings:bulkMute:\x01*Z-\"(/v1/{parent=folders/*}/findings:bulkMute:\x01*Z.\")/v1/{parent=projects/*}/findings:bulkMute:\x01*\x12\xd5\x04\n)CreateSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\x90\x03\xda\x41.parent,security_health_analytics_custom_module\x82\xd3\xe4\x93\x02\xd8\x02\"J/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_moduleZo\"D/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_moduleZp\"E/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_module\x12\xb1\x01\n\x0c\x43reateSource\x12\x33.google.cloud.securitycenter.v1.CreateSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"D\xda\x41\rparent,source\x82\xd3\xe4\x93\x02.\"$/v1/{parent=organizations/*}/sources:\x06source\x12\xcc\x01\n\rCreateFinding\x12\x34.google.cloud.securitycenter.v1.CreateFindingRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\\\xda\x41\x19parent,finding_id,finding\x82\xd3\xe4\x93\x02:\"//v1/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\x9c\x04\n\x10\x43reateMuteConfig\x12\x37.google.cloud.securitycenter.v1.CreateMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xa2\x03\xda\x41\x12parent,mute_config\xda\x41!parent,mute_config,mute_config_id\x82\xd3\xe4\x93\x02\xe2\x02\"(/v1/{parent=organizations/*}/muteConfigs:\x0bmute_configZC\"4/v1/{parent=organizations/*/locations/*}/muteConfigs:\x0bmute_configZ1\"\"/v1/{parent=folders/*}/muteConfigs:\x0bmute_configZ=\"./v1/{parent=folders/*/locations/*}/muteConfigs:\x0bmute_configZ2\"#/v1/{parent=projects/*}/muteConfigs:\x0bmute_configZ>\"//v1/{parent=projects/*/locations/*}/muteConfigs:\x0bmute_config\x12\xab\x03\n\x18\x43reateNotificationConfig\x12?.google.cloud.securitycenter.v1.CreateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\x99\x02\xda\x41$parent,config_id,notification_config\xda\x41\x1aparent,notification_config\x82\xd3\xe4\x93\x02\xce\x01\"0/v1/{parent=organizations/*}/notificationConfigs:\x13notification_configZA\"*/v1/{parent=folders/*}/notificationConfigs:\x13notification_configZB\"+/v1/{parent=projects/*}/notificationConfigs:\x13notification_config\x12\x88\x03\n\x10\x44\x65leteMuteConfig\x12\x37.google.cloud.securitycenter.v1.DeleteMuteConfigRequest\x1a\x16.google.protobuf.Empty\"\xa2\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x02*(/v1/{name=organizations/*/muteConfigs/*}Z$*\"/v1/{name=folders/*/muteConfigs/*}Z%*#/v1/{name=projects/*/muteConfigs/*}Z6*4/v1/{name=organizations/*/locations/*/muteConfigs/*}Z0*./v1/{name=folders/*/locations/*/muteConfigs/*}Z1*//v1/{name=projects/*/locations/*/muteConfigs/*}\x12\x93\x02\n\x18\x44\x65leteNotificationConfig\x12?.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest\x1a\x16.google.protobuf.Empty\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01*0/v1/{name=organizations/*/notificationConfigs/*}Z,**/v1/{name=folders/*/notificationConfigs/*}Z-*+/v1/{name=projects/*/notificationConfigs/*}\x12\x83\x03\n)DeleteSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01*J/v1/{name=organizations/*/securityHealthAnalyticsSettings/customModules/*}ZF*D/v1/{name=folders/*/securityHealthAnalyticsSettings/customModules/*}ZG*E/v1/{name=projects/*/securityHealthAnalyticsSettings/customModules/*}\x12\xaa\x01\n\rGetSimulation\x12\x34.google.cloud.securitycenter.v1.GetSimulationRequest\x1a*.google.cloud.securitycenter.v1.Simulation\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=organizations/*/simulations/*}\x12\xc8\x01\n\x11GetValuedResource\x12\x38.google.cloud.securitycenter.v1.GetValuedResourceRequest\x1a..google.cloud.securitycenter.v1.ValuedResource\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=organizations/*/simulations/*/valuedResources/*}\x12\x91\x02\n\x11GetBigQueryExport\x12\x38.google.cloud.securitycenter.v1.GetBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\x91\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x83\x01\x12,/v1/{name=organizations/*/bigQueryExports/*}Z(\x12&/v1/{name=folders/*/bigQueryExports/*}Z)\x12\'/v1/{name=projects/*/bigQueryExports/*}\x12\x96\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"K\xda\x41\x08resource\x82\xd3\xe4\x93\x02:\"5/v1/{resource=organizations/*/sources/*}:getIamPolicy:\x01*\x12\x96\x03\n\rGetMuteConfig\x12\x34.google.cloud.securitycenter.v1.GetMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xa2\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x02\x12(/v1/{name=organizations/*/muteConfigs/*}Z$\x12\"/v1/{name=folders/*/muteConfigs/*}Z%\x12#/v1/{name=projects/*/muteConfigs/*}Z6\x12\x34/v1/{name=organizations/*/locations/*/muteConfigs/*}Z0\x12./v1/{name=folders/*/locations/*/muteConfigs/*}Z1\x12//v1/{name=projects/*/locations/*/muteConfigs/*}\x12\xa9\x02\n\x15GetNotificationConfig\x12<.google.cloud.securitycenter.v1.GetNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01\x12\x30/v1/{name=organizations/*/notificationConfigs/*}Z,\x12*/v1/{name=folders/*/notificationConfigs/*}Z-\x12+/v1/{name=projects/*/notificationConfigs/*}\x12\xcf\x01\n\x17GetOrganizationSettings\x12>.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest\x1a\x34.google.cloud.securitycenter.v1.OrganizationSettings\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=organizations/*/organizationSettings}\x12\xe0\x03\n/GetEffectiveSecurityHealthAnalyticsCustomModule\x12V.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x1aL.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule\"\x86\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xf8\x01\x12S/v1/{name=organizations/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}ZO\x12M/v1/{name=folders/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}ZP\x12N/v1/{name=projects/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}\x12\xaa\x03\n&GetSecurityHealthAnalyticsCustomModule\x12M.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01\x12J/v1/{name=organizations/*/securityHealthAnalyticsSettings/customModules/*}ZF\x12\x44/v1/{name=folders/*/securityHealthAnalyticsSettings/customModules/*}ZG\x12\x45/v1/{name=projects/*/securityHealthAnalyticsSettings/customModules/*}\x12\x9a\x01\n\tGetSource\x12\x30.google.cloud.securitycenter.v1.GetSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1/{name=organizations/*/sources/*}\x12\x86\x02\n\x0bGroupAssets\x12\x32.google.cloud.securitycenter.v1.GroupAssetsRequest\x1a\x33.google.cloud.securitycenter.v1.GroupAssetsResponse\"\x8d\x01\x88\x02\x01\x82\xd3\xe4\x93\x02\x83\x01\")/v1/{parent=organizations/*}/assets:group:\x01*Z(\"#/v1/{parent=folders/*}/assets:group:\x01*Z)\"$/v1/{parent=projects/*}/assets:group:\x01*\x12\xbf\x02\n\rGroupFindings\x12\x34.google.cloud.securitycenter.v1.GroupFindingsRequest\x1a\x35.google.cloud.securitycenter.v1.GroupFindingsResponse\"\xc0\x01\xda\x41\x0fparent,group_by\x82\xd3\xe4\x93\x02\xa7\x01\"5/v1/{parent=organizations/*/sources/*}/findings:group:\x01*Z4\"//v1/{parent=folders/*/sources/*}/findings:group:\x01*Z5\"0/v1/{parent=projects/*/sources/*}/findings:group:\x01*\x12\xe6\x01\n\nListAssets\x12\x31.google.cloud.securitycenter.v1.ListAssetsRequest\x1a\x32.google.cloud.securitycenter.v1.ListAssetsResponse\"q\x88\x02\x01\x82\xd3\xe4\x93\x02h\x12#/v1/{parent=organizations/*}/assetsZ\x1f\x12\x1d/v1/{parent=folders/*}/assetsZ \x12\x1e/v1/{parent=projects/*}/assets\x12\x88\x04\n2ListDescendantSecurityHealthAnalyticsCustomModules\x12Y.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x1aZ.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse\"\x9a\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8a\x02\x12Y/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:listDescendantZU\x12S/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:listDescendantZV\x12T/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:listDescendant\x12\x8f\x02\n\x0cListFindings\x12\x33.google.cloud.securitycenter.v1.ListFindingsRequest\x1a\x34.google.cloud.securitycenter.v1.ListFindingsResponse\"\x93\x01\x82\xd3\xe4\x93\x02\x8c\x01\x12//v1/{parent=organizations/*/sources/*}/findingsZ+\x12)/v1/{parent=folders/*/sources/*}/findingsZ,\x12*/v1/{parent=projects/*/sources/*}/findings\x12\xa9\x03\n\x0fListMuteConfigs\x12\x36.google.cloud.securitycenter.v1.ListMuteConfigsRequest\x1a\x37.google.cloud.securitycenter.v1.ListMuteConfigsResponse\"\xa4\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x94\x02\x12(/v1/{parent=organizations/*}/muteConfigsZ$\x12\"/v1/{parent=folders/*}/muteConfigsZ%\x12#/v1/{parent=projects/*}/muteConfigsZ6\x12\x34/v1/{parent=organizations/*/locations/*/muteConfigs}Z0\x12./v1/{parent=folders/*/locations/*/muteConfigs}Z1\x12//v1/{parent=projects/*/locations/*/muteConfigs}\x12\xbc\x02\n\x17ListNotificationConfigs\x12>.google.cloud.securitycenter.v1.ListNotificationConfigsRequest\x1a?.google.cloud.securitycenter.v1.ListNotificationConfigsResponse\"\x9f\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8f\x01\x12\x30/v1/{parent=organizations/*}/notificationConfigsZ,\x12*/v1/{parent=folders/*}/notificationConfigsZ-\x12+/v1/{parent=projects/*}/notificationConfigs\x12\xf3\x03\n1ListEffectiveSecurityHealthAnalyticsCustomModules\x12X.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x1aY.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\"\x88\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xf8\x01\x12S/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/effectiveCustomModulesZO\x12M/v1/{parent=folders/*/securityHealthAnalyticsSettings}/effectiveCustomModulesZP\x12N/v1/{parent=projects/*/securityHealthAnalyticsSettings}/effectiveCustomModules\x12\xbd\x03\n(ListSecurityHealthAnalyticsCustomModules\x12O.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest\x1aP.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse\"\xed\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xdd\x01\x12J/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModulesZF\x12\x44/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModulesZG\x12\x45/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules\x12\xf2\x01\n\x0bListSources\x12\x32.google.cloud.securitycenter.v1.ListSourcesRequest\x1a\x33.google.cloud.securitycenter.v1.ListSourcesResponse\"z\xda\x41\x06parent\x82\xd3\xe4\x93\x02k\x12$/v1/{parent=organizations/*}/sourcesZ \x12\x1e/v1/{parent=folders/*}/sourcesZ!\x12\x1f/v1/{parent=projects/*}/sources\x12\x8a\x02\n\x11RunAssetDiscovery\x12\x38.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\x88\x02\x01\xca\x41Q\n8google.cloud.securitycenter.v1.RunAssetDiscoveryResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\"0/v1/{parent=organizations/*}/assets:runDiscovery:\x01*\x12\xc4\x02\n\x0fSetFindingState\x12\x36.google.cloud.securitycenter.v1.SetFindingStateRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xcf\x01\xda\x41\x15name,state,start_time\x82\xd3\xe4\x93\x02\xb0\x01\"8/v1/{name=organizations/*/sources/*/findings/*}:setState:\x01*Z7\"2/v1/{name=folders/*/sources/*/findings/*}:setState:\x01*Z8\"3/v1/{name=projects/*/sources/*/findings/*}:setState:\x01*\x12\xa5\x02\n\x07SetMute\x12..google.cloud.securitycenter.v1.SetMuteRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xc0\x01\xda\x41\tname,mute\x82\xd3\xe4\x93\x02\xad\x01\"7/v1/{name=organizations/*/sources/*/findings/*}:setMute:\x01*Z6\"1/v1/{name=folders/*/sources/*/findings/*}:setMute:\x01*Z7\"2/v1/{name=projects/*/sources/*/findings/*}:setMute:\x01*\x12\x9d\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"R\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02:\"5/v1/{resource=organizations/*/sources/*}:setIamPolicy:\x01*\x12\xc8\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02@\";/v1/{resource=organizations/*/sources/*}:testIamPermissions:\x01*\x12\x81\x04\n+SimulateSecurityHealthAnalyticsCustomModule\x12R.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest\x1aS.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse\"\xa8\x02\xda\x41\x1dparent,custom_config,resource\x82\xd3\xe4\x93\x02\x81\x02\"S/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*ZR\"M/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*ZS\"N/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*\x12\xd0\x03\n\x14UpdateExternalSystem\x12;.google.cloud.securitycenter.v1.UpdateExternalSystemRequest\x1a..google.cloud.securitycenter.v1.ExternalSystem\"\xca\x02\xda\x41\x1b\x65xternal_system,update_mask\x82\xd3\xe4\x93\x02\xa5\x02\x32Q/v1/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ^2K/v1/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ_2L/v1/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_system\x12\xc1\x02\n\rUpdateFinding\x12\x34.google.cloud.securitycenter.v1.UpdateFindingRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xd0\x01\xda\x41\x07\x66inding\x82\xd3\xe4\x93\x02\xbf\x01\x32\x37/v1/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZ<21/v1/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZ=22/v1/{finding.name=projects/*/sources/*/findings/*}:\x07\x66inding\x12\xc5\x04\n\x10UpdateMuteConfig\x12\x37.google.cloud.securitycenter.v1.UpdateMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xcb\x03\xda\x41\x17mute_config,update_mask\x82\xd3\xe4\x93\x02\xaa\x03\x32\x34/v1/{mute_config.name=organizations/*/muteConfigs/*}:\x0bmute_configZ=2./v1/{mute_config.name=folders/*/muteConfigs/*}:\x0bmute_configZ>2//v1/{mute_config.name=projects/*/muteConfigs/*}:\x0bmute_configZO2@/v1/{mute_config.name=organizations/*/locations/*/muteConfigs/*}:\x0bmute_configZI2:/v1/{mute_config.name=folders/*/locations/*/muteConfigs/*}:\x0bmute_configZJ2;/v1/{mute_config.name=projects/*/locations/*/muteConfigs/*}:\x0bmute_config\x12\xdb\x03\n\x18UpdateNotificationConfig\x12?.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\xc9\x02\xda\x41\x13notification_config\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\x8a\x02\x32\x44/v1/{notification_config.name=organizations/*/notificationConfigs/*}:\x13notification_configZU2>/v1/{notification_config.name=folders/*/notificationConfigs/*}:\x13notification_configZV2?/v1/{notification_config.name=projects/*/notificationConfigs/*}:\x13notification_config\x12\x93\x02\n\x1aUpdateOrganizationSettings\x12\x41.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest\x1a\x34.google.cloud.securitycenter.v1.OrganizationSettings\"|\xda\x41\x15organization_settings\x82\xd3\xe4\x93\x02^2E/v1/{organization_settings.name=organizations/*/organizationSettings}:\x15organization_settings\x12\xd4\x05\n)UpdateSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\x8f\x04\xda\x41\x33security_health_analytics_custom_module,update_mask\x82\xd3\xe4\x93\x02\xd2\x03\x32r/v1/{security_health_analytics_custom_module.name=organizations/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_moduleZ\x97\x01\x32l/v1/{security_health_analytics_custom_module.name=folders/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_moduleZ\x98\x01\x32m/v1/{security_health_analytics_custom_module.name=projects/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_module\x12\xb1\x01\n\x0cUpdateSource\x12\x33.google.cloud.securitycenter.v1.UpdateSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"D\xda\x41\x06source\x82\xd3\xe4\x93\x02\x35\x32+/v1/{source.name=organizations/*/sources/*}:\x06source\x12\x9f\x05\n\x13UpdateSecurityMarks\x12:.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest\x1a-.google.cloud.securitycenter.v1.SecurityMarks\"\x9c\x04\xda\x41\x0esecurity_marks\x82\xd3\xe4\x93\x02\x84\x04\x32@/v1/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZL2:/v1/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZM2;/v1/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZ^2L/v1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZX2F/v1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZY2G/v1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marks\x12\xf4\x02\n\x14\x43reateBigQueryExport\x12;.google.cloud.securitycenter.v1.CreateBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\xee\x01\xda\x41+parent,big_query_export,big_query_export_id\x82\xd3\xe4\x93\x02\xb9\x01\",/v1/{parent=organizations/*}/bigQueryExports:\x10\x62ig_query_exportZ:\"&/v1/{parent=folders/*}/bigQueryExports:\x10\x62ig_query_exportZ;\"\'/v1/{parent=projects/*}/bigQueryExports:\x10\x62ig_query_export\x12\xff\x01\n\x14\x44\x65leteBigQueryExport\x12;.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest\x1a\x16.google.protobuf.Empty\"\x91\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x83\x01*,/v1/{name=organizations/*/bigQueryExports/*}Z(*&/v1/{name=folders/*/bigQueryExports/*}Z)*\'/v1/{name=projects/*/bigQueryExports/*}\x12\x98\x03\n\x14UpdateBigQueryExport\x12;.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\x92\x02\xda\x41\x1c\x62ig_query_export,update_mask\x82\xd3\xe4\x93\x02\xec\x01\x32=/v1/{big_query_export.name=organizations/*/bigQueryExports/*}:\x10\x62ig_query_exportZK27/v1/{big_query_export.name=folders/*/bigQueryExports/*}:\x10\x62ig_query_exportZL28/v1/{big_query_export.name=projects/*/bigQueryExports/*}:\x10\x62ig_query_export\x12\xa4\x02\n\x13ListBigQueryExports\x12:.google.cloud.securitycenter.v1.ListBigQueryExportsRequest\x1a;.google.cloud.securitycenter.v1.ListBigQueryExportsResponse\"\x93\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x83\x01\x12,/v1/{parent=organizations/*}/bigQueryExportsZ(\x12&/v1/{parent=folders/*}/bigQueryExportsZ)\x12\'/v1/{parent=projects/*}/bigQueryExports\x12\xb7\x04\n&CreateEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xfb\x02\xda\x41+parent,event_threat_detection_custom_module\x82\xd3\xe4\x93\x02\xc6\x02\"G/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_moduleZi\"A/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_moduleZj\"B/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_module\x12\xf4\x02\n&DeleteEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xe2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd4\x01*G/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}ZC*A/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}ZD*B/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}\x12\x98\x03\n#GetEventThreatDetectionCustomModule\x12J.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xe2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd4\x01\x12G/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}ZC\x12\x41/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}ZD\x12\x42/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}\x12\xf6\x03\n/ListDescendantEventThreatDetectionCustomModules\x12V.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest\x1aW.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse\"\x91\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x81\x02\x12V/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules:listDescendantZR\x12P/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules:listDescendantZS\x12Q/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules:listDescendant\x12\xab\x03\n%ListEventThreatDetectionCustomModules\x12L.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest\x1aM.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse\"\xe4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd4\x01\x12G/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModulesZC\x12\x41/v1/{parent=folders/*/eventThreatDetectionSettings}/customModulesZD\x12\x42/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules\x12\xad\x05\n&UpdateEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xf1\x03\xda\x41\x30\x65vent_threat_detection_custom_module,update_mask\x82\xd3\xe4\x93\x02\xb7\x03\x32l/v1/{event_threat_detection_custom_module.name=organizations/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_moduleZ\x8e\x01\x32\x66/v1/{event_threat_detection_custom_module.name=folders/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_moduleZ\x8f\x01\x32g/v1/{event_threat_detection_custom_module.name=projects/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_module\x12\xc9\x03\n(ValidateEventThreatDetectionCustomModule\x12O.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest\x1aP.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse\"\xf9\x01\x82\xd3\xe4\x93\x02\xf2\x01\"N/v1/{parent=organizations/*/eventThreatDetectionSettings}:validateCustomModule:\x01*ZM\"H/v1/{parent=folders/*/eventThreatDetectionSettings}:validateCustomModule:\x01*ZN\"I/v1/{parent=projects/*/eventThreatDetectionSettings}:validateCustomModule:\x01*\x12\xce\x03\n,GetEffectiveEventThreatDetectionCustomModule\x12S.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest\x1aI.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule\"\xfd\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xef\x01\x12P/v1/{name=organizations/*/eventThreatDetectionSettings/effectiveCustomModules/*}ZL\x12J/v1/{name=folders/*/eventThreatDetectionSettings/effectiveCustomModules/*}ZM\x12K/v1/{name=projects/*/eventThreatDetectionSettings/effectiveCustomModules/*}\x12\xe1\x03\n.ListEffectiveEventThreatDetectionCustomModules\x12U.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest\x1aV.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse\"\xff\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xef\x01\x12P/v1/{parent=organizations/*/eventThreatDetectionSettings}/effectiveCustomModulesZL\x12J/v1/{parent=folders/*/eventThreatDetectionSettings}/effectiveCustomModulesZM\x12K/v1/{parent=projects/*/eventThreatDetectionSettings}/effectiveCustomModules\x12\x8e\x02\n\x1f\x42\x61tchCreateResourceValueConfigs\x12\x46.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest\x1aG.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse\"Z\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x42\"=/v1/{parent=organizations/*}/resourceValueConfigs:batchCreate:\x01*\x12\xb7\x01\n\x19\x44\x65leteResourceValueConfig\x12@.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest\x1a\x16.google.protobuf.Empty\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=organizations/*/resourceValueConfigs/*}\x12\xce\x01\n\x16GetResourceValueConfig\x12=.google.cloud.securitycenter.v1.GetResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v1.ResourceValueConfig\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=organizations/*/resourceValueConfigs/*}\x12\xe1\x01\n\x18ListResourceValueConfigs\x12?.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest\x1a@.google.cloud.securitycenter.v1.ListResourceValueConfigsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=organizations/*}/resourceValueConfigs\x12\x9f\x02\n\x19UpdateResourceValueConfig\x12@.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v1.ResourceValueConfig\"\x8a\x01\xda\x41!resource_value_config,update_mask\x82\xd3\xe4\x93\x02`2G/v1/{resource_value_config.name=organizations/*/resourceValueConfigs/*}:\x15resource_value_config\x12\xb3\x02\n\x13ListValuedResources\x12:.google.cloud.securitycenter.v1.ListValuedResourcesRequest\x1a;.google.cloud.securitycenter.v1.ListValuedResourcesResponse\"\xa2\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x92\x01\x12:/v1/{parent=organizations/*/simulations/*}/valuedResourcesZT\x12R/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/valuedResources\x12\xeb\x02\n\x0fListAttackPaths\x12\x36.google.cloud.securitycenter.v1.ListAttackPathsRequest\x1a\x37.google.cloud.securitycenter.v1.ListAttackPathsResponse\"\xe6\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd6\x01\x12\x36/v1/{parent=organizations/*/simulations/*}/attackPathsZJ\x12H/v1/{parent=organizations/*/simulations/*/valuedResources/*}/attackPathsZP\x12N/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/attackPaths\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe5\x05\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41g\n2securitycenter.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41U\n,securitycenter.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41m\n4securitycenter.googleapis.com/OrganizationSimulation\x12\x35organizations/{organization}/simulations/{simulation}\xea\x41\xd7\x01\n:securitycenter.googleapis.com/EventThreatDetectionSettings\x12\x39organizations/{organization}/eventThreatDetectionSettings\x12-folders/{folder}/eventThreatDetectionSettings\x12/projects/{project}/eventThreatDetectionSettingsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + BulkMuteFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsRequest").msgclass + BulkMuteFindingsRequest::MuteState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsRequest.MuteState").enummodule + BulkMuteFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsResponse").msgclass + CreateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateFindingRequest").msgclass + CreateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateMuteConfigRequest").msgclass + CreateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateResourceValueConfigRequest").msgclass + BatchCreateResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest").msgclass + BatchCreateResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse").msgclass + DeleteResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest").msgclass + GetResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetResourceValueConfigRequest").msgclass + ListResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListResourceValueConfigsRequest").msgclass + ListResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListResourceValueConfigsResponse").msgclass + UpdateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest").msgclass + CreateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateNotificationConfigRequest").msgclass + CreateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest").msgclass + CreateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateSourceRequest").msgclass + DeleteMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteMuteConfigRequest").msgclass + DeleteNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteNotificationConfigRequest").msgclass + DeleteSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest").msgclass + GetBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetBigQueryExportRequest").msgclass + GetMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetMuteConfigRequest").msgclass + GetNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetNotificationConfigRequest").msgclass + GetOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetOrganizationSettingsRequest").msgclass + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest").msgclass + GetSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest").msgclass + GetSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSourceRequest").msgclass + GroupAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupAssetsRequest").msgclass + GroupAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupAssetsResponse").msgclass + GroupFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupFindingsRequest").msgclass + GroupFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupFindingsResponse").msgclass + GroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupResult").msgclass + ListDescendantSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest").msgclass + ListDescendantSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse").msgclass + ListValuedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListValuedResourcesRequest").msgclass + ListValuedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListValuedResourcesResponse").msgclass + ListAttackPathsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAttackPathsRequest").msgclass + ListAttackPathsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAttackPathsResponse").msgclass + GetSimulationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSimulationRequest").msgclass + GetValuedResourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetValuedResourceRequest").msgclass + ListMuteConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListMuteConfigsRequest").msgclass + ListMuteConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListMuteConfigsResponse").msgclass + ListNotificationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListNotificationConfigsRequest").msgclass + ListNotificationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListNotificationConfigsResponse").msgclass + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest").msgclass + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse").msgclass + ListSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest").msgclass + ListSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse").msgclass + ListSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSourcesRequest").msgclass + ListSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSourcesResponse").msgclass + ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsRequest").msgclass + ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse").msgclass + ListAssetsResponse::ListAssetsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult").msgclass + ListAssetsResponse::ListAssetsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange").enummodule + ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsRequest").msgclass + ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse").msgclass + ListFindingsResponse::ListFindingsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult").msgclass + ListFindingsResponse::ListFindingsResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource").msgclass + ListFindingsResponse::ListFindingsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange").enummodule + SetFindingStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SetFindingStateRequest").msgclass + SetMuteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SetMuteRequest").msgclass + RunAssetDiscoveryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.RunAssetDiscoveryRequest").msgclass + SimulateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest").msgclass + SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource").msgclass + SimulateSecurityHealthAnalyticsCustomModuleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse").msgclass + SimulateSecurityHealthAnalyticsCustomModuleResponse::SimulatedResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult").msgclass + UpdateExternalSystemRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateExternalSystemRequest").msgclass + UpdateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateFindingRequest").msgclass + UpdateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateMuteConfigRequest").msgclass + UpdateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateNotificationConfigRequest").msgclass + UpdateOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest").msgclass + UpdateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest").msgclass + UpdateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSourceRequest").msgclass + UpdateSecurityMarksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSecurityMarksRequest").msgclass + CreateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateBigQueryExportRequest").msgclass + UpdateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateBigQueryExportRequest").msgclass + ListBigQueryExportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListBigQueryExportsRequest").msgclass + ListBigQueryExportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListBigQueryExportsResponse").msgclass + DeleteBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteBigQueryExportRequest").msgclass + CreateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest").msgclass + ValidateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest").msgclass + ValidateEventThreatDetectionCustomModuleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse").msgclass + DeleteEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest").msgclass + GetEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest").msgclass + ListDescendantEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest").msgclass + ListDescendantEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse").msgclass + ListEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest").msgclass + ListEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse").msgclass + UpdateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest").msgclass + GetEffectiveEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest").msgclass + ListEffectiveEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest").msgclass + ListEffectiveEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb new file mode 100644 index 000000000000..0d62cc122298 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb @@ -0,0 +1,226 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/securitycenter/v1/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/securitycenter/v1/securitycenter_service_pb' + +module Google + module Cloud + module SecurityCenter + module V1 + module SecurityCenter + # V1 APIs for Security Center service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.securitycenter.v1.SecurityCenter' + + # Kicks off an LRO to bulk mute findings for a parent based on a filter. The + # parent can be either an organization, folder or project. The findings + # matched by the filter will be muted after the LRO is done. + rpc :BulkMuteFindings, ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Google::Longrunning::Operation + # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the + # given CRM parent, and also creates inherited + # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given + # parent. These modules are enabled by default. + rpc :CreateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule + # Creates a source. + rpc :CreateSource, ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source + # Creates a finding. The corresponding source must exist for finding creation + # to succeed. + rpc :CreateFinding, ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Google::Cloud::SecurityCenter::V1::Finding + # Creates a mute config. + rpc :CreateMuteConfig, ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig + # Creates a notification config. + rpc :CreateNotificationConfig, ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig + # Deletes an existing mute config. + rpc :DeleteMuteConfig, ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Google::Protobuf::Empty + # Deletes a notification config. + rpc :DeleteNotificationConfig, ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Google::Protobuf::Empty + # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its + # descendants in the CRM hierarchy. This method is only supported for + # resident custom modules. + rpc :DeleteSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Google::Protobuf::Empty + # Get the simulation by name or the latest simulation for the given + # organization. + rpc :GetSimulation, ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Google::Cloud::SecurityCenter::V1::Simulation + # Get the valued resource by name + rpc :GetValuedResource, ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Google::Cloud::SecurityCenter::V1::ValuedResource + # Gets a BigQuery export. + rpc :GetBigQueryExport, ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport + # Gets the access control policy on the specified Source. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets a mute config. + rpc :GetMuteConfig, ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig + # Gets a notification config. + rpc :GetNotificationConfig, ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig + # Gets the settings for an organization. + rpc :GetOrganizationSettings, ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1::OrganizationSettings + # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. + rpc :GetEffectiveSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule + # Retrieves a SecurityHealthAnalyticsCustomModule. + rpc :GetSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule + # Gets a source. + rpc :GetSource, ::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source + # Filters an organization's assets and groups them by their specified + # properties. + rpc :GroupAssets, ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse + # Filters an organization or source's findings and groups them by their + # specified properties. + # + # To group across all sources provide a `-` as the source id. + # Example: /v1/organizations/{organization_id}/sources/-/findings, + # /v1/folders/{folder_id}/sources/-/findings, + # /v1/projects/{project_id}/sources/-/findings + rpc :GroupFindings, ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse + # Lists an organization's assets. + rpc :ListAssets, ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse + # Returns a list of all resident SecurityHealthAnalyticsCustomModules under + # the given CRM parent and all of the parent’s CRM descendants. + rpc :ListDescendantSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse + # Lists an organization or source's findings. + # + # To list across all sources provide a `-` as the source id. + # Example: /v1/organizations/{organization_id}/sources/-/findings + rpc :ListFindings, ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse + # Lists mute configs. + rpc :ListMuteConfigs, ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse + # Lists notification configs. + rpc :ListNotificationConfigs, ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse + # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the + # given parent. This includes resident modules defined at the scope of the + # parent, and inherited modules, inherited from CRM ancestors. + rpc :ListEffectiveSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + # Returns a list of all SecurityHealthAnalyticsCustomModules for the given + # parent. This includes resident modules defined at the scope of the parent, + # and inherited modules, inherited from CRM ancestors. + rpc :ListSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse + # Lists all sources belonging to an organization. + rpc :ListSources, ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse + # Runs asset discovery. The discovery is tracked with a long-running + # operation. + # + # This API can only be called with limited frequency for an organization. If + # it is called too frequently the caller will receive a TOO_MANY_REQUESTS + # error. + rpc :RunAssetDiscovery, ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Google::Longrunning::Operation + # Updates the state of a finding. + rpc :SetFindingState, ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Google::Cloud::SecurityCenter::V1::Finding + # Updates the mute state of a finding. + rpc :SetMute, ::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Google::Cloud::SecurityCenter::V1::Finding + # Sets the access control policy on the specified Source. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns the permissions that a caller has on the specified source. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + rpc :SimulateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse + # Updates external system. This is for a given finding. + rpc :UpdateExternalSystem, ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Google::Cloud::SecurityCenter::V1::ExternalSystem + # Creates or updates a finding. The corresponding source must exist for a + # finding creation to succeed. + rpc :UpdateFinding, ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Google::Cloud::SecurityCenter::V1::Finding + # Updates a mute config. + rpc :UpdateMuteConfig, ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig + # + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + rpc :UpdateNotificationConfig, ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig + # Updates an organization's settings. + rpc :UpdateOrganizationSettings, ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1::OrganizationSettings + # Updates the SecurityHealthAnalyticsCustomModule under the given name based + # on the given update mask. Updating the enablement state is supported on + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name and custom + # config of a module is supported on resident modules only. + rpc :UpdateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule + # Updates a source. + rpc :UpdateSource, ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source + # Updates security marks. + rpc :UpdateSecurityMarks, ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Google::Cloud::SecurityCenter::V1::SecurityMarks + # Creates a BigQuery export. + rpc :CreateBigQueryExport, ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport + # Deletes an existing BigQuery export. + rpc :DeleteBigQueryExport, ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Google::Protobuf::Empty + # Updates a BigQuery export. + rpc :UpdateBigQueryExport, ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport + # Lists BigQuery exports. Note that when requesting BigQuery exports at a + # given level all exports under that level are also returned e.g. if + # requesting BigQuery exports under a folder, then all BigQuery exports + # immediately under the folder plus the ones created under the projects + # within the folder are returned. + rpc :ListBigQueryExports, ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse + # Creates a resident Event Threat Detection custom module at the scope of the + # given Resource Manager parent, and also creates inherited custom modules + # for all descendants of the given parent. These modules are enabled by + # default. + rpc :CreateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule + # Deletes the specified Event Threat Detection custom module and all of its + # descendants in the Resource Manager hierarchy. This method is only + # supported for resident custom modules. + rpc :DeleteEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Google::Protobuf::Empty + # Gets an Event Threat Detection custom module. + rpc :GetEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule + # Lists all resident Event Threat Detection custom modules under the + # given Resource Manager parent and its descendants. + rpc :ListDescendantEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse + # Lists all Event Threat Detection custom modules for the given + # Resource Manager parent. This includes resident modules defined at the + # scope of the parent along with modules inherited from ancestors. + rpc :ListEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse + # Updates the Event Threat Detection custom module with the given name based + # on the given update mask. Updating the enablement state is supported for + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name or + # configuration of a module is supported for resident modules only. The type + # of a module cannot be changed. + rpc :UpdateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule + # Validates the given Event Threat Detection custom module. + rpc :ValidateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse + # Gets an effective Event Threat Detection custom module at the given level. + rpc :GetEffectiveEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule + # Lists all effective Event Threat Detection custom modules for the + # given parent. This includes resident modules defined at the scope of the + # parent along with modules inherited from its ancestors. + rpc :ListEffectiveEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse + # Creates a ResourceValueConfig for an organization. Maps user's tags to + # difference resource values for use by the attack path simulation. + rpc :BatchCreateResourceValueConfigs, ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse + # Deletes a ResourceValueConfig. + rpc :DeleteResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Google::Protobuf::Empty + # Gets a ResourceValueConfig. + rpc :GetResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig + # Lists all ResourceValueConfigs. + rpc :ListResourceValueConfigs, ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse + # Updates an existing ResourceValueConfigs with new rules. + rpc :UpdateResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig + # Lists the valued resources for a set of simulation results and filter. + rpc :ListValuedResources, ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse + # Lists the attack paths for a set of simulation results or valued resources + # and filter. + rpc :ListAttackPaths, ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb new file mode 100644 index 000000000000..577a4d977a3a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/simulation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v1/resource_pb' +require 'google/cloud/securitycenter/v1/valued_resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n/google/cloud/securitycenter/v1/simulation.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v1/resource.proto\x1a\x34google/cloud/securitycenter/v1/valued_resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfc\x02\n\nSimulation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x64\n\x1fresource_value_configs_metadata\x18\x03 \x03(\x0b\x32;.google.cloud.securitycenter.v1.ResourceValueConfigMetadata\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v1.CloudProvider:}\xea\x41z\n(securitycenter.googleapis.com/Simulation\x12\x35organizations/{organization}/simulations/{simulation}*\x0bsimulations2\nsimulationB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fSimulationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Simulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Simulation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb new file mode 100644 index 000000000000..2f7921ed6f0b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/source.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n+google/cloud/securitycenter/v1/source.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xfd\x01\n\x06Source\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t:\xa1\x01\xea\x41\x9d\x01\n$securitycenter.googleapis.com/Source\x12-organizations/{organization}/sources/{source}\x12!folders/{folder}/sources/{source}\x12#projects/{project}/sources/{source}B\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Source").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb new file mode 100644 index 000000000000..78da4c94159e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/toxic_combination.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/cloud/securitycenter/v1/toxic_combination.proto\x12\x1egoogle.cloud.securitycenter.v1\"K\n\x10ToxicCombination\x12\x1d\n\x15\x61ttack_exposure_score\x18\x01 \x01(\x01\x12\x18\n\x10related_findings\x18\x02 \x03(\tB\xef\x01\n\"com.google.cloud.securitycenter.v1B\x15ToxicCombinationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + ToxicCombination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ToxicCombination").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb new file mode 100644 index 000000000000..c0a8708958bb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/valued_resource.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v1/valued_resource.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xd8\x04\n\x0eValuedResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08resource\x18\x02 \x01(\t\x12\x15\n\rresource_type\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12T\n\x0eresource_value\x18\x05 \x01(\x0e\x32<.google.cloud.securitycenter.v1.ValuedResource.ResourceValue\x12\x15\n\rexposed_score\x18\x06 \x01(\x01\x12`\n\x1bresource_value_configs_used\x18\x07 \x03(\x0b\x32;.google.cloud.securitycenter.v1.ResourceValueConfigMetadata\"{\n\rResourceValue\x12\x1e\n\x1aRESOURCE_VALUE_UNSPECIFIED\x10\x00\x12\x16\n\x12RESOURCE_VALUE_LOW\x10\x01\x12\x19\n\x15RESOURCE_VALUE_MEDIUM\x10\x02\x12\x17\n\x13RESOURCE_VALUE_HIGH\x10\x03:\xac\x01\xea\x41\xa8\x01\n,securitycenter.googleapis.com/ValuedResource\x12Worganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}*\x0fvaluedResources2\x0evaluedResource\"+\n\x1bResourceValueConfigMetadata\x12\x0c\n\x04name\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13ValuedResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + ValuedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValuedResource").msgclass + ValuedResource::ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValuedResource.ResourceValue").enummodule + ResourceValueConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ResourceValueConfigMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb new file mode 100644 index 000000000000..64dcf8c6b5f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1/vulnerability.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/securitycenter/v1/vulnerability.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x02\n\rVulnerability\x12\x30\n\x03\x63ve\x18\x01 \x01(\x0b\x32#.google.cloud.securitycenter.v1.Cve\x12\x42\n\x11offending_package\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Package\x12>\n\rfixed_package\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Package\x12K\n\x11security_bulletin\x18\x04 \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.SecurityBulletin\"\x8a\x05\n\x03\x43ve\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v1.Reference\x12\x36\n\x06\x63vssv3\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v1.Cvssv3\x12\x1e\n\x16upstream_fix_available\x18\x04 \x01(\x08\x12>\n\x06impact\x18\x05 \x01(\x0e\x32..google.cloud.securitycenter.v1.Cve.RiskRating\x12W\n\x15\x65xploitation_activity\x18\x06 \x01(\x0e\x32\x38.google.cloud.securitycenter.v1.Cve.ExploitationActivity\x12\x1c\n\x14observed_in_the_wild\x18\x07 \x01(\x08\x12\x10\n\x08zero_day\x18\x08 \x01(\x08\x12\x38\n\x14\x65xploit_release_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"V\n\nRiskRating\x12\x1b\n\x17RISK_RATING_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04\"\x84\x01\n\x14\x45xploitationActivity\x12%\n!EXPLOITATION_ACTIVITY_UNSPECIFIED\x10\x00\x12\x08\n\x04WIDE\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\r\n\tAVAILABLE\x10\x03\x12\x0f\n\x0b\x41NTICIPATED\x10\x04\x12\x0c\n\x08NO_KNOWN\x10\x05\"(\n\tReference\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xb1\n\n\x06\x43vssv3\x12\x12\n\nbase_score\x18\x01 \x01(\x01\x12J\n\rattack_vector\x18\x05 \x01(\x0e\x32\x33.google.cloud.securitycenter.v1.Cvssv3.AttackVector\x12R\n\x11\x61ttack_complexity\x18\x06 \x01(\x0e\x32\x37.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity\x12V\n\x13privileges_required\x18\x07 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired\x12P\n\x10user_interaction\x18\x08 \x01(\x0e\x32\x36.google.cloud.securitycenter.v1.Cvssv3.UserInteraction\x12;\n\x05scope\x18\t \x01(\x0e\x32,.google.cloud.securitycenter.v1.Cvssv3.Scope\x12M\n\x16\x63onfidentiality_impact\x18\n \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\x12G\n\x10integrity_impact\x18\x0b \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\x12J\n\x13\x61vailability_impact\x18\x0c \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\"_\n\x07Package\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0f\n\x07\x63pe_uri\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x17\n\x0fpackage_version\x18\x04 \x01(\t\"\x7f\n\x10SecurityBulletin\x12\x13\n\x0b\x62ulletin_id\x18\x01 \x01(\t\x12\x33\n\x0fsubmission_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x19suggested_upgrade_version\x18\x03 \x01(\tB\xec\x01\n\"com.google.cloud.securitycenter.v1B\x12VulnerabilityProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1 + Vulnerability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Vulnerability").msgclass + Cve = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve").msgclass + Cve::RiskRating = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve.RiskRating").enummodule + Cve::ExploitationActivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve.ExploitationActivity").enummodule + Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Reference").msgclass + Cvssv3 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3").msgclass + Cvssv3::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.AttackVector").enummodule + Cvssv3::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.AttackComplexity").enummodule + Cvssv3::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired").enummodule + Cvssv3::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.UserInteraction").enummodule + Cvssv3::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.Scope").enummodule + Cvssv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.Impact").enummodule + Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Package").msgclass + SecurityBulletin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SecurityBulletin").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md new file mode 100644 index 000000000000..2477ff9d487e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Security Command Center V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb new file mode 100644 index 000000000000..31e390d3f8a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb @@ -0,0 +1,120 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Represents an access event. + # @!attribute [rw] principal_email + # @return [::String] + # Associated email, such as "foo@google.com". + # + # The email address of the authenticated user or a service account acting on + # behalf of a third party principal making the request. For third party + # identity callers, the `principal_subject` field is populated instead of + # this field. For privacy reasons, the principal email address is sometimes + # redacted. For more information, see [Caller identities in audit + # logs](https://cloud.google.com/logging/docs/audit#user-id). + # @!attribute [rw] caller_ip + # @return [::String] + # Caller's IP address, such as "1.1.1.1". + # @!attribute [rw] caller_ip_geo + # @return [::Google::Cloud::SecurityCenter::V1::Geolocation] + # The caller IP's geolocation, which identifies where the call came from. + # @!attribute [rw] user_agent_family + # @return [::String] + # Type of user agent associated with the finding. For example, an operating + # system shell or an embedded or standalone application. + # @!attribute [rw] user_agent + # @return [::String] + # The caller's user agent string associated with the finding. + # @!attribute [rw] service_name + # @return [::String] + # This is the API service that the service account made a call to, e.g. + # "iam.googleapis.com" + # @!attribute [rw] method_name + # @return [::String] + # The method that the service account called, e.g. "SetIamPolicy". + # @!attribute [rw] principal_subject + # @return [::String] + # A string that represents the principal_subject that is associated with the + # identity. Unlike `principal_email`, `principal_subject` supports principals + # that aren't associated with email addresses, such as third party + # principals. For most identities, the format is + # `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. + # Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, + # still use the legacy format `serviceAccount:{identity pool + # name}[\\{subject}]`. + # @!attribute [rw] service_account_key_name + # @return [::String] + # The name of the service account key that was used to create or exchange + # credentials when authenticating the service account that made the request. + # This is a scheme-less URI full resource name. For example: + # + # "//iam.googleapis.com/projects/\\{PROJECT_ID}/serviceAccounts/\\{ACCOUNT}/keys/\\{key}". + # @!attribute [rw] service_account_delegation_info + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ServiceAccountDelegationInfo>] + # The identity delegation history of an authenticated service account that + # made the request. The `serviceAccountDelegationInfo[]` object contains + # information about the real authorities that try to access Google Cloud + # resources by delegating on a service account. When multiple authorities are + # present, they are guaranteed to be sorted based on the original ordering of + # the identity delegation events. + # @!attribute [rw] user_name + # @return [::String] + # A string that represents a username. The username provided depends on the + # type of the finding and is likely not an IAM principal. For example, this + # can be a system username if the finding is related to a virtual machine, or + # it can be an application login username. + class Access + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Identity delegation history of an authenticated service account. + # @!attribute [rw] principal_email + # @return [::String] + # The email address of a Google account. + # @!attribute [rw] principal_subject + # @return [::String] + # A string representing the principal_subject associated with the identity. + # As compared to `principal_email`, supports principals that aren't + # associated with email addresses, such as third party principals. For most + # identities, the format will be `principal://iam.googleapis.com/{identity + # pool name}/subjects/\\{subject}` except for some GKE identities + # (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy + # format `serviceAccount:{identity pool name}[{subject}]` + class ServiceAccountDelegationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a geographical location for a given access. + # @!attribute [rw] region_code + # @return [::String] + # A CLDR. + class Geolocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb new file mode 100644 index 000000000000..a3af9a6b18af --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents a monitored AI Agent. + # @!attribute [rw] id + # @return [::String] + # Identifier of the agent. + # @!attribute [rw] display_name + # @return [::String] + # The user friendly name of the specific agent instance where the finding was + # detected, for example, "Banking Agent". + class Agent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb new file mode 100644 index 000000000000..00775041de5b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents details about an anomaly detected in an AI agent's behavior. + # @!attribute [rw] confidence_score + # @return [::Float] + # The overall confidence score indicating the likelihood that this session + # contains a true anomaly. The score ranges from 0.0 to 1.0, where 1.0 + # signifies 100% confidence in the presence of an anomaly and 0.0 signifies + # 0% confidence. + # @!attribute [rw] detector_references + # @return [::Array<::Google::Cloud::SecurityCenter::V1::DetectorReference>] + # The list of references to specific detectors that identified anomalies + # within this session. + # @!attribute [rw] invocation_references + # @return [::Array<::Google::Cloud::SecurityCenter::V1::InvocationReference>] + # References to the OpenTelemetry invocations. + class AgentAnomaly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a reference to a specific anomaly detector. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenter::V1::DetectorReference::Severity] + # The severity of the detector. + # @!attribute [rw] detector_id + # @return [::String] + # The unique identifier of the detector. + # @!attribute [rw] display_name + # @return [::String] + # A human readable name for the detector, providing context on its purpose. + # For example, "ASI02: Tool Misuse", or "Excessive API Calls". + # @!attribute [rw] explanation + # @return [::String] + # A detailed explanation generated by an LLM or the detector itself, + # describing why this specific anomaly was flagged. This provides rationale + # and context for the detection. + # @!attribute [rw] recommendation + # @return [::String] + # Recommended steps or actions to remediate or investigate the anomaly + # flagged by this detector. These could include configuration changes, code + # adjustments, or further diagnostic procedures. + class DetectorReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Severity levels for detectors. + module Severity + # Unspecified severity. + SEVERITY_UNSPECIFIED = 0 + + # Critical severity. + CRITICAL = 1 + + # High severity. + HIGH = 2 + + # Medium severity. + MEDIUM = 3 + + # Low severity. + LOW = 4 + end + end + + # Represents a reference to a specific OpenTelemetry invocation. + # @!attribute [rw] invocation_id + # @return [::String] + # The unique identifier of the invocation. + class InvocationReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb new file mode 100644 index 000000000000..53426497c9e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.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! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents a conversational session where the finding occurred. + # @!attribute [rw] session_id + # @return [::String] + # The session ID of a conversation. + class AgentSession + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb new file mode 100644 index 000000000000..219bf34fde42 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents an application associated with a finding. + # @!attribute [rw] base_uri + # @return [::String] + # The base URI that identifies the network location of the application in + # which the vulnerability was detected. For example, `http://example.com`. + # @!attribute [rw] full_uri + # @return [::String] + # The full URI with payload that can be used to reproduce the + # vulnerability. For example, `http://example.com?p=aMmYgI6H`. + class Application + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb new file mode 100644 index 000000000000..d04b5a46cc91 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Security Command Center representation of a Google Cloud + # resource. + # + # The Asset is a Security Command Center resource that captures information + # about a single Google Cloud resource. All modifications to an Asset are only + # within the context of Security Command Center and don't affect the referenced + # Google Cloud resource. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this asset. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/assets/\\{asset_id}". + # @!attribute [rw] security_center_properties + # @return [::Google::Cloud::SecurityCenter::V1::Asset::SecurityCenterProperties] + # Security Command Center managed properties. These properties are managed by + # Security Command Center and cannot be modified by the user. + # @!attribute [rw] resource_properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Resource managed properties. These properties are managed and defined by + # the Google Cloud resource and cannot be modified by the user. + # @!attribute [rw] security_marks + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # User specified security marks. These marks are entirely managed by the user + # and come from the SecurityMarks resource that belongs to the asset. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the asset was created in Security Command Center. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the asset was last updated or added in Cloud SCC. + # @!attribute [rw] iam_policy + # @return [::Google::Cloud::SecurityCenter::V1::Asset::IamPolicy] + # Cloud IAM Policy information associated with the Google Cloud resource + # described by the Security Command Center asset. This information is managed + # and defined by the Google Cloud resource and cannot be modified by the + # user. + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the resource. It's either + # "organizations/\\{organization_id}/assets/\\{asset_id}", + # "folders/\\{folder_id}/assets/\\{asset_id}" or + # "projects/\\{project_number}/assets/\\{asset_id}", depending on the closest CRM + # ancestor of the resource. + class Asset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Security Command Center managed properties. These properties are managed by + # Security Command Center and cannot be modified by the user. + # @!attribute [rw] resource_name + # @return [::String] + # The full resource name of the Google Cloud resource this asset + # represents. This field is immutable after create time. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_type + # @return [::String] + # The type of the Google Cloud resource. Examples include: APPLICATION, + # PROJECT, and ORGANIZATION. This is a case insensitive field defined by + # Security Command Center and/or the producer of the resource and is + # immutable after create time. + # @!attribute [rw] resource_parent + # @return [::String] + # The full resource name of the immediate parent of the resource. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_project + # @return [::String] + # The full resource name of the project the resource belongs to. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_owners + # @return [::Array<::String>] + # Owners of the Google Cloud resource. + # @!attribute [rw] resource_display_name + # @return [::String] + # The user defined display name for this resource. + # @!attribute [rw] resource_parent_display_name + # @return [::String] + # The user defined display name for the parent of this resource. + # @!attribute [rw] resource_project_display_name + # @return [::String] + # The user defined display name for the project of this resource. + # @!attribute [rw] folders + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] + # Contains a Folder message for each folder in the assets ancestry. + # The first folder is the deepest nested folder, and the last folder is the + # folder directly under the Organization. + class SecurityCenterProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Cloud IAM Policy information associated with the Google Cloud resource + # described by the Security Command Center asset. This information is managed + # and defined by the Google Cloud resource and cannot be modified by the + # user. + # @!attribute [rw] policy_blob + # @return [::String] + # The JSON representation of the Policy associated with the asset. + # See https://cloud.google.com/iam/reference/rest/v1/Policy for format + # details. + class IamPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class ResourcePropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb new file mode 100644 index 000000000000..51bd94f1fd18 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # An attack exposure contains the results of an attack path simulation run. + # @!attribute [rw] score + # @return [::Float] + # A number between 0 (inclusive) and infinity that represents how important + # this finding is to remediate. The higher the score, the more important it + # is to remediate. + # @!attribute [rw] latest_calculation_time + # @return [::Google::Protobuf::Timestamp] + # The most recent time the attack exposure was updated on this finding. + # @!attribute [rw] attack_exposure_result + # @return [::String] + # The resource name of the attack path simulation result that contains the + # details regarding this attack exposure score. + # Example: `organizations/123/simulations/456/attackExposureResults/789` + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1::AttackExposure::State] + # What state this AttackExposure is in. This captures whether or not an + # attack exposure has been calculated or not. + # @!attribute [rw] exposed_high_value_resources_count + # @return [::Integer] + # The number of high value resources that are exposed as a result of this + # finding. + # @!attribute [rw] exposed_medium_value_resources_count + # @return [::Integer] + # The number of medium value resources that are exposed as a result of this + # finding. + # @!attribute [rw] exposed_low_value_resources_count + # @return [::Integer] + # The number of high value resources that are exposed as a result of this + # finding. + class AttackExposure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This enum defines the various states an AttackExposure can be in. + module State + # The state is not specified. + STATE_UNSPECIFIED = 0 + + # The attack exposure has been calculated. + CALCULATED = 1 + + # The attack exposure has not been calculated. + NOT_CALCULATED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb new file mode 100644 index 000000000000..9a78a90341b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb @@ -0,0 +1,147 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # A path that an attacker could take to reach an exposed resource. + # @!attribute [rw] name + # @return [::String] + # The attack path name, for example, + # `organizations/12/simulation/34/valuedResources/56/attackPaths/78` + # @!attribute [rw] path_nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode>] + # A list of nodes that exist in this attack path. + # @!attribute [rw] edges + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathEdge>] + # A list of the edges between nodes in this attack path. + class AttackPath + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents one point that an attacker passes through in this attack path. + # @!attribute [rw] resource + # @return [::String] + # The name of the resource at this point in the attack path. + # The format of the name follows the Cloud Asset Inventory [resource + # name + # format](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # @!attribute [rw] resource_type + # @return [::String] + # The [supported resource + # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # @!attribute [rw] display_name + # @return [::String] + # Human-readable name of this resource. + # @!attribute [rw] associated_findings + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::PathNodeAssociatedFinding>] + # The findings associated with this node in the attack path. + # @!attribute [rw] uuid + # @return [::String] + # Unique id of the attack path node. + # @!attribute [rw] attack_steps + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::AttackStepNode>] + # A list of attack step nodes that exist in this attack path node. + class AttackPathNode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A finding that is associated with this node in the attack path. + # @!attribute [rw] canonical_finding + # @return [::String] + # Canonical name of the associated findings. Example: + # `organizations/123/sources/456/findings/789` + # @!attribute [rw] finding_category + # @return [::String] + # The additional taxonomy group within findings from a given source. + # @!attribute [rw] name + # @return [::String] + # Full resource name of the finding. + class PathNodeAssociatedFinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Detailed steps the attack can take between path nodes. + # @!attribute [rw] uuid + # @return [::String] + # Unique ID for one Node + # @!attribute [rw] type + # @return [::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::NodeType] + # Attack step type. Can be either AND, OR or DEFENSE + # @!attribute [rw] display_name + # @return [::String] + # User friendly name of the attack step + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Attack step labels for metadata + # @!attribute [rw] description + # @return [::String] + # Attack step description + class AttackStepNode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The type of the incoming attack step node. + module NodeType + # Type not specified + NODE_TYPE_UNSPECIFIED = 0 + + # Incoming edge joined with AND + NODE_TYPE_AND = 1 + + # Incoming edge joined with OR + NODE_TYPE_OR = 2 + + # Incoming edge is defense + NODE_TYPE_DEFENSE = 3 + + # Incoming edge is attacker + NODE_TYPE_ATTACKER = 4 + end + end + + # Represents a connection between a source node and a destination node in + # this attack path. + # @!attribute [rw] source + # @return [::String] + # The attack node uuid of the source node. + # @!attribute [rw] destination + # @return [::String] + # The attack node uuid of the destination node. + class AttackPathEdge + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb new file mode 100644 index 000000000000..8f4297aa756e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Information related to Google Cloud Backup and DR Service findings. + # @!attribute [rw] backup_template + # @return [::String] + # The name of a Backup and DR template which comprises one or more backup + # policies. See the [Backup and DR + # documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) + # for more information. For example, `snap-ov`. + # @!attribute [rw] policies + # @return [::Array<::String>] + # The names of Backup and DR policies that are associated with a template + # and that define when to run a backup, how frequently to run a backup, and + # how long to retain the backup image. For example, `onvaults`. + # @!attribute [rw] host + # @return [::String] + # The name of a Backup and DR host, which is managed by the backup and + # recovery appliance and known to the management console. The host can be of + # type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file + # system, etc.), vCenter, or an ESX server. See the [Backup and DR + # documentation on + # hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) + # for more information. For example, `centos7-01`. + # @!attribute [rw] applications + # @return [::Array<::String>] + # The names of Backup and DR applications. An application is a VM, database, + # or file system on a managed host monitored by a backup and recovery + # appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, + # `centos7-01-vol02`. + # @!attribute [rw] storage_pool + # @return [::String] + # The name of the Backup and DR storage pool that the backup and recovery + # appliance is storing data in. The storage pool could be of type Cloud, + # Primary, Snapshot, or OnVault. See the [Backup and DR documentation on + # storage + # pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). + # For example, `DiskPoolOne`. + # @!attribute [rw] policy_options + # @return [::Array<::String>] + # The names of Backup and DR advanced policy options of a policy applying to + # an application. See the [Backup and DR documentation on policy + # options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). + # For example, `skipofflineappsincongrp, nounmap`. + # @!attribute [rw] profile + # @return [::String] + # The name of the Backup and DR resource profile that specifies the storage + # media for backups of application and VM data. See the [Backup and DR + # documentation on + # profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). + # For example, `GCP`. + # @!attribute [rw] appliance + # @return [::String] + # The name of the Backup and DR appliance that captures, moves, and manages + # the lifecycle of backup data. For example, `backup-server-57137`. + # @!attribute [rw] backup_type + # @return [::String] + # The backup type of the Backup and DR image. + # For example, `Snapshot`, `Remote Snapshot`, `OnVault`. + # @!attribute [rw] backup_create_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp at which the Backup and DR backup was created. + class BackupDisasterRecovery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb new file mode 100644 index 000000000000..f558699d1218 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Configures how to deliver Findings to BigQuery Instance. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this export. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name. + # Example format: + # "organizations/\\{organization_id}/bigQueryExports/\\{export_id}" Example + # format: "folders/\\{folder_id}/bigQueryExports/\\{export_id}" Example format: + # "projects/\\{project_id}/bigQueryExports/\\{export_id}" + # This field is provided in responses, and is ignored when provided in create + # requests. + # @!attribute [rw] description + # @return [::String] + # The description of the export (max of 1024 characters). + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across create/update events + # of findings. The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @!attribute [rw] dataset + # @return [::String] + # The dataset to write findings' updates to. Its format is + # "projects/[project_id]/datasets/[bigquery_dataset_id]". + # BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers + # (0-9), or underscores (_). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the BigQuery export was created. + # This field is set by the server and will be ignored if provided on export + # on creation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time at which the BigQuery export was updated. + # This field is set by the server and will be ignored if provided on export + # creation or update. + # @!attribute [r] most_recent_editor + # @return [::String] + # Output only. Email address of the user who last edited the BigQuery export. + # This field is set by the server and will be ignored if provided on export + # creation or update. + # @!attribute [r] principal + # @return [::String] + # Output only. The service account that needs permission to create table and + # upload data to the BigQuery dataset. + class BigQueryExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb new file mode 100644 index 000000000000..d16907c3f4b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains details about a chokepoint, which is a resource or resource group + # where high-risk attack paths converge, based on [attack path simulations] + # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). + # @!attribute [rw] related_findings + # @return [::Array<::String>] + # List of resource names of findings associated with this chokepoint. + # For example, organizations/123/sources/456/findings/789. + # This list will have at most 100 findings. + class Chokepoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb new file mode 100644 index 000000000000..589ad76bf248 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Fields related to Google Cloud Armor findings. + # @!attribute [rw] security_policy + # @return [::Google::Cloud::SecurityCenter::V1::SecurityPolicy] + # Information about the [Google Cloud Armor security + # policy](https://cloud.google.com/armor/docs/security-policy-overview) + # relevant to the finding. + # @!attribute [rw] requests + # @return [::Google::Cloud::SecurityCenter::V1::Requests] + # Information about incoming requests evaluated by [Google Cloud Armor + # security + # policies](https://cloud.google.com/armor/docs/security-policy-overview). + # @!attribute [rw] adaptive_protection + # @return [::Google::Cloud::SecurityCenter::V1::AdaptiveProtection] + # Information about potential Layer 7 DDoS attacks identified by [Google + # Cloud Armor Adaptive + # Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + # @!attribute [rw] attack + # @return [::Google::Cloud::SecurityCenter::V1::Attack] + # Information about DDoS attack volume and classification. + # @!attribute [rw] threat_vector + # @return [::String] + # Distinguish between volumetric & protocol DDoS attack and + # application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS + # attacks, or "L_7" for Layer 7 DDoS attacks. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Duration of attack from the start until the current moment (updated every 5 + # minutes). + class CloudArmor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the [Google Cloud Armor security + # policy](https://cloud.google.com/armor/docs/security-policy-overview) + # relevant to the finding. + # @!attribute [rw] name + # @return [::String] + # The name of the Google Cloud Armor security policy, for example, + # "my-security-policy". + # @!attribute [rw] type + # @return [::String] + # The type of Google Cloud Armor security policy for example, 'backend + # security policy', 'edge security policy', 'network edge security policy', + # or 'always-on DDoS protection'. + # @!attribute [rw] preview + # @return [::Boolean] + # Whether or not the associated rule or policy is in preview mode. + class SecurityPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the requests relevant to the finding. + # @!attribute [rw] ratio + # @return [::Float] + # For 'Increasing deny ratio', the ratio is the denied traffic divided by the + # allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + # traffic in the short term divided by allowed traffic in the long term. + # @!attribute [rw] short_term_allowed + # @return [::Integer] + # Allowed RPS (requests per second) in the short term. + # @!attribute [rw] long_term_allowed + # @return [::Integer] + # Allowed RPS (requests per second) over the long term. + # @!attribute [rw] long_term_denied + # @return [::Integer] + # Denied RPS (requests per second) over the long term. + class Requests + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about [Google Cloud Armor Adaptive + # Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection). + # @!attribute [rw] confidence + # @return [::Float] + # A score of 0 means that there is low confidence that the detected event is + # an actual attack. A score of 1 means that there is high confidence that the + # detected event is an attack. See the [Adaptive Protection + # documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + # for further explanation. + class AdaptiveProtection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about DDoS attack volume and classification. + # @!attribute [rw] volume_pps + # @return [::Integer] + # Total PPS (packets per second) volume of attack. + # @!attribute [rw] volume_bps + # @return [::Integer] + # Total BPS (bytes per second) volume of attack. + # @!attribute [rw] classification + # @return [::String] + # Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'. + class Attack + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb new file mode 100644 index 000000000000..83d9ad22a479 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb @@ -0,0 +1,114 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # The [data profile](https://cloud.google.com/dlp/docs/data-profiles) + # associated with the finding. + # @!attribute [rw] data_profile + # @return [::String] + # Name of the data profile, for example, + # `projects/123/locations/europe/tableProfiles/8383929`. + # @!attribute [rw] parent_type + # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpDataProfile::ParentType] + # The resource hierarchy level at which the data profile was generated. + # @!attribute [rw] info_types + # @return [::Array<::Google::Cloud::SecurityCenter::V1::InfoType>] + # Type of information detected by SDP. + # Info type includes name, version and sensitivity of the detected + # information type. + class CloudDlpDataProfile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Parents for configurations that produce data profile findings. + module ParentType + # Unspecified parent type. + PARENT_TYPE_UNSPECIFIED = 0 + + # Organization-level configurations. + ORGANIZATION = 1 + + # Project-level configurations. + PROJECT = 2 + end + end + + # Type of information detected by the API. + # @!attribute [rw] name + # @return [::String] + # Name of the information type. Either a name of your choosing when + # creating a CustomInfoType, or one of the names listed + # at + # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference + # when specifying a built-in type. When sending Cloud DLP results to Data + # Catalog, infoType names should conform to the pattern + # `[A-Za-z0-9$_-]{1,64}`. + # @!attribute [rw] version + # @return [::String] + # Optional version name for this InfoType. + # @!attribute [rw] sensitivity_score + # @return [::Google::Cloud::SecurityCenter::V1::SensitivityScore] + # Optional custom sensitivity for this InfoType. + # This only applies to data profiling. + class InfoType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Score is calculated from of all elements in the data profile. + # A higher level means the data is more sensitive. + # @!attribute [rw] score + # @return [::Google::Cloud::SecurityCenter::V1::SensitivityScore::SensitivityScoreLevel] + # The sensitivity score applied to the resource. + class SensitivityScore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Various sensitivity score levels for resources. + module SensitivityScoreLevel + # Unused. + SENSITIVITY_SCORE_LEVEL_UNSPECIFIED = 0 + + # No sensitive information detected. The resource isn't publicly + # accessible. + SENSITIVITY_LOW = 10 + + # Unable to determine sensitivity. + SENSITIVITY_UNKNOWN = 12 + + # Medium risk. Contains personally identifiable information (PII), + # potentially sensitive data, or fields with free-text data that are at a + # higher risk of having intermittent sensitive data. Consider limiting + # access. + SENSITIVITY_MODERATE = 20 + + # High risk. Sensitive personally identifiable information (SPII) can be + # present. Exfiltration of data can lead to user data loss. + # Re-identification of users might be possible. Consider limiting usage and + # or removing SPII. + SENSITIVITY_HIGH = 30 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb new file mode 100644 index 000000000000..9faad618c6f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection + # job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced + # the finding. + # @!attribute [rw] inspect_job + # @return [::String] + # Name of the inspection job, for example, + # `projects/123/locations/europe/dlpJobs/i-8383929`. + # @!attribute [rw] info_type + # @return [::String] + # The type of information (or + # *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, + # for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. + # @!attribute [rw] info_type_count + # @return [::Integer] + # The number of times Cloud DLP found this infoType within this job + # and resource. + # @!attribute [rw] full_scan + # @return [::Boolean] + # Whether Cloud DLP scanned the complete resource or a sampled subset. + class CloudDlpInspection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb new file mode 100644 index 000000000000..158ef2e388fe --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains compliance information about a security standard indicating unmet + # recommendations. + # @!attribute [rw] standard + # @return [::String] + # Industry-wide compliance standards or benchmarks, such as CIS, PCI, and + # OWASP. + # @!attribute [rw] version + # @return [::String] + # Version of the standard or benchmark, for example, 1.1 + # @!attribute [rw] ids + # @return [::Array<::String>] + # Policies within the standard or benchmark, for example, A.12.4.1 + class Compliance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb new file mode 100644 index 000000000000..b44d3c237ea7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Contains information about the IP connection associated with the finding. + # @!attribute [rw] destination_ip + # @return [::String] + # Destination IP address. Not present for sockets that are listening and not + # connected. + # @!attribute [rw] destination_port + # @return [::Integer] + # Destination port. Not present for sockets that are listening and not + # connected. + # @!attribute [rw] source_ip + # @return [::String] + # Source IP address. + # @!attribute [rw] source_port + # @return [::Integer] + # Source port. + # @!attribute [rw] protocol + # @return [::Google::Cloud::SecurityCenter::V1::Connection::Protocol] + # IANA Internet Protocol Number such as TCP(6) and UDP(17). + class Connection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # IANA Internet Protocol Number such as TCP(6) and UDP(17). + module Protocol + # Unspecified protocol (not HOPOPT). + PROTOCOL_UNSPECIFIED = 0 + + # Internet Control Message Protocol. + ICMP = 1 + + # Transmission Control Protocol. + TCP = 6 + + # User Datagram Protocol. + UDP = 17 + + # Generic Routing Encapsulation. + GRE = 47 + + # Encap Security Payload. + ESP = 50 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb new file mode 100644 index 000000000000..de91713678d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Details about specific contacts + # @!attribute [rw] contacts + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Contact>] + # A list of contacts + class ContactDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The email address of a contact. + # @!attribute [rw] email + # @return [::String] + # An email address. For example, "`person123@company.com`". + class Contact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb new file mode 100644 index 000000000000..acc0a1015fa9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Container associated with the finding. + # @!attribute [rw] name + # @return [::String] + # Name of the container. + # @!attribute [rw] uri + # @return [::String] + # Container image URI provided when configuring a pod or container. This + # string can identify a container image version using mutable tags. + # @!attribute [rw] image_id + # @return [::String] + # Optional container image ID, if provided by the container runtime. Uniquely + # identifies the container image launched using a container image digest. + # @!attribute [rw] labels + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Label>] + # Container labels, as provided by the container runtime. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time that the container was created. + class Container + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb new file mode 100644 index 000000000000..2294178aef6c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents database access information, such as queries. A database may be a + # sub-resource of an instance (as in the case of Cloud SQL instances or Cloud + # Spanner instances), or the database instance itself. Some database resources + # might not have the [full resource + # name](https://google.aip.dev/122#full-resource-names) populated because these + # resource types, such as Cloud SQL databases, are not yet supported by Cloud + # Asset Inventory. In these cases only the display name is provided. + # @!attribute [rw] name + # @return [::String] + # Some database resources may not have the [full resource + # name](https://google.aip.dev/122#full-resource-names) populated because + # these resource types are not yet supported by Cloud Asset Inventory (e.g. + # Cloud SQL databases). In these cases only the display name will be + # provided. + # The [full resource name](https://google.aip.dev/122#full-resource-names) of + # the database that the user connected to, if it is supported by Cloud Asset + # Inventory. + # @!attribute [rw] display_name + # @return [::String] + # The human-readable name of the database that the user connected to. + # @!attribute [rw] user_name + # @return [::String] + # The username used to connect to the database. The username might not be an + # IAM principal and does not have a set format. + # @!attribute [rw] query + # @return [::String] + # The SQL statement that is associated with the database access. + # @!attribute [rw] grantees + # @return [::Array<::String>] + # The target usernames, roles, or groups of an SQL privilege grant, which is + # not an IAM policy change. + # @!attribute [rw] version + # @return [::String] + # The version of the database, for example, POSTGRES_14. + # See [the complete + # list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + class Database + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..06a03cf035f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # An EffectiveEventThreatDetectionCustomModule is the representation of + # an Event Threat Detection custom module at a specified level of the + # resource hierarchy: organization, folder, or project. If a custom module is + # inherited from a parent organization or folder, the value of the + # `enablement_state` property in EffectiveEventThreatDetectionCustomModule is + # set to the value that is effective in the parent, instead of `INHERITED`. + # For example, if the module is enabled in a parent organization or folder, the + # effective `enablement_state` for the module in all child folders or projects + # is also `enabled`. EffectiveEventThreatDetectionCustomModule is read-only. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the effective ETD custom module. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # @!attribute [r] config + # @return [::Google::Protobuf::Struct] + # Output only. Config for the effective module. + # @!attribute [r] enablement_state + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule::EnablementState] + # Output only. The effective state of enablement for the module at the given + # level of the hierarchy. + # @!attribute [r] type + # @return [::String] + # Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. + # @!attribute [r] display_name + # @return [::String] + # Output only. The human readable name to be displayed for the module. + # @!attribute [r] description + # @return [::String] + # Output only. The description for the module. + class EffectiveEventThreatDetectionCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enablement state of the module. + module EnablementState + # Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given level. + ENABLED = 1 + + # The module is disabled at the given level. + DISABLED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..83aab7af710b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # An EffectiveSecurityHealthAnalyticsCustomModule is the representation of + # a Security Health Analytics custom module at a specified level of the + # resource hierarchy: organization, folder, or project. If a custom module is + # inherited from a parent organization or folder, the value of the + # `enablementState` property in EffectiveSecurityHealthAnalyticsCustomModule is + # set to the value that is effective in the parent, instead of `INHERITED`. + # For example, if the module is enabled in a parent organization or folder, the + # effective enablement_state for the module in all child folders or projects is + # also `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the custom module. + # Its format is + # "organizations/\\{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}", + # or + # "folders/\\{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}", + # or + # "projects/\\{project}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}" + # @!attribute [r] custom_config + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] + # Output only. The user-specified configuration for the module. + # @!attribute [r] enablement_state + # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule::EnablementState] + # Output only. The effective state of enablement for the module at the given + # level of the hierarchy. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name for the custom module. The name must be + # between 1 and 128 characters, start with a lowercase letter, and contain + # alphanumeric characters or underscores only. + class EffectiveSecurityHealthAnalyticsCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enablement state of the module. + module EnablementState + # Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given level. + ENABLED = 1 + + # The module is disabled at the given level. + DISABLED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..e5b28d560c27 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents an instance of an Event Threat Detection custom module, + # including its full module name, display name, enablement state, and last + # updated time. You can create a custom module at the organization, folder, or + # project level. Custom modules that you create at the organization or folder + # level are inherited by child folders and projects. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the Event Threat Detection custom module. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + # @!attribute [rw] config + # @return [::Google::Protobuf::Struct] + # Config for the module. For the resident module, its config value is defined + # at this level. For the inherited module, its config value is inherited from + # the ancestor module. + # @!attribute [r] ancestor_module + # @return [::String] + # Output only. The closest ancestor module that this module inherits the + # enablement state from. The format is the same as the + # EventThreatDetectionCustomModule resource name. + # @!attribute [rw] enablement_state + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule::EnablementState] + # The state of enablement for the module at the given level of the hierarchy. + # @!attribute [rw] type + # @return [::String] + # Type for the module. e.g. CONFIGURABLE_BAD_IP. + # @!attribute [rw] display_name + # @return [::String] + # The human readable name to be displayed for the module. + # @!attribute [rw] description + # @return [::String] + # The description for the module. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the module was last updated. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The editor the module was last updated by. + class EventThreatDetectionCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enablement state of the module. + module EnablementState + # Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given level. + ENABLED = 1 + + # The module is disabled at the given level. + DISABLED = 2 + + # When the enablement state is inherited. + INHERITED = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb new file mode 100644 index 000000000000..0751dbe51e9a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # A list of zero or more errors encountered while validating the uploaded + # configuration of an Event Threat Detection Custom Module. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::SecurityCenter::V1::CustomModuleValidationError>] + class CustomModuleValidationErrors + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An error encountered while validating the uploaded configuration of an + # Event Threat Detection Custom Module. + # @!attribute [rw] description + # @return [::String] + # A description of the error, suitable for human consumption. Required. + # @!attribute [rw] field_path + # @return [::String] + # The path, in RFC 8901 JSON Pointer format, to the field that failed + # validation. This may be left empty if no specific field is affected. + # @!attribute [rw] start + # @return [::Google::Cloud::SecurityCenter::V1::Position] + # The initial position of the error in the uploaded text version of the + # module. This field may be omitted if no specific position applies, or if + # one could not be computed. + # @!attribute [rw] end + # @return [::Google::Cloud::SecurityCenter::V1::Position] + # The end position of the error in the uploaded text version of the + # module. This field may be omitted if no specific position applies, or if + # one could not be computed.. + class CustomModuleValidationError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A position in the uploaded text version of a module. + # @!attribute [rw] line_number + # @return [::Integer] + # @!attribute [rw] column_number + # @return [::Integer] + class Position + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb new file mode 100644 index 000000000000..718388b29179 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Exfiltration represents a data exfiltration attempt from one or more sources + # to one or more targets. The `sources` attribute lists the sources of the + # exfiltrated data. The `targets` attribute lists the destinations the data was + # copied to. + # @!attribute [rw] sources + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ExfilResource>] + # If there are multiple sources, then the data is considered "joined" between + # them. For instance, BigQuery can join multiple tables, and each + # table would be considered a source. + # @!attribute [rw] targets + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ExfilResource>] + # If there are multiple targets, each target would get a complete copy of the + # "joined" source data. + # @!attribute [rw] total_exfiltrated_bytes + # @return [::Integer] + # Total exfiltrated bytes processed for the entire job. + class Exfiltration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Resource where data was exfiltrated from or exfiltrated to. + # @!attribute [rw] name + # @return [::String] + # The resource's [full resource + # name](https://cloud.google.com/apis/design/resource_names#full_resource_name). + # @!attribute [rw] components + # @return [::Array<::String>] + # Subcomponents of the asset that was exfiltrated, like URIs used during + # exfiltration, table names, databases, and filenames. For example, multiple + # tables might have been exfiltrated from the same Cloud SQL instance, or + # multiple files might have been exfiltrated from the same Cloud Storage + # bucket. + class ExfilResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb new file mode 100644 index 000000000000..8b10d2880776 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Details about the externally exposed resource associated with the finding. + # @!attribute [rw] private_ip_address + # @return [::String] + # Private IP address of the exposed endpoint. + # @!attribute [rw] private_port + # @return [::String] + # Port number associated with private IP address. + # @!attribute [rw] exposed_service + # @return [::String] + # The name and version of the service, for example, "Jupyter + # Notebook 6.14.0". + # @!attribute [rw] public_ip_address + # @return [::String] + # Public IP address of the exposed endpoint. + # @!attribute [rw] public_port + # @return [::String] + # Public port number of the exposed endpoint. + # @!attribute [rw] exposed_endpoint + # @return [::String] + # The resource which is running the exposed service, for example, + # "//compute.googleapis.com/projects/\\{project-id}/zones/\\{zone}/instances/\\{instance}.” + # @!attribute [rw] load_balancer_firewall_policy + # @return [::String] + # The full resource name of the load balancer firewall policy, for example, + # "//compute.googleapis.com/projects/\\{project-id}/global/firewallPolicies/\\{policy-name}". + # @!attribute [rw] service_firewall_policy + # @return [::String] + # The full resource name of the firewall policy of the exposed service, for + # example, + # "//compute.googleapis.com/projects/\\{project-id}/global/firewallPolicies/\\{policy-name}". + # @!attribute [rw] forwarding_rule + # @return [::String] + # The full resource name of the forwarding rule, for example, + # "//compute.googleapis.com/projects/\\{project-id}/global/forwardingRules/\\{forwarding-rule-name}". + # @!attribute [rw] backend_service + # @return [::String] + # The full resource name of load balancer backend service, for example, + # "//compute.googleapis.com/projects/\\{project-id}/global/backendServices/\\{name}". + # @!attribute [rw] instance_group + # @return [::String] + # The full resource name of the instance group, for example, + # "//compute.googleapis.com/projects/\\{project-id}/global/instanceGroups/\\{name}". + # @!attribute [rw] network_endpoint_group + # @return [::String] + # The full resource name of the network endpoint group, for example, + # "//compute.googleapis.com/projects/\\{project-id}/global/networkEndpointGroups/\\{name}". + class ExternalExposure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb new file mode 100644 index 000000000000..9a0f33c8a79a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Representation of third party SIEM/SOAR fields within SCC. + # @!attribute [rw] name + # @return [::String] + # Full resource name of the external system, for example: + # "organizations/1234/sources/5678/findings/123456/externalSystems/jira", + # "folders/1234/sources/5678/findings/123456/externalSystems/jira", + # "projects/1234/sources/5678/findings/123456/externalSystems/jira" + # @!attribute [rw] assignees + # @return [::Array<::String>] + # References primary/secondary etc assignees in the external system. + # @!attribute [rw] external_uid + # @return [::String] + # The identifier that's used to track the finding's corresponding case in the + # external system. + # @!attribute [rw] status + # @return [::String] + # The most recent status of the finding's corresponding case, as reported by + # the external system. + # @!attribute [rw] external_system_update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the case was last updated, as reported by the external + # system. + # @!attribute [rw] case_uri + # @return [::String] + # The link to the finding's corresponding case in the external system. + # @!attribute [rw] case_priority + # @return [::String] + # The priority of the finding's corresponding case in the external system. + # @!attribute [rw] case_sla + # @return [::Google::Protobuf::Timestamp] + # The SLA of the finding's corresponding case in the external system. + # @!attribute [rw] case_create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the case was created, as reported by the external system. + # @!attribute [rw] case_close_time + # @return [::Google::Protobuf::Timestamp] + # The time when the case was closed, as reported by the external system. + # @!attribute [rw] ticket_info + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem::TicketInfo] + # Information about the ticket, if any, that is being used to track the + # resolution of the issue that is identified by this finding. + class ExternalSystem + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about the ticket, if any, that is being used to track the + # resolution of the issue that is identified by this finding. + # @!attribute [rw] id + # @return [::String] + # The identifier of the ticket in the ticket system. + # @!attribute [rw] assignee + # @return [::String] + # The assignee of the ticket in the ticket system. + # @!attribute [rw] description + # @return [::String] + # The description of the ticket in the ticket system. + # @!attribute [rw] uri + # @return [::String] + # The link to the ticket in the ticket system. + # @!attribute [rw] status + # @return [::String] + # The latest status of the ticket, as reported by the ticket system. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the ticket was last updated, as reported by the ticket + # system. + class TicketInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb new file mode 100644 index 000000000000..7e7468407e6a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # File information about the related binary/library used by an executable, or + # the script used by a script interpreter + # @!attribute [rw] path + # @return [::String] + # Absolute path of the file as a JSON encoded string. + # @!attribute [rw] size + # @return [::Integer] + # Size of the file in bytes. + # @!attribute [rw] sha256 + # @return [::String] + # SHA256 hash of the first hashed_size bytes of the file encoded as a + # hex string. If hashed_size == size, sha256 represents the SHA256 hash + # of the entire file. + # @!attribute [rw] hashed_size + # @return [::Integer] + # The length in bytes of the file prefix that was hashed. If + # hashed_size == size, any hashes reported represent the entire + # file. + # @!attribute [rw] partially_hashed + # @return [::Boolean] + # True when the hash covers only a prefix of the file. + # @!attribute [rw] contents + # @return [::String] + # Prefix of the file contents as a JSON-encoded string. + # @!attribute [rw] disk_path + # @return [::Google::Cloud::SecurityCenter::V1::File::DiskPath] + # Path of the file in terms of underlying disk/partition identifiers. + class File + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Path of the file in terms of underlying disk/partition identifiers. + # @!attribute [rw] partition_uuid + # @return [::String] + # UUID of the partition (format + # https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) + # @!attribute [rw] relative_path + # @return [::String] + # Relative path of the file in the partition as a JSON encoded string. + # Example: /home/user1/executable_file.sh + class DiskPath + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb new file mode 100644 index 000000000000..d4cb1b117d7c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb @@ -0,0 +1,486 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Security Command Center finding. + # + # A finding is a record of assessment data like security, risk, health, or + # privacy, that is ingested into Security Command Center for presentation, + # notification, analysis, policy testing, and enforcement. For example, a + # cross-site scripting (XSS) vulnerability in an App Engine application is a + # finding. + # @!attribute [rw] name + # @return [::String] + # The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}", + # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}", + # "projects/\\{project_id}/sources/\\{source_id}/findings/\\{finding_id}". + # @!attribute [rw] parent + # @return [::String] + # The relative resource name of the source the finding belongs to. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # This field is immutable after creation time. + # For example: + # "organizations/\\{organization_id}/sources/\\{source_id}" + # @!attribute [rw] resource_name + # @return [::String] + # For findings on Google Cloud resources, the full resource + # name of the Google Cloud resource this finding is for. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # When the finding is for a non-Google Cloud resource, the resourceName can + # be a customer or partner defined string. This field is immutable after + # creation time. + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1::Finding::State] + # The state of the finding. + # @!attribute [rw] category + # @return [::String] + # The additional taxonomy group within findings from a given source. + # This field is immutable after creation time. + # Example: "XSS_FLASH_INJECTION" + # @!attribute [rw] external_uri + # @return [::String] + # The URI that, if available, points to a web page outside of Security + # Command Center where additional information about the finding can be found. + # This field is guaranteed to be either empty or a well formed URL. + # @!attribute [rw] source_properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Source specific properties. These properties are managed by the source + # that writes the finding. The key names in the source_properties map must be + # between 1 and 255 characters, and must start with a letter and contain + # alphanumeric characters or underscores only. + # @!attribute [r] security_marks + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # Output only. User specified security marks. These marks are entirely + # managed by the user and come from the SecurityMarks resource that belongs + # to the finding. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # The time the finding was first detected. If an existing finding is updated, + # then this is the time the update occurred. + # For example, if the finding represents an open firewall, this property + # captures the time the detector believes the firewall became open. The + # accuracy is determined by the detector. If the finding is later resolved, + # then this time reflects when the finding was resolved. This must not + # be set to a value greater than the current timestamp. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the finding was created in Security Command Center. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenter::V1::Finding::Severity] + # The severity of the finding. This field is managed by the source that + # writes the finding. + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the finding. It's either + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}", + # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}" or + # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}", + # depending on the closest CRM ancestor of the resource associated with the + # finding. + # @!attribute [rw] mute + # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] + # Indicates the mute state of a finding (either muted, unmuted + # or undefined). Unlike other attributes of a finding, a finding provider + # shouldn't set the value of mute. + # @!attribute [rw] finding_class + # @return [::Google::Cloud::SecurityCenter::V1::Finding::FindingClass] + # The class of the finding. + # @!attribute [rw] indicator + # @return [::Google::Cloud::SecurityCenter::V1::Indicator] + # Represents what's commonly known as an *indicator of compromise* (IoC) in + # computer forensics. This is an artifact observed on a network or in an + # operating system that, with high confidence, indicates a computer + # intrusion. For more information, see [Indicator of + # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). + # @!attribute [rw] vulnerability + # @return [::Google::Cloud::SecurityCenter::V1::Vulnerability] + # Represents vulnerability-specific fields like CVE and CVSS scores. + # CVE stands for Common Vulnerabilities and Exposures + # (https://cve.mitre.org/about/) + # @!attribute [r] mute_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time this finding was muted or unmuted. + # @!attribute [r] external_systems + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V1::ExternalSystem}] + # Output only. Third party SIEM/SOAR fields within SCC, contains external + # system information and external system finding fields. + # @!attribute [rw] mitre_attack + # @return [::Google::Cloud::SecurityCenter::V1::MitreAttack] + # MITRE ATT&CK tactics and techniques related to this finding. + # See: https://attack.mitre.org + # @!attribute [rw] access + # @return [::Google::Cloud::SecurityCenter::V1::Access] + # Access details associated with the finding, such as more information on the + # caller, which method was accessed, and from where. + # @!attribute [rw] connections + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Connection>] + # Contains information about the IP connection associated with the finding. + # @!attribute [rw] mute_initiator + # @return [::String] + # Records additional information about the mute operation, for example, the + # [mute configuration](/security-command-center/docs/how-to-mute-findings) + # that muted the finding and the user who muted the finding. + # @!attribute [r] mute_info + # @return [::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo] + # Output only. The mute information regarding this finding. + # @!attribute [rw] processes + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Process>] + # Represents operating system processes associated with the Finding. + # @!attribute [r] contacts + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V1::ContactDetails}] + # Output only. Map containing the points of contact for the given finding. + # The key represents the type of contact, while the value contains a list of + # all the contacts that pertain. Please refer to: + # https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories + # + # { + # "security": { + # "contacts": [ + # { + # "email": "person1@company.com" + # }, + # { + # "email": "person2@company.com" + # } + # ] + # } + # } + # @!attribute [rw] compliances + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Compliance>] + # Contains compliance information for security standards associated to the + # finding. + # @!attribute [r] parent_display_name + # @return [::String] + # Output only. The human readable display name of the finding source such as + # "Event Threat Detection" or "Security Health Analytics". + # @!attribute [rw] description + # @return [::String] + # Contains more details about the finding. + # @!attribute [rw] exfiltration + # @return [::Google::Cloud::SecurityCenter::V1::Exfiltration] + # Represents exfiltrations associated with the finding. + # @!attribute [rw] iam_bindings + # @return [::Array<::Google::Cloud::SecurityCenter::V1::IamBinding>] + # Represents IAM bindings associated with the finding. + # @!attribute [rw] next_steps + # @return [::String] + # Steps to address the finding. + # @!attribute [rw] module_name + # @return [::String] + # Unique identifier of the module which generated the finding. + # Example: + # folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 + # @!attribute [rw] containers + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] + # Containers associated with the finding. This field provides information for + # both Kubernetes and non-Kubernetes containers. + # @!attribute [rw] kubernetes + # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes] + # Kubernetes resources associated with the finding. + # @!attribute [rw] database + # @return [::Google::Cloud::SecurityCenter::V1::Database] + # Database associated with the finding. + # @!attribute [rw] attack_exposure + # @return [::Google::Cloud::SecurityCenter::V1::AttackExposure] + # The results of an attack path simulation relevant to this finding. + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::SecurityCenter::V1::File>] + # File associated with the finding. + # @!attribute [rw] cloud_dlp_inspection + # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpInspection] + # Cloud Data Loss Prevention (Cloud DLP) inspection results that are + # associated with the finding. + # @!attribute [rw] cloud_dlp_data_profile + # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpDataProfile] + # Cloud DLP data profile that is associated with the finding. + # @!attribute [rw] kernel_rootkit + # @return [::Google::Cloud::SecurityCenter::V1::KernelRootkit] + # Signature of the kernel rootkit. + # @!attribute [rw] org_policies + # @return [::Array<::Google::Cloud::SecurityCenter::V1::OrgPolicy>] + # Contains information about the org policies associated with the finding. + # @!attribute [rw] application + # @return [::Google::Cloud::SecurityCenter::V1::Application] + # Represents an application associated with the finding. + # @!attribute [rw] backup_disaster_recovery + # @return [::Google::Cloud::SecurityCenter::V1::BackupDisasterRecovery] + # Fields related to Backup and DR findings. + # @!attribute [rw] security_posture + # @return [::Google::Cloud::SecurityCenter::V1::SecurityPosture] + # The security posture associated with the finding. + # @!attribute [rw] log_entries + # @return [::Array<::Google::Cloud::SecurityCenter::V1::LogEntry>] + # Log entries that are relevant to the finding. + # @!attribute [rw] load_balancers + # @return [::Array<::Google::Cloud::SecurityCenter::V1::LoadBalancer>] + # The load balancers associated with the finding. + # @!attribute [rw] cloud_armor + # @return [::Google::Cloud::SecurityCenter::V1::CloudArmor] + # Fields related to Cloud Armor findings. + # @!attribute [rw] notebook + # @return [::Google::Cloud::SecurityCenter::V1::Notebook] + # Notebook associated with the finding. + # @!attribute [rw] toxic_combination + # @return [::Google::Cloud::SecurityCenter::V1::ToxicCombination] + # Contains details about a group of security issues that, when the issues + # occur together, represent a greater risk than when the issues occur + # independently. A group of such issues is referred to as a toxic + # combination. + # This field cannot be updated. Its value is ignored in all update requests. + # @!attribute [rw] group_memberships + # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupMembership>] + # Contains details about groups of which this finding is a member. A group is + # a collection of findings that are related in some way. + # This field cannot be updated. Its value is ignored in all update requests. + # @!attribute [rw] chokepoint + # @return [::Google::Cloud::SecurityCenter::V1::Chokepoint] + # Contains details about a chokepoint, which is a resource or resource group + # where high-risk attack paths converge, based on [attack path simulations] + # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). + # This field cannot be updated. Its value is ignored in all update requests. + # @!attribute [rw] external_exposure + # @return [::Google::Cloud::SecurityCenter::V1::ExternalExposure] + # External exposure associated with the finding. + # @!attribute [rw] agent + # @return [::Google::Cloud::SecurityCenter::V1::Agent] + # Primary Agent that the specified finding was flagged for + # @!attribute [rw] agent_sessions + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AgentSession>] + # Conversational session(s) where the finding occurred. + # @!attribute [rw] agent_anomaly + # @return [::Google::Cloud::SecurityCenter::V1::AgentAnomaly] + # Details about behavior anomalies detected in AI agents. + class Finding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mute information about the finding, including whether the finding has a + # static mute or any matching dynamic mute rules. + # @!attribute [rw] static_mute + # @return [::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo::StaticMute] + # If set, the static mute applied to this finding. Static mutes override + # dynamic mutes. If unset, there is no static mute. + # @!attribute [rw] dynamic_mute_records + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo::DynamicMuteRecord>] + # The list of dynamic mute rules that currently match the finding. + class MuteInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about the static mute state. A static mute state overrides + # any dynamic mute rules that apply to this finding. The static mute state + # can be set by a static mute rule or by muting the finding directly. + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] + # The static mute state. If the value is `MUTED` or `UNMUTED`, then the + # finding's overall mute state will have the same value. + # @!attribute [rw] apply_time + # @return [::Google::Protobuf::Timestamp] + # When the static mute was applied. + class StaticMute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The record of a dynamic mute rule that matches the finding. + # @!attribute [rw] mute_config + # @return [::String] + # The relative resource name of the mute rule, represented by a mute + # config, that created this record, for example + # `organizations/123/muteConfigs/mymuteconfig` or + # `organizations/123/locations/global/muteConfigs/mymuteconfig`. + # @!attribute [rw] match_time + # @return [::Google::Protobuf::Timestamp] + # When the dynamic mute rule first matched the finding. + class DynamicMuteRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class SourcePropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + class ExternalSystemsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::SecurityCenter::V1::ContactDetails] + class ContactsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of the finding. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The finding requires attention and has not been addressed yet. + ACTIVE = 1 + + # The finding has been fixed, triaged as a non-issue or otherwise addressed + # and is no longer active. + INACTIVE = 2 + end + + # The severity of the finding. + module Severity + # This value is used for findings when a source doesn't write a severity + # value. + SEVERITY_UNSPECIFIED = 0 + + # Vulnerability: + # A critical vulnerability is easily discoverable by an external actor, + # exploitable, and results in the direct ability to execute arbitrary code, + # exfiltrate data, and otherwise gain additional access and privileges to + # cloud resources and workloads. Examples include publicly accessible + # unprotected user data and public SSH access with weak or no + # passwords. + # + # Threat: + # Indicates a threat that is able to access, modify, or delete data or + # execute unauthorized code within existing resources. + CRITICAL = 1 + + # Vulnerability: + # A high risk vulnerability can be easily discovered and exploited in + # combination with other vulnerabilities in order to gain direct access and + # the ability to execute arbitrary code, exfiltrate data, and otherwise + # gain additional access and privileges to cloud resources and workloads. + # An example is a database with weak or no passwords that is only + # accessible internally. This database could easily be compromised by an + # actor that had access to the internal network. + # + # Threat: + # Indicates a threat that is able to create new computational resources in + # an environment but not able to access data or execute code in existing + # resources. + HIGH = 2 + + # Vulnerability: + # A medium risk vulnerability could be used by an actor to gain access to + # resources or privileges that enable them to eventually (through multiple + # steps or a complex exploit) gain access and the ability to execute + # arbitrary code or exfiltrate data. An example is a service account with + # access to more projects than it should have. If an actor gains access to + # the service account, they could potentially use that access to manipulate + # a project the service account was not intended to. + # + # Threat: + # Indicates a threat that is able to cause operational impact but may not + # access data or execute unauthorized code. + MEDIUM = 3 + + # Vulnerability: + # A low risk vulnerability hampers a security organization's ability to + # detect vulnerabilities or active threats in their deployment, or prevents + # the root cause investigation of security issues. An example is monitoring + # and logs being disabled for resource configurations and access. + # + # Threat: + # Indicates a threat that has obtained minimal access to an environment but + # is not able to access data, execute code, or create resources. + LOW = 4 + end + + # Mute state a finding can be in. + module Mute + # Unspecified. + MUTE_UNSPECIFIED = 0 + + # Finding has been muted. + MUTED = 1 + + # Finding has been unmuted. + UNMUTED = 2 + + # Finding has never been muted/unmuted. + UNDEFINED = 4 + end + + # Represents what kind of Finding it is. + module FindingClass + # Unspecified finding class. + FINDING_CLASS_UNSPECIFIED = 0 + + # Describes unwanted or malicious activity. + THREAT = 1 + + # Describes a potential weakness in software that increases risk to + # Confidentiality & Integrity & Availability. + VULNERABILITY = 2 + + # Describes a potential weakness in cloud resource/asset configuration that + # increases risk. + MISCONFIGURATION = 3 + + # Describes a security observation that is for informational purposes. + OBSERVATION = 4 + + # Describes an error that prevents some SCC functionality. + SCC_ERROR = 5 + + # Describes a potential security risk due to a change in the security + # posture. + POSTURE_VIOLATION = 6 + + # Describes a group of security issues that, when the issues + # occur together, represent a greater risk than when the issues occur + # independently. A group of such issues is referred to as a toxic + # combination. + TOXIC_COMBINATION = 7 + + # Describes a potential security risk to data assets that contain sensitive + # data. + SENSITIVE_DATA_RISK = 8 + + # Describes a resource or resource group where high risk attack paths + # converge, based on attack path simulations (APS). + CHOKEPOINT = 9 + + # Describes a potential security risk due to the resource being exposed to + # the internet. + EXTERNAL_EXPOSURE = 10 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb new file mode 100644 index 000000000000..18f745ec7791 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Message that contains the resource name and display name of a folder + # resource. + # @!attribute [rw] resource_folder + # @return [::String] + # Full resource name of this folder. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_folder_display_name + # @return [::String] + # The user defined display name for this folder. + class Folder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb new file mode 100644 index 000000000000..78f19b012cf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains details about groups of which this finding is a member. A group is a + # collection of findings that are related in some way. + # @!attribute [rw] group_type + # @return [::Google::Cloud::SecurityCenter::V1::GroupMembership::GroupType] + # Type of group. + # @!attribute [rw] group_id + # @return [::String] + # ID of the group. + class GroupMembership + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible types of groups. + module GroupType + # Default value. + GROUP_TYPE_UNSPECIFIED = 0 + + # Group represents a toxic combination. + GROUP_TYPE_TOXIC_COMBINATION = 1 + + # Group represents a chokepoint. + GROUP_TYPE_CHOKEPOINT = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb new file mode 100644 index 000000000000..0444b9de78dc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents a particular IAM binding, which captures a member's role addition, + # removal, or state. + # @!attribute [rw] action + # @return [::Google::Cloud::SecurityCenter::V1::IamBinding::Action] + # The action that was performed on a Binding. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to "members". + # For example, "roles/viewer", "roles/editor", or "roles/owner". + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Cloud Platform resource, for + # example, "foo@google.com". + class IamBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb new file mode 100644 index 000000000000..518ba2e5451a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Represents what's commonly known as an _indicator of compromise_ (IoC) in + # computer forensics. This is an artifact observed on a network or in an + # operating system that, with high confidence, indicates a computer intrusion. + # For more information, see [Indicator of + # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). + # @!attribute [rw] ip_addresses + # @return [::Array<::String>] + # The list of IP addresses that are associated with the finding. + # @!attribute [rw] domains + # @return [::Array<::String>] + # List of domains associated to the Finding. + # @!attribute [rw] signatures + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature>] + # The list of matched signatures indicating that the given + # process is present in the environment. + # @!attribute [rw] uris + # @return [::Array<::String>] + # The list of URIs associated to the Findings. + class Indicator + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates what signature matched this process. + # @!attribute [rw] memory_hash_signature + # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::MemoryHashSignature] + # Signature indicating that a binary family was matched. + # + # Note: The following fields are mutually exclusive: `memory_hash_signature`, `yara_rule_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] yara_rule_signature + # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::YaraRuleSignature] + # Signature indicating that a YARA rule was matched. + # + # Note: The following fields are mutually exclusive: `yara_rule_signature`, `memory_hash_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] signature_type + # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::SignatureType] + # Describes the type of resource associated with the signature. + class ProcessSignature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A signature corresponding to memory page hashes. + # @!attribute [rw] binary_family + # @return [::String] + # The binary family. + # @!attribute [rw] detections + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::MemoryHashSignature::Detection>] + # The list of memory hash detections contributing to the binary family + # match. + class MemoryHashSignature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Memory hash detection contributing to the binary family match. + # @!attribute [rw] binary + # @return [::String] + # The name of the binary associated with the memory hash + # signature detection. + # @!attribute [rw] percent_pages_matched + # @return [::Float] + # The percentage of memory page hashes in the signature + # that were matched. + class Detection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A signature corresponding to a YARA rule. + # @!attribute [rw] yara_rule + # @return [::String] + # The name of the YARA rule. + class YaraRuleSignature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible resource types to be associated with a signature. + module SignatureType + # The default signature type. + SIGNATURE_TYPE_UNSPECIFIED = 0 + + # Used for signatures concerning processes. + SIGNATURE_TYPE_PROCESS = 1 + + # Used for signatures concerning disks. + SIGNATURE_TYPE_FILE = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb new file mode 100644 index 000000000000..9fc2809838c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Kernel mode rootkit signatures. + # @!attribute [rw] name + # @return [::String] + # Rootkit name, when available. + # @!attribute [rw] unexpected_code_modification + # @return [::Boolean] + # True if unexpected modifications of kernel code memory are present. + # @!attribute [rw] unexpected_read_only_data_modification + # @return [::Boolean] + # True if unexpected modifications of kernel read-only data memory are + # present. + # @!attribute [rw] unexpected_ftrace_handler + # @return [::Boolean] + # True if `ftrace` points are present with callbacks pointing to regions + # that are not in the expected kernel or module code range. + # @!attribute [rw] unexpected_kprobe_handler + # @return [::Boolean] + # True if `kprobe` points are present with callbacks pointing to regions + # that are not in the expected kernel or module code range. + # @!attribute [rw] unexpected_kernel_code_pages + # @return [::Boolean] + # True if kernel code pages that are not in the expected kernel or module + # code regions are present. + # @!attribute [rw] unexpected_system_call_handler + # @return [::Boolean] + # True if system call handlers that are are not in the expected kernel or + # module code regions are present. + # @!attribute [rw] unexpected_interrupt_handler + # @return [::Boolean] + # True if interrupt handlers that are are not in the expected kernel or + # module code regions are present. + # @!attribute [rw] unexpected_processes_in_runqueue + # @return [::Boolean] + # True if unexpected processes in the scheduler run queue are present. Such + # processes are in the run queue, but not in the process task list. + class KernelRootkit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb new file mode 100644 index 000000000000..6286084901a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb @@ -0,0 +1,241 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Kubernetes-related attributes. + # @!attribute [rw] pods + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Pod>] + # Kubernetes + # [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) + # associated with the finding. This field contains Pod records for each + # container that is owned by a Pod. + # @!attribute [rw] nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Node>] + # Provides Kubernetes + # [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) + # information. + # @!attribute [rw] node_pools + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::NodePool>] + # GKE [node + # pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) + # associated with the finding. This field contains node pool information for + # each node, when it is available. + # @!attribute [rw] roles + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Role>] + # Provides Kubernetes role information for findings that involve [Roles or + # ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). + # @!attribute [rw] bindings + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Binding>] + # Provides Kubernetes role binding information for findings that involve + # [RoleBindings or + # ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). + # @!attribute [rw] access_reviews + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::AccessReview>] + # Provides information on any Kubernetes access reviews (privilege checks) + # relevant to the finding. + # @!attribute [rw] objects + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Object>] + # Kubernetes objects related to the finding. + class Kubernetes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A Kubernetes Pod. + # @!attribute [rw] ns + # @return [::String] + # Kubernetes Pod namespace. + # @!attribute [rw] name + # @return [::String] + # Kubernetes Pod name. + # @!attribute [rw] labels + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Label>] + # Pod labels. For Kubernetes containers, these are applied to the + # container. + # @!attribute [rw] containers + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] + # Pod containers associated with this finding, if any. + class Pod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Kubernetes nodes associated with the finding. + # @!attribute [rw] name + # @return [::String] + # [Full resource name](https://google.aip.dev/122#full-resource-names) of + # the Compute Engine VM running the cluster node. + class Node + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides GKE node pool information. + # @!attribute [rw] name + # @return [::String] + # Kubernetes node pool name. + # @!attribute [rw] nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Node>] + # Nodes associated with the finding. + class NodePool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Kubernetes Role or ClusterRole. + # @!attribute [rw] kind + # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Role::Kind] + # Role type. + # @!attribute [rw] ns + # @return [::String] + # Role namespace. + # @!attribute [rw] name + # @return [::String] + # Role name. + class Role + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of Kubernetes roles. + module Kind + # Role type is not specified. + KIND_UNSPECIFIED = 0 + + # Kubernetes Role. + ROLE = 1 + + # Kubernetes ClusterRole. + CLUSTER_ROLE = 2 + end + end + + # Represents a Kubernetes RoleBinding or ClusterRoleBinding. + # @!attribute [rw] ns + # @return [::String] + # Namespace for the binding. + # @!attribute [rw] name + # @return [::String] + # Name for the binding. + # @!attribute [rw] role + # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Role] + # The Role or ClusterRole referenced by the binding. + # @!attribute [rw] subjects + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Subject>] + # Represents one or more subjects that are bound to the role. Not always + # available for PATCH requests. + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a Kubernetes subject. + # @!attribute [rw] kind + # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Subject::AuthType] + # Authentication type for the subject. + # @!attribute [rw] ns + # @return [::String] + # Namespace for the subject. + # @!attribute [rw] name + # @return [::String] + # Name for the subject. + class Subject + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Auth types that can be used for the subject's kind field. + module AuthType + # Authentication is not specified. + AUTH_TYPE_UNSPECIFIED = 0 + + # User with valid certificate. + USER = 1 + + # Users managed by Kubernetes API with credentials stored as secrets. + SERVICEACCOUNT = 2 + + # Collection of users. + GROUP = 3 + end + end + + # Conveys information about a Kubernetes access review (such as one returned + # by a [`kubectl auth + # can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) + # command) that was involved in a finding. + # @!attribute [rw] group + # @return [::String] + # The API group of the resource. "*" means all. + # @!attribute [rw] ns + # @return [::String] + # Namespace of the action being requested. Currently, there is no + # distinction between no namespace and all namespaces. Both + # are represented by "" (empty). + # @!attribute [rw] name + # @return [::String] + # The name of the resource being requested. Empty means all. + # @!attribute [rw] resource + # @return [::String] + # The optional resource type requested. "*" means all. + # @!attribute [rw] subresource + # @return [::String] + # The optional subresource type. + # @!attribute [rw] verb + # @return [::String] + # A Kubernetes resource API verb, like get, list, watch, create, update, + # delete, proxy. "*" means all. + # @!attribute [rw] version + # @return [::String] + # The API version of the resource. "*" means all. + class AccessReview + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Kubernetes object related to the finding, uniquely identified by GKNN. + # Used if the object Kind is not one of Pod, Node, NodePool, Binding, or + # AccessReview. + # @!attribute [rw] group + # @return [::String] + # Kubernetes object group, such as "policy.k8s.io/v1". + # @!attribute [rw] kind + # @return [::String] + # Kubernetes object kind, such as "Namespace". + # @!attribute [rw] ns + # @return [::String] + # Kubernetes object namespace. Must be a valid DNS label. Named + # "ns" to avoid collision with C++ namespace keyword. For details see + # https://kubernetes.io/docs/tasks/administer-cluster/namespaces/. + # @!attribute [rw] name + # @return [::String] + # Kubernetes object name. For details see + # https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. + # @!attribute [rw] containers + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] + # Pod containers associated with this finding, if any. + class Object + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb new file mode 100644 index 000000000000..d3887e4fc185 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents a generic name-value label. A label has separate name and value + # fields to support filtering with the `contains()` function. For more + # information, see [Filtering on array-type + # fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering). + # @!attribute [rw] name + # @return [::String] + # Name of the label. + # @!attribute [rw] value + # @return [::String] + # Value that corresponds to the label's name. + class Label + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb new file mode 100644 index 000000000000..be5ec1bb5606 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Contains information related to the load balancer associated with the + # finding. + # @!attribute [rw] name + # @return [::String] + # The name of the load balancer associated with the finding. + class LoadBalancer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb new file mode 100644 index 000000000000..6f028cba55b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # An individual entry in a log. + # @!attribute [rw] cloud_logging_entry + # @return [::Google::Cloud::SecurityCenter::V1::CloudLoggingEntry] + # An individual entry in a log stored in Cloud Logging. + class LogEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata taken from a [Cloud Logging + # LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) + # @!attribute [rw] insert_id + # @return [::String] + # A unique identifier for the log entry. + # @!attribute [rw] log_id + # @return [::String] + # The type of the log (part of `log_name`. `log_name` is the resource name of + # the log to which this log entry belongs). For example: + # `cloudresourcemanager.googleapis.com/activity`. Note that this field is not + # URL-encoded, unlike the `LOG_ID` field in `LogEntry`. + # @!attribute [rw] resource_container + # @return [::String] + # The organization, folder, or project of the monitored resource that + # produced this log entry. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # The time the event described by the log entry occurred. + class CloudLoggingEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb new file mode 100644 index 000000000000..6e17500226e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb @@ -0,0 +1,303 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # MITRE ATT&CK tactics and techniques related to this finding. + # See: https://attack.mitre.org + # @!attribute [rw] primary_tactic + # @return [::Google::Cloud::SecurityCenter::V1::MitreAttack::Tactic] + # The MITRE ATT&CK tactic most closely represented by this finding, if any. + # @!attribute [rw] primary_techniques + # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Technique>] + # The MITRE ATT&CK technique most closely represented by this finding, if + # any. primary_techniques is a repeated field because there are multiple + # levels of MITRE ATT&CK techniques. If the technique most closely + # represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), + # both the sub-technique and its parent technique(s) will be listed (e.g. + # `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). + # @!attribute [rw] additional_tactics + # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Tactic>] + # Additional MITRE ATT&CK tactics related to this finding, if any. + # @!attribute [rw] additional_techniques + # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Technique>] + # Additional MITRE ATT&CK techniques related to this finding, if any, along + # with any of their respective parent techniques. + # @!attribute [rw] version + # @return [::String] + # The MITRE ATT&CK version referenced by the above fields. E.g. "8". + class MitreAttack + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # MITRE ATT&CK tactics that can be referenced by SCC findings. + # See: https://attack.mitre.org/tactics/enterprise/ + module Tactic + # Unspecified value. + TACTIC_UNSPECIFIED = 0 + + # TA0043 + RECONNAISSANCE = 1 + + # TA0042 + RESOURCE_DEVELOPMENT = 2 + + # TA0001 + INITIAL_ACCESS = 5 + + # TA0002 + EXECUTION = 3 + + # TA0003 + PERSISTENCE = 6 + + # TA0004 + PRIVILEGE_ESCALATION = 8 + + # TA0005 + DEFENSE_EVASION = 7 + + # TA0006 + CREDENTIAL_ACCESS = 9 + + # TA0007 + DISCOVERY = 10 + + # TA0008 + LATERAL_MOVEMENT = 11 + + # TA0009 + COLLECTION = 12 + + # TA0011 + COMMAND_AND_CONTROL = 4 + + # TA0010 + EXFILTRATION = 13 + + # TA0040 + IMPACT = 14 + end + + # MITRE ATT&CK techniques that can be referenced by SCC findings. + # See: https://attack.mitre.org/techniques/enterprise/ + # Next ID: 65 + module Technique + # Unspecified value. + TECHNIQUE_UNSPECIFIED = 0 + + # T1036 + MASQUERADING = 49 + + # T1036.005 + MATCH_LEGITIMATE_NAME_OR_LOCATION = 50 + + # T1037 + BOOT_OR_LOGON_INITIALIZATION_SCRIPTS = 37 + + # T1037.005 + STARTUP_ITEMS = 38 + + # T1046 + NETWORK_SERVICE_DISCOVERY = 32 + + # T1057 + PROCESS_DISCOVERY = 56 + + # T1059 + COMMAND_AND_SCRIPTING_INTERPRETER = 6 + + # T1059.004 + UNIX_SHELL = 7 + + # T1059.006 + PYTHON = 59 + + # T1068 + EXPLOITATION_FOR_PRIVILEGE_ESCALATION = 63 + + # T1069 + PERMISSION_GROUPS_DISCOVERY = 18 + + # T1069.003 + CLOUD_GROUPS = 19 + + # T1070.004 + INDICATOR_REMOVAL_FILE_DELETION = 64 + + # T1071 + APPLICATION_LAYER_PROTOCOL = 45 + + # T1071.004 + DNS = 46 + + # T1072 + SOFTWARE_DEPLOYMENT_TOOLS = 47 + + # T1078 + VALID_ACCOUNTS = 14 + + # T1078.001 + DEFAULT_ACCOUNTS = 35 + + # T1078.003 + LOCAL_ACCOUNTS = 15 + + # T1078.004 + CLOUD_ACCOUNTS = 16 + + # T1090 + PROXY = 9 + + # T1090.002 + EXTERNAL_PROXY = 10 + + # T1090.003 + MULTI_HOP_PROXY = 11 + + # T1098 + ACCOUNT_MANIPULATION = 22 + + # T1098.001 + ADDITIONAL_CLOUD_CREDENTIALS = 40 + + # T1098.004 + SSH_AUTHORIZED_KEYS = 23 + + # T1098.006 + ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58 + + # T1105 + INGRESS_TOOL_TRANSFER = 3 + + # T1106 + NATIVE_API = 4 + + # T1110 + BRUTE_FORCE = 44 + + # T1129 + SHARED_MODULES = 5 + + # T1134 + ACCESS_TOKEN_MANIPULATION = 33 + + # T1134.001 + TOKEN_IMPERSONATION_OR_THEFT = 39 + + # T1190 + EXPLOIT_PUBLIC_FACING_APPLICATION = 27 + + # T1484 + DOMAIN_POLICY_MODIFICATION = 30 + + # T1485 + DATA_DESTRUCTION = 29 + + # T1489 + SERVICE_STOP = 52 + + # T1490 + INHIBIT_SYSTEM_RECOVERY = 36 + + # T1496 + RESOURCE_HIJACKING = 8 + + # T1498 + NETWORK_DENIAL_OF_SERVICE = 17 + + # T1526 + CLOUD_SERVICE_DISCOVERY = 48 + + # T1528 + STEAL_APPLICATION_ACCESS_TOKEN = 42 + + # T1531 + ACCOUNT_ACCESS_REMOVAL = 51 + + # T1539 + STEAL_WEB_SESSION_COOKIE = 25 + + # T1543 + CREATE_OR_MODIFY_SYSTEM_PROCESS = 24 + + # T1548 + ABUSE_ELEVATION_CONTROL_MECHANISM = 34 + + # T1552 + UNSECURED_CREDENTIALS = 13 + + # T1556 + MODIFY_AUTHENTICATION_PROCESS = 28 + + # T1562 + IMPAIR_DEFENSES = 31 + + # T1562.001 + DISABLE_OR_MODIFY_TOOLS = 55 + + # T1567 + EXFILTRATION_OVER_WEB_SERVICE = 20 + + # T1567.002 + EXFILTRATION_TO_CLOUD_STORAGE = 21 + + # T1568 + DYNAMIC_RESOLUTION = 12 + + # T1570 + LATERAL_TOOL_TRANSFER = 41 + + # T1578 + MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26 + + # T1578.001 + CREATE_SNAPSHOT = 54 + + # T1580 + CLOUD_INFRASTRUCTURE_DISCOVERY = 53 + + # T1588 + OBTAIN_CAPABILITIES = 43 + + # T1595 + ACTIVE_SCANNING = 1 + + # T1595.001 + SCANNING_IP_BLOCKS = 2 + + # T1609 + CONTAINER_ADMINISTRATION_COMMAND = 60 + + # T1611 + ESCAPE_TO_HOST = 61 + + # T1613 + CONTAINER_AND_RESOURCE_DISCOVERY = 57 + + # T1649 + STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb new file mode 100644 index 000000000000..ef639857ed11 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # A mute config is a Cloud SCC resource that contains the configuration + # to mute create/update events of findings. + # @!attribute [rw] name + # @return [::String] + # This field will be ignored if provided on config creation. Format + # `organizations/{organization}/muteConfigs/{mute_config}` + # `folders/{folder}/muteConfigs/{mute_config}` + # `projects/{project}/muteConfigs/{mute_config}` + # `organizations/{organization}/locations/global/muteConfigs/{mute_config}` + # `folders/{folder}/locations/global/muteConfigs/{mute_config}` + # `projects/{project}/locations/global/muteConfigs/{mute_config}` + # @!attribute [rw] display_name + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # The human readable name to be displayed for the mute config. + # @!attribute [rw] description + # @return [::String] + # A description of the mute config. + # @!attribute [rw] filter + # @return [::String] + # Required. An expression that defines the filter to apply across + # create/update events of findings. While creating a filter string, be + # mindful of the scope in which the mute configuration is being created. + # E.g., If a filter contains project = X but is created under the project = Y + # scope, it might not match any findings. + # + # The following field and operator combinations are supported: + # + # * severity: `=`, `:` + # * category: `=`, `:` + # * resource.name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * finding_class: `=`, `:` + # * indicator.ip_addresses: `=`, `:` + # * indicator.domains: `=`, `:` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the mute config was created. + # This field is set by the server and will be ignored if provided on config + # creation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time at which the mute config was updated. + # This field is set by the server and will be ignored if provided on config + # creation or update. + # @!attribute [r] most_recent_editor + # @return [::String] + # Output only. Email address of the user who last edited the mute config. + # This field is set by the server and will be ignored if provided on config + # creation or update. + # @!attribute [rw] type + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig::MuteConfigType] + # Optional. The type of the mute config, which determines what type of mute + # state the config affects. The static mute state takes precedence over the + # dynamic mute state. Immutable after creation. STATIC by default if not set + # during creation. + # @!attribute [rw] expiry_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The expiry of the mute config. Only applicable for dynamic + # configs. If the expiry is set, when the config expires, it is removed from + # all findings. + class MuteConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of MuteConfig. + module MuteConfigType + # Unused. + MUTE_CONFIG_TYPE_UNSPECIFIED = 0 + + # A static mute config, which sets the static mute state of future matching + # findings to muted. Once the static mute state has been set, finding or + # config modifications will not affect the state. + STATIC = 1 + + # A dynamic mute config, which is applied to existing and future matching + # findings, setting their dynamic mute state to "muted". If the config is + # updated or deleted, or a matching finding is updated, such that the + # finding doesn't match the config, the config will be removed from the + # finding, and the finding's dynamic mute state may become "unmuted" + # (unless other configs still match). + DYNAMIC = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb new file mode 100644 index 000000000000..c1a520b911b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise + # notebook](https://cloud.google.com/colab/docs/introduction) file, that is + # associated with a finding. + # @!attribute [rw] name + # @return [::String] + # The name of the notebook. + # @!attribute [rw] service + # @return [::String] + # The source notebook service, for example, "Colab Enterprise". + # @!attribute [rw] last_author + # @return [::String] + # The user ID of the latest author to modify the notebook. + # @!attribute [rw] notebook_update_time + # @return [::Google::Protobuf::Timestamp] + # The most recent time the notebook was updated. + class Notebook + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb new file mode 100644 index 000000000000..76042f526f38 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Cloud Security Command Center (Cloud SCC) notification configs. + # + # A notification config is a Cloud SCC resource that contains the configuration + # to send notifications for create/update events of findings, assets and etc. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this notification config. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/notificationConfigs/notify_public_bucket", + # "folders/\\{folder_id}/notificationConfigs/notify_public_bucket", + # or "projects/\\{project_id}/notificationConfigs/notify_public_bucket". + # @!attribute [rw] description + # @return [::String] + # The description of the notification config (max of 1024 characters). + # @!attribute [rw] pubsub_topic + # @return [::String] + # The Pub/Sub topic to send notifications to. Its format is + # "projects/[project_id]/topics/[topic]". + # @!attribute [r] service_account + # @return [::String] + # Output only. The service account that needs "pubsub.topics.publish" + # permission to publish to the Pub/Sub topic. + # @!attribute [rw] streaming_config + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig::StreamingConfig] + # The config for triggering streaming-based notifications. + class NotificationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The config for streaming-based notifications, which send each event as soon + # as it is detected. + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across create/update events + # of assets or findings as specified by the event type. The expression is a + # list of zero or more restrictions combined via logical operators `AND` + # and `OR`. Parentheses are supported, and `OR` has higher precedence than + # `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + class StreamingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb new file mode 100644 index 000000000000..117cc8daf4cc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Cloud SCC's Notification + # @!attribute [rw] notification_config_name + # @return [::String] + # Name of the notification config that generated current notification. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # If it's a Finding based notification config, this field will be + # populated. + # @!attribute [rw] resource + # @return [::Google::Cloud::SecurityCenter::V1::Resource] + # The Cloud resource tied to this notification's Finding. + class NotificationMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb new file mode 100644 index 000000000000..dd2663301322 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains information about the org policies associated with the finding. + # @!attribute [rw] name + # @return [::String] + # The resource name of the org policy. + # Example: + # "organizations/\\{organization_id}/policies/\\{constraint_name}" + class OrgPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb new file mode 100644 index 000000000000..d75d60b378de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # User specified settings that are attached to the Security Command + # Center organization. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of the settings. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/organizationSettings". + # @!attribute [rw] enable_asset_discovery + # @return [::Boolean] + # A flag that indicates if Asset Discovery should be enabled. If the flag is + # set to `true`, then discovery of assets will occur. If it is set to + # `false`, all historical assets will remain, but discovery of future assets + # will not occur. + # @!attribute [rw] asset_discovery_config + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings::AssetDiscoveryConfig] + # The configuration used for Asset Discovery runs. + class OrganizationSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration used for Asset Discovery runs. + # @!attribute [rw] project_ids + # @return [::Array<::String>] + # The project ids to use for filtering asset discovery. + # @!attribute [rw] inclusion_mode + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings::AssetDiscoveryConfig::InclusionMode] + # The mode to use for filtering asset discovery. + # @!attribute [rw] folder_ids + # @return [::Array<::String>] + # The folder ids to use for filtering asset discovery. + # It consists of only digits, e.g., 756619654966. + class AssetDiscoveryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The mode of inclusion when running Asset Discovery. + # Asset discovery can be limited by explicitly identifying projects to be + # included or excluded. If INCLUDE_ONLY is set, then only those projects + # within the organization and their children are discovered during asset + # discovery. If EXCLUDE is set, then projects that don't match those + # projects are discovered during asset discovery. If neither are set, then + # all projects within the organization are discovered during asset + # discovery. + module InclusionMode + # Unspecified. Setting the mode with this value will disable + # inclusion/exclusion filtering for Asset Discovery. + INCLUSION_MODE_UNSPECIFIED = 0 + + # Asset Discovery will capture only the resources within the projects + # specified. All other resources will be ignored. + INCLUDE_ONLY = 1 + + # Asset Discovery will ignore all resources under the projects specified. + # All other resources will be retrieved. + EXCLUDE = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb new file mode 100644 index 000000000000..7c14c9d1baf2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Represents an operating system process. + # @!attribute [rw] name + # @return [::String] + # The process name, as displayed in utilities like `top` and `ps`. This name + # can be accessed through `/proc/[pid]/comm` and changed with + # `prctl(PR_SET_NAME)`. + # @!attribute [rw] binary + # @return [::Google::Cloud::SecurityCenter::V1::File] + # File information for the process executable. + # @!attribute [rw] libraries + # @return [::Array<::Google::Cloud::SecurityCenter::V1::File>] + # File information for libraries loaded by the process. + # @!attribute [rw] script + # @return [::Google::Cloud::SecurityCenter::V1::File] + # When the process represents the invocation of a script, `binary` provides + # information about the interpreter, while `script` provides information + # about the script file provided to the interpreter. + # @!attribute [rw] args + # @return [::Array<::String>] + # Process arguments as JSON encoded strings. + # @!attribute [rw] arguments_truncated + # @return [::Boolean] + # True if `args` is incomplete. + # @!attribute [rw] env_variables + # @return [::Array<::Google::Cloud::SecurityCenter::V1::EnvironmentVariable>] + # Process environment variables. + # @!attribute [rw] env_variables_truncated + # @return [::Boolean] + # True if `env_variables` is incomplete. + # @!attribute [rw] pid + # @return [::Integer] + # The process ID. + # @!attribute [rw] parent_pid + # @return [::Integer] + # The parent process ID. + class Process + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A name-value pair representing an environment variable used in an operating + # system process. + # @!attribute [rw] name + # @return [::String] + # Environment variable name as a JSON encoded string. + # @!attribute [rw] val + # @return [::String] + # Environment variable value as a JSON encoded string. + class EnvironmentVariable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb new file mode 100644 index 000000000000..5783203927c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb @@ -0,0 +1,286 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Information related to the Google Cloud resource. + # @!attribute [rw] name + # @return [::String] + # The full resource name of the resource. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] display_name + # @return [::String] + # The human readable name of the resource. + # @!attribute [rw] type + # @return [::String] + # The full resource type of the resource. + # @!attribute [rw] project + # @return [::String] + # The full resource name of project that the resource belongs to. + # @!attribute [rw] project_display_name + # @return [::String] + # The project ID that the resource belongs to. + # @!attribute [rw] parent + # @return [::String] + # The full resource name of resource's parent. + # @!attribute [rw] parent_display_name + # @return [::String] + # The human readable name of resource's parent. + # @!attribute [r] folders + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] + # Output only. Contains a Folder message for each folder in the assets + # ancestry. The first folder is the deepest nested folder, and the last + # folder is the folder directly under the Organization. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] + # Indicates which cloud provider the resource resides in. + # @!attribute [rw] organization + # @return [::String] + # Indicates which organization or tenant in the cloud provider the finding + # applies to. + # @!attribute [rw] service + # @return [::String] + # The parent service or product from which the resource is provided, for + # example, GKE or SNS. + # @!attribute [rw] location + # @return [::String] + # The region or location of the service (if applicable). + # @!attribute [rw] aws_metadata + # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata] + # The AWS metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] azure_metadata + # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata] + # The Azure metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `azure_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resource_path + # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath] + # Provides the path to the resource within the resource hierarchy. + # @!attribute [rw] resource_path_string + # @return [::String] + # A string representation of the resource path. + # For Google Cloud, it has the format of + # `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` + # where there can be any number of folders. + # For AWS, it has the format of + # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` + # where there can be any number of organizational units. + # For Azure, it has the format of + # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` + # where there can be any number of management groups. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AWS metadata associated with the resource, only applicable if the finding's + # cloud provider is Amazon Web Services. + # @!attribute [rw] organization + # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsOrganization] + # The AWS organization associated with the resource. + # @!attribute [rw] organizational_units + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsOrganizationalUnit>] + # A list of AWS organizational units associated with the resource, ordered + # from lowest level (closest to the account) to highest level. + # @!attribute [rw] account + # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsAccount] + # The AWS account associated with the resource. + class AwsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An organization is a collection of accounts that are centrally managed + # together using consolidated billing, organized hierarchically with + # organizational units (OUs), and controlled with policies. + # @!attribute [rw] id + # @return [::String] + # The unique identifier (ID) for the organization. The regex pattern for an + # organization ID string requires "o-" followed by from 10 to 32 lowercase + # letters or digits. + class AwsOrganization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An Organizational Unit (OU) is a container of AWS accounts within a root of + # an organization. Policies that are attached to an OU apply to all accounts + # contained in that OU and in any child OUs. + # @!attribute [rw] id + # @return [::String] + # The unique identifier (ID) associated with this OU. The regex pattern for + # an organizational unit ID string requires "ou-" followed by from 4 to 32 + # lowercase letters or digits (the ID of the root that contains the OU). + # This string is followed by a second "-" dash and from 8 to 32 additional + # lowercase letters or digits. For example, "ou-ab12-cd34ef56". + # @!attribute [rw] name + # @return [::String] + # The friendly name of the OU. + class AwsOrganizationalUnit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An AWS account that is a member of an organization. + # @!attribute [rw] id + # @return [::String] + # The unique identifier (ID) of the account, containing exactly 12 digits. + # @!attribute [rw] name + # @return [::String] + # The friendly name of this account. + class AwsAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Azure metadata associated with the resource, only applicable if the finding's + # cloud provider is Microsoft Azure. + # @!attribute [rw] management_groups + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureManagementGroup>] + # A list of Azure management groups associated with the resource, ordered + # from lowest level (closest to the subscription) to highest level. + # @!attribute [rw] subscription + # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureSubscription] + # The Azure subscription associated with the resource. + # @!attribute [rw] resource_group + # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureResourceGroup] + # The Azure resource group associated with the resource. + class AzureMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents an Azure management group. + # @!attribute [rw] id + # @return [::String] + # The UUID of the Azure management group, for example, + # `20000000-0001-0000-0000-000000000000`. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the Azure management group. + class AzureManagementGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an Azure subscription. + # @!attribute [rw] id + # @return [::String] + # The UUID of the Azure subscription, for example, + # `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the Azure subscription. + class AzureSubscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an Azure resource group. + # @!attribute [rw] name + # @return [::String] + # The name of the Azure resource group. This is not a UUID. + class AzureResourceGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents the path of resources leading up to the resource this finding is + # about. + # @!attribute [rw] nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourcePath::ResourcePathNode>] + # The list of nodes that make the up resource path, ordered from lowest + # level to highest level. + class ResourcePath + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A node within the resource path. Each node represents a resource within the + # resource hierarchy. + # @!attribute [rw] node_type + # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath::ResourcePathNodeType] + # The type of resource this node represents. + # @!attribute [rw] id + # @return [::String] + # The ID of the resource this node represents. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the resource this node represents. + class ResourcePathNode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of resource the node represents. + module ResourcePathNodeType + # Node type is unspecified. + RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0 + + # The node represents a Google Cloud organization. + GCP_ORGANIZATION = 1 + + # The node represents a Google Cloud folder. + GCP_FOLDER = 2 + + # The node represents a Google Cloud project. + GCP_PROJECT = 3 + + # The node represents an AWS organization. + AWS_ORGANIZATION = 4 + + # The node represents an AWS organizational unit. + AWS_ORGANIZATIONAL_UNIT = 5 + + # The node represents an AWS account. + AWS_ACCOUNT = 6 + + # The node represents an Azure management group. + AZURE_MANAGEMENT_GROUP = 7 + + # The node represents an Azure subscription. + AZURE_SUBSCRIPTION = 8 + + # The node represents an Azure resource group. + AZURE_RESOURCE_GROUP = 9 + end + end + + # Enumeration representing the various cloud providers a finding's resource + # could reside in. + module CloudProvider + # The cloud provider is unspecified. + CLOUD_PROVIDER_UNSPECIFIED = 0 + + # The cloud provider is Google Cloud Platform. + GOOGLE_CLOUD_PLATFORM = 1 + + # The cloud provider is Amazon Web Services. + AMAZON_WEB_SERVICES = 2 + + # The cloud provider is Microsoft Azure. + MICROSOFT_AZURE = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb new file mode 100644 index 000000000000..f231fe97ed46 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb @@ -0,0 +1,125 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # A resource value configuration (RVC) is a mapping configuration of user's + # resources to resource values. Used in Attack path simulations. + # @!attribute [rw] name + # @return [::String] + # Name for the resource value configuration + # @!attribute [rw] resource_value + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] + # Required. Resource value level this expression represents + # @!attribute [rw] tag_values + # @return [::Array<::String>] + # Required. Tag values combined with `AND` to check against. + # Values in the form "tagValues/123" + # Example: `[ "tagValues/123", "tagValues/456", "tagValues/789" ]` + # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing + # @!attribute [rw] resource_type + # @return [::String] + # Apply resource_value only to resources that match resource_type. + # resource_type will be checked with `AND` of other resources. + # For example, "storage.googleapis.com/Bucket" with resource_value "HIGH" + # will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. + # @!attribute [rw] scope + # @return [::String] + # Project or folder to scope this configuration to. + # For example, "project/456" would apply this configuration only to resources + # in "project/456" scope will be checked with `AND` of other + # resources. + # @!attribute [rw] resource_labels_selector + # @return [::Google::Protobuf::Map{::String => ::String}] + # List of resource labels to search for, evaluated with `AND`. + # For example, `"resource_labels_selector": {"key": "value", "env": "prod"}` + # will match resources with labels "key": "value" `AND` "env": + # "prod" + # https://cloud.google.com/resource-manager/docs/creating-managing-labels + # @!attribute [rw] description + # @return [::String] + # Description of the resource value configuration. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp this resource value configuration was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp this resource value configuration was last updated. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] + # Cloud provider this configuration applies to + # @!attribute [rw] sensitive_data_protection_mapping + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig::SensitiveDataProtectionMapping] + # A mapping of the sensitivity on Sensitive Data Protection finding to + # resource values. This mapping can only be used in combination with a + # resource_type that is related to BigQuery, e.g. + # "bigquery.googleapis.com/Dataset". + class ResourceValueConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Resource value mapping for Sensitive Data Protection findings. + # If any of these mappings have a resource value that is not unspecified, + # the resource_value field will be ignored when reading this configuration. + # @!attribute [rw] high_sensitivity_mapping + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] + # Resource value mapping for high-sensitivity Sensitive Data Protection + # findings + # @!attribute [rw] medium_sensitivity_mapping + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] + # Resource value mapping for medium-sensitivity Sensitive Data Protection + # findings + class SensitiveDataProtectionMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceLabelsSelectorEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Value enum to map to a resource + module ResourceValue + # Unspecific value + RESOURCE_VALUE_UNSPECIFIED = 0 + + # High resource value + HIGH = 1 + + # Medium resource value + MEDIUM = 2 + + # Low resource value + LOW = 3 + + # No resource value, e.g. ignore these resources + NONE = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb new file mode 100644 index 000000000000..c00c755d2726 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Response of asset discovery run + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryResponse::State] + # The state of an asset discovery run. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # The duration between asset discovery run start and end + class RunAssetDiscoveryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of an asset discovery run. + module State + # Asset discovery run state was unspecified. + STATE_UNSPECIFIED = 0 + + # Asset discovery run completed successfully. + COMPLETED = 1 + + # Asset discovery run was cancelled with tasks still pending, as another + # run for the same organization was started with a higher priority. + SUPERSEDED = 2 + + # Asset discovery run was killed and terminated. + TERMINATED = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb new file mode 100644 index 000000000000..042d8ac3a7b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Defines the properties in a custom module configuration for Security + # Health Analytics. Use the custom module configuration to create custom + # detectors that generate custom findings for resources that you specify. + # @!attribute [rw] predicate + # @return [::Google::Type::Expr] + # The CEL expression to evaluate to produce findings. When the expression + # evaluates to true against a resource, a finding is generated. + # @!attribute [rw] custom_output + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::CustomOutputSpec] + # Custom output properties. + # @!attribute [rw] resource_selector + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::ResourceSelector] + # The resource types that the custom module operates on. Each custom module + # can specify up to 5 resource types. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::Severity] + # The severity to assign to findings generated by the module. + # @!attribute [rw] description + # @return [::String] + # Text that describes the vulnerability or misconfiguration that the custom + # module detects. This explanation is returned with each finding instance to + # help investigators understand the detected issue. The text must be enclosed + # in quotation marks. + # @!attribute [rw] recommendation + # @return [::String] + # An explanation of the recommended steps that security teams can take to + # resolve the detected issue. This explanation is returned with each finding + # generated by this module in the `nextSteps` property of the finding JSON. + class CustomConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A set of optional name-value pairs that define custom source properties to + # return with each finding that is generated by the custom module. The custom + # source properties that are defined here are included in the finding JSON + # under `sourceProperties`. + # @!attribute [rw] properties + # @return [::Array<::Google::Cloud::SecurityCenter::V1::CustomConfig::CustomOutputSpec::Property>] + # A list of custom output properties to add to the finding. + class CustomOutputSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An individual name-value pair that defines a custom source property. + # @!attribute [rw] name + # @return [::String] + # Name of the property for the custom output. + # @!attribute [rw] value_expression + # @return [::Google::Type::Expr] + # The CEL expression for the custom output. A resource property can be + # specified to return the value of the property or a text string enclosed + # in quotation marks. + class Property + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Resource for selecting resource type. + # @!attribute [rw] resource_types + # @return [::Array<::String>] + # The resource types to run the detector on. + class ResourceSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the valid value options for the severity of a finding. + module Severity + # Unspecified severity. + SEVERITY_UNSPECIFIED = 0 + + # Critical severity. + CRITICAL = 1 + + # High severity. + HIGH = 2 + + # Medium severity. + MEDIUM = 3 + + # Low severity. + LOW = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..0b327125cfc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Represents an instance of a Security Health Analytics custom module, + # including its full module name, display name, enablement state, and last + # updated time. You can create a custom module at the organization, folder, or + # project level. Custom modules that you create at the organization or folder + # level are inherited by the child folders and projects. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the custom module. + # Its format is + # "organizations/\\{organization}/securityHealthAnalyticsSettings/customModules/\\{customModule}", + # or + # "folders/\\{folder}/securityHealthAnalyticsSettings/customModules/\\{customModule}", + # or + # "projects/\\{project}/securityHealthAnalyticsSettings/customModules/\\{customModule}" + # + # The id \\{customModule} is server-generated and is not user settable. + # It will be a numeric id containing 1-20 digits. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the Security Health Analytics custom module. This + # display name becomes the finding category for all findings that are + # returned by this custom module. The display name must be between 1 and + # 128 characters, start with a lowercase letter, and contain alphanumeric + # characters or underscores only. + # @!attribute [rw] enablement_state + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule::EnablementState] + # The enablement state of the custom module. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the custom module was last updated. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The editor that last updated the custom module. + # @!attribute [r] ancestor_module + # @return [::String] + # Output only. If empty, indicates that the custom module was created in the + # organization, folder, or project in which you are viewing the custom + # module. Otherwise, `ancestor_module` specifies the organization or folder + # from which the custom module is inherited. + # @!attribute [rw] custom_config + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] + # The user specified custom configuration for the module. + class SecurityHealthAnalyticsCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible enablement states of a custom module. + module EnablementState + # Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given CRM resource. + ENABLED = 1 + + # The module is disabled at the given CRM resource. + DISABLED = 2 + + # State is inherited from an ancestor module. The module will either + # be effectively ENABLED or DISABLED based on its closest non-inherited + # ancestor module in the CRM hierarchy. + INHERITED = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb new file mode 100644 index 000000000000..0fd162583773 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # User specified security marks that are attached to the parent Security + # Command Center resource. Security marks are scoped within a Security Command + # Center organization -- they can be modified and viewed by all users who have + # proper permissions on the organization. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of the SecurityMarks. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Examples: + # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks". + # @!attribute [rw] marks + # @return [::Google::Protobuf::Map{::String => ::String}] + # Mutable user specified security marks belonging to the parent resource. + # Constraints are as follows: + # + # * Keys and values are treated as case insensitive + # * Keys must be between 1 - 256 characters (inclusive) + # * Keys must be letters, numbers, underscores, or dashes + # * Values have leading and trailing whitespace trimmed, remaining + # characters must be between 1 - 4096 characters (inclusive) + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the marks. + # Examples: + # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" + # "folders/\\{folder_id}/assets/\\{asset_id}/securityMarks" + # "projects/\\{project_number}/assets/\\{asset_id}/securityMarks" + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" + # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" + # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" + class SecurityMarks + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MarksEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb new file mode 100644 index 000000000000..fb8f89c609e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Represents a posture that is deployed on Google Cloud by the + # Security Command Center Posture Management service. + # A posture contains one or more policy sets. A policy set is a + # group of policies that enforce a set of security rules on Google + # Cloud. + # @!attribute [rw] name + # @return [::String] + # Name of the posture, for example, `CIS-Posture`. + # @!attribute [rw] revision_id + # @return [::String] + # The version of the posture, for example, `c7cfa2a8`. + # @!attribute [rw] posture_deployment_resource + # @return [::String] + # The project, folder, or organization on which the posture is deployed, + # for example, `projects/{project_number}`. + # @!attribute [rw] posture_deployment + # @return [::String] + # The name of the posture deployment, for example, + # `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. + # @!attribute [rw] changed_policy + # @return [::String] + # The name of the updated policy, for example, + # `projects/{project_id}/policies/{constraint_name}`. + # @!attribute [rw] policy_set + # @return [::String] + # The name of the updated policyset, for example, `cis-policyset`. + # @!attribute [rw] policy + # @return [::String] + # The ID of the updated policy, for example, `compute-policy-1`. + # @!attribute [rw] policy_drift_details + # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityPosture::PolicyDriftDetails>] + # The details about a change in an updated policy that violates the deployed + # posture. + class SecurityPosture + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The policy field that violates the deployed posture and its expected and + # detected values. + # @!attribute [rw] field + # @return [::String] + # The name of the updated field, for example + # constraint.implementation.policy_rules[0].enforce + # @!attribute [rw] expected_value + # @return [::String] + # The value of this field that was configured in a posture, for example, + # `true` or `allowed_values={"projects/29831892"}`. + # @!attribute [rw] detected_value + # @return [::String] + # The detected value that violates the deployed posture, for example, + # `false` or `allowed_values={"projects/22831892"}`. + class PolicyDriftDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb new file mode 100644 index 000000000000..6b9045050b73 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb @@ -0,0 +1,2146 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Request message for bulk findings update. + # + # Note: + # 1. If multiple bulk update requests match the same resource, the order in + # which they get executed is not defined. + # 2. Once a bulk operation is started, there is no way to stop it. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, at which bulk action needs to be applied. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @!attribute [rw] filter + # @return [::String] + # Expression that identifies findings that should be updated. + # The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @!attribute [rw] mute_annotation + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # This can be a mute configuration name or any identifier for mute/unmute + # of findings based on the filter. + # @!attribute [rw] mute_state + # @return [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] + # Optional. All findings matching the given filter will have their mute state + # set to this value. The default value is `MUTED`. Setting this to + # `UNDEFINED` will clear the mute state on all matching findings. + class BulkMuteFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The mute state. + module MuteState + # Unused. + MUTE_STATE_UNSPECIFIED = 0 + + # Matching findings will be muted (default). + MUTED = 1 + + # Matching findings will have their mute state cleared. + UNDEFINED = 2 + end + end + + # The response to a BulkMute request. Contains the LRO information. + class BulkMuteFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a finding. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new finding's parent. Its format should be + # `organizations/[organization_id]/sources/[source_id]`. + # @!attribute [rw] finding_id + # @return [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be alphanumeric and less than or equal to 32 characters and + # greater than 0 characters in length. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # Required. The Finding being created. The name and security_marks will be + # ignored as they are both output only fields on this resource. + class CreateFindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a mute config. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new mute configs's parent. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] mute_config + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # Required. The mute config being created. + # @!attribute [rw] mute_config_id + # @return [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + class CreateMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to create single resource value config + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # @!attribute [rw] resource_value_config + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # Required. The resource value config being created. + class CreateResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to create multiple resource value configs + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # The parent field in the CreateResourceValueConfigRequest + # messages must either be empty or match this field. + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest>] + # Required. The resource value configs to be created. + class BatchCreateResourceValueConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BatchCreateResourceValueConfigs + # @!attribute [rw] resource_value_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # The resource value configs created + class BatchCreateResourceValueConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete resource value config + # @!attribute [rw] name + # @return [::String] + # Required. Name of the ResourceValueConfig to delete + class DeleteResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to get resource value config + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource value config to retrieve. Its format is + # `organizations/{organization}/resourceValueConfigs/{config_id}`. + class GetResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to list resource value configs of a parent + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns the collection of resource value configs. + # Its format is + # `organizations/[organization_id]` + # @!attribute [rw] page_size + # @return [::Integer] + # The number of results to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListResourceValueConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListResourceValueConfigs` must match the call that provided the + # page token. + # + # page_size can be specified, and the new page_size will be used. + class ListResourceValueConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message to list resource value configs + # @!attribute [rw] resource_value_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] + # The resource value configs from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is empty, there are no subsequent pages. + class ListResourceValueConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to update resource value config + # @!attribute [rw] resource_value_config + # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] + # Required. The resource value config being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + class UpdateResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a notification config. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new notification config's parent. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] config_id + # @return [::String] + # Required. + # Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters and contain alphanumeric + # characters, underscores, or hyphens only. + # @!attribute [rw] notification_config + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # Required. The notification config being created. The name and the service + # account will be ignored as they are both output only fields on this + # resource. + class CreateNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating Security Health Analytics custom modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new custom module's parent. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @!attribute [rw] security_health_analytics_custom_module + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # Required. SecurityHealthAnalytics custom module to create. The provided + # name is ignored and reset with provided parent information and + # server-generated ID. + class CreateSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a source. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new source's parent. Its format should be + # `organizations/[organization_id]`. + # @!attribute [rw] source + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # Required. The Source being created, only the display_name and description + # will be used. All other fields will be ignored. + class CreateSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a mute config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the mute config to delete. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + class DeleteMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a notification config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the notification config to delete. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + class DeleteNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting Security Health Analytics custom modules. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the custom module to delete. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + class DeleteSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for retrieving a BigQuery export. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the BigQuery export to retrieve. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + class GetBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for retrieving a mute config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the mute config to retrieve. Its format is + # `organizations/{organization}/muteConfigs/{config_id}`, + # `folders/{folder}/muteConfigs/{config_id}`, + # `projects/{project}/muteConfigs/{config_id}`, + # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, + # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or + # `projects/{project}/locations/global/muteConfigs/{config_id}`. + class GetMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a notification config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the notification config to get. Its format is + # `organizations/[organization_id]/notificationConfigs/[config_id]`, + # `folders/[folder_id]/notificationConfigs/[config_id]`, + # or `projects/[project_id]/notificationConfigs/[config_id]`. + class GetNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting organization settings. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the organization to get organization settings for. Its + # format is `organizations/[organization_id]/organizationSettings`. + class GetOrganizationSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting effective Security Health Analytics custom + # modules. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the effective custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` + class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting Security Health Analytics custom modules. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the custom module to get. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, + # or + # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` + class GetSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a source. + # @!attribute [rw] name + # @return [::String] + # Required. Relative resource name of the source. Its format is + # `organizations/[organization_id]/source/[source_id]`. + class GetSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for grouping by assets. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent to group the assets by. Its format is + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @!attribute [rw] group_by + # @return [::String] + # Required. Expression that defines what assets fields to use for grouping. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: + # "security_center_properties.resource_project,security_center_properties.project". + # + # The following fields are supported when compare_duration is not set: + # + # * security_center_properties.resource_project + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_type + # * security_center_properties.resource_parent + # * security_center_properties.resource_parent_display_name + # + # The following fields are supported when compare_duration is set: + # + # * security_center_properties.resource_type + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_parent_display_name + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the GroupResult's "state_change" property is + # updated to indicate whether the asset was added, removed, or remained + # present during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at reference_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at reference_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and reference_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `GroupAssetsResponse`; indicates + # that this is a continuation of a prior `GroupAssets` call, and that the + # system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class GroupAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for grouping by assets. + # @!attribute [rw] group_by_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # Group results. There exists an element for each existing unique + # combination of property/values. The element contains a count for the number + # of times those specific property/values appear. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the groupBy request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of results matching the query. + class GroupAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for grouping by findings. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the source to groupBy. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, + # or `projects/{project_id}/sources/-` + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # @!attribute [rw] group_by + # @return [::String] + # Required. Expression that defines what assets fields to use for grouping + # (including `state_change`). The string value should follow SQL syntax: + # comma separated list of fields. For example: "parent,resource_name". + # + # The following fields are supported when compare_duration is set: + # + # * state_change + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the GroupResult's "state_change" attribute is + # updated to indicate whether the finding had its state changed, the + # finding's state remained unchanged, or if the finding was added during the + # compare_duration period of time that precedes the read_time. This is the + # time between (read_time - compare_duration) and read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present + # at read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class GroupFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for group by findings. + # @!attribute [rw] group_by_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupResult>] + # Group results. There exists an element for each existing unique + # combination of property/values. The element contains a count for the number + # of times those specific property/values appear. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the groupBy request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of results matching the query. + class GroupFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Result containing the properties and count of a groupBy request. + # @!attribute [rw] properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Properties matching the groupBy fields in the request. + # @!attribute [rw] count + # @return [::Integer] + # Total count of resources for the given properties. + class GroupResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class PropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for listing descendant Security Health Analytics custom + # modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list descendant custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last call indicating a continuation + class ListDescendantSecurityHealthAnalyticsCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing descendant Security Health Analytics custom + # modules. + # @!attribute [rw] security_health_analytics_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # Custom modules belonging to the requested parent and its descendants. + # @!attribute [rw] next_page_token + # @return [::String] + # If not empty, indicates that there may be more custom modules to be + # returned. + class ListDescendantSecurityHealthAnalyticsCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing the valued resources for a given simulation. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list valued resources. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # @!attribute [rw] filter + # @return [::String] + # The filter expression that filters the valued resources in the response. + # Supported fields: + # + # * `resource_value` supports = + # * `resource_type` supports = + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListValuedResourcesResponse`; indicates + # that this is a continuation of a prior `ListValuedResources` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The fields by which to order the valued resources response. + # + # Supported fields: + # + # * `exposed_score` + # + # * `resource_value` + # + # * `resource_type` + # + # * `resource` + # + # * `display_name` + # + # Values should be a comma separated list of fields. For example: + # `exposed_score,resource_value`. + # + # The default sorting order is descending. To specify ascending or descending + # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for + # example: `exposed_score DESC`. + class ListValuedResourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing the valued resources for a given simulation. + # @!attribute [rw] valued_resources + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ValuedResource>] + # The valued resources that the attack path simulation identified. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The estimated total number of results matching the query. + class ListValuedResourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing the attack paths for a given simulation or valued + # resource. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list attack paths. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @!attribute [rw] filter + # @return [::String] + # The filter expression that filters the attack path in the response. + # Supported fields: + # + # * `valued_resources` supports = + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListAttackPathsResponse`; indicates + # that this is a continuation of a prior `ListAttackPaths` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListAttackPathsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing the attack paths for a given simulation or + # valued resource. + # @!attribute [rw] attack_paths + # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath>] + # The attack paths that the attack path simulation identified. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + class ListAttackPathsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting simulation. + # Simulation name can include "latest" to retrieve the latest simulation + # For example, "organizations/123/simulations/latest" + # @!attribute [rw] name + # @return [::String] + # Required. The organization name or simulation name of this simulation + # + # Valid format: + # `organizations/{organization}/simulations/latest` + # `organizations/{organization}/simulations/{simulation}` + class GetSimulationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a valued resource. + # @!attribute [rw] name + # @return [::String] + # Required. The name of this valued resource + # + # Valid format: + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + class GetValuedResourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing mute configs at a given scope e.g. organization, + # folder or project. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns the collection of mute configs. Its format + # is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListMuteConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMuteConfigs` must + # match the call that provided the page token. + class ListMuteConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing mute configs. + # @!attribute [rw] mute_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V1::MuteConfig>] + # The mute configs from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListMuteConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing notification configs. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent in which to list the notification + # configurations. Its format is "organizations/[organization_id]", + # "folders/[folder_id]", or "projects/[project_id]". + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListNotificationConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing notification configs. + # @!attribute [rw] notification_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] + # Notification configs belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + class ListNotificationConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing effective Security Health Analytics custom + # modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list effective custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last call indicating a continuation + class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing effective Security Health Analytics custom + # modules. + # @!attribute [rw] effective_security_health_analytics_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # Effective custom modules belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # If not empty, indicates that there may be more effective custom modules to + # be returned. + class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing Security Health Analytics custom modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list custom modules. Its format is + # `organizations/{organization}/securityHealthAnalyticsSettings`, + # `folders/{folder}/securityHealthAnalyticsSettings`, or + # `projects/{project}/securityHealthAnalyticsSettings` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last call indicating a continuation + class ListSecurityHealthAnalyticsCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing Security Health Analytics custom modules. + # @!attribute [rw] security_health_analytics_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] + # Custom modules belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # If not empty, indicates that there may be more custom modules to be + # returned. + class ListSecurityHealthAnalyticsCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing sources. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent of sources to list. Its format should + # be `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing sources. + # @!attribute [rw] sources + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Source>] + # Sources belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + class ListSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing assets. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource that contains the assets. The + # value that you can specify on parent depends on the method in which you + # specify parent. You can specify one of the following values: + # `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following are the allowed field and operator combinations: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @!attribute [rw] order_by + # @return [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,resource_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,resource_properties.a_property" and " + # name desc , resource_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # update_time + # resource_properties + # security_marks.marks + # security_center_properties.resource_name + # security_center_properties.resource_display_name + # security_center_properties.resource_parent + # security_center_properties.resource_parent_display_name + # security_center_properties.resource_project + # security_center_properties.resource_project_display_name + # security_center_properties.resource_type + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the ListAssetsResult's "state_change" + # attribute is updated to indicate whether the asset was added, removed, or + # remained present during the compare_duration period of time that precedes + # the read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at read_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at read_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # A field mask to specify the ListAssetsResult fields to be listed in the + # response. + # An empty field mask will list all fields. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListAssetsResponse`; indicates + # that this is a continuation of a prior `ListAssets` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing assets. + # @!attribute [rw] list_assets_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] + # Assets matching the list request. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the list request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of assets matching the query. + class ListAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Result containing the Asset and its State. + # @!attribute [rw] asset + # @return [::Google::Cloud::SecurityCenter::V1::Asset] + # Asset matching the search request. + # @!attribute [rw] state_change + # @return [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult::StateChange] + # State change of the asset between the points in time. + class ListAssetsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The change in state of the asset. + # + # When querying across two points in time this describes + # the change between the two points: ADDED, REMOVED, or ACTIVE. + # If there was no compare_duration supplied in the request the state change + # will be: UNUSED + module StateChange + # State change is unused, this is the canonical default for this enum. + UNUSED = 0 + + # Asset was added between the points in time. + ADDED = 1 + + # Asset was removed between the points in time. + REMOVED = 2 + + # Asset was present at both point(s) in time. + ACTIVE = 3 + end + end + end + + # Request message for listing findings. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the source the findings belong to. Its format is + # `organizations/[organization_id]/sources/[source_id]`, + # `folders/[folder_id]/sources/[source_id]`, or + # `projects/[project_id]/sources/[source_id]`. To list across all sources + # provide a source_id of `-`. For example: + # `organizations/{organization_id}/sources/-`, + # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * workflow_state: `=`, `:` + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.display_name: `=`, `:` + # @!attribute [rw] order_by + # @return [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,source_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,source_properties.a_property" and " + # name desc , source_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # source_properties + # security_marks.marks + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the ListFindingsResult's "state_change" + # attribute is updated to indicate whether the finding had its state changed, + # the finding's state remained unchanged, or if the finding was added in any + # state during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present at + # read_time. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing findings. + # @!attribute [rw] list_findings_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] + # Findings matching the list request. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the list request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of findings matching the query. + class ListFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Result containing the Finding and its StateChange. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # Finding matching the search request. + # @!attribute [rw] state_change + # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult::StateChange] + # State change of the finding between the points in time. + # @!attribute [r] resource + # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult::Resource] + # Output only. Resource that is associated with this finding. + class ListFindingsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information related to the Google Cloud resource that is + # associated with this finding. + # @!attribute [rw] name + # @return [::String] + # The full resource name of the resource. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] display_name + # @return [::String] + # The human readable name of the resource. + # @!attribute [rw] type + # @return [::String] + # The full resource type of the resource. + # @!attribute [rw] project_name + # @return [::String] + # The full resource name of project that the resource belongs to. + # @!attribute [rw] project_display_name + # @return [::String] + # The project ID that the resource belongs to. + # @!attribute [rw] parent_name + # @return [::String] + # The full resource name of resource's parent. + # @!attribute [rw] parent_display_name + # @return [::String] + # The human readable name of resource's parent. + # @!attribute [rw] folders + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] + # Contains a Folder message for each folder in the assets ancestry. + # The first folder is the deepest nested folder, and the last folder is + # the folder directly under the Organization. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] + # Indicates which cloud provider the finding is from. + # @!attribute [rw] organization + # @return [::String] + # Indicates which organization / tenant the finding is for. + # @!attribute [rw] service + # @return [::String] + # The service or resource provider associated with the resource. + # @!attribute [rw] location + # @return [::String] + # The region or location of the service (if applicable). + # @!attribute [rw] aws_metadata + # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata] + # The AWS metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] azure_metadata + # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata] + # The Azure metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `azure_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resource_path + # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath] + # Provides the path to the resource within the resource hierarchy. + # @!attribute [rw] resource_path_string + # @return [::String] + # A string representation of the resource path. + # For Google Cloud, it has the format of + # `org/{organization_id}/folder/{folder_id}/folder/{folder_id}/project/{project_id}` + # where there can be any number of folders. + # For AWS, it has the format of + # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` + # where there can be any number of organizational units. + # For Azure, it has the format of + # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` + # where there can be any number of management groups. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The change in state of the finding. + # + # When querying across two points in time this describes + # the change in the finding between the two points: CHANGED, UNCHANGED, + # ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that + # the finding at timestamp does not match the filter specified, but it did + # at timestamp - compare_duration. If there was no compare_duration + # supplied in the request the state change will be: UNUSED + module StateChange + # State change is unused, this is the canonical default for this enum. + UNUSED = 0 + + # The finding has changed state in some way between the points in time + # and existed at both points. + CHANGED = 1 + + # The finding has not changed state between the points in time and + # existed at both points. + UNCHANGED = 2 + + # The finding was created between the points in time. + ADDED = 3 + + # The finding at timestamp does not match the filter specified, but it + # did at timestamp - compare_duration. + REMOVED = 4 + end + end + end + + # Request message for updating a finding's state. + # @!attribute [rw] name + # @return [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1::Finding::State] + # Required. The desired State of the finding. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Required. The time at which the updated state takes effect. + class SetFindingStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a finding's mute status. + # @!attribute [rw] name + # @return [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. Example: + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, + # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + # @!attribute [rw] mute + # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] + # Required. The desired state of the Mute. + class SetMuteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for running asset discovery for an organization. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the organization to run asset discovery for. Its format + # is `organizations/[organization_id]`. + class RunAssetDiscoveryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to simulate a CustomConfig against a given test resource. + # Maximum size of the request is 4 MB by default. + # @!attribute [rw] parent + # @return [::String] + # Required. The relative resource name of the organization, project, or + # folder. For more information about relative resource names, see [Relative + # Resource + # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # Example: `organizations/{organization_id}` + # @!attribute [rw] custom_config + # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] + # Required. The custom configuration that you need to test. + # @!attribute [rw] resource + # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource] + # Required. Resource data to simulate custom module against. + class SimulateSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Manually constructed resource name. If the custom module evaluates against + # only the resource data, you can omit the `iam_policy_data` field. If it + # evaluates only the `iam_policy_data` field, you can omit the resource data. + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the resource, for example, + # `compute.googleapis.com/Disk`. + # @!attribute [rw] resource_data + # @return [::Google::Protobuf::Struct] + # Optional. A representation of the Google Cloud resource. Should match the + # Google Cloud resource JSON format. + # @!attribute [rw] iam_policy_data + # @return [::Google::Iam::V1::Policy] + # Optional. A representation of the IAM policy. + class SimulatedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for simulating a `SecurityHealthAnalyticsCustomModule` + # against a given resource. + # @!attribute [rw] result + # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse::SimulatedResult] + # Result for test case in the corresponding request. + class SimulateSecurityHealthAnalyticsCustomModuleResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible test result. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # Finding that would be published for the test case, + # if a violation is detected. + # + # Note: The following fields are mutually exclusive: `finding`, `no_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] no_violation + # @return [::Google::Protobuf::Empty] + # Indicates that the test case does not trigger any violation. + # + # Note: The following fields are mutually exclusive: `no_violation`, `finding`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Error encountered during the test. + # + # Note: The following fields are mutually exclusive: `error`, `finding`, `no_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SimulatedResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for updating a ExternalSystem resource. + # @!attribute [rw] external_system + # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] + # Required. The external system resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the external system resource. + # + # If empty all mutable fields will be updated. + class UpdateExternalSystemRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating or creating a finding. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1::Finding] + # Required. The finding resource to update or create if it does not already + # exist. parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + class UpdateFindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a mute config. + # @!attribute [rw] mute_config + # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] + # Required. The mute config being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + class UpdateMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a notification config. + # @!attribute [rw] notification_config + # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] + # Required. The notification config to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + class UpdateNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating an organization's settings. + # @!attribute [rw] organization_settings + # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] + # Required. The organization settings resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the settings resource. + # + # If empty all mutable fields will be updated. + class UpdateOrganizationSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating Security Health Analytics custom modules. + # @!attribute [rw] security_health_analytics_custom_module + # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] + # Required. The SecurityHealthAnalytics custom module to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. The only fields that can be updated are + # `enablement_state` and `custom_config`. If empty or set to the wildcard + # value `*`, both `enablement_state` and `custom_config` are updated. + class UpdateSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a source. + # @!attribute [rw] source + # @return [::Google::Cloud::SecurityCenter::V1::Source] + # Required. The source resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + class UpdateSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a SecurityMarks resource. + # @!attribute [rw] security_marks + # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] + # Required. The security marks resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the updated SecurityMarks take effect. + # If not set uses current server time. Updates will be applied to the + # SecurityMarks that are active immediately preceding this time. Must be + # earlier or equal to the server time. + class UpdateSecurityMarksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a BigQuery export. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource of the new BigQuery export. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] big_query_export + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # Required. The BigQuery export being created. + # @!attribute [rw] big_query_export_id + # @return [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + class CreateBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a BigQuery export. + # @!attribute [rw] big_query_export + # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] + # Required. The BigQuery export being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + class UpdateBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing BigQuery exports at a given scope e.g. + # organization, folder or project. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns the collection of BigQuery exports. Its + # format is `organizations/[organization_id]`, `folders/[folder_id]`, + # `projects/[project_id]`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListBigQueryExports` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListBigQueryExports` + # must match the call that provided the page token. + class ListBigQueryExportsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing BigQuery exports. + # @!attribute [rw] big_query_exports + # @return [::Array<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] + # The BigQuery exports from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListBigQueryExportsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a BigQuery export. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the BigQuery export to delete. Its format is + # `organizations/{organization}/bigQueryExports/{export_id}`, + # `folders/{folder}/bigQueryExports/{export_id}`, or + # `projects/{project}/bigQueryExports/{export_id}` + class DeleteBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create an Event Threat Detection custom module. + # @!attribute [rw] parent + # @return [::String] + # Required. The new custom module's parent. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @!attribute [rw] event_threat_detection_custom_module + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # Required. The module to create. The + # event_threat_detection_custom_module.name will be ignored and server + # generated. + class CreateEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to validate an Event Threat Detection custom module. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent to validate the Custom Module under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @!attribute [rw] raw_text + # @return [::String] + # Required. The raw text of the module's contents. Used to generate error + # messages. + # @!attribute [rw] type + # @return [::String] + # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + class ValidateEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to validating an Event Threat Detection custom module. + # @!attribute [rw] errors + # @return [::Google::Cloud::SecurityCenter::V1::CustomModuleValidationErrors] + # A list of errors returned by the validator. If the list is empty, there + # were no errors. + class ValidateEventThreatDetectionCustomModuleResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete an Event Threat Detection custom module. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the custom module to delete. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + class DeleteEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get an Event Threat Detection custom module. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the custom module to get. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. + class GetEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list current and descendant resident Event Threat Detection custom + # modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous + # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListDescendantEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + class ListDescendantEventThreatDetectionCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for listing current and descendant resident + # Event Threat Detection custom modules. + # @!attribute [rw] event_threat_detection_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # Custom modules belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDescendantEventThreatDetectionCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list Event Threat Detection custom modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent to list custom modules under. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous + # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListEventThreatDetectionCustomModules` must match the call that provided + # the page token. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + class ListEventThreatDetectionCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for listing Event Threat Detection custom modules. + # @!attribute [rw] event_threat_detection_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] + # Custom modules belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListEventThreatDetectionCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update an Event Threat Detection custom module. + # @!attribute [rw] event_threat_detection_custom_module + # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] + # Required. The module being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + class UpdateEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get an EffectiveEventThreatDetectionCustomModule. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the effective Event Threat Detection custom + # module. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. + class GetEffectiveEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list effective Event Threat Detection custom modules. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent to list custom modules for. + # + # Its format is: + # + # * `organizations/{organization}/eventThreatDetectionSettings`. + # * `folders/{folder}/eventThreatDetectionSettings`. + # * `projects/{project}/eventThreatDetectionSettings`. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous + # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to + # retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListEffectiveEventThreatDetectionCustomModules` must match the call that + # provided the page token. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of modules to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + class ListEffectiveEventThreatDetectionCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for listing EffectiveEventThreatDetectionCustomModules. + # @!attribute [rw] effective_event_threat_detection_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] + # Effective custom modules belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListEffectiveEventThreatDetectionCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb new file mode 100644 index 000000000000..63924f12b411 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Attack path simulation + # @!attribute [rw] name + # @return [::String] + # Full resource name of the Simulation: + # `organizations/123/simulations/456` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time simulation was created + # @!attribute [rw] resource_value_configs_metadata + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfigMetadata>] + # Resource value configurations' metadata used in this simulation. Maximum of + # 100. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] + # Indicates which cloud provider was used in this simulation. + class Simulation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb new file mode 100644 index 000000000000..4ccbdd08fd29 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Security Command Center finding source. A finding source + # is an entity or a mechanism that can produce a finding. A source is like a + # container of findings that come from the same scanner, logger, monitor, and + # other tools. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this source. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/sources/\\{source_id}" + # @!attribute [rw] display_name + # @return [::String] + # The source's display name. + # A source's display name must be unique amongst its siblings, for example, + # two sources with the same parent can't share the same display name. + # The display name must have a length between 1 and 64 characters + # (inclusive). + # @!attribute [rw] description + # @return [::String] + # The description of the source (max of 1024 characters). + # Example: + # "Web Security Scanner is a web security scanner for common + # vulnerabilities in App Engine applications. It can automatically + # scan and detect four common vulnerabilities, including cross-site-scripting + # (XSS), Flash injection, mixed content (HTTP in HTTPS), and + # outdated or insecure libraries." + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the finding source. It's either + # "organizations/\\{organization_id}/sources/\\{source_id}", + # "folders/\\{folder_id}/sources/\\{source_id}", or + # "projects/\\{project_number}/sources/\\{source_id}", + # depending on the closest CRM ancestor of the resource associated with the + # finding. + class Source + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb new file mode 100644 index 000000000000..4ad02b3ce5f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1 + # Contains details about a group of security issues that, when the issues + # occur together, represent a greater risk than when the issues occur + # independently. A group of such issues is referred to as a toxic combination. + # @!attribute [rw] attack_exposure_score + # @return [::Float] + # The + # [Attack exposure + # score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) + # of this toxic combination. The score is a measure of how much this toxic + # combination exposes one or more high-value resources to potential attack. + # @!attribute [rw] related_findings + # @return [::Array<::String>] + # List of resource names of findings associated with this toxic combination. + # For example, `organizations/123/sources/456/findings/789`. + class ToxicCombination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb new file mode 100644 index 000000000000..1cd95d5b43f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # A resource that is determined to have value to a user's system + # @!attribute [rw] name + # @return [::String] + # Valued resource name, for example, + # e.g.: + # `organizations/123/simulations/456/valuedResources/789` + # @!attribute [rw] resource + # @return [::String] + # The + # [full resource + # name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + # of the valued resource. + # @!attribute [rw] resource_type + # @return [::String] + # The [resource + # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # of the valued resource. + # @!attribute [rw] display_name + # @return [::String] + # Human-readable name of the valued resource. + # @!attribute [rw] resource_value + # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource::ResourceValue] + # How valuable this resource is. + # @!attribute [rw] exposed_score + # @return [::Float] + # Exposed score for this valued resource. A value of 0 means no exposure was + # detected exposure. + # @!attribute [rw] resource_value_configs_used + # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfigMetadata>] + # List of resource value configurations' metadata used to determine the value + # of this resource. Maximum of 100. + class ValuedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How valuable the resource is. + module ResourceValue + # The resource value isn't specified. + RESOURCE_VALUE_UNSPECIFIED = 0 + + # This is a low-value resource. + RESOURCE_VALUE_LOW = 1 + + # This is a medium-value resource. + RESOURCE_VALUE_MEDIUM = 2 + + # This is a high-value resource. + RESOURCE_VALUE_HIGH = 3 + end + end + + # Metadata about a ResourceValueConfig. For example, id and name. + # @!attribute [rw] name + # @return [::String] + # Resource value config name + class ResourceValueConfigMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb new file mode 100644 index 000000000000..aadd507c0a50 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb @@ -0,0 +1,336 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Refers to common vulnerability fields e.g. cve, cvss, cwe etc. + # @!attribute [rw] cve + # @return [::Google::Cloud::SecurityCenter::V1::Cve] + # CVE stands for Common Vulnerabilities and Exposures + # (https://cve.mitre.org/about/) + # @!attribute [rw] offending_package + # @return [::Google::Cloud::SecurityCenter::V1::Package] + # The offending package is relevant to the finding. + # @!attribute [rw] fixed_package + # @return [::Google::Cloud::SecurityCenter::V1::Package] + # The fixed package is relevant to the finding. + # @!attribute [rw] security_bulletin + # @return [::Google::Cloud::SecurityCenter::V1::SecurityBulletin] + # The security bulletin is relevant to this finding. + class Vulnerability + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CVE stands for Common Vulnerabilities and Exposures. + # Information from the [CVE + # record](https://www.cve.org/ResourcesSupport/Glossary) that describes this + # vulnerability. + # @!attribute [rw] id + # @return [::String] + # The unique identifier for the vulnerability. e.g. CVE-2021-34527 + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::SecurityCenter::V1::Reference>] + # Additional information about the CVE. + # e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 + # @!attribute [rw] cvssv3 + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3] + # Describe Common Vulnerability Scoring System specified at + # https://www.first.org/cvss/v3.1/specification-document + # @!attribute [rw] upstream_fix_available + # @return [::Boolean] + # Whether upstream fix is available for the CVE. + # @!attribute [rw] impact + # @return [::Google::Cloud::SecurityCenter::V1::Cve::RiskRating] + # The potential impact of the vulnerability if it was to be exploited. + # @!attribute [rw] exploitation_activity + # @return [::Google::Cloud::SecurityCenter::V1::Cve::ExploitationActivity] + # The exploitation activity of the vulnerability in the wild. + # @!attribute [rw] observed_in_the_wild + # @return [::Boolean] + # Whether or not the vulnerability has been observed in the wild. + # @!attribute [rw] zero_day + # @return [::Boolean] + # Whether or not the vulnerability was zero day when the finding was + # published. + # @!attribute [rw] exploit_release_date + # @return [::Google::Protobuf::Timestamp] + # Date the first publicly available exploit or PoC was released. + class Cve + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible values of impact of the vulnerability if it was to be + # exploited. + module RiskRating + # Invalid or empty value. + RISK_RATING_UNSPECIFIED = 0 + + # Exploitation would have little to no security impact. + LOW = 1 + + # Exploitation would enable attackers to perform activities, or could allow + # attackers to have a direct impact, but would require additional steps. + MEDIUM = 2 + + # Exploitation would enable attackers to have a notable direct impact + # without needing to overcome any major mitigating factors. + HIGH = 3 + + # Exploitation would fundamentally undermine the security of affected + # systems, enable actors to perform significant attacks with minimal + # effort, with little to no mitigating factors to overcome. + CRITICAL = 4 + end + + # The possible values of exploitation activity of the vulnerability in the + # wild. + module ExploitationActivity + # Invalid or empty value. + EXPLOITATION_ACTIVITY_UNSPECIFIED = 0 + + # Exploitation has been reported or confirmed to widely occur. + WIDE = 1 + + # Limited reported or confirmed exploitation activities. + CONFIRMED = 2 + + # Exploit is publicly available. + AVAILABLE = 3 + + # No known exploitation activity, but has a high potential for + # exploitation. + ANTICIPATED = 4 + + # No known exploitation activity. + NO_KNOWN = 5 + end + end + + # Additional Links + # @!attribute [rw] source + # @return [::String] + # Source of the reference e.g. NVD + # @!attribute [rw] uri + # @return [::String] + # Uri for the mentioned source e.g. + # https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. + class Reference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Common Vulnerability Scoring System version 3. + # @!attribute [rw] base_score + # @return [::Float] + # The base score is a function of the base metric scores. + # @!attribute [rw] attack_vector + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::AttackVector] + # Base Metrics + # Represents the intrinsic characteristics of a vulnerability that are + # constant over time and across user environments. + # This metric reflects the context by which vulnerability exploitation is + # possible. + # @!attribute [rw] attack_complexity + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::AttackComplexity] + # This metric describes the conditions beyond the attacker's control that + # must exist in order to exploit the vulnerability. + # @!attribute [rw] privileges_required + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::PrivilegesRequired] + # This metric describes the level of privileges an attacker must possess + # before successfully exploiting the vulnerability. + # @!attribute [rw] user_interaction + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::UserInteraction] + # This metric captures the requirement for a human user, other than the + # attacker, to participate in the successful compromise of the vulnerable + # component. + # @!attribute [rw] scope + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Scope] + # The Scope metric captures whether a vulnerability in one vulnerable + # component impacts resources in components beyond its security scope. + # @!attribute [rw] confidentiality_impact + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] + # This metric measures the impact to the confidentiality of the information + # resources managed by a software component due to a successfully exploited + # vulnerability. + # @!attribute [rw] integrity_impact + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] + # This metric measures the impact to integrity of a successfully exploited + # vulnerability. + # @!attribute [rw] availability_impact + # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] + # This metric measures the impact to the availability of the impacted + # component resulting from a successfully exploited vulnerability. + class Cvssv3 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This metric reflects the context by which vulnerability exploitation is + # possible. + module AttackVector + # Invalid value. + ATTACK_VECTOR_UNSPECIFIED = 0 + + # The vulnerable component is bound to the network stack and the set of + # possible attackers extends beyond the other options listed below, up to + # and including the entire Internet. + ATTACK_VECTOR_NETWORK = 1 + + # The vulnerable component is bound to the network stack, but the attack is + # limited at the protocol level to a logically adjacent topology. + ATTACK_VECTOR_ADJACENT = 2 + + # The vulnerable component is not bound to the network stack and the + # attacker's path is via read/write/execute capabilities. + ATTACK_VECTOR_LOCAL = 3 + + # The attack requires the attacker to physically touch or manipulate the + # vulnerable component. + ATTACK_VECTOR_PHYSICAL = 4 + end + + # This metric describes the conditions beyond the attacker's control that + # must exist in order to exploit the vulnerability. + module AttackComplexity + # Invalid value. + ATTACK_COMPLEXITY_UNSPECIFIED = 0 + + # Specialized access conditions or extenuating circumstances do not exist. + # An attacker can expect repeatable success when attacking the vulnerable + # component. + ATTACK_COMPLEXITY_LOW = 1 + + # A successful attack depends on conditions beyond the attacker's control. + # That is, a successful attack cannot be accomplished at will, but requires + # the attacker to invest in some measurable amount of effort in preparation + # or execution against the vulnerable component before a successful attack + # can be expected. + ATTACK_COMPLEXITY_HIGH = 2 + end + + # This metric describes the level of privileges an attacker must possess + # before successfully exploiting the vulnerability. + module PrivilegesRequired + # Invalid value. + PRIVILEGES_REQUIRED_UNSPECIFIED = 0 + + # The attacker is unauthorized prior to attack, and therefore does not + # require any access to settings or files of the vulnerable system to + # carry out an attack. + PRIVILEGES_REQUIRED_NONE = 1 + + # The attacker requires privileges that provide basic user capabilities + # that could normally affect only settings and files owned by a user. + # Alternatively, an attacker with Low privileges has the ability to access + # only non-sensitive resources. + PRIVILEGES_REQUIRED_LOW = 2 + + # The attacker requires privileges that provide significant (e.g., + # administrative) control over the vulnerable component allowing access to + # component-wide settings and files. + PRIVILEGES_REQUIRED_HIGH = 3 + end + + # This metric captures the requirement for a human user, other than the + # attacker, to participate in the successful compromise of the vulnerable + # component. + module UserInteraction + # Invalid value. + USER_INTERACTION_UNSPECIFIED = 0 + + # The vulnerable system can be exploited without interaction from any user. + USER_INTERACTION_NONE = 1 + + # Successful exploitation of this vulnerability requires a user to take + # some action before the vulnerability can be exploited. + USER_INTERACTION_REQUIRED = 2 + end + + # The Scope metric captures whether a vulnerability in one vulnerable + # component impacts resources in components beyond its security scope. + module Scope + # Invalid value. + SCOPE_UNSPECIFIED = 0 + + # An exploited vulnerability can only affect resources managed by the same + # security authority. + SCOPE_UNCHANGED = 1 + + # An exploited vulnerability can affect resources beyond the security scope + # managed by the security authority of the vulnerable component. + SCOPE_CHANGED = 2 + end + + # The Impact metrics capture the effects of a successfully exploited + # vulnerability on the component that suffers the worst outcome that is most + # directly and predictably associated with the attack. + module Impact + # Invalid value. + IMPACT_UNSPECIFIED = 0 + + # High impact. + IMPACT_HIGH = 1 + + # Low impact. + IMPACT_LOW = 2 + + # No impact. + IMPACT_NONE = 3 + end + end + + # Package is a generic definition of a package. + # @!attribute [rw] package_name + # @return [::String] + # The name of the package where the vulnerability was detected. + # @!attribute [rw] cpe_uri + # @return [::String] + # The CPE URI where the vulnerability was detected. + # @!attribute [rw] package_type + # @return [::String] + # Type of package, for example, os, maven, or go. + # @!attribute [rw] package_version + # @return [::String] + # The version of the package. + class Package + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SecurityBulletin are notifications of vulnerabilities of Google products. + # @!attribute [rw] bulletin_id + # @return [::String] + # ID of the bulletin corresponding to the vulnerability. + # @!attribute [rw] submission_time + # @return [::Google::Protobuf::Timestamp] + # Submission time of this Security Bulletin. + # @!attribute [rw] suggested_upgrade_version + # @return [::String] + # This represents a version that the cluster receiving this notification + # should be upgraded to, based on its current version. For example, 1.15.0 + class SecurityBulletin + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile new file mode 100644 index 000000000000..f16288a177ba --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-security_center-v1", path: "../" +else + gem "google-cloud-security_center-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb new file mode 100644 index 000000000000..62423aec31af --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the batch_create_resource_value_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs. +# +def batch_create_resource_value_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new + + # Call the batch_create_resource_value_configs method. + result = client.batch_create_resource_value_configs request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb new file mode 100644 index 000000000000..93db8d1e0876 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the bulk_mute_findings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings. +# +def bulk_mute_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new + + # Call the bulk_mute_findings method. + result = client.bulk_mute_findings request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb new file mode 100644 index 000000000000..be92178bf7b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export. +# +def create_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new + + # Call the create_big_query_export method. + result = client.create_big_query_export request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..08036d256638 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module. +# +def create_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new + + # Call the create_event_threat_detection_custom_module method. + result = client.create_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb new file mode 100644 index 000000000000..0b195fb59e80 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_finding call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding. +# +def create_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new + + # Call the create_finding method. + result = client.create_finding request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb new file mode 100644 index 000000000000..7c91c84d013c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config. +# +def create_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new + + # Call the create_mute_config method. + result = client.create_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb new file mode 100644 index 000000000000..9d25cf280532 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config. +# +def create_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new + + # Call the create_notification_config method. + result = client.create_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..5de06ad0e47b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module. +# +def create_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the create_security_health_analytics_custom_module method. + result = client.create_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb new file mode 100644 index 000000000000..426ebeba8ec5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_CreateSource_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the create_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source. +# +def create_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new + + # Call the create_source method. + result = client.create_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb new file mode 100644 index 000000000000..e549c6d67597 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export. +# +def delete_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new + + # Call the delete_big_query_export method. + result = client.delete_big_query_export request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..9da872ba42f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module. +# +def delete_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new + + # Call the delete_event_threat_detection_custom_module method. + result = client.delete_event_threat_detection_custom_module request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb new file mode 100644 index 000000000000..ea8a60533934 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config. +# +def delete_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new + + # Call the delete_mute_config method. + result = client.delete_mute_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb new file mode 100644 index 000000000000..6bc88e7ff81e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config. +# +def delete_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new + + # Call the delete_notification_config method. + result = client.delete_notification_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb new file mode 100644 index 000000000000..a39d9a23c8fd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_resource_value_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config. +# +def delete_resource_value_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new + + # Call the delete_resource_value_config method. + result = client.delete_resource_value_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..946a821c16e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module. +# +def delete_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the delete_security_health_analytics_custom_module method. + result = client.delete_security_health_analytics_custom_module request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb new file mode 100644 index 000000000000..1c58bd5b0d78 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export. +# +def get_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new + + # Call the get_big_query_export method. + result = client.get_big_query_export request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..be112113b672 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module. +# +def get_effective_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new + + # Call the get_effective_event_threat_detection_custom_module method. + result = client.get_effective_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..7db2ddb3ecfc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module. +# +def get_effective_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the get_effective_security_health_analytics_custom_module method. + result = client.get_effective_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..ec5742081391 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module. +# +def get_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new + + # Call the get_event_threat_detection_custom_module method. + result = client.get_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb new file mode 100644 index 000000000000..2b9a6db77e1e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_iam_policy call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb new file mode 100644 index 000000000000..48df3fdf3201 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config. +# +def get_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new + + # Call the get_mute_config method. + result = client.get_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb new file mode 100644 index 000000000000..6b5a3b4c0d68 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config. +# +def get_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new + + # Call the get_notification_config method. + result = client.get_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb new file mode 100644 index 000000000000..b4b9f24ba65c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_organization_settings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings. +# +def get_organization_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new + + # Call the get_organization_settings method. + result = client.get_organization_settings request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb new file mode 100644 index 000000000000..d40c67a9eba0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_resource_value_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config. +# +def get_resource_value_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new + + # Call the get_resource_value_config method. + result = client.get_resource_value_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..a4f9f8ef3f19 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module. +# +def get_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the get_security_health_analytics_custom_module method. + result = client.get_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb new file mode 100644 index 000000000000..c0a1d22fa00d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetSimulation_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_simulation call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation. +# +def get_simulation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new + + # Call the get_simulation method. + result = client.get_simulation request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetSimulation_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb new file mode 100644 index 000000000000..bd7c16821102 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetSource_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source. +# +def get_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new + + # Call the get_source method. + result = client.get_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb new file mode 100644 index 000000000000..8c1d07bdc6de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the get_valued_resource call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource. +# +def get_valued_resource + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new + + # Call the get_valued_resource method. + result = client.get_valued_resource request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb new file mode 100644 index 000000000000..ae956d56813e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the group_assets call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets. +# +def group_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new + + # Call the group_assets method. + result = client.group_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb new file mode 100644 index 000000000000..c4786c15f09b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the group_findings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings. +# +def group_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new + + # Call the group_findings method. + result = client.group_findings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb new file mode 100644 index 000000000000..ceeaebf8d86d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListAssets_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_assets call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets. +# +def list_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new + + # Call the list_assets method. + result = client.list_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb new file mode 100644 index 000000000000..5862a15cff4a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_attack_paths call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths. +# +def list_attack_paths + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new + + # Call the list_attack_paths method. + result = client.list_attack_paths request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb new file mode 100644 index 000000000000..3746c178ec2f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_big_query_exports call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports. +# +def list_big_query_exports + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new + + # Call the list_big_query_exports method. + result = client.list_big_query_exports request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb new file mode 100644 index 000000000000..5dacc91c28be --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules. +# +def list_descendant_event_threat_detection_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new + + # Call the list_descendant_event_threat_detection_custom_modules method. + result = client.list_descendant_event_threat_detection_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb new file mode 100644 index 000000000000..5f821c75b303 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules. +# +def list_descendant_security_health_analytics_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new + + # Call the list_descendant_security_health_analytics_custom_modules method. + result = client.list_descendant_security_health_analytics_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb new file mode 100644 index 000000000000..39414a8834dd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules. +# +def list_effective_event_threat_detection_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new + + # Call the list_effective_event_threat_detection_custom_modules method. + result = client.list_effective_event_threat_detection_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb new file mode 100644 index 000000000000..964e57448ce6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules. +# +def list_effective_security_health_analytics_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new + + # Call the list_effective_security_health_analytics_custom_modules method. + result = client.list_effective_security_health_analytics_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb new file mode 100644 index 000000000000..41b6dd7a76c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules. +# +def list_event_threat_detection_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new + + # Call the list_event_threat_detection_custom_modules method. + result = client.list_event_threat_detection_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb new file mode 100644 index 000000000000..57fb4cae4392 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListFindings_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_findings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings. +# +def list_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new + + # Call the list_findings method. + result = client.list_findings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb new file mode 100644 index 000000000000..eb1fdb03d97d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_mute_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs. +# +def list_mute_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new + + # Call the list_mute_configs method. + result = client.list_mute_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb new file mode 100644 index 000000000000..b7b5eee3314f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_notification_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs. +# +def list_notification_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new + + # Call the list_notification_configs method. + result = client.list_notification_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb new file mode 100644 index 000000000000..251454a75ea0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_resource_value_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs. +# +def list_resource_value_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new + + # Call the list_resource_value_configs method. + result = client.list_resource_value_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb new file mode 100644 index 000000000000..1c67c25b10d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules. +# +def list_security_health_analytics_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new + + # Call the list_security_health_analytics_custom_modules method. + result = client.list_security_health_analytics_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb new file mode 100644 index 000000000000..c97a5da2a253 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListSources_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_sources call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources. +# +def list_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new + + # Call the list_sources method. + result = client.list_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb new file mode 100644 index 000000000000..2dfc8bf0281c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the list_valued_resources call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources. +# +def list_valued_resources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new + + # Call the list_valued_resources method. + result = client.list_valued_resources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. + p item + end +end +# [END securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb new file mode 100644 index 000000000000..b4992daa0dfc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the run_asset_discovery call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery. +# +def run_asset_discovery + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new + + # Call the run_asset_discovery method. + result = client.run_asset_discovery request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb new file mode 100644 index 000000000000..46ec0d32e12b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the set_finding_state call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state. +# +def set_finding_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new + + # Call the set_finding_state method. + result = client.set_finding_state request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb new file mode 100644 index 000000000000..61c6f0c2658c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the set_iam_policy call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb new file mode 100644 index 000000000000..0d8d48794099 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_SetMute_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the set_mute call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute. +# +def set_mute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new + + # Call the set_mute method. + result = client.set_mute request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_SetMute_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..6573cca21b08 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module. +# +def simulate_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the simulate_security_health_analytics_custom_module method. + result = client.simulate_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb new file mode 100644 index 000000000000..2beb6f525829 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the test_iam_permissions call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb new file mode 100644 index 000000000000..64a07908fd64 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export. +# +def update_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new + + # Call the update_big_query_export method. + result = client.update_big_query_export request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..20ba7f0b690c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module. +# +def update_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new + + # Call the update_event_threat_detection_custom_module method. + result = client.update_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb new file mode 100644 index 000000000000..4ec047a6fb39 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_external_system call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system. +# +def update_external_system + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new + + # Call the update_external_system method. + result = client.update_external_system request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb new file mode 100644 index 000000000000..39355b256e0d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_finding call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding. +# +def update_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new + + # Call the update_finding method. + result = client.update_finding request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb new file mode 100644 index 000000000000..aa233b884d74 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config. +# +def update_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new + + # Call the update_mute_config method. + result = client.update_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb new file mode 100644 index 000000000000..f976002b3515 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config. +# +def update_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new + + # Call the update_notification_config method. + result = client.update_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb new file mode 100644 index 000000000000..a4f402013e90 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_organization_settings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings. +# +def update_organization_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new + + # Call the update_organization_settings method. + result = client.update_organization_settings request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb new file mode 100644 index 000000000000..40a21d5efc16 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_resource_value_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config. +# +def update_resource_value_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new + + # Call the update_resource_value_config method. + result = client.update_resource_value_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..8e83edf227ea --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_security_health_analytics_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module. +# +def update_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the update_security_health_analytics_custom_module method. + result = client.update_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb new file mode 100644 index 000000000000..04da82c1a94b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_security_marks call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks. +# +def update_security_marks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new + + # Call the update_security_marks method. + result = client.update_security_marks request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb new file mode 100644 index 000000000000..6f0ba52cd6f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the update_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source. +# +def update_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new + + # Call the update_source method. + result = client.update_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..31919bb29465 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center/v1" + +## +# Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module. +# +def validate_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new + + # Call the validate_event_threat_detection_custom_module method. + result = client.validate_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. + p result +end +# [END securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json b/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json new file mode 100644 index 000000000000..97ec18a5449f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json @@ -0,0 +1,2535 @@ +{ + "client_library": { + "name": "google-cloud-security_center-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.securitycenter.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync", + "title": "Snippet for the bulk_mute_findings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings.", + "file": "security_center/bulk_mute_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_mute_findings", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "BulkMuteFindings", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.BulkMuteFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the create_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module.", + "file": "security_center/create_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateSource_sync", + "title": "Snippet for the create_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source.", + "file": "security_center/create_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_source", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateSource", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateFinding_sync", + "title": "Snippet for the create_finding call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding.", + "file": "security_center/create_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_finding", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateFinding", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateFinding", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync", + "title": "Snippet for the create_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config.", + "file": "security_center/create_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateMuteConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync", + "title": "Snippet for the create_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config.", + "file": "security_center/create_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateNotificationConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync", + "title": "Snippet for the delete_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config.", + "file": "security_center/delete_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteMuteConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync", + "title": "Snippet for the delete_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config.", + "file": "security_center/delete_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteNotificationConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module.", + "file": "security_center/delete_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSimulation_sync", + "title": "Snippet for the get_simulation call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation.", + "file": "security_center/get_simulation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_simulation", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetSimulationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Simulation", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetSimulation", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSimulation", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync", + "title": "Snippet for the get_valued_resource call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource.", + "file": "security_center/get_valued_resource.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_valued_resource", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ValuedResource", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetValuedResource", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetValuedResource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync", + "title": "Snippet for the get_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export.", + "file": "security_center/get_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetBigQueryExport", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy.", + "file": "security_center/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicy", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync", + "title": "Snippet for the get_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config.", + "file": "security_center/get_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetMuteConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync", + "title": "Snippet for the get_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config.", + "file": "security_center/get_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetNotificationConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync", + "title": "Snippet for the get_organization_settings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings.", + "file": "security_center/get_organization_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_organization_settings", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::OrganizationSettings", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetOrganizationSettings", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module.", + "file": "security_center/get_effective_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_effective_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetEffectiveSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the get_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module.", + "file": "security_center/get_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSource_sync", + "title": "Snippet for the get_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source.", + "file": "security_center/get_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_source", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetSource", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GroupAssets_sync", + "title": "Snippet for the group_assets call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets.", + "file": "security_center/group_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "group_assets", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GroupAssets", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GroupAssets", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GroupFindings_sync", + "title": "Snippet for the group_findings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings.", + "file": "security_center/group_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "group_findings", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GroupFindings", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GroupFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListAssets_sync", + "title": "Snippet for the list_assets call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets.", + "file": "security_center/list_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_assets", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListAssetsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListAssets", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListAssets", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync", + "title": "Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules.", + "file": "security_center/list_descendant_security_health_analytics_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_descendant_security_health_analytics_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListDescendantSecurityHealthAnalyticsCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListDescendantSecurityHealthAnalyticsCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListFindings_sync", + "title": "Snippet for the list_findings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings.", + "file": "security_center/list_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_findings", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListFindingsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListFindings", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync", + "title": "Snippet for the list_mute_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs.", + "file": "security_center/list_mute_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_mute_configs", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListMuteConfigs", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListMuteConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync", + "title": "Snippet for the list_notification_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs.", + "file": "security_center/list_notification_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_notification_configs", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListNotificationConfigs", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListNotificationConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync", + "title": "Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules.", + "file": "security_center/list_effective_security_health_analytics_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_effective_security_health_analytics_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListEffectiveSecurityHealthAnalyticsCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveSecurityHealthAnalyticsCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync", + "title": "Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules.", + "file": "security_center/list_security_health_analytics_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_security_health_analytics_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListSecurityHealthAnalyticsCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListSecurityHealthAnalyticsCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListSources_sync", + "title": "Snippet for the list_sources call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources.", + "file": "security_center/list_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sources", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListSourcesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListSources", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListSources", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync", + "title": "Snippet for the run_asset_discovery call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery.", + "file": "security_center/run_asset_discovery.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_asset_discovery", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "RunAssetDiscovery", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscovery", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_SetFindingState_sync", + "title": "Snippet for the set_finding_state call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state.", + "file": "security_center/set_finding_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_finding_state", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "SetFindingState", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetFindingState", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_SetMute_sync", + "title": "Snippet for the set_mute call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute.", + "file": "security_center/set_mute.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_mute", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::SetMuteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "SetMute", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetMute", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy.", + "file": "security_center/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicy", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions.", + "file": "security_center/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissions", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module.", + "file": "security_center/simulate_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "simulate_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "SimulateSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SimulateSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync", + "title": "Snippet for the update_external_system call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system.", + "file": "security_center/update_external_system.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_external_system", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ExternalSystem", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateExternalSystem", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateExternalSystem", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync", + "title": "Snippet for the update_finding call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding.", + "file": "security_center/update_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_finding", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateFinding", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateFinding", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync", + "title": "Snippet for the update_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config.", + "file": "security_center/update_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateMuteConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync", + "title": "Snippet for the update_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config.", + "file": "security_center/update_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateNotificationConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync", + "title": "Snippet for the update_organization_settings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings.", + "file": "security_center/update_organization_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_organization_settings", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::OrganizationSettings", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateOrganizationSettings", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the update_security_health_analytics_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module.", + "file": "security_center/update_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSource_sync", + "title": "Snippet for the update_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source.", + "file": "security_center/update_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_source", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSource", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync", + "title": "Snippet for the update_security_marks call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks.", + "file": "security_center/update_security_marks.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_security_marks", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityMarks", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSecurityMarks", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarks", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync", + "title": "Snippet for the create_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export.", + "file": "security_center/create_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateBigQueryExport", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync", + "title": "Snippet for the delete_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export.", + "file": "security_center/delete_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteBigQueryExport", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync", + "title": "Snippet for the update_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export.", + "file": "security_center/update_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateBigQueryExport", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync", + "title": "Snippet for the list_big_query_exports call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports.", + "file": "security_center/list_big_query_exports.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_big_query_exports", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListBigQueryExports", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListBigQueryExports", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync", + "title": "Snippet for the create_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module.", + "file": "security_center/create_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync", + "title": "Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module.", + "file": "security_center/delete_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync", + "title": "Snippet for the get_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module.", + "file": "security_center/get_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync", + "title": "Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules.", + "file": "security_center/list_descendant_event_threat_detection_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_descendant_event_threat_detection_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListDescendantEventThreatDetectionCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListDescendantEventThreatDetectionCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync", + "title": "Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules.", + "file": "security_center/list_event_threat_detection_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_event_threat_detection_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListEventThreatDetectionCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEventThreatDetectionCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync", + "title": "Snippet for the update_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module.", + "file": "security_center/update_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync", + "title": "Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module.", + "file": "security_center/validate_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "validate_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ValidateEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ValidateEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync", + "title": "Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module.", + "file": "security_center/get_effective_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_effective_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetEffectiveEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync", + "title": "Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules.", + "file": "security_center/list_effective_event_threat_detection_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_effective_event_threat_detection_custom_modules", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListEffectiveEventThreatDetectionCustomModules", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveEventThreatDetectionCustomModules", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync", + "title": "Snippet for the batch_create_resource_value_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs.", + "file": "security_center/batch_create_resource_value_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_resource_value_configs", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "BatchCreateResourceValueConfigs", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.BatchCreateResourceValueConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync", + "title": "Snippet for the delete_resource_value_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config.", + "file": "security_center/delete_resource_value_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_resource_value_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteResourceValueConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync", + "title": "Snippet for the get_resource_value_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config.", + "file": "security_center/get_resource_value_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_resource_value_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ResourceValueConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetResourceValueConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync", + "title": "Snippet for the list_resource_value_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs.", + "file": "security_center/list_resource_value_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_value_configs", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListResourceValueConfigs", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListResourceValueConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync", + "title": "Snippet for the update_resource_value_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config.", + "file": "security_center/update_resource_value_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_resource_value_config", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ResourceValueConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateResourceValueConfig", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync", + "title": "Snippet for the list_valued_resources call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources.", + "file": "security_center/list_valued_resources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_valued_resources", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListValuedResources", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListValuedResources", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync", + "title": "Snippet for the list_attack_paths call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths.", + "file": "security_center/list_attack_paths.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_attack_paths", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListAttackPaths", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListAttackPaths", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb new file mode 100644 index 000000000000..650ae5647c63 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/securitycenter/v1/securitycenter_service_pb" +require "google/cloud/securitycenter/v1/securitycenter_service_services_pb" +require "google/cloud/security_center/v1/security_center" + +class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb new file mode 100644 index 000000000000..25ac2a34d4cc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb @@ -0,0 +1,487 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/security_center/v1/security_center" + +class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_big_query_export_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.big_query_export_path organization: "value0", export: "value1" + assert_equal "organizations/value0/bigQueryExports/value1", path + + path = client.big_query_export_path folder: "value0", export: "value1" + assert_equal "folders/value0/bigQueryExports/value1", path + + path = client.big_query_export_path project: "value0", export: "value1" + assert_equal "projects/value0/bigQueryExports/value1", path + end + end + + def test_dlp_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dlp_job_path project: "value0", dlp_job: "value1" + assert_equal "projects/value0/dlpJobs/value1", path + + path = client.dlp_job_path project: "value0", location: "value1", dlp_job: "value2" + assert_equal "projects/value0/locations/value1/dlpJobs/value2", path + end + end + + def test_effective_event_threat_detection_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.effective_event_threat_detection_custom_module_path organization: "value0", module: "value1" + assert_equal "organizations/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path + + path = client.effective_event_threat_detection_custom_module_path folder: "value0", module: "value1" + assert_equal "folders/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path + + path = client.effective_event_threat_detection_custom_module_path project: "value0", module: "value1" + assert_equal "projects/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path + end + end + + def test_effective_security_health_analytics_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.effective_security_health_analytics_custom_module_path organization: "value0", effective_custom_module: "value1" + assert_equal "organizations/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path + + path = client.effective_security_health_analytics_custom_module_path folder: "value0", effective_custom_module: "value1" + assert_equal "folders/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path + + path = client.effective_security_health_analytics_custom_module_path project: "value0", effective_custom_module: "value1" + assert_equal "projects/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path + end + end + + def test_event_threat_detection_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.event_threat_detection_custom_module_path organization: "value0", module: "value1" + assert_equal "organizations/value0/eventThreatDetectionSettings/customModules/value1", path + + path = client.event_threat_detection_custom_module_path folder: "value0", module: "value1" + assert_equal "folders/value0/eventThreatDetectionSettings/customModules/value1", path + + path = client.event_threat_detection_custom_module_path project: "value0", module: "value1" + assert_equal "projects/value0/eventThreatDetectionSettings/customModules/value1", path + end + end + + def test_event_threat_detection_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.event_threat_detection_settings_path organization: "value0" + assert_equal "organizations/value0/eventThreatDetectionSettings", path + + path = client.event_threat_detection_settings_path folder: "value0" + assert_equal "folders/value0/eventThreatDetectionSettings", path + + path = client.event_threat_detection_settings_path project: "value0" + assert_equal "projects/value0/eventThreatDetectionSettings", path + end + end + + def test_external_system_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.external_system_path organization: "value0", source: "value1", finding: "value2", externalsystem: "value3" + assert_equal "organizations/value0/sources/value1/findings/value2/externalSystems/value3", path + + path = client.external_system_path folder: "value0", source: "value1", finding: "value2", externalsystem: "value3" + assert_equal "folders/value0/sources/value1/findings/value2/externalSystems/value3", path + + path = client.external_system_path project: "value0", source: "value1", finding: "value2", externalsystem: "value3" + assert_equal "projects/value0/sources/value1/findings/value2/externalSystems/value3", path + end + end + + def test_finding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.finding_path organization: "value0", source: "value1", finding: "value2" + assert_equal "organizations/value0/sources/value1/findings/value2", path + + path = client.finding_path folder: "value0", source: "value1", finding: "value2" + assert_equal "folders/value0/sources/value1/findings/value2", path + + path = client.finding_path project: "value0", source: "value1", finding: "value2" + assert_equal "projects/value0/sources/value1/findings/value2", path + end + end + + def test_folder_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_path folder: "value0" + assert_equal "folders/value0", path + end + end + + def test_folder_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_location_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_mute_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.mute_config_path organization: "value0", mute_config: "value1" + assert_equal "organizations/value0/muteConfigs/value1", path + + path = client.mute_config_path folder: "value0", mute_config: "value1" + assert_equal "folders/value0/muteConfigs/value1", path + + path = client.mute_config_path project: "value0", mute_config: "value1" + assert_equal "projects/value0/muteConfigs/value1", path + + path = client.mute_config_path organization: "value0", location: "value1", mute_config: "value2" + assert_equal "organizations/value0/locations/value1/muteConfigs/value2", path + + path = client.mute_config_path folder: "value0", location: "value1", mute_config: "value2" + assert_equal "folders/value0/locations/value1/muteConfigs/value2", path + + path = client.mute_config_path project: "value0", location: "value1", mute_config: "value2" + assert_equal "projects/value0/locations/value1/muteConfigs/value2", path + end + end + + def test_notification_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.notification_config_path organization: "value0", notification_config: "value1" + assert_equal "organizations/value0/notificationConfigs/value1", path + + path = client.notification_config_path folder: "value0", notification_config: "value1" + assert_equal "folders/value0/notificationConfigs/value1", path + + path = client.notification_config_path project: "value0", notification_config: "value1" + assert_equal "projects/value0/notificationConfigs/value1", path + end + end + + def test_organization_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_path organization: "value0" + assert_equal "organizations/value0", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_organization_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_settings_path organization: "value0" + assert_equal "organizations/value0/organizationSettings", path + end + end + + def test_organization_simulation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_simulation_path organization: "value0", simulation: "value1" + assert_equal "organizations/value0/simulations/value1", path + end + end + + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path organization: "value0", constraint_name: "value1" + assert_equal "organizations/value0/policies/value1", path + + path = client.policy_path folder: "value0", constraint_name: "value1" + assert_equal "folders/value0/policies/value1", path + + path = client.policy_path project: "value0", constraint_name: "value1" + assert_equal "projects/value0/policies/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_resource_value_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.resource_value_config_path organization: "value0", resource_value_config: "value1" + assert_equal "organizations/value0/resourceValueConfigs/value1", path + end + end + + def test_security_health_analytics_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.security_health_analytics_custom_module_path organization: "value0", custom_module: "value1" + assert_equal "organizations/value0/securityHealthAnalyticsSettings/customModules/value1", path + + path = client.security_health_analytics_custom_module_path folder: "value0", custom_module: "value1" + assert_equal "folders/value0/securityHealthAnalyticsSettings/customModules/value1", path + + path = client.security_health_analytics_custom_module_path project: "value0", custom_module: "value1" + assert_equal "projects/value0/securityHealthAnalyticsSettings/customModules/value1", path + end + end + + def test_security_health_analytics_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.security_health_analytics_settings_path organization: "value0" + assert_equal "organizations/value0/securityHealthAnalyticsSettings", path + + path = client.security_health_analytics_settings_path folder: "value0" + assert_equal "folders/value0/securityHealthAnalyticsSettings", path + + path = client.security_health_analytics_settings_path project: "value0" + assert_equal "projects/value0/securityHealthAnalyticsSettings", path + end + end + + def test_security_marks_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.security_marks_path organization: "value0", asset: "value1" + assert_equal "organizations/value0/assets/value1/securityMarks", path + + path = client.security_marks_path organization: "value0", source: "value1", finding: "value2" + assert_equal "organizations/value0/sources/value1/findings/value2/securityMarks", path + + path = client.security_marks_path folder: "value0", asset: "value1" + assert_equal "folders/value0/assets/value1/securityMarks", path + + path = client.security_marks_path project: "value0", asset: "value1" + assert_equal "projects/value0/assets/value1/securityMarks", path + + path = client.security_marks_path folder: "value0", source: "value1", finding: "value2" + assert_equal "folders/value0/sources/value1/findings/value2/securityMarks", path + + path = client.security_marks_path project: "value0", source: "value1", finding: "value2" + assert_equal "projects/value0/sources/value1/findings/value2/securityMarks", path + end + end + + def test_simulation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.simulation_path organization: "value0", simulation: "value1" + assert_equal "organizations/value0/simulations/value1", path + end + end + + def test_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.source_path organization: "value0", source: "value1" + assert_equal "organizations/value0/sources/value1", path + + path = client.source_path folder: "value0", source: "value1" + assert_equal "folders/value0/sources/value1", path + + path = client.source_path project: "value0", source: "value1" + assert_equal "projects/value0/sources/value1", path + end + end + + def test_table_data_profile_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_data_profile_path project: "value0", table_profile: "value1" + assert_equal "projects/value0/tableProfiles/value1", path + + path = client.table_data_profile_path project: "value0", location: "value1", table_profile: "value2" + assert_equal "projects/value0/locations/value1/tableProfiles/value2", path + end + end + + def test_topic_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.topic_path project: "value0", topic: "value1" + assert_equal "projects/value0/topics/value1", path + end + end + + def test_valued_resource_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.valued_resource_path organization: "value0", simulation: "value1", valued_resource: "value2" + assert_equal "organizations/value0/simulations/value1/valuedResources/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb new file mode 100644 index 000000000000..d85963f8c45d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb @@ -0,0 +1,3594 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/securitycenter/v1/securitycenter_service_pb" +require "google/cloud/security_center/v1/security_center/rest" + + +class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_bulk_mute_findings + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + mute_annotation = "hello world" + mute_state = :MUTE_STATE_UNSPECIFIED + + bulk_mute_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_bulk_mute_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_mute_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.bulk_mute_findings parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_mute_findings_client_stub.call_count + end + end + end + + def test_create_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + security_health_analytics_custom_module = {} + + create_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_create_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source = {} + + create_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_source({ parent: parent, source: source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_source parent: parent, source: source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_source ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_source({ parent: parent, source: source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_source(::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_source_client_stub.call_count + end + end + end + + def test_create_finding + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + finding_id = "hello world" + finding = {} + + create_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_finding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_finding parent: parent, finding_id: finding_id, finding: finding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_finding ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_finding(::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_finding_client_stub.call_count + end + end + end + + def test_create_mute_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + mute_config = {} + mute_config_id = "hello world" + + create_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_mute_config ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_mute_config(::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_mute_config_client_stub.call_count + end + end + end + + def test_create_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + config_id = "hello world" + notification_config = {} + + create_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_notification_config ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_notification_config(::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_notification_config_client_stub.call_count + end + end + end + + def test_delete_mute_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_mute_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_mute_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_mute_config ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_mute_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_mute_config(::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_mute_config_client_stub.call_count + end + end + end + + def test_delete_notification_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_notification_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_notification_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_notification_config ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_notification_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_notification_config(::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_notification_config_client_stub.call_count + end + end + end + + def test_delete_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_security_health_analytics_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_security_health_analytics_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_get_simulation + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Simulation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_simulation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_simulation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_simulation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_simulation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_simulation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_simulation ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_simulation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_simulation(::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_simulation_client_stub.call_count + end + end + end + + def test_get_valued_resource + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ValuedResource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_valued_resource_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_valued_resource_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_valued_resource_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_valued_resource({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_valued_resource name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_valued_resource ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_valued_resource({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_valued_resource(::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_valued_resource_client_stub.call_count + end + end + end + + def test_get_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_big_query_export({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_big_query_export name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_big_query_export ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_big_query_export({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_big_query_export(::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_big_query_export_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_get_mute_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_mute_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_mute_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_mute_config ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_mute_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_mute_config(::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_mute_config_client_stub.call_count + end + end + end + + def test_get_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_notification_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_notification_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_notification_config ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_notification_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_notification_config(::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_notification_config_client_stub.call_count + end + end + end + + def test_get_organization_settings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_organization_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_organization_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_organization_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_organization_settings ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_organization_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_organization_settings(::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_organization_settings_client_stub.call_count + end + end + end + + def test_get_effective_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_effective_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_effective_security_health_analytics_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_effective_security_health_analytics_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_effective_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_get_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_security_health_analytics_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_security_health_analytics_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_get_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_source ::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_source(::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_source_client_stub.call_count + end + end + end + + def test_group_assets + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + compare_duration = {} + read_time = {} + page_token = "hello world" + page_size = 42 + + group_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, group_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.group_assets ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.group_assets(::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, group_assets_client_stub.call_count + end + end + end + + def test_group_findings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + read_time = {} + compare_duration = {} + page_token = "hello world" + page_size = 42 + + group_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, group_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.group_findings ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.group_findings(::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, group_findings_client_stub.call_count + end + end + end + + def test_list_assets + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_assets ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_assets(::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_count + end + end + end + + def test_list_descendant_security_health_analytics_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_descendant_security_health_analytics_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_count + end + end + end + + def test_list_findings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_findings ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_findings(::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_count + end + end + end + + def test_list_mute_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_mute_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_mute_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_mute_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_mute_configs ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_mute_configs(::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_mute_configs_client_stub.call_count + end + end + end + + def test_list_notification_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_notification_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_notification_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_notification_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_notification_configs ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_notification_configs(::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_notification_configs_client_stub.call_count + end + end + end + + def test_list_effective_security_health_analytics_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_effective_security_health_analytics_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_count + end + end + end + + def test_list_security_health_analytics_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_security_health_analytics_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_count + end + end + end + + def test_list_sources + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_sources parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_sources ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_sources(::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_sources_client_stub.call_count + end + end + end + + def test_run_asset_discovery + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + run_asset_discovery_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_run_asset_discovery_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_asset_discovery_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.run_asset_discovery({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.run_asset_discovery parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.run_asset_discovery({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_asset_discovery_client_stub.call_count + end + end + end + + def test_set_finding_state + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + state = :STATE_UNSPECIFIED + start_time = {} + + set_finding_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_finding_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_finding_state_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_finding_state({ name: name, state: state, start_time: start_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_finding_state name: name, state: state, start_time: start_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_finding_state ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_finding_state({ name: name, state: state, start_time: start_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_finding_state(::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_finding_state_client_stub.call_count + end + end + end + + def test_set_mute + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + mute = :MUTE_UNSPECIFIED + + set_mute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_mute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_mute_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_mute({ name: name, mute: mute }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_mute name: name, mute: mute do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_mute ::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_mute({ name: name, mute: mute }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_mute(::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_mute_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_simulate_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + custom_config = {} + resource = {} + + simulate_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_simulate_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_update_external_system + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + external_system = {} + update_mask = {} + + update_external_system_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_external_system_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_external_system_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_external_system external_system: external_system, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_external_system ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_external_system({ external_system: external_system, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_external_system(::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_external_system_client_stub.call_count + end + end + end + + def test_update_finding + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + finding = {} + update_mask = {} + + update_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_finding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_finding({ finding: finding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_finding finding: finding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_finding ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_finding({ finding: finding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_finding(::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_finding_client_stub.call_count + end + end + end + + def test_update_mute_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + mute_config = {} + update_mask = {} + + update_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_mute_config mute_config: mute_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_mute_config ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_mute_config(::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_mute_config_client_stub.call_count + end + end + end + + def test_update_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + notification_config = {} + update_mask = {} + + update_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_notification_config notification_config: notification_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_notification_config ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_notification_config(::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_notification_config_client_stub.call_count + end + end + end + + def test_update_organization_settings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + organization_settings = {} + update_mask = {} + + update_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_organization_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_organization_settings ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_organization_settings(::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_organization_settings_client_stub.call_count + end + end + end + + def test_update_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + security_health_analytics_custom_module = {} + update_mask = {} + + update_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_security_health_analytics_custom_module security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_update_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + source = {} + update_mask = {} + + update_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_source({ source: source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_source source: source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_source ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_source({ source: source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_source(::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_source_client_stub.call_count + end + end + end + + def test_update_security_marks + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + security_marks = {} + update_mask = {} + start_time = {} + + update_security_marks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_marks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_security_marks_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_security_marks ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_security_marks(::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_security_marks_client_stub.call_count + end + end + end + + def test_create_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + big_query_export = {} + big_query_export_id = "hello world" + + create_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_big_query_export ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_big_query_export(::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_big_query_export_client_stub.call_count + end + end + end + + def test_delete_big_query_export + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_big_query_export({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_big_query_export name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_big_query_export ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_big_query_export({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_big_query_export(::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_big_query_export_client_stub.call_count + end + end + end + + def test_update_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + big_query_export = {} + update_mask = {} + + update_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_big_query_export ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_big_query_export(::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_big_query_export_client_stub.call_count + end + end + end + + def test_list_big_query_exports + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_big_query_exports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_big_query_exports_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_big_query_exports_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_big_query_exports ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_big_query_exports(::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_big_query_exports_client_stub.call_count + end + end + end + + def test_create_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + event_threat_detection_custom_module = {} + + create_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_delete_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_event_threat_detection_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_event_threat_detection_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_get_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_event_threat_detection_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_event_threat_detection_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_list_descendant_event_threat_detection_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_descendant_event_threat_detection_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_descendant_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_count + end + end + end + + def test_list_event_threat_detection_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_event_threat_detection_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_count + end + end + end + + def test_update_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + event_threat_detection_custom_module = {} + update_mask = {} + + update_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_event_threat_detection_custom_module event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_validate_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + raw_text = "hello world" + type = "hello world" + + validate_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_validate_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, validate_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_get_effective_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_effective_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_effective_event_threat_detection_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_effective_event_threat_detection_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_effective_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_list_effective_event_threat_detection_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_effective_event_threat_detection_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_effective_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_count + end + end + end + + def test_batch_create_resource_value_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_create_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_batch_create_resource_value_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_create_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.batch_create_resource_value_configs parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.batch_create_resource_value_configs({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_create_resource_value_configs_client_stub.call_count + end + end + end + + def test_delete_resource_value_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_resource_value_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_resource_value_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_resource_value_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_resource_value_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_resource_value_config_client_stub.call_count + end + end + end + + def test_get_resource_value_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_resource_value_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_resource_value_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_resource_value_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_resource_value_config ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_resource_value_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_resource_value_config(::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_resource_value_config_client_stub.call_count + end + end + end + + def test_list_resource_value_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_resource_value_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_resource_value_configs_client_stub.call_count + end + end + end + + def test_update_resource_value_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource_value_config = {} + update_mask = {} + + update_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_resource_value_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_resource_value_config ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_resource_value_config(::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_resource_value_config_client_stub.call_count + end + end + end + + def test_list_valued_resources + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + + list_valued_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_valued_resources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_valued_resources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_valued_resources ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_valued_resources(::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_valued_resources_client_stub.call_count + end + end + end + + def test_list_attack_paths + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + + list_attack_paths_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_attack_paths_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_attack_paths_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_attack_paths ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_attack_paths(::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_attack_paths_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb new file mode 100644 index 000000000000..f949190ff600 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb @@ -0,0 +1,4053 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/securitycenter/v1/securitycenter_service_pb" +require "google/cloud/security_center/v1/security_center" + +class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_bulk_mute_findings + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + mute_annotation = "hello world" + mute_state = :MUTE_STATE_UNSPECIFIED + + bulk_mute_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_mute_findings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["mute_annotation"] + assert_equal :MUTE_STATE_UNSPECIFIED, request["mute_state"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_mute_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.bulk_mute_findings parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_mute_findings_client_stub.call_rpc_count + end + end + + def test_create_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + security_health_analytics_custom_module = {} + + create_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_create_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source = {} + + create_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Source), request["source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_source({ parent: parent, source: source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_source parent: parent, source: source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_source ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_source({ parent: parent, source: source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_source(::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_source_client_stub.call_rpc_count + end + end + + def test_create_finding + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + finding_id = "hello world" + finding = {} + + create_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_finding, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["finding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Finding), request["finding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_finding parent: parent, finding_id: finding_id, finding: finding do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_finding ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_finding(::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_finding_client_stub.call_rpc_count + end + end + + def test_create_mute_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + mute_config = {} + mute_config_id = "hello world" + + create_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::MuteConfig), request["mute_config"] + assert_equal "hello world", request["mute_config_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_mute_config ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_mute_config(::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_mute_config_client_stub.call_rpc_count + end + end + + def test_create_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + config_id = "hello world" + notification_config = {} + + create_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::NotificationConfig), request["notification_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_notification_config ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_notification_config(::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_notification_config_client_stub.call_rpc_count + end + end + + def test_delete_mute_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_mute_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_mute_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_mute_config ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_mute_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_mute_config(::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_mute_config_client_stub.call_rpc_count + end + end + + def test_delete_notification_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_notification_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_notification_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_notification_config ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_notification_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_notification_config(::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_notification_config_client_stub.call_rpc_count + end + end + + def test_delete_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_security_health_analytics_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_security_health_analytics_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_get_simulation + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Simulation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_simulation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_simulation, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_simulation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_simulation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_simulation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_simulation ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_simulation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_simulation(::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_simulation_client_stub.call_rpc_count + end + end + + def test_get_valued_resource + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ValuedResource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_valued_resource_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_valued_resource, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_valued_resource_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_valued_resource({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_valued_resource name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_valued_resource ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_valued_resource({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_valued_resource(::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_valued_resource_client_stub.call_rpc_count + end + end + + def test_get_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_big_query_export({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_big_query_export name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_big_query_export ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_big_query_export({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_big_query_export(::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_big_query_export_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_get_mute_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_mute_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_mute_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_mute_config ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_mute_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_mute_config(::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_mute_config_client_stub.call_rpc_count + end + end + + def test_get_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_notification_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_notification_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_notification_config ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_notification_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_notification_config(::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_notification_config_client_stub.call_rpc_count + end + end + + def test_get_organization_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_organization_settings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_organization_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_organization_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_organization_settings ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_organization_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_organization_settings(::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_organization_settings_client_stub.call_rpc_count + end + end + + def test_get_effective_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_effective_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_effective_security_health_analytics_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_effective_security_health_analytics_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_effective_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_get_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_security_health_analytics_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_security_health_analytics_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_get_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_source ::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_source(::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_source_client_stub.call_rpc_count + end + end + + def test_group_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + compare_duration = {} + read_time = {} + page_token = "hello world" + page_size = 42 + + group_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :group_assets, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["group_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, group_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.group_assets ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.group_assets(::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, group_assets_client_stub.call_rpc_count + end + end + + def test_group_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + read_time = {} + compare_duration = {} + page_token = "hello world" + page_size = 42 + + group_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :group_findings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["group_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, group_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.group_findings ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.group_findings(::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, group_findings_client_stub.call_rpc_count + end + end + + def test_list_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_assets, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_assets ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_assets(::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_rpc_count + end + end + + def test_list_descendant_security_health_analytics_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_descendant_security_health_analytics_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_rpc_count + end + end + + def test_list_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_findings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_findings ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_findings(::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_rpc_count + end + end + + def test_list_mute_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_mute_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_mute_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_mute_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_mute_configs ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_mute_configs(::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_mute_configs_client_stub.call_rpc_count + end + end + + def test_list_notification_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_notification_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_notification_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_notification_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_notification_configs ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_notification_configs(::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_notification_configs_client_stub.call_rpc_count + end + end + + def test_list_effective_security_health_analytics_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_effective_security_health_analytics_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_rpc_count + end + end + + def test_list_security_health_analytics_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_security_health_analytics_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_rpc_count + end + end + + def test_list_sources + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sources, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_sources parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_sources ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_sources(::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_sources_client_stub.call_rpc_count + end + end + + def test_run_asset_discovery + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + run_asset_discovery_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_asset_discovery, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_asset_discovery_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.run_asset_discovery({ parent: parent }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.run_asset_discovery parent: parent do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.run_asset_discovery({ parent: parent }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_asset_discovery_client_stub.call_rpc_count + end + end + + def test_set_finding_state + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + state = :STATE_UNSPECIFIED + start_time = {} + + set_finding_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_finding_state, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, request + assert_equal "hello world", request["name"] + assert_equal :STATE_UNSPECIFIED, request["state"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_finding_state_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_finding_state({ name: name, state: state, start_time: start_time }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_finding_state name: name, state: state, start_time: start_time do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_finding_state ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_finding_state({ name: name, state: state, start_time: start_time }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_finding_state(::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_finding_state_client_stub.call_rpc_count + end + end + + def test_set_mute + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + mute = :MUTE_UNSPECIFIED + + set_mute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_mute, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SetMuteRequest, request + assert_equal "hello world", request["name"] + assert_equal :MUTE_UNSPECIFIED, request["mute"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_mute_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_mute({ name: name, mute: mute }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_mute name: name, mute: mute do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_mute ::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_mute({ name: name, mute: mute }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_mute(::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_mute_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_simulate_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + custom_config = {} + resource = {} + + simulate_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :simulate_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::CustomConfig), request["custom_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource), request["resource"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_update_external_system + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + external_system = {} + update_mask = {} + + update_external_system_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_external_system, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::ExternalSystem), request["external_system"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_external_system_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_external_system external_system: external_system, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_external_system ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_external_system({ external_system: external_system, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_external_system(::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_external_system_client_stub.call_rpc_count + end + end + + def test_update_finding + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + finding = {} + update_mask = {} + + update_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_finding, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Finding), request["finding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_finding({ finding: finding, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_finding finding: finding, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_finding ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_finding({ finding: finding, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_finding(::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_finding_client_stub.call_rpc_count + end + end + + def test_update_mute_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + mute_config = {} + update_mask = {} + + update_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::MuteConfig), request["mute_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_mute_config mute_config: mute_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_mute_config ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_mute_config(::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_mute_config_client_stub.call_rpc_count + end + end + + def test_update_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + notification_config = {} + update_mask = {} + + update_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::NotificationConfig), request["notification_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_notification_config notification_config: notification_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_notification_config ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_notification_config(::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_notification_config_client_stub.call_rpc_count + end + end + + def test_update_organization_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + organization_settings = {} + update_mask = {} + + update_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_organization_settings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::OrganizationSettings), request["organization_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_organization_settings ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_organization_settings(::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_organization_settings_client_stub.call_rpc_count + end + end + + def test_update_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + security_health_analytics_custom_module = {} + update_mask = {} + + update_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_security_health_analytics_custom_module security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_update_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + source = {} + update_mask = {} + + update_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Source), request["source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_source({ source: source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_source source: source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_source ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_source({ source: source, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_source(::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_source_client_stub.call_rpc_count + end + end + + def test_update_security_marks + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + security_marks = {} + update_mask = {} + start_time = {} + + update_security_marks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_security_marks, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityMarks), request["security_marks"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_security_marks_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_security_marks ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_security_marks(::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_security_marks_client_stub.call_rpc_count + end + end + + def test_create_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + big_query_export = {} + big_query_export_id = "hello world" + + create_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::BigQueryExport), request["big_query_export"] + assert_equal "hello world", request["big_query_export_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_big_query_export ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_big_query_export(::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_big_query_export_client_stub.call_rpc_count + end + end + + def test_delete_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_big_query_export({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_big_query_export name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_big_query_export ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_big_query_export({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_big_query_export(::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_big_query_export_client_stub.call_rpc_count + end + end + + def test_update_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + big_query_export = {} + update_mask = {} + + update_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::BigQueryExport), request["big_query_export"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_big_query_export ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_big_query_export(::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_big_query_export_client_stub.call_rpc_count + end + end + + def test_list_big_query_exports + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_big_query_exports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_big_query_exports, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_big_query_exports_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_big_query_exports ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_big_query_exports(::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_big_query_exports_client_stub.call_rpc_count + end + end + + def test_create_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + event_threat_detection_custom_module = {} + + create_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_delete_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_event_threat_detection_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_event_threat_detection_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_get_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_event_threat_detection_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_event_threat_detection_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_list_descendant_event_threat_detection_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_descendant_event_threat_detection_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_descendant_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_rpc_count + end + end + + def test_list_event_threat_detection_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_event_threat_detection_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_rpc_count + end + end + + def test_update_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + event_threat_detection_custom_module = {} + update_mask = {} + + update_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_event_threat_detection_custom_module event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_validate_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + raw_text = "hello world" + type = "hello world" + + validate_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :validate_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["raw_text"] + assert_equal "hello world", request["type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, validate_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_get_effective_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_effective_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_effective_event_threat_detection_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_effective_event_threat_detection_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_effective_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_list_effective_event_threat_detection_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_effective_event_threat_detection_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_effective_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_rpc_count + end + end + + def test_batch_create_resource_value_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_create_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_resource_value_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_create_resource_value_configs parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_create_resource_value_configs({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_create_resource_value_configs_client_stub.call_rpc_count + end + end + + def test_delete_resource_value_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_resource_value_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_resource_value_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_resource_value_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_resource_value_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_resource_value_config_client_stub.call_rpc_count + end + end + + def test_get_resource_value_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_resource_value_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_resource_value_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_resource_value_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_resource_value_config ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_resource_value_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_resource_value_config(::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_resource_value_config_client_stub.call_rpc_count + end + end + + def test_list_resource_value_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_resource_value_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_resource_value_configs_client_stub.call_rpc_count + end + end + + def test_update_resource_value_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource_value_config = {} + update_mask = {} + + update_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_resource_value_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig), request["resource_value_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_resource_value_config ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_resource_value_config(::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_resource_value_config_client_stub.call_rpc_count + end + end + + def test_list_valued_resources + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + + list_valued_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_valued_resources, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_valued_resources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_valued_resources ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_valued_resources(::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_valued_resources_client_stub.call_rpc_count + end + end + + def test_list_attack_paths + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + + list_attack_paths_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_attack_paths, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_attack_paths_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_attack_paths ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_attack_paths(::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_attack_paths_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/helper.rb b/owl-bot-staging/google-cloud-security_center-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1/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-v1p1beta1/.gitignore b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.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-v1p1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.repo-metadata.json new file mode 100644 index 000000000000..a20578f7275e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.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-v1p1beta1/latest", + "distribution_name": "google-cloud-security_center-v1p1beta1", + "is_cloud": true, + "language": "ruby", + "name": "securitycenter", + "name_pretty": "Cloud Security Command Center V1p1beta1 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. Note that google-cloud-security_center-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details.", + "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-v1p1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.rubocop.yml new file mode 100644 index 000000000000..83496958be62 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security_center-v1p1beta1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-security_center-v1p1beta1.rb" diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/.toys.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.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-v1p1beta1/.yardopts b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.yardopts new file mode 100644 index 000000000000..ebd7730f355a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Security Command Center V1p1beta1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center-v1p1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..3e145a9570e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security_center-v1p1beta1 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-v1p1beta1 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/v1p1beta1" + +client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/security_center/v1p1beta1" + +::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-security_center-v1p1beta1 +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/v1p1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center-v1p1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/Gemfile b/owl-bot-staging/google-cloud-security_center-v1p1beta1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-v1p1beta1/LICENSE.md b/owl-bot-staging/google-cloud-security_center-v1p1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/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-v1p1beta1/README.md b/owl-bot-staging/google-cloud-security_center-v1p1beta1/README.md new file mode 100644 index 000000000000..a4f1e8673649 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Security Command Center V1p1beta1 API + +Security Command Center API provides access to temporal views of assets and findings within an organization. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Security Command Center V1p1beta1 API. Most users should consider using +the main client gem, +[google-cloud-security_center](https://rubygems.org/gems/google-cloud-security_center). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-security_center-v1p1beta1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/securitycenter.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/security_center/v1p1beta1" + +client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new +request = ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new # (request fields as keyword arguments...) +response = client.create_source request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1p1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/security-command-center) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/security_center/v1p1beta1" +require "logger" + +client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-security_center`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-security_center-v1p1beta1`. +_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-v1p1beta1`. + +### 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-v1p1beta1/Rakefile b/owl-bot-staging/google-cloud-security_center-v1p1beta1/Rakefile new file mode 100644 index 000000000000..4edac3b83170 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-security_center-v1p1beta1 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/v1p1beta1/security_center/credentials" + ::Google::Cloud::SecurityCenter::V1p1beta1::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-v1p1beta1 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-v1p1beta1 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-v1p1beta1 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-v1p1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security_center-v1p1beta1" + header "google-cloud-security_center-v1p1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security_center-v1p1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security_center-v1p1beta1 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-v1p1beta1 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-v1p1beta1 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-v1p1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center-v1p1beta1/gapic_metadata.json new file mode 100644 index 000000000000..429bc0c97eac --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/gapic_metadata.json @@ -0,0 +1,133 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.securitycenter.v1p1beta1", + "libraryPackage": "::Google::Cloud::SecurityCenter::V1p1beta1", + "services": { + "SecurityCenter": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client", + "rpcs": { + "CreateSource": { + "methods": [ + "create_source" + ] + }, + "CreateFinding": { + "methods": [ + "create_finding" + ] + }, + "CreateNotificationConfig": { + "methods": [ + "create_notification_config" + ] + }, + "DeleteNotificationConfig": { + "methods": [ + "delete_notification_config" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "GetNotificationConfig": { + "methods": [ + "get_notification_config" + ] + }, + "GetOrganizationSettings": { + "methods": [ + "get_organization_settings" + ] + }, + "GetSource": { + "methods": [ + "get_source" + ] + }, + "GroupAssets": { + "methods": [ + "group_assets" + ] + }, + "GroupFindings": { + "methods": [ + "group_findings" + ] + }, + "ListAssets": { + "methods": [ + "list_assets" + ] + }, + "ListFindings": { + "methods": [ + "list_findings" + ] + }, + "ListNotificationConfigs": { + "methods": [ + "list_notification_configs" + ] + }, + "ListSources": { + "methods": [ + "list_sources" + ] + }, + "RunAssetDiscovery": { + "methods": [ + "run_asset_discovery" + ] + }, + "SetFindingState": { + "methods": [ + "set_finding_state" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "UpdateFinding": { + "methods": [ + "update_finding" + ] + }, + "UpdateNotificationConfig": { + "methods": [ + "update_notification_config" + ] + }, + "UpdateOrganizationSettings": { + "methods": [ + "update_organization_settings" + ] + }, + "UpdateSource": { + "methods": [ + "update_source" + ] + }, + "UpdateSecurityMarks": { + "methods": [ + "update_security_marks" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/google-cloud-security_center-v1p1beta1.gemspec b/owl-bot-staging/google-cloud-security_center-v1p1beta1/google-cloud-security_center-v1p1beta1.gemspec new file mode 100644 index 000000000000..fc15187be561 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/google-cloud-security_center-v1p1beta1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security_center/v1p1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security_center-v1p1beta1" + gem.version = Google::Cloud::SecurityCenter::V1p1beta1::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. Note that google-cloud-security_center-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details." + gem.summary = "Security Command Center API provides access to temporal views of assets and findings within an organization." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.rb new file mode 100644 index 000000000000..1e7ec4c542f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/security_center/v1p1beta1" diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.rb new file mode 100644 index 000000000000..60f6b23b8bbb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center/v1p1beta1/security_center" +require "google/cloud/security_center/v1p1beta1/version" + +module Google + module Cloud + module SecurityCenter + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/security_center/v1p1beta1" + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/security_center/v1p1beta1" + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + module V1p1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1p1beta1", "_helpers.rb" +require "google/cloud/security_center/v1p1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.rb new file mode 100644 index 000000000000..33c18366ecf2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center/v1p1beta1/security_center/rest" +require "google/cloud/security_center/v1p1beta1/version" + +module Google + module Cloud + module SecurityCenter + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/security_center/v1p1beta1/rest" + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + module V1p1beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center.rb new file mode 100644 index 000000000000..77d09feb2118 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security_center/v1p1beta1/version" + +require "google/cloud/security_center/v1p1beta1/security_center/credentials" +require "google/cloud/security_center/v1p1beta1/security_center/paths" +require "google/cloud/security_center/v1p1beta1/security_center/operations" +require "google/cloud/security_center/v1p1beta1/security_center/client" +require "google/cloud/security_center/v1p1beta1/security_center/rest" + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + ## + # V1p1Beta1 APIs for Security Center service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/security_center/v1p1beta1/security_center" + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/security_center/v1p1beta1/security_center/rest" + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + module SecurityCenter + end + end + end + end +end + +helper_path = ::File.join __dir__, "security_center", "helpers.rb" +require "google/cloud/security_center/v1p1beta1/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb new file mode 100644 index 000000000000..3a6e0cf3a6fb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb @@ -0,0 +1,3252 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + module SecurityCenter + ## + # Client for the SecurityCenter service. + # + # V1p1Beta1 APIs for Security Center service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :security_center_stub + + ## + # Configure the SecurityCenter Client class. + # + # See {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenter clients + # ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecurityCenter", "V1p1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_source.timeout = 60.0 + + default_config.rpcs.create_finding.timeout = 60.0 + + default_config.rpcs.create_notification_config.timeout = 60.0 + + default_config.rpcs.delete_notification_config.timeout = 60.0 + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_notification_config.timeout = 60.0 + default_config.rpcs.get_notification_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_organization_settings.timeout = 60.0 + default_config.rpcs.get_organization_settings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_source.timeout = 60.0 + default_config.rpcs.get_source.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_assets.timeout = 480.0 + default_config.rpcs.group_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_findings.timeout = 480.0 + default_config.rpcs.group_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_assets.timeout = 480.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_findings.timeout = 480.0 + default_config.rpcs.list_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_notification_configs.timeout = 60.0 + default_config.rpcs.list_notification_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_sources.timeout = 60.0 + default_config.rpcs.list_sources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.run_asset_discovery.timeout = 60.0 + + default_config.rpcs.set_finding_state.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_finding.timeout = 60.0 + + default_config.rpcs.update_notification_config.timeout = 60.0 + + default_config.rpcs.update_organization_settings.timeout = 60.0 + + default_config.rpcs.update_source.timeout = 60.0 + + default_config.rpcs.update_security_marks.timeout = 480.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @security_center_stub.universe_domain + end + + ## + # Create a new SecurityCenter client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecurityCenter client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @security_center_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @security_center_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @security_center_stub.logger + end + + # Service calls + + ## + # Creates a source. + # + # @overload create_source(request, options = nil) + # Pass arguments to `create_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_source(parent: nil, source: nil) + # Pass arguments to `create_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new source's parent. Its format should be + # "organizations/[organization_id]". + # @param source [::Google::Cloud::SecurityCenter::V1p1beta1::Source, ::Hash] + # Required. The Source being created, only the display_name and description will be + # used. All other fields will be ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new + # + # # Call the create_source method. + # result = client.create_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. + # p result + # + def create_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a finding. The corresponding source must exist for finding + # creation to succeed. + # + # @overload create_finding(request, options = nil) + # Pass arguments to `create_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_finding(parent: nil, finding_id: nil, finding: nil) + # Pass arguments to `create_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new finding's parent. Its format should be + # "organizations/[organization_id]/sources/[source_id]". + # @param finding_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # @param finding [::Google::Cloud::SecurityCenter::V1p1beta1::Finding, ::Hash] + # Required. The Finding being created. The name and security_marks will be ignored as + # they are both output only fields on this resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new + # + # # Call the create_finding method. + # result = client.create_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. + # p result + # + def create_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_finding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_finding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a notification config. + # + # @overload create_notification_config(request, options = nil) + # Pass arguments to `create_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) + # Pass arguments to `create_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new notification config's parent. Its format is + # "organizations/[organization_id]". + # @param config_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters, and contains alphanumeric + # characters, underscores or hyphens only. + # @param notification_config [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig, ::Hash] + # Required. The notification config being created. The name and the service account + # will be ignored as they are both output only fields on this resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new + # + # # Call the create_notification_config method. + # result = client.create_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + # p result + # + def create_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a notification config. + # + # @overload delete_notification_config(request, options = nil) + # Pass arguments to `delete_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_notification_config(name: nil) + # Pass arguments to `delete_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to delete. Its format is + # "organizations/[organization_id]/notificationConfigs/[config_id]". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new + # + # # Call the delete_notification_config method. + # result = client.delete_notification_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy on the specified Source. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a notification config. + # + # @overload get_notification_config(request, options = nil) + # Pass arguments to `get_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_notification_config(name: nil) + # Pass arguments to `get_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to get. Its format is + # "organizations/[organization_id]/notificationConfigs/[config_id]". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new + # + # # Call the get_notification_config method. + # result = client.get_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + # p result + # + def get_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the settings for an organization. + # + # @overload get_organization_settings(request, options = nil) + # Pass arguments to `get_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_organization_settings(name: nil) + # Pass arguments to `get_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the organization to get organization settings for. Its format is + # "organizations/[organization_id]/organizationSettings". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new + # + # # Call the get_organization_settings method. + # result = client.get_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. + # p result + # + def get_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_organization_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a source. + # + # @overload get_source(request, options = nil) + # Pass arguments to `get_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_source(name: nil) + # Pass arguments to `get_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Relative resource name of the source. Its format is + # "organizations/[organization_id]/source/[source_id]". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new + # + # # Call the get_source method. + # result = client.get_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. + # p result + # + def get_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization's assets and groups them by their specified + # properties. + # + # @overload group_assets(request, options = nil) + # Pass arguments to `group_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization to groupBy. Its format is + # "organizations/[organization_id], folders/[folder_id], or + # projects/[project_id]". + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_name_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping. The string + # value should follow SQL syntax: comma separated list of fields. For + # example: + # "security_center_properties.resource_project,security_center_properties.project". + # + # The following fields are supported when compare_duration is not set: + # + # * security_center_properties.resource_project + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_type + # * security_center_properties.resource_parent + # * security_center_properties.resource_parent_display_name + # + # The following fields are supported when compare_duration is set: + # + # * security_center_properties.resource_type + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_parent_display_name + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" property is + # updated to indicate whether the asset was added, removed, or remained + # present during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at reference_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at reference_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and reference_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param page_token [::String] + # The value returned by the last `GroupAssetsResponse`; indicates + # that this is a continuation of a prior `GroupAssets` call, and that the + # system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new + # + # # Call the group_assets method. + # result = client.group_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. + # p item + # end + # + def group_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.group_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.group_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.group_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :group_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_assets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization or source's findings and groups them by their + # specified properties. + # + # To group across all sources provide a `-` as the source id. + # Example: /v1/organizations/\\{organization_id}/sources/-/findings, + # /v1/folders/\\{folder_id}/sources/-/findings, + # /v1/projects/\\{project_id}/sources/-/findings + # + # @overload group_findings(request, options = nil) + # Pass arguments to `group_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source to groupBy. Its format is + # "organizations/[organization_id]/sources/[source_id]", + # folders/[folder_id]/sources/[source_id], or + # projects/[project_id]/sources/[source_id]. To groupBy across all sources + # provide a source_id of `-`. For example: + # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/-, + # or projects/\\{project_id}/sources/- + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # * severity: `=`, `:` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping (including + # `state_change`). The string value should follow SQL syntax: comma separated + # list of fields. For example: "parent,resource_name". + # + # The following fields are supported: + # + # * resource_name + # * category + # * state + # * parent + # * severity + # + # The following fields are supported when compare_duration is set: + # + # * state_change + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" attribute is + # updated to indicate whether the finding had its state changed, the + # finding's state remained unchanged, or if the finding was added during the + # compare_duration period of time that precedes the read_time. This is the + # time between (read_time - compare_duration) and read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present + # at read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param page_token [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new + # + # # Call the group_findings method. + # result = client.group_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. + # p item + # end + # + def group_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.group_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.group_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.group_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :group_findings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_findings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization's assets. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization assets should belong to. Its format is + # "organizations/[organization_id], folders/[folder_id], or + # projects/[project_id]". + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following are the allowed field and operator combinations: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,resource_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,resource_properties.a_property" and " + # name desc , resource_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # update_time + # resource_properties + # security_marks.marks + # security_center_properties.resource_name + # security_center_properties.resource_display_name + # security_center_properties.resource_parent + # security_center_properties.resource_parent_display_name + # security_center_properties.resource_project + # security_center_properties.resource_project_display_name + # security_center_properties.resource_type + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListAssetsResult's "state_change" + # attribute is updated to indicate whether the asset was added, removed, or + # remained present during the compare_duration period of time that precedes + # the read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at read_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at read_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the ListAssetsResult fields to be listed in the + # response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListAssetsResponse`; indicates + # that this is a continuation of a prior `ListAssets` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_assets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_assets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization or source's findings. + # + # To list across all sources provide a `-` as the source id. + # Example: /v1p1beta1/organizations/\\{organization_id}/sources/-/findings + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source the findings belong to. Its format is + # "organizations/[organization_id]/sources/[source_id], + # folders/[folder_id]/sources/[source_id], or + # projects/[project_id]/sources/[source_id]". To list across all sources + # provide a source_id of `-`. For example: + # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/- or + # projects/\\{projects_id}/sources/- + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # * severity: `=`, `:` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # security_marks.marks: `=`, `:` + # source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,source_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,source_properties.a_property" and " + # name desc , source_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # source_properties + # security_marks.marks + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListFindingsResult's "state_change" + # attribute is updated to indicate whether the finding had its state changed, + # the finding's state remained unchanged, or if the finding was added in any + # state during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_findings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_findings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists notification configs. + # + # @overload list_notification_configs(request, options = nil) + # Pass arguments to `list_notification_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_notification_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization to list notification configs. + # Its format is "organizations/[organization_id]". + # @param page_token [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new + # + # # Call the list_notification_configs method. + # result = client.list_notification_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + # p item + # end + # + def list_notification_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_notification_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_notification_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_notification_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_notification_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all sources belonging to an organization. + # + # @overload list_sources(request, options = nil) + # Pass arguments to `list_sources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent of sources to list. Its format should be + # "organizations/[organization_id], folders/[folder_id], or + # projects/[project_id]". + # @param page_token [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::Source>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::Source>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new + # + # # Call the list_sources method. + # result = client.list_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::Source. + # p item + # end + # + def list_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs asset discovery. The discovery is tracked with a long-running + # operation. + # + # This API can only be called with limited frequency for an organization. If + # it is called too frequently the caller will receive a TOO_MANY_REQUESTS + # error. + # + # @overload run_asset_discovery(request, options = nil) + # Pass arguments to `run_asset_discovery` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_asset_discovery(parent: nil) + # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization to run asset discovery for. Its format is + # "organizations/[organization_id]". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new + # + # # Call the run_asset_discovery method. + # result = client.run_asset_discovery request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_asset_discovery request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_asset_discovery.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_asset_discovery.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :run_asset_discovery, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the state of a finding. + # + # @overload set_finding_state(request, options = nil) + # Pass arguments to `set_finding_state` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_finding_state(name: nil, state: nil, start_time: nil) + # Pass arguments to `set_finding_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The relative resource name of the finding. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/sources/\\{source_id}/finding/\\{finding_id}". + # @param state [::Google::Cloud::SecurityCenter::V1p1beta1::Finding::State] + # Required. The desired State of the finding. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The time at which the updated state takes effect. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new + # + # # Call the set_finding_state method. + # result = client.set_finding_state request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. + # p result + # + def set_finding_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_finding_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_finding_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :set_finding_state, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified Source. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has on the specified source. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a finding. The corresponding source must exist for a + # finding creation to succeed. + # + # @overload update_finding(request, options = nil) + # Pass arguments to `update_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_finding(finding: nil, update_mask: nil) + # Pass arguments to `update_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param finding [::Google::Cloud::SecurityCenter::V1p1beta1::Finding, ::Hash] + # Required. The finding resource to update or create if it does not already exist. + # parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new + # + # # Call the update_finding method. + # result = client.update_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. + # p result + # + def update_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.finding&.name + header_params["finding.name"] = request.finding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_finding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_finding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + # + # @overload update_notification_config(request, options = nil) + # Pass arguments to `update_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_notification_config(notification_config: nil, update_mask: nil) + # Pass arguments to `update_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_config [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig, ::Hash] + # Required. The notification config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new + # + # # Call the update_notification_config method. + # result = client.update_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + # p result + # + def update_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.notification_config&.name + header_params["notification_config.name"] = request.notification_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an organization's settings. + # + # @overload update_organization_settings(request, options = nil) + # Pass arguments to `update_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_organization_settings(organization_settings: nil, update_mask: nil) + # Pass arguments to `update_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param organization_settings [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings, ::Hash] + # Required. The organization settings resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the settings resource. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new + # + # # Call the update_organization_settings method. + # result = client.update_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. + # p result + # + def update_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.organization_settings&.name + header_params["organization_settings.name"] = request.organization_settings.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_organization_settings, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a source. + # + # @overload update_source(request, options = nil) + # Pass arguments to `update_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_source(source: nil, update_mask: nil) + # Pass arguments to `update_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param source [::Google::Cloud::SecurityCenter::V1p1beta1::Source, ::Hash] + # Required. The source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new + # + # # Call the update_source method. + # result = client.update_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. + # p result + # + def update_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.source&.name + header_params["source.name"] = request.source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates security marks. + # + # @overload update_security_marks(request, options = nil) + # Pass arguments to `update_security_marks` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) + # Pass arguments to `update_security_marks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_marks [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks, ::Hash] + # Required. The security marks resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # The time at which the updated SecurityMarks take effect. + # If not set uses current server time. Updates will be applied to the + # SecurityMarks that are active immediately preceding this time. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new + # + # # Call the update_security_marks method. + # result = client.update_security_marks request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks. + # p result + # + def update_security_marks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_security_marks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.security_marks&.name + header_params["security_marks.name"] = request.security_marks.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_security_marks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_security_marks, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecurityCenter API. + # + # This class represents the configuration for SecurityCenter, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SecurityCenter API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_source + ## + # RPC-specific configuration for `create_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_finding + ## + # RPC-specific configuration for `create_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_config + ## + # RPC-specific configuration for `delete_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_config + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `get_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_config + ## + # RPC-specific configuration for `get_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_organization_settings + ## + # RPC-specific configuration for `get_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_source + ## + # RPC-specific configuration for `group_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :group_assets + ## + # RPC-specific configuration for `group_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :group_findings + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_notification_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_configs + ## + # RPC-specific configuration for `list_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sources + ## + # RPC-specific configuration for `run_asset_discovery` + # @return [::Gapic::Config::Method] + # + attr_reader :run_asset_discovery + ## + # RPC-specific configuration for `set_finding_state` + # @return [::Gapic::Config::Method] + # + attr_reader :set_finding_state + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `update_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_finding + ## + # RPC-specific configuration for `update_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_config + ## + # RPC-specific configuration for `update_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_organization_settings + ## + # RPC-specific configuration for `update_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_source + ## + # RPC-specific configuration for `update_security_marks` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_marks + + # @private + def initialize parent_rpcs = nil + create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source + @create_source = ::Gapic::Config::Method.new create_source_config + create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding + @create_finding = ::Gapic::Config::Method.new create_finding_config + create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config + @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config + delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config + @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config + @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config + get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings + @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config + get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source + @get_source = ::Gapic::Config::Method.new get_source_config + group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets + @group_assets = ::Gapic::Config::Method.new group_assets_config + group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings + @group_findings = ::Gapic::Config::Method.new group_findings_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs + @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config + list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources + @list_sources = ::Gapic::Config::Method.new list_sources_config + run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery + @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config + set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state + @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding + @update_finding = ::Gapic::Config::Method.new update_finding_config + update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config + @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config + update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings + @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config + update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source + @update_source = ::Gapic::Config::Method.new update_source_config + update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks + @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.rb new file mode 100644 index 000000000000..cff88a0ffb4f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + module SecurityCenter + # Credentials for the SecurityCenter API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SECURITY_CENTER_CREDENTIALS", + "SECURITY_CENTER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SECURITY_CENTER_CREDENTIALS_JSON", + "SECURITY_CENTER_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb new file mode 100644 index 000000000000..3e582dfdb7f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + module SecurityCenter + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SecurityCenter Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.rb new file mode 100644 index 000000000000..7551d4c8776c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.rb @@ -0,0 +1,330 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1p1beta1 + module SecurityCenter + # Path helper methods for the SecurityCenter API. + module Paths + ## + # Create a fully-qualified Finding resource string. + # + # @overload finding_path(organization:, source:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/findings/{finding}` + # + # @param organization [String] + # @param source [String] + # @param finding [String] + # + # @overload finding_path(folder:, source:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/findings/{finding}` + # + # @param folder [String] + # @param source [String] + # @param finding [String] + # + # @overload finding_path(project:, source:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/findings/{finding}` + # + # @param project [String] + # @param source [String] + # @param finding [String] + # + # @return [::String] + def finding_path **args + resources = { + "finding:organization:source" => (proc do |organization:, source:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/findings/#{finding}" + end), + "finding:folder:source" => (proc do |folder:, source:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/findings/#{finding}" + end), + "finding:project:source" => (proc do |project:, source:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "projects/#{project}/sources/#{source}/findings/#{finding}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Folder resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}` + # + # @param folder [String] + # + # @return [::String] + def folder_path folder: + "folders/#{folder}" + end + + ## + # Create a fully-qualified NotificationConfig resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/notificationConfigs/{notification_config}` + # + # @param organization [String] + # @param notification_config [String] + # + # @return [::String] + def notification_config_path organization:, notification_config: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/notificationConfigs/#{notification_config}" + end + + ## + # Create a fully-qualified Organization resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}` + # + # @param organization [String] + # + # @return [::String] + def organization_path organization: + "organizations/#{organization}" + end + + ## + # Create a fully-qualified OrganizationSettings resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/organizationSettings` + # + # @param organization [String] + # + # @return [::String] + def organization_settings_path organization: + "organizations/#{organization}/organizationSettings" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified SecurityMarks resource string. + # + # @overload security_marks_path(organization:, asset:) + # The resource will be in the following format: + # + # `organizations/{organization}/assets/{asset}/securityMarks` + # + # @param organization [String] + # @param asset [String] + # + # @overload security_marks_path(organization:, source:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/findings/{finding}/securityMarks` + # + # @param organization [String] + # @param source [String] + # @param finding [String] + # + # @overload security_marks_path(folder:, asset:) + # The resource will be in the following format: + # + # `folders/{folder}/assets/{asset}/securityMarks` + # + # @param folder [String] + # @param asset [String] + # + # @overload security_marks_path(project:, asset:) + # The resource will be in the following format: + # + # `projects/{project}/assets/{asset}/securityMarks` + # + # @param project [String] + # @param asset [String] + # + # @overload security_marks_path(folder:, source:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/findings/{finding}/securityMarks` + # + # @param folder [String] + # @param source [String] + # @param finding [String] + # + # @overload security_marks_path(project:, source:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/findings/{finding}/securityMarks` + # + # @param project [String] + # @param source [String] + # @param finding [String] + # + # @return [::String] + def security_marks_path **args + resources = { + "asset:organization" => (proc do |organization:, asset:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/assets/#{asset}/securityMarks" + end), + "finding:organization:source" => (proc do |organization:, source:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/findings/#{finding}/securityMarks" + end), + "asset:folder" => (proc do |folder:, asset:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/assets/#{asset}/securityMarks" + end), + "asset:project" => (proc do |project:, asset:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/assets/#{asset}/securityMarks" + end), + "finding:folder:source" => (proc do |folder:, source:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/findings/#{finding}/securityMarks" + end), + "finding:project:source" => (proc do |project:, source:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "projects/#{project}/sources/#{source}/findings/#{finding}/securityMarks" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Source resource string. + # + # @overload source_path(organization:, source:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}` + # + # @param organization [String] + # @param source [String] + # + # @overload source_path(folder:, source:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}` + # + # @param folder [String] + # @param source [String] + # + # @overload source_path(project:, source:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}` + # + # @param project [String] + # @param source [String] + # + # @return [::String] + def source_path **args + resources = { + "organization:source" => (proc do |organization:, source:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}" + end), + "folder:source" => (proc do |folder:, source:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/sources/#{source}" + end), + "project:source" => (proc do |project:, source:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/sources/#{source}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Topic resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/topics/{topic}` + # + # @param project [String] + # @param topic [String] + # + # @return [::String] + def topic_path project:, topic: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/topics/#{topic}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.rb new file mode 100644 index 000000000000..942518e93e2c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security_center/v1p1beta1/version" + +require "google/cloud/security_center/v1p1beta1/security_center/credentials" +require "google/cloud/security_center/v1p1beta1/security_center/paths" +require "google/cloud/security_center/v1p1beta1/security_center/rest/operations" +require "google/cloud/security_center/v1p1beta1/security_center/rest/client" + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + ## + # V1p1Beta1 APIs for Security Center service. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/security_center/v1p1beta1/security_center/rest" + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + module SecurityCenter + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/security_center/v1p1beta1/security_center/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.rb new file mode 100644 index 000000000000..4856205779aa --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.rb @@ -0,0 +1,3048 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" +require "google/cloud/security_center/v1p1beta1/security_center/rest/service_stub" + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + module SecurityCenter + module Rest + ## + # REST client for the SecurityCenter service. + # + # V1p1Beta1 APIs for Security Center service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :security_center_stub + + ## + # Configure the SecurityCenter Client class. + # + # See {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenter clients + # ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecurityCenter", "V1p1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_source.timeout = 60.0 + + default_config.rpcs.create_finding.timeout = 60.0 + + default_config.rpcs.create_notification_config.timeout = 60.0 + + default_config.rpcs.delete_notification_config.timeout = 60.0 + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_notification_config.timeout = 60.0 + default_config.rpcs.get_notification_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_organization_settings.timeout = 60.0 + default_config.rpcs.get_organization_settings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_source.timeout = 60.0 + default_config.rpcs.get_source.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_assets.timeout = 480.0 + default_config.rpcs.group_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.group_findings.timeout = 480.0 + default_config.rpcs.group_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_assets.timeout = 480.0 + default_config.rpcs.list_assets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_findings.timeout = 480.0 + default_config.rpcs.list_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_notification_configs.timeout = 60.0 + default_config.rpcs.list_notification_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_sources.timeout = 60.0 + default_config.rpcs.list_sources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.run_asset_discovery.timeout = 60.0 + + default_config.rpcs.set_finding_state.timeout = 60.0 + + default_config.rpcs.set_iam_policy.timeout = 60.0 + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_finding.timeout = 60.0 + + default_config.rpcs.update_notification_config.timeout = 60.0 + + default_config.rpcs.update_organization_settings.timeout = 60.0 + + default_config.rpcs.update_source.timeout = 60.0 + + default_config.rpcs.update_security_marks.timeout = 480.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @security_center_stub.universe_domain + end + + ## + # Create a new SecurityCenter REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecurityCenter client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @security_center_stub = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @security_center_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @security_center_stub.logger + end + + # Service calls + + ## + # Creates a source. + # + # @overload create_source(request, options = nil) + # Pass arguments to `create_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_source(parent: nil, source: nil) + # Pass arguments to `create_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new source's parent. Its format should be + # "organizations/[organization_id]". + # @param source [::Google::Cloud::SecurityCenter::V1p1beta1::Source, ::Hash] + # Required. The Source being created, only the display_name and description will be + # used. All other fields will be ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new + # + # # Call the create_source method. + # result = client.create_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. + # p result + # + def create_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a finding. The corresponding source must exist for finding + # creation to succeed. + # + # @overload create_finding(request, options = nil) + # Pass arguments to `create_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_finding(parent: nil, finding_id: nil, finding: nil) + # Pass arguments to `create_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new finding's parent. Its format should be + # "organizations/[organization_id]/sources/[source_id]". + # @param finding_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # @param finding [::Google::Cloud::SecurityCenter::V1p1beta1::Finding, ::Hash] + # Required. The Finding being created. The name and security_marks will be ignored as + # they are both output only fields on this resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new + # + # # Call the create_finding method. + # result = client.create_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. + # p result + # + def create_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_finding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_finding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a notification config. + # + # @overload create_notification_config(request, options = nil) + # Pass arguments to `create_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) + # Pass arguments to `create_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new notification config's parent. Its format is + # "organizations/[organization_id]". + # @param config_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters, and contains alphanumeric + # characters, underscores or hyphens only. + # @param notification_config [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig, ::Hash] + # Required. The notification config being created. The name and the service account + # will be ignored as they are both output only fields on this resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new + # + # # Call the create_notification_config method. + # result = client.create_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + # p result + # + def create_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a notification config. + # + # @overload delete_notification_config(request, options = nil) + # Pass arguments to `delete_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_notification_config(name: nil) + # Pass arguments to `delete_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to delete. Its format is + # "organizations/[organization_id]/notificationConfigs/[config_id]". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new + # + # # Call the delete_notification_config method. + # result = client.delete_notification_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy on the specified Source. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a notification config. + # + # @overload get_notification_config(request, options = nil) + # Pass arguments to `get_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_notification_config(name: nil) + # Pass arguments to `get_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to get. Its format is + # "organizations/[organization_id]/notificationConfigs/[config_id]". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new + # + # # Call the get_notification_config method. + # result = client.get_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + # p result + # + def get_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the settings for an organization. + # + # @overload get_organization_settings(request, options = nil) + # Pass arguments to `get_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_organization_settings(name: nil) + # Pass arguments to `get_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the organization to get organization settings for. Its format is + # "organizations/[organization_id]/organizationSettings". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new + # + # # Call the get_organization_settings method. + # result = client.get_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. + # p result + # + def get_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_organization_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a source. + # + # @overload get_source(request, options = nil) + # Pass arguments to `get_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_source(name: nil) + # Pass arguments to `get_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Relative resource name of the source. Its format is + # "organizations/[organization_id]/source/[source_id]". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new + # + # # Call the get_source method. + # result = client.get_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. + # p result + # + def get_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization's assets and groups them by their specified + # properties. + # + # @overload group_assets(request, options = nil) + # Pass arguments to `group_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization to groupBy. Its format is + # "organizations/[organization_id], folders/[folder_id], or + # projects/[project_id]". + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_name_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping. The string + # value should follow SQL syntax: comma separated list of fields. For + # example: + # "security_center_properties.resource_project,security_center_properties.project". + # + # The following fields are supported when compare_duration is not set: + # + # * security_center_properties.resource_project + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_type + # * security_center_properties.resource_parent + # * security_center_properties.resource_parent_display_name + # + # The following fields are supported when compare_duration is set: + # + # * security_center_properties.resource_type + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_parent_display_name + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" property is + # updated to indicate whether the asset was added, removed, or remained + # present during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at reference_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at reference_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and reference_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param page_token [::String] + # The value returned by the last `GroupAssetsResponse`; indicates + # that this is a continuation of a prior `GroupAssets` call, and that the + # system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new + # + # # Call the group_assets method. + # result = client.group_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. + # p item + # end + # + def group_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.group_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.group_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.group_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.group_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_assets, "group_by_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization or source's findings and groups them by their + # specified properties. + # + # To group across all sources provide a `-` as the source id. + # Example: /v1/organizations/\\{organization_id}/sources/-/findings, + # /v1/folders/\\{folder_id}/sources/-/findings, + # /v1/projects/\\{project_id}/sources/-/findings + # + # @overload group_findings(request, options = nil) + # Pass arguments to `group_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source to groupBy. Its format is + # "organizations/[organization_id]/sources/[source_id]", + # folders/[folder_id]/sources/[source_id], or + # projects/[project_id]/sources/[source_id]. To groupBy across all sources + # provide a source_id of `-`. For example: + # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/-, + # or projects/\\{project_id}/sources/- + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # * severity: `=`, `:` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping (including + # `state_change`). The string value should follow SQL syntax: comma separated + # list of fields. For example: "parent,resource_name". + # + # The following fields are supported: + # + # * resource_name + # * category + # * state + # * parent + # * severity + # + # The following fields are supported when compare_duration is set: + # + # * state_change + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the GroupResult's "state_change" attribute is + # updated to indicate whether the finding had its state changed, the + # finding's state remained unchanged, or if the finding was added during the + # compare_duration period of time that precedes the read_time. This is the + # time between (read_time - compare_duration) and read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present + # at read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @param page_token [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new + # + # # Call the group_findings method. + # result = client.group_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. + # p item + # end + # + def group_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.group_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.group_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.group_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.group_findings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization's assets. + # + # @overload list_assets(request, options = nil) + # Pass arguments to `list_assets` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization assets should belong to. Its format is + # "organizations/[organization_id], folders/[folder_id], or + # projects/[project_id]". + # @param filter [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following are the allowed field and operator combinations: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,resource_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,resource_properties.a_property" and " + # name desc , resource_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # update_time + # resource_properties + # security_marks.marks + # security_center_properties.resource_name + # security_center_properties.resource_display_name + # security_center_properties.resource_parent + # security_center_properties.resource_parent_display_name + # security_center_properties.resource_project + # security_center_properties.resource_project_display_name + # security_center_properties.resource_type + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListAssetsResult's "state_change" + # attribute is updated to indicate whether the asset was added, removed, or + # remained present during the compare_duration period of time that precedes + # the read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at read_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at read_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the ListAssetsResult fields to be listed in the + # response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListAssetsResponse`; indicates + # that this is a continuation of a prior `ListAssets` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new + # + # # Call the list_assets method. + # result = client.list_assets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult. + # p item + # end + # + def list_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_assets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_assets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_assets, "list_assets_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization or source's findings. + # + # To list across all sources provide a `-` as the source id. + # Example: /v1p1beta1/organizations/\\{organization_id}/sources/-/findings + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source the findings belong to. Its format is + # "organizations/[organization_id]/sources/[source_id], + # folders/[folder_id]/sources/[source_id], or + # projects/[project_id]/sources/[source_id]". To list across all sources + # provide a source_id of `-`. For example: + # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/- or + # projects/\\{projects_id}/sources/- + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # * severity: `=`, `:` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # security_marks.marks: `=`, `:` + # source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,source_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,source_properties.a_property" and " + # name desc , source_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # source_properties + # security_marks.marks + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @param compare_duration [::Google::Protobuf::Duration, ::Hash] + # When compare_duration is set, the ListFindingsResult's "state_change" + # attribute is updated to indicate whether the finding had its state changed, + # the finding's state remained unchanged, or if the finding was added in any + # state during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present at + # read_time. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_findings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists notification configs. + # + # @overload list_notification_configs(request, options = nil) + # Pass arguments to `list_notification_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_notification_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization to list notification configs. + # Its format is "organizations/[organization_id]". + # @param page_token [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new + # + # # Call the list_notification_configs method. + # result = client.list_notification_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + # p item + # end + # + def list_notification_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_notification_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_notification_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_notification_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all sources belonging to an organization. + # + # @overload list_sources(request, options = nil) + # Pass arguments to `list_sources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent of sources to list. Its format should be + # "organizations/[organization_id], folders/[folder_id], or + # projects/[project_id]". + # @param page_token [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::Source>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::Source>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new + # + # # Call the list_sources method. + # result = client.list_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::Source. + # p item + # end + # + def list_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs asset discovery. The discovery is tracked with a long-running + # operation. + # + # This API can only be called with limited frequency for an organization. If + # it is called too frequently the caller will receive a TOO_MANY_REQUESTS + # error. + # + # @overload run_asset_discovery(request, options = nil) + # Pass arguments to `run_asset_discovery` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_asset_discovery(parent: nil) + # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the organization to run asset discovery for. Its format is + # "organizations/[organization_id]". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new + # + # # Call the run_asset_discovery method. + # result = client.run_asset_discovery request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_asset_discovery request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_asset_discovery.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_asset_discovery.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.run_asset_discovery request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the state of a finding. + # + # @overload set_finding_state(request, options = nil) + # Pass arguments to `set_finding_state` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_finding_state(name: nil, state: nil, start_time: nil) + # Pass arguments to `set_finding_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The relative resource name of the finding. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/sources/\\{source_id}/finding/\\{finding_id}". + # @param state [::Google::Cloud::SecurityCenter::V1p1beta1::Finding::State] + # Required. The desired State of the finding. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The time at which the updated state takes effect. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new + # + # # Call the set_finding_state method. + # result = client.set_finding_state request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. + # p result + # + def set_finding_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_finding_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_finding_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.set_finding_state request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified Source. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has on the specified source. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a finding. The corresponding source must exist for a + # finding creation to succeed. + # + # @overload update_finding(request, options = nil) + # Pass arguments to `update_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_finding(finding: nil, update_mask: nil) + # Pass arguments to `update_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param finding [::Google::Cloud::SecurityCenter::V1p1beta1::Finding, ::Hash] + # Required. The finding resource to update or create if it does not already exist. + # parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new + # + # # Call the update_finding method. + # result = client.update_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. + # p result + # + def update_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_finding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_finding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + # + # @overload update_notification_config(request, options = nil) + # Pass arguments to `update_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_notification_config(notification_config: nil, update_mask: nil) + # Pass arguments to `update_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_config [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig, ::Hash] + # Required. The notification config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new + # + # # Call the update_notification_config method. + # result = client.update_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + # p result + # + def update_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an organization's settings. + # + # @overload update_organization_settings(request, options = nil) + # Pass arguments to `update_organization_settings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_organization_settings(organization_settings: nil, update_mask: nil) + # Pass arguments to `update_organization_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param organization_settings [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings, ::Hash] + # Required. The organization settings resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the settings resource. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new + # + # # Call the update_organization_settings method. + # result = client.update_organization_settings request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. + # p result + # + def update_organization_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_organization_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_organization_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_organization_settings request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a source. + # + # @overload update_source(request, options = nil) + # Pass arguments to `update_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_source(source: nil, update_mask: nil) + # Pass arguments to `update_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param source [::Google::Cloud::SecurityCenter::V1p1beta1::Source, ::Hash] + # Required. The source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new + # + # # Call the update_source method. + # result = client.update_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. + # p result + # + def update_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates security marks. + # + # @overload update_security_marks(request, options = nil) + # Pass arguments to `update_security_marks` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) + # Pass arguments to `update_security_marks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_marks [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks, ::Hash] + # Required. The security marks resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # The time at which the updated SecurityMarks take effect. + # If not set uses current server time. Updates will be applied to the + # SecurityMarks that are active immediately preceding this time. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new + # + # # Call the update_security_marks method. + # result = client.update_security_marks request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks. + # p result + # + def update_security_marks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_security_marks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_security_marks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_security_marks request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecurityCenter REST API. + # + # This class represents the configuration for SecurityCenter REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_source.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the SecurityCenter API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_source + ## + # RPC-specific configuration for `create_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_finding + ## + # RPC-specific configuration for `create_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_config + ## + # RPC-specific configuration for `delete_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_config + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `get_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_config + ## + # RPC-specific configuration for `get_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_organization_settings + ## + # RPC-specific configuration for `get_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_source + ## + # RPC-specific configuration for `group_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :group_assets + ## + # RPC-specific configuration for `group_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :group_findings + ## + # RPC-specific configuration for `list_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assets + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_notification_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_configs + ## + # RPC-specific configuration for `list_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sources + ## + # RPC-specific configuration for `run_asset_discovery` + # @return [::Gapic::Config::Method] + # + attr_reader :run_asset_discovery + ## + # RPC-specific configuration for `set_finding_state` + # @return [::Gapic::Config::Method] + # + attr_reader :set_finding_state + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `update_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_finding + ## + # RPC-specific configuration for `update_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_config + ## + # RPC-specific configuration for `update_organization_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_organization_settings + ## + # RPC-specific configuration for `update_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_source + ## + # RPC-specific configuration for `update_security_marks` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_marks + + # @private + def initialize parent_rpcs = nil + create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source + @create_source = ::Gapic::Config::Method.new create_source_config + create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding + @create_finding = ::Gapic::Config::Method.new create_finding_config + create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config + @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config + delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config + @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config + @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config + get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings + @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config + get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source + @get_source = ::Gapic::Config::Method.new get_source_config + group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets + @group_assets = ::Gapic::Config::Method.new group_assets_config + group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings + @group_findings = ::Gapic::Config::Method.new group_findings_config + list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets + @list_assets = ::Gapic::Config::Method.new list_assets_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs + @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config + list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources + @list_sources = ::Gapic::Config::Method.new list_sources_config + run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery + @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config + set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state + @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding + @update_finding = ::Gapic::Config::Method.new update_finding_config + update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config + @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config + update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings + @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config + update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source + @update_source = ::Gapic::Config::Method.new update_source_config + update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks + @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.rb new file mode 100644 index 000000000000..6de3f7437ac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + module SecurityCenter + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SecurityCenter Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.rb new file mode 100644 index 000000000000..8b4fcab1731e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.rb @@ -0,0 +1,1645 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + module SecurityCenter + module Rest + ## + # REST service stub for the SecurityCenter service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # A result object deserialized from the server's reply + def create_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # A result object deserialized from the server's reply + def create_finding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_finding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_finding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # A result object deserialized from the server's reply + def create_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # A result object deserialized from the server's reply + def get_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # A result object deserialized from the server's reply + def get_organization_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_organization_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_organization_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # A result object deserialized from the server's reply + def get_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the group_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse] + # A result object deserialized from the server's reply + def group_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_group_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "group_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the group_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse] + # A result object deserialized from the server's reply + def group_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_group_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "group_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse] + # A result object deserialized from the server's reply + def list_assets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_assets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse] + # A result object deserialized from the server's reply + def list_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_notification_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse] + # A result object deserialized from the server's reply + def list_notification_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_notification_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_sources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse] + # A result object deserialized from the server's reply + def list_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the run_asset_discovery REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def run_asset_discovery request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_asset_discovery_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_asset_discovery", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_finding_state REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # A result object deserialized from the server's reply + def set_finding_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_finding_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_finding_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # A result object deserialized from the server's reply + def update_finding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_finding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_finding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # A result object deserialized from the server's reply + def update_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # A result object deserialized from the server's reply + def update_organization_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_organization_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_organization_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # A result object deserialized from the server's reply + def update_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_security_marks REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] + # A result object deserialized from the server's reply + def update_security_marks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_security_marks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_security_marks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/sources", + body: "source", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_finding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/findings", + body: "finding", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_organization_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/organizationSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the group_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_group_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/assets:group", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/assets:group", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/assets:group", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the group_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_group_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_assets REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_assets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/assets", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/assets", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/assets", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/findings", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/findings", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/findings", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_notification_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_notification_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/sources", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/sources", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/sources", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_asset_discovery REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_asset_discovery_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/assets:runDiscovery", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_finding_state REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_finding_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{name}:setState", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{name}:setState", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{name}:setState", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_finding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_organization_settings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_organization_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{organization_settings.name}", + body: "organization_settings", + matches: [ + ["organization_settings.name", %r{^organizations/[^/]+/organizationSettings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{source.name}", + body: "source", + matches: [ + ["source.name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_security_marks REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_security_marks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/version.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/version.rb new file mode 100644 index 000000000000..55106c9006d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/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 SecurityCenter + module V1p1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/asset_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/asset_pb.rb new file mode 100644 index 000000000000..9a12931a6f98 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/asset_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1p1beta1/asset.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v1p1beta1/folder_pb' +require 'google/cloud/securitycenter/v1p1beta1/security_marks_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/cloud/securitycenter/v1p1beta1/asset.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x19google/api/resource.proto\x1a\x32google/cloud/securitycenter/v1p1beta1/folder.proto\x1a:google/cloud/securitycenter/v1p1beta1/security_marks.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\x08\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12i\n\x1asecurity_center_properties\x18\x02 \x01(\x0b\x32\x45.google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties\x12\x61\n\x13resource_properties\x18\x07 \x03(\x0b\x32\x44.google.cloud.securitycenter.v1p1beta1.Asset.ResourcePropertiesEntry\x12L\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32\x34.google.cloud.securitycenter.v1p1beta1.SecurityMarks\x12/\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12J\n\niam_policy\x18\x0b \x01(\x0b\x32\x36.google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy\x12\x16\n\x0e\x63\x61nonical_name\x18\r \x01(\t\x1a\xc0\x02\n\x18SecurityCenterProperties\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x17\n\x0fresource_parent\x18\x03 \x01(\t\x12\x18\n\x10resource_project\x18\x04 \x01(\t\x12\x17\n\x0fresource_owners\x18\x05 \x03(\t\x12\x1d\n\x15resource_display_name\x18\x06 \x01(\t\x12$\n\x1cresource_parent_display_name\x18\x07 \x01(\t\x12%\n\x1dresource_project_display_name\x18\x08 \x01(\t\x12>\n\x07\x66olders\x18\n \x03(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.Folder\x1a \n\tIamPolicy\x12\x13\n\x0bpolicy_blob\x18\x01 \x01(\t\x1aQ\n\x17ResourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01:\x9a\x01\xea\x41\x96\x01\n#securitycenter.googleapis.com/Asset\x12+organizations/{organization}/assets/{asset}\x12\x1f\x66olders/{folder}/assets/{asset}\x12!projects/{project}/assets/{asset}B\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Asset").msgclass + Asset::SecurityCenterProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties").msgclass + Asset::IamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/finding_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/finding_pb.rb new file mode 100644 index 000000000000..050e7b68bfff --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/finding_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1p1beta1/finding.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v1p1beta1/security_marks_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/securitycenter/v1p1beta1/finding.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a:google/cloud/securitycenter/v1p1beta1/security_marks.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdf\x07\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\t\x12\x43\n\x05state\x18\x04 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1p1beta1.Finding.State\x12\x10\n\x08\x63\x61tegory\x18\x05 \x01(\t\x12\x14\n\x0c\x65xternal_uri\x18\x06 \x01(\t\x12_\n\x11source_properties\x18\x07 \x03(\x0b\x32\x44.google.cloud.securitycenter.v1p1beta1.Finding.SourcePropertiesEntry\x12Q\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32\x34.google.cloud.securitycenter.v1p1beta1.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x08severity\x18\r \x01(\x0e\x32\x37.google.cloud.securitycenter.v1p1beta1.Finding.Severity\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04:\xdb\x01\xea\x41\xd7\x01\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}B\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Finding").msgclass + Finding::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Finding.State").enummodule + Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Finding.Severity").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/folder_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/folder_pb.rb new file mode 100644 index 000000000000..2a78935f850c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/folder_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1p1beta1/folder.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v1p1beta1/folder.proto\x12%google.cloud.securitycenter.v1p1beta1\"G\n\x06\x46older\x12\x17\n\x0fresource_folder\x18\x01 \x01(\t\x12$\n\x1cresource_folder_display_name\x18\x02 \x01(\tB\x88\x02\n)com.google.cloud.securitycenter.v1p1beta1B\x0b\x46olderProtoP\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1Beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1p1Beta1 + Folder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Folder").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_config_pb.rb new file mode 100644 index 000000000000..f08fde86beee --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_config_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1p1beta1/notification_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/cloud/securitycenter/v1p1beta1/notification_config.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb6\x04\n\x12NotificationConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12W\n\nevent_type\x18\x03 \x01(\x0e\x32\x43.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType\x12\x36\n\x0cpubsub_topic\x18\x04 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x1c\n\x0fservice_account\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x65\n\x10streaming_config\x18\x06 \x01(\x0b\x32I.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfigH\x00\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\"4\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INDING\x10\x01:}\xea\x41z\n0securitycenter.googleapis.com/NotificationConfig\x12\x46organizations/{organization}/notificationConfigs/{notification_config}B\x0f\n\rnotify_configB\xbe\x02\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + NotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.NotificationConfig").msgclass + NotificationConfig::StreamingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig").msgclass + NotificationConfig::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_message_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_message_pb.rb new file mode 100644 index 000000000000..c696cbc0af35 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_message_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1p1beta1/notification_message.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v1p1beta1/finding_pb' +require 'google/cloud/securitycenter/v1p1beta1/resource_pb' + + +descriptor_data = "\n@google/cloud/securitycenter/v1p1beta1/notification_message.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x33google/cloud/securitycenter/v1p1beta1/finding.proto\x1a\x34google/cloud/securitycenter/v1p1beta1/resource.proto\"\xc6\x01\n\x13NotificationMessage\x12 \n\x18notification_config_name\x18\x01 \x01(\t\x12\x41\n\x07\x66inding\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1p1beta1.FindingH\x00\x12\x41\n\x08resource\x18\x03 \x01(\x0b\x32/.google.cloud.securitycenter.v1p1beta1.ResourceB\x07\n\x05\x65ventB\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + NotificationMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.NotificationMessage").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/organization_settings_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/organization_settings_pb.rb new file mode 100644 index 000000000000..d97b8888bc15 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/organization_settings_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1p1beta1/organization_settings.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\nAgoogle/cloud/securitycenter/v1p1beta1/organization_settings.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x19google/api/resource.proto\"\xac\x04\n\x14OrganizationSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1e\n\x16\x65nable_asset_discovery\x18\x02 \x01(\x08\x12p\n\x16\x61sset_discovery_config\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig\x1a\x87\x02\n\x14\x41ssetDiscoveryConfig\x12\x13\n\x0bproject_ids\x18\x01 \x03(\t\x12v\n\x0einclusion_mode\x18\x02 \x01(\x0e\x32^.google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode\x12\x12\n\nfolder_ids\x18\x03 \x03(\t\"N\n\rInclusionMode\x12\x1e\n\x1aINCLUSION_MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINCLUDE_ONLY\x10\x01\x12\x0b\n\x07\x45XCLUDE\x10\x02:j\xea\x41g\n2securitycenter.googleapis.com/OrganizationSettings\x12\x31organizations/{organization}/organizationSettingsB\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + OrganizationSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.OrganizationSettings").msgclass + OrganizationSettings::AssetDiscoveryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig").msgclass + OrganizationSettings::AssetDiscoveryConfig::InclusionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/resource_pb.rb new file mode 100644 index 000000000000..74eac8cc1a2c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/resource_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1p1beta1/resource.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/securitycenter/v1p1beta1/folder_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v1p1beta1/resource.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x32google/cloud/securitycenter/v1p1beta1/folder.proto\"\xb9\x01\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07project\x18\x02 \x01(\t\x12\x1c\n\x14project_display_name\x18\x03 \x01(\t\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x05 \x01(\t\x12\x43\n\x07\x66olders\x18\x07 \x03(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.FolderB\x03\xe0\x41\x03\x42\x8a\x02\n)com.google.cloud.securitycenter.v1p1beta1B\rResourceProtoP\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Resource").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response_pb.rb new file mode 100644 index 000000000000..b8264e7a8867 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\nHgoogle/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x1egoogle/protobuf/duration.proto\"\xee\x01\n\x19RunAssetDiscoveryResponse\x12U\n\x05state\x18\x01 \x01(\x0e\x32\x46.google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"M\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tCOMPLETED\x10\x01\x12\x0e\n\nSUPERSEDED\x10\x02\x12\x0e\n\nTERMINATED\x10\x03\x42\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + RunAssetDiscoveryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse").msgclass + RunAssetDiscoveryResponse::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/security_marks_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/security_marks_pb.rb new file mode 100644 index 000000000000..e31759178cca --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/security_marks_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1p1beta1/security_marks.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n:google/cloud/securitycenter/v1p1beta1/security_marks.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x19google/api/resource.proto\"\xdc\x04\n\rSecurityMarks\x12\x0c\n\x04name\x18\x01 \x01(\t\x12N\n\x05marks\x18\x02 \x03(\x0b\x32?.google.cloud.securitycenter.v1p1beta1.SecurityMarks.MarksEntry\x12\x16\n\x0e\x63\x61nonical_name\x18\x03 \x01(\t\x1a,\n\nMarksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa6\x03\xea\x41\xa2\x03\n+securitycenter.googleapis.com/SecurityMarks\x12\x39organizations/{organization}/assets/{asset}/securityMarks\x12Norganizations/{organization}/sources/{source}/findings/{finding}/securityMarks\x12-folders/{folder}/assets/{asset}/securityMarks\x12/projects/{project}/assets/{asset}/securityMarks\x12\x42\x66olders/{folder}/sources/{source}/findings/{finding}/securityMarks\x12\x44projects/{project}/sources/{source}/findings/{finding}/securityMarksB\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + SecurityMarks = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.SecurityMarks").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb.rb new file mode 100644 index 000000000000..fb06f85622aa --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v1p1beta1/notification_message_pb' +require 'google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v1p1beta1/asset_pb' +require 'google/cloud/securitycenter/v1p1beta1/finding_pb' +require 'google/cloud/securitycenter/v1p1beta1/folder_pb' +require 'google/cloud/securitycenter/v1p1beta1/notification_config_pb' +require 'google/cloud/securitycenter/v1p1beta1/organization_settings_pb' +require 'google/cloud/securitycenter/v1p1beta1/security_marks_pb' +require 'google/cloud/securitycenter/v1p1beta1/source_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nBgoogle/cloud/securitycenter/v1p1beta1/securitycenter_service.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a@google/cloud/securitycenter/v1p1beta1/notification_message.proto\x1aHgoogle/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/securitycenter/v1p1beta1/asset.proto\x1a\x33google/cloud/securitycenter/v1p1beta1/finding.proto\x1a\x32google/cloud/securitycenter/v1p1beta1/folder.proto\x1a?google/cloud/securitycenter/v1p1beta1/notification_config.proto\x1a\x41google/cloud/securitycenter/v1p1beta1/organization_settings.proto\x1a:google/cloud/securitycenter/v1p1beta1/security_marks.proto\x1a\x32google/cloud/securitycenter/v1p1beta1/source.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x01\n\x14\x43reateFindingRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x17\n\nfinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x07\x66inding\x18\x03 \x01(\x0b\x32..google.cloud.securitycenter.v1p1beta1.FindingB\x03\xe0\x41\x02\"\xe0\x01\n\x1f\x43reateNotificationConfigRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x16\n\tconfig_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12[\n\x13notification_config\x18\x03 \x01(\x0b\x32\x39.google.cloud.securitycenter.v1p1beta1.NotificationConfigB\x03\xe0\x41\x02\"\xa3\x01\n\x13\x43reateSourceRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x42\n\x06source\x18\x02 \x01(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.SourceB\x03\xe0\x41\x02\"i\n\x1f\x44\x65leteNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"f\n\x1cGetNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"j\n\x1eGetOrganizationSettingsRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2securitycenter.googleapis.com/OrganizationSettings\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\x83\x02\n\x12GroupAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x10\x63ompare_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xbf\x01\n\x13GroupAssetsResponse\x12L\n\x10group_by_results\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1p1beta1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\x86\x02\n\x14GroupFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xc1\x01\n\x15GroupFindingsResponse\x12L\n\x10group_by_results\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1p1beta1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\xbf\x01\n\x0bGroupResult\x12V\n\nproperties\x18\x01 \x03(\x0b\x32\x42.google.cloud.securitycenter.v1p1beta1.GroupResult.PropertiesEntry\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x1aI\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"\x91\x01\n\x1eListNotificationConfigsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x93\x01\n\x1fListNotificationConfigsResponse\x12W\n\x14notification_configs\x18\x01 \x03(\x0b\x32\x39.google.cloud.securitycenter.v1p1beta1.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x12ListSourcesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$securitycenter.googleapis.com/Source\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x07 \x01(\x05\"n\n\x13ListSourcesResponse\x12>\n\x07sources\x18\x01 \x03(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.Source\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x02\n\x11ListAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xd8\x03\n\x12ListAssetsResponse\x12g\n\x13list_assets_results\x18\x01 \x03(\x0b\x32J.google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xfc\x01\n\x10ListAssetsResult\x12;\n\x05\x61sset\x18\x01 \x01(\x0b\x32,.google.cloud.securitycenter.v1p1beta1.Asset\x12l\n\x0cstate_change\x18\x02 \x01(\x0e\x32V.google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange\"=\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x01\x12\x0b\n\x07REMOVED\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\"\xb0\x02\n\x13ListFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xab\x06\n\x14ListFindingsResponse\x12m\n\x15list_findings_results\x18\x01 \x03(\x0b\x32N.google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xc7\x04\n\x12ListFindingsResult\x12?\n\x07\x66inding\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1p1beta1.Finding\x12p\n\x0cstate_change\x18\x02 \x01(\x0e\x32Z.google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange\x12n\n\x08resource\x18\x03 \x01(\x0b\x32W.google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xbe\x01\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x1c\n\x14project_display_name\x18\x03 \x01(\t\x12\x13\n\x0bparent_name\x18\x04 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x05 \x01(\t\x12>\n\x07\x66olders\x18\n \x03(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.Folder\"M\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\x0b\n\x07\x43HANGED\x10\x01\x12\r\n\tUNCHANGED\x10\x02\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x03\x12\x0b\n\x07REMOVED\x10\x04\"\xd4\x01\n\x16SetFindingStateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1p1beta1.Finding.StateB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"d\n\x18RunAssetDiscoveryRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\"\x8d\x01\n\x14UpdateFindingRequest\x12\x44\n\x07\x66inding\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1p1beta1.FindingB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xaf\x01\n\x1fUpdateNotificationConfigRequest\x12[\n\x13notification_config\x18\x01 \x01(\x0b\x32\x39.google.cloud.securitycenter.v1p1beta1.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb5\x01\n!UpdateOrganizationSettingsRequest\x12_\n\x15organization_settings\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v1p1beta1.OrganizationSettingsB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x8a\x01\n\x13UpdateSourceRequest\x12\x42\n\x06source\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xd0\x01\n\x1aUpdateSecurityMarksRequest\x12Q\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32\x34.google.cloud.securitycenter.v1p1beta1.SecurityMarksB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xf8\x33\n\x0eSecurityCenter\x12\xc6\x01\n\x0c\x43reateSource\x12:.google.cloud.securitycenter.v1p1beta1.CreateSourceRequest\x1a-.google.cloud.securitycenter.v1p1beta1.Source\"K\xda\x41\rparent,source\x82\xd3\xe4\x93\x02\x35\"+/v1p1beta1/{parent=organizations/*}/sources:\x06source\x12\xfd\x01\n\rCreateFinding\x12;.google.cloud.securitycenter.v1p1beta1.CreateFindingRequest\x1a..google.cloud.securitycenter.v1p1beta1.Finding\"\x7f\xda\x41\x19parent,finding_id,finding\xda\x41\x19parent,finding,finding_id\x82\xd3\xe4\x93\x02\x41\"6/v1p1beta1/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\xb8\x02\n\x18\x43reateNotificationConfig\x12\x46.google.cloud.securitycenter.v1p1beta1.CreateNotificationConfigRequest\x1a\x39.google.cloud.securitycenter.v1p1beta1.NotificationConfig\"\x98\x01\xda\x41$parent,config_id,notification_config\xda\x41\x1aparent,notification_config\x82\xd3\xe4\x93\x02N\"7/v1p1beta1/{parent=organizations/*}/notificationConfigs:\x13notification_config\x12\xc2\x01\n\x18\x44\x65leteNotificationConfig\x12\x46.google.cloud.securitycenter.v1p1beta1.DeleteNotificationConfigRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1p1beta1/{name=organizations/*/notificationConfigs/*}\x12\x9d\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"R\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x41\"\"9/v1p1beta1/{name=folders/*/sources/*/findings/*}:setState:\x01*Z?\":/v1p1beta1/{name=projects/*/sources/*/findings/*}:setState:\x01*\x12\xa4\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Y\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x41\"/v1p1beta1/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZC28/v1p1beta1/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZD29/v1p1beta1/{finding.name=projects/*/sources/*/findings/*}:\x07\x66inding\x12\xc0\x02\n\x18UpdateNotificationConfig\x12\x46.google.cloud.securitycenter.v1p1beta1.UpdateNotificationConfigRequest\x1a\x39.google.cloud.securitycenter.v1p1beta1.NotificationConfig\"\xa0\x01\xda\x41\x13notification_config\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\x62\x32K/v1p1beta1/{notification_config.name=organizations/*/notificationConfigs/*}:\x13notification_config\x12\xa9\x02\n\x1aUpdateOrganizationSettings\x12H.google.cloud.securitycenter.v1p1beta1.UpdateOrganizationSettingsRequest\x1a;.google.cloud.securitycenter.v1p1beta1.OrganizationSettings\"\x83\x01\xda\x41\x15organization_settings\x82\xd3\xe4\x93\x02\x65\x32L/v1p1beta1/{organization_settings.name=organizations/*/organizationSettings}:\x15organization_settings\x12\xdb\x01\n\x0cUpdateSource\x12:.google.cloud.securitycenter.v1p1beta1.UpdateSourceRequest\x1a-.google.cloud.securitycenter.v1p1beta1.Source\"`\xda\x41\x06source\xda\x41\x12source,update_mask\x82\xd3\xe4\x93\x02<22/v1p1beta1/{source.name=organizations/*/sources/*}:\x06source\x12\xf4\x05\n\x13UpdateSecurityMarks\x12\x41.google.cloud.securitycenter.v1p1beta1.UpdateSecurityMarksRequest\x1a\x34.google.cloud.securitycenter.v1p1beta1.SecurityMarks\"\xe3\x04\xda\x41\x0esecurity_marks\xda\x41\x1asecurity_marks,update_mask\x82\xd3\xe4\x93\x02\xae\x04\x32G/v1p1beta1/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZS2A/v1p1beta1/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZT2B/v1p1beta1/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZe2S/v1p1beta1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZ_2M/v1p1beta1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZ`2N/v1p1beta1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marks\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1P\x00P\x01\x62\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + CreateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.CreateFindingRequest").msgclass + CreateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.CreateNotificationConfigRequest").msgclass + CreateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.CreateSourceRequest").msgclass + DeleteNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.DeleteNotificationConfigRequest").msgclass + GetNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GetNotificationConfigRequest").msgclass + GetOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GetOrganizationSettingsRequest").msgclass + GetSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GetSourceRequest").msgclass + GroupAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest").msgclass + GroupAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GroupAssetsResponse").msgclass + GroupFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest").msgclass + GroupFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GroupFindingsResponse").msgclass + GroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GroupResult").msgclass + ListNotificationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsRequest").msgclass + ListNotificationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsResponse").msgclass + ListSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListSourcesRequest").msgclass + ListSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListSourcesResponse").msgclass + ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListAssetsRequest").msgclass + ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListAssetsResponse").msgclass + ListAssetsResponse::ListAssetsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult").msgclass + ListAssetsResponse::ListAssetsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange").enummodule + ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListFindingsRequest").msgclass + ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListFindingsResponse").msgclass + ListFindingsResponse::ListFindingsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult").msgclass + ListFindingsResponse::ListFindingsResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.Resource").msgclass + ListFindingsResponse::ListFindingsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange").enummodule + SetFindingStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.SetFindingStateRequest").msgclass + RunAssetDiscoveryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryRequest").msgclass + UpdateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.UpdateFindingRequest").msgclass + UpdateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.UpdateNotificationConfigRequest").msgclass + UpdateOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.UpdateOrganizationSettingsRequest").msgclass + UpdateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.UpdateSourceRequest").msgclass + UpdateSecurityMarksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.UpdateSecurityMarksRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb new file mode 100644 index 000000000000..76c57914966b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb @@ -0,0 +1,107 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V1p1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb' + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + module SecurityCenter + # V1p1Beta1 APIs for Security Center service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.securitycenter.v1p1beta1.SecurityCenter' + + # Creates a source. + rpc :CreateSource, ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Source + # Creates a finding. The corresponding source must exist for finding + # creation to succeed. + rpc :CreateFinding, ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Finding + # Creates a notification config. + rpc :CreateNotificationConfig, ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig + # Deletes a notification config. + rpc :DeleteNotificationConfig, ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest, ::Google::Protobuf::Empty + # Gets the access control policy on the specified Source. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets a notification config. + rpc :GetNotificationConfig, ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig + # Gets the settings for an organization. + rpc :GetOrganizationSettings, ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings + # Gets a source. + rpc :GetSource, ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Source + # Filters an organization's assets and groups them by their specified + # properties. + rpc :GroupAssets, ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse + # Filters an organization or source's findings and groups them by their + # specified properties. + # + # To group across all sources provide a `-` as the source id. + # Example: /v1/organizations/{organization_id}/sources/-/findings, + # /v1/folders/{folder_id}/sources/-/findings, + # /v1/projects/{project_id}/sources/-/findings + rpc :GroupFindings, ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse + # Lists an organization's assets. + rpc :ListAssets, ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse + # Lists an organization or source's findings. + # + # To list across all sources provide a `-` as the source id. + # Example: /v1p1beta1/organizations/{organization_id}/sources/-/findings + rpc :ListFindings, ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse + # Lists notification configs. + rpc :ListNotificationConfigs, ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse + # Lists all sources belonging to an organization. + rpc :ListSources, ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse + # Runs asset discovery. The discovery is tracked with a long-running + # operation. + # + # This API can only be called with limited frequency for an organization. If + # it is called too frequently the caller will receive a TOO_MANY_REQUESTS + # error. + rpc :RunAssetDiscovery, ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest, ::Google::Longrunning::Operation + # Updates the state of a finding. + rpc :SetFindingState, ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Finding + # Sets the access control policy on the specified Source. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns the permissions that a caller has on the specified source. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Creates or updates a finding. The corresponding source must exist for a + # finding creation to succeed. + rpc :UpdateFinding, ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Finding + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + rpc :UpdateNotificationConfig, ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig + # Updates an organization's settings. + rpc :UpdateOrganizationSettings, ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings + # Updates a source. + rpc :UpdateSource, ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Source + # Updates security marks. + rpc :UpdateSecurityMarks, ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/source_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/source_pb.rb new file mode 100644 index 000000000000..4315dc444ba5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/source_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v1p1beta1/source.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n2google/cloud/securitycenter/v1p1beta1/source.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x19google/api/resource.proto\"\xfd\x01\n\x06Source\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t:\xa1\x01\xea\x41\x9d\x01\n$securitycenter.googleapis.com/Source\x12-organizations/{organization}/sources/{source}\x12!folders/{folder}/sources/{source}\x12#projects/{project}/sources/{source}B\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Source").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/README.md new file mode 100644 index 000000000000..a4968e1aaa4d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Security Command Center V1p1beta1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.rb new file mode 100644 index 000000000000..84c95aa10132 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1p1beta1 + # Security Command Center representation of a Google Cloud + # resource. + # + # The Asset is a Security Command Center resource that captures information + # about a single Google Cloud resource. All modifications to an Asset are only + # within the context of Security Command Center and don't affect the referenced + # Google Cloud resource. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this asset. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/assets/\\{asset_id}". + # @!attribute [rw] security_center_properties + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Asset::SecurityCenterProperties] + # Security Command Center managed properties. These properties are managed by + # Security Command Center and cannot be modified by the user. + # @!attribute [rw] resource_properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Resource managed properties. These properties are managed and defined by + # the Google Cloud resource and cannot be modified by the user. + # @!attribute [rw] security_marks + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] + # User specified security marks. These marks are entirely managed by the user + # and come from the SecurityMarks resource that belongs to the asset. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the asset was created in Security Command Center. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the asset was last updated or added in Cloud SCC. + # @!attribute [rw] iam_policy + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Asset::IamPolicy] + # Cloud IAM Policy information associated with the Google Cloud resource + # described by the Security Command Center asset. This information is managed + # and defined by the Google Cloud resource and cannot be modified by the + # user. + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the resource. It's either + # "organizations/\\{organization_id}/assets/\\{asset_id}", + # "folders/\\{folder_id}/assets/\\{asset_id}" or + # "projects/\\{project_number}/assets/\\{asset_id}", depending on the closest CRM + # ancestor of the resource. + class Asset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Security Command Center managed properties. These properties are managed by + # Security Command Center and cannot be modified by the user. + # @!attribute [rw] resource_name + # @return [::String] + # The full resource name of the Google Cloud resource this asset + # represents. This field is immutable after create time. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_type + # @return [::String] + # The type of the Google Cloud resource. Examples include: APPLICATION, + # PROJECT, and ORGANIZATION. This is a case insensitive field defined by + # Security Command Center and/or the producer of the resource and is + # immutable after create time. + # @!attribute [rw] resource_parent + # @return [::String] + # The full resource name of the immediate parent of the resource. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_project + # @return [::String] + # The full resource name of the project the resource belongs to. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_owners + # @return [::Array<::String>] + # Owners of the Google Cloud resource. + # @!attribute [rw] resource_display_name + # @return [::String] + # The user defined display name for this resource. + # @!attribute [rw] resource_parent_display_name + # @return [::String] + # The user defined display name for the parent of this resource. + # @!attribute [rw] resource_project_display_name + # @return [::String] + # The user defined display name for the project of this resource. + # @!attribute [rw] folders + # @return [::Array<::Google::Cloud::SecurityCenter::V1p1Beta1::Folder>] + # Contains a Folder message for each folder in the assets ancestry. + # The first folder is the deepest nested folder, and the last folder is the + # folder directly under the Organization. + class SecurityCenterProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Cloud IAM Policy information associated with the Google Cloud resource + # described by the Security Command Center asset. This information is managed + # and defined by the Google Cloud resource and cannot be modified by the + # user. + # @!attribute [rw] policy_blob + # @return [::String] + # The JSON representation of the Policy associated with the asset. + # See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for + # format details. + class IamPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class ResourcePropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.rb new file mode 100644 index 000000000000..9308757027de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.rb @@ -0,0 +1,146 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1p1beta1 + # Security Command Center finding. + # + # A finding is a record of assessment data (security, risk, health or privacy) + # ingested into Security Command Center for presentation, notification, + # analysis, policy testing, and enforcement. For example, an XSS vulnerability + # in an App Engine application is a finding. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this finding. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}" + # @!attribute [rw] parent + # @return [::String] + # The relative resource name of the source the finding belongs to. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # This field is immutable after creation time. + # For example: + # "organizations/\\{organization_id}/sources/\\{source_id}" + # @!attribute [rw] resource_name + # @return [::String] + # For findings on Google Cloud resources, the full resource + # name of the Google Cloud resource this finding is for. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # When the finding is for a non-Google Cloud resource, the resourceName can + # be a customer or partner defined string. This field is immutable after + # creation time. + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding::State] + # The state of the finding. + # @!attribute [rw] category + # @return [::String] + # The additional taxonomy group within findings from a given source. + # This field is immutable after creation time. + # Example: "XSS_FLASH_INJECTION" + # @!attribute [rw] external_uri + # @return [::String] + # The URI that, if available, points to a web page outside of Security + # Command Center where additional information about the finding can be found. + # This field is guaranteed to be either empty or a well formed URL. + # @!attribute [rw] source_properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Source specific properties. These properties are managed by the source + # that writes the finding. The key names in the source_properties map must be + # between 1 and 255 characters, and must start with a letter and contain + # alphanumeric characters or underscores only. + # @!attribute [r] security_marks + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] + # Output only. User specified security marks. These marks are entirely + # managed by the user and come from the SecurityMarks resource that belongs + # to the finding. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the event took place, or when an update to the finding + # occurred. For example, if the finding represents an open firewall it would + # capture the time the detector believes the firewall became open. The + # accuracy is determined by the detector. If the finding were to be resolved + # afterward, this time would reflect when the finding was resolved. Must not + # be set to a value greater than the current timestamp. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the finding was created in Security Command Center. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding::Severity] + # The severity of the finding. This field is managed by the source that + # writes the finding. + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the finding. It's either + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}", + # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}" or + # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}", + # depending on the closest CRM ancestor of the resource associated with the + # finding. + class Finding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class SourcePropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of the finding. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The finding requires attention and has not been addressed yet. + ACTIVE = 1 + + # The finding has been fixed, triaged as a non-issue or otherwise addressed + # and is no longer active. + INACTIVE = 2 + end + + # The severity of the finding. This field is managed by the source that + # writes the finding. + module Severity + # No severity specified. The default value. + SEVERITY_UNSPECIFIED = 0 + + # Critical severity. + CRITICAL = 1 + + # High severity. + HIGH = 2 + + # Medium severity. + MEDIUM = 3 + + # Low severity. + LOW = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.rb new file mode 100644 index 000000000000..f816affff89c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1p1Beta1 + # Message that contains the resource name and display name of a folder + # resource. + # @!attribute [rw] resource_folder + # @return [::String] + # Full resource name of this folder. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_folder_display_name + # @return [::String] + # The user defined display name for this folder. + class Folder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.rb new file mode 100644 index 000000000000..5062c0b8e520 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + # Security Command Center notification configs. + # + # A notification config is a Security Command Center resource that contains the + # configuration to send notifications for create/update events of findings, + # assets and etc. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this notification config. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/notificationConfigs/notify_public_bucket". + # @!attribute [rw] description + # @return [::String] + # The description of the notification config (max of 1024 characters). + # @!attribute [rw] event_type + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig::EventType] + # The type of events the config is for, e.g. FINDING. + # @!attribute [rw] pubsub_topic + # @return [::String] + # The Pub/Sub topic to send notifications to. Its format is + # "projects/[project_id]/topics/[topic]". + # @!attribute [r] service_account + # @return [::String] + # Output only. The service account that needs "pubsub.topics.publish" + # permission to publish to the Pub/Sub topic. + # @!attribute [rw] streaming_config + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig::StreamingConfig] + # The config for triggering streaming-based notifications. + class NotificationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The config for streaming-based notifications, which send each event as soon + # as it is detected. + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across create/update events + # of assets or findings as specified by the event type. The expression is a + # list of zero or more restrictions combined via logical operators `AND` + # and `OR`. Parentheses are supported, and `OR` has higher precedence than + # `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + class StreamingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of events. + module EventType + # Unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0 + + # Events for findings. + FINDING = 1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.rb new file mode 100644 index 000000000000..6948b659b221 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + # Security Command Center's Notification + # @!attribute [rw] notification_config_name + # @return [::String] + # Name of the notification config that generated current notification. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # If it's a Finding based notification config, this field will be + # populated. + # @!attribute [rw] resource + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Resource] + # The Cloud resource tied to the notification. + class NotificationMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.rb new file mode 100644 index 000000000000..c69cb73d05e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1p1beta1 + # User specified settings that are attached to the Security Command + # Center organization. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of the settings. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/organizationSettings". + # @!attribute [rw] enable_asset_discovery + # @return [::Boolean] + # A flag that indicates if Asset Discovery should be enabled. If the flag is + # set to `true`, then discovery of assets will occur. If it is set to `false, + # all historical assets will remain, but discovery of future assets will not + # occur. + # @!attribute [rw] asset_discovery_config + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings::AssetDiscoveryConfig] + # The configuration used for Asset Discovery runs. + class OrganizationSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration used for Asset Discovery runs. + # @!attribute [rw] project_ids + # @return [::Array<::String>] + # The project ids to use for filtering asset discovery. + # @!attribute [rw] inclusion_mode + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings::AssetDiscoveryConfig::InclusionMode] + # The mode to use for filtering asset discovery. + # @!attribute [rw] folder_ids + # @return [::Array<::String>] + # The folder ids to use for filtering asset discovery. + # It consists of only digits, e.g., 756619654966. + class AssetDiscoveryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The mode of inclusion when running Asset Discovery. + # Asset discovery can be limited by explicitly identifying projects to be + # included or excluded. If INCLUDE_ONLY is set, then only those projects + # within the organization and their children are discovered during asset + # discovery. If EXCLUDE is set, then projects that don't match those + # projects are discovered during asset discovery. If neither are set, then + # all projects within the organization are discovered during asset + # discovery. + module InclusionMode + # Unspecified. Setting the mode with this value will disable + # inclusion/exclusion filtering for Asset Discovery. + INCLUSION_MODE_UNSPECIFIED = 0 + + # Asset Discovery will capture only the resources within the projects + # specified. All other resources will be ignored. + INCLUDE_ONLY = 1 + + # Asset Discovery will ignore all resources under the projects specified. + # All other resources will be retrieved. + EXCLUDE = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.rb new file mode 100644 index 000000000000..0fe81011a51b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + # Information related to the Google Cloud resource. + # @!attribute [rw] name + # @return [::String] + # The full resource name of the resource. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] project + # @return [::String] + # The full resource name of project that the resource belongs to. + # @!attribute [rw] project_display_name + # @return [::String] + # The human readable name of project that the resource belongs to. + # @!attribute [rw] parent + # @return [::String] + # The full resource name of resource's parent. + # @!attribute [rw] parent_display_name + # @return [::String] + # The human readable name of resource's parent. + # @!attribute [r] folders + # @return [::Array<::Google::Cloud::SecurityCenter::V1p1Beta1::Folder>] + # Output only. Contains a Folder message for each folder in the assets ancestry. + # The first folder is the deepest nested folder, and the last folder is the + # folder directly under the Organization. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.rb new file mode 100644 index 000000000000..ed38b84c1d65 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + # Response of asset discovery run + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryResponse::State] + # The state of an asset discovery run. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # The duration between asset discovery run start and end + class RunAssetDiscoveryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of an asset discovery run. + module State + # Asset discovery run state was unspecified. + STATE_UNSPECIFIED = 0 + + # Asset discovery run completed successfully. + COMPLETED = 1 + + # Asset discovery run was cancelled with tasks still pending, as another + # run for the same organization was started with a higher priority. + SUPERSEDED = 2 + + # Asset discovery run was killed and terminated. + TERMINATED = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.rb new file mode 100644 index 000000000000..db78ba561912 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + # User specified security marks that are attached to the parent Security + # Command Center resource. Security marks are scoped within a Security Command + # Center organization -- they can be modified and viewed by all users who have + # proper permissions on the organization. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of the SecurityMarks. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Examples: + # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks". + # @!attribute [rw] marks + # @return [::Google::Protobuf::Map{::String => ::String}] + # Mutable user specified security marks belonging to the parent resource. + # Constraints are as follows: + # + # * Keys and values are treated as case insensitive + # * Keys must be between 1 - 256 characters (inclusive) + # * Keys must be letters, numbers, underscores, or dashes + # * Values have leading and trailing whitespace trimmed, remaining + # characters must be between 1 - 4096 characters (inclusive) + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the marks. + # Examples: + # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" + # "folders/\\{folder_id}/assets/\\{asset_id}/securityMarks" + # "projects/\\{project_number}/assets/\\{asset_id}/securityMarks" + # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" + # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" + # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" + class SecurityMarks + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MarksEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb new file mode 100644 index 000000000000..a2252480add8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb @@ -0,0 +1,1053 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1p1beta1 + # Request message for creating a finding. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new finding's parent. Its format should be + # "organizations/[organization_id]/sources/[source_id]". + # @!attribute [rw] finding_id + # @return [::String] + # Required. Unique identifier provided by the client within the parent scope. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # Required. The Finding being created. The name and security_marks will be ignored as + # they are both output only fields on this resource. + class CreateFindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a notification config. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new notification config's parent. Its format is + # "organizations/[organization_id]". + # @!attribute [rw] config_id + # @return [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters, and contains alphanumeric + # characters, underscores or hyphens only. + # @!attribute [rw] notification_config + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # Required. The notification config being created. The name and the service account + # will be ignored as they are both output only fields on this resource. + class CreateNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a source. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new source's parent. Its format should be + # "organizations/[organization_id]". + # @!attribute [rw] source + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # Required. The Source being created, only the display_name and description will be + # used. All other fields will be ignored. + class CreateSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a notification config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the notification config to delete. Its format is + # "organizations/[organization_id]/notificationConfigs/[config_id]". + class DeleteNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a notification config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the notification config to get. Its format is + # "organizations/[organization_id]/notificationConfigs/[config_id]". + class GetNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting organization settings. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the organization to get organization settings for. Its format is + # "organizations/[organization_id]/organizationSettings". + class GetOrganizationSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a source. + # @!attribute [rw] name + # @return [::String] + # Required. Relative resource name of the source. Its format is + # "organizations/[organization_id]/source/[source_id]". + class GetSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for grouping by assets. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the organization to groupBy. Its format is + # "organizations/[organization_id], folders/[folder_id], or + # projects/[project_id]". + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_name_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @!attribute [rw] group_by + # @return [::String] + # Required. Expression that defines what assets fields to use for grouping. The string + # value should follow SQL syntax: comma separated list of fields. For + # example: + # "security_center_properties.resource_project,security_center_properties.project". + # + # The following fields are supported when compare_duration is not set: + # + # * security_center_properties.resource_project + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_type + # * security_center_properties.resource_parent + # * security_center_properties.resource_parent_display_name + # + # The following fields are supported when compare_duration is set: + # + # * security_center_properties.resource_type + # * security_center_properties.resource_project_display_name + # * security_center_properties.resource_parent_display_name + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the GroupResult's "state_change" property is + # updated to indicate whether the asset was added, removed, or remained + # present during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at reference_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at reference_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and reference_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `GroupAssetsResponse`; indicates + # that this is a continuation of a prior `GroupAssets` call, and that the + # system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class GroupAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for grouping by assets. + # @!attribute [rw] group_by_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] + # Group results. There exists an element for each existing unique + # combination of property/values. The element contains a count for the number + # of times those specific property/values appear. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the groupBy request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of results matching the query. + class GroupAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for grouping by findings. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the source to groupBy. Its format is + # "organizations/[organization_id]/sources/[source_id]", + # folders/[folder_id]/sources/[source_id], or + # projects/[project_id]/sources/[source_id]. To groupBy across all sources + # provide a source_id of `-`. For example: + # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/-, + # or projects/\\{project_id}/sources/- + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # * severity: `=`, `:` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * security_marks.marks: `=`, `:` + # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # @!attribute [rw] group_by + # @return [::String] + # Required. Expression that defines what assets fields to use for grouping (including + # `state_change`). The string value should follow SQL syntax: comma separated + # list of fields. For example: "parent,resource_name". + # + # The following fields are supported: + # + # * resource_name + # * category + # * state + # * parent + # * severity + # + # The following fields are supported when compare_duration is set: + # + # * state_change + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the GroupResult's "state_change" attribute is + # updated to indicate whether the finding had its state changed, the + # finding's state remained unchanged, or if the finding was added during the + # compare_duration period of time that precedes the read_time. This is the + # time between (read_time - compare_duration) and read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present + # at read_time. + # + # If this field is set then `state_change` must be a specified field in + # `group_by`. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class GroupFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for group by findings. + # @!attribute [rw] group_by_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] + # Group results. There exists an element for each existing unique + # combination of property/values. The element contains a count for the number + # of times those specific property/values appear. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the groupBy request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of results matching the query. + class GroupFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Result containing the properties and count of a groupBy request. + # @!attribute [rw] properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Properties matching the groupBy fields in the request. + # @!attribute [rw] count + # @return [::Integer] + # Total count of resources for the given properties. + class GroupResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class PropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for listing notification configs. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the organization to list notification configs. + # Its format is "organizations/[organization_id]". + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListNotificationConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing notification configs. + # @!attribute [rw] notification_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig>] + # Notification configs belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + class ListNotificationConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing sources. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent of sources to list. Its format should be + # "organizations/[organization_id], folders/[folder_id], or + # projects/[project_id]". + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing sources. + # @!attribute [rw] sources + # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::Source>] + # Sources belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + class ListSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing assets. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the organization assets should belong to. Its format is + # "organizations/[organization_id], folders/[folder_id], or + # projects/[project_id]". + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across assets. + # The expression is a list of zero or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. The fields map to those + # defined in the Asset resource. Examples include: + # + # * name + # * security_center_properties.resource_name + # * resource_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following are the allowed field and operator combinations: + # + # * name: `=` + # * update_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `update_time = "2019-06-10T16:07:18-07:00"` + # `update_time = 1560208038000` + # + # * create_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `create_time = "2019-06-10T16:07:18-07:00"` + # `create_time = 1560208038000` + # + # * iam_policy.policy_blob: `=`, `:` + # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # * security_marks.marks: `=`, `:` + # * security_center_properties.resource_name: `=`, `:` + # * security_center_properties.resource_display_name: `=`, `:` + # * security_center_properties.resource_type: `=`, `:` + # * security_center_properties.resource_parent: `=`, `:` + # * security_center_properties.resource_parent_display_name: `=`, `:` + # * security_center_properties.resource_project: `=`, `:` + # * security_center_properties.resource_project_display_name: `=`, `:` + # * security_center_properties.resource_owners: `=`, `:` + # + # For example, `resource_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `resource_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-resource_properties.my_property : ""` + # @!attribute [rw] order_by + # @return [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,resource_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,resource_properties.a_property" and " + # name desc , resource_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # update_time + # resource_properties + # security_marks.marks + # security_center_properties.resource_name + # security_center_properties.resource_display_name + # security_center_properties.resource_parent + # security_center_properties.resource_parent_display_name + # security_center_properties.resource_project + # security_center_properties.resource_project_display_name + # security_center_properties.resource_type + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering assets. The filter is limited + # to assets existing at the supplied time and their values are those at that + # specific time. Absence of this field will default to the API's version of + # NOW. + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the ListAssetsResult's "state_change" + # attribute is updated to indicate whether the asset was added, removed, or + # remained present during the compare_duration period of time that precedes + # the read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence of the asset at the + # two points in time. Intermediate state changes between the two times don't + # affect the result. For example, the results aren't affected if the asset is + # removed and re-created again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "ADDED": indicates that the asset was not present at the start of + # compare_duration, but present at read_time. + # * "REMOVED": indicates that the asset was present at the start of + # compare_duration, but not present at read_time. + # * "ACTIVE": indicates that the asset was present at both the + # start and the end of the time period defined by + # compare_duration and read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all assets present at + # read_time. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # A field mask to specify the ListAssetsResult fields to be listed in the + # response. + # An empty field mask will list all fields. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListAssetsResponse`; indicates + # that this is a continuation of a prior `ListAssets` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListAssetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing assets. + # @!attribute [rw] list_assets_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult>] + # Assets matching the list request. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the list request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of assets matching the query. + class ListAssetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Result containing the Asset and its State. + # @!attribute [rw] asset + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Asset] + # Asset matching the search request. + # @!attribute [rw] state_change + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult::StateChange] + # State change of the asset between the points in time. + class ListAssetsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The change in state of the asset. + # + # When querying across two points in time this describes + # the change between the two points: ADDED, REMOVED, or ACTIVE. + # If there was no compare_duration supplied in the request the state change + # will be: UNUSED + module StateChange + # State change is unused, this is the canonical default for this enum. + UNUSED = 0 + + # Asset was added between the points in time. + ADDED = 1 + + # Asset was removed between the points in time. + REMOVED = 2 + + # Asset was present at both point(s) in time. + ACTIVE = 3 + end + end + end + + # Request message for listing findings. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the source the findings belong to. Its format is + # "organizations/[organization_id]/sources/[source_id], + # folders/[folder_id]/sources/[source_id], or + # projects/[project_id]/sources/[source_id]". To list across all sources + # provide a source_id of `-`. For example: + # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/- or + # projects/\\{projects_id}/sources/- + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * source_properties.a_property + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # * severity: `=`, `:` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # security_marks.marks: `=`, `:` + # source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + # + # For example, `source_properties.size = 100` is a valid filter string. + # + # Use a partial match on the empty string to filter based on a property + # existing: `source_properties.my_property : ""` + # + # Use a negated partial match on the empty string to filter based on a + # property not existing: `-source_properties.my_property : ""` + # @!attribute [rw] order_by + # @return [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,resource_properties.a_property". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,source_properties.a_property". Redundant space characters in the + # syntax are insignificant. "name desc,source_properties.a_property" and " + # name desc , source_properties.a_property " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # source_properties + # security_marks.marks + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used as a reference point when filtering findings. The filter is + # limited to findings existing at the supplied time and their values are + # those at that specific time. Absence of this field will default to the + # API's version of NOW. + # @!attribute [rw] compare_duration + # @return [::Google::Protobuf::Duration] + # When compare_duration is set, the ListFindingsResult's "state_change" + # attribute is updated to indicate whether the finding had its state changed, + # the finding's state remained unchanged, or if the finding was added in any + # state during the compare_duration period of time that precedes the + # read_time. This is the time between (read_time - compare_duration) and + # read_time. + # + # The state_change value is derived based on the presence and state of the + # finding at the two points in time. Intermediate state changes between the + # two times don't affect the result. For example, the results aren't affected + # if the finding is made inactive and then active again. + # + # Possible "state_change" values when compare_duration is specified: + # + # * "CHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration, but changed its + # state at read_time. + # * "UNCHANGED": indicates that the finding was present and matched the given + # filter at the start of compare_duration and did not change + # state at read_time. + # * "ADDED": indicates that the finding did not match the given filter or + # was not present at the start of compare_duration, but was + # present at read_time. + # * "REMOVED": indicates that the finding was present and matched the + # filter at the start of compare_duration, but did not match + # the filter at read_time. + # + # If compare_duration is not specified, then the only possible state_change + # is "UNUSED", which will be the state_change set for all findings present at + # read_time. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing findings. + # @!attribute [rw] list_findings_results + # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult>] + # Findings matching the list request. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Time used for executing the list request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of findings matching the query. + class ListFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Result containing the Finding and its StateChange. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # Finding matching the search request. + # @!attribute [rw] state_change + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult::StateChange] + # State change of the finding between the points in time. + # @!attribute [r] resource + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult::Resource] + # Output only. Resource that is associated with this finding. + class ListFindingsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information related to the Google Cloud resource that is + # associated with this finding. + # @!attribute [rw] name + # @return [::String] + # The full resource name of the resource. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] project_name + # @return [::String] + # The full resource name of project that the resource belongs to. + # @!attribute [rw] project_display_name + # @return [::String] + # The human readable name of project that the resource belongs to. + # @!attribute [rw] parent_name + # @return [::String] + # The full resource name of resource's parent. + # @!attribute [rw] parent_display_name + # @return [::String] + # The human readable name of resource's parent. + # @!attribute [rw] folders + # @return [::Array<::Google::Cloud::SecurityCenter::V1p1Beta1::Folder>] + # Contains a Folder message for each folder in the assets ancestry. + # The first folder is the deepest nested folder, and the last folder is + # the folder directly under the Organization. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The change in state of the finding. + # + # When querying across two points in time this describes + # the change in the finding between the two points: CHANGED, UNCHANGED, + # ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that + # the finding at timestamp does not match the filter specified, but it did + # at timestamp - compare_duration. If there was no compare_duration + # supplied in the request the state change will be: UNUSED + module StateChange + # State change is unused, this is the canonical default for this enum. + UNUSED = 0 + + # The finding has changed state in some way between the points in time + # and existed at both points. + CHANGED = 1 + + # The finding has not changed state between the points in time and + # existed at both points. + UNCHANGED = 2 + + # The finding was created between the points in time. + ADDED = 3 + + # The finding at timestamp does not match the filter specified, but it + # did at timestamp - compare_duration. + REMOVED = 4 + end + end + end + + # Request message for updating a finding's state. + # @!attribute [rw] name + # @return [::String] + # Required. The relative resource name of the finding. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/sources/\\{source_id}/finding/\\{finding_id}". + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding::State] + # Required. The desired State of the finding. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Required. The time at which the updated state takes effect. + class SetFindingStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for running asset discovery for an organization. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the organization to run asset discovery for. Its format is + # "organizations/[organization_id]". + class RunAssetDiscoveryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating or creating a finding. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] + # Required. The finding resource to update or create if it does not already exist. + # parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + class UpdateFindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a notification config. + # @!attribute [rw] notification_config + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] + # Required. The notification config to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + class UpdateNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating an organization's settings. + # @!attribute [rw] organization_settings + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] + # Required. The organization settings resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the settings resource. + # + # If empty all mutable fields will be updated. + class UpdateOrganizationSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a source. + # @!attribute [rw] source + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] + # Required. The source resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + class UpdateSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a SecurityMarks resource. + # @!attribute [rw] security_marks + # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] + # Required. The security marks resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the updated SecurityMarks take effect. + # If not set uses current server time. Updates will be applied to the + # SecurityMarks that are active immediately preceding this time. + class UpdateSecurityMarksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.rb new file mode 100644 index 000000000000..72b49b0fe90a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V1p1beta1 + # Security Command Center finding source. A finding source + # is an entity or a mechanism that can produce a finding. A source is like a + # container of findings that come from the same scanner, logger, monitor, etc. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this source. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/sources/\\{source_id}" + # @!attribute [rw] display_name + # @return [::String] + # The source's display name. + # A source's display name must be unique amongst its siblings, for example, + # two sources with the same parent can't share the same display name. + # The display name must have a length between 1 and 64 characters + # (inclusive). + # @!attribute [rw] description + # @return [::String] + # The description of the source (max of 1024 characters). + # Example: + # "Web Security Scanner is a web security scanner for common + # vulnerabilities in App Engine applications. It can automatically + # scan and detect four common vulnerabilities, including cross-site-scripting + # (XSS), Flash injection, mixed content (HTTP in HTTPS), and + # outdated/insecure libraries." + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the finding. It's either + # "organizations/\\{organization_id}/sources/\\{source_id}", + # "folders/\\{folder_id}/sources/\\{source_id}" or + # "projects/\\{project_number}/sources/\\{source_id}", + # depending on the closest CRM ancestor of the resource associated with the + # finding. + class Source + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/Gemfile new file mode 100644 index 000000000000..a24351ce9260 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-security_center-v1p1beta1", path: "../" +else + gem "google-cloud-security_center-v1p1beta1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_finding.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_finding.rb new file mode 100644 index 000000000000..c000d93ed341 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_finding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_CreateFinding_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the create_finding call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_finding. +# +def create_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new + + # Call the create_finding method. + result = client.create_finding request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_notification_config.rb new file mode 100644 index 000000000000..acdc0989906e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_CreateNotificationConfig_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the create_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_notification_config. +# +def create_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new + + # Call the create_notification_config method. + result = client.create_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_source.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_source.rb new file mode 100644 index 000000000000..9bcf68679623 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_CreateSource_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the create_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_source. +# +def create_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new + + # Call the create_source method. + result = client.create_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/delete_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/delete_notification_config.rb new file mode 100644 index 000000000000..442fcdf71d1b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/delete_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_DeleteNotificationConfig_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the delete_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#delete_notification_config. +# +def delete_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new + + # Call the delete_notification_config method. + result = client.delete_notification_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_iam_policy.rb new file mode 100644 index 000000000000..88f1888b1521 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_GetIamPolicy_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the get_iam_policy call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_notification_config.rb new file mode 100644 index 000000000000..feaf9ce7665a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_GetNotificationConfig_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the get_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_notification_config. +# +def get_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new + + # Call the get_notification_config method. + result = client.get_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_organization_settings.rb new file mode 100644 index 000000000000..7bed3a6a574a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_organization_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_GetOrganizationSettings_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the get_organization_settings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_organization_settings. +# +def get_organization_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new + + # Call the get_organization_settings method. + result = client.get_organization_settings request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_source.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_source.rb new file mode 100644 index 000000000000..9616dc30e5e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_GetSource_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the get_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_source. +# +def get_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new + + # Call the get_source method. + result = client.get_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_assets.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_assets.rb new file mode 100644 index 000000000000..fba016390793 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_GroupAssets_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the group_assets call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_assets. +# +def group_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new + + # Call the group_assets method. + result = client.group_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. + p item + end +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_GroupAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_findings.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_findings.rb new file mode 100644 index 000000000000..6357692d3a5b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_findings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_GroupFindings_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the group_findings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_findings. +# +def group_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new + + # Call the group_findings method. + result = client.group_findings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. + p item + end +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_assets.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_assets.rb new file mode 100644 index 000000000000..9b4cfc34f62b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_assets.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_ListAssets_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the list_assets call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_assets. +# +def list_assets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new + + # Call the list_assets method. + result = client.list_assets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult. + p item + end +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_findings.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_findings.rb new file mode 100644 index 000000000000..9c8bc97942e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_findings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_ListFindings_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the list_findings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_findings. +# +def list_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new + + # Call the list_findings method. + result = client.list_findings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult. + p item + end +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_notification_configs.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_notification_configs.rb new file mode 100644 index 000000000000..ea961a24d957 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_notification_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_ListNotificationConfigs_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the list_notification_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_notification_configs. +# +def list_notification_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new + + # Call the list_notification_configs method. + result = client.list_notification_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + p item + end +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_sources.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_sources.rb new file mode 100644 index 000000000000..d87dee47b0ed --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_ListSources_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the list_sources call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_sources. +# +def list_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new + + # Call the list_sources method. + result = client.list_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::Source. + p item + end +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.rb new file mode 100644 index 000000000000..2065af062b64 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_RunAssetDiscovery_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the run_asset_discovery call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#run_asset_discovery. +# +def run_asset_discovery + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new + + # Call the run_asset_discovery method. + result = client.run_asset_discovery request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_finding_state.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_finding_state.rb new file mode 100644 index 000000000000..915284737f2e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_finding_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_SetFindingState_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the set_finding_state call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_finding_state. +# +def set_finding_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new + + # Call the set_finding_state method. + result = client.set_finding_state request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_iam_policy.rb new file mode 100644 index 000000000000..984368e397b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_SetIamPolicy_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the set_iam_policy call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.rb new file mode 100644 index 000000000000..279ca1f58995 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_TestIamPermissions_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the test_iam_permissions call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_finding.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_finding.rb new file mode 100644 index 000000000000..7a803d222ecc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_finding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateFinding_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the update_finding call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_finding. +# +def update_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new + + # Call the update_finding method. + result = client.update_finding request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_notification_config.rb new file mode 100644 index 000000000000..6b814475d958 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateNotificationConfig_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the update_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_notification_config. +# +def update_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new + + # Call the update_notification_config method. + result = client.update_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_organization_settings.rb new file mode 100644 index 000000000000..e16bd81a9532 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_organization_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the update_organization_settings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_organization_settings. +# +def update_organization_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new + + # Call the update_organization_settings method. + result = client.update_organization_settings request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_security_marks.rb new file mode 100644 index 000000000000..1eb75d7733ee --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_security_marks.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the update_security_marks call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_security_marks. +# +def update_security_marks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new + + # Call the update_security_marks method. + result = client.update_security_marks request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_source.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_source.rb new file mode 100644 index 000000000000..7bc0b249e94c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSource_sync] +require "google/cloud/security_center/v1p1beta1" + +## +# Snippet for the update_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_source. +# +def update_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new + + # Call the update_source method. + result = client.update_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. + p result +end +# [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json new file mode 100644 index 000000000000..ea07c1b867ac --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json @@ -0,0 +1,935 @@ +{ + "client_library": { + "name": "google-cloud-security_center-v1p1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.securitycenter.v1p1beta1", + "version": "v1p1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_CreateSource_sync", + "title": "Snippet for the create_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_source.", + "file": "security_center/create_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_source", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateSource", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.CreateSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_CreateFinding_sync", + "title": "Snippet for the create_finding call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_finding.", + "file": "security_center/create_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_finding", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateFinding", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.CreateFinding", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_CreateNotificationConfig_sync", + "title": "Snippet for the create_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_notification_config.", + "file": "security_center/create_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateNotificationConfig", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.CreateNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_DeleteNotificationConfig_sync", + "title": "Snippet for the delete_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#delete_notification_config.", + "file": "security_center/delete_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#delete_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteNotificationConfig", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.DeleteNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_iam_policy.", + "file": "security_center/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GetIamPolicy", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GetNotificationConfig_sync", + "title": "Snippet for the get_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_notification_config.", + "file": "security_center/get_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetNotificationConfig", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GetNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GetOrganizationSettings_sync", + "title": "Snippet for the get_organization_settings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_organization_settings.", + "file": "security_center/get_organization_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_organization_settings", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_organization_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetOrganizationSettings", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GetOrganizationSettings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GetSource_sync", + "title": "Snippet for the get_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_source.", + "file": "security_center/get_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_source", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "GetSource", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GetSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GroupAssets_sync", + "title": "Snippet for the group_assets call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_assets.", + "file": "security_center/group_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "group_assets", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "GroupAssets", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GroupAssets", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GroupFindings_sync", + "title": "Snippet for the group_findings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_findings.", + "file": "security_center/group_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "group_findings", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "GroupFindings", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GroupFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_ListAssets_sync", + "title": "Snippet for the list_assets call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_assets.", + "file": "security_center/list_assets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_assets", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_assets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListAssets", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.ListAssets", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_ListFindings_sync", + "title": "Snippet for the list_findings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_findings.", + "file": "security_center/list_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_findings", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListFindings", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.ListFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_ListNotificationConfigs_sync", + "title": "Snippet for the list_notification_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_notification_configs.", + "file": "security_center/list_notification_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_notification_configs", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_notification_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListNotificationConfigs", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.ListNotificationConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_ListSources_sync", + "title": "Snippet for the list_sources call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_sources.", + "file": "security_center/list_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sources", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "ListSources", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.ListSources", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_RunAssetDiscovery_sync", + "title": "Snippet for the run_asset_discovery call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#run_asset_discovery.", + "file": "security_center/run_asset_discovery.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_asset_discovery", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#run_asset_discovery", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "RunAssetDiscovery", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.RunAssetDiscovery", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_SetFindingState_sync", + "title": "Snippet for the set_finding_state call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_finding_state.", + "file": "security_center/set_finding_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_finding_state", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_finding_state", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "SetFindingState", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.SetFindingState", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_iam_policy.", + "file": "security_center/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.SetIamPolicy", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#test_iam_permissions.", + "file": "security_center/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.TestIamPermissions", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_UpdateFinding_sync", + "title": "Snippet for the update_finding call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_finding.", + "file": "security_center/update_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_finding", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateFinding", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.UpdateFinding", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_UpdateNotificationConfig_sync", + "title": "Snippet for the update_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_notification_config.", + "file": "security_center/update_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateNotificationConfig", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.UpdateNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync", + "title": "Snippet for the update_organization_settings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_organization_settings.", + "file": "security_center/update_organization_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_organization_settings", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_organization_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateOrganizationSettings", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.UpdateOrganizationSettings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSource_sync", + "title": "Snippet for the update_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_source.", + "file": "security_center/update_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_source", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSource", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.UpdateSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync", + "title": "Snippet for the update_security_marks call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_security_marks.", + "file": "security_center/update_security_marks.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_security_marks", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_security_marks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSecurityMarks", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.UpdateSecurityMarks", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_test.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_test.rb new file mode 100644 index 000000000000..9a2eeefc4022 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" +require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb" +require "google/cloud/security_center/v1p1beta1/security_center" + +class ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_test.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_test.rb new file mode 100644 index 000000000000..346d4e4ee6d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_test.rb @@ -0,0 +1,178 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/security_center/v1p1beta1/security_center" + +class ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_finding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.finding_path organization: "value0", source: "value1", finding: "value2" + assert_equal "organizations/value0/sources/value1/findings/value2", path + + path = client.finding_path folder: "value0", source: "value1", finding: "value2" + assert_equal "folders/value0/sources/value1/findings/value2", path + + path = client.finding_path project: "value0", source: "value1", finding: "value2" + assert_equal "projects/value0/sources/value1/findings/value2", path + end + end + + def test_folder_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_path folder: "value0" + assert_equal "folders/value0", path + end + end + + def test_notification_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.notification_config_path organization: "value0", notification_config: "value1" + assert_equal "organizations/value0/notificationConfigs/value1", path + end + end + + def test_organization_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_path organization: "value0" + assert_equal "organizations/value0", path + end + end + + def test_organization_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_settings_path organization: "value0" + assert_equal "organizations/value0/organizationSettings", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_security_marks_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.security_marks_path organization: "value0", asset: "value1" + assert_equal "organizations/value0/assets/value1/securityMarks", path + + path = client.security_marks_path organization: "value0", source: "value1", finding: "value2" + assert_equal "organizations/value0/sources/value1/findings/value2/securityMarks", path + + path = client.security_marks_path folder: "value0", asset: "value1" + assert_equal "folders/value0/assets/value1/securityMarks", path + + path = client.security_marks_path project: "value0", asset: "value1" + assert_equal "projects/value0/assets/value1/securityMarks", path + + path = client.security_marks_path folder: "value0", source: "value1", finding: "value2" + assert_equal "folders/value0/sources/value1/findings/value2/securityMarks", path + + path = client.security_marks_path project: "value0", source: "value1", finding: "value2" + assert_equal "projects/value0/sources/value1/findings/value2/securityMarks", path + end + end + + def test_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.source_path organization: "value0", source: "value1" + assert_equal "organizations/value0/sources/value1", path + + path = client.source_path folder: "value0", source: "value1" + assert_equal "folders/value0/sources/value1", path + + path = client.source_path project: "value0", source: "value1" + assert_equal "projects/value0/sources/value1", path + end + end + + def test_topic_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.topic_path project: "value0", topic: "value1" + assert_equal "projects/value0/topics/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_test.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_test.rb new file mode 100644 index 000000000000..b12585f440f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_test.rb @@ -0,0 +1,1388 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" +require "google/cloud/security_center/v1p1beta1/security_center/rest" + + +class ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source = {} + + create_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_source({ parent: parent, source: source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_source parent: parent, source: source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_source ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new(parent: parent, source: source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_source({ parent: parent, source: source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_source(::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new(parent: parent, source: source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_source_client_stub.call_count + end + end + end + + def test_create_finding + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + finding_id = "hello world" + finding = {} + + create_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_finding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_finding parent: parent, finding_id: finding_id, finding: finding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_finding ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_finding(::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_finding_client_stub.call_count + end + end + end + + def test_create_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + config_id = "hello world" + notification_config = {} + + create_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_notification_config_client_stub.call_count + end + end + end + + def test_delete_notification_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_notification_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_notification_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_notification_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_notification_config_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_get_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_notification_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_notification_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_notification_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_notification_config_client_stub.call_count + end + end + end + + def test_get_organization_settings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_organization_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_organization_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_organization_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_organization_settings ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_organization_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_organization_settings(::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_organization_settings_client_stub.call_count + end + end + end + + def test_get_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_source ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_source(::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_source_client_stub.call_count + end + end + end + + def test_group_assets + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + compare_duration = {} + read_time = {} + page_token = "hello world" + page_size = 42 + + group_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, group_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.group_assets ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.group_assets(::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, group_assets_client_stub.call_count + end + end + end + + def test_group_findings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + read_time = {} + compare_duration = {} + page_token = "hello world" + page_size = 42 + + group_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, group_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.group_findings ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.group_findings(::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, group_findings_client_stub.call_count + end + end + end + + def test_list_assets + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_assets ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_assets(::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_count + end + end + end + + def test_list_findings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_findings ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_findings(::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_count + end + end + end + + def test_list_notification_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_notification_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_notification_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_notification_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_notification_configs ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_notification_configs(::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_notification_configs_client_stub.call_count + end + end + end + + def test_list_sources + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_sources parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_sources ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_sources(::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_sources_client_stub.call_count + end + end + end + + def test_run_asset_discovery + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + run_asset_discovery_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_run_asset_discovery_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_asset_discovery_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.run_asset_discovery({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.run_asset_discovery parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.run_asset_discovery({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_asset_discovery_client_stub.call_count + end + end + end + + def test_set_finding_state + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + state = :STATE_UNSPECIFIED + start_time = {} + + set_finding_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_finding_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_finding_state_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_finding_state({ name: name, state: state, start_time: start_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_finding_state name: name, state: state, start_time: start_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_finding_state ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_finding_state({ name: name, state: state, start_time: start_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_finding_state(::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_finding_state_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_update_finding + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + finding = {} + update_mask = {} + + update_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_finding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_finding({ finding: finding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_finding finding: finding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_finding ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_finding({ finding: finding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_finding(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_finding_client_stub.call_count + end + end + end + + def test_update_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + notification_config = {} + update_mask = {} + + update_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_notification_config notification_config: notification_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_notification_config_client_stub.call_count + end + end + end + + def test_update_organization_settings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + organization_settings = {} + update_mask = {} + + update_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_organization_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_organization_settings ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_organization_settings(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_organization_settings_client_stub.call_count + end + end + end + + def test_update_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + source = {} + update_mask = {} + + update_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_source({ source: source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_source source: source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_source ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_source({ source: source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_source(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new(source: source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_source_client_stub.call_count + end + end + end + + def test_update_security_marks + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + security_marks = {} + update_mask = {} + start_time = {} + + update_security_marks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_marks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_security_marks_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_security_marks ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_security_marks(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_security_marks_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_test.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_test.rb new file mode 100644 index 000000000000..6ea47e6b8453 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_test.rb @@ -0,0 +1,1581 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" +require "google/cloud/security_center/v1p1beta1/security_center" + +class ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source = {} + + create_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::Source), request["source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_source({ parent: parent, source: source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_source parent: parent, source: source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_source ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new(parent: parent, source: source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_source({ parent: parent, source: source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_source(::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new(parent: parent, source: source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_source_client_stub.call_rpc_count + end + end + + def test_create_finding + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + finding_id = "hello world" + finding = {} + + create_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_finding, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["finding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::Finding), request["finding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_finding parent: parent, finding_id: finding_id, finding: finding do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_finding ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_finding(::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_finding_client_stub.call_rpc_count + end + end + + def test_create_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + config_id = "hello world" + notification_config = {} + + create_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig), request["notification_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_notification_config_client_stub.call_rpc_count + end + end + + def test_delete_notification_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_notification_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_notification_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_notification_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_notification_config_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_get_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_notification_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_notification_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_notification_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_notification_config_client_stub.call_rpc_count + end + end + + def test_get_organization_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_organization_settings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_organization_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_organization_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_organization_settings ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_organization_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_organization_settings(::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_organization_settings_client_stub.call_rpc_count + end + end + + def test_get_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_source ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_source(::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_source_client_stub.call_rpc_count + end + end + + def test_group_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + compare_duration = {} + read_time = {} + page_token = "hello world" + page_size = 42 + + group_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :group_assets, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["group_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, group_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.group_assets ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.group_assets(::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, group_assets_client_stub.call_rpc_count + end + end + + def test_group_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + read_time = {} + compare_duration = {} + page_token = "hello world" + page_size = 42 + + group_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :group_findings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["group_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, group_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.group_findings ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.group_findings(::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, group_findings_client_stub.call_rpc_count + end + end + + def test_list_assets + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_assets, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_assets_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_assets ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_assets(::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_assets_client_stub.call_rpc_count + end + end + + def test_list_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + read_time = {} + compare_duration = {} + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_findings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_findings ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_findings(::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_rpc_count + end + end + + def test_list_notification_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_notification_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_notification_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_notification_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_notification_configs ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_notification_configs(::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_notification_configs_client_stub.call_rpc_count + end + end + + def test_list_sources + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sources, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_sources parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_sources ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_sources(::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_sources_client_stub.call_rpc_count + end + end + + def test_run_asset_discovery + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + run_asset_discovery_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_asset_discovery, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_asset_discovery_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.run_asset_discovery({ parent: parent }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.run_asset_discovery parent: parent do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new(parent: parent) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.run_asset_discovery({ parent: parent }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new(parent: parent), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_asset_discovery_client_stub.call_rpc_count + end + end + + def test_set_finding_state + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + state = :STATE_UNSPECIFIED + start_time = {} + + set_finding_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_finding_state, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest, request + assert_equal "hello world", request["name"] + assert_equal :STATE_UNSPECIFIED, request["state"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_finding_state_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_finding_state({ name: name, state: state, start_time: start_time }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_finding_state name: name, state: state, start_time: start_time do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_finding_state ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_finding_state({ name: name, state: state, start_time: start_time }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_finding_state(::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_finding_state_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_update_finding + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + finding = {} + update_mask = {} + + update_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_finding, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::Finding), request["finding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_finding({ finding: finding, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_finding finding: finding, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_finding ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_finding({ finding: finding, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_finding(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_finding_client_stub.call_rpc_count + end + end + + def test_update_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + notification_config = {} + update_mask = {} + + update_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig), request["notification_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_notification_config notification_config: notification_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_notification_config_client_stub.call_rpc_count + end + end + + def test_update_organization_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + organization_settings = {} + update_mask = {} + + update_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_organization_settings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings), request["organization_settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_organization_settings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_organization_settings ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_organization_settings(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_organization_settings_client_stub.call_rpc_count + end + end + + def test_update_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + source = {} + update_mask = {} + + update_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::Source), request["source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_source({ source: source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_source source: source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_source ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_source({ source: source, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_source(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new(source: source, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_source_client_stub.call_rpc_count + end + end + + def test_update_security_marks + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + security_marks = {} + update_mask = {} + start_time = {} + + update_security_marks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_security_marks, name + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks), request["security_marks"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_security_marks_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_security_marks ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_security_marks(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_security_marks_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/helper.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v1p1beta1/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-v2/.gitignore b/owl-bot-staging/google-cloud-security_center-v2/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/.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-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center-v2/.repo-metadata.json new file mode 100644 index 000000000000..0473cc4ee50a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/.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-v2/latest", + "distribution_name": "google-cloud-security_center-v2", + "is_cloud": true, + "language": "ruby", + "name": "securitycenter", + "name_pretty": "Security Command Center V2 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. Note that google-cloud-security_center-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details.", + "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-v2/.rubocop.yml b/owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml new file mode 100644 index 000000000000..ca95d31c752a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security_center-v2.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-security_center-v2.rb" diff --git a/owl-bot-staging/google-cloud-security_center-v2/.toys.rb b/owl-bot-staging/google-cloud-security_center-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/.yardopts b/owl-bot-staging/google-cloud-security_center-v2/.yardopts new file mode 100644 index 000000000000..ce63c0dd16df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Security Command Center V2 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..f1313afe9378 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security_center-v2 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-security_center-v2 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/security_center/v2" + +client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/security_center/v2" + +::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-security_center-v2 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/security_center/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security_center-v2/Gemfile b/owl-bot-staging/google-cloud-security_center-v2/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-v2/LICENSE.md b/owl-bot-staging/google-cloud-security_center-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-security_center-v2/README.md b/owl-bot-staging/google-cloud-security_center-v2/README.md new file mode 100644 index 000000000000..c2224047d696 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Security Command Center V2 API + +Security Command Center API provides access to temporal views of assets and findings within an organization. + +Security Command Center API provides access to temporal views of assets and findings within an organization. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Security Command Center V2 API. Most users should consider using +the main client gem, +[google-cloud-security_center](https://rubygems.org/gems/google-cloud-security_center). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-security_center-v2 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/securitycenter.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/security_center/v2" + +client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new +request = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new # (request fields as keyword arguments...) +response = client.batch_create_resource_value_configs request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/security-command-center) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/security_center/v2" +require "logger" + +client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-security_center`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-security_center-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-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-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-security_center-v2/Rakefile b/owl-bot-staging/google-cloud-security_center-v2/Rakefile new file mode 100644 index 000000000000..3f3dda612226 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-security_center-v2 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-v2 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security_center-v2 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security_center-v2 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-security_center-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security_center-v2" + header "google-cloud-security_center-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security_center-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security_center-v2 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-security_center-v2 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-security_center-v2 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json new file mode 100644 index 000000000000..8859452b344a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json @@ -0,0 +1,218 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.securitycenter.v2", + "libraryPackage": "::Google::Cloud::SecurityCenter::V2", + "services": { + "SecurityCenter": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client", + "rpcs": { + "BatchCreateResourceValueConfigs": { + "methods": [ + "batch_create_resource_value_configs" + ] + }, + "BulkMuteFindings": { + "methods": [ + "bulk_mute_findings" + ] + }, + "CreateBigQueryExport": { + "methods": [ + "create_big_query_export" + ] + }, + "CreateFinding": { + "methods": [ + "create_finding" + ] + }, + "CreateMuteConfig": { + "methods": [ + "create_mute_config" + ] + }, + "CreateNotificationConfig": { + "methods": [ + "create_notification_config" + ] + }, + "CreateSource": { + "methods": [ + "create_source" + ] + }, + "DeleteBigQueryExport": { + "methods": [ + "delete_big_query_export" + ] + }, + "DeleteMuteConfig": { + "methods": [ + "delete_mute_config" + ] + }, + "DeleteNotificationConfig": { + "methods": [ + "delete_notification_config" + ] + }, + "DeleteResourceValueConfig": { + "methods": [ + "delete_resource_value_config" + ] + }, + "GetBigQueryExport": { + "methods": [ + "get_big_query_export" + ] + }, + "GetSimulation": { + "methods": [ + "get_simulation" + ] + }, + "GetValuedResource": { + "methods": [ + "get_valued_resource" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "GetMuteConfig": { + "methods": [ + "get_mute_config" + ] + }, + "GetNotificationConfig": { + "methods": [ + "get_notification_config" + ] + }, + "GetResourceValueConfig": { + "methods": [ + "get_resource_value_config" + ] + }, + "GetSource": { + "methods": [ + "get_source" + ] + }, + "GroupFindings": { + "methods": [ + "group_findings" + ] + }, + "ListAttackPaths": { + "methods": [ + "list_attack_paths" + ] + }, + "ListBigQueryExports": { + "methods": [ + "list_big_query_exports" + ] + }, + "ListFindings": { + "methods": [ + "list_findings" + ] + }, + "ListMuteConfigs": { + "methods": [ + "list_mute_configs" + ] + }, + "ListNotificationConfigs": { + "methods": [ + "list_notification_configs" + ] + }, + "ListResourceValueConfigs": { + "methods": [ + "list_resource_value_configs" + ] + }, + "ListSources": { + "methods": [ + "list_sources" + ] + }, + "ListValuedResources": { + "methods": [ + "list_valued_resources" + ] + }, + "SetFindingState": { + "methods": [ + "set_finding_state" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "SetMute": { + "methods": [ + "set_mute" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "UpdateBigQueryExport": { + "methods": [ + "update_big_query_export" + ] + }, + "UpdateExternalSystem": { + "methods": [ + "update_external_system" + ] + }, + "UpdateFinding": { + "methods": [ + "update_finding" + ] + }, + "UpdateMuteConfig": { + "methods": [ + "update_mute_config" + ] + }, + "UpdateNotificationConfig": { + "methods": [ + "update_notification_config" + ] + }, + "UpdateResourceValueConfig": { + "methods": [ + "update_resource_value_config" + ] + }, + "UpdateSecurityMarks": { + "methods": [ + "update_security_marks" + ] + }, + "UpdateSource": { + "methods": [ + "update_source" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec b/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec new file mode 100644 index 000000000000..8cb5140c90c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security_center/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security_center-v2" + gem.version = Google::Cloud::SecurityCenter::V2::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. Note that google-cloud-security_center-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details." + gem.summary = "Security Command Center API provides access to temporal views of assets and findings within an organization." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb new file mode 100644 index 000000000000..fbfebf50a08d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/security_center/v2" diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb new file mode 100644 index 000000000000..cb448baa8c34 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center/v2/security_center" +require "google/cloud/security_center/v2/version" + +module Google + module Cloud + module SecurityCenter + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/security_center/v2" + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/security_center/v2" + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + module V2 + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/security_center/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb new file mode 100644 index 000000000000..25ca637b14ef --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center/v2/security_center/rest" +require "google/cloud/security_center/v2/version" + +module Google + module Cloud + module SecurityCenter + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/security_center/v2/rest" + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + module V2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb new file mode 100644 index 000000000000..b2e61e4933b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security_center/v2/version" + +require "google/cloud/security_center/v2/security_center/credentials" +require "google/cloud/security_center/v2/security_center/paths" +require "google/cloud/security_center/v2/security_center/operations" +require "google/cloud/security_center/v2/security_center/client" +require "google/cloud/security_center/v2/security_center/rest" + +module Google + module Cloud + module SecurityCenter + module V2 + ## + # V2 APIs for Security Center service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/security_center/v2/security_center" + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/security_center/v2/security_center/rest" + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + module SecurityCenter + end + end + end + end +end + +helper_path = ::File.join __dir__, "security_center", "helpers.rb" +require "google/cloud/security_center/v2/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb new file mode 100644 index 000000000000..e1de0b6ba7ae --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb @@ -0,0 +1,4793 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securitycenter/v2/securitycenter_service_pb" + +module Google + module Cloud + module SecurityCenter + module V2 + module SecurityCenter + ## + # Client for the SecurityCenter service. + # + # V2 APIs for Security Center service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :security_center_stub + + ## + # Configure the SecurityCenter Client class. + # + # See {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenter clients + # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecurityCenter", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @security_center_stub.universe_domain + end + + ## + # Create a new SecurityCenter client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecurityCenter client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/securitycenter/v2/securitycenter_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @security_center_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @security_center_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @security_center_stub.logger + end + + # Service calls + + ## + # Creates a ResourceValueConfig for an organization. Maps user's tags to + # difference resource values for use by the attack path simulation. + # + # @overload batch_create_resource_value_configs(request, options = nil) + # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_create_resource_value_configs(parent: nil, requests: nil) + # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # The parent field in the CreateResourceValueConfigRequest + # messages must either be empty or match this field. + # @param requests [::Array<::Google::Cloud::SecurityCenter::V2::CreateResourceValueConfigRequest, ::Hash>] + # Required. The resource value configs to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new + # + # # Call the batch_create_resource_value_configs method. + # result = client.batch_create_resource_value_configs request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse. + # p result + # + def batch_create_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :batch_create_resource_value_configs, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Kicks off an LRO to bulk mute findings for a parent based on a filter. If + # no location is specified, findings are muted in global. The parent + # can be either an organization, folder, or project. The findings matched by + # the filter will be muted after the LRO is done. + # + # @overload bulk_mute_findings(request, options = nil) + # Pass arguments to `bulk_mute_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload bulk_mute_findings(parent: nil, filter: nil, mute_state: nil) + # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, at which bulk action needs to be applied. If no + # location is specified, findings are updated in global. The following list + # shows some examples: + # + # + `organizations/[organization_id]` + # + `organizations/[organization_id]/locations/[location_id]` + # + `folders/[folder_id]` + # + `folders/[folder_id]/locations/[location_id]` + # + `projects/[project_id]` + # + `projects/[project_id]/locations/[location_id]` + # @param filter [::String] + # Expression that identifies findings that should be updated. + # The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @param mute_state [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest::MuteState] + # Optional. All findings matching the given filter will have their mute state + # set to this value. The default value is `MUTED`. Setting this to + # `UNDEFINED` will clear the mute state on all matching findings. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new + # + # # Call the bulk_mute_findings method. + # result = client.bulk_mute_findings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_mute_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.bulk_mute_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_mute_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :bulk_mute_findings, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a BigQuery export. + # + # @overload create_big_query_export(request, options = nil) + # Pass arguments to `create_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) + # Pass arguments to `create_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource of the new BigQuery export. Its + # format is `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param big_query_export [::Google::Cloud::SecurityCenter::V2::BigQueryExport, ::Hash] + # Required. The BigQuery export being created. + # @param big_query_export_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new + # + # # Call the create_big_query_export method. + # result = client.create_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. + # p result + # + def create_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a finding in a location. The corresponding source must exist for + # finding creation to succeed. + # + # @overload create_finding(request, options = nil) + # Pass arguments to `create_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::CreateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_finding(parent: nil, finding_id: nil, finding: nil) + # Pass arguments to `create_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new finding's parent. The following list + # shows some examples of the format: + # + + # `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # @param finding_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be alphanumeric and less than or equal to 32 characters and + # greater than 0 characters in length. + # @param finding [::Google::Cloud::SecurityCenter::V2::Finding, ::Hash] + # Required. The Finding being created. The name and security_marks will be + # ignored as they are both output only fields on this resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new + # + # # Call the create_finding method. + # result = client.create_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + # p result + # + def create_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_finding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_finding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a mute config. + # + # @overload create_mute_config(request, options = nil) + # Pass arguments to `create_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) + # Pass arguments to `create_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new mute configs's parent. Its format is + # `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param mute_config [::Google::Cloud::SecurityCenter::V2::MuteConfig, ::Hash] + # Required. The mute config being created. + # @param mute_config_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new + # + # # Call the create_mute_config method. + # result = client.create_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + # p result + # + def create_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.parent + regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.parent + regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a notification config. + # + # @overload create_notification_config(request, options = nil) + # Pass arguments to `create_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) + # Pass arguments to `create_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new notification config's parent. Its format + # is `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param config_id [::String] + # Required. + # Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters and contain alphanumeric + # characters, underscores, or hyphens only. + # @param notification_config [::Google::Cloud::SecurityCenter::V2::NotificationConfig, ::Hash] + # Required. The notification config being created. The name and the service + # account will be ignored as they are both output only fields on this + # resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new + # + # # Call the create_notification_config method. + # result = client.create_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + # p result + # + def create_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a source. + # + # @overload create_source(request, options = nil) + # Pass arguments to `create_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::CreateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_source(parent: nil, source: nil) + # Pass arguments to `create_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new source's parent. Its format should be + # `organizations/[organization_id]`. + # @param source [::Google::Cloud::SecurityCenter::V2::Source, ::Hash] + # Required. The Source being created, only the display_name and description + # will be used. All other fields will be ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new + # + # # Call the create_source method. + # result = client.create_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + # p result + # + def create_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :create_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing BigQuery export. + # + # @overload delete_big_query_export(request, options = nil) + # Pass arguments to `delete_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_big_query_export(name: nil) + # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the BigQuery export to delete. The following list + # shows some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}/locations/{location}/bigQueryExports/{export_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new + # + # # Call the delete_big_query_export method. + # result = client.delete_big_query_export request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing mute config. If no location is specified, default is + # global. + # + # @overload delete_mute_config(request, options = nil) + # Pass arguments to `delete_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_mute_config(name: nil) + # Pass arguments to `delete_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to delete. The following list shows some + # examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new + # + # # Call the delete_mute_config method. + # result = client.delete_mute_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.name + regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.name + regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a notification config. + # + # @overload delete_notification_config(request, options = nil) + # Pass arguments to `delete_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_notification_config(name: nil) + # Pass arguments to `delete_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to delete. The following list + # shows some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new + # + # # Call the delete_notification_config method. + # result = client.delete_notification_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a ResourceValueConfig. + # + # @overload delete_resource_value_config(request, options = nil) + # Pass arguments to `delete_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_resource_value_config(name: nil) + # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the ResourceValueConfig to delete + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new + # + # # Call the delete_resource_value_config method. + # result = client.delete_resource_value_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :delete_resource_value_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a BigQuery export. + # + # @overload get_big_query_export(request, options = nil) + # Pass arguments to `get_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_big_query_export(name: nil) + # Pass arguments to `get_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the BigQuery export to retrieve. The following list shows + # some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new + # + # # Call the get_big_query_export method. + # result = client.get_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. + # p result + # + def get_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the simulation by name or the latest simulation for the given + # organization. + # + # @overload get_simulation(request, options = nil) + # Pass arguments to `get_simulation` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetSimulationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetSimulationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_simulation(name: nil) + # Pass arguments to `get_simulation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The organization name or simulation name of this simulation + # + # Valid format: + # `organizations/{organization}/simulations/latest` + # `organizations/{organization}/simulations/{simulation}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Simulation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Simulation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new + # + # # Call the get_simulation method. + # result = client.get_simulation request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Simulation. + # p result + # + def get_simulation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_simulation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_simulation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_simulation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the valued resource by name + # + # @overload get_valued_resource(request, options = nil) + # Pass arguments to `get_valued_resource` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_valued_resource(name: nil) + # Pass arguments to `get_valued_resource` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of this valued resource + # + # Valid format: + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::ValuedResource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new + # + # # Call the get_valued_resource method. + # result = client.get_valued_resource request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::ValuedResource. + # p result + # + def get_valued_resource request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_valued_resource.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_valued_resource.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_valued_resource, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy on the specified Source. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a mute config. If no location is specified, default is + # global. + # + # @overload get_mute_config(request, options = nil) + # Pass arguments to `get_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_mute_config(name: nil) + # Pass arguments to `get_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to retrieve. The following list shows + # some examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new + # + # # Call the get_mute_config method. + # result = client.get_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + # p result + # + def get_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.name + regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.name + regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a notification config. + # + # @overload get_notification_config(request, options = nil) + # Pass arguments to `get_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_notification_config(name: nil) + # Pass arguments to `get_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to get. The following list shows + # some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new + # + # # Call the get_notification_config method. + # result = client.get_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + # p result + # + def get_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a ResourceValueConfig. + # + # @overload get_resource_value_config(request, options = nil) + # Pass arguments to `get_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_resource_value_config(name: nil) + # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource value config to retrieve. Its format is + # organizations/\\{organization}/resourceValueConfigs/\\{config_id}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new + # + # # Call the get_resource_value_config method. + # result = client.get_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. + # p result + # + def get_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_resource_value_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a source. + # + # @overload get_source(request, options = nil) + # Pass arguments to `get_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_source(name: nil) + # Pass arguments to `get_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Relative resource name of the source. Its format is + # `organizations/[organization_id]/source/[source_id]`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new + # + # # Call the get_source method. + # result = client.get_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + # p result + # + def get_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :get_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization or source's findings and groups them by their + # specified properties in a location. If no location is specified, findings + # are assumed to be in global + # + # To group across all sources provide a `-` as the source id. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + # + `/v2/folders/{folder_id}/sources/-/findings` + # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + # + `/v2/projects/{project_id}/sources/-/findings` + # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` + # + # @overload group_findings(request, options = nil) + # Pass arguments to `group_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload group_findings(parent: nil, filter: nil, group_by: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source to groupBy. If no location is specified, + # finding is assumed to be in global. + # The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To groupBy across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/[location_id]` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-/locations/[location_id]` + # + `projects/{project_id}/sources/-` + # + `projects/{project_id}/sources/-/locations/[location_id]` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * security_marks.marks: `=`, `:` + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: "parent,resource_name". + # @param page_token [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new + # + # # Call the group_findings method. + # result = client.group_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::GroupResult. + # p item + # end + # + def group_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.group_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.group_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.group_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :group_findings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_findings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the attack paths for a set of simulation results or valued resources + # and filter. + # + # @overload list_attack_paths(request, options = nil) + # Pass arguments to `list_attack_paths` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_attack_paths` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list attack paths. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @param filter [::String] + # The filter expression that filters the attack path in the response. + # Supported fields: + # + # * `valued_resources` supports = + # @param page_token [::String] + # The value returned by the last `ListAttackPathsResponse`; indicates + # that this is a continuation of a prior `ListAttackPaths` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new + # + # # Call the list_attack_paths method. + # result = client.list_attack_paths request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::AttackPath. + # p item + # end + # + def list_attack_paths request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_attack_paths.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_attack_paths.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_attack_paths, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_attack_paths, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BigQuery exports. Note that when requesting BigQuery exports at a + # given level all exports under that level are also returned e.g. if + # requesting BigQuery exports under a folder, then all BigQuery exports + # immediately under the folder plus the ones created under the projects + # within the folder are returned. + # + # @overload list_big_query_exports(request, options = nil) + # Pass arguments to `list_big_query_exports` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of BigQuery exports. Its + # format is `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListBigQueryExports` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListBigQueryExports` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new + # + # # Call the list_big_query_exports method. + # result = client.list_big_query_exports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::BigQueryExport. + # p item + # end + # + def list_big_query_exports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_big_query_exports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_big_query_exports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_big_query_exports, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_big_query_exports, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization or source's findings. + # + # To list across all sources for a given location provide a `-` as the source + # id. If no location is specified, finding are assumed to be in global. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, order_by: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source the findings belong to. If no location is + # specified, the default is global. The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To list across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/{location_id}` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-locations/{location_id}` + # + `projects/{projects_id}/sources/-` + # + `projects/{projects_id}/sources/-/locations/{location_id}` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * security_marks.marks: `=`, `:` + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.display_name: `=`, `:` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,parent". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,parent". Redundant space characters in the + # syntax are insignificant. "name desc,parent" and " + # name desc , parent " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # security_marks.marks + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_findings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_findings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists mute configs. If no location is specified, default is + # global. + # + # @overload list_mute_configs(request, options = nil) + # Pass arguments to `list_mute_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_mute_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of mute configs. Its format + # is `organizations/[organization_id]", "folders/[folder_id]`, + # `projects/[project_id]`, + # `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, + # `projects/[project_id]/locations/[location_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListMuteConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMuteConfigs` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new + # + # # Call the list_mute_configs method. + # result = client.list_mute_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::MuteConfig. + # p item + # end + # + def list_mute_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_mute_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.parent + regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.parent + regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_mute_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_mute_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_mute_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists notification configs. + # + # @overload list_notification_configs(request, options = nil) + # Pass arguments to `list_notification_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_notification_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent in which to list the notification + # configurations. Its format is + # "organizations/[organization_id]/locations/[location_id]", + # "folders/[folder_id]/locations/[location_id]", or + # "projects/[project_id]/locations/[location_id]". + # @param page_token [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new + # + # # Call the list_notification_configs method. + # result = client.list_notification_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::NotificationConfig. + # p item + # end + # + def list_notification_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_notification_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_notification_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_notification_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_notification_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all ResourceValueConfigs. + # + # @overload list_resource_value_configs(request, options = nil) + # Pass arguments to `list_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of resource value configs. + # Its format is + # `organizations/[organization_id]` + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListResourceValueConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListResourceValueConfigs` must match the call that provided the + # page token. + # + # page_size can be specified, and the new page_size will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new + # + # # Call the list_resource_value_configs method. + # result = client.list_resource_value_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig. + # p item + # end + # + def list_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_resource_value_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all sources belonging to an organization. + # + # @overload list_sources(request, options = nil) + # Pass arguments to `list_sources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent of sources to list. Its format should + # be `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param page_token [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new + # + # # Call the list_sources method. + # result = client.list_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::Source. + # p item + # end + # + def list_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_sources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the valued resources for a set of simulation results and filter. + # + # @overload list_valued_resources(request, options = nil) + # Pass arguments to `list_valued_resources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) + # Pass arguments to `list_valued_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list exposed resources. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # @param filter [::String] + # The filter expression that filters the valued resources in the response. + # Supported fields: + # + # * `resource_value` supports = + # * `resource_type` supports = + # @param page_token [::String] + # The value returned by the last `ListValuedResourcesResponse`; indicates + # that this is a continuation of a prior `ListValuedResources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param order_by [::String] + # Optional. The fields by which to order the valued resources response. + # + # Supported fields: + # + # * `exposed_score` + # + # * `resource_value` + # + # * `resource_type` + # + # Values should be a comma separated list of fields. For example: + # `exposed_score,resource_value`. + # + # The default sorting order is descending. To specify ascending or descending + # order for a field, append a " ASC" or a " DESC" suffix, respectively; for + # example: `exposed_score DESC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new + # + # # Call the list_valued_resources method. + # result = client.list_valued_resources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ValuedResource. + # p item + # end + # + def list_valued_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_valued_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_valued_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :list_valued_resources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_valued_resources, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the state of a finding. If no location is specified, finding is + # assumed to be in global + # + # @overload set_finding_state(request, options = nil) + # Pass arguments to `set_finding_state` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_finding_state(name: nil, state: nil) + # Pass arguments to `set_finding_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @param state [::Google::Cloud::SecurityCenter::V2::Finding::State] + # Required. The desired State of the finding. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new + # + # # Call the set_finding_state method. + # result = client.set_finding_state request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + # p result + # + def set_finding_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_finding_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_finding_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :set_finding_state, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified Source. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the mute state of a finding. If no location is specified, finding + # is assumed to be in global + # + # @overload set_mute(request, options = nil) + # Pass arguments to `set_mute` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::SetMuteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::SetMuteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_mute(name: nil, mute: nil) + # Pass arguments to `set_mute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @param mute [::Google::Cloud::SecurityCenter::V2::Finding::Mute] + # Required. The desired state of the Mute. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new + # + # # Call the set_mute method. + # result = client.set_mute request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + # p result + # + def set_mute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::SetMuteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_mute.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_mute.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_mute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :set_mute, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has on the specified source. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a BigQuery export. + # + # @overload update_big_query_export(request, options = nil) + # Pass arguments to `update_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_big_query_export(big_query_export: nil, update_mask: nil) + # Pass arguments to `update_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param big_query_export [::Google::Cloud::SecurityCenter::V2::BigQueryExport, ::Hash] + # Required. The BigQuery export being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new + # + # # Call the update_big_query_export method. + # result = client.update_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. + # p result + # + def update_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.big_query_export&.name + header_params["big_query_export.name"] = request.big_query_export.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_big_query_export, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates external system. This is for a given finding. If no location is + # specified, finding is assumed to be in global + # + # @overload update_external_system(request, options = nil) + # Pass arguments to `update_external_system` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_external_system(external_system: nil, update_mask: nil) + # Pass arguments to `update_external_system` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param external_system [::Google::Cloud::SecurityCenter::V2::ExternalSystem, ::Hash] + # Required. The external system resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the external system resource. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::ExternalSystem] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new + # + # # Call the update_external_system method. + # result = client.update_external_system request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::ExternalSystem. + # p result + # + def update_external_system request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_external_system.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.external_system&.name + header_params["external_system.name"] = request.external_system.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_external_system.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_external_system, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a finding. If no location is specified, finding is + # assumed to be in global. The corresponding source must exist for a finding + # creation to succeed. + # + # @overload update_finding(request, options = nil) + # Pass arguments to `update_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_finding(finding: nil, update_mask: nil) + # Pass arguments to `update_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param finding [::Google::Cloud::SecurityCenter::V2::Finding, ::Hash] + # Required. The finding resource to update or create if it does not already + # exist. parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new + # + # # Call the update_finding method. + # result = client.update_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + # p result + # + def update_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.finding&.name + header_params["finding.name"] = request.finding.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_finding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_finding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a mute config. If no location is specified, default is + # global. + # + # @overload update_mute_config(request, options = nil) + # Pass arguments to `update_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_mute_config(mute_config: nil, update_mask: nil) + # Pass arguments to `update_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param mute_config [::Google::Cloud::SecurityCenter::V2::MuteConfig, ::Hash] + # Required. The mute config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new + # + # # Call the update_mute_config method. + # result = client.update_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + # p result + # + def update_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.mute_config&.name + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.mute_config&.name + regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.mute_config&.name + regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_mute_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + # + # @overload update_notification_config(request, options = nil) + # Pass arguments to `update_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_notification_config(notification_config: nil, update_mask: nil) + # Pass arguments to `update_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_config [::Google::Cloud::SecurityCenter::V2::NotificationConfig, ::Hash] + # Required. The notification config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new + # + # # Call the update_notification_config method. + # result = client.update_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + # p result + # + def update_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.notification_config&.name + header_params["notification_config.name"] = request.notification_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_notification_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing ResourceValueConfigs with new rules. + # + # @overload update_resource_value_config(request, options = nil) + # Pass arguments to `update_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) + # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_value_config [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig, ::Hash] + # Required. The resource value config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # To update nested fields, include the top level field in the mask + # For example, to update gcp_metadata.resource_type, include the + # "gcp_metadata" field mask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new + # + # # Call the update_resource_value_config method. + # result = client.update_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. + # p result + # + def update_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_value_config&.name + header_params["resource_value_config.name"] = request.resource_value_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_resource_value_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates security marks. For Finding Security marks, if no location is + # specified, finding is assumed to be in global. Assets Security Marks can + # only be accessed through global endpoint. + # + # @overload update_security_marks(request, options = nil) + # Pass arguments to `update_security_marks` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_security_marks(security_marks: nil, update_mask: nil) + # Pass arguments to `update_security_marks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_marks [::Google::Cloud::SecurityCenter::V2::SecurityMarks, ::Hash] + # Required. The security marks resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new + # + # # Call the update_security_marks method. + # result = client.update_security_marks request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::SecurityMarks. + # p result + # + def update_security_marks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_security_marks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.security_marks&.name + header_params["security_marks.name"] = request.security_marks.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_security_marks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_security_marks, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a source. + # + # @overload update_source(request, options = nil) + # Pass arguments to `update_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_source(source: nil, update_mask: nil) + # Pass arguments to `update_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param source [::Google::Cloud::SecurityCenter::V2::Source, ::Hash] + # Required. The source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new + # + # # Call the update_source method. + # result = client.update_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + # p result + # + def update_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.source&.name + header_params["source.name"] = request.source.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.call_rpc :update_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecurityCenter API. + # + # This class represents the configuration for SecurityCenter, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # batch_create_resource_value_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SecurityCenter API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `batch_create_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_resource_value_configs + ## + # RPC-specific configuration for `bulk_mute_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_mute_findings + ## + # RPC-specific configuration for `create_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :create_big_query_export + ## + # RPC-specific configuration for `create_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_finding + ## + # RPC-specific configuration for `create_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_mute_config + ## + # RPC-specific configuration for `create_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_config + ## + # RPC-specific configuration for `create_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_source + ## + # RPC-specific configuration for `delete_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_big_query_export + ## + # RPC-specific configuration for `delete_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_mute_config + ## + # RPC-specific configuration for `delete_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_config + ## + # RPC-specific configuration for `delete_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_resource_value_config + ## + # RPC-specific configuration for `get_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :get_big_query_export + ## + # RPC-specific configuration for `get_simulation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_simulation + ## + # RPC-specific configuration for `get_valued_resource` + # @return [::Gapic::Config::Method] + # + attr_reader :get_valued_resource + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `get_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mute_config + ## + # RPC-specific configuration for `get_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_config + ## + # RPC-specific configuration for `get_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_value_config + ## + # RPC-specific configuration for `get_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_source + ## + # RPC-specific configuration for `group_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :group_findings + ## + # RPC-specific configuration for `list_attack_paths` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attack_paths + ## + # RPC-specific configuration for `list_big_query_exports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_big_query_exports + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_mute_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_mute_configs + ## + # RPC-specific configuration for `list_notification_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_configs + ## + # RPC-specific configuration for `list_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_value_configs + ## + # RPC-specific configuration for `list_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sources + ## + # RPC-specific configuration for `list_valued_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_valued_resources + ## + # RPC-specific configuration for `set_finding_state` + # @return [::Gapic::Config::Method] + # + attr_reader :set_finding_state + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `set_mute` + # @return [::Gapic::Config::Method] + # + attr_reader :set_mute + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `update_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :update_big_query_export + ## + # RPC-specific configuration for `update_external_system` + # @return [::Gapic::Config::Method] + # + attr_reader :update_external_system + ## + # RPC-specific configuration for `update_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_finding + ## + # RPC-specific configuration for `update_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_mute_config + ## + # RPC-specific configuration for `update_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_config + ## + # RPC-specific configuration for `update_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_resource_value_config + ## + # RPC-specific configuration for `update_security_marks` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_marks + ## + # RPC-specific configuration for `update_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_source + + # @private + def initialize parent_rpcs = nil + batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs + @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config + bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings + @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config + create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export + @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config + create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding + @create_finding = ::Gapic::Config::Method.new create_finding_config + create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config + @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config + create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config + @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config + create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source + @create_source = ::Gapic::Config::Method.new create_source_config + delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export + @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config + delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config + @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config + delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config + @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config + delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config + @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config + get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export + @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config + get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation + @get_simulation = ::Gapic::Config::Method.new get_simulation_config + get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource + @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config + @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config + get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config + @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config + get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config + @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config + get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source + @get_source = ::Gapic::Config::Method.new get_source_config + group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings + @group_findings = ::Gapic::Config::Method.new group_findings_config + list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths + @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config + list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports + @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs + @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config + list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs + @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config + list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs + @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config + list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources + @list_sources = ::Gapic::Config::Method.new list_sources_config + list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources + @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config + set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state + @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute + @set_mute = ::Gapic::Config::Method.new set_mute_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export + @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config + update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system + @update_external_system = ::Gapic::Config::Method.new update_external_system_config + update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding + @update_finding = ::Gapic::Config::Method.new update_finding_config + update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config + @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config + update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config + @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config + update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config + @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config + update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks + @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config + update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source + @update_source = ::Gapic::Config::Method.new update_source_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb new file mode 100644 index 000000000000..a53a263683eb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module SecurityCenter + module V2 + module SecurityCenter + # Credentials for the SecurityCenter API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SECURITY_CENTER_CREDENTIALS", + "SECURITY_CENTER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SECURITY_CENTER_CREDENTIALS_JSON", + "SECURITY_CENTER_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb new file mode 100644 index 000000000000..2b55ca838dc8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module SecurityCenter + module V2 + module SecurityCenter + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SecurityCenter Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb new file mode 100644 index 000000000000..680b1675791d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb @@ -0,0 +1,1068 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + module SecurityCenter + # Path helper methods for the SecurityCenter API. + module Paths + ## + # Create a fully-qualified BigQueryExport resource string. + # + # @overload big_query_export_path(organization:, location:, export:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/bigQueryExports/{export}` + # + # @param organization [String] + # @param location [String] + # @param export [String] + # + # @overload big_query_export_path(folder:, location:, export:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/bigQueryExports/{export}` + # + # @param folder [String] + # @param location [String] + # @param export [String] + # + # @overload big_query_export_path(project:, location:, export:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/bigQueryExports/{export}` + # + # @param project [String] + # @param location [String] + # @param export [String] + # + # @return [::String] + def big_query_export_path **args + resources = { + "export:location:organization" => (proc do |organization:, location:, export:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/bigQueryExports/#{export}" + end), + "export:folder:location" => (proc do |folder:, location:, export:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/bigQueryExports/#{export}" + end), + "export:location:project" => (proc do |project:, location:, export:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/bigQueryExports/#{export}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified DlpJob resource string. + # + # @overload dlp_job_path(project:, dlp_job:) + # The resource will be in the following format: + # + # `projects/{project}/dlpJobs/{dlp_job}` + # + # @param project [String] + # @param dlp_job [String] + # + # @overload dlp_job_path(project:, location:, dlp_job:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dlpJobs/{dlp_job}` + # + # @param project [String] + # @param location [String] + # @param dlp_job [String] + # + # @return [::String] + def dlp_job_path **args + resources = { + "dlp_job:project" => (proc do |project:, dlp_job:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/dlpJobs/#{dlp_job}" + end), + "dlp_job:location:project" => (proc do |project:, location:, dlp_job:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dlpJobs/#{dlp_job}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified ExternalSystem resource string. + # + # @overload external_system_path(organization:, source:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param organization [String] + # @param source [String] + # @param finding [String] + # @param externalsystem [String] + # + # @overload external_system_path(organization:, source:, location:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param organization [String] + # @param source [String] + # @param location [String] + # @param finding [String] + # @param externalsystem [String] + # + # @overload external_system_path(folder:, source:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param folder [String] + # @param source [String] + # @param finding [String] + # @param externalsystem [String] + # + # @overload external_system_path(folder:, source:, location:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param folder [String] + # @param source [String] + # @param location [String] + # @param finding [String] + # @param externalsystem [String] + # + # @overload external_system_path(project:, source:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param project [String] + # @param source [String] + # @param finding [String] + # @param externalsystem [String] + # + # @overload external_system_path(project:, source:, location:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param project [String] + # @param source [String] + # @param location [String] + # @param finding [String] + # @param externalsystem [String] + # + # @return [::String] + def external_system_path **args + resources = { + "externalsystem:finding:organization:source" => (proc do |organization:, source:, finding:, externalsystem:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" + end), + "externalsystem:finding:location:organization:source" => (proc do |organization:, source:, location:, finding:, externalsystem:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}" + end), + "externalsystem:finding:folder:source" => (proc do |folder:, source:, finding:, externalsystem:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" + end), + "externalsystem:finding:folder:location:source" => (proc do |folder:, source:, location:, finding:, externalsystem:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}" + end), + "externalsystem:finding:project:source" => (proc do |project:, source:, finding:, externalsystem:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "projects/#{project}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" + end), + "externalsystem:finding:location:project:source" => (proc do |project:, source:, location:, finding:, externalsystem:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Finding resource string. + # + # @overload finding_path(organization:, source:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/findings/{finding}` + # + # @param organization [String] + # @param source [String] + # @param finding [String] + # + # @overload finding_path(organization:, source:, location:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}` + # + # @param organization [String] + # @param source [String] + # @param location [String] + # @param finding [String] + # + # @overload finding_path(folder:, source:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/findings/{finding}` + # + # @param folder [String] + # @param source [String] + # @param finding [String] + # + # @overload finding_path(folder:, source:, location:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}` + # + # @param folder [String] + # @param source [String] + # @param location [String] + # @param finding [String] + # + # @overload finding_path(project:, source:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/findings/{finding}` + # + # @param project [String] + # @param source [String] + # @param finding [String] + # + # @overload finding_path(project:, source:, location:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}` + # + # @param project [String] + # @param source [String] + # @param location [String] + # @param finding [String] + # + # @return [::String] + def finding_path **args + resources = { + "finding:organization:source" => (proc do |organization:, source:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/findings/#{finding}" + end), + "finding:location:organization:source" => (proc do |organization:, source:, location:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}" + end), + "finding:folder:source" => (proc do |folder:, source:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/findings/#{finding}" + end), + "finding:folder:location:source" => (proc do |folder:, source:, location:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}" + end), + "finding:project:source" => (proc do |project:, source:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "projects/#{project}/sources/#{source}/findings/#{finding}" + end), + "finding:location:project:source" => (proc do |project:, source:, location:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Folder resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}` + # + # @param folder [String] + # + # @return [::String] + def folder_path folder: + "folders/#{folder}" + end + + ## + # Create a fully-qualified FolderLocation resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @return [::String] + def folder_location_path folder:, location: + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified MuteConfig resource string. + # + # @overload mute_config_path(organization:, mute_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/muteConfigs/{mute_config}` + # + # @param organization [String] + # @param mute_config [String] + # + # @overload mute_config_path(organization:, location:, mute_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/muteConfigs/{mute_config}` + # + # @param organization [String] + # @param location [String] + # @param mute_config [String] + # + # @overload mute_config_path(folder:, mute_config:) + # The resource will be in the following format: + # + # `folders/{folder}/muteConfigs/{mute_config}` + # + # @param folder [String] + # @param mute_config [String] + # + # @overload mute_config_path(folder:, location:, mute_config:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + # + # @param folder [String] + # @param location [String] + # @param mute_config [String] + # + # @overload mute_config_path(project:, mute_config:) + # The resource will be in the following format: + # + # `projects/{project}/muteConfigs/{mute_config}` + # + # @param project [String] + # @param mute_config [String] + # + # @overload mute_config_path(project:, location:, mute_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/muteConfigs/{mute_config}` + # + # @param project [String] + # @param location [String] + # @param mute_config [String] + # + # @return [::String] + def mute_config_path **args + resources = { + "mute_config:organization" => (proc do |organization:, mute_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/muteConfigs/#{mute_config}" + end), + "location:mute_config:organization" => (proc do |organization:, location:, mute_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/muteConfigs/#{mute_config}" + end), + "folder:mute_config" => (proc do |folder:, mute_config:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/muteConfigs/#{mute_config}" + end), + "folder:location:mute_config" => (proc do |folder:, location:, mute_config:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/muteConfigs/#{mute_config}" + end), + "mute_config:project" => (proc do |project:, mute_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/muteConfigs/#{mute_config}" + end), + "location:mute_config:project" => (proc do |project:, location:, mute_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/muteConfigs/#{mute_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified NotificationConfig resource string. + # + # @overload notification_config_path(organization:, location:, notification_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}` + # + # @param organization [String] + # @param location [String] + # @param notification_config [String] + # + # @overload notification_config_path(folder:, location:, notification_config:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/notificationConfigs/{notification_config}` + # + # @param folder [String] + # @param location [String] + # @param notification_config [String] + # + # @overload notification_config_path(project:, location:, notification_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/notificationConfigs/{notification_config}` + # + # @param project [String] + # @param location [String] + # @param notification_config [String] + # + # @return [::String] + def notification_config_path **args + resources = { + "location:notification_config:organization" => (proc do |organization:, location:, notification_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/notificationConfigs/#{notification_config}" + end), + "folder:location:notification_config" => (proc do |folder:, location:, notification_config:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/notificationConfigs/#{notification_config}" + end), + "location:notification_config:project" => (proc do |project:, location:, notification_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/notificationConfigs/#{notification_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Organization resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}` + # + # @param organization [String] + # + # @return [::String] + def organization_path organization: + "organizations/#{organization}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationValuedResource resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}` + # + # @param organization [String] + # @param location [String] + # @param simulation [String] + # @param valued_resource [String] + # + # @return [::String] + def organization_valued_resource_path organization:, location:, simulation:, valued_resource: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/simulations/#{simulation}/valuedResources/#{valued_resource}" + end + + ## + # Create a fully-qualified Policy resource string. + # + # @overload policy_path(organization:, constraint_name:) + # The resource will be in the following format: + # + # `organizations/{organization}/policies/{constraint_name}` + # + # @param organization [String] + # @param constraint_name [String] + # + # @overload policy_path(folder:, constraint_name:) + # The resource will be in the following format: + # + # `folders/{folder}/policies/{constraint_name}` + # + # @param folder [String] + # @param constraint_name [String] + # + # @overload policy_path(project:, constraint_name:) + # The resource will be in the following format: + # + # `projects/{project}/policies/{constraint_name}` + # + # @param project [String] + # @param constraint_name [String] + # + # @return [::String] + def policy_path **args + resources = { + "constraint_name:organization" => (proc do |organization:, constraint_name:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/policies/#{constraint_name}" + end), + "constraint_name:folder" => (proc do |folder:, constraint_name:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/policies/#{constraint_name}" + end), + "constraint_name:project" => (proc do |project:, constraint_name:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/policies/#{constraint_name}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified ResourceValueConfig resource string. + # + # @overload resource_value_config_path(organization:, resource_value_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/resourceValueConfigs/{resource_value_config}` + # + # @param organization [String] + # @param resource_value_config [String] + # + # @overload resource_value_config_path(organization:, location:, resource_value_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/resourceValueConfigs/{resource_value_config}` + # + # @param organization [String] + # @param location [String] + # @param resource_value_config [String] + # + # @return [::String] + def resource_value_config_path **args + resources = { + "organization:resource_value_config" => (proc do |organization:, resource_value_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/resourceValueConfigs/#{resource_value_config}" + end), + "location:organization:resource_value_config" => (proc do |organization:, location:, resource_value_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/resourceValueConfigs/#{resource_value_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified SecurityMarks resource string. + # + # @overload security_marks_path(organization:, asset:) + # The resource will be in the following format: + # + # `organizations/{organization}/assets/{asset}/securityMarks` + # + # @param organization [String] + # @param asset [String] + # + # @overload security_marks_path(organization:, source:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/findings/{finding}/securityMarks` + # + # @param organization [String] + # @param source [String] + # @param finding [String] + # + # @overload security_marks_path(organization:, source:, location:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` + # + # @param organization [String] + # @param source [String] + # @param location [String] + # @param finding [String] + # + # @overload security_marks_path(folder:, asset:) + # The resource will be in the following format: + # + # `folders/{folder}/assets/{asset}/securityMarks` + # + # @param folder [String] + # @param asset [String] + # + # @overload security_marks_path(folder:, source:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/findings/{finding}/securityMarks` + # + # @param folder [String] + # @param source [String] + # @param finding [String] + # + # @overload security_marks_path(folder:, source:, location:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` + # + # @param folder [String] + # @param source [String] + # @param location [String] + # @param finding [String] + # + # @overload security_marks_path(project:, asset:) + # The resource will be in the following format: + # + # `projects/{project}/assets/{asset}/securityMarks` + # + # @param project [String] + # @param asset [String] + # + # @overload security_marks_path(project:, source:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/findings/{finding}/securityMarks` + # + # @param project [String] + # @param source [String] + # @param finding [String] + # + # @overload security_marks_path(project:, source:, location:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` + # + # @param project [String] + # @param source [String] + # @param location [String] + # @param finding [String] + # + # @return [::String] + def security_marks_path **args + resources = { + "asset:organization" => (proc do |organization:, asset:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/assets/#{asset}/securityMarks" + end), + "finding:organization:source" => (proc do |organization:, source:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/findings/#{finding}/securityMarks" + end), + "finding:location:organization:source" => (proc do |organization:, source:, location:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks" + end), + "asset:folder" => (proc do |folder:, asset:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/assets/#{asset}/securityMarks" + end), + "finding:folder:source" => (proc do |folder:, source:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/findings/#{finding}/securityMarks" + end), + "finding:folder:location:source" => (proc do |folder:, source:, location:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks" + end), + "asset:project" => (proc do |project:, asset:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/assets/#{asset}/securityMarks" + end), + "finding:project:source" => (proc do |project:, source:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + + "projects/#{project}/sources/#{source}/findings/#{finding}/securityMarks" + end), + "finding:location:project:source" => (proc do |project:, source:, location:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Simulation resource string. + # + # @overload simulation_path(organization:, simulation:) + # The resource will be in the following format: + # + # `organizations/{organization}/simulations/{simulation}` + # + # @param organization [String] + # @param simulation [String] + # + # @overload simulation_path(organization:, location:, simluation:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/simulations/{simluation}` + # + # @param organization [String] + # @param location [String] + # @param simluation [String] + # + # @return [::String] + def simulation_path **args + resources = { + "organization:simulation" => (proc do |organization:, simulation:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/simulations/#{simulation}" + end), + "location:organization:simluation" => (proc do |organization:, location:, simluation:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/simulations/#{simluation}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Source resource string. + # + # @overload source_path(organization:, source:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}` + # + # @param organization [String] + # @param source [String] + # + # @overload source_path(folder:, source:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}` + # + # @param folder [String] + # @param source [String] + # + # @overload source_path(project:, source:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}` + # + # @param project [String] + # @param source [String] + # + # @return [::String] + def source_path **args + resources = { + "organization:source" => (proc do |organization:, source:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}" + end), + "folder:source" => (proc do |folder:, source:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/sources/#{source}" + end), + "project:source" => (proc do |project:, source:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/sources/#{source}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified TableDataProfile resource string. + # + # @overload table_data_profile_path(project:, table_profile:) + # The resource will be in the following format: + # + # `projects/{project}/tableProfiles/{table_profile}` + # + # @param project [String] + # @param table_profile [String] + # + # @overload table_data_profile_path(project:, location:, table_profile:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/tableProfiles/{table_profile}` + # + # @param project [String] + # @param location [String] + # @param table_profile [String] + # + # @return [::String] + def table_data_profile_path **args + resources = { + "project:table_profile" => (proc do |project:, table_profile:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/tableProfiles/#{table_profile}" + end), + "location:project:table_profile" => (proc do |project:, location:, table_profile:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/tableProfiles/#{table_profile}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Topic resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/topics/{topic}` + # + # @param project [String] + # @param topic [String] + # + # @return [::String] + def topic_path project:, topic: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/topics/#{topic}" + end + + ## + # Create a fully-qualified ValuedResource resource string. + # + # @overload valued_resource_path(organization:, simulation:, valued_resource:) + # The resource will be in the following format: + # + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # + # @param organization [String] + # @param simulation [String] + # @param valued_resource [String] + # + # @overload valued_resource_path(organization:, location:, simluation:, valued_resource:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/simulations/{simluation}/valuedResources/{valued_resource}` + # + # @param organization [String] + # @param location [String] + # @param simluation [String] + # @param valued_resource [String] + # + # @return [::String] + def valued_resource_path **args + resources = { + "organization:simulation:valued_resource" => (proc do |organization:, simulation:, valued_resource:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" + + "organizations/#{organization}/simulations/#{simulation}/valuedResources/#{valued_resource}" + end), + "location:organization:simluation:valued_resource" => (proc do |organization:, location:, simluation:, valued_resource:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "simluation cannot contain /" if simluation.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/simulations/#{simluation}/valuedResources/#{valued_resource}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb new file mode 100644 index 000000000000..f11c34c53b84 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security_center/v2/version" + +require "google/cloud/security_center/v2/security_center/credentials" +require "google/cloud/security_center/v2/security_center/paths" +require "google/cloud/security_center/v2/security_center/rest/operations" +require "google/cloud/security_center/v2/security_center/rest/client" + +module Google + module Cloud + module SecurityCenter + module V2 + ## + # V2 APIs for Security Center service. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/security_center/v2/security_center/rest" + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + module SecurityCenter + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/security_center/v2/security_center/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb new file mode 100644 index 000000000000..6109ce4de572 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb @@ -0,0 +1,4395 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securitycenter/v2/securitycenter_service_pb" +require "google/cloud/security_center/v2/security_center/rest/service_stub" + +module Google + module Cloud + module SecurityCenter + module V2 + module SecurityCenter + module Rest + ## + # REST client for the SecurityCenter service. + # + # V2 APIs for Security Center service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :security_center_stub + + ## + # Configure the SecurityCenter Client class. + # + # See {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenter clients + # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecurityCenter", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @security_center_stub.universe_domain + end + + ## + # Create a new SecurityCenter REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecurityCenter client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @security_center_stub = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @security_center_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @security_center_stub.logger + end + + # Service calls + + ## + # Creates a ResourceValueConfig for an organization. Maps user's tags to + # difference resource values for use by the attack path simulation. + # + # @overload batch_create_resource_value_configs(request, options = nil) + # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_create_resource_value_configs(parent: nil, requests: nil) + # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # The parent field in the CreateResourceValueConfigRequest + # messages must either be empty or match this field. + # @param requests [::Array<::Google::Cloud::SecurityCenter::V2::CreateResourceValueConfigRequest, ::Hash>] + # Required. The resource value configs to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new + # + # # Call the batch_create_resource_value_configs method. + # result = client.batch_create_resource_value_configs request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse. + # p result + # + def batch_create_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.batch_create_resource_value_configs request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Kicks off an LRO to bulk mute findings for a parent based on a filter. If + # no location is specified, findings are muted in global. The parent + # can be either an organization, folder, or project. The findings matched by + # the filter will be muted after the LRO is done. + # + # @overload bulk_mute_findings(request, options = nil) + # Pass arguments to `bulk_mute_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload bulk_mute_findings(parent: nil, filter: nil, mute_state: nil) + # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, at which bulk action needs to be applied. If no + # location is specified, findings are updated in global. The following list + # shows some examples: + # + # + `organizations/[organization_id]` + # + `organizations/[organization_id]/locations/[location_id]` + # + `folders/[folder_id]` + # + `folders/[folder_id]/locations/[location_id]` + # + `projects/[project_id]` + # + `projects/[project_id]/locations/[location_id]` + # @param filter [::String] + # Expression that identifies findings that should be updated. + # The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @param mute_state [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest::MuteState] + # Optional. All findings matching the given filter will have their mute state + # set to this value. The default value is `MUTED`. Setting this to + # `UNDEFINED` will clear the mute state on all matching findings. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new + # + # # Call the bulk_mute_findings method. + # result = client.bulk_mute_findings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_mute_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.bulk_mute_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_mute_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.bulk_mute_findings request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a BigQuery export. + # + # @overload create_big_query_export(request, options = nil) + # Pass arguments to `create_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) + # Pass arguments to `create_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent resource of the new BigQuery export. Its + # format is `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param big_query_export [::Google::Cloud::SecurityCenter::V2::BigQueryExport, ::Hash] + # Required. The BigQuery export being created. + # @param big_query_export_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new + # + # # Call the create_big_query_export method. + # result = client.create_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. + # p result + # + def create_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a finding in a location. The corresponding source must exist for + # finding creation to succeed. + # + # @overload create_finding(request, options = nil) + # Pass arguments to `create_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::CreateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_finding(parent: nil, finding_id: nil, finding: nil) + # Pass arguments to `create_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new finding's parent. The following list + # shows some examples of the format: + # + + # `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # @param finding_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be alphanumeric and less than or equal to 32 characters and + # greater than 0 characters in length. + # @param finding [::Google::Cloud::SecurityCenter::V2::Finding, ::Hash] + # Required. The Finding being created. The name and security_marks will be + # ignored as they are both output only fields on this resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new + # + # # Call the create_finding method. + # result = client.create_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + # p result + # + def create_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_finding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_finding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a mute config. + # + # @overload create_mute_config(request, options = nil) + # Pass arguments to `create_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) + # Pass arguments to `create_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new mute configs's parent. Its format is + # `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param mute_config [::Google::Cloud::SecurityCenter::V2::MuteConfig, ::Hash] + # Required. The mute config being created. + # @param mute_config_id [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new + # + # # Call the create_mute_config method. + # result = client.create_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + # p result + # + def create_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a notification config. + # + # @overload create_notification_config(request, options = nil) + # Pass arguments to `create_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) + # Pass arguments to `create_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new notification config's parent. Its format + # is `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param config_id [::String] + # Required. + # Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters and contain alphanumeric + # characters, underscores, or hyphens only. + # @param notification_config [::Google::Cloud::SecurityCenter::V2::NotificationConfig, ::Hash] + # Required. The notification config being created. The name and the service + # account will be ignored as they are both output only fields on this + # resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new + # + # # Call the create_notification_config method. + # result = client.create_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + # p result + # + def create_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a source. + # + # @overload create_source(request, options = nil) + # Pass arguments to `create_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::CreateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_source(parent: nil, source: nil) + # Pass arguments to `create_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the new source's parent. Its format should be + # `organizations/[organization_id]`. + # @param source [::Google::Cloud::SecurityCenter::V2::Source, ::Hash] + # Required. The Source being created, only the display_name and description + # will be used. All other fields will be ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new + # + # # Call the create_source method. + # result = client.create_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + # p result + # + def create_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.create_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing BigQuery export. + # + # @overload delete_big_query_export(request, options = nil) + # Pass arguments to `delete_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_big_query_export(name: nil) + # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the BigQuery export to delete. The following list + # shows some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}/locations/{location}/bigQueryExports/{export_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new + # + # # Call the delete_big_query_export method. + # result = client.delete_big_query_export request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing mute config. If no location is specified, default is + # global. + # + # @overload delete_mute_config(request, options = nil) + # Pass arguments to `delete_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_mute_config(name: nil) + # Pass arguments to `delete_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to delete. The following list shows some + # examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new + # + # # Call the delete_mute_config method. + # result = client.delete_mute_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a notification config. + # + # @overload delete_notification_config(request, options = nil) + # Pass arguments to `delete_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_notification_config(name: nil) + # Pass arguments to `delete_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to delete. The following list + # shows some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new + # + # # Call the delete_notification_config method. + # result = client.delete_notification_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a ResourceValueConfig. + # + # @overload delete_resource_value_config(request, options = nil) + # Pass arguments to `delete_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_resource_value_config(name: nil) + # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the ResourceValueConfig to delete + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new + # + # # Call the delete_resource_value_config method. + # result = client.delete_resource_value_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.delete_resource_value_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a BigQuery export. + # + # @overload get_big_query_export(request, options = nil) + # Pass arguments to `get_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_big_query_export(name: nil) + # Pass arguments to `get_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the BigQuery export to retrieve. The following list shows + # some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new + # + # # Call the get_big_query_export method. + # result = client.get_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. + # p result + # + def get_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the simulation by name or the latest simulation for the given + # organization. + # + # @overload get_simulation(request, options = nil) + # Pass arguments to `get_simulation` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetSimulationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetSimulationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_simulation(name: nil) + # Pass arguments to `get_simulation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The organization name or simulation name of this simulation + # + # Valid format: + # `organizations/{organization}/simulations/latest` + # `organizations/{organization}/simulations/{simulation}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Simulation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Simulation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new + # + # # Call the get_simulation method. + # result = client.get_simulation request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Simulation. + # p result + # + def get_simulation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_simulation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_simulation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_simulation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get the valued resource by name + # + # @overload get_valued_resource(request, options = nil) + # Pass arguments to `get_valued_resource` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_valued_resource(name: nil) + # Pass arguments to `get_valued_resource` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of this valued resource + # + # Valid format: + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ValuedResource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new + # + # # Call the get_valued_resource method. + # result = client.get_valued_resource request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::ValuedResource. + # p result + # + def get_valued_resource request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_valued_resource.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_valued_resource.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_valued_resource request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy on the specified Source. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a mute config. If no location is specified, default is + # global. + # + # @overload get_mute_config(request, options = nil) + # Pass arguments to `get_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_mute_config(name: nil) + # Pass arguments to `get_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the mute config to retrieve. The following list shows + # some examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new + # + # # Call the get_mute_config method. + # result = client.get_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + # p result + # + def get_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a notification config. + # + # @overload get_notification_config(request, options = nil) + # Pass arguments to `get_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_notification_config(name: nil) + # Pass arguments to `get_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the notification config to get. The following list shows + # some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new + # + # # Call the get_notification_config method. + # result = client.get_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + # p result + # + def get_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a ResourceValueConfig. + # + # @overload get_resource_value_config(request, options = nil) + # Pass arguments to `get_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_resource_value_config(name: nil) + # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource value config to retrieve. Its format is + # organizations/\\{organization}/resourceValueConfigs/\\{config_id}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new + # + # # Call the get_resource_value_config method. + # result = client.get_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. + # p result + # + def get_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_resource_value_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a source. + # + # @overload get_source(request, options = nil) + # Pass arguments to `get_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GetSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_source(name: nil) + # Pass arguments to `get_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Relative resource name of the source. Its format is + # `organizations/[organization_id]/source/[source_id]`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new + # + # # Call the get_source method. + # result = client.get_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + # p result + # + def get_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.get_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Filters an organization or source's findings and groups them by their + # specified properties in a location. If no location is specified, findings + # are assumed to be in global + # + # To group across all sources provide a `-` as the source id. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + # + `/v2/folders/{folder_id}/sources/-/findings` + # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + # + `/v2/projects/{project_id}/sources/-/findings` + # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` + # + # @overload group_findings(request, options = nil) + # Pass arguments to `group_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload group_findings(parent: nil, filter: nil, group_by: nil, page_token: nil, page_size: nil) + # Pass arguments to `group_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source to groupBy. If no location is specified, + # finding is assumed to be in global. + # The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To groupBy across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/[location_id]` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-/locations/[location_id]` + # + `projects/{project_id}/sources/-` + # + `projects/{project_id}/sources/-/locations/[location_id]` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * security_marks.marks: `=`, `:` + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # @param group_by [::String] + # Required. Expression that defines what assets fields to use for grouping. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: "parent,resource_name". + # @param page_token [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new + # + # # Call the group_findings method. + # result = client.group_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::GroupResult. + # p item + # end + # + def group_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.group_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.group_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.group_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.group_findings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the attack paths for a set of simulation results or valued resources + # and filter. + # + # @overload list_attack_paths(request, options = nil) + # Pass arguments to `list_attack_paths` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_attack_paths` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list attack paths. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @param filter [::String] + # The filter expression that filters the attack path in the response. + # Supported fields: + # + # * `valued_resources` supports = + # @param page_token [::String] + # The value returned by the last `ListAttackPathsResponse`; indicates + # that this is a continuation of a prior `ListAttackPaths` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new + # + # # Call the list_attack_paths method. + # result = client.list_attack_paths request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::AttackPath. + # p item + # end + # + def list_attack_paths request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_attack_paths.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_attack_paths.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_attack_paths request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_attack_paths, "attack_paths", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists BigQuery exports. Note that when requesting BigQuery exports at a + # given level all exports under that level are also returned e.g. if + # requesting BigQuery exports under a folder, then all BigQuery exports + # immediately under the folder plus the ones created under the projects + # within the folder are returned. + # + # @overload list_big_query_exports(request, options = nil) + # Pass arguments to `list_big_query_exports` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of BigQuery exports. Its + # format is `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListBigQueryExports` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListBigQueryExports` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new + # + # # Call the list_big_query_exports method. + # result = client.list_big_query_exports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::BigQueryExport. + # p item + # end + # + def list_big_query_exports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_big_query_exports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_big_query_exports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_big_query_exports request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_big_query_exports, "big_query_exports", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists an organization or source's findings. + # + # To list across all sources for a given location provide a `-` as the source + # id. If no location is specified, finding are assumed to be in global. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, order_by: nil, field_mask: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the source the findings belong to. If no location is + # specified, the default is global. The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To list across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/{location_id}` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-locations/{location_id}` + # + `projects/{projects_id}/sources/-` + # + `projects/{projects_id}/sources/-/locations/{location_id}` + # @param filter [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * security_marks.marks: `=`, `:` + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.display_name: `=`, `:` + # @param order_by [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,parent". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,parent". Redundant space characters in the + # syntax are insignificant. "name desc,parent" and " + # name desc , parent " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # security_marks.marks + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @param page_token [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_findings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists mute configs. If no location is specified, default is + # global. + # + # @overload list_mute_configs(request, options = nil) + # Pass arguments to `list_mute_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_mute_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of mute configs. Its format + # is `organizations/[organization_id]", "folders/[folder_id]`, + # `projects/[project_id]`, + # `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, + # `projects/[project_id]/locations/[location_id]`. + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListMuteConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMuteConfigs` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new + # + # # Call the list_mute_configs method. + # result = client.list_mute_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::MuteConfig. + # p item + # end + # + def list_mute_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_mute_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_mute_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_mute_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_mute_configs, "mute_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists notification configs. + # + # @overload list_notification_configs(request, options = nil) + # Pass arguments to `list_notification_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_notification_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent in which to list the notification + # configurations. Its format is + # "organizations/[organization_id]/locations/[location_id]", + # "folders/[folder_id]/locations/[location_id]", or + # "projects/[project_id]/locations/[location_id]". + # @param page_token [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new + # + # # Call the list_notification_configs method. + # result = client.list_notification_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::NotificationConfig. + # p item + # end + # + def list_notification_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_notification_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_notification_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_notification_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all ResourceValueConfigs. + # + # @overload list_resource_value_configs(request, options = nil) + # Pass arguments to `list_resource_value_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns the collection of resource value configs. + # Its format is + # `organizations/[organization_id]` + # @param page_size [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListResourceValueConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListResourceValueConfigs` must match the call that provided the + # page token. + # + # page_size can be specified, and the new page_size will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new + # + # # Call the list_resource_value_configs method. + # result = client.list_resource_value_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig. + # p item + # end + # + def list_resource_value_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_resource_value_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_resource_value_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_resource_value_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, "resource_value_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all sources belonging to an organization. + # + # @overload list_sources(request, options = nil) + # Pass arguments to `list_sources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent of sources to list. Its format should + # be `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @param page_token [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new + # + # # Call the list_sources method. + # result = client.list_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::Source. + # p item + # end + # + def list_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the valued resources for a set of simulation results and filter. + # + # @overload list_valued_resources(request, options = nil) + # Pass arguments to `list_valued_resources` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) + # Pass arguments to `list_valued_resources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list exposed resources. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # @param filter [::String] + # The filter expression that filters the valued resources in the response. + # Supported fields: + # + # * `resource_value` supports = + # * `resource_type` supports = + # @param page_token [::String] + # The value returned by the last `ListValuedResourcesResponse`; indicates + # that this is a continuation of a prior `ListValuedResources` call, and + # that the system should return the next page of data. + # @param page_size [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @param order_by [::String] + # Optional. The fields by which to order the valued resources response. + # + # Supported fields: + # + # * `exposed_score` + # + # * `resource_value` + # + # * `resource_type` + # + # Values should be a comma separated list of fields. For example: + # `exposed_score,resource_value`. + # + # The default sorting order is descending. To specify ascending or descending + # order for a field, append a " ASC" or a " DESC" suffix, respectively; for + # example: `exposed_score DESC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new + # + # # Call the list_valued_resources method. + # result = client.list_valued_resources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ValuedResource. + # p item + # end + # + def list_valued_resources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_valued_resources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_valued_resources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.list_valued_resources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_valued_resources, "valued_resources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the state of a finding. If no location is specified, finding is + # assumed to be in global + # + # @overload set_finding_state(request, options = nil) + # Pass arguments to `set_finding_state` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_finding_state(name: nil, state: nil) + # Pass arguments to `set_finding_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @param state [::Google::Cloud::SecurityCenter::V2::Finding::State] + # Required. The desired State of the finding. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new + # + # # Call the set_finding_state method. + # result = client.set_finding_state request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + # p result + # + def set_finding_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_finding_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_finding_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.set_finding_state request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified Source. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the mute state of a finding. If no location is specified, finding + # is assumed to be in global + # + # @overload set_mute(request, options = nil) + # Pass arguments to `set_mute` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::SetMuteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::SetMuteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_mute(name: nil, mute: nil) + # Pass arguments to `set_mute` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @param mute [::Google::Cloud::SecurityCenter::V2::Finding::Mute] + # Required. The desired state of the Mute. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new + # + # # Call the set_mute method. + # result = client.set_mute request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + # p result + # + def set_mute request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::SetMuteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_mute.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_mute.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_mute.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.set_mute request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has on the specified source. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a BigQuery export. + # + # @overload update_big_query_export(request, options = nil) + # Pass arguments to `update_big_query_export` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_big_query_export(big_query_export: nil, update_mask: nil) + # Pass arguments to `update_big_query_export` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param big_query_export [::Google::Cloud::SecurityCenter::V2::BigQueryExport, ::Hash] + # Required. The BigQuery export being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new + # + # # Call the update_big_query_export method. + # result = client.update_big_query_export request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. + # p result + # + def update_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_big_query_export.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_big_query_export request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates external system. This is for a given finding. If no location is + # specified, finding is assumed to be in global + # + # @overload update_external_system(request, options = nil) + # Pass arguments to `update_external_system` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_external_system(external_system: nil, update_mask: nil) + # Pass arguments to `update_external_system` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param external_system [::Google::Cloud::SecurityCenter::V2::ExternalSystem, ::Hash] + # Required. The external system resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the external system resource. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ExternalSystem] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new + # + # # Call the update_external_system method. + # result = client.update_external_system request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::ExternalSystem. + # p result + # + def update_external_system request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_external_system.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_external_system.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_external_system request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a finding. If no location is specified, finding is + # assumed to be in global. The corresponding source must exist for a finding + # creation to succeed. + # + # @overload update_finding(request, options = nil) + # Pass arguments to `update_finding` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_finding(finding: nil, update_mask: nil) + # Pass arguments to `update_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param finding [::Google::Cloud::SecurityCenter::V2::Finding, ::Hash] + # Required. The finding resource to update or create if it does not already + # exist. parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new + # + # # Call the update_finding method. + # result = client.update_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + # p result + # + def update_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_finding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_finding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a mute config. If no location is specified, default is + # global. + # + # @overload update_mute_config(request, options = nil) + # Pass arguments to `update_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_mute_config(mute_config: nil, update_mask: nil) + # Pass arguments to `update_mute_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param mute_config [::Google::Cloud::SecurityCenter::V2::MuteConfig, ::Hash] + # Required. The mute config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new + # + # # Call the update_mute_config method. + # result = client.update_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + # p result + # + def update_mute_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_mute_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_mute_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_mute_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + # + # @overload update_notification_config(request, options = nil) + # Pass arguments to `update_notification_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_notification_config(notification_config: nil, update_mask: nil) + # Pass arguments to `update_notification_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param notification_config [::Google::Cloud::SecurityCenter::V2::NotificationConfig, ::Hash] + # Required. The notification config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new + # + # # Call the update_notification_config method. + # result = client.update_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + # p result + # + def update_notification_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_notification_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_notification_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_notification_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing ResourceValueConfigs with new rules. + # + # @overload update_resource_value_config(request, options = nil) + # Pass arguments to `update_resource_value_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) + # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_value_config [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig, ::Hash] + # Required. The resource value config being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # To update nested fields, include the top level field in the mask + # For example, to update gcp_metadata.resource_type, include the + # "gcp_metadata" field mask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new + # + # # Call the update_resource_value_config method. + # result = client.update_resource_value_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. + # p result + # + def update_resource_value_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_resource_value_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_resource_value_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_resource_value_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates security marks. For Finding Security marks, if no location is + # specified, finding is assumed to be in global. Assets Security Marks can + # only be accessed through global endpoint. + # + # @overload update_security_marks(request, options = nil) + # Pass arguments to `update_security_marks` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_security_marks(security_marks: nil, update_mask: nil) + # Pass arguments to `update_security_marks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_marks [::Google::Cloud::SecurityCenter::V2::SecurityMarks, ::Hash] + # Required. The security marks resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new + # + # # Call the update_security_marks method. + # result = client.update_security_marks request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::SecurityMarks. + # p result + # + def update_security_marks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_security_marks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_security_marks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_security_marks request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a source. + # + # @overload update_source(request, options = nil) + # Pass arguments to `update_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_source(source: nil, update_mask: nil) + # Pass arguments to `update_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param source [::Google::Cloud::SecurityCenter::V2::Source, ::Hash] + # Required. The source resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new + # + # # Call the update_source method. + # result = client.update_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + # p result + # + def update_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_stub.update_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecurityCenter REST API. + # + # This class represents the configuration for SecurityCenter REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # batch_create_resource_value_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the SecurityCenter API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `batch_create_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_resource_value_configs + ## + # RPC-specific configuration for `bulk_mute_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_mute_findings + ## + # RPC-specific configuration for `create_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :create_big_query_export + ## + # RPC-specific configuration for `create_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_finding + ## + # RPC-specific configuration for `create_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_mute_config + ## + # RPC-specific configuration for `create_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_notification_config + ## + # RPC-specific configuration for `create_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_source + ## + # RPC-specific configuration for `delete_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_big_query_export + ## + # RPC-specific configuration for `delete_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_mute_config + ## + # RPC-specific configuration for `delete_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_notification_config + ## + # RPC-specific configuration for `delete_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_resource_value_config + ## + # RPC-specific configuration for `get_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :get_big_query_export + ## + # RPC-specific configuration for `get_simulation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_simulation + ## + # RPC-specific configuration for `get_valued_resource` + # @return [::Gapic::Config::Method] + # + attr_reader :get_valued_resource + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `get_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_mute_config + ## + # RPC-specific configuration for `get_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_notification_config + ## + # RPC-specific configuration for `get_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_value_config + ## + # RPC-specific configuration for `get_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_source + ## + # RPC-specific configuration for `group_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :group_findings + ## + # RPC-specific configuration for `list_attack_paths` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attack_paths + ## + # RPC-specific configuration for `list_big_query_exports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_big_query_exports + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_mute_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_mute_configs + ## + # RPC-specific configuration for `list_notification_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_notification_configs + ## + # RPC-specific configuration for `list_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_value_configs + ## + # RPC-specific configuration for `list_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sources + ## + # RPC-specific configuration for `list_valued_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_valued_resources + ## + # RPC-specific configuration for `set_finding_state` + # @return [::Gapic::Config::Method] + # + attr_reader :set_finding_state + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `set_mute` + # @return [::Gapic::Config::Method] + # + attr_reader :set_mute + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `update_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :update_big_query_export + ## + # RPC-specific configuration for `update_external_system` + # @return [::Gapic::Config::Method] + # + attr_reader :update_external_system + ## + # RPC-specific configuration for `update_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_finding + ## + # RPC-specific configuration for `update_mute_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_mute_config + ## + # RPC-specific configuration for `update_notification_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_notification_config + ## + # RPC-specific configuration for `update_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_resource_value_config + ## + # RPC-specific configuration for `update_security_marks` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_marks + ## + # RPC-specific configuration for `update_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_source + + # @private + def initialize parent_rpcs = nil + batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs + @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config + bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings + @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config + create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export + @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config + create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding + @create_finding = ::Gapic::Config::Method.new create_finding_config + create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config + @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config + create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config + @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config + create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source + @create_source = ::Gapic::Config::Method.new create_source_config + delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export + @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config + delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config + @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config + delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config + @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config + delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config + @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config + get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export + @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config + get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation + @get_simulation = ::Gapic::Config::Method.new get_simulation_config + get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource + @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config + @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config + get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config + @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config + get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config + @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config + get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source + @get_source = ::Gapic::Config::Method.new get_source_config + group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings + @group_findings = ::Gapic::Config::Method.new group_findings_config + list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths + @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config + list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports + @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs + @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config + list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs + @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config + list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs + @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config + list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources + @list_sources = ::Gapic::Config::Method.new list_sources_config + list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources + @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config + set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state + @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute + @set_mute = ::Gapic::Config::Method.new set_mute_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export + @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config + update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system + @update_external_system = ::Gapic::Config::Method.new update_external_system_config + update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding + @update_finding = ::Gapic::Config::Method.new update_finding_config + update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config + @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config + update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config + @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config + update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config + @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config + update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks + @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config + update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source + @update_source = ::Gapic::Config::Method.new update_source_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb new file mode 100644 index 000000000000..76b36a0a23ac --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb @@ -0,0 +1,926 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module SecurityCenter + module V2 + module SecurityCenter + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the SecurityCenter Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenter Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycenter.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:cancel", + matches: [ + ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb new file mode 100644 index 000000000000..49be184914d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb @@ -0,0 +1,3336 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/securitycenter/v2/securitycenter_service_pb" + +module Google + module Cloud + module SecurityCenter + module V2 + module SecurityCenter + module Rest + ## + # REST service stub for the SecurityCenter service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the batch_create_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] + # A result object deserialized from the server's reply + def batch_create_resource_value_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_resource_value_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_create_resource_value_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the bulk_mute_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def bulk_mute_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_mute_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "bulk_mute_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # A result object deserialized from the server's reply + def create_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateFindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # A result object deserialized from the server's reply + def create_finding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_finding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_finding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # A result object deserialized from the server's reply + def create_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # A result object deserialized from the server's reply + def create_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # A result object deserialized from the server's reply + def create_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_resource_value_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_resource_value_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_resource_value_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # A result object deserialized from the server's reply + def get_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_simulation REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSimulationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Simulation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Simulation] + # A result object deserialized from the server's reply + def get_simulation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_simulation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_simulation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::Simulation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_valued_resource REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ValuedResource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource] + # A result object deserialized from the server's reply + def get_valued_resource request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_valued_resource_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_valued_resource", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ValuedResource.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # A result object deserialized from the server's reply + def get_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # A result object deserialized from the server's reply + def get_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # A result object deserialized from the server's reply + def get_resource_value_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_value_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_resource_value_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # A result object deserialized from the server's reply + def get_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the group_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse] + # A result object deserialized from the server's reply + def group_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_group_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "group_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_attack_paths REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse] + # A result object deserialized from the server's reply + def list_attack_paths request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_attack_paths_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_attack_paths", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_big_query_exports REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse] + # A result object deserialized from the server's reply + def list_big_query_exports request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_big_query_exports_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_big_query_exports", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ListFindingsResponse] + # A result object deserialized from the server's reply + def list_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_mute_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse] + # A result object deserialized from the server's reply + def list_mute_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_mute_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_mute_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_notification_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse] + # A result object deserialized from the server's reply + def list_notification_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_notification_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse] + # A result object deserialized from the server's reply + def list_resource_value_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_value_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_resource_value_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_sources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ListSourcesResponse] + # A result object deserialized from the server's reply + def list_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ListSourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_valued_resources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse] + # A result object deserialized from the server's reply + def list_valued_resources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_valued_resources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_valued_resources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_finding_state REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # A result object deserialized from the server's reply + def set_finding_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_finding_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_finding_state", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_mute REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetMuteRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # A result object deserialized from the server's reply + def set_mute request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_mute_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_mute", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # A result object deserialized from the server's reply + def update_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_big_query_export_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_external_system REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ExternalSystem] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] + # A result object deserialized from the server's reply + def update_external_system request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_external_system_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_external_system", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ExternalSystem.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # A result object deserialized from the server's reply + def update_finding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_finding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_finding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # A result object deserialized from the server's reply + def update_mute_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_mute_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_mute_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # A result object deserialized from the server's reply + def update_notification_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_notification_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # A result object deserialized from the server's reply + def update_resource_value_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_resource_value_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_resource_value_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_security_marks REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # A result object deserialized from the server's reply + def update_security_marks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_security_marks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_security_marks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::SecurityMarks.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # A result object deserialized from the server's reply + def update_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenter::V2::Source.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_create_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_create_resource_value_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/resourceValueConfigs:batchCreate", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/resourceValueConfigs:batchCreate", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_mute_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_mute_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateFindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_finding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings", + body: "finding", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings", + body: "finding", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/sources", + body: "source", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_resource_value_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_simulation REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSimulationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_simulation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_valued_resource REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_valued_resource_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_resource_value_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the group_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_group_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_attack_paths REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_attack_paths_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_big_query_exports REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_big_query_exports_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_mute_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_mute_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_notification_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_notification_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_resource_value_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/resourceValueConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/resourceValueConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/sources", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/sources", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/sources", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_valued_resources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_valued_resources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/valuedResources", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/valuedResources", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/valuedResources", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_finding_state REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_finding_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_mute REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetMuteRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_mute_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_external_system REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_external_system_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_finding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_mute_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_notification_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_resource_value_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{resource_value_config.name}", + body: "resource_value_config", + matches: [ + ["resource_value_config.name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{resource_value_config.name}", + body: "resource_value_config", + matches: [ + ["resource_value_config.name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_security_marks REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_security_marks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{source.name}", + body: "source", + matches: [ + ["source.name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb new file mode 100644 index 000000000000..543e0946f0de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb new file mode 100644 index 000000000000..626f8a57d25d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/access.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/securitycenter/v2/access.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x89\x03\n\x06\x41\x63\x63\x65ss\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x11\n\tcaller_ip\x18\x02 \x01(\t\x12\x42\n\rcaller_ip_geo\x18\x03 \x01(\x0b\x32+.google.cloud.securitycenter.v2.Geolocation\x12\x19\n\x11user_agent_family\x18\x04 \x01(\t\x12\x12\n\nuser_agent\x18\x05 \x01(\t\x12\x14\n\x0cservice_name\x18\x06 \x01(\t\x12\x13\n\x0bmethod_name\x18\x07 \x01(\t\x12\x19\n\x11principal_subject\x18\x08 \x01(\t\x12 \n\x18service_account_key_name\x18\t \x01(\t\x12\x65\n\x1fservice_account_delegation_info\x18\n \x03(\x0b\x32<.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo\x12\x11\n\tuser_name\x18\x0b \x01(\t\"R\n\x1cServiceAccountDelegationInfo\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x19\n\x11principal_subject\x18\x02 \x01(\t\"\"\n\x0bGeolocation\x12\x13\n\x0bregion_code\x18\x01 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v2B\x0b\x41\x63\x63\x65ssProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Access = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Access").msgclass + ServiceAccountDelegationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ServiceAccountDelegationInfo").msgclass + Geolocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Geolocation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb new file mode 100644 index 000000000000..b2ded5cca4eb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/affected_resources.proto + +require 'google/protobuf' + + +descriptor_data = "\n7google/cloud/securitycenter/v2/affected_resources.proto\x12\x1egoogle.cloud.securitycenter.v2\"\"\n\x11\x41\x66\x66\x65\x63tedResources\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x42\xf0\x01\n\"com.google.cloud.securitycenter.v2B\x16\x41\x66\x66\x65\x63tedResourcesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AffectedResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AffectedResources").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb new file mode 100644 index 000000000000..01a07022c2fe --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/agent_anomaly.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v2/agent_anomaly.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xcc\x01\n\x0c\x41gentAnomaly\x12\x18\n\x10\x63onfidence_score\x18\x01 \x01(\x01\x12N\n\x13\x64\x65tector_references\x18\x02 \x03(\x0b\x32\x31.google.cloud.securitycenter.v2.DetectorReference\x12R\n\x15invocation_references\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.InvocationReference\"\x8c\x02\n\x11\x44\x65tectorReference\x12L\n\x08severity\x18\x01 \x01(\x0e\x32:.google.cloud.securitycenter.v2.DetectorReference.Severity\x12\x13\n\x0b\x64\x65tector_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x65xplanation\x18\x04 \x01(\t\x12\x16\n\x0erecommendation\x18\x05 \x01(\t\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\",\n\x13InvocationReference\x12\x15\n\rinvocation_id\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v2B\x11\x41gentAnomalyProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AgentAnomaly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AgentAnomaly").msgclass + DetectorReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DetectorReference").msgclass + DetectorReference::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DetectorReference.Severity").enummodule + InvocationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.InvocationReference").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb new file mode 100644 index 000000000000..109bb02aa5a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/agent.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/cloud/securitycenter/v2/agent.proto\x12\x1egoogle.cloud.securitycenter.v2\")\n\x05\x41gent\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\tB\xe4\x01\n\"com.google.cloud.securitycenter.v2B\nAgentProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Agent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Agent").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb new file mode 100644 index 000000000000..d708ada7a87f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/agent_session.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v2/agent_session.proto\x12\x1egoogle.cloud.securitycenter.v2\"\"\n\x0c\x41gentSession\x12\x12\n\nsession_id\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v2B\x11\x41gentSessionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AgentSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AgentSession").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb new file mode 100644 index 000000000000..e0d357ddd795 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/ai_model.proto + +require 'google/protobuf' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/ai_model.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xbe\x02\n\x07\x41iModel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x64omain\x18\x02 \x01(\t\x12\x0f\n\x07library\x18\x03 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x11\n\tpublisher\x18\x05 \x01(\t\x12W\n\x13\x64\x65ployment_platform\x18\x06 \x01(\x0e\x32:.google.cloud.securitycenter.v2.AiModel.DeploymentPlatform\x12\x14\n\x0c\x64isplay_name\x18\x07 \x01(\t\"p\n\x12\x44\x65ploymentPlatform\x12#\n\x1f\x44\x45PLOYMENT_PLATFORM_UNSPECIFIED\x10\x00\x12\r\n\tVERTEX_AI\x10\x01\x12\x07\n\x03GKE\x10\x02\x12\x07\n\x03GCE\x10\x03\x12\x14\n\x10\x46INE_TUNED_MODEL\x10\x04\x42\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x41iModelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AiModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AiModel").msgclass + AiModel::DeploymentPlatform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AiModel.DeploymentPlatform").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb new file mode 100644 index 000000000000..3adcac6a59b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/application.proto + +require 'google/protobuf' + + +descriptor_data = "\n0google/cloud/securitycenter/v2/application.proto\x12\x1egoogle.cloud.securitycenter.v2\"1\n\x0b\x41pplication\x12\x10\n\x08\x62\x61se_uri\x18\x01 \x01(\t\x12\x10\n\x08\x66ull_uri\x18\x02 \x01(\tB\xea\x01\n\"com.google.cloud.securitycenter.v2B\x10\x41pplicationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Application = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Application").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb new file mode 100644 index 000000000000..2455e60ba1f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/attack_exposure.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v2/attack_exposure.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x03\n\x0e\x41ttackExposure\x12\r\n\x05score\x18\x01 \x01(\x01\x12;\n\x17latest_calculation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1e\n\x16\x61ttack_exposure_result\x18\x03 \x01(\t\x12H\n\x05state\x18\x04 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.AttackExposure.StateB\x03\xe0\x41\x03\x12*\n\"exposed_high_value_resources_count\x18\x05 \x01(\x05\x12,\n$exposed_medium_value_resources_count\x18\x06 \x01(\x05\x12)\n!exposed_low_value_resources_count\x18\x07 \x01(\x05\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nCALCULATED\x10\x01\x12\x12\n\x0eNOT_CALCULATED\x10\x02\x42\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x41ttackExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AttackExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackExposure").msgclass + AttackExposure::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackExposure.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb new file mode 100644 index 000000000000..29d28dc5bf3c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/attack_path.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n0google/cloud/securitycenter/v2/attack_path.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xf0\n\n\nAttackPath\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\npath_nodes\x18\x02 \x03(\x0b\x32\x39.google.cloud.securitycenter.v2.AttackPath.AttackPathNode\x12H\n\x05\x65\x64ges\x18\x03 \x03(\x0b\x32\x39.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge\x1a\xbd\x06\n\x0e\x41ttackPathNode\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12p\n\x13\x61ssociated_findings\x18\x04 \x03(\x0b\x32S.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding\x12\x0c\n\x04uuid\x18\x05 \x01(\t\x12^\n\x0c\x61ttack_steps\x18\x06 \x03(\x0b\x32H.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode\x1a^\n\x19PathNodeAssociatedFinding\x12\x19\n\x11\x63\x61nonical_finding\x18\x01 \x01(\t\x12\x18\n\x10\x66inding_category\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x1a\xb0\x02\n\x0e\x41ttackStepNode\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12P\n\x04type\x18\x02 \x01(\x0e\x32\x42.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x64\n\x06labels\x18\x04 \x03(\x0b\x32T.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"y\n\x08NodeType\x12\x19\n\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rNODE_TYPE_AND\x10\x01\x12\x10\n\x0cNODE_TYPE_OR\x10\x02\x12\x15\n\x11NODE_TYPE_DEFENSE\x10\x03\x12\x16\n\x12NODE_TYPE_ATTACKER\x10\x04\x1a\x35\n\x0e\x41ttackPathEdge\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x02 \x01(\t:\xc3\x02\xea\x41\xbf\x02\n(securitycenter.googleapis.com/AttackPath\x12qorganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}\x12\x86\x01organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}*\x0b\x61ttackPaths2\nattackPathB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x41ttackPathProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AttackPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath").msgclass + AttackPath::AttackPathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode").msgclass + AttackPath::AttackPathNode::PathNodeAssociatedFinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding").msgclass + AttackPath::AttackPathNode::AttackStepNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode").msgclass + AttackPath::AttackPathNode::NodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType").enummodule + AttackPath::AttackPathEdge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathEdge").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb new file mode 100644 index 000000000000..1d0185074970 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/backup_disaster_recovery.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x86\x02\n\x16\x42\x61\x63kupDisasterRecovery\x12\x17\n\x0f\x62\x61\x63kup_template\x18\x01 \x01(\t\x12\x10\n\x08policies\x18\x02 \x03(\t\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x14\n\x0c\x61pplications\x18\x04 \x03(\t\x12\x14\n\x0cstorage_pool\x18\x05 \x01(\t\x12\x16\n\x0epolicy_options\x18\x06 \x03(\t\x12\x0f\n\x07profile\x18\x07 \x01(\t\x12\x11\n\tappliance\x18\x08 \x01(\t\x12\x13\n\x0b\x62\x61\x63kup_type\x18\t \x01(\t\x12\x36\n\x12\x62\x61\x63kup_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xf5\x01\n\"com.google.cloud.securitycenter.v2B\x1b\x42\x61\x63kupDisasterRecoveryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + BackupDisasterRecovery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BackupDisasterRecovery").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb new file mode 100644 index 000000000000..c0ea27ff0b00 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/bigquery_export.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v2/bigquery_export.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa2\x04\n\x0e\x42igQueryExport\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x04 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tprincipal\x18\x08 \x01(\tB\x03\xe0\x41\x03:\xa1\x02\xea\x41\x9d\x02\n,securitycenter.googleapis.com/BigQueryExport\x12Jorganizations/{organization}/locations/{location}/bigQueryExports/{export}\x12>folders/{folder}/locations/{location}/bigQueryExports/{export}\x12@projects/{project}/locations/{location}/bigQueryExports/{export}*\x0f\x62igQueryExports2\x0e\x62igQueryExportB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x42igQueryExportProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BigQueryExport").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb new file mode 100644 index 000000000000..077e14997c90 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/chokepoint.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/chokepoint.proto\x12\x1egoogle.cloud.securitycenter.v2\"&\n\nChokepoint\x12\x18\n\x10related_findings\x18\x01 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43hokepointProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Chokepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Chokepoint").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb new file mode 100644 index 000000000000..6cd7e16d09a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/cloud_armor.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n0google/cloud/securitycenter/v2/cloud_armor.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1egoogle/protobuf/duration.proto\"\xde\x02\n\nCloudArmor\x12G\n\x0fsecurity_policy\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.SecurityPolicy\x12:\n\x08requests\x18\x02 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Requests\x12O\n\x13\x61\x64\x61ptive_protection\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.AdaptiveProtection\x12\x36\n\x06\x61ttack\x18\x04 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Attack\x12\x15\n\rthreat_vector\x18\x05 \x01(\t\x12+\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\"=\n\x0eSecurityPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x07preview\x18\x03 \x01(\x08\"j\n\x08Requests\x12\r\n\x05ratio\x18\x01 \x01(\x01\x12\x1a\n\x12short_term_allowed\x18\x02 \x01(\x05\x12\x19\n\x11long_term_allowed\x18\x03 \x01(\x05\x12\x18\n\x10long_term_denied\x18\x04 \x01(\x05\"(\n\x12\x41\x64\x61ptiveProtection\x12\x12\n\nconfidence\x18\x01 \x01(\x01\"\x82\x01\n\x06\x41ttack\x12\x17\n\x0fvolume_pps_long\x18\x04 \x01(\x03\x12\x17\n\x0fvolume_bps_long\x18\x05 \x01(\x03\x12\x16\n\x0e\x63lassification\x18\x03 \x01(\t\x12\x16\n\nvolume_pps\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x16\n\nvolume_bps\x18\x02 \x01(\x05\x42\x02\x18\x01\x42\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43loudArmorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + CloudArmor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudArmor").msgclass + SecurityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPolicy").msgclass + Requests = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Requests").msgclass + AdaptiveProtection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AdaptiveProtection").msgclass + Attack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Attack").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb new file mode 100644 index 000000000000..388023feb3f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xf4\x01\n\x13\x43loudDlpDataProfile\x12>\n\x0c\x64\x61ta_profile\x18\x01 \x01(\tB(\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\x12S\n\x0bparent_type\x18\x02 \x01(\x0e\x32>.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType\"H\n\nParentType\x12\x1b\n\x17PARENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cORGANIZATION\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\x42\x94\x03\n\"com.google.cloud.securitycenter.v2B\x18\x43loudDlpDataProfileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41\x9e\x01\n#dlp.googleapis.com/TableDataProfile\x12\x30projects/{project}/tableProfiles/{table_profile}\x12\x45projects/{project}/locations/{location}/tableProfiles/{table_profile}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + CloudDlpDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpDataProfile").msgclass + CloudDlpDataProfile::ParentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb new file mode 100644 index 000000000000..98b7cb9b4a86 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/cloud_dlp_inspection.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\x88\x01\n\x12\x43loudDlpInspection\x12\x33\n\x0binspect_job\x18\x01 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x11\n\tinfo_type\x18\x02 \x01(\t\x12\x17\n\x0finfo_type_count\x18\x03 \x01(\x03\x12\x11\n\tfull_scan\x18\x04 \x01(\x08\x42\xf0\x02\n\"com.google.cloud.securitycenter.v2B\x17\x43loudDlpInspectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + CloudDlpInspection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpInspection").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb new file mode 100644 index 000000000000..547a8fe23d36 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/compliance.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/compliance.proto\x12\x1egoogle.cloud.securitycenter.v2\"<\n\nCompliance\x12\x10\n\x08standard\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x0b\n\x03ids\x18\x03 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43omplianceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Compliance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Compliance").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb new file mode 100644 index 000000000000..b0144d4d939a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/connection.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/connection.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x81\x02\n\nConnection\x12\x16\n\x0e\x64\x65stination_ip\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_port\x18\x02 \x01(\x05\x12\x11\n\tsource_ip\x18\x03 \x01(\t\x12\x13\n\x0bsource_port\x18\x04 \x01(\x05\x12\x45\n\x08protocol\x18\x05 \x01(\x0e\x32\x33.google.cloud.securitycenter.v2.Connection.Protocol\"R\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x08\n\x04ICMP\x10\x01\x12\x07\n\x03TCP\x10\x06\x12\x07\n\x03UDP\x10\x11\x12\x07\n\x03GRE\x10/\x12\x07\n\x03\x45SP\x10\x32\x42\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43onnectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Connection").msgclass + Connection::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Connection.Protocol").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb new file mode 100644 index 000000000000..06a5286cc3de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/contact_details.proto + +require 'google/protobuf' + + +descriptor_data = "\n4google/cloud/securitycenter/v2/contact_details.proto\x12\x1egoogle.cloud.securitycenter.v2\"K\n\x0e\x43ontactDetails\x12\x39\n\x08\x63ontacts\x18\x01 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Contact\"\x18\n\x07\x43ontact\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x43ontactDetailsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + ContactDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ContactDetails").msgclass + Contact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Contact").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb new file mode 100644 index 000000000000..14bc2a2bab9f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/container.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v2/label_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/securitycenter/v2/container.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a*google/cloud/securitycenter/v2/label.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\x01\n\tContainer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08image_id\x18\x03 \x01(\t\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.google.cloud.securitycenter.v2.Label\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe8\x01\n\"com.google.cloud.securitycenter.v2B\x0e\x43ontainerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Container").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb new file mode 100644 index 000000000000..77d3859aa987 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/data_access_event.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n6google/cloud/securitycenter/v2/data_access_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x0f\x44\x61taAccessEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\t\x12\x17\n\x0fprincipal_email\x18\x02 \x01(\t\x12L\n\toperation\x18\x03 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.DataAccessEvent.Operation\x12.\n\nevent_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"D\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x08\n\x04MOVE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\x42\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14\x44\x61taAccessEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + DataAccessEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataAccessEvent").msgclass + DataAccessEvent::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataAccessEvent.Operation").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb new file mode 100644 index 000000000000..418d09d93c4a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/data_flow_event.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v2/data_flow_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x97\x02\n\rDataFlowEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\t\x12\x17\n\x0fprincipal_email\x18\x02 \x01(\t\x12J\n\toperation\x18\x03 \x01(\x0e\x32\x37.google.cloud.securitycenter.v2.DataFlowEvent.Operation\x12\x19\n\x11violated_location\x18\x04 \x01(\t\x12.\n\nevent_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"D\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x08\n\x04MOVE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\x42\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12\x44\x61taFlowEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + DataFlowEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataFlowEvent").msgclass + DataFlowEvent::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataFlowEvent.Operation").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb new file mode 100644 index 000000000000..17693433fba7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/data_retention_deletion_event.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nBgoogle/cloud/securitycenter/v2/data_retention_deletion_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x02\n\x1a\x44\x61taRetentionDeletionEvent\x12\x38\n\x14\x65vent_detection_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x64\x61ta_object_count\x18\x03 \x01(\x03\x12\x38\n\x15max_retention_allowed\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12X\n\nevent_type\x18\x05 \x01(\x0e\x32\x44.google.cloud.securitycenter.v2.DataRetentionDeletionEvent.EventType\"H\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x45VENT_TYPE_MAX_TTL_EXCEEDED\x10\x01\x42\xf9\x01\n\"com.google.cloud.securitycenter.v2B\x1f\x44\x61taRetentionDeletionEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + DataRetentionDeletionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataRetentionDeletionEvent").msgclass + DataRetentionDeletionEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataRetentionDeletionEvent.EventType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb new file mode 100644 index 000000000000..32310070d4bc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/database.proto + +require 'google/protobuf' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/database.proto\x12\x1egoogle.cloud.securitycenter.v2\"s\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x11\n\tuser_name\x18\x03 \x01(\t\x12\r\n\x05query\x18\x04 \x01(\t\x12\x10\n\x08grantees\x18\x05 \x03(\t\x12\x0f\n\x07version\x18\x06 \x01(\tB\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rDatabaseProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Database").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb new file mode 100644 index 000000000000..a62acf2da0c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/disk.proto + +require 'google/protobuf' + + +descriptor_data = "\n)google/cloud/securitycenter/v2/disk.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x14\n\x04\x44isk\x12\x0c\n\x04name\x18\x01 \x01(\tB\xe3\x01\n\"com.google.cloud.securitycenter.v2B\tDiskProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Disk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Disk").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb new file mode 100644 index 000000000000..4e217d9041f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/exfiltration.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/cloud/securitycenter/v2/exfiltration.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xaf\x01\n\x0c\x45xfiltration\x12>\n\x07sources\x18\x01 \x03(\x0b\x32-.google.cloud.securitycenter.v2.ExfilResource\x12>\n\x07targets\x18\x02 \x03(\x0b\x32-.google.cloud.securitycenter.v2.ExfilResource\x12\x1f\n\x17total_exfiltrated_bytes\x18\x03 \x01(\x03\"1\n\rExfilResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ncomponents\x18\x02 \x03(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v2B\x11\x45xfiltrationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Exfiltration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Exfiltration").msgclass + ExfilResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExfilResource").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb new file mode 100644 index 000000000000..684f53455eeb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/external_system.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v2/external_system.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\t\n\x0e\x45xternalSystem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tassignees\x18\x02 \x03(\t\x12\x14\n\x0c\x65xternal_uid\x18\x03 \x01(\t\x12\x0e\n\x06status\x18\x04 \x01(\t\x12?\n\x1b\x65xternal_system_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x63\x61se_uri\x18\x06 \x01(\t\x12\x15\n\rcase_priority\x18\x07 \x01(\t\x12,\n\x08\x63\x61se_sla\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10\x63\x61se_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63\x61se_close_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\x0bticket_info\x18\x08 \x01(\x0b\x32\x39.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo\x1a\x8d\x01\n\nTicketInfo\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61ssignee\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0b\n\x03uri\x18\x04 \x01(\t\x12\x0e\n\x06status\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\x97\x05\xea\x41\x93\x05\n,securitycenter.googleapis.com/ExternalSystem\x12\x61organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12vorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}\x12Ufolders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12jfolders/{folder}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}\x12Wprojects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12lprojects/{project}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}B\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x45xternalSystemProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + ExternalSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExternalSystem").msgclass + ExternalSystem::TicketInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExternalSystem.TicketInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb new file mode 100644 index 000000000000..3004389fa02c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/file.proto + +require 'google/protobuf' + + +descriptor_data = "\n)google/cloud/securitycenter/v2/file.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x83\x04\n\x04\x46ile\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x03\x12\x0e\n\x06sha256\x18\x03 \x01(\t\x12\x13\n\x0bhashed_size\x18\x04 \x01(\x03\x12\x18\n\x10partially_hashed\x18\x05 \x01(\x08\x12\x10\n\x08\x63ontents\x18\x06 \x01(\t\x12@\n\tdisk_path\x18\x07 \x01(\x0b\x32-.google.cloud.securitycenter.v2.File.DiskPath\x12\x46\n\noperations\x18\x08 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.File.FileOperation\x1a\x39\n\x08\x44iskPath\x12\x16\n\x0epartition_uuid\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\t\x1a\xc8\x01\n\rFileOperation\x12N\n\x04type\x18\x01 \x01(\x0e\x32@.google.cloud.securitycenter.v2.File.FileOperation.OperationType\"g\n\rOperationType\x12\x1e\n\x1aOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04OPEN\x10\x01\x12\x08\n\x04READ\x10\x02\x12\n\n\x06RENAME\x10\x03\x12\t\n\x05WRITE\x10\x04\x12\x0b\n\x07\x45XECUTE\x10\x05\x42\xe3\x01\n\"com.google.cloud.securitycenter.v2B\tFileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File").msgclass + File::DiskPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.DiskPath").msgclass + File::FileOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.FileOperation").msgclass + File::FileOperation::OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.FileOperation.OperationType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb new file mode 100644 index 000000000000..8dc9f5c367d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/finding.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v2/access_pb' +require 'google/cloud/securitycenter/v2/affected_resources_pb' +require 'google/cloud/securitycenter/v2/agent_pb' +require 'google/cloud/securitycenter/v2/agent_anomaly_pb' +require 'google/cloud/securitycenter/v2/agent_session_pb' +require 'google/cloud/securitycenter/v2/ai_model_pb' +require 'google/cloud/securitycenter/v2/application_pb' +require 'google/cloud/securitycenter/v2/attack_exposure_pb' +require 'google/cloud/securitycenter/v2/backup_disaster_recovery_pb' +require 'google/cloud/securitycenter/v2/chokepoint_pb' +require 'google/cloud/securitycenter/v2/cloud_armor_pb' +require 'google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb' +require 'google/cloud/securitycenter/v2/cloud_dlp_inspection_pb' +require 'google/cloud/securitycenter/v2/compliance_pb' +require 'google/cloud/securitycenter/v2/connection_pb' +require 'google/cloud/securitycenter/v2/contact_details_pb' +require 'google/cloud/securitycenter/v2/container_pb' +require 'google/cloud/securitycenter/v2/data_access_event_pb' +require 'google/cloud/securitycenter/v2/data_flow_event_pb' +require 'google/cloud/securitycenter/v2/data_retention_deletion_event_pb' +require 'google/cloud/securitycenter/v2/database_pb' +require 'google/cloud/securitycenter/v2/disk_pb' +require 'google/cloud/securitycenter/v2/exfiltration_pb' +require 'google/cloud/securitycenter/v2/external_system_pb' +require 'google/cloud/securitycenter/v2/file_pb' +require 'google/cloud/securitycenter/v2/group_membership_pb' +require 'google/cloud/securitycenter/v2/iam_binding_pb' +require 'google/cloud/securitycenter/v2/indicator_pb' +require 'google/cloud/securitycenter/v2/ip_rules_pb' +require 'google/cloud/securitycenter/v2/job_pb' +require 'google/cloud/securitycenter/v2/kernel_rootkit_pb' +require 'google/cloud/securitycenter/v2/kubernetes_pb' +require 'google/cloud/securitycenter/v2/load_balancer_pb' +require 'google/cloud/securitycenter/v2/log_entry_pb' +require 'google/cloud/securitycenter/v2/mitre_attack_pb' +require 'google/cloud/securitycenter/v2/network_pb' +require 'google/cloud/securitycenter/v2/notebook_pb' +require 'google/cloud/securitycenter/v2/org_policy_pb' +require 'google/cloud/securitycenter/v2/process_pb' +require 'google/cloud/securitycenter/v2/security_marks_pb' +require 'google/cloud/securitycenter/v2/security_posture_pb' +require 'google/cloud/securitycenter/v2/toxic_combination_pb' +require 'google/cloud/securitycenter/v2/vertex_ai_pb' +require 'google/cloud/securitycenter/v2/vulnerability_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/securitycenter/v2/finding.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/access.proto\x1a\x37google/cloud/securitycenter/v2/affected_resources.proto\x1a*google/cloud/securitycenter/v2/agent.proto\x1a\x32google/cloud/securitycenter/v2/agent_anomaly.proto\x1a\x32google/cloud/securitycenter/v2/agent_session.proto\x1a-google/cloud/securitycenter/v2/ai_model.proto\x1a\x30google/cloud/securitycenter/v2/application.proto\x1a\x34google/cloud/securitycenter/v2/attack_exposure.proto\x1a=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v2/chokepoint.proto\x1a\x30google/cloud/securitycenter/v2/cloud_armor.proto\x1a;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v2/compliance.proto\x1a/google/cloud/securitycenter/v2/connection.proto\x1a\x34google/cloud/securitycenter/v2/contact_details.proto\x1a.google/cloud/securitycenter/v2/container.proto\x1a\x36google/cloud/securitycenter/v2/data_access_event.proto\x1a\x34google/cloud/securitycenter/v2/data_flow_event.proto\x1a\x42google/cloud/securitycenter/v2/data_retention_deletion_event.proto\x1a-google/cloud/securitycenter/v2/database.proto\x1a)google/cloud/securitycenter/v2/disk.proto\x1a\x31google/cloud/securitycenter/v2/exfiltration.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a)google/cloud/securitycenter/v2/file.proto\x1a\x35google/cloud/securitycenter/v2/group_membership.proto\x1a\x30google/cloud/securitycenter/v2/iam_binding.proto\x1a.google/cloud/securitycenter/v2/indicator.proto\x1a-google/cloud/securitycenter/v2/ip_rules.proto\x1a(google/cloud/securitycenter/v2/job.proto\x1a\x33google/cloud/securitycenter/v2/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v2/kubernetes.proto\x1a\x32google/cloud/securitycenter/v2/load_balancer.proto\x1a.google/cloud/securitycenter/v2/log_entry.proto\x1a\x31google/cloud/securitycenter/v2/mitre_attack.proto\x1a,google/cloud/securitycenter/v2/network.proto\x1a-google/cloud/securitycenter/v2/notebook.proto\x1a/google/cloud/securitycenter/v2/org_policy.proto\x1a,google/cloud/securitycenter/v2/process.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a\x35google/cloud/securitycenter/v2/security_posture.proto\x1a\x36google/cloud/securitycenter/v2/toxic_combination.proto\x1a.google/cloud/securitycenter/v2/vertex_ai.proto\x1a\x32google/cloud/securitycenter/v2/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdf*\n\x07\x46inding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0e\x63\x61nonical_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1a\n\rresource_name\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x41\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x07 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x65xternal_uri\x18\x08 \x01(\t\x12X\n\x11source_properties\x18\t \x03(\x0b\x32=.google.cloud.securitycenter.v2.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\n \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x08severity\x18\x0e \x01(\x0e\x32\x30.google.cloud.securitycenter.v2.Finding.Severity\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12H\n\tmute_info\x18\x35 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.Finding.MuteInfoB\x03\xe0\x41\x03\x12K\n\rfinding_class\x18\x10 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.Finding.FindingClass\x12<\n\tindicator\x18\x11 \x01(\x0b\x32).google.cloud.securitycenter.v2.Indicator\x12\x44\n\rvulnerability\x18\x12 \x01(\x0b\x32-.google.cloud.securitycenter.v2.Vulnerability\x12\x39\n\x10mute_update_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x14 \x03(\x0b\x32<.google.cloud.securitycenter.v2.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x15 \x01(\x0b\x32+.google.cloud.securitycenter.v2.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x16 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Access\x12?\n\x0b\x63onnections\x18\x17 \x03(\x0b\x32*.google.cloud.securitycenter.v2.Connection\x12\x16\n\x0emute_initiator\x18\x18 \x01(\t\x12:\n\tprocesses\x18\x19 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Process\x12L\n\x08\x63ontacts\x18\x1a \x03(\x0b\x32\x35.google.cloud.securitycenter.v2.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\x1b \x03(\x0b\x32*.google.cloud.securitycenter.v2.Compliance\x12 \n\x13parent_display_name\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x1e \x01(\t\x12\x42\n\x0c\x65xfiltration\x18\x1f \x01(\x0b\x32,.google.cloud.securitycenter.v2.Exfiltration\x12@\n\x0ciam_bindings\x18 \x03(\x0b\x32*.google.cloud.securitycenter.v2.IamBinding\x12\x12\n\nnext_steps\x18! \x01(\t\x12\x13\n\x0bmodule_name\x18\" \x01(\t\x12=\n\ncontainers\x18# \x03(\x0b\x32).google.cloud.securitycenter.v2.Container\x12>\n\nkubernetes\x18$ \x01(\x0b\x32*.google.cloud.securitycenter.v2.Kubernetes\x12:\n\x08\x64\x61tabase\x18% \x01(\x0b\x32(.google.cloud.securitycenter.v2.Database\x12G\n\x0f\x61ttack_exposure\x18& \x01(\x0b\x32..google.cloud.securitycenter.v2.AttackExposure\x12\x33\n\x05\x66iles\x18\' \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12P\n\x14\x63loud_dlp_inspection\x18( \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18) \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18* \x01(\x0b\x32-.google.cloud.securitycenter.v2.KernelRootkit\x12?\n\x0corg_policies\x18+ \x03(\x0b\x32).google.cloud.securitycenter.v2.OrgPolicy\x12\x30\n\x03job\x18, \x01(\x0b\x32#.google.cloud.securitycenter.v2.Job\x12@\n\x0b\x61pplication\x18- \x01(\x0b\x32+.google.cloud.securitycenter.v2.Application\x12\x39\n\x08ip_rules\x18. \x01(\x0b\x32\'.google.cloud.securitycenter.v2.IpRules\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18/ \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x30 \x01(\x0b\x32/.google.cloud.securitycenter.v2.SecurityPosture\x12=\n\x0blog_entries\x18\x31 \x03(\x0b\x32(.google.cloud.securitycenter.v2.LogEntry\x12\x44\n\x0eload_balancers\x18\x32 \x03(\x0b\x32,.google.cloud.securitycenter.v2.LoadBalancer\x12?\n\x0b\x63loud_armor\x18\x33 \x01(\x0b\x32*.google.cloud.securitycenter.v2.CloudArmor\x12:\n\x08notebook\x18\x37 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Notebook\x12K\n\x11toxic_combination\x18\x38 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.ToxicCombination\x12J\n\x11group_memberships\x18\x39 \x03(\x0b\x32/.google.cloud.securitycenter.v2.GroupMembership\x12\x32\n\x04\x64isk\x18: \x01(\x0b\x32$.google.cloud.securitycenter.v2.Disk\x12K\n\x12\x64\x61ta_access_events\x18= \x03(\x0b\x32/.google.cloud.securitycenter.v2.DataAccessEvent\x12G\n\x10\x64\x61ta_flow_events\x18> \x03(\x0b\x32-.google.cloud.securitycenter.v2.DataFlowEvent\x12\x39\n\x08networks\x18? \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Network\x12\x62\n\x1e\x64\x61ta_retention_deletion_events\x18@ \x03(\x0b\x32:.google.cloud.securitycenter.v2.DataRetentionDeletionEvent\x12M\n\x12\x61\x66\x66\x65\x63ted_resources\x18\x41 \x01(\x0b\x32\x31.google.cloud.securitycenter.v2.AffectedResources\x12\x39\n\x08\x61i_model\x18\x42 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AiModel\x12>\n\nchokepoint\x18\x45 \x01(\x0b\x32*.google.cloud.securitycenter.v2.Chokepoint\x12;\n\tvertex_ai\x18H \x01(\x0b\x32(.google.cloud.securitycenter.v2.VertexAi\x12\x34\n\x05\x61gent\x18Q \x01(\x0b\x32%.google.cloud.securitycenter.v2.Agent\x12\x44\n\x0e\x61gent_sessions\x18R \x03(\x0b\x32,.google.cloud.securitycenter.v2.AgentSession\x12\x43\n\ragent_anomaly\x18S \x01(\x0b\x32,.google.cloud.securitycenter.v2.AgentAnomaly\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12.\n\napply_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aX\n\x11\x44ynamicMuteRecord\x12\x13\n\x0bmute_config\x18\x01 \x01(\t\x12.\n\nmatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x66\n\x14\x45xternalSystemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.ExternalSystem:\x02\x38\x01\x1a_\n\rContactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.ContactDetails:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"C\n\x04Mute\x12\x14\n\x10MUTE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\x0b\n\x07UNMUTED\x10\x02\x12\r\n\tUNDEFINED\x10\x03\"\xd9\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t:\xdd\x03\xea\x41\xd9\x03\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12Uorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12Ifolders/{folder}/sources/{source}/locations/{location}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}\x12Kprojects/{project}/sources/{source}/locations/{location}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x46indingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding").msgclass + Finding::MuteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo").msgclass + Finding::MuteInfo::StaticMute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute").msgclass + Finding::MuteInfo::DynamicMuteRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord").msgclass + Finding::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.State").enummodule + Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.Severity").enummodule + Finding::Mute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.Mute").enummodule + Finding::FindingClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.FindingClass").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb new file mode 100644 index 000000000000..fe84677148ee --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/folder.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/securitycenter/v2/folder.proto\x12\x1egoogle.cloud.securitycenter.v2\"G\n\x06\x46older\x12\x17\n\x0fresource_folder\x18\x01 \x01(\t\x12$\n\x1cresource_folder_display_name\x18\x02 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v2B\x0b\x46olderProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Folder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Folder").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb new file mode 100644 index 000000000000..9f419b9c2065 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/group_membership.proto + +require 'google/protobuf' + + +descriptor_data = "\n5google/cloud/securitycenter/v2/group_membership.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xd8\x01\n\x0fGroupMembership\x12M\n\ngroup_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.GroupMembership.GroupType\x12\x10\n\x08group_id\x18\x02 \x01(\t\"d\n\tGroupType\x12\x1a\n\x16GROUP_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cGROUP_TYPE_TOXIC_COMBINATION\x10\x01\x12\x19\n\x15GROUP_TYPE_CHOKEPOINT\x10\x03\x42\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14GroupMembershipProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + GroupMembership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupMembership").msgclass + GroupMembership::GroupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupMembership.GroupType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb new file mode 100644 index 000000000000..16a3bb17f83a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/iam_binding.proto + +require 'google/protobuf' + + +descriptor_data = "\n0google/cloud/securitycenter/v2/iam_binding.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xa4\x01\n\nIamBinding\x12\x41\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v2.IamBinding.Action\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x0e\n\x06member\x18\x03 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x42\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fIamBindingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + IamBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IamBinding").msgclass + IamBinding::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IamBinding.Action").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb new file mode 100644 index 000000000000..ed506ac1a11d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/indicator.proto + +require 'google/protobuf' + + +descriptor_data = "\n.google/cloud/securitycenter/v2/indicator.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xd9\x06\n\tIndicator\x12\x14\n\x0cip_addresses\x18\x01 \x03(\t\x12\x0f\n\x07\x64omains\x18\x02 \x03(\t\x12N\n\nsignatures\x18\x03 \x03(\x0b\x32:.google.cloud.securitycenter.v2.Indicator.ProcessSignature\x12\x0c\n\x04uris\x18\x04 \x03(\t\x1a\xc6\x05\n\x10ProcessSignature\x12o\n\x15memory_hash_signature\x18\x06 \x01(\x0b\x32N.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignatureH\x00\x12k\n\x13yara_rule_signature\x18\x07 \x01(\x0b\x32L.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignatureH\x00\x12`\n\x0esignature_type\x18\x08 \x01(\x0e\x32H.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType\x1a\xd6\x01\n\x13MemoryHashSignature\x12\x15\n\rbinary_family\x18\x01 \x01(\t\x12l\n\ndetections\x18\x04 \x03(\x0b\x32X.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection\x1a:\n\tDetection\x12\x0e\n\x06\x62inary\x18\x02 \x01(\t\x12\x1d\n\x15percent_pages_matched\x18\x03 \x01(\x01\x1a&\n\x11YaraRuleSignature\x12\x11\n\tyara_rule\x18\x05 \x01(\t\"d\n\rSignatureType\x12\x1e\n\x1aSIGNATURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SIGNATURE_TYPE_PROCESS\x10\x01\x12\x17\n\x13SIGNATURE_TYPE_FILE\x10\x02\x42\x0b\n\tsignatureB\xe8\x01\n\"com.google.cloud.securitycenter.v2B\x0eIndicatorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Indicator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator").msgclass + Indicator::ProcessSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature").msgclass + Indicator::ProcessSignature::MemoryHashSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature").msgclass + Indicator::ProcessSignature::MemoryHashSignature::Detection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection").msgclass + Indicator::ProcessSignature::YaraRuleSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature").msgclass + Indicator::ProcessSignature::SignatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb new file mode 100644 index 000000000000..b6597fce0c8c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/ip_rules.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/ip_rules.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe2\x02\n\x07IpRules\x12\x44\n\tdirection\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v2.IpRules.Direction\x12:\n\x07\x61llowed\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AllowedH\x00\x12\x38\n\x06\x64\x65nied\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v2.DeniedH\x00\x12\x18\n\x10source_ip_ranges\x18\x04 \x03(\t\x12\x1d\n\x15\x64\x65stination_ip_ranges\x18\x05 \x03(\t\x12\x18\n\x10\x65xposed_services\x18\x06 \x03(\t\"?\n\tDirection\x12\x19\n\x15\x44IRECTION_UNSPECIFIED\x10\x00\x12\x0b\n\x07INGRESS\x10\x01\x12\n\n\x06\x45GRESS\x10\x02\x42\x07\n\x05rules\"\x8d\x01\n\x06IpRule\x12\x10\n\x08protocol\x18\x01 \x01(\t\x12J\n\x0bport_ranges\x18\x02 \x03(\x0b\x32\x30.google.cloud.securitycenter.v2.IpRule.PortRangeB\x03\xe0\x41\x01\x1a%\n\tPortRange\x12\x0b\n\x03min\x18\x01 \x01(\x03\x12\x0b\n\x03max\x18\x02 \x01(\x03\"H\n\x07\x41llowed\x12=\n\x08ip_rules\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.IpRuleB\x03\xe0\x41\x01\"G\n\x06\x44\x65nied\x12=\n\x08ip_rules\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.IpRuleB\x03\xe0\x41\x01\x42\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cIpRulesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + IpRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRules").msgclass + IpRules::Direction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRules.Direction").enummodule + IpRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRule").msgclass + IpRule::PortRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRule.PortRange").msgclass + Allowed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Allowed").msgclass + Denied = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Denied").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb new file mode 100644 index 000000000000..c079059f9826 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/job.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n(google/cloud/securitycenter/v2/job.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\"w\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32(.google.cloud.securitycenter.v2.JobStateB\x03\xe0\x41\x03\x12\x12\n\nerror_code\x18\x03 \x01(\x05\x12\x10\n\x08location\x18\x04 \x01(\t*Z\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x42\xe2\x01\n\"com.google.cloud.securitycenter.v2B\x08JobProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Job").msgclass + JobState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.JobState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb new file mode 100644 index 000000000000..eba594bf469d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/kernel_rootkit.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/cloud/securitycenter/v2/kernel_rootkit.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xd7\x02\n\rKernelRootkit\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x1cunexpected_code_modification\x18\x02 \x01(\x08\x12.\n&unexpected_read_only_data_modification\x18\x03 \x01(\x08\x12!\n\x19unexpected_ftrace_handler\x18\x04 \x01(\x08\x12!\n\x19unexpected_kprobe_handler\x18\x05 \x01(\x08\x12$\n\x1cunexpected_kernel_code_pages\x18\x06 \x01(\x08\x12&\n\x1eunexpected_system_call_handler\x18\x07 \x01(\x08\x12$\n\x1cunexpected_interrupt_handler\x18\x08 \x01(\x08\x12(\n unexpected_processes_in_runqueue\x18\t \x01(\x08\x42\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12KernelRootkitProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + KernelRootkit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.KernelRootkit").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb new file mode 100644 index 000000000000..2f1bf77bd0f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/kubernetes.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v2/container_pb' +require 'google/cloud/securitycenter/v2/label_pb' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/kubernetes.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a.google/cloud/securitycenter/v2/container.proto\x1a*google/cloud/securitycenter/v2/label.proto\"\x82\x0c\n\nKubernetes\x12<\n\x04pods\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.Kubernetes.Pod\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Node\x12G\n\nnode_pools\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.Kubernetes.NodePool\x12>\n\x05roles\x18\x04 \x03(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Role\x12\x44\n\x08\x62indings\x18\x05 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.Kubernetes.Binding\x12O\n\x0e\x61\x63\x63\x65ss_reviews\x18\x06 \x03(\x0b\x32\x37.google.cloud.securitycenter.v2.Kubernetes.AccessReview\x12\x42\n\x07objects\x18\x07 \x03(\x0b\x32\x31.google.cloud.securitycenter.v2.Kubernetes.Object\x1a\x95\x01\n\x03Pod\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x35\n\x06labels\x18\x03 \x03(\x0b\x32%.google.cloud.securitycenter.v2.Label\x12=\n\ncontainers\x18\x04 \x03(\x0b\x32).google.cloud.securitycenter.v2.Container\x1a\x14\n\x04Node\x12\x0c\n\x04name\x18\x01 \x01(\t\x1aX\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Node\x1a\x9e\x01\n\x04Role\x12\x42\n\x04kind\x18\x01 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.Kubernetes.Role.Kind\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"8\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x08\n\x04ROLE\x10\x01\x12\x10\n\x0c\x43LUSTER_ROLE\x10\x02\x1a\xa8\x01\n\x07\x42inding\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12=\n\x04role\x18\x03 \x01(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Role\x12\x44\n\x08subjects\x18\x04 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.Kubernetes.Subject\x1a\xbe\x01\n\x07Subject\x12I\n\x04kind\x18\x01 \x01(\x0e\x32;.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"N\n\x08\x41uthType\x12\x19\n\x15\x41UTH_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x12\n\x0eSERVICEACCOUNT\x10\x02\x12\t\n\x05GROUP\x10\x03\x1a}\n\x0c\x41\x63\x63\x65ssReview\x12\r\n\x05group\x18\x01 \x01(\t\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x13\n\x0bsubresource\x18\x05 \x01(\t\x12\x0c\n\x04verb\x18\x06 \x01(\t\x12\x0f\n\x07version\x18\x07 \x01(\t\x1a~\n\x06Object\x12\r\n\x05group\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\n\n\x02ns\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12=\n\ncontainers\x18\x05 \x03(\x0b\x32).google.cloud.securitycenter.v2.ContainerB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fKubernetesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Kubernetes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes").msgclass + Kubernetes::Pod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Pod").msgclass + Kubernetes::Node = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Node").msgclass + Kubernetes::NodePool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.NodePool").msgclass + Kubernetes::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Role").msgclass + Kubernetes::Role::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Role.Kind").enummodule + Kubernetes::Binding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Binding").msgclass + Kubernetes::Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Subject").msgclass + Kubernetes::Subject::AuthType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType").enummodule + Kubernetes::AccessReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.AccessReview").msgclass + Kubernetes::Object = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Object").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb new file mode 100644 index 000000000000..3cdb278899ec --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/label.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/cloud/securitycenter/v2/label.proto\x12\x1egoogle.cloud.securitycenter.v2\"$\n\x05Label\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB\xe4\x01\n\"com.google.cloud.securitycenter.v2B\nLabelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Label").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb new file mode 100644 index 000000000000..b23d3a4cfd9f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/load_balancer.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v2/load_balancer.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x1c\n\x0cLoadBalancer\x12\x0c\n\x04name\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v2B\x11LoadBalancerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + LoadBalancer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.LoadBalancer").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb new file mode 100644 index 000000000000..b3704ddc1826 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/log_entry.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/securitycenter/v2/log_entry.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"i\n\x08LogEntry\x12P\n\x13\x63loud_logging_entry\x18\x01 \x01(\x0b\x32\x31.google.cloud.securitycenter.v2.CloudLoggingEntryH\x00\x42\x0b\n\tlog_entry\"\x81\x01\n\x11\x43loudLoggingEntry\x12\x11\n\tinsert_id\x18\x01 \x01(\t\x12\x0e\n\x06log_id\x18\x02 \x01(\t\x12\x1a\n\x12resource_container\x18\x03 \x01(\t\x12-\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rLogEntryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.LogEntry").msgclass + CloudLoggingEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudLoggingEntry").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb new file mode 100644 index 000000000000..08d45bd18d1a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/mitre_attack.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/cloud/securitycenter/v2/mitre_attack.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xca%\n\x0bMitreAttack\x12J\n\x0eprimary_tactic\x18\x01 \x01(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12Q\n\x12primary_techniques\x18\x02 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.MitreAttack.Technique\x12N\n\x12\x61\x64\x64itional_tactics\x18\x03 \x03(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12T\n\x15\x61\x64\x64itional_techniques\x18\x04 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.MitreAttack.Technique\x12\x0f\n\x07version\x18\x05 \x01(\t\"\xb4\x02\n\x06Tactic\x12\x16\n\x12TACTIC_UNSPECIFIED\x10\x00\x12\x12\n\x0eRECONNAISSANCE\x10\x01\x12\x18\n\x14RESOURCE_DEVELOPMENT\x10\x02\x12\x12\n\x0eINITIAL_ACCESS\x10\x05\x12\r\n\tEXECUTION\x10\x03\x12\x0f\n\x0bPERSISTENCE\x10\x06\x12\x18\n\x14PRIVILEGE_ESCALATION\x10\x08\x12\x13\n\x0f\x44\x45\x46\x45NSE_EVASION\x10\x07\x12\x15\n\x11\x43REDENTIAL_ACCESS\x10\t\x12\r\n\tDISCOVERY\x10\n\x12\x14\n\x10LATERAL_MOVEMENT\x10\x0b\x12\x0e\n\nCOLLECTION\x10\x0c\x12\x17\n\x13\x43OMMAND_AND_CONTROL\x10\x04\x12\x10\n\x0c\x45XFILTRATION\x10\r\x12\n\n\x06IMPACT\x10\x0e\"\xad \n\tTechnique\x12\x19\n\x15TECHNIQUE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x44\x41TA_OBFUSCATION\x10\x46\x12\"\n\x1e\x44\x41TA_OBFUSCATION_STEGANOGRAPHY\x10G\x12\x19\n\x15OS_CREDENTIAL_DUMPING\x10r\x12)\n%OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM\x10s\x12\x35\n1OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW\x10z\x12\x1a\n\x16\x44\x41TA_FROM_LOCAL_SYSTEM\x10u\x12\x1a\n\x16\x41UTOMATED_EXFILTRATION\x10\x44\x12\x1c\n\x18OBFUSCATED_FILES_OR_INFO\x10H\x12\x11\n\rSTEGANOGRAPHY\x10I\x12\x1a\n\x16\x43OMPILE_AFTER_DELIVERY\x10J\x12\x17\n\x13\x43OMMAND_OBFUSCATION\x10K\x12\x16\n\x12SCHEDULED_TRANSFER\x10x\x12\x1f\n\x1bSYSTEM_OWNER_USER_DISCOVERY\x10v\x12\x10\n\x0cMASQUERADING\x10\x31\x12%\n!MATCH_LEGITIMATE_NAME_OR_LOCATION\x10\x32\x12(\n$BOOT_OR_LOGON_INITIALIZATION_SCRIPTS\x10%\x12\x11\n\rSTARTUP_ITEMS\x10&\x12\x1d\n\x19NETWORK_SERVICE_DISCOVERY\x10 \x12\x16\n\x12SCHEDULED_TASK_JOB\x10Y\x12\x1b\n\x17SCHEDULED_TASK_JOB_CRON\x10w\x12\x1f\n\x1b\x43ONTAINER_ORCHESTRATION_JOB\x10Z\x12\x15\n\x11PROCESS_INJECTION\x10]\x12\x11\n\rINPUT_CAPTURE\x10g\x12\x1c\n\x18INPUT_CAPTURE_KEYLOGGING\x10h\x12\x15\n\x11PROCESS_DISCOVERY\x10\x38\x12%\n!COMMAND_AND_SCRIPTING_INTERPRETER\x10\x06\x12\x0e\n\nUNIX_SHELL\x10\x07\x12\n\n\x06PYTHON\x10;\x12)\n%EXPLOITATION_FOR_PRIVILEGE_ESCALATION\x10?\x12\x1f\n\x1bPERMISSION_GROUPS_DISCOVERY\x10\x12\x12\x10\n\x0c\x43LOUD_GROUPS\x10\x13\x12\x15\n\x11INDICATOR_REMOVAL\x10{\x12\x34\n0INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS\x10|\x12+\n\'INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY\x10}\x12#\n\x1fINDICATOR_REMOVAL_FILE_DELETION\x10@\x12 \n\x1bINDICATOR_REMOVAL_TIMESTOMP\x10\x80\x01\x12(\n$INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA\x10~\x12\x1e\n\x1a\x41PPLICATION_LAYER_PROTOCOL\x10-\x12\x07\n\x03\x44NS\x10.\x12\x1d\n\x19SOFTWARE_DEPLOYMENT_TOOLS\x10/\x12\x12\n\x0eVALID_ACCOUNTS\x10\x0e\x12\x14\n\x10\x44\x45\x46\x41ULT_ACCOUNTS\x10#\x12\x12\n\x0eLOCAL_ACCOUNTS\x10\x0f\x12\x12\n\x0e\x43LOUD_ACCOUNTS\x10\x10\x12 \n\x1c\x46ILE_AND_DIRECTORY_DISCOVERY\x10y\x12#\n\x1f\x41\x43\x43OUNT_DISCOVERY_LOCAL_ACCOUNT\x10t\x12\t\n\x05PROXY\x10\t\x12\x12\n\x0e\x45XTERNAL_PROXY\x10\n\x12\x13\n\x0fMULTI_HOP_PROXY\x10\x0b\x12\x18\n\x14\x41\x43\x43OUNT_MANIPULATION\x10\x16\x12 \n\x1c\x41\x44\x44ITIONAL_CLOUD_CREDENTIALS\x10(\x12\x1a\n\x16\x41\x44\x44ITIONAL_CLOUD_ROLES\x10\x43\x12\x17\n\x13SSH_AUTHORIZED_KEYS\x10\x17\x12&\n\"ADDITIONAL_CONTAINER_CLUSTER_ROLES\x10:\x12\x18\n\x14MULTI_STAGE_CHANNELS\x10L\x12\x19\n\x15INGRESS_TOOL_TRANSFER\x10\x03\x12\x0e\n\nNATIVE_API\x10\x04\x12\x0f\n\x0b\x42RUTE_FORCE\x10,\x12\x18\n\x14\x41UTOMATED_COLLECTION\x10^\x12\x12\n\x0eSHARED_MODULES\x10\x05\x12\x11\n\rDATA_ENCODING\x10M\x12\x15\n\x11STANDARD_ENCODING\x10N\x12\x1d\n\x19\x41\x43\x43\x45SS_TOKEN_MANIPULATION\x10!\x12 \n\x1cTOKEN_IMPERSONATION_OR_THEFT\x10\'\x12\x12\n\x0e\x43REATE_ACCOUNT\x10O\x12\x11\n\rLOCAL_ACCOUNT\x10P\x12$\n DEOBFUSCATE_DECODE_FILES_OR_INFO\x10_\x12%\n!EXPLOIT_PUBLIC_FACING_APPLICATION\x10\x1b\x12\x1c\n\x17SUPPLY_CHAIN_COMPROMISE\x10\x81\x01\x12;\n6COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS\x10\x82\x01\x12&\n!EXPLOITATION_FOR_CLIENT_EXECUTION\x10\x86\x01\x12\x12\n\x0eUSER_EXECUTION\x10\x45\x12>\n9LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION\x10\x87\x01\x12\x1e\n\x1a\x44OMAIN_POLICY_MODIFICATION\x10\x1e\x12\x14\n\x10\x44\x41TA_DESTRUCTION\x10\x1d\x12\x1e\n\x19\x44\x41TA_ENCRYPTED_FOR_IMPACT\x10\x84\x01\x12\x10\n\x0cSERVICE_STOP\x10\x34\x12\x1b\n\x17INHIBIT_SYSTEM_RECOVERY\x10$\x12\x17\n\x13\x46IRMWARE_CORRUPTION\x10Q\x12\x16\n\x12RESOURCE_HIJACKING\x10\x08\x12\x1d\n\x19NETWORK_DENIAL_OF_SERVICE\x10\x11\x12\x1b\n\x17\x43LOUD_SERVICE_DISCOVERY\x10\x30\x12\"\n\x1eSTEAL_APPLICATION_ACCESS_TOKEN\x10*\x12\x1a\n\x16\x41\x43\x43OUNT_ACCESS_REMOVAL\x10\x33\x12\"\n\x1eTRANSFER_DATA_TO_CLOUD_ACCOUNT\x10[\x12\x1c\n\x18STEAL_WEB_SESSION_COOKIE\x10\x19\x12#\n\x1f\x43REATE_OR_MODIFY_SYSTEM_PROCESS\x10\x18\x12\x1d\n\x19\x45VENT_TRIGGERED_EXECUTION\x10\x41\x12%\n!BOOT_OR_LOGON_AUTOSTART_EXECUTION\x10R\x12!\n\x1dKERNEL_MODULES_AND_EXTENSIONS\x10S\x12\x19\n\x15SHORTCUT_MODIFICATION\x10\x7f\x12%\n!ABUSE_ELEVATION_CONTROL_MECHANISM\x10\"\x12\x38\n3ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID\x10\x88\x01\x12;\n7ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING\x10m\x12\x19\n\x15UNSECURED_CREDENTIALS\x10\r\x12\x18\n\x14\x43REDENTIALS_IN_FILES\x10i\x12\x10\n\x0c\x42\x41SH_HISTORY\x10`\x12\x10\n\x0cPRIVATE_KEYS\x10\x61\x12\x19\n\x15SUBVERT_TRUST_CONTROL\x10j\x12\x1c\n\x18INSTALL_ROOT_CERTIFICATE\x10k\x12#\n\x1f\x43OMPROMISE_HOST_SOFTWARE_BINARY\x10T\x12$\n CREDENTIALS_FROM_PASSWORD_STORES\x10\x62\x12!\n\x1dMODIFY_AUTHENTICATION_PROCESS\x10\x1c\x12$\n PLUGGABLE_AUTHENTICATION_MODULES\x10l\x12 \n\x1bMULTI_FACTOR_AUTHENTICATION\x10\x89\x01\x12\x13\n\x0fIMPAIR_DEFENSES\x10\x1f\x12\x1b\n\x17\x44ISABLE_OR_MODIFY_TOOLS\x10\x37\x12\x16\n\x12INDICATOR_BLOCKING\x10n\x12(\n$DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM\x10o\x12\x12\n\x0eHIDE_ARTIFACTS\x10U\x12 \n\x1cHIDDEN_FILES_AND_DIRECTORIES\x10V\x12\x10\n\x0cHIDDEN_USERS\x10W\x12!\n\x1d\x45XFILTRATION_OVER_WEB_SERVICE\x10\x14\x12!\n\x1d\x45XFILTRATION_TO_CLOUD_STORAGE\x10\x15\x12\x16\n\x12\x44YNAMIC_RESOLUTION\x10\x0c\x12\x19\n\x15LATERAL_TOOL_TRANSFER\x10)\x12\x19\n\x15HIJACK_EXECUTION_FLOW\x10p\x12\x32\n.HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING\x10q\x12\'\n#MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE\x10\x1a\x12\x13\n\x0f\x43REATE_SNAPSHOT\x10\x36\x12\"\n\x1e\x43LOUD_INFRASTRUCTURE_DISCOVERY\x10\x35\x12\x18\n\x14\x44\x45VELOP_CAPABILITIES\x10\x63\x12 \n\x1c\x44\x45VELOP_CAPABILITIES_MALWARE\x10\x64\x12\x17\n\x13OBTAIN_CAPABILITIES\x10+\x12\x1f\n\x1bOBTAIN_CAPABILITIES_MALWARE\x10\x65\x12(\n#OBTAIN_CAPABILITIES_VULNERABILITIES\x10\x85\x01\x12\x13\n\x0f\x41\x43TIVE_SCANNING\x10\x01\x12\x16\n\x12SCANNING_IP_BLOCKS\x10\x02\x12\x16\n\x12STAGE_CAPABILITIES\x10X\x12\x12\n\x0eUPLOAD_MALWARE\x10\x66\x12$\n CONTAINER_ADMINISTRATION_COMMAND\x10<\x12\x14\n\x10\x44\x45PLOY_CONTAINER\x10\x42\x12\x12\n\x0e\x45SCAPE_TO_HOST\x10=\x12$\n CONTAINER_AND_RESOURCE_DISCOVERY\x10\x39\x12\x1b\n\x17REFLECTIVE_CODE_LOADING\x10\\\x12.\n*STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES\x10>\x12\x14\n\x0f\x46INANCIAL_THEFT\x10\x83\x01\x42\xea\x01\n\"com.google.cloud.securitycenter.v2B\x10MitreAttackProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + MitreAttack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack").msgclass + MitreAttack::Tactic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack.Tactic").enummodule + MitreAttack::Technique = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack.Technique").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb new file mode 100644 index 000000000000..1fa427767438 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/mute_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/cloud/securitycenter/v2/mute_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\x06\n\nMuteConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12L\n\x04type\x18\x08 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.MuteConfig.MuteConfigTypeB\x03\xe0\x41\x02\x12\x34\n\x0b\x65xpiry_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"K\n\x0eMuteConfigType\x12 \n\x1cMUTE_CONFIG_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STATIC\x10\x01\x12\x0b\n\x07\x44YNAMIC\x10\x02:\xaa\x03\xea\x41\xa6\x03\n(securitycenter.googleapis.com/MuteConfig\x12\x36organizations/{organization}/muteConfigs/{mute_config}\x12Korganizations/{organization}/locations/{location}/muteConfigs/{mute_config}\x12*folders/{folder}/muteConfigs/{mute_config}\x12?folders/{folder}/locations/{location}/muteConfigs/{mute_config}\x12,projects/{project}/muteConfigs/{mute_config}\x12\x41projects/{project}/locations/{location}/muteConfigs/{mute_config}*\x0bmuteConfigs2\nmuteConfigB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fMuteConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + MuteConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MuteConfig").msgclass + MuteConfig::MuteConfigType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MuteConfig.MuteConfigType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb new file mode 100644 index 000000000000..b3adfa3e0d12 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/network.proto + +require 'google/protobuf' + + +descriptor_data = "\n,google/cloud/securitycenter/v2/network.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x17\n\x07Network\x12\x0c\n\x04name\x18\x01 \x01(\tB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cNetworkProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Network").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb new file mode 100644 index 000000000000..648e79e5aff6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/notebook.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/notebook.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"x\n\x08Notebook\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x13\n\x0blast_author\x18\x03 \x01(\t\x12\x38\n\x14notebook_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rNotebookProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Notebook").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb new file mode 100644 index 000000000000..36db41862bbd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/notification_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n8google/cloud/securitycenter/v2/notification_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbf\x05\n\x12NotificationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x36\n\x0cpubsub_topic\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x1c\n\x0fservice_account\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x10streaming_config\x18\x05 \x01(\x0b\x32\x42.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfigH\x00\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t:\xe0\x02\xea\x41\xdc\x02\n0securitycenter.googleapis.com/NotificationConfig\x12[organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}\x12Ofolders/{folder}/locations/{location}/notificationConfigs/{notification_config}\x12Qprojects/{project}/locations/{location}/notificationConfigs/{notification_config}*\x13notificationConfigs2\x12notificationConfigB\x0f\n\rnotify_configB\xb4\x02\n\"com.google.cloud.securitycenter.v2B\x17NotificationConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + NotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationConfig").msgclass + NotificationConfig::StreamingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb new file mode 100644 index 000000000000..77017de51eeb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/notification_message.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v2/finding_pb' +require 'google/cloud/securitycenter/v2/resource_pb' + + +descriptor_data = "\n9google/cloud/securitycenter/v2/notification_message.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a,google/cloud/securitycenter/v2/finding.proto\x1a-google/cloud/securitycenter/v2/resource.proto\"\xb8\x01\n\x13NotificationMessage\x12 \n\x18notification_config_name\x18\x01 \x01(\t\x12:\n\x07\x66inding\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingH\x00\x12:\n\x08resource\x18\x03 \x01(\x0b\x32(.google.cloud.securitycenter.v2.ResourceB\x07\n\x05\x65ventB\xf2\x01\n\"com.google.cloud.securitycenter.v2B\x18NotificationMessageProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + NotificationMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationMessage").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb new file mode 100644 index 000000000000..9668bef4e937 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/org_policy.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/org_policy.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdb\x01\n\tOrgPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:\xba\x01\xea\x41\xb6\x01\n\x1forgpolicy.googleapis.com/Policy\x12\x37organizations/{organization}/policies/{constraint_name}\x12+folders/{folder}/policies/{constraint_name}\x12-projects/{project}/policies/{constraint_name}B\xe8\x01\n\"com.google.cloud.securitycenter.v2B\x0eOrgPolicyProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + OrgPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.OrgPolicy").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb new file mode 100644 index 000000000000..d7368f3889e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/process.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v2/file_pb' + + +descriptor_data = "\n,google/cloud/securitycenter/v2/process.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a)google/cloud/securitycenter/v2/file.proto\"\x86\x03\n\x07Process\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x06\x62inary\x18\x02 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x37\n\tlibraries\x18\x03 \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x34\n\x06script\x18\x04 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x0c\n\x04\x61rgs\x18\x05 \x03(\t\x12\x1b\n\x13\x61rguments_truncated\x18\x06 \x01(\x08\x12J\n\renv_variables\x18\x07 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.EnvironmentVariable\x12\x1f\n\x17\x65nv_variables_truncated\x18\x08 \x01(\x08\x12\x0b\n\x03pid\x18\t \x01(\x03\x12\x12\n\nparent_pid\x18\n \x01(\x03\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\"0\n\x13\x45nvironmentVariable\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03val\x18\x02 \x01(\tB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cProcessProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Process = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Process").msgclass + EnvironmentVariable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.EnvironmentVariable").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb new file mode 100644 index 000000000000..2537d399e0df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/resource.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v2/folder_pb' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/resource.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/folder.proto\"\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\xbd\x01\n\x0bGcpMetadata\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x1c\n\x14project_display_name\x18\x02 \x01(\t\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x04 \x01(\t\x12<\n\x07\x66olders\x18\x05 \x03(\x0b\x32&.google.cloud.securitycenter.v2.FolderB\x03\xe0\x41\x03\x12\x14\n\x0corganization\x18\x06 \x01(\t\"\x84\x03\n\x0b\x41wsMetadata\x12Q\n\x0corganization\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization\x12_\n\x14organizational_units\x18\x02 \x03(\x0b\x32\x41.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit\x12G\n\x07\x61\x63\x63ount\x18\x03 \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount\x1a\x1d\n\x0f\x41wsOrganization\x12\n\n\x02id\x18\x01 \x01(\t\x1a\x31\n\x15\x41wsOrganizationalUnit\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x1a&\n\nAwsAccount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xbc\x04\n\rAzureMetadata\x12]\n\x11management_groups\x18\x01 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup\x12U\n\x0csubscription\x18\x02 \x01(\x0b\x32?.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription\x12X\n\x0eresource_group\x18\x03 \x01(\x0b\x32@.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup\x12I\n\x06tenant\x18\x07 \x01(\x0b\x32\x39.google.cloud.securitycenter.v2.AzureMetadata.AzureTenant\x1a\x38\n\x14\x41zureManagementGroup\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a\x35\n\x11\x41zureSubscription\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a.\n\x12\x41zureResourceGroup\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a/\n\x0b\x41zureTenant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xf4\x03\n\x0cResourcePath\x12L\n\x05nodes\x18\x01 \x03(\x0b\x32=.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode\x1a\x8a\x01\n\x10ResourcePathNode\x12T\n\tnode_type\x18\x01 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType\x12\n\n\x02id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\"\x88\x02\n\x14ResourcePathNodeType\x12\'\n#RESOURCE_PATH_NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_ORGANIZATION\x10\x01\x12\x0e\n\nGCP_FOLDER\x10\x02\x12\x0f\n\x0bGCP_PROJECT\x10\x03\x12\x14\n\x10\x41WS_ORGANIZATION\x10\x04\x12\x1b\n\x17\x41WS_ORGANIZATIONAL_UNIT\x10\x05\x12\x0f\n\x0b\x41WS_ACCOUNT\x10\x06\x12\x1a\n\x16\x41ZURE_MANAGEMENT_GROUP\x10\x07\x12\x16\n\x12\x41ZURE_SUBSCRIPTION\x10\x08\x12\x18\n\x14\x41ZURE_RESOURCE_GROUP\x10\t*x\n\rCloudProvider\x12\x1e\n\x1a\x43LOUD_PROVIDER_UNSPECIFIED\x10\x00\x12\x19\n\x15GOOGLE_CLOUD_PLATFORM\x10\x01\x12\x17\n\x13\x41MAZON_WEB_SERVICES\x10\x02\x12\x13\n\x0fMICROSOFT_AZURE\x10\x03\x42\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Resource").msgclass + GcpMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GcpMetadata").msgclass + AwsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata").msgclass + AwsMetadata::AwsOrganization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization").msgclass + AwsMetadata::AwsOrganizationalUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit").msgclass + AwsMetadata::AwsAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsAccount").msgclass + AzureMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata").msgclass + AzureMetadata::AzureManagementGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup").msgclass + AzureMetadata::AzureSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription").msgclass + AzureMetadata::AzureResourceGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup").msgclass + AzureMetadata::AzureTenant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureTenant").msgclass + ResourcePath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath").msgclass + ResourcePath::ResourcePathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode").msgclass + ResourcePath::ResourcePathNodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType").enummodule + CloudProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudProvider").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb new file mode 100644 index 000000000000..a620481d431c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/resource_value_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v2/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n:google/cloud/securitycenter/v2/resource_value_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf9\x08\n\x13ResourceValueConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x45\n\x0eresource_value\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x12\x12\n\ntag_values\x18\x03 \x03(\t\x12\x15\n\rresource_type\x18\x04 \x01(\t\x12\r\n\x05scope\x18\x05 \x01(\t\x12q\n\x18resource_labels_selector\x18\x06 \x03(\x0b\x32O.google.cloud.securitycenter.v2.ResourceValueConfig.ResourceLabelsSelectorEntry\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x0e\x63loud_provider\x18\n \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12}\n!sensitive_data_protection_mapping\x18\x0b \x01(\x0b\x32R.google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping\x1a\xc4\x01\n\x1eSensitiveDataProtectionMapping\x12O\n\x18high_sensitivity_mapping\x18\x01 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x12Q\n\x1amedium_sensitivity_mapping\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x1a=\n\x1bResourceLabelsSelectorEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8d\x02\xea\x41\x89\x02\n1securitycenter.googleapis.com/ResourceValueConfig\x12Iorganizations/{organization}/resourceValueConfigs/{resource_value_config}\x12^organizations/{organization}/locations/{location}/resourceValueConfigs/{resource_value_config}*\x14resourceValueConfigs2\x13resourceValueConfig*X\n\rResourceValue\x12\x1e\n\x1aRESOURCE_VALUE_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x07\n\x03LOW\x10\x03\x12\x08\n\x04NONE\x10\x04\x42\xf2\x01\n\"com.google.cloud.securitycenter.v2B\x18ResourceValueConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + ResourceValueConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfig").msgclass + ResourceValueConfig::SensitiveDataProtectionMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping").msgclass + ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValue").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb new file mode 100644 index 000000000000..8f9fb7fdc255 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/security_marks.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n3google/cloud/securitycenter/v2/security_marks.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xee\x06\n\rSecurityMarks\x12\x0c\n\x04name\x18\x01 \x01(\t\x12G\n\x05marks\x18\x02 \x03(\x0b\x32\x38.google.cloud.securitycenter.v2.SecurityMarks.MarksEntry\x12\x16\n\x0e\x63\x61nonical_name\x18\x03 \x01(\t\x1a,\n\nMarksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbf\x05\xea\x41\xbb\x05\n+securitycenter.googleapis.com/SecurityMarks\x12\x39organizations/{organization}/assets/{asset}/securityMarks\x12Norganizations/{organization}/sources/{source}/findings/{finding}/securityMarks\x12\x63organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/securityMarks\x12-folders/{folder}/assets/{asset}/securityMarks\x12\x42\x66olders/{folder}/sources/{source}/findings/{finding}/securityMarks\x12Wfolders/{folder}/sources/{source}/locations/{location}/findings/{finding}/securityMarks\x12/projects/{project}/assets/{asset}/securityMarks\x12\x44projects/{project}/sources/{source}/findings/{finding}/securityMarks\x12Yprojects/{project}/sources/{source}/locations/{location}/findings/{finding}/securityMarksB\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12SecurityMarksProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + SecurityMarks = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityMarks").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb new file mode 100644 index 000000000000..0f13af8fe998 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/security_posture.proto + +require 'google/protobuf' + + +descriptor_data = "\n5google/cloud/securitycenter/v2/security_posture.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xe8\x02\n\x0fSecurityPosture\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0brevision_id\x18\x02 \x01(\t\x12#\n\x1bposture_deployment_resource\x18\x03 \x01(\t\x12\x1a\n\x12posture_deployment\x18\x04 \x01(\t\x12\x16\n\x0e\x63hanged_policy\x18\x05 \x01(\t\x12\x12\n\npolicy_set\x18\x06 \x01(\t\x12\x0e\n\x06policy\x18\x07 \x01(\t\x12`\n\x14policy_drift_details\x18\x08 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails\x1aS\n\x12PolicyDriftDetails\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x16\n\x0e\x65xpected_value\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x65tected_value\x18\x03 \x01(\tB\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14SecurityPostureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + SecurityPosture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPosture").msgclass + SecurityPosture::PolicyDriftDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb new file mode 100644 index 000000000000..438d7aa19da5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/securitycenter_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/api/routing_pb' +require 'google/cloud/securitycenter/v2/attack_path_pb' +require 'google/cloud/securitycenter/v2/bigquery_export_pb' +require 'google/cloud/securitycenter/v2/external_system_pb' +require 'google/cloud/securitycenter/v2/finding_pb' +require 'google/cloud/securitycenter/v2/mute_config_pb' +require 'google/cloud/securitycenter/v2/notification_config_pb' +require 'google/cloud/securitycenter/v2/resource_pb' +require 'google/cloud/securitycenter/v2/resource_value_config_pb' +require 'google/cloud/securitycenter/v2/security_marks_pb' +require 'google/cloud/securitycenter/v2/simulation_pb' +require 'google/cloud/securitycenter/v2/source_pb' +require 'google/cloud/securitycenter/v2/valued_resource_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n;google/cloud/securitycenter/v2/securitycenter_service.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x30google/cloud/securitycenter/v2/attack_path.proto\x1a\x34google/cloud/securitycenter/v2/bigquery_export.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a,google/cloud/securitycenter/v2/finding.proto\x1a\x30google/cloud/securitycenter/v2/mute_config.proto\x1a\x38google/cloud/securitycenter/v2/notification_config.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a:google/cloud/securitycenter/v2/resource_value_config.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a/google/cloud/securitycenter/v2/simulation.proto\x1a+google/cloud/securitycenter/v2/source.proto\x1a\x34google/cloud/securitycenter/v2/valued_resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\x01\n&BatchCreateResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x08requests\x18\x02 \x03(\x0b\x32@.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestB\x03\xe0\x41\x02\"~\n\'BatchCreateResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xe3\x01\n\x17\x42ulkMuteFindingsRequest\x12\x19\n\x06parent\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12Z\n\nmute_state\x18\x03 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteStateB\x03\xe0\x41\x01\"A\n\tMuteState\x12\x1a\n\x16MUTE_STATE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\r\n\tUNDEFINED\x10\x02\"\x1a\n\x18\x42ulkMuteFindingsResponse\"\xd4\x01\n\x1b\x43reateBigQueryExportRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12M\n\x10\x62ig_query_export\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExportB\x03\xe0\x41\x02\x12 \n\x13\x62ig_query_export_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xac\x01\n\x14\x43reateFindingRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x17\n\nfinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x07\x66inding\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingB\x03\xe0\x41\x02\"\xbe\x01\n\x17\x43reateMuteConfigRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x44\n\x0bmute_config\x18\x02 \x01(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfigB\x03\xe0\x41\x02\x12\x1b\n\x0emute_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xd9\x01\n\x1f\x43reateNotificationConfigRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x16\n\tconfig_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x13notification_config\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfigB\x03\xe0\x41\x02\"\xc6\x01\n CreateResourceValueConfigRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x15resource_value_config\x18\x02 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\"\x9c\x01\n\x13\x43reateSourceRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12;\n\x06source\x18\x02 \x01(\x0b\x32&.google.cloud.securitycenter.v2.SourceB\x03\xe0\x41\x02\"a\n\x1b\x44\x65leteBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"Y\n\x17\x44\x65leteMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"i\n\x1f\x44\x65leteNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"k\n DeleteResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"+\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xbe\x01\n\x16\x45xportFindingsMetadata\x12:\n\x11\x65xport_start_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12Y\n\x15\x62ig_query_destination\x18\x02 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.BigQueryDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"\x18\n\x16\x45xportFindingsResponse\"^\n\x18GetBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"V\n\x14GetMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"f\n\x1cGetNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"h\n\x1dGetResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\xa2\x01\n\x14GroupFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\x8b\x01\n\x15GroupFindingsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v2.GroupResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\xb8\x01\n\x0bGroupResult\x12O\n\nproperties\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v2.GroupResult.PropertiesEntry\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x1aI\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"\x91\x01\n\x16ListAttackPathsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/AttackPath\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"t\n\x17ListAttackPathsResponse\x12@\n\x0c\x61ttack_paths\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v2.AttackPath\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x14GetSimulationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/Simulation\"^\n\x18GetValuedResourceRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/ValuedResource\"\x89\x01\n\x1aListBigQueryExportsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x1bListBigQueryExportsResponse\x12I\n\x11\x62ig_query_exports\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcc\x01\n\x13ListFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xdf\x06\n\x14ListFindingsResponse\x12\x66\n\x15list_findings_results\x18\x01 \x03(\x0b\x32G.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xb1\x05\n\x12ListFindingsResult\x12\x38\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Finding\x12g\n\x08resource\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\x81\x01\n\x16ListMuteConfigsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x17ListMuteConfigsResponse\x12@\n\x0cmute_configs\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x91\x01\n\x1eListNotificationConfigsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x8c\x01\n\x1fListNotificationConfigsResponse\x12P\n\x14notification_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x93\x01\n\x1fListResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x90\x01\n ListResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x12ListSourcesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$securitycenter.googleapis.com/Source\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x07 \x01(\x05\"g\n\x13ListSourcesResponse\x12\x37\n\x07sources\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.Source\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb0\x01\n\x1aListValuedResourcesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/ValuedResource\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x1bListValuedResourcesResponse\x12H\n\x10valued_resources\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.ValuedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x98\x01\n\x16SetFindingStateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x02\"\x8e\x01\n\x0eSetMuteRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12?\n\x04mute\x18\x02 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.MuteB\x03\xe0\x41\x02\"\x9d\x01\n\x1bUpdateBigQueryExportRequest\x12M\n\x10\x62ig_query_export\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExportB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x9c\x01\n\x1bUpdateExternalSystemRequest\x12L\n\x0f\x65xternal_system\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.ExternalSystemB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x86\x01\n\x14UpdateFindingRequest\x12=\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x90\x01\n\x17UpdateMuteConfigRequest\x12\x44\n\x0bmute_config\x18\x01 \x01(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa8\x01\n\x1fUpdateNotificationConfigRequest\x12T\n\x13notification_config\x18\x01 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xac\x01\n UpdateResourceValueConfigRequest\x12W\n\x15resource_value_config\x18\x01 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x99\x01\n\x1aUpdateSecurityMarksRequest\x12J\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x83\x01\n\x13UpdateSourceRequest\x12;\n\x06source\x18\x01 \x01(\x0b\x32&.google.cloud.securitycenter.v2.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask2\xe2\x81\x01\n\x0eSecurityCenter\x12\xe0\x02\n\x1f\x42\x61tchCreateResourceValueConfigs\x12\x46.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest\x1aG.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse\"\xab\x01\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x92\x01\"=/v2/{parent=organizations/*}/resourceValueConfigs:batchCreate:\x01*ZN\"I/v2/{parent=organizations/*/locations/*}/resourceValueConfigs:batchCreate:\x01*\x12\x9a\x04\n\x10\x42ulkMuteFindings\x12\x37.google.cloud.securitycenter.v2.BulkMuteFindingsRequest\x1a\x1d.google.longrunning.Operation\"\xad\x03\xca\x41P\n7google.cloud.securitycenter.v2.BulkMuteFindingsResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xca\x02\"./v2/{parent=organizations/*}/findings:bulkMute:\x01*Z?\":/v2/{parent=organizations/*/locations/*}/findings:bulkMute:\x01*Z-\"(/v2/{parent=folders/*}/findings:bulkMute:\x01*Z9\"4/v2/{parent=folders/*/locations/*}/findings:bulkMute:\x01*Z.\")/v2/{parent=projects/*}/findings:bulkMute:\x01*Z:\"5/v2/{parent=projects/*/locations/*}/findings:bulkMute:\x01*\x12\x98\x03\n\x14\x43reateBigQueryExport\x12;.google.cloud.securitycenter.v2.CreateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\x92\x02\xda\x41+parent,big_query_export,big_query_export_id\x82\xd3\xe4\x93\x02\xdd\x01\"8/v2/{parent=organizations/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZF\"2/v2/{parent=folders/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZG\"3/v2/{parent=projects/*/locations/*}/bigQueryExports:\x10\x62ig_query_export\x12\x96\x02\n\rCreateFinding\x12\x34.google.cloud.securitycenter.v2.CreateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xa5\x01\xda\x41\x19parent,finding,finding_id\x82\xd3\xe4\x93\x02\x82\x01\";/v2/{parent=organizations/*/sources/*/locations/*}/findings:\x07\x66indingZ:\"//v2/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\x99\x05\n\x10\x43reateMuteConfig\x12\x37.google.cloud.securitycenter.v2.CreateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\x9f\x04\xda\x41!parent,mute_config,mute_config_id\x82\xd3\xe4\x93\x02\xe2\x02\"4/v2/{parent=organizations/*/locations/*}/muteConfigs:\x0bmute_configZ=\"./v2/{parent=folders/*/locations/*}/muteConfigs:\x0bmute_configZ>\"//v2/{parent=projects/*/locations/*}/muteConfigs:\x0bmute_configZ7\"(/v2/{parent=organizations/*}/muteConfigs:\x0bmute_configZ1\"\"/v2/{parent=folders/*}/muteConfigs:\x0bmute_configZ2\"#/v2/{parent=projects/*}/muteConfigs:\x0bmute_config\x8a\xd3\xe4\x93\x02\x8b\x01\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\x30\n\x06parent\x12&organizations/*/locations/{location=*}\x12*\n\x06parent\x12 folders/*/locations/{location=*}\x12\xb2\x03\n\x18\x43reateNotificationConfig\x12?.google.cloud.securitycenter.v2.CreateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xa0\x02\xda\x41$parent,notification_config,config_id\x82\xd3\xe4\x93\x02\xf2\x01\".google.cloud.securitycenter.v2.ListNotificationConfigsRequest\x1a?.google.cloud.securitycenter.v2.ListNotificationConfigsResponse\"\xc3\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb3\x01\x12/v2/{name=folders/*/sources/*/locations/*/findings/*}:setState:\x01*Z8\"3/v2/{name=projects/*/sources/*/findings/*}:setState:\x01*ZD\"?/v2/{name=projects/*/sources/*/locations/*/findings/*}:setState:\x01*\x12\x9d\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"R\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02:\"5/v2/{resource=organizations/*/sources/*}:setIamPolicy:\x01*\x12\xf8\x03\n\x07SetMute\x12..google.cloud.securitycenter.v2.SetMuteRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\x93\x03\xda\x41\tname,mute\x82\xd3\xe4\x93\x02\x80\x03\"7/v2/{name=organizations/*/sources/*/findings/*}:setMute:\x01*ZH\"C/v2/{name=organizations/*/sources/*/locations/*/findings/*}:setMute:\x01*Z6\"1/v2/{name=folders/*/sources/*/findings/*}:setMute:\x01*ZB\"=/v2/{name=folders/*/sources/*/locations/*/findings/*}:setMute:\x01*Z7\"2/v2/{name=projects/*/sources/*/findings/*}:setMute:\x01*ZC\">/v2/{name=projects/*/sources/*/locations/*/findings/*}:setMute:\x01*\x12\xc8\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02@\";/v2/{resource=organizations/*/sources/*}:testIamPermissions:\x01*\x12\xbc\x03\n\x14UpdateBigQueryExport\x12;.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\xb6\x02\xda\x41\x1c\x62ig_query_export,update_mask\x82\xd3\xe4\x93\x02\x90\x02\x32I/v2/{big_query_export.name=organizations/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZW2C/v2/{big_query_export.name=folders/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZX2D/v2/{big_query_export.name=projects/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_export\x12\x9b\x06\n\x14UpdateExternalSystem\x12;.google.cloud.securitycenter.v2.UpdateExternalSystemRequest\x1a..google.cloud.securitycenter.v2.ExternalSystem\"\x95\x05\xda\x41\x1b\x65xternal_system,update_mask\x82\xd3\xe4\x93\x02\xf0\x04\x32Q/v2/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZp2]/v2/{external_system.name=organizations/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ^2K/v2/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZj2W/v2/{external_system.name=folders/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ_2L/v2/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZk2X/v2/{external_system.name=projects/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_system\x12\xb2\x04\n\rUpdateFinding\x12\x34.google.cloud.securitycenter.v2.UpdateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xc1\x03\xda\x41\x13\x66inding,update_mask\x82\xd3\xe4\x93\x02\xa4\x03\x32\x37/v2/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZN2C/v2/{finding.name=organizations/*/sources/*/locations/*/findings/*}:\x07\x66indingZ<21/v2/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZH2=/v2/{finding.name=folders/*/sources/*/locations/*/findings/*}:\x07\x66indingZ=22/v2/{finding.name=projects/*/sources/*/findings/*}:\x07\x66indingZI2>/v2/{finding.name=projects/*/sources/*/locations/*/findings/*}:\x07\x66inding\x12\x9f\x06\n\x10UpdateMuteConfig\x12\x37.google.cloud.securitycenter.v2.UpdateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\xa5\x05\xda\x41\x17mute_config,update_mask\x82\xd3\xe4\x93\x02\xaa\x03\x32\x34/v2/{mute_config.name=organizations/*/muteConfigs/*}:\x0bmute_configZO2@/v2/{mute_config.name=organizations/*/locations/*/muteConfigs/*}:\x0bmute_configZ=2./v2/{mute_config.name=folders/*/muteConfigs/*}:\x0bmute_configZI2:/v2/{mute_config.name=folders/*/locations/*/muteConfigs/*}:\x0bmute_configZ>2//v2/{mute_config.name=projects/*/muteConfigs/*}:\x0bmute_configZJ2;/v2/{mute_config.name=projects/*/locations/*/muteConfigs/*}:\x0bmute_config\x8a\xd3\xe4\x93\x02\xd3\x01\x12\x43\n\x10mute_config.name\x12/projects/*/locations/{location=*}/muteConfigs/*\x12H\n\x10mute_config.name\x12\x34organizations/*/locations/{location=*}/muteConfigs/*\x12\x42\n\x10mute_config.name\x12.folders/*/locations/{location=*}/muteConfigs/*\x12\xe9\x03\n\x18UpdateNotificationConfig\x12?.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xd7\x02\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\xae\x02\x32P/v2/{notification_config.name=organizations/*/locations/*/notificationConfigs/*}:\x13notification_configZa2J/v2/{notification_config.name=folders/*/locations/*/notificationConfigs/*}:\x13notification_configZb2K/v2/{notification_config.name=projects/*/locations/*/notificationConfigs/*}:\x13notification_config\x12\x8e\x03\n\x19UpdateResourceValueConfig\x12@.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xf9\x01\xda\x41!resource_value_config,update_mask\x82\xd3\xe4\x93\x02\xce\x01\x32G/v2/{resource_value_config.name=organizations/*/resourceValueConfigs/*}:\x15resource_value_configZl2S/v2/{resource_value_config.name=organizations/*/locations/*/resourceValueConfigs/*}:\x15resource_value_config\x12\xe4\x07\n\x13UpdateSecurityMarks\x12:.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest\x1a-.google.cloud.securitycenter.v2.SecurityMarks\"\xe1\x06\xda\x41\x1asecurity_marks,update_mask\x82\xd3\xe4\x93\x02\xbd\x06\x32L/v2/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZR2@/v2/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZj2X/v2/{security_marks.name=organizations/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZX2F/v2/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZL2:/v2/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZd2R/v2/{security_marks.name=folders/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZY2G/v2/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZM2;/v2/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZe2S/v2/{security_marks.name=projects/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marks\x12\xbd\x01\n\x0cUpdateSource\x12\x33.google.cloud.securitycenter.v2.UpdateSourceRequest\x1a&.google.cloud.securitycenter.v2.Source\"P\xda\x41\x12source,update_mask\x82\xd3\xe4\x93\x02\x35\x32+/v2/{source.name=organizations/*/sources/*}:\x06source\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe2\x04\n\"com.google.cloud.securitycenter.v2B\x1aSecuritycenterServiceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41g\n2securitycenter.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41U\n,securitycenter.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41\xa8\x01\n8securitycenter.googleapis.com/OrganizationValuedResource\x12lorganizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + BatchCreateResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest").msgclass + BatchCreateResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse").msgclass + BulkMuteFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsRequest").msgclass + BulkMuteFindingsRequest::MuteState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteState").enummodule + BulkMuteFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsResponse").msgclass + CreateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateBigQueryExportRequest").msgclass + CreateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateFindingRequest").msgclass + CreateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateMuteConfigRequest").msgclass + CreateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateNotificationConfigRequest").msgclass + CreateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateResourceValueConfigRequest").msgclass + CreateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateSourceRequest").msgclass + DeleteBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteBigQueryExportRequest").msgclass + DeleteMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteMuteConfigRequest").msgclass + DeleteNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteNotificationConfigRequest").msgclass + DeleteResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest").msgclass + BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BigQueryDestination").msgclass + ExportFindingsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExportFindingsMetadata").msgclass + ExportFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExportFindingsResponse").msgclass + GetBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetBigQueryExportRequest").msgclass + GetMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetMuteConfigRequest").msgclass + GetNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetNotificationConfigRequest").msgclass + GetResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetResourceValueConfigRequest").msgclass + GetSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetSourceRequest").msgclass + GroupFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupFindingsRequest").msgclass + GroupFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupFindingsResponse").msgclass + GroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupResult").msgclass + ListAttackPathsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListAttackPathsRequest").msgclass + ListAttackPathsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListAttackPathsResponse").msgclass + GetSimulationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetSimulationRequest").msgclass + GetValuedResourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetValuedResourceRequest").msgclass + ListBigQueryExportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListBigQueryExportsRequest").msgclass + ListBigQueryExportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListBigQueryExportsResponse").msgclass + ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsRequest").msgclass + ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse").msgclass + ListFindingsResponse::ListFindingsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult").msgclass + ListFindingsResponse::ListFindingsResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource").msgclass + ListMuteConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListMuteConfigsRequest").msgclass + ListMuteConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListMuteConfigsResponse").msgclass + ListNotificationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListNotificationConfigsRequest").msgclass + ListNotificationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListNotificationConfigsResponse").msgclass + ListResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListResourceValueConfigsRequest").msgclass + ListResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListResourceValueConfigsResponse").msgclass + ListSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListSourcesRequest").msgclass + ListSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListSourcesResponse").msgclass + ListValuedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListValuedResourcesRequest").msgclass + ListValuedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListValuedResourcesResponse").msgclass + SetFindingStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SetFindingStateRequest").msgclass + SetMuteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SetMuteRequest").msgclass + UpdateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateBigQueryExportRequest").msgclass + UpdateExternalSystemRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateExternalSystemRequest").msgclass + UpdateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateFindingRequest").msgclass + UpdateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateMuteConfigRequest").msgclass + UpdateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateNotificationConfigRequest").msgclass + UpdateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest").msgclass + UpdateSecurityMarksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateSecurityMarksRequest").msgclass + UpdateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateSourceRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb new file mode 100644 index 000000000000..36c3f5bae249 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb @@ -0,0 +1,167 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/securitycenter/v2/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V2' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/securitycenter/v2/securitycenter_service_pb' + +module Google + module Cloud + module SecurityCenter + module V2 + module SecurityCenter + # V2 APIs for Security Center service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.securitycenter.v2.SecurityCenter' + + # Creates a ResourceValueConfig for an organization. Maps user's tags to + # difference resource values for use by the attack path simulation. + rpc :BatchCreateResourceValueConfigs, ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse + # Kicks off an LRO to bulk mute findings for a parent based on a filter. If + # no location is specified, findings are muted in global. The parent + # can be either an organization, folder, or project. The findings matched by + # the filter will be muted after the LRO is done. + rpc :BulkMuteFindings, ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest, ::Google::Longrunning::Operation + # Creates a BigQuery export. + rpc :CreateBigQueryExport, ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport + # Creates a finding in a location. The corresponding source must exist for + # finding creation to succeed. + rpc :CreateFinding, ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest, ::Google::Cloud::SecurityCenter::V2::Finding + # Creates a mute config. + rpc :CreateMuteConfig, ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig + # Creates a notification config. + rpc :CreateNotificationConfig, ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig + # Creates a source. + rpc :CreateSource, ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source + # Deletes an existing BigQuery export. + rpc :DeleteBigQueryExport, ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest, ::Google::Protobuf::Empty + # Deletes an existing mute config. If no location is specified, default is + # global. + rpc :DeleteMuteConfig, ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest, ::Google::Protobuf::Empty + # Deletes a notification config. + rpc :DeleteNotificationConfig, ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest, ::Google::Protobuf::Empty + # Deletes a ResourceValueConfig. + rpc :DeleteResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest, ::Google::Protobuf::Empty + # Gets a BigQuery export. + rpc :GetBigQueryExport, ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport + # Get the simulation by name or the latest simulation for the given + # organization. + rpc :GetSimulation, ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest, ::Google::Cloud::SecurityCenter::V2::Simulation + # Get the valued resource by name + rpc :GetValuedResource, ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest, ::Google::Cloud::SecurityCenter::V2::ValuedResource + # Gets the access control policy on the specified Source. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets a mute config. If no location is specified, default is + # global. + rpc :GetMuteConfig, ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig + # Gets a notification config. + rpc :GetNotificationConfig, ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig + # Gets a ResourceValueConfig. + rpc :GetResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig + # Gets a source. + rpc :GetSource, ::Google::Cloud::SecurityCenter::V2::GetSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source + # Filters an organization or source's findings and groups them by their + # specified properties in a location. If no location is specified, findings + # are assumed to be in global + # + # To group across all sources provide a `-` as the source id. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + # + `/v2/folders/{folder_id}/sources/-/findings` + # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + # + `/v2/projects/{project_id}/sources/-/findings` + # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` + rpc :GroupFindings, ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest, ::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse + # Lists the attack paths for a set of simulation results or valued resources + # and filter. + rpc :ListAttackPaths, ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest, ::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse + # Lists BigQuery exports. Note that when requesting BigQuery exports at a + # given level all exports under that level are also returned e.g. if + # requesting BigQuery exports under a folder, then all BigQuery exports + # immediately under the folder plus the ones created under the projects + # within the folder are returned. + rpc :ListBigQueryExports, ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest, ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse + # Lists an organization or source's findings. + # + # To list across all sources for a given location provide a `-` as the source + # id. If no location is specified, finding are assumed to be in global. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + rpc :ListFindings, ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest, ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse + # Lists mute configs. If no location is specified, default is + # global. + rpc :ListMuteConfigs, ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse + # Lists notification configs. + rpc :ListNotificationConfigs, ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse + # Lists all ResourceValueConfigs. + rpc :ListResourceValueConfigs, ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse + # Lists all sources belonging to an organization. + rpc :ListSources, ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest, ::Google::Cloud::SecurityCenter::V2::ListSourcesResponse + # Lists the valued resources for a set of simulation results and filter. + rpc :ListValuedResources, ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest, ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse + # Updates the state of a finding. If no location is specified, finding is + # assumed to be in global + rpc :SetFindingState, ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest, ::Google::Cloud::SecurityCenter::V2::Finding + # Sets the access control policy on the specified Source. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Updates the mute state of a finding. If no location is specified, finding + # is assumed to be in global + rpc :SetMute, ::Google::Cloud::SecurityCenter::V2::SetMuteRequest, ::Google::Cloud::SecurityCenter::V2::Finding + # Returns the permissions that a caller has on the specified source. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Updates a BigQuery export. + rpc :UpdateBigQueryExport, ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport + # Updates external system. This is for a given finding. If no location is + # specified, finding is assumed to be in global + rpc :UpdateExternalSystem, ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest, ::Google::Cloud::SecurityCenter::V2::ExternalSystem + # Creates or updates a finding. If no location is specified, finding is + # assumed to be in global. The corresponding source must exist for a finding + # creation to succeed. + rpc :UpdateFinding, ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest, ::Google::Cloud::SecurityCenter::V2::Finding + # Updates a mute config. If no location is specified, default is + # global. + rpc :UpdateMuteConfig, ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + rpc :UpdateNotificationConfig, ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig + # Updates an existing ResourceValueConfigs with new rules. + rpc :UpdateResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig + # Updates security marks. For Finding Security marks, if no location is + # specified, finding is assumed to be in global. Assets Security Marks can + # only be accessed through global endpoint. + rpc :UpdateSecurityMarks, ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest, ::Google::Cloud::SecurityCenter::V2::SecurityMarks + # Updates a source. + rpc :UpdateSource, ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb new file mode 100644 index 000000000000..7ffa40f95f0a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/simulation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v2/resource_pb' +require 'google/cloud/securitycenter/v2/valued_resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/simulation.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a\x34google/cloud/securitycenter/v2/valued_resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\x03\n\nSimulation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x64\n\x1fresource_value_configs_metadata\x18\x03 \x03(\x0b\x32;.google.cloud.securitycenter.v2.ResourceValueConfigMetadata\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider:\xca\x01\xea\x41\xc6\x01\n(securitycenter.googleapis.com/Simulation\x12\x35organizations/{organization}/simulations/{simulation}\x12Jorganizations/{organization}/locations/{location}/simulations/{simluation}*\x0bsimulations2\nsimulationB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fSimulationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Simulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Simulation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb new file mode 100644 index 000000000000..073204318455 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/source.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n+google/cloud/securitycenter/v2/source.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xfd\x01\n\x06Source\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x16\n\x0e\x63\x61nonical_name\x18\x04 \x01(\t:\xa1\x01\xea\x41\x9d\x01\n$securitycenter.googleapis.com/Source\x12-organizations/{organization}/sources/{source}\x12!folders/{folder}/sources/{source}\x12#projects/{project}/sources/{source}B\xe5\x01\n\"com.google.cloud.securitycenter.v2B\x0bSourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Source").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb new file mode 100644 index 000000000000..7096e7b98ac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/toxic_combination.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/cloud/securitycenter/v2/toxic_combination.proto\x12\x1egoogle.cloud.securitycenter.v2\"K\n\x10ToxicCombination\x12\x1d\n\x15\x61ttack_exposure_score\x18\x01 \x01(\x01\x12\x18\n\x10related_findings\x18\x02 \x03(\tB\xef\x01\n\"com.google.cloud.securitycenter.v2B\x15ToxicCombinationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + ToxicCombination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ToxicCombination").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb new file mode 100644 index 000000000000..b7df23211efc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/valued_resource.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v2/valued_resource.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xc6\x05\n\x0eValuedResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08resource\x18\x02 \x01(\t\x12\x15\n\rresource_type\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12T\n\x0eresource_value\x18\x05 \x01(\x0e\x32<.google.cloud.securitycenter.v2.ValuedResource.ResourceValue\x12\x15\n\rexposed_score\x18\x06 \x01(\x01\x12`\n\x1bresource_value_configs_used\x18\x07 \x03(\x0b\x32;.google.cloud.securitycenter.v2.ResourceValueConfigMetadata\"{\n\rResourceValue\x12\x1e\n\x1aRESOURCE_VALUE_UNSPECIFIED\x10\x00\x12\x16\n\x12RESOURCE_VALUE_LOW\x10\x01\x12\x19\n\x15RESOURCE_VALUE_MEDIUM\x10\x02\x12\x17\n\x13RESOURCE_VALUE_HIGH\x10\x03:\x9a\x02\xea\x41\x96\x02\n,securitycenter.googleapis.com/ValuedResource\x12Worganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}\x12lorganizations/{organization}/locations/{location}/simulations/{simluation}/valuedResources/{valued_resource}*\x0fvaluedResources2\x0evaluedResource\"+\n\x1bResourceValueConfigMetadata\x12\x0c\n\x04name\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13ValuedResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + ValuedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ValuedResource").msgclass + ValuedResource::ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ValuedResource.ResourceValue").enummodule + ResourceValueConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfigMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb new file mode 100644 index 000000000000..00ccbb3b5a21 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/vertex_ai.proto + +require 'google/protobuf' + + +descriptor_data = "\n.google/cloud/securitycenter/v2/vertex_ai.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x83\x02\n\x08VertexAi\x12\x42\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x30.google.cloud.securitycenter.v2.VertexAi.Dataset\x12\x44\n\tpipelines\x18\x02 \x03(\x0b\x32\x31.google.cloud.securitycenter.v2.VertexAi.Pipeline\x1a=\n\x07\x44\x61taset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0e\n\x06source\x18\x03 \x01(\t\x1a.\n\x08Pipeline\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\tB\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rVertexAiProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + VertexAi = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi").msgclass + VertexAi::Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi.Dataset").msgclass + VertexAi::Pipeline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi.Pipeline").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb new file mode 100644 index 000000000000..deb4b635f6df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/vulnerability.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/securitycenter/v2/vulnerability.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf5\x02\n\rVulnerability\x12\x30\n\x03\x63ve\x18\x01 \x01(\x0b\x32#.google.cloud.securitycenter.v2.Cve\x12\x42\n\x11offending_package\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12>\n\rfixed_package\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12K\n\x11security_bulletin\x18\x04 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.SecurityBulletin\x12\x1b\n\x13provider_risk_score\x18\x05 \x01(\x03\x12\x11\n\treachable\x18\x06 \x01(\x08\x12\x31\n\x04\x63wes\x18\x07 \x03(\x0b\x32#.google.cloud.securitycenter.v2.Cwe\"\xc7\x05\n\x03\x43ve\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v2.Reference\x12\x36\n\x06\x63vssv3\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Cvssv3\x12\x1e\n\x16upstream_fix_available\x18\x04 \x01(\x08\x12>\n\x06impact\x18\x05 \x01(\x0e\x32..google.cloud.securitycenter.v2.Cve.RiskRating\x12W\n\x15\x65xploitation_activity\x18\x06 \x01(\x0e\x32\x38.google.cloud.securitycenter.v2.Cve.ExploitationActivity\x12\x1c\n\x14observed_in_the_wild\x18\x07 \x01(\x08\x12\x10\n\x08zero_day\x18\x08 \x01(\x08\x12\x38\n\x14\x65xploit_release_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12;\n\x17\x66irst_exploitation_date\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"V\n\nRiskRating\x12\x1b\n\x17RISK_RATING_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04\"\x84\x01\n\x14\x45xploitationActivity\x12%\n!EXPLOITATION_ACTIVITY_UNSPECIFIED\x10\x00\x12\x08\n\x04WIDE\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\r\n\tAVAILABLE\x10\x03\x12\x0f\n\x0b\x41NTICIPATED\x10\x04\x12\x0c\n\x08NO_KNOWN\x10\x05\"(\n\tReference\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xb1\n\n\x06\x43vssv3\x12\x12\n\nbase_score\x18\x01 \x01(\x01\x12J\n\rattack_vector\x18\x02 \x01(\x0e\x32\x33.google.cloud.securitycenter.v2.Cvssv3.AttackVector\x12R\n\x11\x61ttack_complexity\x18\x03 \x01(\x0e\x32\x37.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity\x12V\n\x13privileges_required\x18\x04 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired\x12P\n\x10user_interaction\x18\x05 \x01(\x0e\x32\x36.google.cloud.securitycenter.v2.Cvssv3.UserInteraction\x12;\n\x05scope\x18\x06 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Cvssv3.Scope\x12M\n\x16\x63onfidentiality_impact\x18\x07 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12G\n\x10integrity_impact\x18\x08 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12J\n\x13\x61vailability_impact\x18\t \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\"_\n\x07Package\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0f\n\x07\x63pe_uri\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x17\n\x0fpackage_version\x18\x04 \x01(\t\"\x7f\n\x10SecurityBulletin\x12\x13\n\x0b\x62ulletin_id\x18\x01 \x01(\t\x12\x33\n\x0fsubmission_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x19suggested_upgrade_version\x18\x03 \x01(\t\"P\n\x03\x43we\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v2.ReferenceB\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12VulnerabilityProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Vulnerability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Vulnerability").msgclass + Cve = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve").msgclass + Cve::RiskRating = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve.RiskRating").enummodule + Cve::ExploitationActivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve.ExploitationActivity").enummodule + Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Reference").msgclass + Cvssv3 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3").msgclass + Cvssv3::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.AttackVector").enummodule + Cvssv3::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.AttackComplexity").enummodule + Cvssv3::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired").enummodule + Cvssv3::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.UserInteraction").enummodule + Cvssv3::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.Scope").enummodule + Cvssv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.Impact").enummodule + Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Package").msgclass + SecurityBulletin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityBulletin").msgclass + Cwe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cwe").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md new file mode 100644 index 000000000000..c8ec50fdacaa --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Security Command Center V2 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb new file mode 100644 index 000000000000..6d71a9430253 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb @@ -0,0 +1,463 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Specifies the routing information that should be sent along with the request + # in the form of routing header. + # **NOTE:** All service configuration rules follow the "last one wins" order. + # + # The examples below will apply to an RPC which has the following request type: + # + # Message Definition: + # + # message Request { + # // The name of the Table + # // Values can be of the following formats: + # // - `projects//tables/` + # // - `projects//instances//tables/
` + # // - `region//zones//tables/
` + # string table_name = 1; + # + # // This value specifies routing for replication. + # // It can be in the following formats: + # // - `profiles/` + # // - a legacy `profile_id` that can be any string + # string app_profile_id = 2; + # } + # + # Example message: + # + # { + # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, + # app_profile_id: profiles/prof_qux + # } + # + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. + # The examples below skip the percent-encoding for readability. + # + # Example 1 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key equal to the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`. + # routing_parameters { + # field: "app_profile_id" + # } + # }; + # + # result: + # + # x-goog-request-params: app_profile_id=profiles/prof_qux + # + # Example 2 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key different from the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`, but name it `routing_id` in the header. + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 3 + # + # Extracting a field from the request to put into the routing + # header, while matching a path template syntax on the field's value. + # + # NB: it is more useful to send nothing than to send garbage for the purpose + # of dynamic routing, since garbage pollutes cache. Thus the matching. + # + # Sub-example 3a + # + # The field matches the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with project-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Sub-example 3b + # + # The field does not match the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with region-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # }; + # + # result: + # + # + # + # Sub-example 3c + # + # Multiple alternative conflictingly named path templates are + # specified. The one that matches is used to construct the header. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed, whether + # // using the region- or projects-based syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Example 4 + # + # Extracting a single routing header key-value pair by matching a + # template syntax on (a part of) a single request field. + # + # annotation: + # + # option (google.api.routing) = { + # // Take just the project id from the `table_name` field. + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=projects/proj_foo + # + # Example 5 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on (parts of) a single request + # field. The last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // If the `table_name` does not have instances information, + # // take just the project id for routing. + # // Otherwise take project + instance. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*/instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # routing_id=projects/proj_foo/instances/instance_bar + # + # Example 6 + # + # Extracting multiple routing header key-value pairs by matching + # several non-conflicting path templates on (parts of) a single request field. + # + # Sub-example 6a + # + # Make the templates strict, so that if the `table_name` does not + # have an instance information, nothing is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code needs two keys instead of one composite + # // but works only for the tables with the "project-instance" name + # // syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/instances/*/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Sub-example 6b + # + # Make the templates loose, so that if the `table_name` does not + # have an instance information, just the project id part is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code wants two keys instead of one composite + # // but will work with just the `project_id` for tables without + # // an instance in the `table_name`. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result (is the same as 6a for our example message because it has the instance + # information): + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Example 7 + # + # Extracting multiple routing header key-value pairs by matching + # several path templates on multiple request fields. + # + # NB: note that here there is no way to specify sending nothing if one of the + # fields does not match its template. E.g. if the `table_name` is in the wrong + # format, the `project_id` will not be sent, but the `routing_id` will be. + # The backend routing code has to be aware of that and be prepared to not + # receive a full complement of keys if it expects multiple. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing needs both `project_id` and `routing_id` + # // (from the `app_profile_id` field) for routing. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&routing_id=profiles/prof_qux + # + # Example 8 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on several request fields. The + # last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // The `routing_id` can be a project id or a region id depending on + # // the table name format, but only if the `app_profile_id` is not set. + # // If `app_profile_id` is set it should be used instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=regions/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 9 + # + # Bringing it all together. + # + # annotation: + # + # option (google.api.routing) = { + # // For routing both `table_location` and a `routing_id` are needed. + # // + # // table_location can be either an instance id or a region+zone id. + # // + # // For `routing_id`, take the value of `app_profile_id` + # // - If it's in the format `profiles/`, send + # // just the `` part. + # // - If it's any other literal, send it as is. + # // If the `app_profile_id` is empty, and the `table_name` starts with + # // the project_id, send that instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_location=regions/*/zones/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "profiles/{routing_id=*}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_location=instances/instance_bar&routing_id=prof_qux + # @!attribute [rw] routing_parameters + # @return [::Array<::Google::Api::RoutingParameter>] + # A collection of Routing Parameter specifications. + # **NOTE:** If multiple Routing Parameters describe the same key + # (via the `path_template` field or via the `field` field when + # `path_template` is not provided), "last one wins" rule + # determines which Parameter gets used. + # See the examples for more details. + class RoutingRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A projection from an input message to the GRPC or REST header. + # @!attribute [rw] field + # @return [::String] + # A request field to extract the header key-value pair from. + # @!attribute [rw] path_template + # @return [::String] + # A pattern matching the key-value field. Optional. + # If not specified, the whole field specified in the `field` field will be + # taken as value, and its name used as key. If specified, it MUST contain + # exactly one named segment (along with any number of unnamed segments) The + # pattern will be matched over the field specified in the `field` field, then + # if the match is successful: + # - the name of the single named segment will be used as a header name, + # - the match value of the segment will be used as a header value; + # if the match is NOT successful, nothing will be sent. + # + # Example: + # + # -- This is a field in the request message + # | that the header value will be extracted from. + # | + # | -- This is the key name in the + # | | routing header. + # V | + # field: "table_name" v + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # ^ ^ + # | | + # In the {} brackets is the pattern that -- | + # specifies what to extract from the | + # field as a value to be sent. | + # | + # The string in the field must match the whole pattern -- + # before brackets, inside brackets, after brackets. + # + # When looking at this specific example, we can see that: + # - A key-value pair with the key `table_location` + # and the value matching `instances/*` should be added + # to the x-goog-request-params routing header. + # - The value is extracted from the request message's `table_name` field + # if it matches the full pattern specified: + # `projects/*/instances/*/tables/*`. + # + # **NB:** If the `path_template` field is not provided, the key name is + # equal to the field name, and the whole field should be sent as a value. + # This makes the pattern for the field and the value functionally equivalent + # to `**`, and the configuration + # + # { + # field: "table_name" + # } + # + # is a functionally equivalent shorthand to: + # + # { + # field: "table_name" + # path_template: "{table_name=**}" + # } + # + # See Example 1 for more details. + class RoutingParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb new file mode 100644 index 000000000000..4b452fd07cb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb @@ -0,0 +1,120 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Represents an access event. + # @!attribute [rw] principal_email + # @return [::String] + # Associated email, such as "foo@google.com". + # + # The email address of the authenticated user or a service account acting on + # behalf of a third party principal making the request. For third party + # identity callers, the `principal_subject` field is populated instead of + # this field. For privacy reasons, the principal email address is sometimes + # redacted. For more information, see [Caller identities in audit + # logs](https://cloud.google.com/logging/docs/audit#user-id). + # @!attribute [rw] caller_ip + # @return [::String] + # Caller's IP address, such as "1.1.1.1". + # @!attribute [rw] caller_ip_geo + # @return [::Google::Cloud::SecurityCenter::V2::Geolocation] + # The caller IP's geolocation, which identifies where the call came from. + # @!attribute [rw] user_agent_family + # @return [::String] + # Type of user agent associated with the finding. For example, an operating + # system shell or an embedded or standalone application. + # @!attribute [rw] user_agent + # @return [::String] + # The caller's user agent string associated with the finding. + # @!attribute [rw] service_name + # @return [::String] + # This is the API service that the service account made a call to, e.g. + # "iam.googleapis.com" + # @!attribute [rw] method_name + # @return [::String] + # The method that the service account called, e.g. "SetIamPolicy". + # @!attribute [rw] principal_subject + # @return [::String] + # A string that represents the principal_subject that is associated with the + # identity. Unlike `principal_email`, `principal_subject` supports principals + # that aren't associated with email addresses, such as third party + # principals. For most identities, the format is + # `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. + # Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, + # still use the legacy format `serviceAccount:{identity pool + # name}[\\{subject}]`. + # @!attribute [rw] service_account_key_name + # @return [::String] + # The name of the service account key that was used to create or exchange + # credentials when authenticating the service account that made the request. + # This is a scheme-less URI full resource name. For example: + # + # "//iam.googleapis.com/projects/\\{PROJECT_ID}/serviceAccounts/\\{ACCOUNT}/keys/\\{key}". + # @!attribute [rw] service_account_delegation_info + # @return [::Array<::Google::Cloud::SecurityCenter::V2::ServiceAccountDelegationInfo>] + # The identity delegation history of an authenticated service account that + # made the request. The `serviceAccountDelegationInfo[]` object contains + # information about the real authorities that try to access Google Cloud + # resources by delegating on a service account. When multiple authorities are + # present, they are guaranteed to be sorted based on the original ordering of + # the identity delegation events. + # @!attribute [rw] user_name + # @return [::String] + # A string that represents a username. The username provided depends on the + # type of the finding and is likely not an IAM principal. For example, this + # can be a system username if the finding is related to a virtual machine, or + # it can be an application login username. + class Access + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Identity delegation history of an authenticated service account. + # @!attribute [rw] principal_email + # @return [::String] + # The email address of a Google account. + # @!attribute [rw] principal_subject + # @return [::String] + # A string representing the principal_subject associated with the identity. + # As compared to `principal_email`, supports principals that aren't + # associated with email addresses, such as third party principals. For most + # identities, the format will be `principal://iam.googleapis.com/{identity + # pool name}/subjects/\\{subject}` except for some GKE identities + # (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy + # format `serviceAccount:{identity pool name}[{subject}]` + class ServiceAccountDelegationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a geographical location for a given access. + # @!attribute [rw] region_code + # @return [::String] + # A CLDR. + class Geolocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb new file mode 100644 index 000000000000..22a4e9fe9934 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.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! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Details about resources affected by this finding. + # @!attribute [rw] count + # @return [::Integer] + # The count of resources affected by the finding. + class AffectedResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb new file mode 100644 index 000000000000..1f73c0cb72dd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Represents a monitored AI Agent. + # @!attribute [rw] id + # @return [::String] + # Identifier of the agent. + # @!attribute [rw] display_name + # @return [::String] + # The user friendly name of the specific agent instance where the finding was + # detected, for example, "Banking Agent". + class Agent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb new file mode 100644 index 000000000000..04b633fa8589 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Represents details about an anomaly detected in an AI agent's behavior. + # @!attribute [rw] confidence_score + # @return [::Float] + # The overall confidence score indicating the likelihood that this session + # contains a true anomaly. The score ranges from 0.0 to 1.0, where 1.0 + # signifies 100% confidence in the presence of an anomaly and 0.0 signifies + # 0% confidence. + # @!attribute [rw] detector_references + # @return [::Array<::Google::Cloud::SecurityCenter::V2::DetectorReference>] + # The list of references to specific detectors that identified anomalies + # within this session. + # @!attribute [rw] invocation_references + # @return [::Array<::Google::Cloud::SecurityCenter::V2::InvocationReference>] + # References to the OpenTelemetry invocations. + class AgentAnomaly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a reference to a specific anomaly detector. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenter::V2::DetectorReference::Severity] + # The severity of the detector. + # @!attribute [rw] detector_id + # @return [::String] + # The unique identifier of the detector. + # @!attribute [rw] display_name + # @return [::String] + # A human readable name for the detector, providing context on its purpose. + # For example, "ASI02: Tool Misuse", or "Excessive API Calls". + # @!attribute [rw] explanation + # @return [::String] + # A detailed explanation generated by an LLM or the detector itself, + # describing why this specific anomaly was flagged. This provides rationale + # and context for the detection. + # @!attribute [rw] recommendation + # @return [::String] + # Recommended steps or actions to remediate or investigate the anomaly + # flagged by this detector. These could include configuration changes, code + # adjustments, or further diagnostic procedures. + class DetectorReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Severity levels for detectors. + module Severity + # Unspecified severity. + SEVERITY_UNSPECIFIED = 0 + + # Critical severity. + CRITICAL = 1 + + # High severity. + HIGH = 2 + + # Medium severity. + MEDIUM = 3 + + # Low severity. + LOW = 4 + end + end + + # Represents a reference to a specific OpenTelemetry invocation. + # @!attribute [rw] invocation_id + # @return [::String] + # The unique identifier of the invocation. + class InvocationReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb new file mode 100644 index 000000000000..ec46f99686e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.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! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Represents a conversational session where the finding occurred. + # @!attribute [rw] session_id + # @return [::String] + # The session ID of a conversation. + class AgentSession + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb new file mode 100644 index 000000000000..fe0106b68b6d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Contains information about the AI model associated with the finding. + # @!attribute [rw] name + # @return [::String] + # The name of the AI model, for example, "gemini:1.0.0". + # @!attribute [rw] domain + # @return [::String] + # The domain of the model, for example, “image-classification”. + # @!attribute [rw] library + # @return [::String] + # The name of the model library, for example, “transformers”. + # @!attribute [rw] location + # @return [::String] + # The region in which the model is used, for example, “us-central1”. + # @!attribute [rw] publisher + # @return [::String] + # The publisher of the model, for example, “google” or “nvidia”. + # @!attribute [rw] deployment_platform + # @return [::Google::Cloud::SecurityCenter::V2::AiModel::DeploymentPlatform] + # The platform on which the model is deployed. + # @!attribute [rw] display_name + # @return [::String] + # The user defined display name of model. Ex. baseline-classification-model + class AiModel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The platform on which the model is deployed. + module DeploymentPlatform + # Unspecified deployment platform. + DEPLOYMENT_PLATFORM_UNSPECIFIED = 0 + + # Vertex AI. + VERTEX_AI = 1 + + # Google Kubernetes Engine. + GKE = 2 + + # Google Compute Engine. + GCE = 3 + + # Fine tuned model. + FINE_TUNED_MODEL = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb new file mode 100644 index 000000000000..4c1fa3fef09b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Represents an application associated with a finding. + # @!attribute [rw] base_uri + # @return [::String] + # The base URI that identifies the network location of the application in + # which the vulnerability was detected. For example, `http://example.com`. + # @!attribute [rw] full_uri + # @return [::String] + # The full URI with payload that could be used to reproduce the + # vulnerability. For example, `http://example.com?p=aMmYgI6H`. + class Application + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb new file mode 100644 index 000000000000..d3543aea2fa0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # An attack exposure contains the results of an attack path simulation run. + # @!attribute [rw] score + # @return [::Float] + # A number between 0 (inclusive) and infinity that represents how important + # this finding is to remediate. The higher the score, the more important it + # is to remediate. + # @!attribute [rw] latest_calculation_time + # @return [::Google::Protobuf::Timestamp] + # The most recent time the attack exposure was updated on this finding. + # @!attribute [rw] attack_exposure_result + # @return [::String] + # The resource name of the attack path simulation result that contains the + # details regarding this attack exposure score. + # Example: `organizations/123/simulations/456/attackExposureResults/789` + # @!attribute [r] state + # @return [::Google::Cloud::SecurityCenter::V2::AttackExposure::State] + # Output only. What state this AttackExposure is in. This captures whether or + # not an attack exposure has been calculated or not. + # @!attribute [rw] exposed_high_value_resources_count + # @return [::Integer] + # The number of high value resources that are exposed as a result of this + # finding. + # @!attribute [rw] exposed_medium_value_resources_count + # @return [::Integer] + # The number of medium value resources that are exposed as a result of this + # finding. + # @!attribute [rw] exposed_low_value_resources_count + # @return [::Integer] + # The number of high value resources that are exposed as a result of this + # finding. + class AttackExposure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This enum defines the various states an AttackExposure can be in. + module State + # The state is not specified. + STATE_UNSPECIFIED = 0 + + # The attack exposure has been calculated. + CALCULATED = 1 + + # The attack exposure has not been calculated. + NOT_CALCULATED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb new file mode 100644 index 000000000000..395034b6cbf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb @@ -0,0 +1,147 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # A path that an attacker could take to reach an exposed resource. + # @!attribute [rw] name + # @return [::String] + # The attack path name, for example, + # `organizations/12/simulations/34/valuedResources/56/attackPaths/78` + # @!attribute [rw] path_nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathNode>] + # A list of nodes that exist in this attack path. + # @!attribute [rw] edges + # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathEdge>] + # A list of the edges between nodes in this attack path. + class AttackPath + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents one point that an attacker passes through in this attack path. + # @!attribute [rw] resource + # @return [::String] + # The name of the resource at this point in the attack path. + # The format of the name follows the Cloud Asset Inventory [resource + # name + # format](https://cloud.google.com/asset-inventory/docs/resource-name-format) + # @!attribute [rw] resource_type + # @return [::String] + # The [supported resource + # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # @!attribute [rw] display_name + # @return [::String] + # Human-readable name of this resource. + # @!attribute [rw] associated_findings + # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathNode::PathNodeAssociatedFinding>] + # The findings associated with this node in the attack path. + # @!attribute [rw] uuid + # @return [::String] + # Unique id of the attack path node. + # @!attribute [rw] attack_steps + # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathNode::AttackStepNode>] + # A list of attack step nodes that exist in this attack path node. + class AttackPathNode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A finding that is associated with this node in the attack path. + # @!attribute [rw] canonical_finding + # @return [::String] + # Canonical name of the associated findings. Example: + # `organizations/123/sources/456/findings/789` + # @!attribute [rw] finding_category + # @return [::String] + # The additional taxonomy group within findings from a given source. + # @!attribute [rw] name + # @return [::String] + # Full resource name of the finding. + class PathNodeAssociatedFinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Detailed steps the attack can take between path nodes. + # @!attribute [rw] uuid + # @return [::String] + # Unique ID for one Node + # @!attribute [rw] type + # @return [::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathNode::NodeType] + # Attack step type. Can be either AND, OR or DEFENSE + # @!attribute [rw] display_name + # @return [::String] + # User friendly name of the attack step + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Attack step labels for metadata + # @!attribute [rw] description + # @return [::String] + # Attack step description + class AttackStepNode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The type of the incoming attack step node. + module NodeType + # Type not specified + NODE_TYPE_UNSPECIFIED = 0 + + # Incoming edge joined with AND + NODE_TYPE_AND = 1 + + # Incoming edge joined with OR + NODE_TYPE_OR = 2 + + # Incoming edge is defense + NODE_TYPE_DEFENSE = 3 + + # Incoming edge is attacker + NODE_TYPE_ATTACKER = 4 + end + end + + # Represents a connection between a source node and a destination node in + # this attack path. + # @!attribute [rw] source + # @return [::String] + # The attack node uuid of the source node. + # @!attribute [rw] destination + # @return [::String] + # The attack node uuid of the destination node. + class AttackPathEdge + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb new file mode 100644 index 000000000000..b49d6ad06453 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Information related to Google Cloud Backup and DR Service findings. + # @!attribute [rw] backup_template + # @return [::String] + # The name of a Backup and DR template which comprises one or more backup + # policies. See the [Backup and DR + # documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) + # for more information. For example, `snap-ov`. + # @!attribute [rw] policies + # @return [::Array<::String>] + # The names of Backup and DR policies that are associated with a template + # and that define when to run a backup, how frequently to run a backup, and + # how long to retain the backup image. For example, `onvaults`. + # @!attribute [rw] host + # @return [::String] + # The name of a Backup and DR host, which is managed by the backup and + # recovery appliance and known to the management console. The host can be of + # type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file + # system, etc.), vCenter, or an ESX server. See the [Backup and DR + # documentation on + # hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) + # for more information. For example, `centos7-01`. + # @!attribute [rw] applications + # @return [::Array<::String>] + # The names of Backup and DR applications. An application is a VM, database, + # or file system on a managed host monitored by a backup and recovery + # appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, + # `centos7-01-vol02`. + # @!attribute [rw] storage_pool + # @return [::String] + # The name of the Backup and DR storage pool that the backup and recovery + # appliance is storing data in. The storage pool could be of type Cloud, + # Primary, Snapshot, or OnVault. See the [Backup and DR documentation on + # storage + # pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). + # For example, `DiskPoolOne`. + # @!attribute [rw] policy_options + # @return [::Array<::String>] + # The names of Backup and DR advanced policy options of a policy applying to + # an application. See the [Backup and DR documentation on policy + # options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). + # For example, `skipofflineappsincongrp, nounmap`. + # @!attribute [rw] profile + # @return [::String] + # The name of the Backup and DR resource profile that specifies the storage + # media for backups of application and VM data. See the [Backup and DR + # documentation on + # profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). + # For example, `GCP`. + # @!attribute [rw] appliance + # @return [::String] + # The name of the Backup and DR appliance that captures, moves, and manages + # the lifecycle of backup data. For example, `backup-server-57137`. + # @!attribute [rw] backup_type + # @return [::String] + # The backup type of the Backup and DR image. + # For example, `Snapshot`, `Remote Snapshot`, `OnVault`. + # @!attribute [rw] backup_create_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp at which the Backup and DR backup was created. + class BackupDisasterRecovery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb new file mode 100644 index 000000000000..09155c2a96e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Configures how to deliver Findings to BigQuery Instance. + # @!attribute [rw] name + # @return [::String] + # Identifier. The relative resource name of this export. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name. + # The following list shows some examples: + # + # + + # `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` + # + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + # + + # `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` + # + # This field is provided in responses, and is ignored when provided in create + # requests. + # @!attribute [rw] description + # @return [::String] + # The description of the export (max of 1024 characters). + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across create/update events + # of findings. The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @!attribute [rw] dataset + # @return [::String] + # The dataset to write findings' updates to. Its format is + # "projects/[project_id]/datasets/[bigquery_dataset_id]". + # BigQuery dataset unique ID must contain only letters (a-z, A-Z), numbers + # (0-9), or underscores (_). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the BigQuery export was created. + # This field is set by the server and will be ignored if provided on export + # on creation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time at which the BigQuery export was updated. + # This field is set by the server and will be ignored if provided on export + # creation or update. + # @!attribute [r] most_recent_editor + # @return [::String] + # Output only. Email address of the user who last edited the BigQuery export. + # This field is set by the server and will be ignored if provided on export + # creation or update. + # @!attribute [r] principal + # @return [::String] + # Output only. The service account that needs permission to create table and + # upload data to the BigQuery dataset. + class BigQueryExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb new file mode 100644 index 000000000000..4ac87a98cfbd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Contains details about a chokepoint, which is a resource or resource group + # where high-risk attack paths converge, based on [attack path simulations] + # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). + # @!attribute [rw] related_findings + # @return [::Array<::String>] + # List of resource names of findings associated with this chokepoint. + # For example, organizations/123/sources/456/findings/789. + # This list will have at most 100 findings. + class Chokepoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb new file mode 100644 index 000000000000..de5568f900ac --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb @@ -0,0 +1,138 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Fields related to Google Cloud Armor findings. + # @!attribute [rw] security_policy + # @return [::Google::Cloud::SecurityCenter::V2::SecurityPolicy] + # Information about the [Google Cloud Armor security + # policy](https://cloud.google.com/armor/docs/security-policy-overview) + # relevant to the finding. + # @!attribute [rw] requests + # @return [::Google::Cloud::SecurityCenter::V2::Requests] + # Information about incoming requests evaluated by [Google Cloud Armor + # security + # policies](https://cloud.google.com/armor/docs/security-policy-overview). + # @!attribute [rw] adaptive_protection + # @return [::Google::Cloud::SecurityCenter::V2::AdaptiveProtection] + # Information about potential Layer 7 DDoS attacks identified by [Google + # Cloud Armor Adaptive + # Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + # @!attribute [rw] attack + # @return [::Google::Cloud::SecurityCenter::V2::Attack] + # Information about DDoS attack volume and classification. + # @!attribute [rw] threat_vector + # @return [::String] + # Distinguish between volumetric & protocol DDoS attack and + # application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS + # attacks, or "L_7" for Layer 7 DDoS attacks. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Duration of attack from the start until the current moment (updated every 5 + # minutes). + class CloudArmor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the [Google Cloud Armor security + # policy](https://cloud.google.com/armor/docs/security-policy-overview) + # relevant to the finding. + # @!attribute [rw] name + # @return [::String] + # The name of the Google Cloud Armor security policy, for example, + # "my-security-policy". + # @!attribute [rw] type + # @return [::String] + # The type of Google Cloud Armor security policy for example, 'backend + # security policy', 'edge security policy', 'network edge security policy', + # or 'always-on DDoS protection'. + # @!attribute [rw] preview + # @return [::Boolean] + # Whether or not the associated rule or policy is in preview mode. + class SecurityPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the requests relevant to the finding. + # @!attribute [rw] ratio + # @return [::Float] + # For 'Increasing deny ratio', the ratio is the denied traffic divided by the + # allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + # traffic in the short term divided by allowed traffic in the long term. + # @!attribute [rw] short_term_allowed + # @return [::Integer] + # Allowed RPS (requests per second) in the short term. + # @!attribute [rw] long_term_allowed + # @return [::Integer] + # Allowed RPS (requests per second) over the long term. + # @!attribute [rw] long_term_denied + # @return [::Integer] + # Denied RPS (requests per second) over the long term. + class Requests + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about [Google Cloud Armor Adaptive + # Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection). + # @!attribute [rw] confidence + # @return [::Float] + # A score of 0 means that there is low confidence that the detected event is + # an actual attack. A score of 1 means that there is high confidence that the + # detected event is an attack. See the [Adaptive Protection + # documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + # for further explanation. + class AdaptiveProtection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about DDoS attack volume and classification. + # @!attribute [rw] volume_pps_long + # @return [::Integer] + # Total PPS (packets per second) volume of attack. + # @!attribute [rw] volume_bps_long + # @return [::Integer] + # Total BPS (bytes per second) volume of attack. + # @!attribute [rw] classification + # @return [::String] + # Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'. + # @!attribute [rw] volume_pps + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Total PPS (packets per second) volume of attack. Deprecated - refer to + # volume_pps_long instead. + # @!attribute [rw] volume_bps + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Total BPS (bytes per second) volume of attack. Deprecated - refer to + # volume_bps_long instead. + class Attack + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb new file mode 100644 index 000000000000..346e66b5e35d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # The [data profile](https://cloud.google.com/dlp/docs/data-profiles) + # associated with the finding. + # @!attribute [rw] data_profile + # @return [::String] + # Name of the data profile, for example, + # `projects/123/locations/europe/tableProfiles/8383929`. + # @!attribute [rw] parent_type + # @return [::Google::Cloud::SecurityCenter::V2::CloudDlpDataProfile::ParentType] + # The resource hierarchy level at which the data profile was generated. + class CloudDlpDataProfile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Parents for configurations that produce data profile findings. + module ParentType + # Unspecified parent type. + PARENT_TYPE_UNSPECIFIED = 0 + + # Organization-level configurations. + ORGANIZATION = 1 + + # Project-level configurations. + PROJECT = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb new file mode 100644 index 000000000000..123bea548585 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection + # job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced + # the finding. + # @!attribute [rw] inspect_job + # @return [::String] + # Name of the inspection job, for example, + # `projects/123/locations/europe/dlpJobs/i-8383929`. + # @!attribute [rw] info_type + # @return [::String] + # The type of information (or + # *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, + # for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. + # @!attribute [rw] info_type_count + # @return [::Integer] + # The number of times Cloud DLP found this infoType within this job + # and resource. + # @!attribute [rw] full_scan + # @return [::Boolean] + # Whether Cloud DLP scanned the complete resource or a sampled subset. + class CloudDlpInspection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb new file mode 100644 index 000000000000..01a4fe458c2d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Contains compliance information about a security standard indicating unmet + # recommendations. + # @!attribute [rw] standard + # @return [::String] + # Industry-wide compliance standards or benchmarks, such as CIS, PCI, and + # OWASP. + # @!attribute [rw] version + # @return [::String] + # Version of the standard or benchmark, for example, 1.1 + # @!attribute [rw] ids + # @return [::Array<::String>] + # Policies within the standard or benchmark, for example, A.12.4.1 + class Compliance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb new file mode 100644 index 000000000000..6e6ae87bd5c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Contains information about the IP connection associated with the finding. + # @!attribute [rw] destination_ip + # @return [::String] + # Destination IP address. Not present for sockets that are listening and not + # connected. + # @!attribute [rw] destination_port + # @return [::Integer] + # Destination port. Not present for sockets that are listening and not + # connected. + # @!attribute [rw] source_ip + # @return [::String] + # Source IP address. + # @!attribute [rw] source_port + # @return [::Integer] + # Source port. + # @!attribute [rw] protocol + # @return [::Google::Cloud::SecurityCenter::V2::Connection::Protocol] + # IANA Internet Protocol Number such as TCP(6) and UDP(17). + class Connection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # IANA Internet Protocol Number such as TCP(6) and UDP(17). + module Protocol + # Unspecified protocol (not HOPOPT). + PROTOCOL_UNSPECIFIED = 0 + + # Internet Control Message Protocol. + ICMP = 1 + + # Transmission Control Protocol. + TCP = 6 + + # User Datagram Protocol. + UDP = 17 + + # Generic Routing Encapsulation. + GRE = 47 + + # Encap Security Payload. + ESP = 50 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb new file mode 100644 index 000000000000..70a23d045d97 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Details about specific contacts + # @!attribute [rw] contacts + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Contact>] + # A list of contacts + class ContactDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The email address of a contact. + # @!attribute [rw] email + # @return [::String] + # An email address. For example, "`person123@company.com`". + class Contact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb new file mode 100644 index 000000000000..5fd4972d8657 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Container associated with the finding. + # @!attribute [rw] name + # @return [::String] + # Name of the container. + # @!attribute [rw] uri + # @return [::String] + # Container image URI provided when configuring a pod or container. This + # string can identify a container image version using mutable tags. + # @!attribute [rw] image_id + # @return [::String] + # Optional container image ID, if provided by the container runtime. Uniquely + # identifies the container image launched using a container image digest. + # @!attribute [rw] labels + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Label>] + # Container labels, as provided by the container runtime. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time that the container was created. + class Container + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb new file mode 100644 index 000000000000..35c543064430 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Details about a data access attempt made by a principal not authorized under + # applicable data security policy. + # @!attribute [rw] event_id + # @return [::String] + # Unique identifier for data access event. + # @!attribute [rw] principal_email + # @return [::String] + # The email address of the principal that accessed the data. The principal + # could be a user account, service account, Google group, or other. + # @!attribute [rw] operation + # @return [::Google::Cloud::SecurityCenter::V2::DataAccessEvent::Operation] + # The operation performed by the principal to access the data. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp of data access event. + class DataAccessEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The operation of a data access event. + module Operation + # The operation is unspecified. + OPERATION_UNSPECIFIED = 0 + + # Represents a read operation. + READ = 1 + + # Represents a move operation. + MOVE = 2 + + # Represents a copy operation. + COPY = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb new file mode 100644 index 000000000000..ae25f8a2cff3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Details about a data flow event, in which either the data is moved to or is + # accessed from a non-compliant geo-location, as defined in the applicable data + # security policy. + # @!attribute [rw] event_id + # @return [::String] + # Unique identifier for data flow event. + # @!attribute [rw] principal_email + # @return [::String] + # The email address of the principal that initiated the data flow event. The + # principal could be a user account, service account, Google group, or other. + # @!attribute [rw] operation + # @return [::Google::Cloud::SecurityCenter::V2::DataFlowEvent::Operation] + # The operation performed by the principal for the data flow event. + # @!attribute [rw] violated_location + # @return [::String] + # Non-compliant location of the principal or the data destination. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp of data flow event. + class DataFlowEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The operation of a data flow event. + module Operation + # The operation is unspecified. + OPERATION_UNSPECIFIED = 0 + + # Represents a read operation. + READ = 1 + + # Represents a move operation. + MOVE = 2 + + # Represents a copy operation. + COPY = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb new file mode 100644 index 000000000000..978743068cc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Details about data retention deletion violations, in which the data is + # non-compliant based on their retention or deletion time, as defined in the + # applicable data security policy. The Data Retention Deletion (DRD) control is + # a control of the DSPM (Data Security Posture Management) suite that enables + # organizations to manage data retention and deletion policies in compliance + # with regulations, such as GDPR and CRPA. DRD supports two primary policy + # types: maximum storage length (max TTL) and minimum storage length (min TTL). + # Both are aimed at helping organizations meet regulatory and data management + # commitments. + # @!attribute [rw] event_detection_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp indicating when the event was detected. + # @!attribute [rw] data_object_count + # @return [::Integer] + # Number of objects that violated the policy for this resource. If the number + # is less than 1,000, then the value of this field is the exact number. If + # the number of objects that violated the policy is greater than or equal to + # 1,000, then the value of this field is 1000. + # @!attribute [rw] max_retention_allowed + # @return [::Google::Protobuf::Duration] + # Maximum duration of retention allowed from the DRD control. This comes + # from the DRD control where users set a max TTL for their data. For example, + # suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days. + # However, an object in that bucket is 100 days old. In this case, a + # DataRetentionDeletionEvent will be generated for that Cloud Storage bucket, + # and the max_retention_allowed is 90 days. + # @!attribute [rw] event_type + # @return [::Google::Cloud::SecurityCenter::V2::DataRetentionDeletionEvent::EventType] + # Type of the DRD event. + class DataRetentionDeletionEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of the DRD event. + module EventType + # Unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0 + + # The maximum retention time has been exceeded. + EVENT_TYPE_MAX_TTL_EXCEEDED = 1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb new file mode 100644 index 000000000000..39782b12e5ae --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Represents database access information, such as queries. A database may be a + # sub-resource of an instance (as in the case of Cloud SQL instances or Cloud + # Spanner instances), or the database instance itself. Some database resources + # might not have the [full resource + # name](https://google.aip.dev/122#full-resource-names) populated because these + # resource types, such as Cloud SQL databases, are not yet supported by Cloud + # Asset Inventory. In these cases only the display name is provided. + # @!attribute [rw] name + # @return [::String] + # Some database resources may not have the [full resource + # name](https://google.aip.dev/122#full-resource-names) populated because + # these resource types are not yet supported by Cloud Asset Inventory (e.g. + # Cloud SQL databases). In these cases only the display name will be + # provided. + # The [full resource name](https://google.aip.dev/122#full-resource-names) of + # the database that the user connected to, if it is supported by Cloud Asset + # Inventory. + # @!attribute [rw] display_name + # @return [::String] + # The human-readable name of the database that the user connected to. + # @!attribute [rw] user_name + # @return [::String] + # The username used to connect to the database. The username might not be an + # IAM principal and does not have a set format. + # @!attribute [rw] query + # @return [::String] + # The SQL statement that is associated with the database access. + # @!attribute [rw] grantees + # @return [::Array<::String>] + # The target usernames, roles, or groups of an SQL privilege grant, which is + # not an IAM policy change. + # @!attribute [rw] version + # @return [::String] + # The version of the database, for example, POSTGRES_14. + # See [the complete + # list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + class Database + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb new file mode 100644 index 000000000000..0f63d09304ea --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Contains information about the disk associated with the finding. + # @!attribute [rw] name + # @return [::String] + # The name of the disk, for example, + # "https://www.googleapis.com/compute/v1/projects/\\{project-id}/zones/\\{zone-id}/disks/\\{disk-id}". + class Disk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb new file mode 100644 index 000000000000..e982b02dfc10 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Exfiltration represents a data exfiltration attempt from one or more sources + # to one or more targets. The `sources` attribute lists the sources of the + # exfiltrated data. The `targets` attribute lists the destinations the data was + # copied to. + # @!attribute [rw] sources + # @return [::Array<::Google::Cloud::SecurityCenter::V2::ExfilResource>] + # If there are multiple sources, then the data is considered "joined" between + # them. For instance, BigQuery can join multiple tables, and each + # table would be considered a source. + # @!attribute [rw] targets + # @return [::Array<::Google::Cloud::SecurityCenter::V2::ExfilResource>] + # If there are multiple targets, each target would get a complete copy of the + # "joined" source data. + # @!attribute [rw] total_exfiltrated_bytes + # @return [::Integer] + # Total exfiltrated bytes processed for the entire job. + class Exfiltration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Resource where data was exfiltrated from or exfiltrated to. + # @!attribute [rw] name + # @return [::String] + # The resource's [full resource + # name](https://cloud.google.com/apis/design/resource_names#full_resource_name). + # @!attribute [rw] components + # @return [::Array<::String>] + # Subcomponents of the asset that was exfiltrated, like URIs used during + # exfiltration, table names, databases, and filenames. For example, multiple + # tables might have been exfiltrated from the same Cloud SQL instance, or + # multiple files might have been exfiltrated from the same Cloud Storage + # bucket. + class ExfilResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb new file mode 100644 index 000000000000..d13da6e40e27 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb @@ -0,0 +1,106 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Representation of third party SIEM/SOAR fields within SCC. + # @!attribute [rw] name + # @return [::String] + # Full resource name of the external system. The following list + # shows some examples: + # + # + `organizations/1234/sources/5678/findings/123456/externalSystems/jira` + # + + # `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` + # + `folders/1234/sources/5678/findings/123456/externalSystems/jira` + # + + # `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` + # + `projects/1234/sources/5678/findings/123456/externalSystems/jira` + # + + # `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` + # @!attribute [rw] assignees + # @return [::Array<::String>] + # References primary/secondary etc assignees in the external system. + # @!attribute [rw] external_uid + # @return [::String] + # The identifier that's used to track the finding's corresponding case in the + # external system. + # @!attribute [rw] status + # @return [::String] + # The most recent status of the finding's corresponding case, as reported by + # the external system. + # @!attribute [rw] external_system_update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the case was last updated, as reported by the external + # system. + # @!attribute [rw] case_uri + # @return [::String] + # The link to the finding's corresponding case in the external system. + # @!attribute [rw] case_priority + # @return [::String] + # The priority of the finding's corresponding case in the external system. + # @!attribute [rw] case_sla + # @return [::Google::Protobuf::Timestamp] + # The SLA of the finding's corresponding case in the external system. + # @!attribute [rw] case_create_time + # @return [::Google::Protobuf::Timestamp] + # The time when the case was created, as reported by the external system. + # @!attribute [rw] case_close_time + # @return [::Google::Protobuf::Timestamp] + # The time when the case was closed, as reported by the external system. + # @!attribute [rw] ticket_info + # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem::TicketInfo] + # Information about the ticket, if any, that is being used to track the + # resolution of the issue that is identified by this finding. + class ExternalSystem + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about the ticket, if any, that is being used to track the + # resolution of the issue that is identified by this finding. + # @!attribute [rw] id + # @return [::String] + # The identifier of the ticket in the ticket system. + # @!attribute [rw] assignee + # @return [::String] + # The assignee of the ticket in the ticket system. + # @!attribute [rw] description + # @return [::String] + # The description of the ticket in the ticket system. + # @!attribute [rw] uri + # @return [::String] + # The link to the ticket in the ticket system. + # @!attribute [rw] status + # @return [::String] + # The latest status of the ticket, as reported by the ticket system. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time when the ticket was last updated, as reported by the ticket + # system. + class TicketInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb new file mode 100644 index 000000000000..fcea377226df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # File information about the related binary/library used by an executable, or + # the script used by a script interpreter + # @!attribute [rw] path + # @return [::String] + # Absolute path of the file as a JSON encoded string. + # @!attribute [rw] size + # @return [::Integer] + # Size of the file in bytes. + # @!attribute [rw] sha256 + # @return [::String] + # SHA256 hash of the first hashed_size bytes of the file encoded as a + # hex string. If hashed_size == size, sha256 represents the SHA256 hash + # of the entire file. + # @!attribute [rw] hashed_size + # @return [::Integer] + # The length in bytes of the file prefix that was hashed. If + # hashed_size == size, any hashes reported represent the entire + # file. + # @!attribute [rw] partially_hashed + # @return [::Boolean] + # True when the hash covers only a prefix of the file. + # @!attribute [rw] contents + # @return [::String] + # Prefix of the file contents as a JSON-encoded string. + # @!attribute [rw] disk_path + # @return [::Google::Cloud::SecurityCenter::V2::File::DiskPath] + # Path of the file in terms of underlying disk/partition identifiers. + # @!attribute [rw] operations + # @return [::Array<::Google::Cloud::SecurityCenter::V2::File::FileOperation>] + # Operation(s) performed on a file. + class File + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Path of the file in terms of underlying disk/partition identifiers. + # @!attribute [rw] partition_uuid + # @return [::String] + # UUID of the partition (format + # https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) + # @!attribute [rw] relative_path + # @return [::String] + # Relative path of the file in the partition as a JSON encoded string. + # Example: /home/user1/executable_file.sh + class DiskPath + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation(s) performed on a file. + # @!attribute [rw] type + # @return [::Google::Cloud::SecurityCenter::V2::File::FileOperation::OperationType] + # The type of the operation + class FileOperation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the operation + module OperationType + # The operation is unspecified. + OPERATION_TYPE_UNSPECIFIED = 0 + + # Represents an open operation. + OPEN = 1 + + # Represents a read operation. + READ = 2 + + # Represents a rename operation. + RENAME = 3 + + # Represents a write operation. + WRITE = 4 + + # Represents an execute operation. + EXECUTE = 5 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb new file mode 100644 index 000000000000..80e00cbf53ed --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb @@ -0,0 +1,533 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Security Command Center finding. + # + # A finding is a record of assessment data like security, risk, health, or + # privacy, that is ingested into Security Command Center for presentation, + # notification, analysis, policy testing, and enforcement. For example, a + # cross-site scripting (XSS) vulnerability in an App Engine application is a + # finding. + # @!attribute [rw] name + # @return [::String] + # Identifier. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @!attribute [r] canonical_name + # @return [::String] + # Output only. The canonical name of the finding. The following list shows + # some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + # The prefix is the closest CRM ancestor of the resource associated with the + # finding. + # @!attribute [rw] parent + # @return [::String] + # The relative resource name of the source and location the finding belongs + # to. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # This field is immutable after creation time. The following list shows some + # examples: + # + # + `organizations/{organization_id}/sources/{source_id}` + # + `folders/{folders_id}/sources/{source_id}` + # + `projects/{projects_id}/sources/{source_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}` + # + `folders/{folders_id}/sources/{source_id}/locations/{location_id}` + # + `projects/{projects_id}/sources/{source_id}/locations/{location_id}` + # @!attribute [rw] resource_name + # @return [::String] + # Immutable. For findings on Google Cloud resources, the full resource + # name of the Google Cloud resource this finding is for. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # When the finding is for a non-Google Cloud resource, the resourceName can + # be a customer or partner defined string. + # @!attribute [r] state + # @return [::Google::Cloud::SecurityCenter::V2::Finding::State] + # Output only. The state of the finding. + # @!attribute [rw] category + # @return [::String] + # Immutable. The additional taxonomy group within findings from a given + # source. Example: "XSS_FLASH_INJECTION" + # @!attribute [rw] external_uri + # @return [::String] + # The URI that, if available, points to a web page outside of Security + # Command Center where additional information about the finding can be found. + # This field is guaranteed to be either empty or a well formed URL. + # @!attribute [rw] source_properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Source specific properties. These properties are managed by the source + # that writes the finding. The key names in the source_properties map must be + # between 1 and 255 characters, and must start with a letter and contain + # alphanumeric characters or underscores only. + # @!attribute [r] security_marks + # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # Output only. User specified security marks. These marks are entirely + # managed by the user and come from the SecurityMarks resource that belongs + # to the finding. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # The time the finding was first detected. If an existing finding is updated, + # then this is the time the update occurred. + # For example, if the finding represents an open firewall, this property + # captures the time the detector believes the firewall became open. The + # accuracy is determined by the detector. If the finding is later resolved, + # then this time reflects when the finding was resolved. This must not + # be set to a value greater than the current timestamp. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the finding was created in Security Command + # Center. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenter::V2::Finding::Severity] + # The severity of the finding. This field is managed by the source that + # writes the finding. + # @!attribute [rw] mute + # @return [::Google::Cloud::SecurityCenter::V2::Finding::Mute] + # Indicates the mute state of a finding (either muted, unmuted + # or undefined). Unlike other attributes of a finding, a finding provider + # shouldn't set the value of mute. + # @!attribute [r] mute_info + # @return [::Google::Cloud::SecurityCenter::V2::Finding::MuteInfo] + # Output only. The mute information regarding this finding. + # @!attribute [rw] finding_class + # @return [::Google::Cloud::SecurityCenter::V2::Finding::FindingClass] + # The class of the finding. + # @!attribute [rw] indicator + # @return [::Google::Cloud::SecurityCenter::V2::Indicator] + # Represents what's commonly known as an *indicator of compromise* (IoC) in + # computer forensics. This is an artifact observed on a network or in an + # operating system that, with high confidence, indicates a computer + # intrusion. For more information, see [Indicator of + # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). + # @!attribute [rw] vulnerability + # @return [::Google::Cloud::SecurityCenter::V2::Vulnerability] + # Represents vulnerability-specific fields like CVE and CVSS scores. + # CVE stands for Common Vulnerabilities and Exposures + # (https://cve.mitre.org/about/) + # @!attribute [r] mute_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time this finding was muted or unmuted. + # @!attribute [r] external_systems + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V2::ExternalSystem}] + # Output only. Third party SIEM/SOAR fields within SCC, contains external + # system information and external system finding fields. + # @!attribute [rw] mitre_attack + # @return [::Google::Cloud::SecurityCenter::V2::MitreAttack] + # MITRE ATT&CK tactics and techniques related to this finding. + # See: https://attack.mitre.org + # @!attribute [rw] access + # @return [::Google::Cloud::SecurityCenter::V2::Access] + # Access details associated with the finding, such as more information on the + # caller, which method was accessed, and from where. + # @!attribute [rw] connections + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Connection>] + # Contains information about the IP connection associated with the finding. + # @!attribute [rw] mute_initiator + # @return [::String] + # Records additional information about the mute operation, for example, the + # [mute + # configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings) + # that muted the finding and the user who muted the finding. + # @!attribute [rw] processes + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Process>] + # Represents operating system processes associated with the Finding. + # @!attribute [r] contacts + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V2::ContactDetails}] + # Output only. Map containing the points of contact for the given finding. + # The key represents the type of contact, while the value contains a list of + # all the contacts that pertain. Please refer to: + # https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories + # + # { + # "security": { + # "contacts": [ + # { + # "email": "person1@company.com" + # }, + # { + # "email": "person2@company.com" + # } + # ] + # } + # } + # @!attribute [rw] compliances + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Compliance>] + # Contains compliance information for security standards associated to the + # finding. + # @!attribute [r] parent_display_name + # @return [::String] + # Output only. The human readable display name of the finding source such as + # "Event Threat Detection" or "Security Health Analytics". + # @!attribute [rw] description + # @return [::String] + # Contains more details about the finding. + # @!attribute [rw] exfiltration + # @return [::Google::Cloud::SecurityCenter::V2::Exfiltration] + # Represents exfiltrations associated with the finding. + # @!attribute [rw] iam_bindings + # @return [::Array<::Google::Cloud::SecurityCenter::V2::IamBinding>] + # Represents IAM bindings associated with the finding. + # @!attribute [rw] next_steps + # @return [::String] + # Steps to address the finding. + # @!attribute [rw] module_name + # @return [::String] + # Unique identifier of the module which generated the finding. + # Example: + # folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 + # @!attribute [rw] containers + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Container>] + # Containers associated with the finding. This field provides information for + # both Kubernetes and non-Kubernetes containers. + # @!attribute [rw] kubernetes + # @return [::Google::Cloud::SecurityCenter::V2::Kubernetes] + # Kubernetes resources associated with the finding. + # @!attribute [rw] database + # @return [::Google::Cloud::SecurityCenter::V2::Database] + # Database associated with the finding. + # @!attribute [rw] attack_exposure + # @return [::Google::Cloud::SecurityCenter::V2::AttackExposure] + # The results of an attack path simulation relevant to this finding. + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::SecurityCenter::V2::File>] + # File associated with the finding. + # @!attribute [rw] cloud_dlp_inspection + # @return [::Google::Cloud::SecurityCenter::V2::CloudDlpInspection] + # Cloud Data Loss Prevention (Cloud DLP) inspection results that are + # associated with the finding. + # @!attribute [rw] cloud_dlp_data_profile + # @return [::Google::Cloud::SecurityCenter::V2::CloudDlpDataProfile] + # Cloud DLP data profile that is associated with the finding. + # @!attribute [rw] kernel_rootkit + # @return [::Google::Cloud::SecurityCenter::V2::KernelRootkit] + # Signature of the kernel rootkit. + # @!attribute [rw] org_policies + # @return [::Array<::Google::Cloud::SecurityCenter::V2::OrgPolicy>] + # Contains information about the org policies associated with the finding. + # @!attribute [rw] job + # @return [::Google::Cloud::SecurityCenter::V2::Job] + # Job associated with the finding. + # @!attribute [rw] application + # @return [::Google::Cloud::SecurityCenter::V2::Application] + # Represents an application associated with the finding. + # @!attribute [rw] ip_rules + # @return [::Google::Cloud::SecurityCenter::V2::IpRules] + # IP rules associated with the finding. + # @!attribute [rw] backup_disaster_recovery + # @return [::Google::Cloud::SecurityCenter::V2::BackupDisasterRecovery] + # Fields related to Backup and DR findings. + # @!attribute [rw] security_posture + # @return [::Google::Cloud::SecurityCenter::V2::SecurityPosture] + # The security posture associated with the finding. + # @!attribute [rw] log_entries + # @return [::Array<::Google::Cloud::SecurityCenter::V2::LogEntry>] + # Log entries that are relevant to the finding. + # @!attribute [rw] load_balancers + # @return [::Array<::Google::Cloud::SecurityCenter::V2::LoadBalancer>] + # The load balancers associated with the finding. + # @!attribute [rw] cloud_armor + # @return [::Google::Cloud::SecurityCenter::V2::CloudArmor] + # Fields related to Cloud Armor findings. + # @!attribute [rw] notebook + # @return [::Google::Cloud::SecurityCenter::V2::Notebook] + # Notebook associated with the finding. + # @!attribute [rw] toxic_combination + # @return [::Google::Cloud::SecurityCenter::V2::ToxicCombination] + # Contains details about a group of security issues that, when the issues + # occur together, represent a greater risk than when the issues occur + # independently. A group of such issues is referred to as a toxic + # combination. + # This field cannot be updated. Its value is ignored in all update requests. + # @!attribute [rw] group_memberships + # @return [::Array<::Google::Cloud::SecurityCenter::V2::GroupMembership>] + # Contains details about groups of which this finding is a member. A group is + # a collection of findings that are related in some way. + # This field cannot be updated. Its value is ignored in all update requests. + # @!attribute [rw] disk + # @return [::Google::Cloud::SecurityCenter::V2::Disk] + # Disk associated with the finding. + # @!attribute [rw] data_access_events + # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataAccessEvent>] + # Data access events associated with the finding. + # @!attribute [rw] data_flow_events + # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataFlowEvent>] + # Data flow events associated with the finding. + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Network>] + # Represents the VPC networks that the resource is attached to. + # @!attribute [rw] data_retention_deletion_events + # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataRetentionDeletionEvent>] + # Data retention deletion events associated with the finding. + # @!attribute [rw] affected_resources + # @return [::Google::Cloud::SecurityCenter::V2::AffectedResources] + # AffectedResources associated with the finding. + # @!attribute [rw] ai_model + # @return [::Google::Cloud::SecurityCenter::V2::AiModel] + # The AI model associated with the finding. + # @!attribute [rw] chokepoint + # @return [::Google::Cloud::SecurityCenter::V2::Chokepoint] + # Contains details about a chokepoint, which is a resource or resource group + # where high-risk attack paths converge, based on [attack path simulations] + # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). + # This field cannot be updated. Its value is ignored in all update requests. + # @!attribute [rw] vertex_ai + # @return [::Google::Cloud::SecurityCenter::V2::VertexAi] + # VertexAi associated with the finding. + # @!attribute [rw] agent + # @return [::Google::Cloud::SecurityCenter::V2::Agent] + # Primary Agent that the specified finding was flagged for + # @!attribute [rw] agent_sessions + # @return [::Array<::Google::Cloud::SecurityCenter::V2::AgentSession>] + # Conversational session(s) where the finding occurred. + # @!attribute [rw] agent_anomaly + # @return [::Google::Cloud::SecurityCenter::V2::AgentAnomaly] + # Details about behavior anomalies detected in AI agents. + class Finding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mute information about the finding, including whether the finding has a + # static mute or any matching dynamic mute rules. + # @!attribute [rw] static_mute + # @return [::Google::Cloud::SecurityCenter::V2::Finding::MuteInfo::StaticMute] + # If set, the static mute applied to this finding. Static mutes override + # dynamic mutes. If unset, there is no static mute. + # @!attribute [rw] dynamic_mute_records + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Finding::MuteInfo::DynamicMuteRecord>] + # The list of dynamic mute rules that currently match the finding. + class MuteInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about the static mute state. A static mute state overrides + # any dynamic mute rules that apply to this finding. The static mute state + # can be set by a static mute rule or by muting the finding directly. + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V2::Finding::Mute] + # The static mute state. If the value is `MUTED` or `UNMUTED`, then the + # finding's overall mute state will have the same value. + # @!attribute [rw] apply_time + # @return [::Google::Protobuf::Timestamp] + # When the static mute was applied. + class StaticMute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The record of a dynamic mute rule that matches the finding. + # @!attribute [rw] mute_config + # @return [::String] + # The relative resource name of the mute rule, represented by a mute + # config, that created this record, for example + # `organizations/123/muteConfigs/mymuteconfig` or + # `organizations/123/locations/global/muteConfigs/mymuteconfig`. + # @!attribute [rw] match_time + # @return [::Google::Protobuf::Timestamp] + # When the dynamic mute rule first matched the finding. + class DynamicMuteRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class SourcePropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] + class ExternalSystemsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::SecurityCenter::V2::ContactDetails] + class ContactsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of the finding. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # The finding requires attention and has not been addressed yet. + ACTIVE = 1 + + # The finding has been fixed, triaged as a non-issue or otherwise addressed + # and is no longer active. + INACTIVE = 2 + end + + # The severity of the finding. + module Severity + # This value is used for findings when a source doesn't write a severity + # value. + SEVERITY_UNSPECIFIED = 0 + + # Vulnerability: + # A critical vulnerability is easily discoverable by an external actor, + # exploitable, and results in the direct ability to execute arbitrary code, + # exfiltrate data, and otherwise gain additional access and privileges to + # cloud resources and workloads. Examples include publicly accessible + # unprotected user data and public SSH access with weak or no + # passwords. + # + # Threat: + # Indicates a threat that is able to access, modify, or delete data or + # execute unauthorized code within existing resources. + CRITICAL = 1 + + # Vulnerability: + # A high risk vulnerability can be easily discovered and exploited in + # combination with other vulnerabilities in order to gain direct access and + # the ability to execute arbitrary code, exfiltrate data, and otherwise + # gain additional access and privileges to cloud resources and workloads. + # An example is a database with weak or no passwords that is only + # accessible internally. This database could easily be compromised by an + # actor that had access to the internal network. + # + # Threat: + # Indicates a threat that is able to create new computational resources in + # an environment but not able to access data or execute code in existing + # resources. + HIGH = 2 + + # Vulnerability: + # A medium risk vulnerability could be used by an actor to gain access to + # resources or privileges that enable them to eventually (through multiple + # steps or a complex exploit) gain access and the ability to execute + # arbitrary code or exfiltrate data. An example is a service account with + # access to more projects than it should have. If an actor gains access to + # the service account, they could potentially use that access to manipulate + # a project the service account was not intended to. + # + # Threat: + # Indicates a threat that is able to cause operational impact but may not + # access data or execute unauthorized code. + MEDIUM = 3 + + # Vulnerability: + # A low risk vulnerability hampers a security organization's ability to + # detect vulnerabilities or active threats in their deployment, or prevents + # the root cause investigation of security issues. An example is monitoring + # and logs being disabled for resource configurations and access. + # + # Threat: + # Indicates a threat that has obtained minimal access to an environment but + # is not able to access data, execute code, or create resources. + LOW = 4 + end + + # Mute state a finding can be in. + module Mute + # Unspecified. + MUTE_UNSPECIFIED = 0 + + # Finding has been muted. + MUTED = 1 + + # Finding has been unmuted. + UNMUTED = 2 + + # Finding has never been muted/unmuted. + UNDEFINED = 3 + end + + # Represents what kind of Finding it is. + module FindingClass + # Unspecified finding class. + FINDING_CLASS_UNSPECIFIED = 0 + + # Describes unwanted or malicious activity. + THREAT = 1 + + # Describes a potential weakness in software that increases risk to + # Confidentiality & Integrity & Availability. + VULNERABILITY = 2 + + # Describes a potential weakness in cloud resource/asset configuration that + # increases risk. + MISCONFIGURATION = 3 + + # Describes a security observation that is for informational purposes. + OBSERVATION = 4 + + # Describes an error that prevents some SCC functionality. + SCC_ERROR = 5 + + # Describes a potential security risk due to a change in the security + # posture. + POSTURE_VIOLATION = 6 + + # Describes a combination of security issues that represent a more severe + # security problem when taken together. + TOXIC_COMBINATION = 7 + + # Describes a potential security risk to data assets that contain sensitive + # data. + SENSITIVE_DATA_RISK = 8 + + # Describes a resource or resource group where high risk attack paths + # converge, based on attack path simulations (APS). + CHOKEPOINT = 9 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb new file mode 100644 index 000000000000..a56cbebc0318 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Message that contains the resource name and display name of a folder + # resource. + # @!attribute [rw] resource_folder + # @return [::String] + # Full resource name of this folder. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] resource_folder_display_name + # @return [::String] + # The user defined display name for this folder. + class Folder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb new file mode 100644 index 000000000000..4b2f90a8e17c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Contains details about groups of which this finding is a member. A group is a + # collection of findings that are related in some way. + # @!attribute [rw] group_type + # @return [::Google::Cloud::SecurityCenter::V2::GroupMembership::GroupType] + # Type of group. + # @!attribute [rw] group_id + # @return [::String] + # ID of the group. + class GroupMembership + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible types of groups. + module GroupType + # Default value. + GROUP_TYPE_UNSPECIFIED = 0 + + # Group represents a toxic combination. + GROUP_TYPE_TOXIC_COMBINATION = 1 + + # Group represents a chokepoint. + GROUP_TYPE_CHOKEPOINT = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb new file mode 100644 index 000000000000..879809624b27 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Represents a particular IAM binding, which captures a member's role addition, + # removal, or state. + # @!attribute [rw] action + # @return [::Google::Cloud::SecurityCenter::V2::IamBinding::Action] + # The action that was performed on a Binding. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to "members". + # For example, "roles/viewer", "roles/editor", or "roles/owner". + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Cloud Platform resource, for + # example, "foo@google.com". + class IamBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb new file mode 100644 index 000000000000..85acfa00a4c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Represents what's commonly known as an _indicator of compromise_ (IoC) in + # computer forensics. This is an artifact observed on a network or in an + # operating system that, with high confidence, indicates a computer intrusion. + # For more information, see [Indicator of + # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). + # @!attribute [rw] ip_addresses + # @return [::Array<::String>] + # The list of IP addresses that are associated with the finding. + # @!attribute [rw] domains + # @return [::Array<::String>] + # List of domains associated to the Finding. + # @!attribute [rw] signatures + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Indicator::ProcessSignature>] + # The list of matched signatures indicating that the given + # process is present in the environment. + # @!attribute [rw] uris + # @return [::Array<::String>] + # The list of URIs associated to the Findings. + class Indicator + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates what signature matched this process. + # @!attribute [rw] memory_hash_signature + # @return [::Google::Cloud::SecurityCenter::V2::Indicator::ProcessSignature::MemoryHashSignature] + # Signature indicating that a binary family was matched. + # + # Note: The following fields are mutually exclusive: `memory_hash_signature`, `yara_rule_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] yara_rule_signature + # @return [::Google::Cloud::SecurityCenter::V2::Indicator::ProcessSignature::YaraRuleSignature] + # Signature indicating that a YARA rule was matched. + # + # Note: The following fields are mutually exclusive: `yara_rule_signature`, `memory_hash_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] signature_type + # @return [::Google::Cloud::SecurityCenter::V2::Indicator::ProcessSignature::SignatureType] + # Describes the type of resource associated with the signature. + class ProcessSignature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A signature corresponding to memory page hashes. + # @!attribute [rw] binary_family + # @return [::String] + # The binary family. + # @!attribute [rw] detections + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Indicator::ProcessSignature::MemoryHashSignature::Detection>] + # The list of memory hash detections contributing to the binary family + # match. + class MemoryHashSignature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Memory hash detection contributing to the binary family match. + # @!attribute [rw] binary + # @return [::String] + # The name of the binary associated with the memory hash + # signature detection. + # @!attribute [rw] percent_pages_matched + # @return [::Float] + # The percentage of memory page hashes in the signature + # that were matched. + class Detection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A signature corresponding to a YARA rule. + # @!attribute [rw] yara_rule + # @return [::String] + # The name of the YARA rule. + class YaraRuleSignature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible resource types to be associated with a signature. + module SignatureType + # The default signature type. + SIGNATURE_TYPE_UNSPECIFIED = 0 + + # Used for signatures concerning processes. + SIGNATURE_TYPE_PROCESS = 1 + + # Used for signatures concerning disks. + SIGNATURE_TYPE_FILE = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb new file mode 100644 index 000000000000..ce71b3883188 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb @@ -0,0 +1,122 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # IP rules associated with the finding. + # @!attribute [rw] direction + # @return [::Google::Cloud::SecurityCenter::V2::IpRules::Direction] + # The direction that the rule is applicable to, one of ingress or egress. + # @!attribute [rw] allowed + # @return [::Google::Cloud::SecurityCenter::V2::Allowed] + # Tuple with allowed rules. + # + # Note: The following fields are mutually exclusive: `allowed`, `denied`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] denied + # @return [::Google::Cloud::SecurityCenter::V2::Denied] + # Tuple with denied rules. + # + # Note: The following fields are mutually exclusive: `denied`, `allowed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] source_ip_ranges + # @return [::Array<::String>] + # If source IP ranges are specified, the firewall rule applies only to + # traffic that has a source IP address in these ranges. These ranges must be + # expressed in CIDR format. Only supports IPv4. + # @!attribute [rw] destination_ip_ranges + # @return [::Array<::String>] + # If destination IP ranges are specified, the firewall rule applies only to + # traffic that has a destination IP address in these ranges. These ranges + # must be expressed in CIDR format. Only supports IPv4. + # @!attribute [rw] exposed_services + # @return [::Array<::String>] + # Name of the network protocol service, such as FTP, that is exposed by the + # open port. Follows the naming convention available at: + # https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml. + class IpRules + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of direction that the rule is applicable to, one of ingress or + # egress. Not applicable to OPEN_X_PORT findings. + module Direction + # Unspecified direction value. + DIRECTION_UNSPECIFIED = 0 + + # Ingress direction value. + INGRESS = 1 + + # Egress direction value. + EGRESS = 2 + end + end + + # IP rule information. + # @!attribute [rw] protocol + # @return [::String] + # The IP protocol this rule applies to. This value can either be one of the + # following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, + # SCTP) or a string representation of the integer value. + # @!attribute [rw] port_ranges + # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule::PortRange>] + # Optional. An optional list of ports to which this rule applies. This field + # is only applicable for the UDP or (S)TCP protocols. Each entry must be + # either an integer or a range including a min and max port number. + class IpRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A port range which is inclusive of the min and max values. + # Values are between 0 and 2^16-1. The max can be equal / must be not smaller + # than the min value. If min and max are equal this indicates that it is a + # single port. + # @!attribute [rw] min + # @return [::Integer] + # Minimum port value. + # @!attribute [rw] max + # @return [::Integer] + # Maximum port value. + class PortRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Allowed IP rule. + # @!attribute [rw] ip_rules + # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule>] + # Optional. Optional list of allowed IP rules. + class Allowed + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Denied IP rule. + # @!attribute [rw] ip_rules + # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule>] + # Optional. Optional list of denied IP rules. + class Denied + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb new file mode 100644 index 000000000000..e8f38e48dc1b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Describes a job + # @!attribute [rw] name + # @return [::String] + # The fully-qualified name for a job. + # e.g. `projects//jobs/` + # @!attribute [r] state + # @return [::Google::Cloud::SecurityCenter::V2::JobState] + # Output only. State of the job, such as `RUNNING` or `PENDING`. + # @!attribute [rw] error_code + # @return [::Integer] + # Optional. If the job did not complete successfully, this field describes + # why. + # @!attribute [rw] location + # @return [::String] + # Optional. Gives the location where the job ran, such as `US` or + # `europe-west1` + class Job + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # JobState represents the state of the job. + module JobState + # Unspecified represents an unknown state and should not be used. + JOB_STATE_UNSPECIFIED = 0 + + # Job is scheduled and pending for run + PENDING = 1 + + # Job in progress + RUNNING = 2 + + # Job has completed with success + SUCCEEDED = 3 + + # Job has completed but with failure + FAILED = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb new file mode 100644 index 000000000000..0e324f832355 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Kernel mode rootkit signatures. + # @!attribute [rw] name + # @return [::String] + # Rootkit name, when available. + # @!attribute [rw] unexpected_code_modification + # @return [::Boolean] + # True if unexpected modifications of kernel code memory are present. + # @!attribute [rw] unexpected_read_only_data_modification + # @return [::Boolean] + # True if unexpected modifications of kernel read-only data memory are + # present. + # @!attribute [rw] unexpected_ftrace_handler + # @return [::Boolean] + # True if `ftrace` points are present with callbacks pointing to regions + # that are not in the expected kernel or module code range. + # @!attribute [rw] unexpected_kprobe_handler + # @return [::Boolean] + # True if `kprobe` points are present with callbacks pointing to regions + # that are not in the expected kernel or module code range. + # @!attribute [rw] unexpected_kernel_code_pages + # @return [::Boolean] + # True if kernel code pages that are not in the expected kernel or module + # code regions are present. + # @!attribute [rw] unexpected_system_call_handler + # @return [::Boolean] + # True if system call handlers that are are not in the expected kernel or + # module code regions are present. + # @!attribute [rw] unexpected_interrupt_handler + # @return [::Boolean] + # True if interrupt handlers that are are not in the expected kernel or + # module code regions are present. + # @!attribute [rw] unexpected_processes_in_runqueue + # @return [::Boolean] + # True if unexpected processes in the scheduler run queue are present. Such + # processes are in the run queue, but not in the process task list. + class KernelRootkit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb new file mode 100644 index 000000000000..444ecd5eec70 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb @@ -0,0 +1,241 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Kubernetes-related attributes. + # @!attribute [rw] pods + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Pod>] + # Kubernetes + # [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) + # associated with the finding. This field contains Pod records for each + # container that is owned by a Pod. + # @!attribute [rw] nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Node>] + # Provides Kubernetes + # [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) + # information. + # @!attribute [rw] node_pools + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::NodePool>] + # GKE [node + # pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) + # associated with the finding. This field contains node pool information for + # each node, when it is available. + # @!attribute [rw] roles + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Role>] + # Provides Kubernetes role information for findings that involve [Roles or + # ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). + # @!attribute [rw] bindings + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Binding>] + # Provides Kubernetes role binding information for findings that involve + # [RoleBindings or + # ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). + # @!attribute [rw] access_reviews + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::AccessReview>] + # Provides information on any Kubernetes access reviews (privilege checks) + # relevant to the finding. + # @!attribute [rw] objects + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Object>] + # Kubernetes objects related to the finding. + class Kubernetes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A Kubernetes Pod. + # @!attribute [rw] ns + # @return [::String] + # Kubernetes Pod namespace. + # @!attribute [rw] name + # @return [::String] + # Kubernetes Pod name. + # @!attribute [rw] labels + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Label>] + # Pod labels. For Kubernetes containers, these are applied to the + # container. + # @!attribute [rw] containers + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Container>] + # Pod containers associated with this finding, if any. + class Pod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Kubernetes nodes associated with the finding. + # @!attribute [rw] name + # @return [::String] + # [Full resource name](https://google.aip.dev/122#full-resource-names) of + # the Compute Engine VM running the cluster node. + class Node + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides GKE node pool information. + # @!attribute [rw] name + # @return [::String] + # Kubernetes node pool name. + # @!attribute [rw] nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Node>] + # Nodes associated with the finding. + class NodePool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Kubernetes Role or ClusterRole. + # @!attribute [rw] kind + # @return [::Google::Cloud::SecurityCenter::V2::Kubernetes::Role::Kind] + # Role type. + # @!attribute [rw] ns + # @return [::String] + # Role namespace. + # @!attribute [rw] name + # @return [::String] + # Role name. + class Role + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of Kubernetes roles. + module Kind + # Role type is not specified. + KIND_UNSPECIFIED = 0 + + # Kubernetes Role. + ROLE = 1 + + # Kubernetes ClusterRole. + CLUSTER_ROLE = 2 + end + end + + # Represents a Kubernetes RoleBinding or ClusterRoleBinding. + # @!attribute [rw] ns + # @return [::String] + # Namespace for the binding. + # @!attribute [rw] name + # @return [::String] + # Name for the binding. + # @!attribute [rw] role + # @return [::Google::Cloud::SecurityCenter::V2::Kubernetes::Role] + # The Role or ClusterRole referenced by the binding. + # @!attribute [rw] subjects + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Subject>] + # Represents one or more subjects that are bound to the role. Not always + # available for PATCH requests. + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a Kubernetes subject. + # @!attribute [rw] kind + # @return [::Google::Cloud::SecurityCenter::V2::Kubernetes::Subject::AuthType] + # Authentication type for the subject. + # @!attribute [rw] ns + # @return [::String] + # Namespace for the subject. + # @!attribute [rw] name + # @return [::String] + # Name for the subject. + class Subject + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Auth types that can be used for the subject's kind field. + module AuthType + # Authentication is not specified. + AUTH_TYPE_UNSPECIFIED = 0 + + # User with valid certificate. + USER = 1 + + # Users managed by Kubernetes API with credentials stored as secrets. + SERVICEACCOUNT = 2 + + # Collection of users. + GROUP = 3 + end + end + + # Conveys information about a Kubernetes access review (such as one returned + # by a [`kubectl auth + # can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) + # command) that was involved in a finding. + # @!attribute [rw] group + # @return [::String] + # The API group of the resource. "*" means all. + # @!attribute [rw] ns + # @return [::String] + # Namespace of the action being requested. Currently, there is no + # distinction between no namespace and all namespaces. Both + # are represented by "" (empty). + # @!attribute [rw] name + # @return [::String] + # The name of the resource being requested. Empty means all. + # @!attribute [rw] resource + # @return [::String] + # The optional resource type requested. "*" means all. + # @!attribute [rw] subresource + # @return [::String] + # The optional subresource type. + # @!attribute [rw] verb + # @return [::String] + # A Kubernetes resource API verb, like get, list, watch, create, update, + # delete, proxy. "*" means all. + # @!attribute [rw] version + # @return [::String] + # The API version of the resource. "*" means all. + class AccessReview + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Kubernetes object related to the finding, uniquely identified by GKNN. + # Used if the object Kind is not one of Pod, Node, NodePool, Binding, or + # AccessReview. + # @!attribute [rw] group + # @return [::String] + # Kubernetes object group, such as "policy.k8s.io/v1". + # @!attribute [rw] kind + # @return [::String] + # Kubernetes object kind, such as "Namespace". + # @!attribute [rw] ns + # @return [::String] + # Kubernetes object namespace. Must be a valid DNS label. Named + # "ns" to avoid collision with C++ namespace keyword. For details see + # https://kubernetes.io/docs/tasks/administer-cluster/namespaces/. + # @!attribute [rw] name + # @return [::String] + # Kubernetes object name. For details see + # https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. + # @!attribute [rw] containers + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Container>] + # Pod containers associated with this finding, if any. + class Object + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb new file mode 100644 index 000000000000..609c1859cbe1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Represents a generic name-value label. A label has separate name and value + # fields to support filtering with the `contains()` function. For more + # information, see [Filtering on array-type + # fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering). + # @!attribute [rw] name + # @return [::String] + # Name of the label. + # @!attribute [rw] value + # @return [::String] + # Value that corresponds to the label's name. + class Label + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb new file mode 100644 index 000000000000..a9d466c92655 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Contains information related to the load balancer associated with the + # finding. + # @!attribute [rw] name + # @return [::String] + # The name of the load balancer associated with the finding. + class LoadBalancer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb new file mode 100644 index 000000000000..f3ea1bf4b29d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # An individual entry in a log. + # @!attribute [rw] cloud_logging_entry + # @return [::Google::Cloud::SecurityCenter::V2::CloudLoggingEntry] + # An individual entry in a log stored in Cloud Logging. + class LogEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata taken from a [Cloud Logging + # LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) + # @!attribute [rw] insert_id + # @return [::String] + # A unique identifier for the log entry. + # @!attribute [rw] log_id + # @return [::String] + # The type of the log (part of `log_name`. `log_name` is the resource name of + # the log to which this log entry belongs). For example: + # `cloudresourcemanager.googleapis.com/activity` Note that this field is not + # URL-encoded, unlike in `LogEntry`. + # @!attribute [rw] resource_container + # @return [::String] + # The organization, folder, or project of the monitored resource that + # produced this log entry. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # The time the event described by the log entry occurred. + class CloudLoggingEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb new file mode 100644 index 000000000000..a1f6f5b169c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb @@ -0,0 +1,521 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # MITRE ATT&CK tactics and techniques related to this finding. + # See: https://attack.mitre.org + # @!attribute [rw] primary_tactic + # @return [::Google::Cloud::SecurityCenter::V2::MitreAttack::Tactic] + # The MITRE ATT&CK tactic most closely represented by this finding, if any. + # @!attribute [rw] primary_techniques + # @return [::Array<::Google::Cloud::SecurityCenter::V2::MitreAttack::Technique>] + # The MITRE ATT&CK technique most closely represented by this finding, if + # any. primary_techniques is a repeated field because there are multiple + # levels of MITRE ATT&CK techniques. If the technique most closely + # represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), + # both the sub-technique and its parent technique(s) will be listed (e.g. + # `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). + # @!attribute [rw] additional_tactics + # @return [::Array<::Google::Cloud::SecurityCenter::V2::MitreAttack::Tactic>] + # Additional MITRE ATT&CK tactics related to this finding, if any. + # @!attribute [rw] additional_techniques + # @return [::Array<::Google::Cloud::SecurityCenter::V2::MitreAttack::Technique>] + # Additional MITRE ATT&CK techniques related to this finding, if any, along + # with any of their respective parent techniques. + # @!attribute [rw] version + # @return [::String] + # The MITRE ATT&CK version referenced by the above fields. E.g. "8". + class MitreAttack + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # MITRE ATT&CK tactics that can be referenced by SCC findings. + # See: https://attack.mitre.org/tactics/enterprise/ + module Tactic + # Unspecified value. + TACTIC_UNSPECIFIED = 0 + + # TA0043 + RECONNAISSANCE = 1 + + # TA0042 + RESOURCE_DEVELOPMENT = 2 + + # TA0001 + INITIAL_ACCESS = 5 + + # TA0002 + EXECUTION = 3 + + # TA0003 + PERSISTENCE = 6 + + # TA0004 + PRIVILEGE_ESCALATION = 8 + + # TA0005 + DEFENSE_EVASION = 7 + + # TA0006 + CREDENTIAL_ACCESS = 9 + + # TA0007 + DISCOVERY = 10 + + # TA0008 + LATERAL_MOVEMENT = 11 + + # TA0009 + COLLECTION = 12 + + # TA0011 + COMMAND_AND_CONTROL = 4 + + # TA0010 + EXFILTRATION = 13 + + # TA0040 + IMPACT = 14 + end + + # MITRE ATT&CK techniques that can be referenced by Security Command Center + # findings. See: https://attack.mitre.org/techniques/enterprise/ + module Technique + # Unspecified value. + TECHNIQUE_UNSPECIFIED = 0 + + # T1001 + DATA_OBFUSCATION = 70 + + # T1001.002 + DATA_OBFUSCATION_STEGANOGRAPHY = 71 + + # T1003 + OS_CREDENTIAL_DUMPING = 114 + + # T1003.007 + OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM = 115 + + # T1003.008 + OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW = 122 + + # T1005 + DATA_FROM_LOCAL_SYSTEM = 117 + + # T1020 + AUTOMATED_EXFILTRATION = 68 + + # T1027 + OBFUSCATED_FILES_OR_INFO = 72 + + # T1027.003 + STEGANOGRAPHY = 73 + + # T1027.004 + COMPILE_AFTER_DELIVERY = 74 + + # T1027.010 + COMMAND_OBFUSCATION = 75 + + # T1029 + SCHEDULED_TRANSFER = 120 + + # T1033 + SYSTEM_OWNER_USER_DISCOVERY = 118 + + # T1036 + MASQUERADING = 49 + + # T1036.005 + MATCH_LEGITIMATE_NAME_OR_LOCATION = 50 + + # T1037 + BOOT_OR_LOGON_INITIALIZATION_SCRIPTS = 37 + + # T1037.005 + STARTUP_ITEMS = 38 + + # T1046 + NETWORK_SERVICE_DISCOVERY = 32 + + # T1053 + SCHEDULED_TASK_JOB = 89 + + # T1053.003 + SCHEDULED_TASK_JOB_CRON = 119 + + # T1053.007 + CONTAINER_ORCHESTRATION_JOB = 90 + + # T1055 + PROCESS_INJECTION = 93 + + # T1056 + INPUT_CAPTURE = 103 + + # T1056.001 + INPUT_CAPTURE_KEYLOGGING = 104 + + # T1057 + PROCESS_DISCOVERY = 56 + + # T1059 + COMMAND_AND_SCRIPTING_INTERPRETER = 6 + + # T1059.004 + UNIX_SHELL = 7 + + # T1059.006 + PYTHON = 59 + + # T1068 + EXPLOITATION_FOR_PRIVILEGE_ESCALATION = 63 + + # T1069 + PERMISSION_GROUPS_DISCOVERY = 18 + + # T1069.003 + CLOUD_GROUPS = 19 + + # T1070 + INDICATOR_REMOVAL = 123 + + # T1070.002 + INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS = 124 + + # T1070.003 + INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY = 125 + + # T1070.004 + INDICATOR_REMOVAL_FILE_DELETION = 64 + + # T1070.006 + INDICATOR_REMOVAL_TIMESTOMP = 128 + + # T1070.008 + INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA = 126 + + # T1071 + APPLICATION_LAYER_PROTOCOL = 45 + + # T1071.004 + DNS = 46 + + # T1072 + SOFTWARE_DEPLOYMENT_TOOLS = 47 + + # T1078 + VALID_ACCOUNTS = 14 + + # T1078.001 + DEFAULT_ACCOUNTS = 35 + + # T1078.003 + LOCAL_ACCOUNTS = 15 + + # T1078.004 + CLOUD_ACCOUNTS = 16 + + # T1083 + FILE_AND_DIRECTORY_DISCOVERY = 121 + + # T1087.001 + ACCOUNT_DISCOVERY_LOCAL_ACCOUNT = 116 + + # T1090 + PROXY = 9 + + # T1090.002 + EXTERNAL_PROXY = 10 + + # T1090.003 + MULTI_HOP_PROXY = 11 + + # T1098 + ACCOUNT_MANIPULATION = 22 + + # T1098.001 + ADDITIONAL_CLOUD_CREDENTIALS = 40 + + # T1098.003 + ADDITIONAL_CLOUD_ROLES = 67 + + # T1098.004 + SSH_AUTHORIZED_KEYS = 23 + + # T1098.006 + ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58 + + # T1104 + MULTI_STAGE_CHANNELS = 76 + + # T1105 + INGRESS_TOOL_TRANSFER = 3 + + # T1106 + NATIVE_API = 4 + + # T1110 + BRUTE_FORCE = 44 + + # T1119 + AUTOMATED_COLLECTION = 94 + + # T1129 + SHARED_MODULES = 5 + + # T1132 + DATA_ENCODING = 77 + + # T1132.001 + STANDARD_ENCODING = 78 + + # T1134 + ACCESS_TOKEN_MANIPULATION = 33 + + # T1134.001 + TOKEN_IMPERSONATION_OR_THEFT = 39 + + # T1136 + CREATE_ACCOUNT = 79 + + # T1136.001 + LOCAL_ACCOUNT = 80 + + # T1140 + DEOBFUSCATE_DECODE_FILES_OR_INFO = 95 + + # T1190 + EXPLOIT_PUBLIC_FACING_APPLICATION = 27 + + # T1195 + SUPPLY_CHAIN_COMPROMISE = 129 + + # T1195.001 + COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS = 130 + + # T1203 + EXPLOITATION_FOR_CLIENT_EXECUTION = 134 + + # T1204 + USER_EXECUTION = 69 + + # T1222.002 + LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION = 135 + + # T1484 + DOMAIN_POLICY_MODIFICATION = 30 + + # T1485 + DATA_DESTRUCTION = 29 + + # T1486 + DATA_ENCRYPTED_FOR_IMPACT = 132 + + # T1489 + SERVICE_STOP = 52 + + # T1490 + INHIBIT_SYSTEM_RECOVERY = 36 + + # T1495 + FIRMWARE_CORRUPTION = 81 + + # T1496 + RESOURCE_HIJACKING = 8 + + # T1498 + NETWORK_DENIAL_OF_SERVICE = 17 + + # T1526 + CLOUD_SERVICE_DISCOVERY = 48 + + # T1528 + STEAL_APPLICATION_ACCESS_TOKEN = 42 + + # T1531 + ACCOUNT_ACCESS_REMOVAL = 51 + + # T1537 + TRANSFER_DATA_TO_CLOUD_ACCOUNT = 91 + + # T1539 + STEAL_WEB_SESSION_COOKIE = 25 + + # T1543 + CREATE_OR_MODIFY_SYSTEM_PROCESS = 24 + + # T1546 + EVENT_TRIGGERED_EXECUTION = 65 + + # T1547 + BOOT_OR_LOGON_AUTOSTART_EXECUTION = 82 + + # T1547.006 + KERNEL_MODULES_AND_EXTENSIONS = 83 + + # T1547.009 + SHORTCUT_MODIFICATION = 127 + + # T1548 + ABUSE_ELEVATION_CONTROL_MECHANISM = 34 + + # T1548.001 + ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID = 136 + + # T1548.003 + ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING = 109 + + # T1552 + UNSECURED_CREDENTIALS = 13 + + # T1552.001 + CREDENTIALS_IN_FILES = 105 + + # T1552.003 + BASH_HISTORY = 96 + + # T1552.004 + PRIVATE_KEYS = 97 + + # T1553 + SUBVERT_TRUST_CONTROL = 106 + + # T1553.004 + INSTALL_ROOT_CERTIFICATE = 107 + + # T1554 + COMPROMISE_HOST_SOFTWARE_BINARY = 84 + + # T1555 + CREDENTIALS_FROM_PASSWORD_STORES = 98 + + # T1556 + MODIFY_AUTHENTICATION_PROCESS = 28 + + # T1556.003 + PLUGGABLE_AUTHENTICATION_MODULES = 108 + + # T1556.006 + MULTI_FACTOR_AUTHENTICATION = 137 + + # T1562 + IMPAIR_DEFENSES = 31 + + # T1562.001 + DISABLE_OR_MODIFY_TOOLS = 55 + + # T1562.006 + INDICATOR_BLOCKING = 110 + + # T1562.012 + DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM = 111 + + # T1564 + HIDE_ARTIFACTS = 85 + + # T1564.001 + HIDDEN_FILES_AND_DIRECTORIES = 86 + + # T1564.002 + HIDDEN_USERS = 87 + + # T1567 + EXFILTRATION_OVER_WEB_SERVICE = 20 + + # T1567.002 + EXFILTRATION_TO_CLOUD_STORAGE = 21 + + # T1568 + DYNAMIC_RESOLUTION = 12 + + # T1570 + LATERAL_TOOL_TRANSFER = 41 + + # T1574 + HIJACK_EXECUTION_FLOW = 112 + + # T1574.006 + HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING = 113 + + # T1578 + MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26 + + # T1578.001 + CREATE_SNAPSHOT = 54 + + # T1580 + CLOUD_INFRASTRUCTURE_DISCOVERY = 53 + + # T1587 + DEVELOP_CAPABILITIES = 99 + + # T1587.001 + DEVELOP_CAPABILITIES_MALWARE = 100 + + # T1588 + OBTAIN_CAPABILITIES = 43 + + # T1588.001 + OBTAIN_CAPABILITIES_MALWARE = 101 + + # T1588.006 + OBTAIN_CAPABILITIES_VULNERABILITIES = 133 + + # T1595 + ACTIVE_SCANNING = 1 + + # T1595.001 + SCANNING_IP_BLOCKS = 2 + + # T1608 + STAGE_CAPABILITIES = 88 + + # T1608.001 + UPLOAD_MALWARE = 102 + + # T1609 + CONTAINER_ADMINISTRATION_COMMAND = 60 + + # T1610 + DEPLOY_CONTAINER = 66 + + # T1611 + ESCAPE_TO_HOST = 61 + + # T1613 + CONTAINER_AND_RESOURCE_DISCOVERY = 57 + + # T1620 + REFLECTIVE_CODE_LOADING = 92 + + # T1649 + STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62 + + # T1657 + FINANCIAL_THEFT = 131 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb new file mode 100644 index 000000000000..db9977d397e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # A mute config is a Cloud SCC resource that contains the configuration + # to mute create/update events of findings. + # @!attribute [rw] name + # @return [::String] + # Identifier. This field will be ignored if provided on config creation. The + # following list shows some examples of the format: + # + # + `organizations/{organization}/muteConfigs/{mute_config}` + # + + # `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` + # + `folders/{folder}/muteConfigs/{mute_config}` + # + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + # + `projects/{project}/muteConfigs/{mute_config}` + # + `projects/{project}/locations/{location}/muteConfigs/{mute_config}` + # @!attribute [rw] description + # @return [::String] + # A description of the mute config. + # @!attribute [rw] filter + # @return [::String] + # Required. An expression that defines the filter to apply across + # create/update events of findings. While creating a filter string, be + # mindful of the scope in which the mute configuration is being created. + # E.g., If a filter contains project = X but is created under the project = Y + # scope, it might not match any findings. + # + # The following field and operator combinations are supported: + # + # * severity: `=`, `:` + # * category: `=`, `:` + # * resource.name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * finding_class: `=`, `:` + # * indicator.ip_addresses: `=`, `:` + # * indicator.domains: `=`, `:` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the mute config was created. + # This field is set by the server and will be ignored if provided on config + # creation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time at which the mute config was updated. + # This field is set by the server and will be ignored if provided on config + # creation or update. + # @!attribute [r] most_recent_editor + # @return [::String] + # Output only. Email address of the user who last edited the mute config. + # This field is set by the server and will be ignored if provided on config + # creation or update. + # @!attribute [rw] type + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig::MuteConfigType] + # Required. The type of the mute config, which determines what type of mute + # state the config affects. Immutable after creation. + # @!attribute [rw] expiry_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The expiry of the mute config. Only applicable for dynamic + # configs. If the expiry is set, when the config expires, it is removed from + # all findings. + class MuteConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of MuteConfig. + module MuteConfigType + # Unused. + MUTE_CONFIG_TYPE_UNSPECIFIED = 0 + + # A static mute config, which sets the static mute state of future matching + # findings to muted. Once the static mute state has been set, finding or + # config modifications will not affect the state. + STATIC = 1 + + # A dynamic mute config, which is applied to existing and future matching + # findings, setting their dynamic mute state to "muted". If the config is + # updated or deleted, or a matching finding is updated, such that the + # finding doesn't match the config, the config will be removed from the + # finding, and the finding's dynamic mute state may become "unmuted" + # (unless other configs still match). + DYNAMIC = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb new file mode 100644 index 000000000000..7fb133f55dc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Contains information about a VPC network associated with the finding. + # @!attribute [rw] name + # @return [::String] + # The name of the VPC network resource, for example, + # `//compute.googleapis.com/projects/my-project/global/networks/my-network`. + class Network + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb new file mode 100644 index 000000000000..0d1e37a099ef --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise + # notebook](https://cloud.google.com/colab/docs/introduction) file, that is + # associated with a finding. + # @!attribute [rw] name + # @return [::String] + # The name of the notebook. + # @!attribute [rw] service + # @return [::String] + # The source notebook service, for example, "Colab Enterprise". + # @!attribute [rw] last_author + # @return [::String] + # The user ID of the latest author to modify the notebook. + # @!attribute [rw] notebook_update_time + # @return [::Google::Protobuf::Timestamp] + # The most recent time the notebook was updated. + class Notebook + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb new file mode 100644 index 000000000000..b5de722177ff --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Cloud Security Command Center (Cloud SCC) notification configs. + # + # A notification config is a Cloud SCC resource that contains the configuration + # to send notifications for create/update events of findings, assets and etc. + # @!attribute [rw] name + # @return [::String] + # Identifier. The relative resource name of this notification config. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # The following list shows some examples: + # + + # `organizations/{organization_id}/locations/{location_id}/notificationConfigs/notify_public_bucket` + # + + # `folders/{folder_id}/locations/{location_id}/notificationConfigs/notify_public_bucket` + # + + # `projects/{project_id}/locations/{location_id}/notificationConfigs/notify_public_bucket` + # @!attribute [rw] description + # @return [::String] + # The description of the notification config (max of 1024 characters). + # @!attribute [rw] pubsub_topic + # @return [::String] + # The Pub/Sub topic to send notifications to. Its format is + # "projects/[project_id]/topics/[topic]". + # @!attribute [r] service_account + # @return [::String] + # Output only. The service account that needs "pubsub.topics.publish" + # permission to publish to the Pub/Sub topic. + # @!attribute [rw] streaming_config + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig::StreamingConfig] + # The config for triggering streaming-based notifications. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the notification config was last + # updated. + class NotificationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The config for streaming-based notifications, which send each event as soon + # as it is detected. + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across create/update events + # of assets or findings as specified by the event type. The expression is a + # list of zero or more restrictions combined via logical operators `AND` + # and `OR`. Parentheses are supported, and `OR` has higher precedence than + # `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + class StreamingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb new file mode 100644 index 000000000000..bd3046afd7de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Cloud SCC's Notification + # @!attribute [rw] notification_config_name + # @return [::String] + # Name of the notification config that generated current notification. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # If it's a Finding based notification config, this field will be + # populated. + # @!attribute [rw] resource + # @return [::Google::Cloud::SecurityCenter::V2::Resource] + # The Cloud resource tied to this notification's Finding. + class NotificationMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb new file mode 100644 index 000000000000..b90cb7b8d034 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Contains information about the org policies associated with the finding. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the org policy. + # Example: + # "organizations/\\{organization_id}/policies/\\{constraint_name}" + class OrgPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb new file mode 100644 index 000000000000..e127710a40a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Represents an operating system process. + # @!attribute [rw] name + # @return [::String] + # The process name, as displayed in utilities like `top` and `ps`. This name + # can be accessed through `/proc/[pid]/comm` and changed with + # `prctl(PR_SET_NAME)`. + # @!attribute [rw] binary + # @return [::Google::Cloud::SecurityCenter::V2::File] + # File information for the process executable. + # @!attribute [rw] libraries + # @return [::Array<::Google::Cloud::SecurityCenter::V2::File>] + # File information for libraries loaded by the process. + # @!attribute [rw] script + # @return [::Google::Cloud::SecurityCenter::V2::File] + # When the process represents the invocation of a script, `binary` provides + # information about the interpreter, while `script` provides information + # about the script file provided to the interpreter. + # @!attribute [rw] args + # @return [::Array<::String>] + # Process arguments as JSON encoded strings. + # @!attribute [rw] arguments_truncated + # @return [::Boolean] + # True if `args` is incomplete. + # @!attribute [rw] env_variables + # @return [::Array<::Google::Cloud::SecurityCenter::V2::EnvironmentVariable>] + # Process environment variables. + # @!attribute [rw] env_variables_truncated + # @return [::Boolean] + # True if `env_variables` is incomplete. + # @!attribute [rw] pid + # @return [::Integer] + # The process ID. + # @!attribute [rw] parent_pid + # @return [::Integer] + # The parent process ID. + # @!attribute [rw] user_id + # @return [::Integer] + # The ID of the user that executed the process. E.g. If this is the root user + # this will always be 0. + class Process + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A name-value pair representing an environment variable used in an operating + # system process. + # @!attribute [rw] name + # @return [::String] + # Environment variable name as a JSON encoded string. + # @!attribute [rw] val + # @return [::String] + # Environment variable value as a JSON encoded string. + class EnvironmentVariable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb new file mode 100644 index 000000000000..aaa75073c739 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb @@ -0,0 +1,314 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Information related to the Google Cloud resource. + # @!attribute [rw] name + # @return [::String] + # The full resource name of the resource. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] display_name + # @return [::String] + # The human readable name of the resource. + # @!attribute [rw] type + # @return [::String] + # The full resource type of the resource. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] + # Indicates which cloud provider the finding is from. + # @!attribute [rw] service + # @return [::String] + # The service or resource provider associated with the resource. + # @!attribute [rw] location + # @return [::String] + # The region or location of the service (if applicable). + # @!attribute [rw] gcp_metadata + # @return [::Google::Cloud::SecurityCenter::V2::GcpMetadata] + # The GCP metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `gcp_metadata`, `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] aws_metadata + # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata] + # The AWS metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `aws_metadata`, `gcp_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] azure_metadata + # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata] + # The Azure metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `azure_metadata`, `gcp_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resource_path + # @return [::Google::Cloud::SecurityCenter::V2::ResourcePath] + # Provides the path to the resource within the resource hierarchy. + # @!attribute [rw] resource_path_string + # @return [::String] + # A string representation of the resource path. + # For Google Cloud, it has the format of + # `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` + # where there can be any number of folders. + # For AWS, it has the format of + # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` + # where there can be any number of organizational units. + # For Azure, it has the format of + # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` + # where there can be any number of management groups. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Google Cloud metadata associated with the resource. Only applicable if the + # finding's cloud provider is Google Cloud. + # @!attribute [rw] project + # @return [::String] + # The full resource name of project that the resource belongs to. + # @!attribute [rw] project_display_name + # @return [::String] + # The project ID that the resource belongs to. + # @!attribute [rw] parent + # @return [::String] + # The full resource name of resource's parent. + # @!attribute [rw] parent_display_name + # @return [::String] + # The human readable name of resource's parent. + # @!attribute [r] folders + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Folder>] + # Output only. Contains a Folder message for each folder in the assets + # ancestry. The first folder is the deepest nested folder, and the last + # folder is the folder directly under the Organization. + # @!attribute [rw] organization + # @return [::String] + # The name of the organization that the resource belongs to. + class GcpMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AWS metadata associated with the resource, only applicable if the finding's + # cloud provider is Amazon Web Services. + # @!attribute [rw] organization + # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata::AwsOrganization] + # The AWS organization associated with the resource. + # @!attribute [rw] organizational_units + # @return [::Array<::Google::Cloud::SecurityCenter::V2::AwsMetadata::AwsOrganizationalUnit>] + # A list of AWS organizational units associated with the resource, ordered + # from lowest level (closest to the account) to highest level. + # @!attribute [rw] account + # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata::AwsAccount] + # The AWS account associated with the resource. + class AwsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An organization is a collection of accounts that are centrally managed + # together using consolidated billing, organized hierarchically with + # organizational units (OUs), and controlled with policies. + # @!attribute [rw] id + # @return [::String] + # The unique identifier (ID) for the organization. The regex pattern for an + # organization ID string requires "o-" followed by from 10 to 32 lowercase + # letters or digits. + class AwsOrganization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An Organizational Unit (OU) is a container of AWS accounts within a root of + # an organization. Policies that are attached to an OU apply to all accounts + # contained in that OU and in any child OUs. + # @!attribute [rw] id + # @return [::String] + # The unique identifier (ID) associated with this OU. The regex pattern for + # an organizational unit ID string requires "ou-" followed by from 4 to 32 + # lowercase letters or digits (the ID of the root that contains the OU). + # This string is followed by a second "-" dash and from 8 to 32 additional + # lowercase letters or digits. For example, "ou-ab12-cd34ef56". + # @!attribute [rw] name + # @return [::String] + # The friendly name of the OU. + class AwsOrganizationalUnit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An AWS account that is a member of an organization. + # @!attribute [rw] id + # @return [::String] + # The unique identifier (ID) of the account, containing exactly 12 digits. + # @!attribute [rw] name + # @return [::String] + # The friendly name of this account. + class AwsAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Azure metadata associated with the resource, only applicable if the finding's + # cloud provider is Microsoft Azure. + # @!attribute [rw] management_groups + # @return [::Array<::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureManagementGroup>] + # A list of Azure management groups associated with the resource, ordered + # from lowest level (closest to the subscription) to highest level. + # @!attribute [rw] subscription + # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureSubscription] + # The Azure subscription associated with the resource. + # @!attribute [rw] resource_group + # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureResourceGroup] + # The Azure resource group associated with the resource. + # @!attribute [rw] tenant + # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureTenant] + # The Azure Entra tenant associated with the resource. + class AzureMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents an Azure management group. + # @!attribute [rw] id + # @return [::String] + # The UUID of the Azure management group, for example, + # `20000000-0001-0000-0000-000000000000`. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the Azure management group. + class AzureManagementGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an Azure subscription. + # @!attribute [rw] id + # @return [::String] + # The UUID of the Azure subscription, for example, + # `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the Azure subscription. + class AzureSubscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an Azure resource group. + # @!attribute [rw] id + # @return [::String] + # The ID of the Azure resource group. + # @!attribute [rw] name + # @return [::String] + # The name of the Azure resource group. This is not a UUID. + class AzureResourceGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a Microsoft Entra tenant. + # @!attribute [rw] id + # @return [::String] + # The ID of the Microsoft Entra tenant, for example, + # "a11aaa11-aa11-1aa1-11aa-1aaa11a". + # @!attribute [rw] display_name + # @return [::String] + # The display name of the Azure tenant. + class AzureTenant + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents the path of resources leading up to the resource this finding is + # about. + # @!attribute [rw] nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V2::ResourcePath::ResourcePathNode>] + # The list of nodes that make the up resource path, ordered from lowest + # level to highest level. + class ResourcePath + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A node within the resource path. Each node represents a resource within the + # resource hierarchy. + # @!attribute [rw] node_type + # @return [::Google::Cloud::SecurityCenter::V2::ResourcePath::ResourcePathNodeType] + # The type of resource this node represents. + # @!attribute [rw] id + # @return [::String] + # The ID of the resource this node represents. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the resource this node represents. + class ResourcePathNode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of resource the node represents. + module ResourcePathNodeType + # Node type is unspecified. + RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0 + + # The node represents a Google Cloud organization. + GCP_ORGANIZATION = 1 + + # The node represents a Google Cloud folder. + GCP_FOLDER = 2 + + # The node represents a Google Cloud project. + GCP_PROJECT = 3 + + # The node represents an AWS organization. + AWS_ORGANIZATION = 4 + + # The node represents an AWS organizational unit. + AWS_ORGANIZATIONAL_UNIT = 5 + + # The node represents an AWS account. + AWS_ACCOUNT = 6 + + # The node represents an Azure management group. + AZURE_MANAGEMENT_GROUP = 7 + + # The node represents an Azure subscription. + AZURE_SUBSCRIPTION = 8 + + # The node represents an Azure resource group. + AZURE_RESOURCE_GROUP = 9 + end + end + + # The cloud provider the finding pertains to. + module CloudProvider + # The cloud provider is unspecified. + CLOUD_PROVIDER_UNSPECIFIED = 0 + + # The cloud provider is Google Cloud. + GOOGLE_CLOUD_PLATFORM = 1 + + # The cloud provider is Amazon Web Services. + AMAZON_WEB_SERVICES = 2 + + # The cloud provider is Microsoft Azure. + MICROSOFT_AZURE = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb new file mode 100644 index 000000000000..450e83f704b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # A resource value configuration (RVC) is a mapping configuration of user's + # resources to resource values. Used in Attack path simulations. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name for the resource value configuration + # @!attribute [rw] resource_value + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValue] + # Resource value level this expression represents + # Only required when there is no Sensitive Data Protection mapping in the + # request + # @!attribute [rw] tag_values + # @return [::Array<::String>] + # Tag values combined with `AND` to check against. + # For Google Cloud resources, they are tag value IDs in the form of + # "tagValues/123". Example: `[ "tagValues/123", "tagValues/456", + # "tagValues/789" ]` + # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing + # @!attribute [rw] resource_type + # @return [::String] + # Apply resource_value only to resources that match resource_type. + # resource_type will be checked with `AND` of other resources. + # For example, "storage.googleapis.com/Bucket" with resource_value "HIGH" + # will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. + # @!attribute [rw] scope + # @return [::String] + # Project or folder to scope this configuration to. + # For example, "project/456" would apply this configuration only to resources + # in "project/456" scope and will be checked with `AND` of other resources. + # @!attribute [rw] resource_labels_selector + # @return [::Google::Protobuf::Map{::String => ::String}] + # List of resource labels to search for, evaluated with `AND`. + # For example, "resource_labels_selector": \\{"key": "value", "env": "prod"} + # will match resources with labels "key": "value" `AND` "env": + # "prod" + # https://cloud.google.com/resource-manager/docs/creating-managing-labels + # @!attribute [rw] description + # @return [::String] + # Description of the resource value configuration. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp this resource value configuration was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp this resource value configuration was last updated. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] + # Cloud provider this configuration applies to + # @!attribute [rw] sensitive_data_protection_mapping + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig::SensitiveDataProtectionMapping] + # A mapping of the sensitivity on Sensitive Data Protection finding to + # resource values. This mapping can only be used in combination with a + # resource_type that is related to BigQuery, e.g. + # "bigquery.googleapis.com/Dataset". + class ResourceValueConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Resource value mapping for Sensitive Data Protection findings + # If any of these mappings have a resource value that is not unspecified, + # the resource_value field will be ignored when reading this configuration. + # @!attribute [rw] high_sensitivity_mapping + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValue] + # Resource value mapping for high-sensitivity Sensitive Data Protection + # findings + # @!attribute [rw] medium_sensitivity_mapping + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValue] + # Resource value mapping for medium-sensitivity Sensitive Data Protection + # findings + class SensitiveDataProtectionMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ResourceLabelsSelectorEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Value enum to map to a resource + module ResourceValue + # Unspecific value + RESOURCE_VALUE_UNSPECIFIED = 0 + + # High resource value + HIGH = 1 + + # Medium resource value + MEDIUM = 2 + + # Low resource value + LOW = 3 + + # No resource value, e.g. ignore these resources + NONE = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb new file mode 100644 index 000000000000..1e3bcc93a58a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # User specified security marks that are attached to the parent Security + # Command Center resource. Security marks are scoped within a Security Command + # Center organization -- they can be modified and viewed by all users who have + # proper permissions on the organization. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of the SecurityMarks. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # The following list shows some examples: + # + # + `organizations/{organization_id}/assets/{asset_id}/securityMarks` + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + # @!attribute [rw] marks + # @return [::Google::Protobuf::Map{::String => ::String}] + # Mutable user specified security marks belonging to the parent resource. + # Constraints are as follows: + # + # * Keys and values are treated as case insensitive + # * Keys must be between 1 - 256 characters (inclusive) + # * Keys must be letters, numbers, underscores, or dashes + # * Values have leading and trailing whitespace trimmed, remaining + # characters must be between 1 - 4096 characters (inclusive) + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the marks. The following list shows some examples: + # + # + `organizations/{organization_id}/assets/{asset_id}/securityMarks` + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + # + `folders/{folder_id}/assets/{asset_id}/securityMarks` + # + + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + # + `projects/{project_number}/assets/{asset_id}/securityMarks` + # + + # `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` + # + + # `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + class SecurityMarks + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MarksEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb new file mode 100644 index 000000000000..3c2c9899fac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Represents a posture that is deployed on Google Cloud by the + # Security Command Center Posture Management service. + # A posture contains one or more policy sets. A policy set is a + # group of policies that enforce a set of security rules on Google + # Cloud. + # @!attribute [rw] name + # @return [::String] + # Name of the posture, for example, `CIS-Posture`. + # @!attribute [rw] revision_id + # @return [::String] + # The version of the posture, for example, `c7cfa2a8`. + # @!attribute [rw] posture_deployment_resource + # @return [::String] + # The project, folder, or organization on which the posture is deployed, + # for example, `projects/{project_number}`. + # @!attribute [rw] posture_deployment + # @return [::String] + # The name of the posture deployment, for example, + # `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. + # @!attribute [rw] changed_policy + # @return [::String] + # The name of the updated policy, for example, + # `projects/{project_id}/policies/{constraint_name}`. + # @!attribute [rw] policy_set + # @return [::String] + # The name of the updated policy set, for example, `cis-policyset`. + # @!attribute [rw] policy + # @return [::String] + # The ID of the updated policy, for example, `compute-policy-1`. + # @!attribute [rw] policy_drift_details + # @return [::Array<::Google::Cloud::SecurityCenter::V2::SecurityPosture::PolicyDriftDetails>] + # The details about a change in an updated policy that violates the deployed + # posture. + class SecurityPosture + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The policy field that violates the deployed posture and its expected and + # detected values. + # @!attribute [rw] field + # @return [::String] + # The name of the updated field, for example + # constraint.implementation.policy_rules[0].enforce + # @!attribute [rw] expected_value + # @return [::String] + # The value of this field that was configured in a posture, for example, + # `true` or `allowed_values={"projects/29831892"}`. + # @!attribute [rw] detected_value + # @return [::String] + # The detected value that violates the deployed posture, for example, + # `false` or `allowed_values={"projects/22831892"}`. + class PolicyDriftDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb new file mode 100644 index 000000000000..5aa1b2607e39 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb @@ -0,0 +1,1216 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Request message to create multiple resource value configs + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # The parent field in the CreateResourceValueConfigRequest + # messages must either be empty or match this field. + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::SecurityCenter::V2::CreateResourceValueConfigRequest>] + # Required. The resource value configs to be created. + class BatchCreateResourceValueConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for BatchCreateResourceValueConfigs + # @!attribute [rw] resource_value_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] + # The resource value configs created + class BatchCreateResourceValueConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for bulk findings update. + # + # Note: + # 1. If multiple bulk update requests match the same resource, the order in + # which they get executed is not defined. + # 2. Once a bulk operation is started, there is no way to stop it. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, at which bulk action needs to be applied. If no + # location is specified, findings are updated in global. The following list + # shows some examples: + # + # + `organizations/[organization_id]` + # + `organizations/[organization_id]/locations/[location_id]` + # + `folders/[folder_id]` + # + `folders/[folder_id]/locations/[location_id]` + # + `projects/[project_id]` + # + `projects/[project_id]/locations/[location_id]` + # @!attribute [rw] filter + # @return [::String] + # Expression that identifies findings that should be updated. + # The expression is a list of zero or more restrictions combined + # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + # has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a + # `-` character in front of them to indicate negation. The fields map to + # those defined in the corresponding resource. + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # @!attribute [rw] mute_state + # @return [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest::MuteState] + # Optional. All findings matching the given filter will have their mute state + # set to this value. The default value is `MUTED`. Setting this to + # `UNDEFINED` will clear the mute state on all matching findings. + class BulkMuteFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The mute state. + module MuteState + # Unused. + MUTE_STATE_UNSPECIFIED = 0 + + # Matching findings will be muted (default). + MUTED = 1 + + # Matching findings will have their mute state cleared. + UNDEFINED = 2 + end + end + + # The response to a BulkMute request. Contains the LRO information. + class BulkMuteFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a BigQuery export. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent resource of the new BigQuery export. Its + # format is `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @!attribute [rw] big_query_export + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # Required. The BigQuery export being created. + # @!attribute [rw] big_query_export_id + # @return [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + class CreateBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a finding. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new finding's parent. The following list + # shows some examples of the format: + # + + # `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # @!attribute [rw] finding_id + # @return [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must be alphanumeric and less than or equal to 32 characters and + # greater than 0 characters in length. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # Required. The Finding being created. The name and security_marks will be + # ignored as they are both output only fields on this resource. + class CreateFindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a mute config. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new mute configs's parent. Its format is + # `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @!attribute [rw] mute_config + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # Required. The mute config being created. + # @!attribute [rw] mute_config_id + # @return [::String] + # Required. Unique identifier provided by the client within the parent scope. + # It must consist of only lowercase letters, numbers, and hyphens, must start + # with a letter, must end with either a letter or a number, and must be 63 + # characters or less. + class CreateMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a notification config. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new notification config's parent. Its format + # is `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @!attribute [rw] config_id + # @return [::String] + # Required. + # Unique identifier provided by the client within the parent scope. + # It must be between 1 and 128 characters and contain alphanumeric + # characters, underscores, or hyphens only. + # @!attribute [rw] notification_config + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # Required. The notification config being created. The name and the service + # account will be ignored as they are both output only fields on this + # resource. + class CreateNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to create single resource value config + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new ResourceValueConfig's parent. + # @!attribute [rw] resource_value_config + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # Required. The resource value config being created. + class CreateResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating a source. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new source's parent. Its format should be + # `organizations/[organization_id]`. + # @!attribute [rw] source + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # Required. The Source being created, only the display_name and description + # will be used. All other fields will be ignored. + class CreateSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a BigQuery export. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the BigQuery export to delete. The following list + # shows some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}/locations/{location}/bigQueryExports/{export_id}` + class DeleteBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a mute config. If no location is specified, + # default is global. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the mute config to delete. The following list shows some + # examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` + class DeleteMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a notification config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the notification config to delete. The following list + # shows some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]` + class DeleteNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete resource value config + # @!attribute [rw] name + # @return [::String] + # Required. Name of the ResourceValueConfig to delete + class DeleteResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The destination big query dataset to export findings to. + # @!attribute [rw] dataset + # @return [::String] + # Required. The relative resource name of the destination dataset, in the + # form projects/\\{projectId}/datasets/\\{datasetId}. + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The LRO metadata for a ExportFindings request. + # @!attribute [rw] export_start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Timestamp at which export was started + # @!attribute [rw] big_query_destination + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryDestination] + # Required. The destination big query dataset to export findings to. + class ExportFindingsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to a ExportFindings request. Contains the LRO information. + class ExportFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for retrieving a BigQuery export. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the BigQuery export to retrieve. The following list shows + # some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` + class GetBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for retrieving a mute config. If no location is specified, + # default is global. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the mute config to retrieve. The following list shows + # some examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` + class GetMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a notification config. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the notification config to get. The following list shows + # some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` + class GetNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to get resource value config + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource value config to retrieve. Its format is + # organizations/\\{organization}/resourceValueConfigs/\\{config_id}. + class GetResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a source. + # @!attribute [rw] name + # @return [::String] + # Required. Relative resource name of the source. Its format is + # `organizations/[organization_id]/source/[source_id]`. + class GetSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for grouping by findings. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the source to groupBy. If no location is specified, + # finding is assumed to be in global. + # The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To groupBy across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/[location_id]` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-/locations/[location_id]` + # + `projects/{project_id}/sources/-` + # + `projects/{project_id}/sources/-/locations/[location_id]` + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * security_marks.marks: `=`, `:` + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # @!attribute [rw] group_by + # @return [::String] + # Required. Expression that defines what assets fields to use for grouping. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: "parent,resource_name". + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `GroupFindingsResponse`; indicates + # that this is a continuation of a prior `GroupFindings` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class GroupFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for group by findings. + # @!attribute [rw] group_by_results + # @return [::Array<::Google::Cloud::SecurityCenter::V2::GroupResult>] + # Group results. There exists an element for each existing unique + # combination of property/values. The element contains a count for the number + # of times those specific property/values appear. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of results matching the query. + class GroupFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Result containing the properties and count of a groupBy request. + # @!attribute [rw] properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Properties matching the groupBy fields in the request. + # @!attribute [rw] count + # @return [::Integer] + # Total count of resources for the given properties. + class GroupResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class PropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for listing the attack paths for a given simulation or valued + # resource. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list attack paths. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + # @!attribute [rw] filter + # @return [::String] + # The filter expression that filters the attack path in the response. + # Supported fields: + # + # * `valued_resources` supports = + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListAttackPathsResponse`; indicates + # that this is a continuation of a prior `ListAttackPaths` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListAttackPathsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing the attack paths for a given simulation or + # valued resource. + # @!attribute [rw] attack_paths + # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath>] + # The attack paths that the attack path simulation identified. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + class ListAttackPathsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting simulation. + # Simulation name can include "latest" to retrieve the latest simulation + # For example, "organizations/123/simulations/latest" + # @!attribute [rw] name + # @return [::String] + # Required. The organization name or simulation name of this simulation + # + # Valid format: + # `organizations/{organization}/simulations/latest` + # `organizations/{organization}/simulations/{simulation}` + class GetSimulationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a valued resource. + # @!attribute [rw] name + # @return [::String] + # Required. The name of this valued resource + # + # Valid format: + # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` + class GetValuedResourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing BigQuery exports at a given scope e.g. + # organization, folder or project. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns the collection of BigQuery exports. Its + # format is `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListBigQueryExports` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListBigQueryExports` + # must match the call that provided the page token. + class ListBigQueryExportsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing BigQuery exports. + # @!attribute [rw] big_query_exports + # @return [::Array<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] + # The BigQuery exports from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListBigQueryExportsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing findings. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the source the findings belong to. If no location is + # specified, the default is global. The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To list across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/{location_id}` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-locations/{location_id}` + # + `projects/{projects_id}/sources/-` + # + `projects/{projects_id}/sources/-/locations/{location_id}` + # @!attribute [rw] filter + # @return [::String] + # Expression that defines the filter to apply across findings. + # The expression is a list of one or more restrictions combined via logical + # operators `AND` and `OR`. + # Parentheses are supported, and `OR` has higher precedence than `AND`. + # + # Restrictions have the form ` ` and may have a `-` + # character in front of them to indicate negation. Examples include: + # + # * name + # * security_marks.marks.marka + # + # The supported operators are: + # + # * `=` for all value types. + # * `>`, `<`, `>=`, `<=` for integer values. + # * `:`, meaning substring matching, for strings. + # + # The supported value types are: + # + # * string literals in quotes. + # * integer literals without quotes. + # * boolean literals `true` and `false` without quotes. + # + # The following field and operator combinations are supported: + # + # * name: `=` + # * parent: `=`, `:` + # * resource_name: `=`, `:` + # * state: `=`, `:` + # * category: `=`, `:` + # * external_uri: `=`, `:` + # * event_time: `=`, `>`, `<`, `>=`, `<=` + # + # Usage: This should be milliseconds since epoch or an RFC3339 string. + # Examples: + # `event_time = "2019-06-10T16:07:18-07:00"` + # `event_time = 1560208038000` + # + # * severity: `=`, `:` + # * security_marks.marks: `=`, `:` + # * resource: + # * resource.name: `=`, `:` + # * resource.parent_name: `=`, `:` + # * resource.parent_display_name: `=`, `:` + # * resource.project_name: `=`, `:` + # * resource.project_display_name: `=`, `:` + # * resource.type: `=`, `:` + # * resource.folders.resource_folder: `=`, `:` + # * resource.display_name: `=`, `:` + # @!attribute [rw] order_by + # @return [::String] + # Expression that defines what fields and order to use for sorting. The + # string value should follow SQL syntax: comma separated list of fields. For + # example: "name,parent". The default sorting order + # is ascending. To specify descending order for a field, a suffix " desc" + # should be appended to the field name. For example: "name + # desc,parent". Redundant space characters in the + # syntax are insignificant. "name desc,parent" and " + # name desc , parent " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # security_marks.marks + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # A field mask to specify the Finding fields to be listed in the response. + # An empty field mask will list all fields. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListFindingsResponse`; indicates + # that this is a continuation of a prior `ListFindings` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing findings. + # @!attribute [rw] list_findings_results + # @return [::Array<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] + # Findings matching the list request. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The total number of findings matching the query. + class ListFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Result containing the Finding. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # Finding matching the search request. + # @!attribute [r] resource + # @return [::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult::Resource] + # Output only. Resource that is associated with this finding. + class ListFindingsResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information related to the Google Cloud resource that is + # associated with this finding. + # @!attribute [rw] name + # @return [::String] + # The full resource name of the resource. See: + # https://cloud.google.com/apis/design/resource_names#full_resource_name + # @!attribute [rw] display_name + # @return [::String] + # The human readable name of the resource. + # @!attribute [rw] type + # @return [::String] + # The full resource type of the resource. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] + # Indicates which cloud provider the finding is from. + # @!attribute [rw] service + # @return [::String] + # The service or resource provider associated with the resource. + # @!attribute [rw] location + # @return [::String] + # The region or location of the service (if applicable). + # @!attribute [rw] gcp_metadata + # @return [::Google::Cloud::SecurityCenter::V2::GcpMetadata] + # The GCP metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `gcp_metadata`, `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] aws_metadata + # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata] + # The AWS metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `aws_metadata`, `gcp_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] azure_metadata + # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata] + # The Azure metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `azure_metadata`, `gcp_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resource_path + # @return [::Google::Cloud::SecurityCenter::V2::ResourcePath] + # Provides the path to the resource within the resource hierarchy. + # @!attribute [rw] resource_path_string + # @return [::String] + # A string representation of the resource path. + # For Google Cloud, it has the format of + # `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` + # where there can be any number of folders. + # For AWS, it has the format of + # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` + # where there can be any number of organizational units. + # For Azure, it has the format of + # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` + # where there can be any number of management groups. + class Resource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Request message for listing mute configs at a given scope e.g. organization, + # folder or project. If no location is specified, default is + # global. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns the collection of mute configs. Its format + # is `organizations/[organization_id]", "folders/[folder_id]`, + # `projects/[project_id]`, + # `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, + # `projects/[project_id]/locations/[location_id]`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListMuteConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMuteConfigs` must + # match the call that provided the page token. + class ListMuteConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing mute configs. + # @!attribute [rw] mute_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V2::MuteConfig>] + # The mute configs from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListMuteConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing notification configs. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent in which to list the notification + # configurations. Its format is + # "organizations/[organization_id]/locations/[location_id]", + # "folders/[folder_id]/locations/[location_id]", or + # "projects/[project_id]/locations/[location_id]". + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListNotificationConfigsResponse`; indicates + # that this is a continuation of a prior `ListNotificationConfigs` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListNotificationConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing notification configs. + # @!attribute [rw] notification_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] + # Notification configs belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + class ListNotificationConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to list resource value configs of a parent + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns the collection of resource value configs. + # Its format is + # `organizations/[organization_id]` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of configs to return. The service may return fewer than + # this value. + # If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListResourceValueConfigs` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListResourceValueConfigs` must match the call that provided the + # page token. + # + # page_size can be specified, and the new page_size will be used. + class ListResourceValueConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message to list resource value configs + # @!attribute [rw] resource_value_configs + # @return [::Array<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] + # The resource value configs from the specified parent. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is empty, there are no subsequent pages. + class ListResourceValueConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing sources. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent of sources to list. Its format should + # be `organizations/[organization_id]`, `folders/[folder_id]`, or + # `projects/[project_id]`. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListSourcesResponse`; indicates + # that this is a continuation of a prior `ListSources` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + class ListSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing sources. + # @!attribute [rw] sources + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Source>] + # Sources belonging to the requested parent. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + class ListSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing the valued resources for a given simulation. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list exposed resources. + # + # Valid formats: + # `organizations/{organization}`, + # `organizations/{organization}/simulations/{simulation}` + # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` + # @!attribute [rw] filter + # @return [::String] + # The filter expression that filters the valued resources in the response. + # Supported fields: + # + # * `resource_value` supports = + # * `resource_type` supports = + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListValuedResourcesResponse`; indicates + # that this is a continuation of a prior `ListValuedResources` call, and + # that the system should return the next page of data. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response. Default is + # 10, minimum is 1, maximum is 1000. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The fields by which to order the valued resources response. + # + # Supported fields: + # + # * `exposed_score` + # + # * `resource_value` + # + # * `resource_type` + # + # Values should be a comma separated list of fields. For example: + # `exposed_score,resource_value`. + # + # The default sorting order is descending. To specify ascending or descending + # order for a field, append a " ASC" or a " DESC" suffix, respectively; for + # example: `exposed_score DESC`. + class ListValuedResourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing the valued resources for a given simulation. + # @!attribute [rw] valued_resources + # @return [::Array<::Google::Cloud::SecurityCenter::V2::ValuedResource>] + # The valued resources that the attack path simulation identified. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results. + # @!attribute [rw] total_size + # @return [::Integer] + # The estimated total number of results matching the query. + class ListValuedResourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a finding's state. + # @!attribute [rw] name + # @return [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V2::Finding::State] + # Required. The desired State of the finding. + class SetFindingStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a finding's mute status. + # @!attribute [rw] name + # @return [::String] + # Required. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @!attribute [rw] mute + # @return [::Google::Cloud::SecurityCenter::V2::Finding::Mute] + # Required. The desired state of the Mute. + class SetMuteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a BigQuery export. + # @!attribute [rw] big_query_export + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # Required. The BigQuery export being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + class UpdateBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a ExternalSystem resource. + # @!attribute [rw] external_system + # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] + # Required. The external system resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the external system resource. + # + # If empty all mutable fields will be updated. + class UpdateExternalSystemRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating or creating a finding. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # Required. The finding resource to update or create if it does not already + # exist. parent, security_marks, and update_time will be ignored. + # + # In the case of creation, the finding id portion of the name must be + # alphanumeric and less than or equal to 32 characters and greater than 0 + # characters in length. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the finding resource. This field should + # not be specified when creating a finding. + # + # When updating a finding, an empty mask is treated as updating all mutable + # fields and replacing source_properties. Individual source_properties can + # be added/updated by using "source_properties." in the field + # mask. + class UpdateFindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a mute config. + # @!attribute [rw] mute_config + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # Required. The mute config being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + class UpdateMuteConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a notification config. + # @!attribute [rw] notification_config + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # Required. The notification config to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the notification config. + # + # If empty all mutable fields will be updated. + class UpdateNotificationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to update resource value config + # @!attribute [rw] resource_value_config + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # Required. The resource value config being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If empty all mutable fields will be updated. + # + # To update nested fields, include the top level field in the mask + # For example, to update gcp_metadata.resource_type, include the + # "gcp_metadata" field mask + class UpdateResourceValueConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a SecurityMarks resource. + # @!attribute [rw] security_marks + # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # Required. The security marks resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the security marks resource. + # + # The field mask must not contain duplicate fields. + # If empty or set to "marks", all marks will be replaced. Individual + # marks can be updated using "marks.". + class UpdateSecurityMarksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a source. + # @!attribute [rw] source + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # Required. The source resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The FieldMask to use when updating the source resource. + # + # If empty all mutable fields will be updated. + class UpdateSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb new file mode 100644 index 000000000000..05bb5af8f001 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Attack path simulation + # @!attribute [rw] name + # @return [::String] + # Full resource name of the Simulation: + # `organizations/123/simulations/456` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time simulation was created + # @!attribute [rw] resource_value_configs_metadata + # @return [::Array<::Google::Cloud::SecurityCenter::V2::ResourceValueConfigMetadata>] + # Resource value configurations' metadata used in this simulation. Maximum of + # 100. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] + # Indicates which cloud provider was used in this simulation. + class Simulation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb new file mode 100644 index 000000000000..27dd5626b0cf --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Security Command Center finding source. A finding source + # is an entity or a mechanism that can produce a finding. A source is like a + # container of findings that come from the same scanner, logger, monitor, and + # other tools. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of this source. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # Example: + # "organizations/\\{organization_id}/sources/\\{source_id}" + # @!attribute [rw] display_name + # @return [::String] + # The source's display name. + # A source's display name must be unique amongst its siblings, for example, + # two sources with the same parent can't share the same display name. + # The display name must have a length between 1 and 64 characters + # (inclusive). + # @!attribute [rw] description + # @return [::String] + # The description of the source (max of 1024 characters). + # Example: + # "Web Security Scanner is a web security scanner for common + # vulnerabilities in App Engine applications. It can automatically + # scan and detect four common vulnerabilities, including cross-site-scripting + # (XSS), Flash injection, mixed content (HTTP in HTTPS), and + # outdated or insecure libraries." + # @!attribute [rw] canonical_name + # @return [::String] + # The canonical name of the finding source. It's either + # "organizations/\\{organization_id}/sources/\\{source_id}", + # "folders/\\{folder_id}/sources/\\{source_id}", or + # "projects/\\{project_number}/sources/\\{source_id}", + # depending on the closest CRM ancestor of the resource associated with the + # finding. + class Source + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb new file mode 100644 index 000000000000..dff76d98c704 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Contains details about a group of security issues that, when the issues + # occur together, represent a greater risk than when the issues occur + # independently. A group of such issues is referred to as a toxic + # combination. + # @!attribute [rw] attack_exposure_score + # @return [::Float] + # The + # [Attack exposure + # score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) + # of this toxic combination. The score is a measure of how much this toxic + # combination exposes one or more high-value resources to potential attack. + # @!attribute [rw] related_findings + # @return [::Array<::String>] + # List of resource names of findings associated with this toxic combination. + # For example, `organizations/123/sources/456/findings/789`. + class ToxicCombination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb new file mode 100644 index 000000000000..e97a21960308 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # A resource that is determined to have value to a user's system + # @!attribute [rw] name + # @return [::String] + # Valued resource name, for example, + # e.g.: + # `organizations/123/simulations/456/valuedResources/789` + # @!attribute [rw] resource + # @return [::String] + # The + # [full resource + # name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + # of the valued resource. + # @!attribute [rw] resource_type + # @return [::String] + # The [resource + # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + # of the valued resource. + # @!attribute [rw] display_name + # @return [::String] + # Human-readable name of the valued resource. + # @!attribute [rw] resource_value + # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource::ResourceValue] + # How valuable this resource is. + # @!attribute [rw] exposed_score + # @return [::Float] + # Exposed score for this valued resource. A value of 0 means no exposure was + # detected exposure. + # @!attribute [rw] resource_value_configs_used + # @return [::Array<::Google::Cloud::SecurityCenter::V2::ResourceValueConfigMetadata>] + # List of resource value configurations' metadata used to determine the value + # of this resource. Maximum of 100. + class ValuedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # How valuable the resource is. + module ResourceValue + # The resource value isn't specified. + RESOURCE_VALUE_UNSPECIFIED = 0 + + # This is a low-value resource. + RESOURCE_VALUE_LOW = 1 + + # This is a medium-value resource. + RESOURCE_VALUE_MEDIUM = 2 + + # This is a high-value resource. + RESOURCE_VALUE_HIGH = 3 + end + end + + # Metadata about a ResourceValueConfig. For example, id and name. + # @!attribute [rw] name + # @return [::String] + # Resource value config name + class ResourceValueConfigMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb new file mode 100644 index 000000000000..f11b0348de0a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenter + module V2 + # Vertex AI-related information associated with the finding. + # @!attribute [rw] datasets + # @return [::Array<::Google::Cloud::SecurityCenter::V2::VertexAi::Dataset>] + # Datasets associated with the finding. + # @!attribute [rw] pipelines + # @return [::Array<::Google::Cloud::SecurityCenter::V2::VertexAi::Pipeline>] + # Pipelines associated with the finding. + class VertexAi + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Vertex AI dataset associated with the finding. + # @!attribute [rw] name + # @return [::String] + # Resource name of the dataset, e.g. + # projects/\\{project}/locations/\\{location}/datasets/2094040236064505856 + # @!attribute [rw] display_name + # @return [::String] + # The user defined display name of dataset, e.g. plants-dataset + # @!attribute [rw] source + # @return [::String] + # Data source, such as a BigQuery source URI, e.g. + # bq://scc-nexus-test.AIPPtest.gsod + class Dataset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Vertex AI training pipeline associated with the finding. + # @!attribute [rw] name + # @return [::String] + # Resource name of the pipeline, e.g. + # projects/\\{project}/locations/\\{location}/trainingPipelines/5253428229225578496 + # @!attribute [rw] display_name + # @return [::String] + # The user-defined display name of pipeline, e.g. plants-classification + class Pipeline + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb new file mode 100644 index 000000000000..41c3a3589f1d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb @@ -0,0 +1,365 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V2 + # Refers to common vulnerability fields e.g. cve, cvss, cwe etc. + # @!attribute [rw] cve + # @return [::Google::Cloud::SecurityCenter::V2::Cve] + # CVE stands for Common Vulnerabilities and Exposures + # (https://cve.mitre.org/about/) + # @!attribute [rw] offending_package + # @return [::Google::Cloud::SecurityCenter::V2::Package] + # The offending package is relevant to the finding. + # @!attribute [rw] fixed_package + # @return [::Google::Cloud::SecurityCenter::V2::Package] + # The fixed package is relevant to the finding. + # @!attribute [rw] security_bulletin + # @return [::Google::Cloud::SecurityCenter::V2::SecurityBulletin] + # The security bulletin is relevant to this finding. + # @!attribute [rw] provider_risk_score + # @return [::Integer] + # Provider provided risk_score based on multiple factors. The higher the risk + # score, the more risky the vulnerability is. + # @!attribute [rw] reachable + # @return [::Boolean] + # Represents whether the vulnerability is reachable (detected via static + # analysis) + # @!attribute [rw] cwes + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Cwe>] + # Represents one or more Common Weakness Enumeration (CWE) information on + # this vulnerability. + class Vulnerability + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CVE stands for Common Vulnerabilities and Exposures. + # Information from the [CVE + # record](https://www.cve.org/ResourcesSupport/Glossary) that describes this + # vulnerability. + # @!attribute [rw] id + # @return [::String] + # The unique identifier for the vulnerability. e.g. CVE-2021-34527 + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Reference>] + # Additional information about the CVE. + # e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 + # @!attribute [rw] cvssv3 + # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3] + # Describe Common Vulnerability Scoring System specified at + # https://www.first.org/cvss/v3.1/specification-document + # @!attribute [rw] upstream_fix_available + # @return [::Boolean] + # Whether upstream fix is available for the CVE. + # @!attribute [rw] impact + # @return [::Google::Cloud::SecurityCenter::V2::Cve::RiskRating] + # The potential impact of the vulnerability if it was to be exploited. + # @!attribute [rw] exploitation_activity + # @return [::Google::Cloud::SecurityCenter::V2::Cve::ExploitationActivity] + # The exploitation activity of the vulnerability in the wild. + # @!attribute [rw] observed_in_the_wild + # @return [::Boolean] + # Whether or not the vulnerability has been observed in the wild. + # @!attribute [rw] zero_day + # @return [::Boolean] + # Whether or not the vulnerability was zero day when the finding was + # published. + # @!attribute [rw] exploit_release_date + # @return [::Google::Protobuf::Timestamp] + # Date the first publicly available exploit or PoC was released. + # @!attribute [rw] first_exploitation_date + # @return [::Google::Protobuf::Timestamp] + # Date of the earliest known exploitation. + class Cve + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible values of impact of the vulnerability if it was to be + # exploited. + module RiskRating + # Invalid or empty value. + RISK_RATING_UNSPECIFIED = 0 + + # Exploitation would have little to no security impact. + LOW = 1 + + # Exploitation would enable attackers to perform activities, or could allow + # attackers to have a direct impact, but would require additional steps. + MEDIUM = 2 + + # Exploitation would enable attackers to have a notable direct impact + # without needing to overcome any major mitigating factors. + HIGH = 3 + + # Exploitation would fundamentally undermine the security of affected + # systems, enable actors to perform significant attacks with minimal + # effort, with little to no mitigating factors to overcome. + CRITICAL = 4 + end + + # The possible values of exploitation activity of the vulnerability in the + # wild. + module ExploitationActivity + # Invalid or empty value. + EXPLOITATION_ACTIVITY_UNSPECIFIED = 0 + + # Exploitation has been reported or confirmed to widely occur. + WIDE = 1 + + # Limited reported or confirmed exploitation activities. + CONFIRMED = 2 + + # Exploit is publicly available. + AVAILABLE = 3 + + # No known exploitation activity, but has a high potential for + # exploitation. + ANTICIPATED = 4 + + # No known exploitation activity. + NO_KNOWN = 5 + end + end + + # Additional Links + # @!attribute [rw] source + # @return [::String] + # Source of the reference e.g. NVD + # @!attribute [rw] uri + # @return [::String] + # Uri for the mentioned source e.g. + # https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. + class Reference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Common Vulnerability Scoring System version 3. + # @!attribute [rw] base_score + # @return [::Float] + # The base score is a function of the base metric scores. + # @!attribute [rw] attack_vector + # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::AttackVector] + # Base Metrics + # Represents the intrinsic characteristics of a vulnerability that are + # constant over time and across user environments. + # This metric reflects the context by which vulnerability exploitation is + # possible. + # @!attribute [rw] attack_complexity + # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::AttackComplexity] + # This metric describes the conditions beyond the attacker's control that + # must exist in order to exploit the vulnerability. + # @!attribute [rw] privileges_required + # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::PrivilegesRequired] + # This metric describes the level of privileges an attacker must possess + # before successfully exploiting the vulnerability. + # @!attribute [rw] user_interaction + # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::UserInteraction] + # This metric captures the requirement for a human user, other than the + # attacker, to participate in the successful compromise of the vulnerable + # component. + # @!attribute [rw] scope + # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::Scope] + # The Scope metric captures whether a vulnerability in one vulnerable + # component impacts resources in components beyond its security scope. + # @!attribute [rw] confidentiality_impact + # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::Impact] + # This metric measures the impact to the confidentiality of the information + # resources managed by a software component due to a successfully exploited + # vulnerability. + # @!attribute [rw] integrity_impact + # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::Impact] + # This metric measures the impact to integrity of a successfully exploited + # vulnerability. + # @!attribute [rw] availability_impact + # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::Impact] + # This metric measures the impact to the availability of the impacted + # component resulting from a successfully exploited vulnerability. + class Cvssv3 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This metric reflects the context by which vulnerability exploitation is + # possible. + module AttackVector + # Invalid value. + ATTACK_VECTOR_UNSPECIFIED = 0 + + # The vulnerable component is bound to the network stack and the set of + # possible attackers extends beyond the other options listed below, up to + # and including the entire Internet. + ATTACK_VECTOR_NETWORK = 1 + + # The vulnerable component is bound to the network stack, but the attack is + # limited at the protocol level to a logically adjacent topology. + ATTACK_VECTOR_ADJACENT = 2 + + # The vulnerable component is not bound to the network stack and the + # attacker's path is via read/write/execute capabilities. + ATTACK_VECTOR_LOCAL = 3 + + # The attack requires the attacker to physically touch or manipulate the + # vulnerable component. + ATTACK_VECTOR_PHYSICAL = 4 + end + + # This metric describes the conditions beyond the attacker's control that + # must exist in order to exploit the vulnerability. + module AttackComplexity + # Invalid value. + ATTACK_COMPLEXITY_UNSPECIFIED = 0 + + # Specialized access conditions or extenuating circumstances do not exist. + # An attacker can expect repeatable success when attacking the vulnerable + # component. + ATTACK_COMPLEXITY_LOW = 1 + + # A successful attack depends on conditions beyond the attacker's control. + # That is, a successful attack cannot be accomplished at will, but requires + # the attacker to invest in some measurable amount of effort in preparation + # or execution against the vulnerable component before a successful attack + # can be expected. + ATTACK_COMPLEXITY_HIGH = 2 + end + + # This metric describes the level of privileges an attacker must possess + # before successfully exploiting the vulnerability. + module PrivilegesRequired + # Invalid value. + PRIVILEGES_REQUIRED_UNSPECIFIED = 0 + + # The attacker is unauthorized prior to attack, and therefore does not + # require any access to settings or files of the vulnerable system to + # carry out an attack. + PRIVILEGES_REQUIRED_NONE = 1 + + # The attacker requires privileges that provide basic user capabilities + # that could normally affect only settings and files owned by a user. + # Alternatively, an attacker with Low privileges has the ability to access + # only non-sensitive resources. + PRIVILEGES_REQUIRED_LOW = 2 + + # The attacker requires privileges that provide significant (e.g., + # administrative) control over the vulnerable component allowing access to + # component-wide settings and files. + PRIVILEGES_REQUIRED_HIGH = 3 + end + + # This metric captures the requirement for a human user, other than the + # attacker, to participate in the successful compromise of the vulnerable + # component. + module UserInteraction + # Invalid value. + USER_INTERACTION_UNSPECIFIED = 0 + + # The vulnerable system can be exploited without interaction from any user. + USER_INTERACTION_NONE = 1 + + # Successful exploitation of this vulnerability requires a user to take + # some action before the vulnerability can be exploited. + USER_INTERACTION_REQUIRED = 2 + end + + # The Scope metric captures whether a vulnerability in one vulnerable + # component impacts resources in components beyond its security scope. + module Scope + # Invalid value. + SCOPE_UNSPECIFIED = 0 + + # An exploited vulnerability can only affect resources managed by the same + # security authority. + SCOPE_UNCHANGED = 1 + + # An exploited vulnerability can affect resources beyond the security scope + # managed by the security authority of the vulnerable component. + SCOPE_CHANGED = 2 + end + + # The Impact metrics capture the effects of a successfully exploited + # vulnerability on the component that suffers the worst outcome that is most + # directly and predictably associated with the attack. + module Impact + # Invalid value. + IMPACT_UNSPECIFIED = 0 + + # High impact. + IMPACT_HIGH = 1 + + # Low impact. + IMPACT_LOW = 2 + + # No impact. + IMPACT_NONE = 3 + end + end + + # Package is a generic definition of a package. + # @!attribute [rw] package_name + # @return [::String] + # The name of the package where the vulnerability was detected. + # @!attribute [rw] cpe_uri + # @return [::String] + # The CPE URI where the vulnerability was detected. + # @!attribute [rw] package_type + # @return [::String] + # Type of package, for example, os, maven, or go. + # @!attribute [rw] package_version + # @return [::String] + # The version of the package. + class Package + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SecurityBulletin are notifications of vulnerabilities of Google products. + # @!attribute [rw] bulletin_id + # @return [::String] + # ID of the bulletin corresponding to the vulnerability. + # @!attribute [rw] submission_time + # @return [::Google::Protobuf::Timestamp] + # Submission time of this Security Bulletin. + # @!attribute [rw] suggested_upgrade_version + # @return [::String] + # This represents a version that the cluster receiving this notification + # should be upgraded to, based on its current version. For example, 1.15.0 + class SecurityBulletin + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CWE stands for Common Weakness Enumeration. Information about this weakness, + # as described by [CWE](https://cwe.mitre.org/). + # @!attribute [rw] id + # @return [::String] + # The CWE identifier, e.g. CWE-94 + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Reference>] + # Any reference to the details on the CWE, for example, + # https://cwe.mitre.org/data/definitions/94.html + class Cwe + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile new file mode 100644 index 000000000000..99432c66bb92 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-security_center-v2", path: "../" +else + gem "google-cloud-security_center-v2" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb new file mode 100644 index 000000000000..35868ebf184f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the batch_create_resource_value_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#batch_create_resource_value_configs. +# +def batch_create_resource_value_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new + + # Call the batch_create_resource_value_configs method. + result = client.batch_create_resource_value_configs request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb new file mode 100644 index 000000000000..937f173f1687 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_BulkMuteFindings_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the bulk_mute_findings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#bulk_mute_findings. +# +def bulk_mute_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new + + # Call the bulk_mute_findings method. + result = client.bulk_mute_findings request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END securitycenter_v2_generated_SecurityCenter_BulkMuteFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb new file mode 100644 index 000000000000..34909f562782 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_CreateBigQueryExport_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the create_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_big_query_export. +# +def create_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new + + # Call the create_big_query_export method. + result = client.create_big_query_export request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_CreateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb new file mode 100644 index 000000000000..b2dbeb349717 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_CreateFinding_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the create_finding call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_finding. +# +def create_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new + + # Call the create_finding method. + result = client.create_finding request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb new file mode 100644 index 000000000000..5ac853e23ca6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_CreateMuteConfig_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the create_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_mute_config. +# +def create_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new + + # Call the create_mute_config method. + result = client.create_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_CreateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb new file mode 100644 index 000000000000..8d63ccdb2cc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_CreateNotificationConfig_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the create_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_notification_config. +# +def create_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new + + # Call the create_notification_config method. + result = client.create_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb new file mode 100644 index 000000000000..042a0de0ff05 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_CreateSource_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the create_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_source. +# +def create_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new + + # Call the create_source method. + result = client.create_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb new file mode 100644 index 000000000000..c5b9ec740f3f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_DeleteBigQueryExport_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the delete_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_big_query_export. +# +def delete_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new + + # Call the delete_big_query_export method. + result = client.delete_big_query_export request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_DeleteBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb new file mode 100644 index 000000000000..f6d9fe6232b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_DeleteMuteConfig_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the delete_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_mute_config. +# +def delete_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new + + # Call the delete_mute_config method. + result = client.delete_mute_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_DeleteMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb new file mode 100644 index 000000000000..e7084636df2d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_DeleteNotificationConfig_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the delete_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_notification_config. +# +def delete_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new + + # Call the delete_notification_config method. + result = client.delete_notification_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb new file mode 100644 index 000000000000..f369d1ca9754 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_DeleteResourceValueConfig_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the delete_resource_value_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_resource_value_config. +# +def delete_resource_value_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new + + # Call the delete_resource_value_config method. + result = client.delete_resource_value_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_DeleteResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb new file mode 100644 index 000000000000..167844fa3f97 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_GetBigQueryExport_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the get_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_big_query_export. +# +def get_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new + + # Call the get_big_query_export method. + result = client.get_big_query_export request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb new file mode 100644 index 000000000000..e260df274f67 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_GetIamPolicy_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the get_iam_policy call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb new file mode 100644 index 000000000000..737f0b9b778a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_GetMuteConfig_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the get_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_mute_config. +# +def get_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new + + # Call the get_mute_config method. + result = client.get_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb new file mode 100644 index 000000000000..a6e6fe0bf43d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_GetNotificationConfig_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the get_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_notification_config. +# +def get_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new + + # Call the get_notification_config method. + result = client.get_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb new file mode 100644 index 000000000000..dca8397631b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_GetResourceValueConfig_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the get_resource_value_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_resource_value_config. +# +def get_resource_value_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new + + # Call the get_resource_value_config method. + result = client.get_resource_value_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb new file mode 100644 index 000000000000..97887b9c87b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_GetSimulation_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the get_simulation call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_simulation. +# +def get_simulation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new + + # Call the get_simulation method. + result = client.get_simulation request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Simulation. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetSimulation_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb new file mode 100644 index 000000000000..9e23b772526e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_GetSource_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the get_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_source. +# +def get_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new + + # Call the get_source method. + result = client.get_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb new file mode 100644 index 000000000000..1d27e0e2a2bd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_GetValuedResource_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the get_valued_resource call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_valued_resource. +# +def get_valued_resource + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new + + # Call the get_valued_resource method. + result = client.get_valued_resource request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::ValuedResource. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetValuedResource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb new file mode 100644 index 000000000000..1c83d2e734fb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_GroupFindings_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the group_findings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#group_findings. +# +def group_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new + + # Call the group_findings method. + result = client.group_findings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V2::GroupResult. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb new file mode 100644 index 000000000000..efd9cc9a111e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_ListAttackPaths_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the list_attack_paths call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_attack_paths. +# +def list_attack_paths + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new + + # Call the list_attack_paths method. + result = client.list_attack_paths request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V2::AttackPath. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListAttackPaths_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb new file mode 100644 index 000000000000..b499ded4d8b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_ListBigQueryExports_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the list_big_query_exports call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_big_query_exports. +# +def list_big_query_exports + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new + + # Call the list_big_query_exports method. + result = client.list_big_query_exports request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V2::BigQueryExport. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListBigQueryExports_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb new file mode 100644 index 000000000000..f8f726312d73 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_ListFindings_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the list_findings call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_findings. +# +def list_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new + + # Call the list_findings method. + result = client.list_findings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb new file mode 100644 index 000000000000..aa028407968b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_ListMuteConfigs_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the list_mute_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_mute_configs. +# +def list_mute_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new + + # Call the list_mute_configs method. + result = client.list_mute_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V2::MuteConfig. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListMuteConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb new file mode 100644 index 000000000000..421f44da22ce --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_ListNotificationConfigs_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the list_notification_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_notification_configs. +# +def list_notification_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new + + # Call the list_notification_configs method. + result = client.list_notification_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V2::NotificationConfig. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb new file mode 100644 index 000000000000..ebd23f97037d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_ListResourceValueConfigs_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the list_resource_value_configs call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_resource_value_configs. +# +def list_resource_value_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new + + # Call the list_resource_value_configs method. + result = client.list_resource_value_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb new file mode 100644 index 000000000000..0d014e61ce97 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_ListSources_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the list_sources call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_sources. +# +def list_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new + + # Call the list_sources method. + result = client.list_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V2::Source. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb new file mode 100644 index 000000000000..ff34383c5836 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_ListValuedResources_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the list_valued_resources call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_valued_resources. +# +def list_valued_resources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new + + # Call the list_valued_resources method. + result = client.list_valued_resources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenter::V2::ValuedResource. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListValuedResources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb new file mode 100644 index 000000000000..948f27b578d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_SetFindingState_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the set_finding_state call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_finding_state. +# +def set_finding_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new + + # Call the set_finding_state method. + result = client.set_finding_state request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb new file mode 100644 index 000000000000..357443d72dfc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_SetIamPolicy_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the set_iam_policy call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb new file mode 100644 index 000000000000..7928a7e3a85b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_SetMute_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the set_mute call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_mute. +# +def set_mute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new + + # Call the set_mute method. + result = client.set_mute request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_SetMute_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb new file mode 100644 index 000000000000..7a22e129a409 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_TestIamPermissions_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the test_iam_permissions call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb new file mode 100644 index 000000000000..c3357e841268 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_UpdateBigQueryExport_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the update_big_query_export call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_big_query_export. +# +def update_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new + + # Call the update_big_query_export method. + result = client.update_big_query_export request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb new file mode 100644 index 000000000000..58bb7f1196d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_UpdateExternalSystem_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the update_external_system call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_external_system. +# +def update_external_system + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new + + # Call the update_external_system method. + result = client.update_external_system request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::ExternalSystem. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateExternalSystem_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb new file mode 100644 index 000000000000..3d8d7bc0e599 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_UpdateFinding_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the update_finding call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_finding. +# +def update_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new + + # Call the update_finding method. + result = client.update_finding request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb new file mode 100644 index 000000000000..efa2c28e01be --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_UpdateMuteConfig_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the update_mute_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_mute_config. +# +def update_mute_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new + + # Call the update_mute_config method. + result = client.update_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb new file mode 100644 index 000000000000..50e827404937 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_UpdateNotificationConfig_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the update_notification_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_notification_config. +# +def update_notification_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new + + # Call the update_notification_config method. + result = client.update_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb new file mode 100644 index 000000000000..fb28fc12506d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_UpdateResourceValueConfig_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the update_resource_value_config call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_resource_value_config. +# +def update_resource_value_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new + + # Call the update_resource_value_config method. + result = client.update_resource_value_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb new file mode 100644 index 000000000000..828f608dee92 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_UpdateSecurityMarks_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the update_security_marks call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_security_marks. +# +def update_security_marks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new + + # Call the update_security_marks method. + result = client.update_security_marks request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::SecurityMarks. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb new file mode 100644 index 000000000000..7dad0281409d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycenter_v2_generated_SecurityCenter_UpdateSource_sync] +require "google/cloud/security_center/v2" + +## +# Snippet for the update_source call in the SecurityCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_source. +# +def update_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new + + # Call the update_source method. + result = client.update_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json b/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json new file mode 100644 index 000000000000..8b78714ab7d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json @@ -0,0 +1,1615 @@ +{ + "client_library": { + "name": "google-cloud-security_center-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.securitycenter.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync", + "title": "Snippet for the batch_create_resource_value_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#batch_create_resource_value_configs.", + "file": "security_center/batch_create_resource_value_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_resource_value_configs", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#batch_create_resource_value_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "BatchCreateResourceValueConfigs", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.BatchCreateResourceValueConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_BulkMuteFindings_sync", + "title": "Snippet for the bulk_mute_findings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#bulk_mute_findings.", + "file": "security_center/bulk_mute_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_mute_findings", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#bulk_mute_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "BulkMuteFindings", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.BulkMuteFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_CreateBigQueryExport_sync", + "title": "Snippet for the create_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_big_query_export.", + "file": "security_center/create_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateBigQueryExport", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_CreateFinding_sync", + "title": "Snippet for the create_finding call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_finding.", + "file": "security_center/create_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_finding", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::CreateFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateFinding", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateFinding", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_CreateMuteConfig_sync", + "title": "Snippet for the create_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_mute_config.", + "file": "security_center/create_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateMuteConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_CreateNotificationConfig_sync", + "title": "Snippet for the create_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_notification_config.", + "file": "security_center/create_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateNotificationConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_CreateSource_sync", + "title": "Snippet for the create_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_source.", + "file": "security_center/create_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_source", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::CreateSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateSource", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_DeleteBigQueryExport_sync", + "title": "Snippet for the delete_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_big_query_export.", + "file": "security_center/delete_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteBigQueryExport", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_DeleteMuteConfig_sync", + "title": "Snippet for the delete_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_mute_config.", + "file": "security_center/delete_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteMuteConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_DeleteNotificationConfig_sync", + "title": "Snippet for the delete_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_notification_config.", + "file": "security_center/delete_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteNotificationConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_DeleteResourceValueConfig_sync", + "title": "Snippet for the delete_resource_value_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_resource_value_config.", + "file": "security_center/delete_resource_value_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_resource_value_config", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteResourceValueConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_GetBigQueryExport_sync", + "title": "Snippet for the get_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_big_query_export.", + "file": "security_center/get_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetBigQueryExport", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_GetSimulation_sync", + "title": "Snippet for the get_simulation call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_simulation.", + "file": "security_center/get_simulation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_simulation", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_simulation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetSimulationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Simulation", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetSimulation", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetSimulation", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_GetValuedResource_sync", + "title": "Snippet for the get_valued_resource call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_valued_resource.", + "file": "security_center/get_valued_resource.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_valued_resource", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_valued_resource", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ValuedResource", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetValuedResource", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetValuedResource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_iam_policy.", + "file": "security_center/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetIamPolicy", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_GetMuteConfig_sync", + "title": "Snippet for the get_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_mute_config.", + "file": "security_center/get_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetMuteConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_GetNotificationConfig_sync", + "title": "Snippet for the get_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_notification_config.", + "file": "security_center/get_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetNotificationConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_GetResourceValueConfig_sync", + "title": "Snippet for the get_resource_value_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_resource_value_config.", + "file": "security_center/get_resource_value_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_resource_value_config", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ResourceValueConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetResourceValueConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_GetSource_sync", + "title": "Snippet for the get_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_source.", + "file": "security_center/get_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_source", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetSource", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_GroupFindings_sync", + "title": "Snippet for the group_findings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#group_findings.", + "file": "security_center/group_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "group_findings", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#group_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GroupFindings", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GroupFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_ListAttackPaths_sync", + "title": "Snippet for the list_attack_paths call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_attack_paths.", + "file": "security_center/list_attack_paths.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_attack_paths", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_attack_paths", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListAttackPaths", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListAttackPaths", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_ListBigQueryExports_sync", + "title": "Snippet for the list_big_query_exports call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_big_query_exports.", + "file": "security_center/list_big_query_exports.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_big_query_exports", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_big_query_exports", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListBigQueryExports", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListBigQueryExports", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_ListFindings_sync", + "title": "Snippet for the list_findings call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_findings.", + "file": "security_center/list_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_findings", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListFindingsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListFindings", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_ListMuteConfigs_sync", + "title": "Snippet for the list_mute_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_mute_configs.", + "file": "security_center/list_mute_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_mute_configs", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_mute_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListMuteConfigs", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListMuteConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_ListNotificationConfigs_sync", + "title": "Snippet for the list_notification_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_notification_configs.", + "file": "security_center/list_notification_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_notification_configs", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_notification_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListNotificationConfigs", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListNotificationConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_ListResourceValueConfigs_sync", + "title": "Snippet for the list_resource_value_configs call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_resource_value_configs.", + "file": "security_center/list_resource_value_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_resource_value_configs", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_resource_value_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListResourceValueConfigs", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListResourceValueConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_ListSources_sync", + "title": "Snippet for the list_sources call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_sources.", + "file": "security_center/list_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sources", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListSourcesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListSources", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListSources", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_ListValuedResources_sync", + "title": "Snippet for the list_valued_resources call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_valued_resources.", + "file": "security_center/list_valued_resources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_valued_resources", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_valued_resources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListValuedResources", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListValuedResources", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_SetFindingState_sync", + "title": "Snippet for the set_finding_state call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_finding_state.", + "file": "security_center/set_finding_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_finding_state", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_finding_state", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "SetFindingState", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetFindingState", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_iam_policy.", + "file": "security_center/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetIamPolicy", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_SetMute_sync", + "title": "Snippet for the set_mute call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_mute.", + "file": "security_center/set_mute.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_mute", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_mute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::SetMuteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "SetMute", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetMute", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#test_iam_permissions.", + "file": "security_center/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.TestIamPermissions", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateBigQueryExport_sync", + "title": "Snippet for the update_big_query_export call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_big_query_export.", + "file": "security_center/update_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_big_query_export", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateBigQueryExport", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateExternalSystem_sync", + "title": "Snippet for the update_external_system call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_external_system.", + "file": "security_center/update_external_system.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_external_system", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_external_system", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ExternalSystem", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateExternalSystem", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateExternalSystem", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateFinding_sync", + "title": "Snippet for the update_finding call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_finding.", + "file": "security_center/update_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_finding", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateFinding", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateFinding", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateMuteConfig_sync", + "title": "Snippet for the update_mute_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_mute_config.", + "file": "security_center/update_mute_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_mute_config", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateMuteConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateNotificationConfig_sync", + "title": "Snippet for the update_notification_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_notification_config.", + "file": "security_center/update_notification_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_notification_config", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateNotificationConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateResourceValueConfig_sync", + "title": "Snippet for the update_resource_value_config call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_resource_value_config.", + "file": "security_center/update_resource_value_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_resource_value_config", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ResourceValueConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateResourceValueConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateSecurityMarks_sync", + "title": "Snippet for the update_security_marks call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_security_marks.", + "file": "security_center/update_security_marks.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_security_marks", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_security_marks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::SecurityMarks", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSecurityMarks", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateSecurityMarks", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateSource_sync", + "title": "Snippet for the update_source call in the SecurityCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_source.", + "file": "security_center/update_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_source", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSource", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb new file mode 100644 index 000000000000..f30feef48b99 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/securitycenter/v2/securitycenter_service_pb" +require "google/cloud/securitycenter/v2/securitycenter_service_services_pb" +require "google/cloud/security_center/v2/security_center" + +class ::Google::Cloud::SecurityCenter::V2::SecurityCenter::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb new file mode 100644 index 000000000000..88ac82de925a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb @@ -0,0 +1,403 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/security_center/v2/security_center" + +class ::Google::Cloud::SecurityCenter::V2::SecurityCenter::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_big_query_export_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.big_query_export_path organization: "value0", location: "value1", export: "value2" + assert_equal "organizations/value0/locations/value1/bigQueryExports/value2", path + + path = client.big_query_export_path folder: "value0", location: "value1", export: "value2" + assert_equal "folders/value0/locations/value1/bigQueryExports/value2", path + + path = client.big_query_export_path project: "value0", location: "value1", export: "value2" + assert_equal "projects/value0/locations/value1/bigQueryExports/value2", path + end + end + + def test_dlp_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dlp_job_path project: "value0", dlp_job: "value1" + assert_equal "projects/value0/dlpJobs/value1", path + + path = client.dlp_job_path project: "value0", location: "value1", dlp_job: "value2" + assert_equal "projects/value0/locations/value1/dlpJobs/value2", path + end + end + + def test_external_system_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.external_system_path organization: "value0", source: "value1", finding: "value2", externalsystem: "value3" + assert_equal "organizations/value0/sources/value1/findings/value2/externalSystems/value3", path + + path = client.external_system_path organization: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" + assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", path + + path = client.external_system_path folder: "value0", source: "value1", finding: "value2", externalsystem: "value3" + assert_equal "folders/value0/sources/value1/findings/value2/externalSystems/value3", path + + path = client.external_system_path folder: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" + assert_equal "folders/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", path + + path = client.external_system_path project: "value0", source: "value1", finding: "value2", externalsystem: "value3" + assert_equal "projects/value0/sources/value1/findings/value2/externalSystems/value3", path + + path = client.external_system_path project: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" + assert_equal "projects/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", path + end + end + + def test_finding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.finding_path organization: "value0", source: "value1", finding: "value2" + assert_equal "organizations/value0/sources/value1/findings/value2", path + + path = client.finding_path organization: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3", path + + path = client.finding_path folder: "value0", source: "value1", finding: "value2" + assert_equal "folders/value0/sources/value1/findings/value2", path + + path = client.finding_path folder: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "folders/value0/sources/value1/locations/value2/findings/value3", path + + path = client.finding_path project: "value0", source: "value1", finding: "value2" + assert_equal "projects/value0/sources/value1/findings/value2", path + + path = client.finding_path project: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "projects/value0/sources/value1/locations/value2/findings/value3", path + end + end + + def test_folder_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_path folder: "value0" + assert_equal "folders/value0", path + end + end + + def test_folder_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_location_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_mute_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.mute_config_path organization: "value0", mute_config: "value1" + assert_equal "organizations/value0/muteConfigs/value1", path + + path = client.mute_config_path organization: "value0", location: "value1", mute_config: "value2" + assert_equal "organizations/value0/locations/value1/muteConfigs/value2", path + + path = client.mute_config_path folder: "value0", mute_config: "value1" + assert_equal "folders/value0/muteConfigs/value1", path + + path = client.mute_config_path folder: "value0", location: "value1", mute_config: "value2" + assert_equal "folders/value0/locations/value1/muteConfigs/value2", path + + path = client.mute_config_path project: "value0", mute_config: "value1" + assert_equal "projects/value0/muteConfigs/value1", path + + path = client.mute_config_path project: "value0", location: "value1", mute_config: "value2" + assert_equal "projects/value0/locations/value1/muteConfigs/value2", path + end + end + + def test_notification_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.notification_config_path organization: "value0", location: "value1", notification_config: "value2" + assert_equal "organizations/value0/locations/value1/notificationConfigs/value2", path + + path = client.notification_config_path folder: "value0", location: "value1", notification_config: "value2" + assert_equal "folders/value0/locations/value1/notificationConfigs/value2", path + + path = client.notification_config_path project: "value0", location: "value1", notification_config: "value2" + assert_equal "projects/value0/locations/value1/notificationConfigs/value2", path + end + end + + def test_organization_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_path organization: "value0" + assert_equal "organizations/value0", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_organization_valued_resource_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_valued_resource_path organization: "value0", location: "value1", simulation: "value2", valued_resource: "value3" + assert_equal "organizations/value0/locations/value1/simulations/value2/valuedResources/value3", path + end + end + + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path organization: "value0", constraint_name: "value1" + assert_equal "organizations/value0/policies/value1", path + + path = client.policy_path folder: "value0", constraint_name: "value1" + assert_equal "folders/value0/policies/value1", path + + path = client.policy_path project: "value0", constraint_name: "value1" + assert_equal "projects/value0/policies/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_resource_value_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.resource_value_config_path organization: "value0", resource_value_config: "value1" + assert_equal "organizations/value0/resourceValueConfigs/value1", path + + path = client.resource_value_config_path organization: "value0", location: "value1", resource_value_config: "value2" + assert_equal "organizations/value0/locations/value1/resourceValueConfigs/value2", path + end + end + + def test_security_marks_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.security_marks_path organization: "value0", asset: "value1" + assert_equal "organizations/value0/assets/value1/securityMarks", path + + path = client.security_marks_path organization: "value0", source: "value1", finding: "value2" + assert_equal "organizations/value0/sources/value1/findings/value2/securityMarks", path + + path = client.security_marks_path organization: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3/securityMarks", path + + path = client.security_marks_path folder: "value0", asset: "value1" + assert_equal "folders/value0/assets/value1/securityMarks", path + + path = client.security_marks_path folder: "value0", source: "value1", finding: "value2" + assert_equal "folders/value0/sources/value1/findings/value2/securityMarks", path + + path = client.security_marks_path folder: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "folders/value0/sources/value1/locations/value2/findings/value3/securityMarks", path + + path = client.security_marks_path project: "value0", asset: "value1" + assert_equal "projects/value0/assets/value1/securityMarks", path + + path = client.security_marks_path project: "value0", source: "value1", finding: "value2" + assert_equal "projects/value0/sources/value1/findings/value2/securityMarks", path + + path = client.security_marks_path project: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "projects/value0/sources/value1/locations/value2/findings/value3/securityMarks", path + end + end + + def test_simulation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.simulation_path organization: "value0", simulation: "value1" + assert_equal "organizations/value0/simulations/value1", path + + path = client.simulation_path organization: "value0", location: "value1", simluation: "value2" + assert_equal "organizations/value0/locations/value1/simulations/value2", path + end + end + + def test_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.source_path organization: "value0", source: "value1" + assert_equal "organizations/value0/sources/value1", path + + path = client.source_path folder: "value0", source: "value1" + assert_equal "folders/value0/sources/value1", path + + path = client.source_path project: "value0", source: "value1" + assert_equal "projects/value0/sources/value1", path + end + end + + def test_table_data_profile_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_data_profile_path project: "value0", table_profile: "value1" + assert_equal "projects/value0/tableProfiles/value1", path + + path = client.table_data_profile_path project: "value0", location: "value1", table_profile: "value2" + assert_equal "projects/value0/locations/value1/tableProfiles/value2", path + end + end + + def test_topic_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.topic_path project: "value0", topic: "value1" + assert_equal "projects/value0/topics/value1", path + end + end + + def test_valued_resource_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.valued_resource_path organization: "value0", simulation: "value1", valued_resource: "value2" + assert_equal "organizations/value0/simulations/value1/valuedResources/value2", path + + path = client.valued_resource_path organization: "value0", location: "value1", simluation: "value2", valued_resource: "value3" + assert_equal "organizations/value0/locations/value1/simulations/value2/valuedResources/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb new file mode 100644 index 000000000000..f48ffed9375a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb @@ -0,0 +1,2311 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/securitycenter/v2/securitycenter_service_pb" +require "google/cloud/security_center/v2/security_center/rest" + + +class ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_batch_create_resource_value_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_create_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_batch_create_resource_value_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_create_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.batch_create_resource_value_configs parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.batch_create_resource_value_configs({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_create_resource_value_configs_client_stub.call_count + end + end + end + + def test_bulk_mute_findings + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + mute_state = :MUTE_STATE_UNSPECIFIED + + bulk_mute_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_bulk_mute_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_mute_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.bulk_mute_findings({ parent: parent, filter: filter, mute_state: mute_state }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.bulk_mute_findings parent: parent, filter: filter, mute_state: mute_state do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_state: mute_state) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.bulk_mute_findings({ parent: parent, filter: filter, mute_state: mute_state }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_state: mute_state), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_mute_findings_client_stub.call_count + end + end + end + + def test_create_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + big_query_export = {} + big_query_export_id = "hello world" + + create_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_create_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_big_query_export ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_big_query_export(::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_big_query_export_client_stub.call_count + end + end + end + + def test_create_finding + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + finding_id = "hello world" + finding = {} + + create_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_create_finding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_finding parent: parent, finding_id: finding_id, finding: finding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_finding ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_finding(::Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_finding_client_stub.call_count + end + end + end + + def test_create_mute_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + mute_config = {} + mute_config_id = "hello world" + + create_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_create_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_mute_config ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_mute_config(::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_mute_config_client_stub.call_count + end + end + end + + def test_create_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + config_id = "hello world" + notification_config = {} + + create_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_create_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_notification_config ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_notification_config(::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_notification_config_client_stub.call_count + end + end + end + + def test_create_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source = {} + + create_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_create_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_source({ parent: parent, source: source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_source parent: parent, source: source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_source ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new(parent: parent, source: source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_source({ parent: parent, source: source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_source(::Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new(parent: parent, source: source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_source_client_stub.call_count + end + end + end + + def test_delete_big_query_export + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_big_query_export({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_big_query_export name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_big_query_export ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_big_query_export({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_big_query_export(::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_big_query_export_client_stub.call_count + end + end + end + + def test_delete_mute_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_mute_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_mute_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_mute_config ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_mute_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_mute_config(::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_mute_config_client_stub.call_count + end + end + end + + def test_delete_notification_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_notification_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_notification_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_notification_config ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_notification_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_notification_config(::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_notification_config_client_stub.call_count + end + end + end + + def test_delete_resource_value_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_resource_value_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_resource_value_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_resource_value_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_resource_value_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_resource_value_config_client_stub.call_count + end + end + end + + def test_get_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_big_query_export({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_big_query_export name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_big_query_export ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_big_query_export({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_big_query_export(::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_big_query_export_client_stub.call_count + end + end + end + + def test_get_simulation + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::Simulation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_simulation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_simulation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_simulation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_simulation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_simulation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_simulation ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_simulation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_simulation(::Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_simulation_client_stub.call_count + end + end + end + + def test_get_valued_resource + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ValuedResource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_valued_resource_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_valued_resource_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_valued_resource_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_valued_resource({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_valued_resource name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_valued_resource ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_valued_resource({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_valued_resource(::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_valued_resource_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_get_mute_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_mute_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_mute_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_mute_config ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_mute_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_mute_config(::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_mute_config_client_stub.call_count + end + end + end + + def test_get_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_notification_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_notification_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_notification_config ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_notification_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_notification_config(::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_notification_config_client_stub.call_count + end + end + end + + def test_get_resource_value_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_resource_value_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_resource_value_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_resource_value_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_resource_value_config ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_resource_value_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_resource_value_config(::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_resource_value_config_client_stub.call_count + end + end + end + + def test_get_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_source ::Google::Cloud::SecurityCenter::V2::GetSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_source(::Google::Cloud::SecurityCenter::V2::GetSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_source_client_stub.call_count + end + end + end + + def test_group_findings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + page_token = "hello world" + page_size = 42 + + group_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_group_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, group_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.group_findings({ parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.group_findings parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.group_findings ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.group_findings({ parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.group_findings(::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, group_findings_client_stub.call_count + end + end + end + + def test_list_attack_paths + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + + list_attack_paths_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_attack_paths_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_attack_paths_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_attack_paths ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_attack_paths(::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_attack_paths_client_stub.call_count + end + end + end + + def test_list_big_query_exports + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_big_query_exports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_big_query_exports_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_big_query_exports_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_big_query_exports ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_big_query_exports(::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_big_query_exports_client_stub.call_count + end + end + end + + def test_list_findings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_findings({ parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_findings parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_findings ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_findings({ parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_findings(::Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_count + end + end + end + + def test_list_mute_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_mute_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_mute_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_mute_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_mute_configs ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_mute_configs(::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_mute_configs_client_stub.call_count + end + end + end + + def test_list_notification_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_notification_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_notification_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_notification_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_notification_configs ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_notification_configs(::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_notification_configs_client_stub.call_count + end + end + end + + def test_list_resource_value_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_resource_value_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_resource_value_configs_client_stub.call_count + end + end + end + + def test_list_sources + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ListSourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_sources parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_sources ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_sources(::Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_sources_client_stub.call_count + end + end + end + + def test_list_valued_resources + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + + list_valued_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_valued_resources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_valued_resources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_valued_resources ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_valued_resources(::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_valued_resources_client_stub.call_count + end + end + end + + def test_set_finding_state + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + state = :STATE_UNSPECIFIED + + set_finding_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_set_finding_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_finding_state_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_finding_state({ name: name, state: state }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_finding_state name: name, state: state do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_finding_state ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_finding_state({ name: name, state: state }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_finding_state(::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_finding_state_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_set_mute + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + mute = :MUTE_UNSPECIFIED + + set_mute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_set_mute_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_mute_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_mute({ name: name, mute: mute }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_mute name: name, mute: mute do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_mute ::Google::Cloud::SecurityCenter::V2::SetMuteRequest.new(name: name, mute: mute) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_mute({ name: name, mute: mute }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_mute(::Google::Cloud::SecurityCenter::V2::SetMuteRequest.new(name: name, mute: mute), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_mute_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_update_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + big_query_export = {} + update_mask = {} + + update_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_big_query_export ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_big_query_export(::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_big_query_export_client_stub.call_count + end + end + end + + def test_update_external_system + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ExternalSystem.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + external_system = {} + update_mask = {} + + update_external_system_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_external_system_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_external_system_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_external_system external_system: external_system, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_external_system ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_external_system({ external_system: external_system, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_external_system(::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_external_system_client_stub.call_count + end + end + end + + def test_update_finding + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + finding = {} + update_mask = {} + + update_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_finding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_finding({ finding: finding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_finding finding: finding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_finding ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_finding({ finding: finding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_finding(::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_finding_client_stub.call_count + end + end + end + + def test_update_mute_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + mute_config = {} + update_mask = {} + + update_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_mute_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_mute_config mute_config: mute_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_mute_config ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_mute_config(::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_mute_config_client_stub.call_count + end + end + end + + def test_update_notification_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + notification_config = {} + update_mask = {} + + update_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_notification_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_notification_config notification_config: notification_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_notification_config ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_notification_config(::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_notification_config_client_stub.call_count + end + end + end + + def test_update_resource_value_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource_value_config = {} + update_mask = {} + + update_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_resource_value_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_resource_value_config ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_resource_value_config(::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_resource_value_config_client_stub.call_count + end + end + end + + def test_update_security_marks + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::SecurityMarks.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + security_marks = {} + update_mask = {} + + update_security_marks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_marks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_security_marks_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_security_marks security_marks: security_marks, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_security_marks ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_security_marks(::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_security_marks_client_stub.call_count + end + end + end + + def test_update_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::Source.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + source = {} + update_mask = {} + + update_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_source({ source: source, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_source source: source, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_source ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_source({ source: source, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_source(::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new(source: source, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_source_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb new file mode 100644 index 000000000000..b3295b2bd5b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb @@ -0,0 +1,2592 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/securitycenter/v2/securitycenter_service_pb" +require "google/cloud/security_center/v2/security_center" + +class ::Google::Cloud::SecurityCenter::V2::SecurityCenter::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_batch_create_resource_value_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + batch_create_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_resource_value_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateResourceValueConfigRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_create_resource_value_configs parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_create_resource_value_configs({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_create_resource_value_configs_client_stub.call_rpc_count + end + end + + def test_bulk_mute_findings + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + mute_state = :MUTE_STATE_UNSPECIFIED + + bulk_mute_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_mute_findings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal :MUTE_STATE_UNSPECIFIED, request["mute_state"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_mute_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.bulk_mute_findings({ parent: parent, filter: filter, mute_state: mute_state }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.bulk_mute_findings parent: parent, filter: filter, mute_state: mute_state do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_state: mute_state) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.bulk_mute_findings({ parent: parent, filter: filter, mute_state: mute_state }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_state: mute_state), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_mute_findings_client_stub.call_rpc_count + end + end + + def test_create_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + big_query_export = {} + big_query_export_id = "hello world" + + create_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::BigQueryExport), request["big_query_export"] + assert_equal "hello world", request["big_query_export_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_big_query_export ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_big_query_export(::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_big_query_export_client_stub.call_rpc_count + end + end + + def test_create_finding + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + finding_id = "hello world" + finding = {} + + create_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_finding, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["finding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Finding), request["finding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_finding parent: parent, finding_id: finding_id, finding: finding do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_finding ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_finding(::Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_finding_client_stub.call_rpc_count + end + end + + def test_create_mute_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + mute_config = {} + mute_config_id = "hello world" + + create_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::MuteConfig), request["mute_config"] + assert_equal "hello world", request["mute_config_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_mute_config ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_mute_config(::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_mute_config_client_stub.call_rpc_count + end + end + + def test_create_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + config_id = "hello world" + notification_config = {} + + create_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::NotificationConfig), request["notification_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_notification_config ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_notification_config(::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_notification_config_client_stub.call_rpc_count + end + end + + def test_create_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source = {} + + create_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Source), request["source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_source({ parent: parent, source: source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_source parent: parent, source: source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_source ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new(parent: parent, source: source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_source({ parent: parent, source: source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_source(::Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new(parent: parent, source: source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_source_client_stub.call_rpc_count + end + end + + def test_delete_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_big_query_export({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_big_query_export name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_big_query_export ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_big_query_export({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_big_query_export(::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_big_query_export_client_stub.call_rpc_count + end + end + + def test_delete_mute_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_mute_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_mute_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_mute_config ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_mute_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_mute_config(::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_mute_config_client_stub.call_rpc_count + end + end + + def test_delete_notification_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_notification_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_notification_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_notification_config ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_notification_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_notification_config(::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_notification_config_client_stub.call_rpc_count + end + end + + def test_delete_resource_value_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_resource_value_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_resource_value_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_resource_value_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_resource_value_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_resource_value_config_client_stub.call_rpc_count + end + end + + def test_get_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_big_query_export({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_big_query_export name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_big_query_export ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_big_query_export({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_big_query_export(::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_big_query_export_client_stub.call_rpc_count + end + end + + def test_get_simulation + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::Simulation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_simulation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_simulation, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_simulation_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_simulation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_simulation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_simulation ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_simulation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_simulation(::Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_simulation_client_stub.call_rpc_count + end + end + + def test_get_valued_resource + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ValuedResource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_valued_resource_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_valued_resource, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_valued_resource_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_valued_resource({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_valued_resource name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_valued_resource ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_valued_resource({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_valued_resource(::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_valued_resource_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_get_mute_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_mute_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_mute_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_mute_config ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_mute_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_mute_config(::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_mute_config_client_stub.call_rpc_count + end + end + + def test_get_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_notification_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_notification_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_notification_config ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_notification_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_notification_config(::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_notification_config_client_stub.call_rpc_count + end + end + + def test_get_resource_value_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_resource_value_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_resource_value_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_resource_value_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_resource_value_config ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_resource_value_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_resource_value_config(::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_resource_value_config_client_stub.call_rpc_count + end + end + + def test_get_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_source ::Google::Cloud::SecurityCenter::V2::GetSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_source({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_source(::Google::Cloud::SecurityCenter::V2::GetSourceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_source_client_stub.call_rpc_count + end + end + + def test_group_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + group_by = "hello world" + page_token = "hello world" + page_size = 42 + + group_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :group_findings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["group_by"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, group_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.group_findings({ parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.group_findings parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.group_findings ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.group_findings({ parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.group_findings(::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, group_findings_client_stub.call_rpc_count + end + end + + def test_list_attack_paths + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + + list_attack_paths_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_attack_paths, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_attack_paths_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_attack_paths ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_attack_paths(::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_attack_paths_client_stub.call_rpc_count + end + end + + def test_list_big_query_exports + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_big_query_exports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_big_query_exports, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_big_query_exports_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_big_query_exports ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_big_query_exports(::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_big_query_exports_client_stub.call_rpc_count + end + end + + def test_list_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + order_by = "hello world" + field_mask = {} + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_findings, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_findings_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_findings({ parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_findings parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_findings ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_findings({ parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_findings(::Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_rpc_count + end + end + + def test_list_mute_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_mute_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_mute_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_mute_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_mute_configs ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_mute_configs(::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_mute_configs_client_stub.call_rpc_count + end + end + + def test_list_notification_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_notification_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_notification_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_notification_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_notification_configs ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_notification_configs(::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_notification_configs_client_stub.call_rpc_count + end + end + + def test_list_resource_value_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_resource_value_configs, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_resource_value_configs_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_resource_value_configs_client_stub.call_rpc_count + end + end + + def test_list_sources + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ListSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sources, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_sources parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_sources ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_sources(::Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_sources_client_stub.call_rpc_count + end + end + + def test_list_valued_resources + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + order_by = "hello world" + + list_valued_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_valued_resources, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_valued_resources_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_valued_resources ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_valued_resources(::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_valued_resources_client_stub.call_rpc_count + end + end + + def test_set_finding_state + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + state = :STATE_UNSPECIFIED + + set_finding_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_finding_state, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest, request + assert_equal "hello world", request["name"] + assert_equal :STATE_UNSPECIFIED, request["state"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_finding_state_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_finding_state({ name: name, state: state }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_finding_state name: name, state: state do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_finding_state ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_finding_state({ name: name, state: state }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_finding_state(::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_finding_state_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_mute + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + mute = :MUTE_UNSPECIFIED + + set_mute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_mute, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::SetMuteRequest, request + assert_equal "hello world", request["name"] + assert_equal :MUTE_UNSPECIFIED, request["mute"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_mute_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_mute({ name: name, mute: mute }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_mute name: name, mute: mute do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_mute ::Google::Cloud::SecurityCenter::V2::SetMuteRequest.new(name: name, mute: mute) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_mute({ name: name, mute: mute }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_mute(::Google::Cloud::SecurityCenter::V2::SetMuteRequest.new(name: name, mute: mute), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_mute_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_update_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + big_query_export = {} + update_mask = {} + + update_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_big_query_export, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::BigQueryExport), request["big_query_export"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_big_query_export_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_big_query_export ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_big_query_export(::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_big_query_export_client_stub.call_rpc_count + end + end + + def test_update_external_system + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ExternalSystem.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + external_system = {} + update_mask = {} + + update_external_system_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_external_system, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::ExternalSystem), request["external_system"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_external_system_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_external_system external_system: external_system, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_external_system ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_external_system({ external_system: external_system, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_external_system(::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_external_system_client_stub.call_rpc_count + end + end + + def test_update_finding + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + finding = {} + update_mask = {} + + update_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_finding, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Finding), request["finding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_finding({ finding: finding, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_finding finding: finding, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_finding ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_finding({ finding: finding, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_finding(::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_finding_client_stub.call_rpc_count + end + end + + def test_update_mute_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + mute_config = {} + update_mask = {} + + update_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_mute_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::MuteConfig), request["mute_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_mute_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_mute_config mute_config: mute_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_mute_config ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_mute_config(::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_mute_config_client_stub.call_rpc_count + end + end + + def test_update_notification_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + notification_config = {} + update_mask = {} + + update_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_notification_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::NotificationConfig), request["notification_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_notification_config notification_config: notification_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_notification_config ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_notification_config(::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_notification_config_client_stub.call_rpc_count + end + end + + def test_update_resource_value_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource_value_config = {} + update_mask = {} + + update_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_resource_value_config, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig), request["resource_value_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_resource_value_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_resource_value_config ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_resource_value_config(::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_resource_value_config_client_stub.call_rpc_count + end + end + + def test_update_security_marks + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::SecurityMarks.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + security_marks = {} + update_mask = {} + + update_security_marks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_security_marks, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::SecurityMarks), request["security_marks"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_security_marks_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_security_marks security_marks: security_marks, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_security_marks ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_security_marks({ security_marks: security_marks, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_security_marks(::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_security_marks_client_stub.call_rpc_count + end + end + + def test_update_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::Source.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + source = {} + update_mask = {} + + update_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_source, name + assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Source), request["source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_source({ source: source, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_source source: source, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_source ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_source({ source: source, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_source(::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new(source: source, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_source_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/helper.rb b/owl-bot-staging/google-cloud-security_center-v2/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v1/.gitignore b/owl-bot-staging/google-cloud-security_center_management-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/.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-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center_management-v1/.repo-metadata.json new file mode 100644 index 000000000000..1d992fcf1320 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/.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-v1/latest", + "distribution_name": "google-cloud-security_center_management-v1", + "is_cloud": true, + "language": "ruby", + "name": "securitycentermanagement", + "name_pretty": "Security Command Center Management V1 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. Note that google-cloud-security_center_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center_management instead. See the readme for more details.", + "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-v1/.rubocop.yml b/owl-bot-staging/google-cloud-security_center_management-v1/.rubocop.yml new file mode 100644 index 000000000000..a9f2a1f499a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security_center_management-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-security_center_management-v1.rb" diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/.toys.rb b/owl-bot-staging/google-cloud-security_center_management-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/.yardopts b/owl-bot-staging/google-cloud-security_center_management-v1/.yardopts new file mode 100644 index 000000000000..e42b7f692e9a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Security Command Center Management V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center_management-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..2e810e8e608e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security_center_management-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-security_center_management-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/security_center_management/v1" + +client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new 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/v1" + +::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-security_center_management-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/security_center_management/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center_management-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/Gemfile b/owl-bot-staging/google-cloud-security_center_management-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-v1/LICENSE.md b/owl-bot-staging/google-cloud-security_center_management-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/README.md b/owl-bot-staging/google-cloud-security_center_management-v1/README.md new file mode 100644 index 000000000000..6664a13aefd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Security Command Center Management V1 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. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Security Command Center Management V1 API. Most users should consider using +the main client gem, +[google-cloud-security_center_management](https://rubygems.org/gems/google-cloud-security_center_management). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-security_center_management-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/securitycentermanagement.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/security_center_management/v1" + +client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new +request = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new # (request fields as keyword arguments...) +response = client.list_effective_security_health_analytics_custom_modules request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/reference/security-center-management/rest) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/security_center_management/v1" +require "logger" + +client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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-v1/Rakefile b/owl-bot-staging/google-cloud-security_center_management-v1/Rakefile new file mode 100644 index 000000000000..48a25ec27530 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-security_center_management-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/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-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security_center_management-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-security_center_management-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-security_center_management-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security_center_management-v1" + header "google-cloud-security_center_management-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security_center_management-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security_center_management-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-security_center_management-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-security_center_management-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center_management-v1/gapic_metadata.json new file mode 100644 index 000000000000..a1ebc19f46fd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/gapic_metadata.json @@ -0,0 +1,123 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.securitycentermanagement.v1", + "libraryPackage": "::Google::Cloud::SecurityCenterManagement::V1", + "services": { + "SecurityCenterManagement": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client", + "rpcs": { + "ListEffectiveSecurityHealthAnalyticsCustomModules": { + "methods": [ + "list_effective_security_health_analytics_custom_modules" + ] + }, + "GetEffectiveSecurityHealthAnalyticsCustomModule": { + "methods": [ + "get_effective_security_health_analytics_custom_module" + ] + }, + "ListSecurityHealthAnalyticsCustomModules": { + "methods": [ + "list_security_health_analytics_custom_modules" + ] + }, + "ListDescendantSecurityHealthAnalyticsCustomModules": { + "methods": [ + "list_descendant_security_health_analytics_custom_modules" + ] + }, + "GetSecurityHealthAnalyticsCustomModule": { + "methods": [ + "get_security_health_analytics_custom_module" + ] + }, + "CreateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "create_security_health_analytics_custom_module" + ] + }, + "UpdateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "update_security_health_analytics_custom_module" + ] + }, + "DeleteSecurityHealthAnalyticsCustomModule": { + "methods": [ + "delete_security_health_analytics_custom_module" + ] + }, + "SimulateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "simulate_security_health_analytics_custom_module" + ] + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "methods": [ + "list_effective_event_threat_detection_custom_modules" + ] + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "methods": [ + "get_effective_event_threat_detection_custom_module" + ] + }, + "ListEventThreatDetectionCustomModules": { + "methods": [ + "list_event_threat_detection_custom_modules" + ] + }, + "ListDescendantEventThreatDetectionCustomModules": { + "methods": [ + "list_descendant_event_threat_detection_custom_modules" + ] + }, + "GetEventThreatDetectionCustomModule": { + "methods": [ + "get_event_threat_detection_custom_module" + ] + }, + "CreateEventThreatDetectionCustomModule": { + "methods": [ + "create_event_threat_detection_custom_module" + ] + }, + "UpdateEventThreatDetectionCustomModule": { + "methods": [ + "update_event_threat_detection_custom_module" + ] + }, + "DeleteEventThreatDetectionCustomModule": { + "methods": [ + "delete_event_threat_detection_custom_module" + ] + }, + "ValidateEventThreatDetectionCustomModule": { + "methods": [ + "validate_event_threat_detection_custom_module" + ] + }, + "GetSecurityCenterService": { + "methods": [ + "get_security_center_service" + ] + }, + "ListSecurityCenterServices": { + "methods": [ + "list_security_center_services" + ] + }, + "UpdateSecurityCenterService": { + "methods": [ + "update_security_center_service" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/google-cloud-security_center_management-v1.gemspec b/owl-bot-staging/google-cloud-security_center_management-v1/google-cloud-security_center_management-v1.gemspec new file mode 100644 index 000000000000..6f9c77776f8d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/google-cloud-security_center_management-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security_center_management/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security_center_management-v1" + gem.version = Google::Cloud::SecurityCenterManagement::V1::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. Note that google-cloud-security_center_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center_management instead. See the readme for more details." + 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") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google-cloud-security_center_management-v1.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google-cloud-security_center_management-v1.rb new file mode 100644 index 000000000000..64c9d0aec5c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google-cloud-security_center_management-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/security_center_management/v1" diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1.rb new file mode 100644 index 000000000000..a6774f1f6c46 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center_management/v1/security_center_management" +require "google/cloud/security_center_management/v1/version" + +module Google + module Cloud + module SecurityCenterManagement + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/security_center_management/v1" + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/security_center_management/v1" + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/security_center_management/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/bindings_override.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/bindings_override.rb new file mode 100644 index 000000000000..a6a097cc314f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module SecurityCenterManagement + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/security_center_management/v1/rest" + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecurityCenterManagement"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/rest.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/rest.rb new file mode 100644 index 000000000000..26d917a7bf92 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/security_center_management/v1/security_center_management/rest" +require "google/cloud/security_center_management/v1/bindings_override" +require "google/cloud/security_center_management/v1/version" + +module Google + module Cloud + module SecurityCenterManagement + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/security_center_management/v1/rest" + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management.rb new file mode 100644 index 000000000000..f906e0bc11fd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security_center_management/v1/version" + +require "google/cloud/security_center_management/v1/security_center_management/credentials" +require "google/cloud/security_center_management/v1/security_center_management/paths" +require "google/cloud/security_center_management/v1/security_center_management/client" +require "google/cloud/security_center_management/v1/security_center_management/rest" + +module Google + module Cloud + module SecurityCenterManagement + module V1 + ## + # Service describing handlers for resources + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/security_center_management/v1/security_center_management" + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/security_center_management/v1/security_center_management/rest" + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + module SecurityCenterManagement + end + end + end + end +end + +helper_path = ::File.join __dir__, "security_center_management", "helpers.rb" +require "google/cloud/security_center_management/v1/security_center_management/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.rb new file mode 100644 index 000000000000..ddcb9e67922d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.rb @@ -0,0 +1,2792 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securitycentermanagement/v1/security_center_management_pb" +require "google/cloud/location" + +module Google + module Cloud + module SecurityCenterManagement + module V1 + module SecurityCenterManagement + ## + # Client for the SecurityCenterManagement service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycentermanagement.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :security_center_management_stub + + ## + # Configure the SecurityCenterManagement Client class. + # + # See {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenterManagement clients + # ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecurityCenterManagement", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.simulate_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.simulate_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_effective_event_threat_detection_custom_modules.timeout = 60.0 + default_config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_effective_event_threat_detection_custom_module.timeout = 60.0 + default_config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_event_threat_detection_custom_modules.timeout = 60.0 + default_config.rpcs.list_event_threat_detection_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout = 60.0 + default_config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_event_threat_detection_custom_module.timeout = 60.0 + default_config.rpcs.get_event_threat_detection_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_event_threat_detection_custom_module.timeout = 60.0 + + default_config.rpcs.update_event_threat_detection_custom_module.timeout = 60.0 + + default_config.rpcs.delete_event_threat_detection_custom_module.timeout = 60.0 + + default_config.rpcs.validate_event_threat_detection_custom_module.timeout = 60.0 + default_config.rpcs.validate_event_threat_detection_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenterManagement Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @security_center_management_stub.universe_domain + end + + ## + # Create a new SecurityCenterManagement client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecurityCenterManagement client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/securitycentermanagement/v1/security_center_management_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @security_center_management_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @security_center_management_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @security_center_management_stub.endpoint + config.universe_domain = @security_center_management_stub.universe_domain + config.logger = @security_center_management_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @security_center_management_stub.logger + end + + # Service calls + + ## + # Returns a list of all + # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule EffectiveSecurityHealthAnalyticsCustomModule} + # resources for the given parent. This includes resident modules defined at + # the scope of the parent, and inherited modules, inherited from ancestor + # organizations, folders, and projects (no descendants). + # + # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list effective custom modules, in one of the + # following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_effective_security_health_analytics_custom_modules method. + # result = client.list_effective_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_effective_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :list_effective_security_health_analytics_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_effective_security_health_analytics_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single + # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule EffectiveSecurityHealthAnalyticsCustomModule}. + # + # @overload get_effective_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_effective_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full resource name of the custom module, specified in one of + # the following formats: + # + # * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + # * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + # * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_effective_security_health_analytics_custom_module method. + # result = client.get_effective_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p result + # + def get_effective_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :get_effective_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # resources for the given parent. This includes resident modules defined at + # the scope of the parent, and inherited modules, inherited from ancestor + # organizations, folders, and projects (no descendants). + # + # @overload list_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent organization, folder, or project in which to + # list custom modules, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_security_health_analytics_custom_modules method. + # result = client.list_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :list_security_health_analytics_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_security_health_analytics_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all resident + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # resources under the given organization, folder, or project and all of its + # descendants. + # + # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent organization, folder, or project in which to + # list custom modules, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_descendant_security_health_analytics_custom_modules method. + # result = client.list_descendant_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_descendant_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :list_descendant_security_health_analytics_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_descendant_security_health_analytics_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule}. + # + # @overload get_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource, in the format + # `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_security_health_analytics_custom_module method. + # result = client.get_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def get_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :get_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # at the scope of the given organization, folder, or project, and also + # creates inherited `SecurityHealthAnalyticsCustomModule` resources for all + # folders and projects that are descendants of the given parent. These + # modules are enabled by default. + # + # @overload create_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil, validate_only: nil) + # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent organization, folder, or project of the + # module, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. The resource being created. + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be created. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to create the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the create_security_health_analytics_custom_module method. + # result = client.create_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def create_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :create_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # under the given name based on the given update mask. Updating the + # enablement state is supported on both resident and inherited modules + # (though resident modules cannot have an enablement state of "inherited"). + # Updating the display name and custom configuration of a module is supported + # on resident modules only. + # + # @overload update_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_security_health_analytics_custom_module(update_mask: nil, security_health_analytics_custom_module: nil, validate_only: nil) + # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to update. The following values are valid: + # + # * `custom_config` + # * `enablement_state` + # + # If you omit this field or set it to the wildcard value `*`, then all + # eligible fields are updated. + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. The resource being updated. + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be updated. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to update the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the update_security_health_analytics_custom_module method. + # result = client.update_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def update_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.security_health_analytics_custom_module&.name + header_params["security_health_analytics_custom_module.name"] = request.security_health_analytics_custom_module.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :update_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # and all of its descendants in the resource hierarchy. This method is only + # supported for resident custom modules. + # + # @overload delete_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_security_health_analytics_custom_module(name: nil, validate_only: nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the SHA custom module, in one of the + # following formats: + # + # * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be deleted. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to delete the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during deletion of the module + # + # Defaults to `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the delete_security_health_analytics_custom_module method. + # result = client.delete_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :delete_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Simulates the result of using a + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # to check a resource. + # + # @overload simulate_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative resource name of the organization, project, or + # folder. For more information about relative resource names, see [AIP-122: + # Resource names](https://google.aip.dev/122). Example: + # `organizations/{organization_id}`. + # @param custom_config [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig, ::Hash] + # Required. The custom configuration that you need to test. + # @param resource [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] + # Required. Resource data to simulate custom module against. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the simulate_security_health_analytics_custom_module method. + # result = client.simulate_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. + # p result + # + def simulate_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :simulate_security_health_analytics_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all effective Event Threat Detection custom modules for the + # given parent. This includes resident modules defined at the scope of the + # parent along with modules inherited from its ancestors. + # + # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list effective custom modules, in one of the + # following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_effective_event_threat_detection_custom_modules method. + # result = client.list_effective_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. + # p item + # end + # + def list_effective_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :list_effective_event_threat_detection_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_effective_event_threat_detection_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the effective Event Threat Detection custom module at the given level. + # + # The difference between an + # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule EffectiveEventThreatDetectionCustomModule} + # and an + # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule EventThreatDetectionCustomModule} + # is that the fields for an `EffectiveEventThreatDetectionCustomModule` are + # computed from ancestors if needed. For example, the enablement state for an + # `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or + # `INHERITED`. In contrast, the enablement state for an + # `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` + # or `DISABLED`. + # + # @overload get_effective_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_effective_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Event Threat Detection custom module, in + # one of the following formats: + # + # * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_effective_event_threat_detection_custom_module method. + # result = client.get_effective_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. + # p result + # + def get_effective_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :get_effective_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Event Threat Detection custom modules for the given organization, + # folder, or project. This includes resident modules defined at the scope of + # the parent along with modules inherited from ancestors. + # + # @overload list_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list custom modules, in one of the following + # formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of modules to return. The service may return + # fewer than this value. If unspecified, at most 10 modules will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_event_threat_detection_custom_modules method. + # result = client.list_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :list_event_threat_detection_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_event_threat_detection_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all resident Event Threat Detection custom modules for the given + # organization, folder, or project and its descendants. + # + # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list custom modules, in one of the following + # formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of modules to return. The service may return + # fewer than this value. If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_descendant_event_threat_detection_custom_modules method. + # result = client.list_descendant_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_descendant_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :list_descendant_event_threat_detection_custom_modules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_descendant_event_threat_detection_custom_modules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Event Threat Detection custom module. + # + # @overload get_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Event Threat Detection custom module, in + # one of the following formats: + # + # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_event_threat_detection_custom_module method. + # result = client.get_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + # p result + # + def get_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :get_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident Event Threat Detection custom module at the scope of the + # given organization, folder, or project, and creates inherited custom + # modules for all descendants of the given parent. These modules are enabled + # by default. + # + # @overload create_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil, validate_only: nil) + # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent for the module, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module to create. The + # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule#name EventThreatDetectionCustomModule.name} + # field is ignored; Security Command Center generates the name. + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be created. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to create the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new + # + # # Call the create_event_threat_detection_custom_module method. + # result = client.create_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + # p result + # + def create_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :create_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Event Threat Detection custom module with the given name based + # on the given update mask. Updating the enablement state is supported for + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name or + # configuration of a module is supported for resident modules only. The type + # of a module cannot be changed. + # + # @overload update_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_event_threat_detection_custom_module(update_mask: nil, event_threat_detection_custom_module: nil, validate_only: nil) + # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to update. If omitted, then all fields are updated. + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module being updated. + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be updated. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to update the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new + # + # # Call the update_event_threat_detection_custom_module method. + # result = client.update_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + # p result + # + def update_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.event_threat_detection_custom_module&.name + header_params["event_threat_detection_custom_module.name"] = request.event_threat_detection_custom_module.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :update_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified Event Threat Detection custom module and all of its + # descendants in the resource hierarchy. This method is only supported for + # resident custom modules. + # + # @overload delete_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_event_threat_detection_custom_module(name: nil, validate_only: nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Event Threat Detection custom module, in + # one of the following formats: + # + # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be deleted. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to delete the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new + # + # # Call the delete_event_threat_detection_custom_module method. + # result = client.delete_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :delete_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Validates the given Event Threat Detection custom module. + # + # @overload validate_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent to validate the custom modules under, + # in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # @param raw_text [::String] + # Required. The raw text of the module's contents. Used to generate error + # messages. + # @param type [::String] + # Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new + # + # # Call the validate_event_threat_detection_custom_module method. + # result = client.validate_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse. + # p result + # + def validate_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, + metadata: metadata, + retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :validate_event_threat_detection_custom_module, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets service settings for the specified Security Command Center service. + # + # @overload get_security_center_service(request, options = nil) + # Pass arguments to `get_security_center_service` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_security_center_service(name: nil, show_eligible_modules_only: nil) + # Pass arguments to `get_security_center_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The Security Command Center service to retrieve, in one of the + # following formats: + # + # * organizations/\\{organization}/locations/\\{location}/securityCenterServices/\\{service} + # * folders/\\{folder}/locations/\\{location}/securityCenterServices/\\{service} + # * projects/\\{project}/locations/\\{location}/securityCenterServices/\\{service} + # + # The following values are valid for `{service}`: + # + # * `container-threat-detection` + # * `event-threat-detection` + # * `security-health-analytics` + # * `vm-threat-detection` + # * `web-security-scanner` + # @param show_eligible_modules_only [::Boolean] + # Set to `true` to show only modules that are in scope. By default, all + # modules are shown. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new + # + # # Call the get_security_center_service method. + # result = client.get_security_center_service request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. + # p result + # + def get_security_center_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_security_center_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_security_center_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_security_center_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :get_security_center_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all Security Command Center services for the given + # parent. + # + # @overload list_security_center_services(request, options = nil) + # Pass arguments to `list_security_center_services` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_security_center_services(parent: nil, page_size: nil, page_token: nil, show_eligible_modules_only: nil) + # Pass arguments to `list_security_center_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent to list Security Command Center services, + # in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # @param show_eligible_modules_only [::Boolean] + # Flag that, when set, is used to filter the module settings that are shown. + # The default setting is that all modules are shown. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new + # + # # Call the list_security_center_services method. + # result = client.list_security_center_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. + # p item + # end + # + def list_security_center_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_security_center_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_security_center_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_security_center_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :list_security_center_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_security_center_services, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Security Command Center service using the given update mask. + # + # @overload update_security_center_service(request, options = nil) + # Pass arguments to `update_security_center_service` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_security_center_service(security_center_service: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_security_center_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_center_service [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService, ::Hash] + # Required. The updated service. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to update. Accepts the following values: + # + # * `intended_enablement_state` + # * `modules` + # + # If omitted, then all eligible fields are updated. + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no service will be updated. An `OK` response indicates that + # the request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to update the service could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during update of the service + # + # Defaults to `false`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new + # + # # Call the update_security_center_service method. + # result = client.update_security_center_service request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. + # p result + # + def update_security_center_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_security_center_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.security_center_service&.name + header_params["security_center_service.name"] = request.security_center_service.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_security_center_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_security_center_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.call_rpc :update_security_center_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecurityCenterManagement API. + # + # This class represents the configuration for SecurityCenterManagement, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_effective_security_health_analytics_custom_modules to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycentermanagement.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SecurityCenterManagement API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_security_health_analytics_custom_module + ## + # RPC-specific configuration for `list_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `get_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_security_health_analytics_custom_module + ## + # RPC-specific configuration for `create_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_security_health_analytics_custom_module + ## + # RPC-specific configuration for `update_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_health_analytics_custom_module + ## + # RPC-specific configuration for `delete_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_security_health_analytics_custom_module + ## + # RPC-specific configuration for `simulate_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :simulate_security_health_analytics_custom_module + ## + # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_event_threat_detection_custom_module + ## + # RPC-specific configuration for `list_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `get_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_event_threat_detection_custom_module + ## + # RPC-specific configuration for `create_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_event_threat_detection_custom_module + ## + # RPC-specific configuration for `update_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_event_threat_detection_custom_module + ## + # RPC-specific configuration for `delete_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_event_threat_detection_custom_module + ## + # RPC-specific configuration for `validate_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :validate_event_threat_detection_custom_module + ## + # RPC-specific configuration for `get_security_center_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_security_center_service + ## + # RPC-specific configuration for `list_security_center_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_security_center_services + ## + # RPC-specific configuration for `update_security_center_service` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_center_service + + # @private + def initialize parent_rpcs = nil + list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules + @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config + get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module + @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config + list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules + @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config + list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules + @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config + get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module + @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config + create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module + @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config + update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module + @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config + delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module + @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config + simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module + @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config + list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules + @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config + get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module + @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config + list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules + @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config + list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules + @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config + get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module + @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config + create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module + @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config + update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module + @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config + delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module + @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config + validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module + @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config + get_security_center_service_config = parent_rpcs.get_security_center_service if parent_rpcs.respond_to? :get_security_center_service + @get_security_center_service = ::Gapic::Config::Method.new get_security_center_service_config + list_security_center_services_config = parent_rpcs.list_security_center_services if parent_rpcs.respond_to? :list_security_center_services + @list_security_center_services = ::Gapic::Config::Method.new list_security_center_services_config + update_security_center_service_config = parent_rpcs.update_security_center_service if parent_rpcs.respond_to? :update_security_center_service + @update_security_center_service = ::Gapic::Config::Method.new update_security_center_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb new file mode 100644 index 000000000000..d03792871b08 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module SecurityCenterManagement + module V1 + module SecurityCenterManagement + # Credentials for the SecurityCenterManagement API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb new file mode 100644 index 000000000000..614cfad55b62 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb @@ -0,0 +1,374 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenterManagement + module V1 + module SecurityCenterManagement + # Path helper methods for the SecurityCenterManagement API. + module Paths + ## + # Create a fully-qualified EffectiveEventThreatDetectionCustomModule resource string. + # + # @overload effective_event_threat_detection_custom_module_path(organization:, location:, effective_event_threat_detection_custom_module:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}` + # + # @param organization [String] + # @param location [String] + # @param effective_event_threat_detection_custom_module [String] + # + # @overload effective_event_threat_detection_custom_module_path(project:, location:, effective_event_threat_detection_custom_module:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}` + # + # @param project [String] + # @param location [String] + # @param effective_event_threat_detection_custom_module [String] + # + # @overload effective_event_threat_detection_custom_module_path(folder:, location:, effective_event_threat_detection_custom_module:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}` + # + # @param folder [String] + # @param location [String] + # @param effective_event_threat_detection_custom_module [String] + # + # @return [::String] + def effective_event_threat_detection_custom_module_path **args + resources = { + "effective_event_threat_detection_custom_module:location:organization" => (proc do |organization:, location:, effective_event_threat_detection_custom_module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/effectiveEventThreatDetectionCustomModules/#{effective_event_threat_detection_custom_module}" + end), + "effective_event_threat_detection_custom_module:location:project" => (proc do |project:, location:, effective_event_threat_detection_custom_module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/effectiveEventThreatDetectionCustomModules/#{effective_event_threat_detection_custom_module}" + end), + "effective_event_threat_detection_custom_module:folder:location" => (proc do |folder:, location:, effective_event_threat_detection_custom_module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/effectiveEventThreatDetectionCustomModules/#{effective_event_threat_detection_custom_module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified EffectiveSecurityHealthAnalyticsCustomModule resource string. + # + # @overload effective_security_health_analytics_custom_module_path(organization:, location:, effective_security_health_analytics_custom_module:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + # + # @param organization [String] + # @param location [String] + # @param effective_security_health_analytics_custom_module [String] + # + # @overload effective_security_health_analytics_custom_module_path(project:, location:, effective_security_health_analytics_custom_module:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + # + # @param project [String] + # @param location [String] + # @param effective_security_health_analytics_custom_module [String] + # + # @overload effective_security_health_analytics_custom_module_path(folder:, location:, effective_security_health_analytics_custom_module:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + # + # @param folder [String] + # @param location [String] + # @param effective_security_health_analytics_custom_module [String] + # + # @return [::String] + def effective_security_health_analytics_custom_module_path **args + resources = { + "effective_security_health_analytics_custom_module:location:organization" => (proc do |organization:, location:, effective_security_health_analytics_custom_module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/effectiveSecurityHealthAnalyticsCustomModules/#{effective_security_health_analytics_custom_module}" + end), + "effective_security_health_analytics_custom_module:location:project" => (proc do |project:, location:, effective_security_health_analytics_custom_module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/effectiveSecurityHealthAnalyticsCustomModules/#{effective_security_health_analytics_custom_module}" + end), + "effective_security_health_analytics_custom_module:folder:location" => (proc do |folder:, location:, effective_security_health_analytics_custom_module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/effectiveSecurityHealthAnalyticsCustomModules/#{effective_security_health_analytics_custom_module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified EventThreatDetectionCustomModule resource string. + # + # @overload event_threat_detection_custom_module_path(organization:, location:, event_threat_detection_custom_module:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}` + # + # @param organization [String] + # @param location [String] + # @param event_threat_detection_custom_module [String] + # + # @overload event_threat_detection_custom_module_path(project:, location:, event_threat_detection_custom_module:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}` + # + # @param project [String] + # @param location [String] + # @param event_threat_detection_custom_module [String] + # + # @overload event_threat_detection_custom_module_path(folder:, location:, event_threat_detection_custom_module:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}` + # + # @param folder [String] + # @param location [String] + # @param event_threat_detection_custom_module [String] + # + # @return [::String] + def event_threat_detection_custom_module_path **args + resources = { + "event_threat_detection_custom_module:location:organization" => (proc do |organization:, location:, event_threat_detection_custom_module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/eventThreatDetectionCustomModules/#{event_threat_detection_custom_module}" + end), + "event_threat_detection_custom_module:location:project" => (proc do |project:, location:, event_threat_detection_custom_module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/eventThreatDetectionCustomModules/#{event_threat_detection_custom_module}" + end), + "event_threat_detection_custom_module:folder:location" => (proc do |folder:, location:, event_threat_detection_custom_module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/eventThreatDetectionCustomModules/#{event_threat_detection_custom_module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified FolderLocation resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @return [::String] + def folder_location_path folder:, location: + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified SecurityCenterService resource string. + # + # @overload security_center_service_path(project:, location:, service:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/securityCenterServices/{service}` + # + # @param project [String] + # @param location [String] + # @param service [String] + # + # @overload security_center_service_path(folder:, location:, service:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/securityCenterServices/{service}` + # + # @param folder [String] + # @param location [String] + # @param service [String] + # + # @overload security_center_service_path(organization:, location:, service:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/securityCenterServices/{service}` + # + # @param organization [String] + # @param location [String] + # @param service [String] + # + # @return [::String] + def security_center_service_path **args + resources = { + "location:project:service" => (proc do |project:, location:, service:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/securityCenterServices/#{service}" + end), + "folder:location:service" => (proc do |folder:, location:, service:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/securityCenterServices/#{service}" + end), + "location:organization:service" => (proc do |organization:, location:, service:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/securityCenterServices/#{service}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified SecurityHealthAnalyticsCustomModule resource string. + # + # @overload security_health_analytics_custom_module_path(organization:, location:, security_health_analytics_custom_module:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + # + # @param organization [String] + # @param location [String] + # @param security_health_analytics_custom_module [String] + # + # @overload security_health_analytics_custom_module_path(project:, location:, security_health_analytics_custom_module:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + # + # @param project [String] + # @param location [String] + # @param security_health_analytics_custom_module [String] + # + # @overload security_health_analytics_custom_module_path(folder:, location:, security_health_analytics_custom_module:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + # + # @param folder [String] + # @param location [String] + # @param security_health_analytics_custom_module [String] + # + # @return [::String] + def security_health_analytics_custom_module_path **args + resources = { + "location:organization:security_health_analytics_custom_module" => (proc do |organization:, location:, security_health_analytics_custom_module:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/securityHealthAnalyticsCustomModules/#{security_health_analytics_custom_module}" + end), + "location:project:security_health_analytics_custom_module" => (proc do |project:, location:, security_health_analytics_custom_module:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/securityHealthAnalyticsCustomModules/#{security_health_analytics_custom_module}" + end), + "folder:location:security_health_analytics_custom_module" => (proc do |folder:, location:, security_health_analytics_custom_module:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/securityHealthAnalyticsCustomModules/#{security_health_analytics_custom_module}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb new file mode 100644 index 000000000000..2451529ae88b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/security_center_management/v1/version" +require "google/cloud/security_center_management/v1/bindings_override" + +require "google/cloud/security_center_management/v1/security_center_management/credentials" +require "google/cloud/security_center_management/v1/security_center_management/paths" +require "google/cloud/security_center_management/v1/security_center_management/rest/client" + +module Google + module Cloud + module SecurityCenterManagement + module V1 + ## + # Service describing handlers for resources + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/security_center_management/v1/security_center_management/rest" + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + module SecurityCenterManagement + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/security_center_management/v1/security_center_management/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb new file mode 100644 index 000000000000..6274bfaaa822 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb @@ -0,0 +1,2610 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/securitycentermanagement/v1/security_center_management_pb" +require "google/cloud/security_center_management/v1/security_center_management/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module SecurityCenterManagement + module V1 + module SecurityCenterManagement + module Rest + ## + # REST client for the SecurityCenterManagement service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "securitycentermanagement.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :security_center_management_stub + + ## + # Configure the SecurityCenterManagement Client class. + # + # See {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenterManagement clients + # ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "SecurityCenterManagement", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 + default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 + + default_config.rpcs.simulate_security_health_analytics_custom_module.timeout = 60.0 + default_config.rpcs.simulate_security_health_analytics_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_effective_event_threat_detection_custom_modules.timeout = 60.0 + default_config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_effective_event_threat_detection_custom_module.timeout = 60.0 + default_config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_event_threat_detection_custom_modules.timeout = 60.0 + default_config.rpcs.list_event_threat_detection_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout = 60.0 + default_config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_event_threat_detection_custom_module.timeout = 60.0 + default_config.rpcs.get_event_threat_detection_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_event_threat_detection_custom_module.timeout = 60.0 + + default_config.rpcs.update_event_threat_detection_custom_module.timeout = 60.0 + + default_config.rpcs.delete_event_threat_detection_custom_module.timeout = 60.0 + + default_config.rpcs.validate_event_threat_detection_custom_module.timeout = 60.0 + default_config.rpcs.validate_event_threat_detection_custom_module.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SecurityCenterManagement Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @security_center_management_stub.universe_domain + end + + ## + # Create a new SecurityCenterManagement REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SecurityCenterManagement client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @security_center_management_stub = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @security_center_management_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @security_center_management_stub.endpoint + config.universe_domain = @security_center_management_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @security_center_management_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @security_center_management_stub.logger + end + + # Service calls + + ## + # Returns a list of all + # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule EffectiveSecurityHealthAnalyticsCustomModule} + # resources for the given parent. This includes resident modules defined at + # the scope of the parent, and inherited modules, inherited from ancestor + # organizations, folders, and projects (no descendants). + # + # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list effective custom modules, in one of the + # following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_effective_security_health_analytics_custom_modules method. + # result = client.list_effective_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_effective_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.list_effective_security_health_analytics_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_effective_security_health_analytics_custom_modules, "effective_security_health_analytics_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single + # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule EffectiveSecurityHealthAnalyticsCustomModule}. + # + # @overload get_effective_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_effective_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full resource name of the custom module, specified in one of + # the following formats: + # + # * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + # * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + # * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_effective_security_health_analytics_custom_module method. + # result = client.get_effective_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. + # p result + # + def get_effective_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.get_effective_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # resources for the given parent. This includes resident modules defined at + # the scope of the parent, and inherited modules, inherited from ancestor + # organizations, folders, and projects (no descendants). + # + # @overload list_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent organization, folder, or project in which to + # list custom modules, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_security_health_analytics_custom_modules method. + # result = client.list_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.list_security_health_analytics_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all resident + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # resources under the given organization, folder, or project and all of its + # descendants. + # + # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent organization, folder, or project in which to + # list custom modules, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new + # + # # Call the list_descendant_security_health_analytics_custom_modules method. + # result = client.list_descendant_security_health_analytics_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + # p item + # end + # + def list_descendant_security_health_analytics_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.list_descendant_security_health_analytics_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_descendant_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule}. + # + # @overload get_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_security_health_analytics_custom_module(name: nil) + # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource, in the format + # `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the get_security_health_analytics_custom_module method. + # result = client.get_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def get_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.get_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # at the scope of the given organization, folder, or project, and also + # creates inherited `SecurityHealthAnalyticsCustomModule` resources for all + # folders and projects that are descendants of the given parent. These + # modules are enabled by default. + # + # @overload create_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil, validate_only: nil) + # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the parent organization, folder, or project of the + # module, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. The resource being created. + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be created. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to create the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the create_security_health_analytics_custom_module method. + # result = client.create_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def create_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.create_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # under the given name based on the given update mask. Updating the + # enablement state is supported on both resident and inherited modules + # (though resident modules cannot have an enablement state of "inherited"). + # Updating the display name and custom configuration of a module is supported + # on resident modules only. + # + # @overload update_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_security_health_analytics_custom_module(update_mask: nil, security_health_analytics_custom_module: nil, validate_only: nil) + # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to update. The following values are valid: + # + # * `custom_config` + # * `enablement_state` + # + # If you omit this field or set it to the wildcard value `*`, then all + # eligible fields are updated. + # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash] + # Required. The resource being updated. + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be updated. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to update the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the update_security_health_analytics_custom_module method. + # result = client.update_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + # p result + # + def update_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.update_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # and all of its descendants in the resource hierarchy. This method is only + # supported for resident custom modules. + # + # @overload delete_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_security_health_analytics_custom_module(name: nil, validate_only: nil) + # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the SHA custom module, in one of the + # following formats: + # + # * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be deleted. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to delete the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during deletion of the module + # + # Defaults to `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the delete_security_health_analytics_custom_module method. + # result = client.delete_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.delete_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Simulates the result of using a + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} + # to check a resource. + # + # @overload simulate_security_health_analytics_custom_module(request, options = nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) + # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The relative resource name of the organization, project, or + # folder. For more information about relative resource names, see [AIP-122: + # Resource names](https://google.aip.dev/122). Example: + # `organizations/{organization_id}`. + # @param custom_config [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig, ::Hash] + # Required. The custom configuration that you need to test. + # @param resource [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] + # Required. Resource data to simulate custom module against. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new + # + # # Call the simulate_security_health_analytics_custom_module method. + # result = client.simulate_security_health_analytics_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. + # p result + # + def simulate_security_health_analytics_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.simulate_security_health_analytics_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all effective Event Threat Detection custom modules for the + # given parent. This includes resident modules defined at the scope of the + # parent along with modules inherited from its ancestors. + # + # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list effective custom modules, in one of the + # following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_effective_event_threat_detection_custom_modules method. + # result = client.list_effective_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. + # p item + # end + # + def list_effective_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.list_effective_event_threat_detection_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_effective_event_threat_detection_custom_modules, "effective_event_threat_detection_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the effective Event Threat Detection custom module at the given level. + # + # The difference between an + # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule EffectiveEventThreatDetectionCustomModule} + # and an + # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule EventThreatDetectionCustomModule} + # is that the fields for an `EffectiveEventThreatDetectionCustomModule` are + # computed from ancestors if needed. For example, the enablement state for an + # `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or + # `INHERITED`. In contrast, the enablement state for an + # `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` + # or `DISABLED`. + # + # @overload get_effective_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_effective_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Event Threat Detection custom module, in + # one of the following formats: + # + # * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_effective_event_threat_detection_custom_module method. + # result = client.get_effective_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. + # p result + # + def get_effective_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.get_effective_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Event Threat Detection custom modules for the given organization, + # folder, or project. This includes resident modules defined at the scope of + # the parent along with modules inherited from ancestors. + # + # @overload list_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list custom modules, in one of the following + # formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of modules to return. The service may return + # fewer than this value. If unspecified, at most 10 modules will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_event_threat_detection_custom_modules method. + # result = client.list_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.list_event_threat_detection_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all resident Event Threat Detection custom modules for the given + # organization, folder, or project and its descendants. + # + # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent to list custom modules, in one of the following + # formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of modules to return. The service may return + # fewer than this value. If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new + # + # # Call the list_descendant_event_threat_detection_custom_modules method. + # result = client.list_descendant_event_threat_detection_custom_modules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + # p item + # end + # + def list_descendant_event_threat_detection_custom_modules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.list_descendant_event_threat_detection_custom_modules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_descendant_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an Event Threat Detection custom module. + # + # @overload get_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_event_threat_detection_custom_module(name: nil) + # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Event Threat Detection custom module, in + # one of the following formats: + # + # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new + # + # # Call the get_event_threat_detection_custom_module method. + # result = client.get_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + # p result + # + def get_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.get_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a resident Event Threat Detection custom module at the scope of the + # given organization, folder, or project, and creates inherited custom + # modules for all descendants of the given parent. These modules are enabled + # by default. + # + # @overload create_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil, validate_only: nil) + # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of parent for the module, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module to create. The + # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule#name EventThreatDetectionCustomModule.name} + # field is ignored; Security Command Center generates the name. + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be created. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to create the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new + # + # # Call the create_event_threat_detection_custom_module method. + # result = client.create_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + # p result + # + def create_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.create_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Event Threat Detection custom module with the given name based + # on the given update mask. Updating the enablement state is supported for + # both resident and inherited modules (though resident modules cannot have an + # enablement state of "inherited"). Updating the display name or + # configuration of a module is supported for resident modules only. The type + # of a module cannot be changed. + # + # @overload update_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_event_threat_detection_custom_module(update_mask: nil, event_threat_detection_custom_module: nil, validate_only: nil) + # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to update. If omitted, then all fields are updated. + # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash] + # Required. The module being updated. + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be updated. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to update the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new + # + # # Call the update_event_threat_detection_custom_module method. + # result = client.update_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + # p result + # + def update_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.update_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified Event Threat Detection custom module and all of its + # descendants in the resource hierarchy. This method is only supported for + # resident custom modules. + # + # @overload delete_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_event_threat_detection_custom_module(name: nil, validate_only: nil) + # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Event Threat Detection custom module, in + # one of the following formats: + # + # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be deleted. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to delete the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new + # + # # Call the delete_event_threat_detection_custom_module method. + # result = client.delete_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.delete_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Validates the given Event Threat Detection custom module. + # + # @overload validate_event_threat_detection_custom_module(request, options = nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) + # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the parent to validate the custom modules under, + # in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # @param raw_text [::String] + # Required. The raw text of the module's contents. Used to generate error + # messages. + # @param type [::String] + # Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new + # + # # Call the validate_event_threat_detection_custom_module method. + # result = client.validate_event_threat_detection_custom_module request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse. + # p result + # + def validate_event_threat_detection_custom_module request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.validate_event_threat_detection_custom_module request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets service settings for the specified Security Command Center service. + # + # @overload get_security_center_service(request, options = nil) + # Pass arguments to `get_security_center_service` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_security_center_service(name: nil, show_eligible_modules_only: nil) + # Pass arguments to `get_security_center_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The Security Command Center service to retrieve, in one of the + # following formats: + # + # * organizations/\\{organization}/locations/\\{location}/securityCenterServices/\\{service} + # * folders/\\{folder}/locations/\\{location}/securityCenterServices/\\{service} + # * projects/\\{project}/locations/\\{location}/securityCenterServices/\\{service} + # + # The following values are valid for `{service}`: + # + # * `container-threat-detection` + # * `event-threat-detection` + # * `security-health-analytics` + # * `vm-threat-detection` + # * `web-security-scanner` + # @param show_eligible_modules_only [::Boolean] + # Set to `true` to show only modules that are in scope. By default, all + # modules are shown. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new + # + # # Call the get_security_center_service method. + # result = client.get_security_center_service request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. + # p result + # + def get_security_center_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_security_center_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_security_center_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_security_center_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.get_security_center_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a list of all Security Command Center services for the given + # parent. + # + # @overload list_security_center_services(request, options = nil) + # Pass arguments to `list_security_center_services` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_security_center_services(parent: nil, page_size: nil, page_token: nil, show_eligible_modules_only: nil) + # Pass arguments to `list_security_center_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the parent to list Security Command Center services, + # in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # @param show_eligible_modules_only [::Boolean] + # Flag that, when set, is used to filter the module settings that are shown. + # The default setting is that all modules are shown. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new + # + # # Call the list_security_center_services method. + # result = client.list_security_center_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. + # p item + # end + # + def list_security_center_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_security_center_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_security_center_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_security_center_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.list_security_center_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_security_center_services, "security_center_services", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Security Command Center service using the given update mask. + # + # @overload update_security_center_service(request, options = nil) + # Pass arguments to `update_security_center_service` via a request object, either of type + # {::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_security_center_service(security_center_service: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_security_center_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param security_center_service [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService, ::Hash] + # Required. The updated service. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to update. Accepts the following values: + # + # * `intended_enablement_state` + # * `modules` + # + # If omitted, then all eligible fields are updated. + # @param validate_only [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no service will be updated. An `OK` response indicates that + # the request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to update the service could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during update of the service + # + # Defaults to `false`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new + # + # # Call the update_security_center_service method. + # result = client.update_security_center_service request + # + # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. + # p result + # + def update_security_center_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_security_center_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_security_center_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_security_center_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @security_center_management_stub.update_security_center_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SecurityCenterManagement REST API. + # + # This class represents the configuration for SecurityCenterManagement REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_effective_security_health_analytics_custom_modules to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "securitycentermanagement.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the SecurityCenterManagement API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_security_health_analytics_custom_module + ## + # RPC-specific configuration for `list_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_security_health_analytics_custom_modules + ## + # RPC-specific configuration for `get_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_security_health_analytics_custom_module + ## + # RPC-specific configuration for `create_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_security_health_analytics_custom_module + ## + # RPC-specific configuration for `update_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_health_analytics_custom_module + ## + # RPC-specific configuration for `delete_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_security_health_analytics_custom_module + ## + # RPC-specific configuration for `simulate_security_health_analytics_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :simulate_security_health_analytics_custom_module + ## + # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_effective_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_effective_event_threat_detection_custom_module + ## + # RPC-specific configuration for `list_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_descendant_event_threat_detection_custom_modules + ## + # RPC-specific configuration for `get_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :get_event_threat_detection_custom_module + ## + # RPC-specific configuration for `create_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :create_event_threat_detection_custom_module + ## + # RPC-specific configuration for `update_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :update_event_threat_detection_custom_module + ## + # RPC-specific configuration for `delete_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_event_threat_detection_custom_module + ## + # RPC-specific configuration for `validate_event_threat_detection_custom_module` + # @return [::Gapic::Config::Method] + # + attr_reader :validate_event_threat_detection_custom_module + ## + # RPC-specific configuration for `get_security_center_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_security_center_service + ## + # RPC-specific configuration for `list_security_center_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_security_center_services + ## + # RPC-specific configuration for `update_security_center_service` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_center_service + + # @private + def initialize parent_rpcs = nil + list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules + @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config + get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module + @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config + list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules + @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config + list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules + @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config + get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module + @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config + create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module + @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config + update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module + @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config + delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module + @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config + simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module + @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config + list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules + @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config + get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module + @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config + list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules + @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config + list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules + @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config + get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module + @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config + create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module + @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config + update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module + @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config + delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module + @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config + validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module + @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config + get_security_center_service_config = parent_rpcs.get_security_center_service if parent_rpcs.respond_to? :get_security_center_service + @get_security_center_service = ::Gapic::Config::Method.new get_security_center_service_config + list_security_center_services_config = parent_rpcs.list_security_center_services if parent_rpcs.respond_to? :list_security_center_services + @list_security_center_services = ::Gapic::Config::Method.new list_security_center_services_config + update_security_center_service_config = parent_rpcs.update_security_center_service if parent_rpcs.respond_to? :update_security_center_service + @update_security_center_service = ::Gapic::Config::Method.new update_security_center_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb new file mode 100644 index 000000000000..4bd0edd3626c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb @@ -0,0 +1,1677 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/securitycentermanagement/v1/security_center_management_pb" + +module Google + module Cloud + module SecurityCenterManagement + module V1 + module SecurityCenterManagement + module Rest + ## + # REST service stub for the SecurityCenterManagement service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_effective_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] + # A result object deserialized from the server's reply + def list_effective_security_health_analytics_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_security_health_analytics_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_effective_security_health_analytics_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_effective_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def get_effective_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_effective_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse] + # A result object deserialized from the server's reply + def list_security_health_analytics_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_security_health_analytics_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_security_health_analytics_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_descendant_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] + # A result object deserialized from the server's reply + def list_descendant_security_health_analytics_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_descendant_security_health_analytics_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def get_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def create_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # A result object deserialized from the server's reply + def update_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the simulate_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] + # A result object deserialized from the server's reply + def simulate_security_health_analytics_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_simulate_security_health_analytics_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "simulate_security_health_analytics_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_effective_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] + # A result object deserialized from the server's reply + def list_effective_event_threat_detection_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_event_threat_detection_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_effective_event_threat_detection_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_effective_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def get_effective_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_effective_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse] + # A result object deserialized from the server's reply + def list_event_threat_detection_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_event_threat_detection_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_event_threat_detection_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_descendant_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse] + # A result object deserialized from the server's reply + def list_descendant_event_threat_detection_custom_modules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_descendant_event_threat_detection_custom_modules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def get_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def create_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # A result object deserialized from the server's reply + def update_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the validate_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] + # A result object deserialized from the server's reply + def validate_event_threat_detection_custom_module request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_validate_event_threat_detection_custom_module_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "validate_event_threat_detection_custom_module", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_security_center_service REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # A result object deserialized from the server's reply + def get_security_center_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_security_center_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_security_center_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_security_center_services REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse] + # A result object deserialized from the server's reply + def list_security_center_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_security_center_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_security_center_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_security_center_service REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # A result object deserialized from the server's reply + def update_security_center_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_security_center_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_security_center_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_effective_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_effective_security_health_analytics_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveSecurityHealthAnalyticsCustomModules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveSecurityHealthAnalyticsCustomModules", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveSecurityHealthAnalyticsCustomModules", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_effective_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_effective_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/effectiveSecurityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/effectiveSecurityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/effectiveSecurityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_security_health_analytics_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_descendant_security_health_analytics_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:listDescendant", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:listDescendant", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:listDescendant", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", + body: "security_health_analytics_custom_module", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", + body: "security_health_analytics_custom_module", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", + body: "security_health_analytics_custom_module", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_health_analytics_custom_module.name}", + body: "security_health_analytics_custom_module", + matches: [ + ["security_health_analytics_custom_module.name", %r{^projects/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_health_analytics_custom_module.name}", + body: "security_health_analytics_custom_module", + matches: [ + ["security_health_analytics_custom_module.name", %r{^folders/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_health_analytics_custom_module.name}", + body: "security_health_analytics_custom_module", + matches: [ + ["security_health_analytics_custom_module.name", %r{^organizations/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the simulate_security_health_analytics_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_simulate_security_health_analytics_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:simulate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:simulate", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:simulate", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_effective_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_effective_event_threat_detection_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveEventThreatDetectionCustomModules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveEventThreatDetectionCustomModules", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/effectiveEventThreatDetectionCustomModules", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_effective_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_effective_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/effectiveEventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/effectiveEventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/effectiveEventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_event_threat_detection_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_descendant_event_threat_detection_custom_modules REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:listDescendant", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:listDescendant", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:listDescendant", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", + body: "event_threat_detection_custom_module", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", + body: "event_threat_detection_custom_module", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", + body: "event_threat_detection_custom_module", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{event_threat_detection_custom_module.name}", + body: "event_threat_detection_custom_module", + matches: [ + ["event_threat_detection_custom_module.name", %r{^projects/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{event_threat_detection_custom_module.name}", + body: "event_threat_detection_custom_module", + matches: [ + ["event_threat_detection_custom_module.name", %r{^folders/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{event_threat_detection_custom_module.name}", + body: "event_threat_detection_custom_module", + matches: [ + ["event_threat_detection_custom_module.name", %r{^organizations/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the validate_event_threat_detection_custom_module REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_validate_event_threat_detection_custom_module_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:validate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:validate", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:validate", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_security_center_service REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_security_center_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_security_center_services REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_security_center_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/securityCenterServices", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/securityCenterServices", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/securityCenterServices", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_security_center_service REST call + # + # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_security_center_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_center_service.name}", + body: "security_center_service", + matches: [ + ["security_center_service.name", %r{^projects/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_center_service.name}", + body: "security_center_service", + matches: [ + ["security_center_service.name", %r{^folders/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{security_center_service.name}", + body: "security_center_service", + matches: [ + ["security_center_service.name", %r{^organizations/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/version.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/version.rb new file mode 100644 index 000000000000..5a44413e0a99 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module SecurityCenterManagement + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_pb.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_pb.rb new file mode 100644 index 000000000000..9dc6c4a10fff --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_pb.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycentermanagement/v1/security_center_management.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' +require 'google/type/expr_pb' + + +descriptor_data = "\nIgoogle/cloud/securitycentermanagement/v1/security_center_management.proto\x12(google.cloud.securitycentermanagement.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/expr.proto\"\xbe\n\n\x15SecurityCenterService\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12w\n\x19intended_enablement_state\x18\x02 \x01(\x0e\x32O.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementStateB\x03\xe0\x41\x01\x12x\n\x1a\x65\x66\x66\x65\x63tive_enablement_state\x18\x03 \x01(\x0e\x32O.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementStateB\x03\xe0\x41\x03\x12\x62\n\x07modules\x18\x04 \x03(\x0b\x32L.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModulesEntryB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0eservice_config\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a\x83\x02\n\x0eModuleSettings\x12w\n\x19intended_enablement_state\x18\x01 \x01(\x0e\x32O.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementStateB\x03\xe0\x41\x01\x12x\n\x1a\x65\x66\x66\x65\x63tive_enablement_state\x18\x02 \x01(\x0e\x32O.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementStateB\x03\xe0\x41\x03\x1a~\n\x0cModulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12]\n\x05value\x18\x02 \x01(\x0b\x32N.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings:\x02\x38\x01\"n\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\r\n\tINHERITED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\x0f\n\x0bINGEST_ONLY\x10\x04:\xd8\x02\xea\x41\xd4\x02\n=securitycentermanagement.googleapis.com/SecurityCenterService\x12Hprojects/{project}/locations/{location}/securityCenterServices/{service}\x12\x46\x66olders/{folder}/locations/{location}/securityCenterServices/{service}\x12Rorganizations/{organization}/locations/{location}/securityCenterServices/{service}*\x16securityCenterServices2\x15securityCenterService\"\xee\x07\n,EffectiveSecurityHealthAnalyticsCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12R\n\rcustom_config\x18\x02 \x01(\x0b\x32\x36.google.cloud.securitycentermanagement.v1.CustomConfigB\x03\xe0\x41\x03\x12\x85\x01\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32\x66.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\xe3\x04\xea\x41\xdf\x04\nTsecuritycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\x12\x93\x01organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}\x12\x89\x01projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}\x12\x87\x01\x66olders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}*-effectiveSecurityHealthAnalyticsCustomModules2,effectiveSecurityHealthAnalyticsCustomModule\"\xd9\x01\n8ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x12l\n\x06parent\x18\x01 \x01(\tB\\\xe0\x41\x02\xfa\x41V\x12Tsecuritycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xe9\x01\n9ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\x12\x92\x01\n2effective_security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32V.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\x01\n6GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x12j\n\x04name\x18\x01 \x01(\tB\\\xe0\x41\x02\xfa\x41V\nTsecuritycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\"\xd2\x08\n#SecurityHealthAnalyticsCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12|\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32].google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementStateB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12l\n\x0f\x61ncestor_module\x18\x06 \x01(\tBS\xe0\x41\x03\xfa\x41M\nKsecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12R\n\rcustom_config\x18\x07 \x01(\x0b\x32\x36.google.cloud.securitycentermanagement.v1.CustomConfigB\x03\xe0\x41\x01\"]\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tINHERITED\x10\x03:\x8d\x04\xea\x41\x89\x04\nKsecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x80\x01organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}\x12vprojects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}\x12tfolders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}*$securityHealthAnalyticsCustomModules2#securityHealthAnalyticsCustomModule\"\xeb\x05\n\x0c\x43ustomConfig\x12)\n\tpredicate\x18\x01 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x63\n\rcustom_output\x18\x02 \x01(\x0b\x32G.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpecB\x03\xe0\x41\x01\x12g\n\x11resource_selector\x18\x03 \x01(\x0b\x32G.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelectorB\x03\xe0\x41\x01\x12V\n\x08severity\x18\x04 \x01(\x0e\x32?.google.cloud.securitycentermanagement.v1.CustomConfig.SeverityB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0erecommendation\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\xce\x01\n\x10\x43ustomOutputSpec\x12i\n\nproperties\x18\x01 \x03(\x0b\x32P.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.PropertyB\x03\xe0\x41\x01\x1aO\n\x08Property\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x10value_expression\x18\x02 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x1a/\n\x10ResourceSelector\x12\x1b\n\x0eresource_types\x18\x01 \x03(\tB\x03\xe0\x41\x01\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"\xc7\x01\n/ListSecurityHealthAnalyticsCustomModulesRequest\x12\x63\n\x06parent\x18\x01 \x01(\tBS\xe0\x41\x02\xfa\x41M\x12Ksecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xcc\x01\n0ListSecurityHealthAnalyticsCustomModulesResponse\x12\x7f\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32M.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd1\x01\n9ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x12\x63\n\x06parent\x18\x01 \x01(\tBS\xe0\x41\x02\xfa\x41M\x12Ksecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xd6\x01\n:ListDescendantSecurityHealthAnalyticsCustomModulesResponse\x12\x7f\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32M.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x92\x01\n-GetSecurityHealthAnalyticsCustomModuleRequest\x12\x61\n\x04name\x18\x01 \x01(\tBS\xe0\x41\x02\xfa\x41M\nKsecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\"\xb9\x02\n0CreateSecurityHealthAnalyticsCustomModuleRequest\x12\x63\n\x06parent\x18\x01 \x01(\tBS\xe0\x41\x02\xfa\x41M\x12Ksecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x83\x01\n\'security_health_analytics_custom_module\x18\x02 \x01(\x0b\x32M.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModuleB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x02\n0UpdateSecurityHealthAnalyticsCustomModuleRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x83\x01\n\'security_health_analytics_custom_module\x18\x02 \x01(\x0b\x32M.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModuleB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n0DeleteSecurityHealthAnalyticsCustomModuleRequest\x12\x61\n\x04name\x18\x01 \x01(\tBS\xe0\x41\x02\xfa\x41M\nKsecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xc1\x03\n2SimulateSecurityHealthAnalyticsCustomModuleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\rcustom_config\x18\x02 \x01(\x0b\x32\x36.google.cloud.securitycentermanagement.v1.CustomConfigB\x03\xe0\x41\x02\x12\x85\x01\n\x08resource\x18\x03 \x01(\x0b\x32n.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResourceB\x03\xe0\x41\x02\x1a\x99\x01\n\x11SimulatedResource\x12\x1a\n\rresource_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\rresource_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x33\n\x0fiam_policy_data\x18\x03 \x01(\x0b\x32\x15.google.iam.v1.PolicyB\x03\xe0\x41\x01\"\x8a\t\n\x10SimulatedFinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\x04 \x01(\t\x12T\n\x05state\x18\x05 \x01(\x0e\x32@.google.cloud.securitycentermanagement.v1.SimulatedFinding.StateB\x03\xe0\x41\x03\x12k\n\x11source_properties\x18\x06 \x03(\x0b\x32P.google.cloud.securitycentermanagement.v1.SimulatedFinding.SourcePropertiesEntry\x12.\n\nevent_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12U\n\x08severity\x18\x08 \x01(\x0e\x32\x43.google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity\x12^\n\rfinding_class\x18\t \x01(\x0e\x32G.google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"\xb0\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07:\xee\x01\xea\x41\xea\x01\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}*\x08\x66indings2\x07\x66inding\"\xf6\x02\n3SimulateSecurityHealthAnalyticsCustomModuleResponse\x12}\n\x06result\x18\x01 \x01(\x0b\x32m.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult\x1a\xbf\x01\n\x0fSimulatedResult\x12M\n\x07\x66inding\x18\x01 \x01(\x0b\x32:.google.cloud.securitycentermanagement.v1.SimulatedFindingH\x00\x12.\n\x0cno_violation\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12#\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42\x08\n\x06result\"\xd4\x07\n)EffectiveEventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12,\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x82\x01\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32\x63.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\xc8\x04\xea\x41\xc4\x04\nQsecuritycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12\x8d\x01organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}\x12\x83\x01projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}\x12\x81\x01\x66olders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}**effectiveEventThreatDetectionCustomModules2)effectiveEventThreatDetectionCustomModule\"\xd3\x01\n5ListEffectiveEventThreatDetectionCustomModulesRequest\x12i\n\x06parent\x18\x01 \x01(\tBY\xe0\x41\x02\xfa\x41S\x12Qsecuritycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xe0\x01\n6ListEffectiveEventThreatDetectionCustomModulesResponse\x12\x8c\x01\n/effective_event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32S.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9e\x01\n3GetEffectiveEventThreatDetectionCustomModuleRequest\x12g\n\x04name\x18\x01 \x01(\tBY\xe0\x41\x02\xfa\x41S\nQsecuritycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule\"\xb4\x08\n EventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12,\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12i\n\x0f\x61ncestor_module\x18\x03 \x01(\tBP\xe0\x41\x03\xfa\x41J\nHsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12y\n\x10\x65nablement_state\x18\x04 \x01(\x0e\x32Z.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementStateB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\t \x01(\tB\x03\xe0\x41\x03\"]\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tINHERITED\x10\x03:\xf1\x03\xea\x41\xed\x03\nHsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12zorganizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}\x12pprojects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}\x12nfolders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}*!eventThreatDetectionCustomModules2 eventThreatDetectionCustomModule\"\xc1\x01\n,ListEventThreatDetectionCustomModulesRequest\x12`\n\x06parent\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\x12Hsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc3\x01\n-ListEventThreatDetectionCustomModulesResponse\x12y\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32J.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcb\x01\n6ListDescendantEventThreatDetectionCustomModulesRequest\x12`\n\x06parent\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\x12Hsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xcd\x01\n7ListDescendantEventThreatDetectionCustomModulesResponse\x12y\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32J.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8c\x01\n*GetEventThreatDetectionCustomModuleRequest\x12^\n\x04name\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\nHsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\"\xac\x02\n-CreateEventThreatDetectionCustomModuleRequest\x12`\n\x06parent\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\x12Hsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12}\n$event_threat_detection_custom_module\x18\x03 \x01(\x0b\x32J.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x80\x02\n-UpdateEventThreatDetectionCustomModuleRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12}\n$event_threat_detection_custom_module\x18\x02 \x01(\x0b\x32J.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n-DeleteEventThreatDetectionCustomModuleRequest\x12^\n\x04name\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\nHsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xbd\x01\n/ValidateEventThreatDetectionCustomModuleRequest\x12`\n\x06parent\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\x12Hsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12\x15\n\x08raw_text\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xbe\x04\n0ValidateEventThreatDetectionCustomModuleResponse\x12\x86\x01\n\x06\x65rrors\x18\x02 \x03(\x0b\x32v.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError\x1a\xc8\x02\n\x1b\x43ustomModuleValidationError\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x12\n\nfield_path\x18\x02 \x01(\t\x12w\n\x05start\x18\x03 \x01(\x0b\x32\x63.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.PositionH\x00\x88\x01\x01\x12u\n\x03\x65nd\x18\x04 \x01(\x0b\x32\x63.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.PositionH\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\x1a\x36\n\x08Position\x12\x13\n\x0bline_number\x18\x01 \x01(\x05\x12\x15\n\rcolumn_number\x18\x02 \x01(\x05\"\x9a\x01\n\x1fGetSecurityCenterServiceRequest\x12S\n\x04name\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\n=securitycentermanagement.googleapis.com/SecurityCenterService\x12\"\n\x1ashow_eligible_modules_only\x18\x02 \x01(\x08\"\xcf\x01\n!ListSecurityCenterServicesRequest\x12U\n\x06parent\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\x12=securitycentermanagement.googleapis.com/SecurityCenterService\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x1ashow_eligible_modules_only\x18\x04 \x01(\x08\"\xa0\x01\n\"ListSecurityCenterServicesResponse\x12\x61\n\x18security_center_services\x18\x01 \x03(\x0b\x32?.google.cloud.securitycentermanagement.v1.SecurityCenterService\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdd\x01\n\"UpdateSecurityCenterServiceRequest\x12\x65\n\x17security_center_service\x18\x01 \x01(\x0b\x32?.google.cloud.securitycentermanagement.v1.SecurityCenterServiceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x32\xceU\n\x18SecurityCenterManagement\x12\x90\x04\n1ListEffectiveSecurityHealthAnalyticsCustomModules\x12\x62.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x1a\x63.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\"\x91\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x81\x02\x12Q/v1/{parent=projects/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModulesZR\x12P/v1/{parent=folders/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModulesZX\x12V/v1/{parent=organizations/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules\x12\xfd\x03\n/GetEffectiveSecurityHealthAnalyticsCustomModule\x12`.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x1aV.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule\"\x8f\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\x81\x02\x12Q/v1/{name=projects/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}ZR\x12P/v1/{name=folders/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}ZX\x12V/v1/{name=organizations/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}\x12\xda\x03\n(ListSecurityHealthAnalyticsCustomModules\x12Y.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest\x1aZ.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse\"\xf6\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xe6\x01\x12H/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModulesZI\x12G/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModulesZO\x12M/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules\x12\xa5\x04\n2ListDescendantSecurityHealthAnalyticsCustomModules\x12\x63.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x1a\x64.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse\"\xa3\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x93\x02\x12W/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendantZX\x12V/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendantZ^\x12\\/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant\x12\xc7\x03\n&GetSecurityHealthAnalyticsCustomModule\x12W.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest\x1aM.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule\"\xf4\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe6\x01\x12H/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}ZI\x12G/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}ZO\x12M/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}\x12\xf2\x04\n)CreateSecurityHealthAnalyticsCustomModule\x12Z.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest\x1aM.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule\"\x99\x03\xda\x41.parent,security_health_analytics_custom_module\x82\xd3\xe4\x93\x02\xe1\x02\"H/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:\'security_health_analytics_custom_moduleZr\"G/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:\'security_health_analytics_custom_moduleZx\"M/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:\'security_health_analytics_custom_module\x12\xf1\x05\n)UpdateSecurityHealthAnalyticsCustomModule\x12Z.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest\x1aM.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule\"\x98\x04\xda\x41\x33security_health_analytics_custom_module,update_mask\x82\xd3\xe4\x93\x02\xdb\x03\x32p/v1/{security_health_analytics_custom_module.name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}:\'security_health_analytics_custom_moduleZ\x9a\x01\x32o/v1/{security_health_analytics_custom_module.name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}:\'security_health_analytics_custom_moduleZ\xa0\x01\x32u/v1/{security_health_analytics_custom_module.name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}:\'security_health_analytics_custom_module\x12\x96\x03\n)DeleteSecurityHealthAnalyticsCustomModule\x12Z.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xf4\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe6\x01*H/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}ZI*G/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}ZO*M/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}\x12\x9e\x04\n+SimulateSecurityHealthAnalyticsCustomModule\x12\\.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest\x1a].google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse\"\xb1\x02\xda\x41\x1dparent,custom_config,resource\x82\xd3\xe4\x93\x02\x8a\x02\"Q/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:simulate:\x01*ZU\"P/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:simulate:\x01*Z[\"V/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:simulate:\x01*\x12\xfe\x03\n.ListEffectiveEventThreatDetectionCustomModules\x12_.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest\x1a`.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse\"\x88\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xf8\x01\x12N/v1/{parent=projects/*/locations/*}/effectiveEventThreatDetectionCustomModulesZO\x12M/v1/{parent=folders/*/locations/*}/effectiveEventThreatDetectionCustomModulesZU\x12S/v1/{parent=organizations/*/locations/*}/effectiveEventThreatDetectionCustomModules\x12\xeb\x03\n,GetEffectiveEventThreatDetectionCustomModule\x12].google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest\x1aS.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule\"\x86\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xf8\x01\x12N/v1/{name=projects/*/locations/*/effectiveEventThreatDetectionCustomModules/*}ZO\x12M/v1/{name=folders/*/locations/*/effectiveEventThreatDetectionCustomModules/*}ZU\x12S/v1/{name=organizations/*/locations/*/effectiveEventThreatDetectionCustomModules/*}\x12\xc8\x03\n%ListEventThreatDetectionCustomModules\x12V.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest\x1aW.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse\"\xed\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xdd\x01\x12\x45/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModulesZF\x12\x44/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModulesZL\x12J/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules\x12\x93\x04\n/ListDescendantEventThreatDetectionCustomModules\x12`.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest\x1a\x61.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse\"\x9a\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8a\x02\x12T/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:listDescendantZU\x12S/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:listDescendantZ[\x12Y/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:listDescendant\x12\xb5\x03\n#GetEventThreatDetectionCustomModule\x12T.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest\x1aJ.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01\x12\x45/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}ZF\x12\x44/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}ZL\x12J/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}\x12\xd4\x04\n&CreateEventThreatDetectionCustomModule\x12W.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest\x1aJ.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule\"\x84\x03\xda\x41+parent,event_threat_detection_custom_module\x82\xd3\xe4\x93\x02\xcf\x02\"E/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:$event_threat_detection_custom_moduleZl\"D/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:$event_threat_detection_custom_moduleZr\"J/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:$event_threat_detection_custom_module\x12\xca\x05\n&UpdateEventThreatDetectionCustomModule\x12W.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest\x1aJ.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule\"\xfa\x03\xda\x41\x30\x65vent_threat_detection_custom_module,update_mask\x82\xd3\xe4\x93\x02\xc0\x03\x32j/v1/{event_threat_detection_custom_module.name=projects/*/locations/*/eventThreatDetectionCustomModules/*}:$event_threat_detection_custom_moduleZ\x91\x01\x32i/v1/{event_threat_detection_custom_module.name=folders/*/locations/*/eventThreatDetectionCustomModules/*}:$event_threat_detection_custom_moduleZ\x97\x01\x32o/v1/{event_threat_detection_custom_module.name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}:$event_threat_detection_custom_module\x12\x87\x03\n&DeleteEventThreatDetectionCustomModule\x12W.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01*E/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}ZF*D/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}ZL*J/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}\x12\xec\x03\n(ValidateEventThreatDetectionCustomModule\x12Y.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest\x1aZ.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse\"\x88\x02\x82\xd3\xe4\x93\x02\x81\x02\"N/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:validate:\x01*ZR\"M/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:validate:\x01*ZX\"S/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:validate:\x01*\x12\xf3\x02\n\x18GetSecurityCenterService\x12I.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest\x1a?.google.cloud.securitycentermanagement.v1.SecurityCenterService\"\xca\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xbc\x01\x12:/v1/{name=projects/*/locations/*/securityCenterServices/*}Z;\x12\x39/v1/{name=folders/*/locations/*/securityCenterServices/*}ZA\x12?/v1/{name=organizations/*/locations/*/securityCenterServices/*}\x12\x86\x03\n\x1aListSecurityCenterServices\x12K.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest\x1aL.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse\"\xcc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xbc\x01\x12:/v1/{parent=projects/*/locations/*}/securityCenterServicesZ;\x12\x39/v1/{parent=folders/*/locations/*}/securityCenterServicesZA\x12?/v1/{parent=organizations/*/locations/*}/securityCenterServices\x12\xab\x04\n\x1bUpdateSecurityCenterService\x12L.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest\x1a?.google.cloud.securitycentermanagement.v1.SecurityCenterService\"\xfc\x02\xda\x41#security_center_service,update_mask\x82\xd3\xe4\x93\x02\xcf\x02\x32R/v1/{security_center_service.name=projects/*/locations/*/securityCenterServices/*}:\x17security_center_serviceZl2Q/v1/{security_center_service.name=folders/*/locations/*/securityCenterServices/*}:\x17security_center_serviceZr2W/v1/{security_center_service.name=organizations/*/locations/*/securityCenterServices/*}:\x17security_center_service\x1a[\xca\x41\'securitycentermanagement.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x93\x04\n,com.google.cloud.securitycentermanagement.v1B\x1dSecurityCenterManagementProtoP\x01Zhcloud.google.com/go/securitycentermanagement/apiv1/securitycentermanagementpb;securitycentermanagementpb\xaa\x02(Google.Cloud.SecurityCenterManagement.V1\xca\x02(Google\\Cloud\\SecurityCenterManagement\\V1\xea\x02+Google::Cloud::SecurityCenterManagement::V1\xea\x41q\n] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb new file mode 100644 index 000000000000..b9f8a419f0dc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb @@ -0,0 +1,1334 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Represents a particular Security Command Center service. This includes + # settings information such as top-level enablement in addition to individual + # module settings. Service settings can be configured at the organization, + # folder, or project level. Service settings at the organization or folder + # level are inherited by those in descendant folders and projects. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the service, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}/securityCenterServices/{service}` + # * `folders/{folder}/locations/{location}/securityCenterServices/{service}` + # * `projects/{project}/locations/{location}/securityCenterServices/{service}` + # + # The following values are valid for `{service}`: + # + # * `container-threat-detection` + # * `event-threat-detection` + # * `security-health-analytics` + # * `vm-threat-detection` + # * `web-security-scanner` + # @!attribute [rw] intended_enablement_state + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::EnablementState] + # Optional. The intended enablement state for the service at its level of the + # resource hierarchy. A `DISABLED` state will override all module enablement + # states to `DISABLED`. + # @!attribute [r] effective_enablement_state + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::EnablementState] + # Output only. The effective enablement state for the service at its level of + # the resource hierarchy. If the intended state is set to `INHERITED`, the + # effective state will be inherited from the enablement state of an ancestor. + # This state may differ from the intended enablement state due to billing + # eligibility or onboarding status. + # @!attribute [rw] modules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::ModuleSettings}] + # Optional. The module configurations, including the enablement state for the + # service's modules. The absence of a module in the map implies that its + # configuration is inherited from its parents. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the service was last updated. This could be due to an + # explicit user update or due to a side effect of another system change, such + # as billing subscription expiry. + # @!attribute [rw] service_config + # @return [::Google::Protobuf::Struct] + # Optional. Additional service-specific configuration. Not all services will + # utilize this field. + class SecurityCenterService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The settings for individual modules. + # @!attribute [rw] intended_enablement_state + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::EnablementState] + # Optional. The intended enablement state for the module at its level of + # the resource hierarchy. + # @!attribute [r] effective_enablement_state + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::EnablementState] + # Output only. The effective enablement state for the module at its level + # of the resource hierarchy. If the intended state is set to `INHERITED`, + # the effective state will be inherited from the enablement state of an + # ancestor. This state may differ from the intended enablement state due to + # billing eligibility or onboarding status. + class ModuleSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::ModuleSettings] + class ModulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the possible enablement states for a service or module. + module EnablementState + # Default value. This value is unused. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # State is inherited from the parent resource. Valid as an intended + # enablement state, but not as an effective enablement state. + INHERITED = 1 + + # State is enabled. + ENABLED = 2 + + # State is disabled. + DISABLED = 3 + + # Security Command Center is configured to ingest findings from this + # service, but not to enable this service. This state indicates that + # Security Command Center is misconfigured. You can't set this state + # yourself. + INGEST_ONLY = 4 + end + end + + # The representation of a Security Health Analytics custom module at a + # specified level of the resource hierarchy: organization, folder, or project. + # If a custom module is inherited from an ancestor organization or folder, then + # the enablement state is set to the value that is effective in the parent, not + # to `INHERITED`. For example, if the module is enabled in an organization or + # folder, then the effective enablement state for the module is `ENABLED` in + # all descendant folders or projects. + # @!attribute [rw] name + # @return [::String] + # Identifier. The full resource name of the custom module, in one of the + # following formats: + # + # * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + # * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + # * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + # @!attribute [r] custom_config + # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig] + # Output only. The user-specified configuration for the module. + # @!attribute [r] enablement_state + # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule::EnablementState] + # Output only. The effective enablement state for the module at the given + # level of the hierarchy. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name for the custom module. The name must be + # between 1 and 128 characters, start with a lowercase letter, and contain + # alphanumeric characters or underscores only. + class EffectiveSecurityHealthAnalyticsCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enablement state of the module. + module EnablementState + # Default value. This value is unused. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given level. + ENABLED = 1 + + # The module is disabled at the given level. + DISABLED = 2 + end + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_security_health_analytics_custom_modules SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules}. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list effective custom modules, in one of the + # following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_security_health_analytics_custom_modules SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules}. + # @!attribute [rw] effective_security_health_analytics_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>] + # The list of effective Security Health Analytics custom modules. + # @!attribute [rw] next_page_token + # @return [::String] + # A pagination token. To retrieve the next page of results, call the method + # again with this token. + class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_security_health_analytics_custom_module SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule}. + # @!attribute [rw] name + # @return [::String] + # Required. The full resource name of the custom module, specified in one of + # the following formats: + # + # * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + # * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + # * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an instance of a Security Health Analytics custom module, + # including its full module name, display name, enablement state, and last + # updated time. You can create a custom module at the organization, folder, or + # project level. Custom modules that you create at the organization or folder + # level are inherited by the descendant folders and projects. + # @!attribute [rw] name + # @return [::String] + # Identifier. The full resource name of the custom module, in one of the + # following formats: + # + # * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. The display name of the Security Health Analytics custom module. + # This display name becomes the finding category for all findings that are + # returned by this custom module. The display name must be between 1 and 128 + # characters, start with a lowercase letter, and contain alphanumeric + # characters or underscores only. + # @!attribute [rw] enablement_state + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule::EnablementState] + # Optional. The enablement state of the custom module. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the custom module was last updated. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The editor that last updated the custom module. + # @!attribute [r] ancestor_module + # @return [::String] + # Output only. Specifies the organization or folder from which the custom + # module is inherited. If empty, indicates that the custom module was created + # in the organization, folder, or project in which you are viewing the custom + # module. + # @!attribute [rw] custom_config + # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig] + # Optional. The user-specified custom configuration for the module. + class SecurityHealthAnalyticsCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible enablement states of a custom module. + module EnablementState + # Default value. This value is unused. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given organization, folder, or project. + ENABLED = 1 + + # The module is disabled at the given organization, folder, or project. + DISABLED = 2 + + # State is inherited from an ancestor module. The module will either + # be effectively `ENABLED` or `DISABLED` based on its closest non-inherited + # ancestor module in the resource hierarchy. If you try to set a top-level + # module (a module with no parent) to the `INHERITED` state, you receive an + # `INVALID_ARGUMENT` error. + INHERITED = 3 + end + end + + # Defines the properties in a custom module configuration for Security + # Health Analytics. Use the custom module configuration to create custom + # detectors that generate custom findings for resources that you specify. + # @!attribute [rw] predicate + # @return [::Google::Type::Expr] + # Optional. The Common Expression Language (CEL) expression to evaluate to + # produce findings. When the expression evaluates to `true` against a + # resource, a finding is generated. + # @!attribute [rw] custom_output + # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig::CustomOutputSpec] + # Optional. Custom output properties. + # @!attribute [rw] resource_selector + # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig::ResourceSelector] + # Optional. The Cloud Asset Inventory resource types that the custom module + # operates on. For information about resource types, see [Supported asset + # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + # Each custom module can specify up to 5 resource types. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig::Severity] + # Optional. The severity to assign to findings generated by the module. + # @!attribute [rw] description + # @return [::String] + # Optional. Text that describes the vulnerability or misconfiguration that + # the custom module detects. This explanation is returned with each finding + # instance to help investigators understand the detected issue. The text must + # be enclosed in quotation marks. + # @!attribute [rw] recommendation + # @return [::String] + # Optional. An explanation of the recommended steps that security teams can + # take to resolve the detected issue. This explanation is returned with each + # finding generated by this module. + class CustomConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A set of optional name-value pairs that define custom source properties to + # return with each finding that is generated by the custom module. The custom + # source properties that are defined here are included in the finding. + # @!attribute [rw] properties + # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::CustomConfig::CustomOutputSpec::Property>] + # Optional. A list of custom output properties to add to the finding. + class CustomOutputSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An individual name-value pair that defines a custom source property. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the property for the custom output. + # @!attribute [rw] value_expression + # @return [::Google::Type::Expr] + # Optional. The CEL expression for the custom output. A resource property + # can be specified to return the value of the property or a text string + # enclosed in quotation marks. + class Property + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Resource for selecting resource type. + # @!attribute [rw] resource_types + # @return [::Array<::String>] + # Optional. The resource types to run the detector on. + class ResourceSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the valid value options for the severity of a finding. + module Severity + # Default value. This value is unused. + SEVERITY_UNSPECIFIED = 0 + + # Critical severity. + CRITICAL = 1 + + # High severity. + HIGH = 2 + + # Medium severity. + MEDIUM = 3 + + # Low severity. + LOW = 4 + end + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_health_analytics_custom_modules SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules}. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent organization, folder, or project in which to + # list custom modules, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + class ListSecurityHealthAnalyticsCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_health_analytics_custom_modules SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules}. + # @!attribute [rw] security_health_analytics_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] + # The list of Security Health Analytics custom modules. + # @!attribute [rw] next_page_token + # @return [::String] + # A pagination token. To retrieve the next page of results, call the method + # again with this token. + class ListSecurityHealthAnalyticsCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_security_health_analytics_custom_modules SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules}. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent organization, folder, or project in which to + # list custom modules, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + class ListDescendantSecurityHealthAnalyticsCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_security_health_analytics_custom_modules SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules}. + # @!attribute [rw] security_health_analytics_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] + # The list of SecurityHealthAnalyticsCustomModules + # @!attribute [rw] next_page_token + # @return [::String] + # A pagination token. To retrieve the next page of results, call the method + # again with this token. + class ListDescendantSecurityHealthAnalyticsCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_health_analytics_custom_module SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource, in the format + # `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. + class GetSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_security_health_analytics_custom_module SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule}. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the parent organization, folder, or project of the + # module, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @!attribute [rw] security_health_analytics_custom_module + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # Required. The resource being created. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be created. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to create the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + class CreateSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_health_analytics_custom_module SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule}. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to update. The following values are valid: + # + # * `custom_config` + # * `enablement_state` + # + # If you omit this field or set it to the wildcard value `*`, then all + # eligible fields are updated. + # @!attribute [rw] security_health_analytics_custom_module + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] + # Required. The resource being updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be updated. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to update the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + class UpdateSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_security_health_analytics_custom_module SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the SHA custom module, in one of the + # following formats: + # + # * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be deleted. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to delete the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during deletion of the module + # + # Defaults to `false`. + class DeleteSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#simulate_security_health_analytics_custom_module SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule}. + # The maximum size of the request is 4 MiB. + # @!attribute [rw] parent + # @return [::String] + # Required. The relative resource name of the organization, project, or + # folder. For more information about relative resource names, see [AIP-122: + # Resource names](https://google.aip.dev/122). Example: + # `organizations/{organization_id}`. + # @!attribute [rw] custom_config + # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig] + # Required. The custom configuration that you need to test. + # @!attribute [rw] resource + # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource] + # Required. Resource data to simulate custom module against. + class SimulateSecurityHealthAnalyticsCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Manually constructed information about a resource. + # @!attribute [rw] resource_type + # @return [::String] + # Required. The type of the resource. For example, + # `compute.googleapis.com/Disk`. + # @!attribute [rw] resource_data + # @return [::Google::Protobuf::Struct] + # Optional. A representation of the Google Cloud resource. Should match the + # Google Cloud resource JSON format. + # + # If the custom module evaluates only the IAM allow policy, then you can + # omit this field. + # @!attribute [rw] iam_policy_data + # @return [::Google::Iam::V1::Policy] + # Optional. A representation of the IAM allow policy. + # + # If the custom module evaluates only the resource data, then you can omit + # this field. + class SimulatedResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The minimum set of fields needed to represent a simulated finding from a + # Security Health Analytics custom module. + # @!attribute [rw] name + # @return [::String] + # Identifier. The [relative resource name](https://google.aip.dev/122) of the + # finding, in one of the following formats: + # + # * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # * `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # @!attribute [rw] parent + # @return [::String] + # The [relative resource name](https://google.aip.dev/122) of the source the + # finding belongs to. For example, + # `organizations/{organization_id}/sources/{source_id}`. This field is + # immutable after creation time. + # @!attribute [rw] resource_name + # @return [::String] + # For findings on Google Cloud resources, the + # [full resource name](https://google.aip.dev/122#full-resource-names) of the + # Google Cloud resource this finding is for. When the finding is for a + # non-Google Cloud resource, the value can be a customer or partner defined + # string. This field is immutable after creation time. + # @!attribute [rw] category + # @return [::String] + # The additional taxonomy group within findings from a given source. For + # example, `XSS_FLASH_INJECTION`. This field is immutable after creation + # time. + # @!attribute [r] state + # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulatedFinding::State] + # Output only. The state of the finding. + # @!attribute [rw] source_properties + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Source-specific properties. These properties are managed by the source + # that writes the finding. The key names must be between 1 and 255 + # characters; they must start with a letter and contain alphanumeric + # characters or underscores only. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # The time the finding was first detected. If an existing finding is updated, + # then this is the time the update occurred. If the finding is later + # resolved, then this time reflects when the finding was resolved. + # + # For example, if the finding represents an open firewall, this property + # captures the time the detector believes the firewall became open. The + # accuracy is determined by the detector. + # + # The event time must not be set to a value greater than the current + # timestamp. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulatedFinding::Severity] + # The severity of the finding. This field is managed by the source that + # writes the finding. + # @!attribute [rw] finding_class + # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulatedFinding::FindingClass] + # The class of the finding. + class SimulatedFinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class SourcePropertiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of the finding. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The finding requires attention and has not been addressed yet. + ACTIVE = 1 + + # The finding has been fixed, triaged as a non-issue, or otherwise + # addressed and is no longer active. + INACTIVE = 2 + end + + # The severity of the finding. + module Severity + # Default value. This value is unused. + SEVERITY_UNSPECIFIED = 0 + + # For vulnerabilities: A critical vulnerability is easily discoverable by + # an external actor, exploitable, and results in the direct ability to + # execute arbitrary code, exfiltrate data, and otherwise gain additional + # access and privileges to cloud resources and workloads. Examples include + # publicly accessible unprotected user data and public SSH access with weak + # or no passwords. + # + # For threats: Indicates a threat that is able to access, modify, or delete + # data or execute unauthorized code within existing resources. + CRITICAL = 1 + + # For vulnerabilities: A high-risk vulnerability can be easily discovered + # and exploited in combination with other vulnerabilities in order to gain + # direct access and the ability to execute arbitrary code, exfiltrate data, + # and otherwise gain additional access and privileges to cloud resources + # and workloads. An example is a database with weak or no passwords that is + # only accessible internally. This database could easily be compromised by + # an actor that had access to the internal network. + # + # For threats: Indicates a threat that is able to create new computational + # resources in an environment but not able to access data or execute code + # in existing resources. + HIGH = 2 + + # For vulnerabilities: A medium-risk vulnerability could be used by an + # actor to gain access to resources or privileges that enable them to + # eventually (through multiple steps or a complex exploit) gain access and + # the ability to execute arbitrary code or exfiltrate data. An example is a + # service account with access to more projects than it should have. If an + # actor gains access to the service account, they could potentially use + # that access to manipulate a project the service account was not intended + # to. + # + # For threats: Indicates a threat that is able to cause operational impact + # but may not access data or execute unauthorized code. + MEDIUM = 3 + + # For vulnerabilities: A low-risk vulnerability hampers a security + # organization's ability to detect vulnerabilities or active threats in + # their deployment, or prevents the root cause investigation of security + # issues. An example is monitoring and logs being disabled for resource + # configurations and access. + # + # For threats: Indicates a threat that has obtained minimal access to an + # environment but is not able to access data, execute code, or create + # resources. + LOW = 4 + end + + # Represents what kind of finding it is. + module FindingClass + # Default value. This value is unused. + FINDING_CLASS_UNSPECIFIED = 0 + + # Describes unwanted or malicious activity. + THREAT = 1 + + # Describes a potential weakness in software that increases risk to + # confidentiality, integrity, and availability. + VULNERABILITY = 2 + + # Describes a potential weakness in cloud resource or asset configuration + # that increases risk. + MISCONFIGURATION = 3 + + # Describes a security observation that is for informational purposes. + OBSERVATION = 4 + + # Describes an error that prevents Security Command Center from working + # correctly. + SCC_ERROR = 5 + + # Describes a potential security risk due to a change in the security + # posture. + POSTURE_VIOLATION = 6 + + # Describes a combination of security issues that represent a more severe + # security problem when taken together. + TOXIC_COMBINATION = 7 + end + end + + # Response message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#simulate_security_health_analytics_custom_module SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule}. + # @!attribute [rw] result + # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse::SimulatedResult] + # Result for test case in the corresponding request. + class SimulateSecurityHealthAnalyticsCustomModuleResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible test result. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulatedFinding] + # Finding that would be published for the test case if a violation is + # detected. + # + # Note: The following fields are mutually exclusive: `finding`, `no_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] no_violation + # @return [::Google::Protobuf::Empty] + # Indicates that the test case does not trigger any violation. + # + # Note: The following fields are mutually exclusive: `no_violation`, `finding`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Error encountered during the test. + # + # Note: The following fields are mutually exclusive: `error`, `finding`, `no_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SimulatedResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The representation of an + # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule EventThreatDetectionCustomModule} + # at a given level, taking hierarchy into account and resolving various fields + # accordingly. For example, if the module is enabled at the ancestor level, + # then effective modules at all descendant levels will have their enablement + # state set to `ENABLED`. Similarly, if `module.inherited` is set, then the + # effective module's configuration will reflect the ancestor's configuration. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the Event Threat Detection custom module, + # in one of the following formats: + # + # * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + # @!attribute [r] config + # @return [::Google::Protobuf::Struct] + # Output only. Configuration for the effective module. + # @!attribute [r] enablement_state + # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule::EnablementState] + # Output only. The effective state of enablement for the module at the given + # level of the hierarchy. + # @!attribute [r] type + # @return [::String] + # Output only. Type for the module (for example, `CONFIGURABLE_BAD_IP`). + # @!attribute [r] display_name + # @return [::String] + # Output only. The human-readable name of the module. + # @!attribute [r] description + # @return [::String] + # Output only. A description of the module. + class EffectiveEventThreatDetectionCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enablement state of the module. + module EnablementState + # Default value. This value is unused. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given level. + ENABLED = 1 + + # The module is disabled at the given level. + DISABLED = 2 + end + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_event_threat_detection_custom_modules SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules}. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list effective custom modules, in one of the + # following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + class ListEffectiveEventThreatDetectionCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_event_threat_detection_custom_modules SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules}. + # @!attribute [rw] effective_event_threat_detection_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>] + # The list of effective Event Threat Detection custom modules. + # @!attribute [rw] next_page_token + # @return [::String] + # A pagination token. To retrieve the next page of results, call the method + # again with this token. + class ListEffectiveEventThreatDetectionCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_event_threat_detection_custom_module SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Event Threat Detection custom module, in + # one of the following formats: + # + # * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + class GetEffectiveEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Security Command Center resource that contains the configuration and + # enablement state of a custom module, which enables Event Threat Detection to + # write certain findings to Security Command Center. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the Event Threat Detection custom module, + # in one of the following formats: + # + # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # @!attribute [rw] config + # @return [::Google::Protobuf::Struct] + # Optional. Configuration for the module. For the resident module, its + # configuration value is defined at this level. For the inherited module, its + # configuration value is inherited from the ancestor module. + # @!attribute [r] ancestor_module + # @return [::String] + # Output only. The closest ancestor module that this module inherits the + # enablement state from. If empty, indicates that the custom module was + # created in the requesting parent organization, folder, or project. The + # format is the same as the custom module's resource name. + # @!attribute [rw] enablement_state + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule::EnablementState] + # Optional. The state of enablement for the module at the given level of the + # hierarchy. + # @!attribute [rw] type + # @return [::String] + # Optional. Type for the module. For example, `CONFIGURABLE_BAD_IP`. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The human-readable name of the module. + # @!attribute [rw] description + # @return [::String] + # Optional. A description of the module. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the module was last updated. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The editor the module was last updated by. + class EventThreatDetectionCustomModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enablement state of the module. + module EnablementState + # Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0 + + # The module is enabled at the given level. + ENABLED = 1 + + # The module is disabled at the given level. + DISABLED = 2 + + # State is inherited from an ancestor module. The module will either be + # effectively `ENABLED` or `DISABLED` based on its closest non-inherited + # ancestor module in the CRM hierarchy. If you try to set a top-level + # module (a module with no parent) to the `INHERITED` state, you receive an + # `INVALID_ARGUMENT` error. + INHERITED = 3 + end + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_event_threat_detection_custom_modules SecurityCenterManagement.ListEventThreatDetectionCustomModules}. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list custom modules, in one of the following + # formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of modules to return. The service may return + # fewer than this value. If unspecified, at most 10 modules will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + class ListEventThreatDetectionCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_event_threat_detection_custom_modules SecurityCenterManagement.ListEventThreatDetectionCustomModules}. + # @!attribute [rw] event_threat_detection_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] + # The list of custom modules. + # @!attribute [rw] next_page_token + # @return [::String] + # A pagination token. To retrieve the next page of results, call the method + # again with this token. + class ListEventThreatDetectionCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_event_threat_detection_custom_modules SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules}. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list custom modules, in one of the following + # formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of modules to return. The service may return + # fewer than this value. If unspecified, at most 10 configs will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + class ListDescendantEventThreatDetectionCustomModulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_event_threat_detection_custom_modules SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules}. + # @!attribute [rw] event_threat_detection_custom_modules + # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] + # The list of custom modules. + # @!attribute [rw] next_page_token + # @return [::String] + # A pagination token. To retrieve the next page of results, call the method + # again with this token. + class ListDescendantEventThreatDetectionCustomModulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_event_threat_detection_custom_module SecurityCenterManagement.GetEventThreatDetectionCustomModule}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Event Threat Detection custom module, in + # one of the following formats: + # + # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + class GetEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_event_threat_detection_custom_module SecurityCenterManagement.CreateEventThreatDetectionCustomModule}. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent for the module, in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @!attribute [rw] event_threat_detection_custom_module + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # Required. The module to create. The + # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule#name EventThreatDetectionCustomModule.name} + # field is ignored; Security Command Center generates the name. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be created. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to create the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + class CreateEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a EventThreatDetectionCustomModule + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to update. If omitted, then all fields are updated. + # @!attribute [rw] event_threat_detection_custom_module + # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] + # Required. The module being updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be updated. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to update the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + class UpdateEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_event_threat_detection_custom_module SecurityCenterManagement.DeleteEventThreatDetectionCustomModule}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Event Threat Detection custom module, in + # one of the following formats: + # + # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no module will be deleted. An `OK` response indicates that the + # request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to delete the module could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during creation of the module + # + # Defaults to `false`. + class DeleteEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#validate_event_threat_detection_custom_module SecurityCenterManagement.ValidateEventThreatDetectionCustomModule}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent to validate the custom modules under, + # in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # @!attribute [rw] raw_text + # @return [::String] + # Required. The raw text of the module's contents. Used to generate error + # messages. + # @!attribute [rw] type + # @return [::String] + # Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. + class ValidateEventThreatDetectionCustomModuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#validate_event_threat_detection_custom_module SecurityCenterManagement.ValidateEventThreatDetectionCustomModule}. + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse::CustomModuleValidationError>] + # A list of errors returned by the validator. If the list is empty, there + # were no errors. + class ValidateEventThreatDetectionCustomModuleResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An error encountered while validating the uploaded configuration of an + # Event Threat Detection custom module. + # @!attribute [rw] description + # @return [::String] + # A human-readable description of the error. + # @!attribute [rw] field_path + # @return [::String] + # The path, in [RFC 6901: JSON + # Pointer](https://datatracker.ietf.org/doc/html/rfc6901) format, to the + # field that failed validation. Omitted if no specific field is affected. + # @!attribute [rw] start + # @return [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse::Position] + # The initial position of the error in the uploaded text version of the + # module. Omitted if no specific position applies, or if the position could + # not be computed. + # @!attribute [rw] end + # @return [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse::Position] + # The end position of the error in the uploaded text version of the module. + # Omitted if no specific position applies, or if the position could not be + # computed. + class CustomModuleValidationError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A position in the uploaded text version of a module. + # @!attribute [rw] line_number + # @return [::Integer] + # The line position in the text. + # @!attribute [rw] column_number + # @return [::Integer] + # The column position in the line. + class Position + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_center_service SecurityCenterManagement.GetSecurityCenterService}. + # @!attribute [rw] name + # @return [::String] + # Required. The Security Command Center service to retrieve, in one of the + # following formats: + # + # * organizations/\\{organization}/locations/\\{location}/securityCenterServices/\\{service} + # * folders/\\{folder}/locations/\\{location}/securityCenterServices/\\{service} + # * projects/\\{project}/locations/\\{location}/securityCenterServices/\\{service} + # + # The following values are valid for `{service}`: + # + # * `container-threat-detection` + # * `event-threat-detection` + # * `security-health-analytics` + # * `vm-threat-detection` + # * `web-security-scanner` + # @!attribute [rw] show_eligible_modules_only + # @return [::Boolean] + # Set to `true` to show only modules that are in scope. By default, all + # modules are shown. + class GetSecurityCenterServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_center_services SecurityCenterManagement.ListSecurityCenterServices}. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the parent to list Security Command Center services, + # in one of the following formats: + # + # * `organizations/{organization}/locations/{location}` + # * `folders/{folder}/locations/{location}` + # * `projects/{project}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return in a single response. + # Default is 10, minimum is 1, maximum is 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A pagination token returned from a previous request. Provide this + # token to retrieve the next page of results. + # + # When paginating, the rest of the request must match the request that + # generated the page token. + # @!attribute [rw] show_eligible_modules_only + # @return [::Boolean] + # Flag that, when set, is used to filter the module settings that are shown. + # The default setting is that all modules are shown. + class ListSecurityCenterServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_center_services SecurityCenterManagement.ListSecurityCenterServices}. + # @!attribute [rw] security_center_services + # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>] + # The list of services. + # @!attribute [rw] next_page_token + # @return [::String] + # A pagination token. To retrieve the next page of results, call the method + # again with this token. + class ListSecurityCenterServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_center_service SecurityCenterManagement.UpdateSecurityCenterService}. + # @!attribute [rw] security_center_service + # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] + # Required. The updated service. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to update. Accepts the following values: + # + # * `intended_enablement_state` + # * `modules` + # + # If omitted, then all eligible fields are updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. When set to `true`, the request will be validated (including IAM + # checks), but no service will be updated. An `OK` response indicates that + # the request is valid, while an error response indicates that the request is + # invalid. + # + # If the request is valid, a subsequent request to update the service could + # still fail for one of the following reasons: + # + # * The state of your cloud resources changed; for example, you lost a + # required IAM permission + # * An error occurred during update of the service + # + # Defaults to `false`. + class UpdateSecurityCenterServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/Gemfile new file mode 100644 index 000000000000..48ea53e31c30 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-security_center_management-v1", path: "../" +else + gem "google-cloud-security_center_management-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..1af62ea87528 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the create_event_threat_detection_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_event_threat_detection_custom_module. +# +def create_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new + + # Call the create_event_threat_detection_custom_module method. + result = client.create_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..345362f5da41 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the create_security_health_analytics_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_security_health_analytics_custom_module. +# +def create_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the create_security_health_analytics_custom_module method. + result = client.create_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..1a1782aec5de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_event_threat_detection_custom_module. +# +def delete_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new + + # Call the delete_event_threat_detection_custom_module method. + result = client.delete_event_threat_detection_custom_module request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..7c265ee8e5ba --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_security_health_analytics_custom_module. +# +def delete_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the delete_security_health_analytics_custom_module method. + result = client.delete_security_health_analytics_custom_module request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..9dfd40d071fc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_event_threat_detection_custom_module. +# +def get_effective_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new + + # Call the get_effective_event_threat_detection_custom_module method. + result = client.get_effective_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..6fe48aa1f67b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_security_health_analytics_custom_module. +# +def get_effective_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the get_effective_security_health_analytics_custom_module method. + result = client.get_effective_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..e772e63bd4e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the get_event_threat_detection_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_event_threat_detection_custom_module. +# +def get_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new + + # Call the get_event_threat_detection_custom_module method. + result = client.get_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_center_service.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_center_service.rb new file mode 100644 index 000000000000..6034fcfea4db --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_center_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the get_security_center_service call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_center_service. +# +def get_security_center_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new + + # Call the get_security_center_service method. + result = client.get_security_center_service request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..bb916a20de63 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the get_security_health_analytics_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_health_analytics_custom_module. +# +def get_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the get_security_health_analytics_custom_module method. + result = client.get_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.rb new file mode 100644 index 000000000000..f36375df2816 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_event_threat_detection_custom_modules. +# +def list_descendant_event_threat_detection_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new + + # Call the list_descendant_event_threat_detection_custom_modules method. + result = client.list_descendant_event_threat_detection_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + p item + end +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.rb new file mode 100644 index 000000000000..7cfa0c972603 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_security_health_analytics_custom_modules. +# +def list_descendant_security_health_analytics_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new + + # Call the list_descendant_security_health_analytics_custom_modules method. + result = client.list_descendant_security_health_analytics_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + p item + end +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.rb new file mode 100644 index 000000000000..4c7f69640d8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_event_threat_detection_custom_modules. +# +def list_effective_event_threat_detection_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new + + # Call the list_effective_event_threat_detection_custom_modules method. + result = client.list_effective_event_threat_detection_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. + p item + end +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.rb new file mode 100644 index 000000000000..28d70b7bc51f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_security_health_analytics_custom_modules. +# +def list_effective_security_health_analytics_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new + + # Call the list_effective_security_health_analytics_custom_modules method. + result = client.list_effective_security_health_analytics_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. + p item + end +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.rb new file mode 100644 index 000000000000..fc62f7c99e51 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_event_threat_detection_custom_modules. +# +def list_event_threat_detection_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new + + # Call the list_event_threat_detection_custom_modules method. + result = client.list_event_threat_detection_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + p item + end +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_center_services.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_center_services.rb new file mode 100644 index 000000000000..3c2cc1f945c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_center_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the list_security_center_services call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_center_services. +# +def list_security_center_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new + + # Call the list_security_center_services method. + result = client.list_security_center_services request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. + p item + end +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.rb new file mode 100644 index 000000000000..38701f9cc760 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_health_analytics_custom_modules. +# +def list_security_health_analytics_custom_modules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new + + # Call the list_security_health_analytics_custom_modules method. + result = client.list_security_health_analytics_custom_modules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + p item + end +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..a87f00cd27b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#simulate_security_health_analytics_custom_module. +# +def simulate_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the simulate_security_health_analytics_custom_module method. + result = client.simulate_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..3551bb287965 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the update_event_threat_detection_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_event_threat_detection_custom_module. +# +def update_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new + + # Call the update_event_threat_detection_custom_module method. + result = client.update_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_center_service.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_center_service.rb new file mode 100644 index 000000000000..4abb4dcae4a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_center_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the update_security_center_service call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_center_service. +# +def update_security_center_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new + + # Call the update_security_center_service method. + result = client.update_security_center_service request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_health_analytics_custom_module.rb new file mode 100644 index 000000000000..7aef0a715144 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_health_analytics_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the update_security_health_analytics_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_health_analytics_custom_module. +# +def update_security_health_analytics_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new + + # Call the update_security_health_analytics_custom_module method. + result = client.update_security_health_analytics_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.rb new file mode 100644 index 000000000000..4fd089b6c7d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_sync] +require "google/cloud/security_center_management/v1" + +## +# Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenterManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#validate_event_threat_detection_custom_module. +# +def validate_event_threat_detection_custom_module + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new + + # Call the validate_event_threat_detection_custom_module method. + result = client.validate_event_threat_detection_custom_module request + + # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse. + p result +end +# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/snippet_metadata_google.cloud.securitycentermanagement.v1.json b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/snippet_metadata_google.cloud.securitycentermanagement.v1.json new file mode 100644 index 000000000000..1f027b6d1787 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/snippet_metadata_google.cloud.securitycentermanagement.v1.json @@ -0,0 +1,855 @@ +{ + "client_library": { + "name": "google-cloud-security_center_management-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.securitycentermanagement.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_sync", + "title": "Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_security_health_analytics_custom_modules.", + "file": "security_center_management/list_effective_security_health_analytics_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_effective_security_health_analytics_custom_modules", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_security_health_analytics_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "ListEffectiveSecurityHealthAnalyticsCustomModules", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_security_health_analytics_custom_module.", + "file": "security_center_management/get_effective_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_effective_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "GetEffectiveSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_sync", + "title": "Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_health_analytics_custom_modules.", + "file": "security_center_management/list_security_health_analytics_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_security_health_analytics_custom_modules", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_health_analytics_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "ListSecurityHealthAnalyticsCustomModules", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_sync", + "title": "Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_security_health_analytics_custom_modules.", + "file": "security_center_management/list_descendant_security_health_analytics_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_descendant_security_health_analytics_custom_modules", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_security_health_analytics_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "ListDescendantSecurityHealthAnalyticsCustomModules", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the get_security_health_analytics_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_health_analytics_custom_module.", + "file": "security_center_management/get_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "GetSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the create_security_health_analytics_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_security_health_analytics_custom_module.", + "file": "security_center_management/create_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "CreateSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the update_security_health_analytics_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_health_analytics_custom_module.", + "file": "security_center_management/update_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "UpdateSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_security_health_analytics_custom_module.", + "file": "security_center_management/delete_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "DeleteSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_sync", + "title": "Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#simulate_security_health_analytics_custom_module.", + "file": "security_center_management/simulate_security_health_analytics_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "simulate_security_health_analytics_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#simulate_security_health_analytics_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "SimulateSecurityHealthAnalyticsCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_sync", + "title": "Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_event_threat_detection_custom_modules.", + "file": "security_center_management/list_effective_event_threat_detection_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_effective_event_threat_detection_custom_modules", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_event_threat_detection_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "ListEffectiveEventThreatDetectionCustomModules", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_sync", + "title": "Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_event_threat_detection_custom_module.", + "file": "security_center_management/get_effective_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_effective_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "GetEffectiveEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_sync", + "title": "Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_event_threat_detection_custom_modules.", + "file": "security_center_management/list_event_threat_detection_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_event_threat_detection_custom_modules", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_event_threat_detection_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "ListEventThreatDetectionCustomModules", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_sync", + "title": "Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_event_threat_detection_custom_modules.", + "file": "security_center_management/list_descendant_event_threat_detection_custom_modules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_descendant_event_threat_detection_custom_modules", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_event_threat_detection_custom_modules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "ListDescendantEventThreatDetectionCustomModules", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_sync", + "title": "Snippet for the get_event_threat_detection_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_event_threat_detection_custom_module.", + "file": "security_center_management/get_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "GetEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_sync", + "title": "Snippet for the create_event_threat_detection_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_event_threat_detection_custom_module.", + "file": "security_center_management/create_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "CreateEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_sync", + "title": "Snippet for the update_event_threat_detection_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_event_threat_detection_custom_module.", + "file": "security_center_management/update_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "UpdateEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_sync", + "title": "Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_event_threat_detection_custom_module.", + "file": "security_center_management/delete_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "DeleteEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_sync", + "title": "Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#validate_event_threat_detection_custom_module.", + "file": "security_center_management/validate_event_threat_detection_custom_module.rb", + "language": "RUBY", + "client_method": { + "short_name": "validate_event_threat_detection_custom_module", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#validate_event_threat_detection_custom_module", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "ValidateEventThreatDetectionCustomModule", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_sync", + "title": "Snippet for the get_security_center_service call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_center_service.", + "file": "security_center_management/get_security_center_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_security_center_service", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_center_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "GetSecurityCenterService", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterService", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_sync", + "title": "Snippet for the list_security_center_services call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_center_services.", + "file": "security_center_management/list_security_center_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_security_center_services", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_center_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "ListSecurityCenterServices", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_sync", + "title": "Snippet for the update_security_center_service call in the SecurityCenterManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_center_service.", + "file": "security_center_management/update_security_center_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_security_center_service", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_center_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService", + "client": { + "short_name": "SecurityCenterManagement::Client", + "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" + }, + "method": { + "short_name": "UpdateSecurityCenterService", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterService", + "service": { + "short_name": "SecurityCenterManagement", + "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_test.rb b/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_test.rb new file mode 100644 index 000000000000..57be2bde861c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_test.rb @@ -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 "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/security_center_management/v1/security_center_management" + +class ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_effective_event_threat_detection_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.effective_event_threat_detection_custom_module_path organization: "value0", location: "value1", effective_event_threat_detection_custom_module: "value2" + assert_equal "organizations/value0/locations/value1/effectiveEventThreatDetectionCustomModules/value2", path + + path = client.effective_event_threat_detection_custom_module_path project: "value0", location: "value1", effective_event_threat_detection_custom_module: "value2" + assert_equal "projects/value0/locations/value1/effectiveEventThreatDetectionCustomModules/value2", path + + path = client.effective_event_threat_detection_custom_module_path folder: "value0", location: "value1", effective_event_threat_detection_custom_module: "value2" + assert_equal "folders/value0/locations/value1/effectiveEventThreatDetectionCustomModules/value2", path + end + end + + def test_effective_security_health_analytics_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.effective_security_health_analytics_custom_module_path organization: "value0", location: "value1", effective_security_health_analytics_custom_module: "value2" + assert_equal "organizations/value0/locations/value1/effectiveSecurityHealthAnalyticsCustomModules/value2", path + + path = client.effective_security_health_analytics_custom_module_path project: "value0", location: "value1", effective_security_health_analytics_custom_module: "value2" + assert_equal "projects/value0/locations/value1/effectiveSecurityHealthAnalyticsCustomModules/value2", path + + path = client.effective_security_health_analytics_custom_module_path folder: "value0", location: "value1", effective_security_health_analytics_custom_module: "value2" + assert_equal "folders/value0/locations/value1/effectiveSecurityHealthAnalyticsCustomModules/value2", path + end + end + + def test_event_threat_detection_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.event_threat_detection_custom_module_path organization: "value0", location: "value1", event_threat_detection_custom_module: "value2" + assert_equal "organizations/value0/locations/value1/eventThreatDetectionCustomModules/value2", path + + path = client.event_threat_detection_custom_module_path project: "value0", location: "value1", event_threat_detection_custom_module: "value2" + assert_equal "projects/value0/locations/value1/eventThreatDetectionCustomModules/value2", path + + path = client.event_threat_detection_custom_module_path folder: "value0", location: "value1", event_threat_detection_custom_module: "value2" + assert_equal "folders/value0/locations/value1/eventThreatDetectionCustomModules/value2", path + end + end + + def test_folder_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_location_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_security_center_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.security_center_service_path project: "value0", location: "value1", service: "value2" + assert_equal "projects/value0/locations/value1/securityCenterServices/value2", path + + path = client.security_center_service_path folder: "value0", location: "value1", service: "value2" + assert_equal "folders/value0/locations/value1/securityCenterServices/value2", path + + path = client.security_center_service_path organization: "value0", location: "value1", service: "value2" + assert_equal "organizations/value0/locations/value1/securityCenterServices/value2", path + end + end + + def test_security_health_analytics_custom_module_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.security_health_analytics_custom_module_path organization: "value0", location: "value1", security_health_analytics_custom_module: "value2" + assert_equal "organizations/value0/locations/value1/securityHealthAnalyticsCustomModules/value2", path + + path = client.security_health_analytics_custom_module_path project: "value0", location: "value1", security_health_analytics_custom_module: "value2" + assert_equal "projects/value0/locations/value1/securityHealthAnalyticsCustomModules/value2", path + + path = client.security_health_analytics_custom_module_path folder: "value0", location: "value1", security_health_analytics_custom_module: "value2" + assert_equal "folders/value0/locations/value1/securityHealthAnalyticsCustomModules/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_test.rb b/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_test.rb new file mode 100644 index 000000000000..a14923da003c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_test.rb @@ -0,0 +1,1265 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/securitycentermanagement/v1/security_center_management_pb" +require "google/cloud/security_center_management/v1/security_center_management/rest" + + +class ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_effective_security_health_analytics_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_effective_security_health_analytics_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_count + end + end + end + + def test_get_effective_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_get_effective_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_effective_security_health_analytics_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_effective_security_health_analytics_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_effective_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_list_security_health_analytics_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_security_health_analytics_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_count + end + end + end + + def test_list_descendant_security_health_analytics_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_descendant_security_health_analytics_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_count + end + end + end + + def test_get_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_get_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_security_health_analytics_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_security_health_analytics_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_create_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + security_health_analytics_custom_module = {} + validate_only = true + + create_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_create_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_update_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + security_health_analytics_custom_module = {} + validate_only = true + + update_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_update_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_security_health_analytics_custom_module({ update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_security_health_analytics_custom_module update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_security_health_analytics_custom_module({ update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_delete_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + + delete_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_delete_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_security_health_analytics_custom_module({ name: name, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_security_health_analytics_custom_module name: name, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_security_health_analytics_custom_module({ name: name, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_simulate_security_health_analytics_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + custom_config = {} + resource = {} + + simulate_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_simulate_security_health_analytics_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_count + end + end + end + + def test_list_effective_event_threat_detection_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_effective_event_threat_detection_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_effective_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_count + end + end + end + + def test_get_effective_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_get_effective_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_effective_event_threat_detection_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_effective_event_threat_detection_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_effective_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_list_event_threat_detection_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_event_threat_detection_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_count + end + end + end + + def test_list_descendant_event_threat_detection_custom_modules + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_descendant_event_threat_detection_custom_modules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_descendant_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_count + end + end + end + + def test_get_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_get_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_event_threat_detection_custom_module({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_event_threat_detection_custom_module name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_create_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + event_threat_detection_custom_module = {} + validate_only = true + + create_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_create_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_update_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + event_threat_detection_custom_module = {} + validate_only = true + + update_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_update_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_event_threat_detection_custom_module({ update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_event_threat_detection_custom_module update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new(update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_event_threat_detection_custom_module({ update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new(update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_delete_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + + delete_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_delete_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_event_threat_detection_custom_module({ name: name, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_event_threat_detection_custom_module name: name, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_event_threat_detection_custom_module({ name: name, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_validate_event_threat_detection_custom_module + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + raw_text = "hello world" + type = "hello world" + + validate_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_validate_event_threat_detection_custom_module_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, validate_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_count + end + end + end + + def test_get_security_center_service + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + show_eligible_modules_only = true + + get_security_center_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_get_security_center_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_security_center_service_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_security_center_service name: name, show_eligible_modules_only: show_eligible_modules_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_security_center_service_client_stub.call_count + end + end + end + + def test_list_security_center_services + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_eligible_modules_only = true + + list_security_center_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_security_center_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_security_center_services_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_security_center_services parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_security_center_services ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_security_center_services(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_security_center_services_client_stub.call_count + end + end + end + + def test_update_security_center_service + # Create test objects. + client_result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + security_center_service = {} + update_mask = {} + validate_only = true + + update_security_center_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_update_security_center_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_security_center_service_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_security_center_service({ security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_security_center_service security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new(security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_security_center_service({ security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new(security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_security_center_service_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_test.rb b/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_test.rb new file mode 100644 index 000000000000..a8b7fce652a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_test.rb @@ -0,0 +1,1421 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/securitycentermanagement/v1/security_center_management_pb" +require "google/cloud/security_center_management/v1/security_center_management" + +class ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_effective_security_health_analytics_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_effective_security_health_analytics_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_rpc_count + end + end + + def test_get_effective_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_effective_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_effective_security_health_analytics_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_effective_security_health_analytics_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_effective_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_list_security_health_analytics_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_security_health_analytics_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_rpc_count + end + end + + def test_list_descendant_security_health_analytics_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_descendant_security_health_analytics_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_rpc_count + end + end + + def test_get_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_security_health_analytics_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_security_health_analytics_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_create_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + security_health_analytics_custom_module = {} + validate_only = true + + create_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_update_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + security_health_analytics_custom_module = {} + validate_only = true + + update_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_security_health_analytics_custom_module({ update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_security_health_analytics_custom_module update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_security_health_analytics_custom_module({ update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_delete_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + + delete_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_security_health_analytics_custom_module({ name: name, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_security_health_analytics_custom_module name: name, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_security_health_analytics_custom_module({ name: name, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_simulate_security_health_analytics_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + custom_config = {} + resource = {} + + simulate_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :simulate_security_health_analytics_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::CustomConfig), request["custom_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource), request["resource"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_rpc_count + end + end + + def test_list_effective_event_threat_detection_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_effective_event_threat_detection_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_effective_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_rpc_count + end + end + + def test_get_effective_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_effective_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_effective_event_threat_detection_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_effective_event_threat_detection_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_effective_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_list_event_threat_detection_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_event_threat_detection_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_rpc_count + end + end + + def test_list_descendant_event_threat_detection_custom_modules + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_descendant_event_threat_detection_custom_modules, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_descendant_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_rpc_count + end + end + + def test_get_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_event_threat_detection_custom_module({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_event_threat_detection_custom_module name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_create_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + event_threat_detection_custom_module = {} + validate_only = true + + create_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_update_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + event_threat_detection_custom_module = {} + validate_only = true + + update_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_event_threat_detection_custom_module({ update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_event_threat_detection_custom_module update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new(update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_event_threat_detection_custom_module({ update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new(update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_delete_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + + delete_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_event_threat_detection_custom_module({ name: name, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_event_threat_detection_custom_module name: name, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_event_threat_detection_custom_module({ name: name, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_validate_event_threat_detection_custom_module + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + raw_text = "hello world" + type = "hello world" + + validate_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :validate_event_threat_detection_custom_module, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["raw_text"] + assert_equal "hello world", request["type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, validate_event_threat_detection_custom_module_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_rpc_count + end + end + + def test_get_security_center_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + show_eligible_modules_only = true + + get_security_center_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_security_center_service, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["show_eligible_modules_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_security_center_service_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_security_center_service name: name, show_eligible_modules_only: show_eligible_modules_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_security_center_service_client_stub.call_rpc_count + end + end + + def test_list_security_center_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + show_eligible_modules_only = true + + list_security_center_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_security_center_services, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["show_eligible_modules_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_security_center_services_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_security_center_services parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_security_center_services ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_security_center_services(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_security_center_services_client_stub.call_rpc_count + end + end + + def test_update_security_center_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + security_center_service = {} + update_mask = {} + validate_only = true + + update_security_center_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_security_center_service, name + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService), request["security_center_service"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_security_center_service_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_security_center_service({ security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_security_center_service security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new(security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_security_center_service({ security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new(security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_security_center_service_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/test/helper.rb b/owl-bot-staging/google-cloud-security_center_management-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center_management-v1/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-v1/.gitignore b/owl-bot-staging/google-cloud-service_control-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/.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-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-service_control-v1/.repo-metadata.json new file mode 100644 index 000000000000..6f4ac0605165 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/.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-v1/latest", + "distribution_name": "google-cloud-service_control-v1", + "is_cloud": true, + "language": "ruby", + "name": "servicecontrol", + "name_pretty": "Service Control API V1 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. Note that google-cloud-service_control-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_control instead. See the readme for more details.", + "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-v1/.rubocop.yml b/owl-bot-staging/google-cloud-service_control-v1/.rubocop.yml new file mode 100644 index 000000000000..12b1f90426a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-service_control-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-service_control-v1.rb" diff --git a/owl-bot-staging/google-cloud-service_control-v1/.toys.rb b/owl-bot-staging/google-cloud-service_control-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/.yardopts b/owl-bot-staging/google-cloud-service_control-v1/.yardopts new file mode 100644 index 000000000000..2bbe9053aeb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Service Control API V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-service_control-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_control-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..d242e6b29038 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-service_control-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-service_control-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/service_control/v1" + +client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/service_control/v1" + +::Google::Cloud::ServiceControl::V1::QuotaController::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-service_control-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/service_control/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-service_control-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-service_control-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-service_control-v1/Gemfile b/owl-bot-staging/google-cloud-service_control-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-v1/LICENSE.md b/owl-bot-staging/google-cloud-service_control-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-service_control-v1/README.md b/owl-bot-staging/google-cloud-service_control-v1/README.md new file mode 100644 index 000000000000..959ac12e2d69 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Service Control API V1 API + +Provides admission control and telemetry reporting for services integrated with Service Infrastructure. + +The Service Control API provides control plane functionality to managed services, such as logging, monitoring, and status checks. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Service Control API V1 API. Most users should consider using +the main client gem, +[google-cloud-service_control](https://rubygems.org/gems/google-cloud-service_control). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-service_control-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/servicecontrol.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/service_control/v1" + +client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new +request = ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new # (request fields as keyword arguments...) +response = client.allocate_quota request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/service-infrastructure/docs/overview/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/service_control/v1" +require "logger" + +client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-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-v1/Rakefile b/owl-bot-staging/google-cloud-service_control-v1/Rakefile new file mode 100644 index 000000000000..1cadd92fcbaf --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-service_control-v1 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-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-service_control-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-service_control-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-service_control-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-service_control-v1" + header "google-cloud-service_control-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-service_control-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-service_control-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-service_control-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-service_control-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-service_control-v1/gapic_metadata.json new file mode 100644 index 000000000000..f4217c466359 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/gapic_metadata.json @@ -0,0 +1,42 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.api.servicecontrol.v1", + "libraryPackage": "::Google::Cloud::ServiceControl::V1", + "services": { + "QuotaController": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ServiceControl::V1::QuotaController::Client", + "rpcs": { + "AllocateQuota": { + "methods": [ + "allocate_quota" + ] + } + } + } + } + }, + "ServiceController": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ServiceControl::V1::ServiceController::Client", + "rpcs": { + "Check": { + "methods": [ + "check" + ] + }, + "Report": { + "methods": [ + "report" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-service_control-v1/google-cloud-service_control-v1.gemspec b/owl-bot-staging/google-cloud-service_control-v1/google-cloud-service_control-v1.gemspec new file mode 100644 index 000000000000..7b0fd8c9a699 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/google-cloud-service_control-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/service_control/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-service_control-v1" + gem.version = Google::Cloud::ServiceControl::V1::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. Note that google-cloud-service_control-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_control instead. See the readme for more details." + gem.summary = "Provides admission control and telemetry reporting for services integrated with Service Infrastructure." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google-cloud-service_control-v1.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google-cloud-service_control-v1.rb new file mode 100644 index 000000000000..bfde08f78cb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google-cloud-service_control-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/service_control/v1" diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/check_error_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/check_error_pb.rb new file mode 100644 index 000000000000..d3741b33f8bd --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/check_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/servicecontrol/v1/check_error.proto + +require 'google/protobuf' + +require 'google/rpc/status_pb' + + +descriptor_data = "\n.google/api/servicecontrol/v1/check_error.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a\x17google/rpc/status.proto\"\xae\x05\n\nCheckError\x12;\n\x04\x63ode\x18\x01 \x01(\x0e\x32-.google.api.servicecontrol.v1.CheckError.Code\x12\x0f\n\x07subject\x18\x04 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\x12\"\n\x06status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\"\x9d\x04\n\x04\x43ode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12\r\n\tNOT_FOUND\x10\x05\x12\x15\n\x11PERMISSION_DENIED\x10\x07\x12\x16\n\x12RESOURCE_EXHAUSTED\x10\x08\x12\x19\n\x15SERVICE_NOT_ACTIVATED\x10h\x12\x14\n\x10\x42ILLING_DISABLED\x10k\x12\x13\n\x0fPROJECT_DELETED\x10l\x12\x13\n\x0fPROJECT_INVALID\x10r\x12\x14\n\x10\x43ONSUMER_INVALID\x10}\x12\x16\n\x12IP_ADDRESS_BLOCKED\x10m\x12\x13\n\x0fREFERER_BLOCKED\x10n\x12\x16\n\x12\x43LIENT_APP_BLOCKED\x10o\x12\x16\n\x12\x41PI_TARGET_BLOCKED\x10z\x12\x13\n\x0f\x41PI_KEY_INVALID\x10i\x12\x13\n\x0f\x41PI_KEY_EXPIRED\x10p\x12\x15\n\x11\x41PI_KEY_NOT_FOUND\x10q\x12\x16\n\x12INVALID_CREDENTIAL\x10{\x12!\n\x1cNAMESPACE_LOOKUP_UNAVAILABLE\x10\xac\x02\x12\x1f\n\x1aSERVICE_STATUS_UNAVAILABLE\x10\xad\x02\x12\x1f\n\x1a\x42ILLING_STATUS_UNAVAILABLE\x10\xae\x02\x12/\n*CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE\x10\xb1\x02\x42\xe7\x01\n com.google.api.servicecontrol.v1B\x0f\x43heckErrorProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceControl + module V1 + CheckError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckError").msgclass + CheckError::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckError.Code").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/distribution_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/distribution_pb.rb new file mode 100644 index 000000000000..8cce8a133ca1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/distribution_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/servicecontrol/v1/distribution.proto + +require 'google/protobuf' + +require 'google/api/distribution_pb' + + +descriptor_data = "\n/google/api/servicecontrol/v1/distribution.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a\x1dgoogle/api/distribution.proto\"\x9e\x05\n\x0c\x44istribution\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x0c\n\x04mean\x18\x02 \x01(\x01\x12\x0f\n\x07minimum\x18\x03 \x01(\x01\x12\x0f\n\x07maximum\x18\x04 \x01(\x01\x12 \n\x18sum_of_squared_deviation\x18\x05 \x01(\x01\x12\x15\n\rbucket_counts\x18\x06 \x03(\x03\x12R\n\x0elinear_buckets\x18\x07 \x01(\x0b\x32\x38.google.api.servicecontrol.v1.Distribution.LinearBucketsH\x00\x12\\\n\x13\x65xponential_buckets\x18\x08 \x01(\x0b\x32=.google.api.servicecontrol.v1.Distribution.ExponentialBucketsH\x00\x12V\n\x10\x65xplicit_buckets\x18\t \x01(\x0b\x32:.google.api.servicecontrol.v1.Distribution.ExplicitBucketsH\x00\x12\x34\n\texemplars\x18\n \x03(\x0b\x32!.google.api.Distribution.Exemplar\x1aJ\n\rLinearBuckets\x12\x1a\n\x12num_finite_buckets\x18\x01 \x01(\x05\x12\r\n\x05width\x18\x02 \x01(\x01\x12\x0e\n\x06offset\x18\x03 \x01(\x01\x1aV\n\x12\x45xponentialBuckets\x12\x1a\n\x12num_finite_buckets\x18\x01 \x01(\x05\x12\x15\n\rgrowth_factor\x18\x02 \x01(\x01\x12\r\n\x05scale\x18\x03 \x01(\x01\x1a!\n\x0f\x45xplicitBuckets\x12\x0e\n\x06\x62ounds\x18\x01 \x03(\x01\x42\x0f\n\rbucket_optionB\xe9\x01\n com.google.api.servicecontrol.v1B\x11\x44istributionProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceControl + module V1 + Distribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution").msgclass + Distribution::LinearBuckets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution.LinearBuckets").msgclass + Distribution::ExponentialBuckets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution.ExponentialBuckets").msgclass + Distribution::ExplicitBuckets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution.ExplicitBuckets").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/http_request_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/http_request_pb.rb new file mode 100644 index 000000000000..de8a58424660 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/http_request_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/servicecontrol/v1/http_request.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n/google/api/servicecontrol/v1/http_request.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a\x1egoogle/protobuf/duration.proto\"\xef\x02\n\x0bHttpRequest\x12\x16\n\x0erequest_method\x18\x01 \x01(\t\x12\x13\n\x0brequest_url\x18\x02 \x01(\t\x12\x14\n\x0crequest_size\x18\x03 \x01(\x03\x12\x0e\n\x06status\x18\x04 \x01(\x05\x12\x15\n\rresponse_size\x18\x05 \x01(\x03\x12\x12\n\nuser_agent\x18\x06 \x01(\t\x12\x11\n\tremote_ip\x18\x07 \x01(\t\x12\x11\n\tserver_ip\x18\r \x01(\t\x12\x0f\n\x07referer\x18\x08 \x01(\t\x12*\n\x07latency\x18\x0e \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0c\x63\x61\x63he_lookup\x18\x0b \x01(\x08\x12\x11\n\tcache_hit\x18\t \x01(\x08\x12*\n\"cache_validated_with_origin_server\x18\n \x01(\x08\x12\x18\n\x10\x63\x61\x63he_fill_bytes\x18\x0c \x01(\x03\x12\x10\n\x08protocol\x18\x0f \x01(\tB\xe8\x01\n com.google.api.servicecontrol.v1B\x10HttpRequestProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceControl + module V1 + HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.HttpRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/log_entry_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/log_entry_pb.rb new file mode 100644 index 000000000000..33520e195e44 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/log_entry_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/servicecontrol/v1/log_entry.proto + +require 'google/protobuf' + +require 'google/api/servicecontrol/v1/http_request_pb' +require 'google/logging/type/log_severity_pb' +require 'google/protobuf/any_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/api/servicecontrol/v1/log_entry.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a/google/api/servicecontrol/v1/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x04\n\x08LogEntry\x12\x0c\n\x04name\x18\n \x01(\t\x12-\n\ttimestamp\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x08severity\x18\x0c \x01(\x0e\x32 .google.logging.type.LogSeverity\x12?\n\x0chttp_request\x18\x0e \x01(\x0b\x32).google.api.servicecontrol.v1.HttpRequest\x12\r\n\x05trace\x18\x0f \x01(\t\x12\x11\n\tinsert_id\x18\x04 \x01(\t\x12\x42\n\x06labels\x18\r \x03(\x0b\x32\x32.google.api.servicecontrol.v1.LogEntry.LabelsEntry\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12\x31\n\x0estruct_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x42\n\toperation\x18\x10 \x01(\x0b\x32/.google.api.servicecontrol.v1.LogEntryOperation\x12M\n\x0fsource_location\x18\x11 \x01(\x0b\x32\x34.google.api.servicecontrol.v1.LogEntrySourceLocation\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07payload\"N\n\x11LogEntryOperation\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08producer\x18\x02 \x01(\t\x12\r\n\x05\x66irst\x18\x03 \x01(\x08\x12\x0c\n\x04last\x18\x04 \x01(\x08\"F\n\x16LogEntrySourceLocation\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\x0c\n\x04line\x18\x02 \x01(\x03\x12\x10\n\x08\x66unction\x18\x03 \x01(\tB\xe5\x01\n com.google.api.servicecontrol.v1B\rLogEntryProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceControl + module V1 + LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.LogEntry").msgclass + LogEntryOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.LogEntryOperation").msgclass + LogEntrySourceLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.LogEntrySourceLocation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/metric_value_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/metric_value_pb.rb new file mode 100644 index 000000000000..95e8a50317f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/metric_value_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/servicecontrol/v1/metric_value.proto + +require 'google/protobuf' + +require 'google/api/servicecontrol/v1/distribution_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n/google/api/servicecontrol/v1/metric_value.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a/google/api/servicecontrol/v1/distribution.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x91\x03\n\x0bMetricValue\x12\x45\n\x06labels\x18\x01 \x03(\x0b\x32\x35.google.api.servicecontrol.v1.MetricValue.LabelsEntry\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x05 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x06 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x07 \x01(\tH\x00\x12H\n\x12\x64istribution_value\x18\x08 \x01(\x0b\x32*.google.api.servicecontrol.v1.DistributionH\x00\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x07\n\x05value\"g\n\x0eMetricValueSet\x12\x13\n\x0bmetric_name\x18\x01 \x01(\t\x12@\n\rmetric_values\x18\x02 \x03(\x0b\x32).google.api.servicecontrol.v1.MetricValueB\xeb\x01\n com.google.api.servicecontrol.v1B\x13MetricValueSetProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceControl + module V1 + MetricValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.MetricValue").msgclass + MetricValueSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.MetricValueSet").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/operation_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/operation_pb.rb new file mode 100644 index 000000000000..a376009218f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/operation_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/servicecontrol/v1/operation.proto + +require 'google/protobuf' + +require 'google/api/servicecontrol/v1/log_entry_pb' +require 'google/api/servicecontrol/v1/metric_value_pb' +require 'google/protobuf/any_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/api/servicecontrol/v1/operation.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a,google/api/servicecontrol/v1/log_entry.proto\x1a/google/api/servicecontrol/v1/metric_value.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x05\n\tOperation\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\x16\n\x0eoperation_name\x18\x02 \x01(\t\x12\x13\n\x0b\x63onsumer_id\x18\x03 \x01(\t\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x06labels\x18\x06 \x03(\x0b\x32\x33.google.api.servicecontrol.v1.Operation.LabelsEntry\x12G\n\x11metric_value_sets\x18\x07 \x03(\x0b\x32,.google.api.servicecontrol.v1.MetricValueSet\x12;\n\x0blog_entries\x18\x08 \x03(\x0b\x32&.google.api.servicecontrol.v1.LogEntry\x12\x46\n\nimportance\x18\x0b \x01(\x0e\x32\x32.google.api.servicecontrol.v1.Operation.Importance\x12L\n\x0buser_labels\x18\x0c \x03(\x0b\x32\x37.google.api.servicecontrol.v1.Operation.UserLabelsEntry\x12(\n\nextensions\x18\x10 \x03(\x0b\x32\x14.google.protobuf.Any\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1f\n\nImportance\x12\x07\n\x03LOW\x10\x00\x12\x08\n\x04HIGH\x10\x01\x42\xe6\x01\n com.google.api.servicecontrol.v1B\x0eOperationProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceControl + module V1 + Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Operation").msgclass + Operation::Importance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Operation.Importance").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_pb.rb new file mode 100644 index 000000000000..a3de7db9b77f --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/servicecontrol/v1/quota_controller.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/servicecontrol/v1/metric_value_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n3google/api/servicecontrol/v1/quota_controller.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a/google/api/servicecontrol/v1/metric_value.proto\x1a\x17google/rpc/status.proto\"\x91\x01\n\x14\x41llocateQuotaRequest\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12H\n\x12\x61llocate_operation\x18\x02 \x01(\x0b\x32,.google.api.servicecontrol.v1.QuotaOperation\x12\x19\n\x11service_config_id\x18\x04 \x01(\t\"\xc6\x03\n\x0eQuotaOperation\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\x13\n\x0bmethod_name\x18\x02 \x01(\t\x12\x13\n\x0b\x63onsumer_id\x18\x03 \x01(\t\x12H\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.api.servicecontrol.v1.QuotaOperation.LabelsEntry\x12\x43\n\rquota_metrics\x18\x05 \x03(\x0b\x32,.google.api.servicecontrol.v1.MetricValueSet\x12J\n\nquota_mode\x18\x06 \x01(\x0e\x32\x36.google.api.servicecontrol.v1.QuotaOperation.QuotaMode\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"j\n\tQuotaMode\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x0f\n\x0b\x42\x45ST_EFFORT\x10\x02\x12\x0e\n\nCHECK_ONLY\x10\x03\x12\x0e\n\nQUERY_ONLY\x10\x04\x12\x0f\n\x0b\x41\x44JUST_ONLY\x10\x05\"\xd0\x01\n\x15\x41llocateQuotaResponse\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\x41\n\x0f\x61llocate_errors\x18\x02 \x03(\x0b\x32(.google.api.servicecontrol.v1.QuotaError\x12\x43\n\rquota_metrics\x18\x03 \x03(\x0b\x32,.google.api.servicecontrol.v1.MetricValueSet\x12\x19\n\x11service_config_id\x18\x04 \x01(\t\"\x9c\x02\n\nQuotaError\x12;\n\x04\x63ode\x18\x01 \x01(\x0e\x32-.google.api.servicecontrol.v1.QuotaError.Code\x12\x0f\n\x07subject\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\"\n\x06status\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\x86\x01\n\x04\x43ode\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x16\n\x12RESOURCE_EXHAUSTED\x10\x08\x12\x16\n\x12\x42ILLING_NOT_ACTIVE\x10k\x12\x13\n\x0fPROJECT_DELETED\x10l\x12\x13\n\x0f\x41PI_KEY_INVALID\x10i\x12\x13\n\x0f\x41PI_KEY_EXPIRED\x10p2\xc5\x02\n\x0fQuotaController\x12\xae\x01\n\rAllocateQuota\x12\x32.google.api.servicecontrol.v1.AllocateQuotaRequest\x1a\x33.google.api.servicecontrol.v1.AllocateQuotaResponse\"4\x82\xd3\xe4\x93\x02.\")/v1/services/{service_name}:allocateQuota:\x01*\x1a\x80\x01\xca\x41\x1dservicecontrol.googleapis.com\xd2\x41]https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/servicecontrolB\xec\x01\n com.google.api.servicecontrol.v1B\x14QuotaControllerProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceControl + module V1 + AllocateQuotaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.AllocateQuotaRequest").msgclass + QuotaOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaOperation").msgclass + QuotaOperation::QuotaMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaOperation.QuotaMode").enummodule + AllocateQuotaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.AllocateQuotaResponse").msgclass + QuotaError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaError").msgclass + QuotaError::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaError.Code").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb new file mode 100644 index 000000000000..d4f30c296b0d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/api/servicecontrol/v1/quota_controller.proto for package 'Google.Cloud.ServiceControl.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/api/servicecontrol/v1/quota_controller_pb' + +module Google + module Cloud + module ServiceControl + module V1 + module 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). + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.api.servicecontrol.v1.QuotaController' + + # Attempts to allocate quota for the specified consumer. It should be called + # before the operation is executed. + # + # This method requires the `servicemanagement.services.quota` + # permission on the specified service. For more information, see + # [Cloud IAM](https://cloud.google.com/iam). + # + # **NOTE:** The client **must** fail-open on server errors `INTERNAL`, + # `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system + # reliability, the server may inject these errors to prohibit any hard + # dependency on the quota functionality. + rpc :AllocateQuota, ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest, ::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_pb.rb new file mode 100644 index 000000000000..19ab679f9674 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/servicecontrol/v1/service_controller.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/servicecontrol/v1/check_error_pb' +require 'google/api/servicecontrol/v1/operation_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n5google/api/servicecontrol/v1/service_controller.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a.google/api/servicecontrol/v1/check_error.proto\x1a,google/api/servicecontrol/v1/operation.proto\x1a\x17google/rpc/status.proto\"{\n\x0c\x43heckRequest\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12:\n\toperation\x18\x02 \x01(\x0b\x32\'.google.api.servicecontrol.v1.Operation\x12\x19\n\x11service_config_id\x18\x04 \x01(\t\"\xfc\x04\n\rCheckResponse\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12>\n\x0c\x63heck_errors\x18\x02 \x03(\x0b\x32(.google.api.servicecontrol.v1.CheckError\x12\x19\n\x11service_config_id\x18\x05 \x01(\t\x12\x1a\n\x12service_rollout_id\x18\x0b \x01(\t\x12I\n\ncheck_info\x18\x06 \x01(\x0b\x32\x35.google.api.servicecontrol.v1.CheckResponse.CheckInfo\x1a\x8b\x01\n\tCheckInfo\x12\x18\n\x10unused_arguments\x18\x01 \x03(\t\x12O\n\rconsumer_info\x18\x02 \x01(\x0b\x32\x38.google.api.servicecontrol.v1.CheckResponse.ConsumerInfo\x12\x13\n\x0b\x61pi_key_uid\x18\x05 \x01(\t\x1a\x84\x02\n\x0c\x43onsumerInfo\x12\x16\n\x0eproject_number\x18\x01 \x01(\x03\x12S\n\x04type\x18\x02 \x01(\x0e\x32\x45.google.api.servicecontrol.v1.CheckResponse.ConsumerInfo.ConsumerType\x12\x17\n\x0f\x63onsumer_number\x18\x03 \x01(\x03\"n\n\x0c\x43onsumerType\x12\x1d\n\x19\x43ONSUMER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PROJECT\x10\x01\x12\n\n\x06\x46OLDER\x10\x02\x12\x10\n\x0cORGANIZATION\x10\x03\x12\x14\n\x10SERVICE_SPECIFIC\x10\x04\"}\n\rReportRequest\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12;\n\noperations\x18\x02 \x03(\x0b\x32\'.google.api.servicecontrol.v1.Operation\x12\x19\n\x11service_config_id\x18\x03 \x01(\t\"\xe1\x01\n\x0eReportResponse\x12O\n\rreport_errors\x18\x01 \x03(\x0b\x32\x38.google.api.servicecontrol.v1.ReportResponse.ReportError\x12\x19\n\x11service_config_id\x18\x02 \x01(\t\x12\x1a\n\x12service_rollout_id\x18\x04 \x01(\t\x1aG\n\x0bReportError\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status2\xbc\x03\n\x11ServiceController\x12\x8e\x01\n\x05\x43heck\x12*.google.api.servicecontrol.v1.CheckRequest\x1a+.google.api.servicecontrol.v1.CheckResponse\",\x82\xd3\xe4\x93\x02&\"!/v1/services/{service_name}:check:\x01*\x12\x92\x01\n\x06Report\x12+.google.api.servicecontrol.v1.ReportRequest\x1a,.google.api.servicecontrol.v1.ReportResponse\"-\x82\xd3\xe4\x93\x02\'\"\"/v1/services/{service_name}:report:\x01*\x1a\x80\x01\xca\x41\x1dservicecontrol.googleapis.com\xd2\x41]https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/servicecontrolB\xee\x01\n com.google.api.servicecontrol.v1B\x16ServiceControllerProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceControl + module V1 + CheckRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckRequest").msgclass + CheckResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse").msgclass + CheckResponse::CheckInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse.CheckInfo").msgclass + CheckResponse::ConsumerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse.ConsumerInfo").msgclass + CheckResponse::ConsumerInfo::ConsumerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse.ConsumerInfo.ConsumerType").enummodule + ReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.ReportRequest").msgclass + ReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.ReportResponse").msgclass + ReportResponse::ReportError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.ReportResponse.ReportError").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb new file mode 100644 index 000000000000..2278fccc29d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb @@ -0,0 +1,81 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/api/servicecontrol/v1/service_controller.proto for package 'Google.Cloud.ServiceControl.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/api/servicecontrol/v1/service_controller_pb' + +module Google + module Cloud + module ServiceControl + module V1 + module 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). + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.api.servicecontrol.v1.ServiceController' + + # Checks whether an operation on a service should be allowed to proceed + # based on the configuration of the service and related policies. It must be + # called before the operation is executed. + # + # If feasible, the client should cache the check results and reuse them for + # 60 seconds. In case of any server errors, the client should rely on the + # cached results for much longer time to avoid outage. + # WARNING: There is general 60s delay for the configuration and policy + # propagation, therefore callers MUST NOT depend on the `Check` method having + # the latest policy information. + # + # NOTE: the [CheckRequest][google.api.servicecontrol.v1.CheckRequest] has the + # size limit (wire-format byte size) of 1MB. + # + # This method requires the `servicemanagement.services.check` permission + # on the specified service. For more information, see + # [Cloud IAM](https://cloud.google.com/iam). + rpc :Check, ::Google::Cloud::ServiceControl::V1::CheckRequest, ::Google::Cloud::ServiceControl::V1::CheckResponse + # Reports operation results to Google Service Control, such as logs and + # metrics. It should be called after an operation is completed. + # + # If feasible, the client should aggregate reporting data for up to 5 + # seconds to reduce API traffic. Limiting aggregation to 5 seconds is to + # reduce data loss during client crashes. Clients should carefully choose + # the aggregation time window to avoid data loss risk more than 0.01% + # for business and compliance reasons. + # + # NOTE: the [ReportRequest][google.api.servicecontrol.v1.ReportRequest] has + # the size limit (wire-format byte size) of 1MB. + # + # This method requires the `servicemanagement.services.report` permission + # on the specified service. For more information, see + # [Google Cloud IAM](https://cloud.google.com/iam). + rpc :Report, ::Google::Cloud::ServiceControl::V1::ReportRequest, ::Google::Cloud::ServiceControl::V1::ReportResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1.rb new file mode 100644 index 000000000000..dcc95829cf0e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/service_control/v1/quota_controller" +require "google/cloud/service_control/v1/service_controller" +require "google/cloud/service_control/v1/version" + +module Google + module Cloud + module ServiceControl + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/service_control/v1" + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/service_control/v1" + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/service_control/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller.rb new file mode 100644 index 000000000000..e963c97e2520 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_control/v1/version" + +require "google/cloud/service_control/v1/quota_controller/credentials" +require "google/cloud/service_control/v1/quota_controller/client" +require "google/cloud/service_control/v1/quota_controller/rest" + +module Google + module Cloud + module ServiceControl + module V1 + ## + # [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). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/service_control/v1/quota_controller" + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/service_control/v1/quota_controller/rest" + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new + # + module QuotaController + end + end + end + end +end + +helper_path = ::File.join __dir__, "quota_controller", "helpers.rb" +require "google/cloud/service_control/v1/quota_controller/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/client.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/client.rb new file mode 100644 index 000000000000..1482ccfab979 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/client.rb @@ -0,0 +1,497 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/api/servicecontrol/v1/quota_controller_pb" + +module Google + module Cloud + module ServiceControl + module V1 + module QuotaController + ## + # Client for the QuotaController service. + # + # [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). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicecontrol.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :quota_controller_stub + + ## + # Configure the QuotaController Client class. + # + # See {::Google::Cloud::ServiceControl::V1::QuotaController::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaController clients + # ::Google::Cloud::ServiceControl::V1::QuotaController::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceControl", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the QuotaController Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceControl::V1::QuotaController::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @quota_controller_stub.universe_domain + end + + ## + # Create a new QuotaController client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaController client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/api/servicecontrol/v1/quota_controller_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @quota_controller_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ServiceControl::V1::QuotaController::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @quota_controller_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @quota_controller_stub.logger + end + + # Service calls + + ## + # Attempts to allocate quota for the specified consumer. It should be called + # before the operation is executed. + # + # This method requires the `servicemanagement.services.quota` + # permission on the specified service. For more information, see + # [Cloud IAM](https://cloud.google.com/iam). + # + # **NOTE:** The client **must** fail-open on server errors `INTERNAL`, + # `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system + # reliability, the server may inject these errors to prohibit any hard + # dependency on the quota functionality. + # + # @overload allocate_quota(request, options = nil) + # Pass arguments to `allocate_quota` via a request object, either of type + # {::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload allocate_quota(service_name: nil, allocate_operation: nil, service_config_id: nil) + # Pass arguments to `allocate_quota` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Name of the service as specified in the service configuration. For example, + # `"pubsub.googleapis.com"`. + # + # See [google.api.Service][google.api.Service] for the definition of a + # service name. + # @param allocate_operation [::Google::Cloud::ServiceControl::V1::QuotaOperation, ::Hash] + # Operation that describes the quota allocation. + # @param service_config_id [::String] + # Specifies which version of service configuration should be used to process + # the request. If unspecified or no matching version can be found, the latest + # one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_control/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceControl::V1::QuotaController::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new + # + # # Call the allocate_quota method. + # result = client.allocate_quota request + # + # # The returned object is of type Google::Cloud::ServiceControl::V1::AllocateQuotaResponse. + # p result + # + def allocate_quota request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.allocate_quota.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.allocate_quota.timeout, + metadata: metadata, + retry_policy: @config.rpcs.allocate_quota.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_controller_stub.call_rpc :allocate_quota, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the QuotaController API. + # + # This class represents the configuration for QuotaController, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceControl::V1::QuotaController::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # allocate_quota to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceControl::V1::QuotaController::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.allocate_quota.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.allocate_quota.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicecontrol.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the QuotaController API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `allocate_quota` + # @return [::Gapic::Config::Method] + # + attr_reader :allocate_quota + + # @private + def initialize parent_rpcs = nil + allocate_quota_config = parent_rpcs.allocate_quota if parent_rpcs.respond_to? :allocate_quota + @allocate_quota = ::Gapic::Config::Method.new allocate_quota_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.rb new file mode 100644 index 000000000000..e06bb9ba406a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module ServiceControl + module V1 + module QuotaController + # Credentials for the QuotaController API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ] + self.env_vars = [ + "SERVICE_CONTROL_CREDENTIALS", + "SERVICE_CONTROL_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SERVICE_CONTROL_CREDENTIALS_JSON", + "SERVICE_CONTROL_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest.rb new file mode 100644 index 000000000000..50b91d2a35b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_control/v1/version" + +require "google/cloud/service_control/v1/quota_controller/credentials" +require "google/cloud/service_control/v1/quota_controller/rest/client" + +module Google + module Cloud + module ServiceControl + module V1 + ## + # [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). + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/service_control/v1/quota_controller/rest" + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new + # + module QuotaController + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/service_control/v1/quota_controller/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.rb new file mode 100644 index 000000000000..e595839f0e14 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/api/servicecontrol/v1/quota_controller_pb" +require "google/cloud/service_control/v1/quota_controller/rest/service_stub" + +module Google + module Cloud + module ServiceControl + module V1 + module QuotaController + module Rest + ## + # REST client for the QuotaController service. + # + # [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). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicecontrol.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :quota_controller_stub + + ## + # Configure the QuotaController Client class. + # + # See {::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all QuotaController clients + # ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceControl", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the QuotaController Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @quota_controller_stub.universe_domain + end + + ## + # Create a new QuotaController REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the QuotaController client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @quota_controller_stub = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @quota_controller_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @quota_controller_stub.logger + end + + # Service calls + + ## + # Attempts to allocate quota for the specified consumer. It should be called + # before the operation is executed. + # + # This method requires the `servicemanagement.services.quota` + # permission on the specified service. For more information, see + # [Cloud IAM](https://cloud.google.com/iam). + # + # **NOTE:** The client **must** fail-open on server errors `INTERNAL`, + # `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system + # reliability, the server may inject these errors to prohibit any hard + # dependency on the quota functionality. + # + # @overload allocate_quota(request, options = nil) + # Pass arguments to `allocate_quota` via a request object, either of type + # {::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload allocate_quota(service_name: nil, allocate_operation: nil, service_config_id: nil) + # Pass arguments to `allocate_quota` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Name of the service as specified in the service configuration. For example, + # `"pubsub.googleapis.com"`. + # + # See [google.api.Service][google.api.Service] for the definition of a + # service name. + # @param allocate_operation [::Google::Cloud::ServiceControl::V1::QuotaOperation, ::Hash] + # Operation that describes the quota allocation. + # @param service_config_id [::String] + # Specifies which version of service configuration should be used to process + # the request. If unspecified or no matching version can be found, the latest + # one will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_control/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new + # + # # Call the allocate_quota method. + # result = client.allocate_quota request + # + # # The returned object is of type Google::Cloud::ServiceControl::V1::AllocateQuotaResponse. + # p result + # + def allocate_quota request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.allocate_quota.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.allocate_quota.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.allocate_quota.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @quota_controller_stub.allocate_quota request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the QuotaController REST API. + # + # This class represents the configuration for QuotaController REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # allocate_quota to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.allocate_quota.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.allocate_quota.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicecontrol.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the QuotaController API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `allocate_quota` + # @return [::Gapic::Config::Method] + # + attr_reader :allocate_quota + + # @private + def initialize parent_rpcs = nil + allocate_quota_config = parent_rpcs.allocate_quota if parent_rpcs.respond_to? :allocate_quota + @allocate_quota = ::Gapic::Config::Method.new allocate_quota_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.rb new file mode 100644 index 000000000000..f4dcafdb9c1a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/api/servicecontrol/v1/quota_controller_pb" + +module Google + module Cloud + module ServiceControl + module V1 + module QuotaController + module Rest + ## + # REST service stub for the QuotaController service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the allocate_quota REST call + # + # @param request_pb [::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] + # A result object deserialized from the server's reply + def allocate_quota request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_allocate_quota_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "allocate_quota", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the allocate_quota REST call + # + # @param request_pb [::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_allocate_quota_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/services/{service_name}:allocateQuota", + body: "*", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/rest.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/rest.rb new file mode 100644 index 000000000000..b1390881305c --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/service_control/v1/quota_controller/rest" +require "google/cloud/service_control/v1/service_controller/rest" +require "google/cloud/service_control/v1/version" + +module Google + module Cloud + module ServiceControl + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/service_control/v1/rest" + # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller.rb new file mode 100644 index 000000000000..7d39f2a58c49 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_control/v1/version" + +require "google/cloud/service_control/v1/service_controller/credentials" +require "google/cloud/service_control/v1/service_controller/client" +require "google/cloud/service_control/v1/service_controller/rest" + +module Google + module Cloud + module ServiceControl + module V1 + ## + # [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). + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/service_control/v1/service_controller" + # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/service_control/v1/service_controller/rest" + # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new + # + module ServiceController + end + end + end + end +end + +helper_path = ::File.join __dir__, "service_controller", "helpers.rb" +require "google/cloud/service_control/v1/service_controller/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/client.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/client.rb new file mode 100644 index 000000000000..b9e740577397 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/client.rb @@ -0,0 +1,643 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/api/servicecontrol/v1/service_controller_pb" + +module Google + module Cloud + module ServiceControl + module V1 + module ServiceController + ## + # Client for the ServiceController service. + # + # [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). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicecontrol.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :service_controller_stub + + ## + # Configure the ServiceController Client class. + # + # See {::Google::Cloud::ServiceControl::V1::ServiceController::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ServiceController clients + # ::Google::Cloud::ServiceControl::V1::ServiceController::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceControl", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.check.timeout = 5.0 + default_config.rpcs.check.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.report.timeout = 16.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceController Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceControl::V1::ServiceController::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @service_controller_stub.universe_domain + end + + ## + # Create a new ServiceController client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ServiceController client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/api/servicecontrol/v1/service_controller_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @service_controller_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ServiceControl::V1::ServiceController::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @service_controller_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @service_controller_stub.logger + end + + # Service calls + + ## + # Checks whether an operation on a service should be allowed to proceed + # based on the configuration of the service and related policies. It must be + # called before the operation is executed. + # + # If feasible, the client should cache the check results and reuse them for + # 60 seconds. In case of any server errors, the client should rely on the + # cached results for much longer time to avoid outage. + # WARNING: There is general 60s delay for the configuration and policy + # propagation, therefore callers MUST NOT depend on the `Check` method having + # the latest policy information. + # + # NOTE: the {::Google::Cloud::ServiceControl::V1::CheckRequest CheckRequest} has the + # size limit (wire-format byte size) of 1MB. + # + # This method requires the `servicemanagement.services.check` permission + # on the specified service. For more information, see + # [Cloud IAM](https://cloud.google.com/iam). + # + # @overload check(request, options = nil) + # Pass arguments to `check` via a request object, either of type + # {::Google::Cloud::ServiceControl::V1::CheckRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceControl::V1::CheckRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload check(service_name: nil, operation: nil, service_config_id: nil) + # Pass arguments to `check` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # The service name as specified in its service configuration. For example, + # `"pubsub.googleapis.com"`. + # + # See + # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + # for the definition of a service name. + # @param operation [::Google::Cloud::ServiceControl::V1::Operation, ::Hash] + # The operation to be checked. + # @param service_config_id [::String] + # Specifies which version of service configuration should be used to process + # the request. + # + # If unspecified or no matching version can be found, the + # latest one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceControl::V1::CheckResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceControl::V1::CheckResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_control/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceControl::V1::ServiceController::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceControl::V1::CheckRequest.new + # + # # Call the check method. + # result = client.check request + # + # # The returned object is of type Google::Cloud::ServiceControl::V1::CheckResponse. + # p result + # + def check request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::CheckRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.check.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.check.timeout, + metadata: metadata, + retry_policy: @config.rpcs.check.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_controller_stub.call_rpc :check, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Reports operation results to Google Service Control, such as logs and + # metrics. It should be called after an operation is completed. + # + # If feasible, the client should aggregate reporting data for up to 5 + # seconds to reduce API traffic. Limiting aggregation to 5 seconds is to + # reduce data loss during client crashes. Clients should carefully choose + # the aggregation time window to avoid data loss risk more than 0.01% + # for business and compliance reasons. + # + # NOTE: the {::Google::Cloud::ServiceControl::V1::ReportRequest ReportRequest} has + # the size limit (wire-format byte size) of 1MB. + # + # This method requires the `servicemanagement.services.report` permission + # on the specified service. For more information, see + # [Google Cloud IAM](https://cloud.google.com/iam). + # + # @overload report(request, options = nil) + # Pass arguments to `report` via a request object, either of type + # {::Google::Cloud::ServiceControl::V1::ReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceControl::V1::ReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload report(service_name: nil, operations: nil, service_config_id: nil) + # Pass arguments to `report` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # The service name as specified in its service configuration. For example, + # `"pubsub.googleapis.com"`. + # + # See + # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + # for the definition of a service name. + # @param operations [::Array<::Google::Cloud::ServiceControl::V1::Operation, ::Hash>] + # Operations to be reported. + # + # Typically the service should report one operation per request. + # Putting multiple operations into a single request is allowed, but should + # be used only when multiple operations are natually available at the time + # of the report. + # + # There is no limit on the number of operations in the same ReportRequest, + # however the ReportRequest size should be no larger than 1MB. See + # {::Google::Cloud::ServiceControl::V1::ReportResponse#report_errors ReportResponse.report_errors} + # for partial failure behavior. + # @param service_config_id [::String] + # Specifies which version of service config should be used to process the + # request. + # + # If unspecified or no matching version can be found, the + # latest one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceControl::V1::ReportResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceControl::V1::ReportResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_control/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceControl::V1::ServiceController::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceControl::V1::ReportRequest.new + # + # # Call the report method. + # result = client.report request + # + # # The returned object is of type Google::Cloud::ServiceControl::V1::ReportResponse. + # p result + # + def report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::ReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.report.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_controller_stub.call_rpc :report, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ServiceController API. + # + # This class represents the configuration for ServiceController, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceControl::V1::ServiceController::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # check to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceControl::V1::ServiceController::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.check.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.check.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicecontrol.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ServiceController API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `check` + # @return [::Gapic::Config::Method] + # + attr_reader :check + ## + # RPC-specific configuration for `report` + # @return [::Gapic::Config::Method] + # + attr_reader :report + + # @private + def initialize parent_rpcs = nil + check_config = parent_rpcs.check if parent_rpcs.respond_to? :check + @check = ::Gapic::Config::Method.new check_config + report_config = parent_rpcs.report if parent_rpcs.respond_to? :report + @report = ::Gapic::Config::Method.new report_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/credentials.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/credentials.rb new file mode 100644 index 000000000000..ae04179c3e7e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/credentials.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module ServiceControl + module V1 + module ServiceController + # Credentials for the ServiceController API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/servicecontrol" + ] + self.env_vars = [ + "SERVICE_CONTROL_CREDENTIALS", + "SERVICE_CONTROL_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SERVICE_CONTROL_CREDENTIALS_JSON", + "SERVICE_CONTROL_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest.rb new file mode 100644 index 000000000000..7ae6dee6ef4c --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_control/v1/version" + +require "google/cloud/service_control/v1/service_controller/credentials" +require "google/cloud/service_control/v1/service_controller/rest/client" + +module Google + module Cloud + module ServiceControl + module V1 + ## + # [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). + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/service_control/v1/service_controller/rest" + # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new + # + module ServiceController + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/service_control/v1/service_controller/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.rb new file mode 100644 index 000000000000..e0be9acd1d0c --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.rb @@ -0,0 +1,586 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/api/servicecontrol/v1/service_controller_pb" +require "google/cloud/service_control/v1/service_controller/rest/service_stub" + +module Google + module Cloud + module ServiceControl + module V1 + module ServiceController + module Rest + ## + # REST client for the ServiceController service. + # + # [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). + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicecontrol.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :service_controller_stub + + ## + # Configure the ServiceController Client class. + # + # See {::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ServiceController clients + # ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceControl", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.check.timeout = 5.0 + default_config.rpcs.check.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.report.timeout = 16.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceController Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @service_controller_stub.universe_domain + end + + ## + # Create a new ServiceController REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ServiceController client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @service_controller_stub = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @service_controller_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @service_controller_stub.logger + end + + # Service calls + + ## + # Checks whether an operation on a service should be allowed to proceed + # based on the configuration of the service and related policies. It must be + # called before the operation is executed. + # + # If feasible, the client should cache the check results and reuse them for + # 60 seconds. In case of any server errors, the client should rely on the + # cached results for much longer time to avoid outage. + # WARNING: There is general 60s delay for the configuration and policy + # propagation, therefore callers MUST NOT depend on the `Check` method having + # the latest policy information. + # + # NOTE: the {::Google::Cloud::ServiceControl::V1::CheckRequest CheckRequest} has the + # size limit (wire-format byte size) of 1MB. + # + # This method requires the `servicemanagement.services.check` permission + # on the specified service. For more information, see + # [Cloud IAM](https://cloud.google.com/iam). + # + # @overload check(request, options = nil) + # Pass arguments to `check` via a request object, either of type + # {::Google::Cloud::ServiceControl::V1::CheckRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceControl::V1::CheckRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload check(service_name: nil, operation: nil, service_config_id: nil) + # Pass arguments to `check` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # The service name as specified in its service configuration. For example, + # `"pubsub.googleapis.com"`. + # + # See + # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + # for the definition of a service name. + # @param operation [::Google::Cloud::ServiceControl::V1::Operation, ::Hash] + # The operation to be checked. + # @param service_config_id [::String] + # Specifies which version of service configuration should be used to process + # the request. + # + # If unspecified or no matching version can be found, the + # latest one will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceControl::V1::CheckResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceControl::V1::CheckResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_control/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceControl::V1::CheckRequest.new + # + # # Call the check method. + # result = client.check request + # + # # The returned object is of type Google::Cloud::ServiceControl::V1::CheckResponse. + # p result + # + def check request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::CheckRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.check.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.check.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.check.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_controller_stub.check request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Reports operation results to Google Service Control, such as logs and + # metrics. It should be called after an operation is completed. + # + # If feasible, the client should aggregate reporting data for up to 5 + # seconds to reduce API traffic. Limiting aggregation to 5 seconds is to + # reduce data loss during client crashes. Clients should carefully choose + # the aggregation time window to avoid data loss risk more than 0.01% + # for business and compliance reasons. + # + # NOTE: the {::Google::Cloud::ServiceControl::V1::ReportRequest ReportRequest} has + # the size limit (wire-format byte size) of 1MB. + # + # This method requires the `servicemanagement.services.report` permission + # on the specified service. For more information, see + # [Google Cloud IAM](https://cloud.google.com/iam). + # + # @overload report(request, options = nil) + # Pass arguments to `report` via a request object, either of type + # {::Google::Cloud::ServiceControl::V1::ReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceControl::V1::ReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload report(service_name: nil, operations: nil, service_config_id: nil) + # Pass arguments to `report` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # The service name as specified in its service configuration. For example, + # `"pubsub.googleapis.com"`. + # + # See + # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + # for the definition of a service name. + # @param operations [::Array<::Google::Cloud::ServiceControl::V1::Operation, ::Hash>] + # Operations to be reported. + # + # Typically the service should report one operation per request. + # Putting multiple operations into a single request is allowed, but should + # be used only when multiple operations are natually available at the time + # of the report. + # + # There is no limit on the number of operations in the same ReportRequest, + # however the ReportRequest size should be no larger than 1MB. See + # {::Google::Cloud::ServiceControl::V1::ReportResponse#report_errors ReportResponse.report_errors} + # for partial failure behavior. + # @param service_config_id [::String] + # Specifies which version of service config should be used to process the + # request. + # + # If unspecified or no matching version can be found, the + # latest one will be used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceControl::V1::ReportResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceControl::V1::ReportResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_control/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceControl::V1::ReportRequest.new + # + # # Call the report method. + # result = client.report request + # + # # The returned object is of type Google::Cloud::ServiceControl::V1::ReportResponse. + # p result + # + def report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::ReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.report.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_controller_stub.report request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ServiceController REST API. + # + # This class represents the configuration for ServiceController REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # check to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.check.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.check.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicecontrol.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ServiceController API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `check` + # @return [::Gapic::Config::Method] + # + attr_reader :check + ## + # RPC-specific configuration for `report` + # @return [::Gapic::Config::Method] + # + attr_reader :report + + # @private + def initialize parent_rpcs = nil + check_config = parent_rpcs.check if parent_rpcs.respond_to? :check + @check = ::Gapic::Config::Method.new check_config + report_config = parent_rpcs.report if parent_rpcs.respond_to? :report + @report = ::Gapic::Config::Method.new report_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.rb new file mode 100644 index 000000000000..3203240fae04 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.rb @@ -0,0 +1,205 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/api/servicecontrol/v1/service_controller_pb" + +module Google + module Cloud + module ServiceControl + module V1 + module ServiceController + module Rest + ## + # REST service stub for the ServiceController service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the check REST call + # + # @param request_pb [::Google::Cloud::ServiceControl::V1::CheckRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceControl::V1::CheckResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceControl::V1::CheckResponse] + # A result object deserialized from the server's reply + def check request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_check_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "check", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceControl::V1::CheckResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the report REST call + # + # @param request_pb [::Google::Cloud::ServiceControl::V1::ReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceControl::V1::ReportResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceControl::V1::ReportResponse] + # A result object deserialized from the server's reply + def report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_report_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "report", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceControl::V1::ReportResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the check REST call + # + # @param request_pb [::Google::Cloud::ServiceControl::V1::CheckRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_check_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/services/{service_name}:check", + body: "*", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the report REST call + # + # @param request_pb [::Google::Cloud::ServiceControl::V1::ReportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/services/{service_name}:report", + body: "*", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/version.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/version.rb new file mode 100644 index 000000000000..f4ed47989a7e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceControl + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/README.md new file mode 100644 index 000000000000..9aa07e3d9899 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Service Control API V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/distribution.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/distribution.rb new file mode 100644 index 000000000000..e4f870d5ad0d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/distribution.rb @@ -0,0 +1,233 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # `Distribution` contains summary statistics for a population of values. It + # optionally contains a histogram representing the distribution of those values + # across a set of buckets. + # + # The summary statistics are the count, mean, sum of the squared deviation from + # the mean, the minimum, and the maximum of the set of population of values. + # The histogram is based on a sequence of buckets and gives a count of values + # that fall into each bucket. The boundaries of the buckets are given either + # explicitly or by formulas for buckets of fixed or exponentially increasing + # widths. + # + # Although it is not forbidden, it is generally a bad idea to include + # non-finite values (infinities or NaNs) in the population of values, as this + # will render the `mean` and `sum_of_squared_deviation` fields meaningless. + # @!attribute [rw] count + # @return [::Integer] + # The number of values in the population. Must be non-negative. This value + # must equal the sum of the values in `bucket_counts` if a histogram is + # provided. + # @!attribute [rw] mean + # @return [::Float] + # The arithmetic mean of the values in the population. If `count` is zero + # then this field must be zero. + # @!attribute [rw] sum_of_squared_deviation + # @return [::Float] + # The sum of squared deviations from the mean of the values in the + # population. For values x_i this is: + # + # Sum[i=1..n]((x_i - mean)^2) + # + # Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition + # describes Welford's method for accumulating this sum in one pass. + # + # If `count` is zero then this field must be zero. + # @!attribute [rw] range + # @return [::Google::Api::Distribution::Range] + # If specified, contains the range of the population values. The field + # must not be present if the `count` is zero. + # @!attribute [rw] bucket_options + # @return [::Google::Api::Distribution::BucketOptions] + # Defines the histogram bucket boundaries. If the distribution does not + # contain a histogram, then omit this field. + # @!attribute [rw] bucket_counts + # @return [::Array<::Integer>] + # The number of values in each bucket of the histogram, as described in + # `bucket_options`. If the distribution does not have a histogram, then omit + # this field. If there is a histogram, then the sum of the values in + # `bucket_counts` must equal the value in the `count` field of the + # distribution. + # + # If present, `bucket_counts` should contain N values, where N is the number + # of buckets specified in `bucket_options`. If you supply fewer than N + # values, the remaining values are assumed to be 0. + # + # The order of the values in `bucket_counts` follows the bucket numbering + # schemes described for the three bucket types. The first value must be the + # count for the underflow bucket (number 0). The next N-2 values are the + # counts for the finite buckets (number 1 through N-2). The N'th value in + # `bucket_counts` is the count for the overflow bucket (number N-1). + # @!attribute [rw] exemplars + # @return [::Array<::Google::Api::Distribution::Exemplar>] + # Must be in increasing order of `value` field. + class Distribution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The range of the population values. + # @!attribute [rw] min + # @return [::Float] + # The minimum of the population values. + # @!attribute [rw] max + # @return [::Float] + # The maximum of the population values. + class Range + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BucketOptions` describes the bucket boundaries used to create a histogram + # for the distribution. The buckets can be in a linear sequence, an + # exponential sequence, or each bucket can be specified explicitly. + # `BucketOptions` does not include the number of values in each bucket. + # + # A bucket has an inclusive lower bound and exclusive upper bound for the + # values that are counted for that bucket. The upper bound of a bucket must + # be strictly greater than the lower bound. The sequence of N buckets for a + # distribution consists of an underflow bucket (number 0), zero or more + # finite buckets (number 1 through N - 2) and an overflow bucket (number N - + # 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the + # same as the upper bound of bucket i - 1. The buckets span the whole range + # of finite values: lower bound of the underflow bucket is -infinity and the + # upper bound of the overflow bucket is +infinity. The finite buckets are + # so-called because both bounds are finite. + # @!attribute [rw] linear_buckets + # @return [::Google::Api::Distribution::BucketOptions::Linear] + # The linear bucket. + # + # Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exponential_buckets + # @return [::Google::Api::Distribution::BucketOptions::Exponential] + # The exponential buckets. + # + # Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] explicit_buckets + # @return [::Google::Api::Distribution::BucketOptions::Explicit] + # The explicit buckets. + # + # Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BucketOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies a linear sequence of buckets that all have the same width + # (except overflow and underflow). Each bucket represents a constant + # absolute uncertainty on the specific value in the bucket. + # + # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + # following boundaries: + # + # Upper bound (0 <= i < N-1): offset + (width * i). + # + # Lower bound (1 <= i < N): offset + (width * (i - 1)). + # @!attribute [rw] num_finite_buckets + # @return [::Integer] + # Must be greater than 0. + # @!attribute [rw] width + # @return [::Float] + # Must be greater than 0. + # @!attribute [rw] offset + # @return [::Float] + # Lower bound of the first bucket. + class Linear + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies an exponential sequence of buckets that have a width that is + # proportional to the value of the lower bound. Each bucket represents a + # constant relative uncertainty on a specific value in the bucket. + # + # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + # following boundaries: + # + # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). + # + # Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). + # @!attribute [rw] num_finite_buckets + # @return [::Integer] + # Must be greater than 0. + # @!attribute [rw] growth_factor + # @return [::Float] + # Must be greater than 1. + # @!attribute [rw] scale + # @return [::Float] + # Must be greater than 0. + class Exponential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a set of buckets with arbitrary widths. + # + # There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following + # boundaries: + # + # Upper bound (0 <= i < N-1): bounds[i] + # Lower bound (1 <= i < N); bounds[i - 1] + # + # The `bounds` field must contain at least one element. If `bounds` has + # only one element, then there are no finite buckets, and that single + # element is the common boundary of the overflow and underflow buckets. + # @!attribute [rw] bounds + # @return [::Array<::Float>] + # The values must be monotonically increasing. + class Explicit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Exemplars are example points that may be used to annotate aggregated + # distribution values. They are metadata that gives information about a + # particular value added to a Distribution bucket, such as a trace ID that + # was active when a value was added. They may contain further information, + # such as a example values and timestamps, origin, etc. + # @!attribute [rw] value + # @return [::Float] + # Value of the exemplar point. This value determines to which bucket the + # exemplar belongs. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # The observation (sampling) time of the above value. + # @!attribute [rw] attachments + # @return [::Array<::Google::Protobuf::Any>] + # Contextual information about the example value. Examples are: + # + # Trace: type.googleapis.com/google.monitoring.v3.SpanContext + # + # Literal string: type.googleapis.com/google.protobuf.StringValue + # + # Labels dropped during aggregation: + # type.googleapis.com/google.monitoring.v3.DroppedLabels + # + # There may be only a single attachment of any given message type in a + # single exemplar, and this is enforced by the system. + class Exemplar + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/check_error.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/check_error.rb new file mode 100644 index 000000000000..68d445510c11 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/check_error.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceControl + module V1 + # Defines the errors to be returned in + # {::Google::Cloud::ServiceControl::V1::CheckResponse#check_errors google.api.servicecontrol.v1.CheckResponse.check_errors}. + # @!attribute [rw] code + # @return [::Google::Cloud::ServiceControl::V1::CheckError::Code] + # The error code. + # @!attribute [rw] subject + # @return [::String] + # Subject to whom this error applies. See the specific code enum for more + # details on this field. For example: + # + # - "project:" + # - "folder:" + # - "organization:" + # @!attribute [rw] detail + # @return [::String] + # Free-form text providing details on the error cause of the error. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # Contains public information about the check error. If available, + # `status.code` will be non zero and client can propagate it out as public + # error. + class CheckError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Error codes for Check responses. + module Code + # This is the default value if error code is not explicitly set. + # It should not be used directly. + ERROR_CODE_UNSPECIFIED = 0 + + # The consumer's project id, network container, or resource container was + # not found. Same as + # [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND]. + NOT_FOUND = 5 + + # The consumer doesn't have access to the specified resource. + # Same as + # [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. + PERMISSION_DENIED = 7 + + # Quota check failed. Same as + # [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]. + RESOURCE_EXHAUSTED = 8 + + # The consumer hasn't activated the service. + SERVICE_NOT_ACTIVATED = 104 + + # The consumer cannot access the service because billing is disabled. + BILLING_DISABLED = 107 + + # The consumer's project has been marked as deleted (soft deletion). + PROJECT_DELETED = 108 + + # The consumer's project number or id does not represent a valid project. + PROJECT_INVALID = 114 + + # The input consumer info does not represent a valid consumer folder or + # organization. + CONSUMER_INVALID = 125 + + # The IP address of the consumer is invalid for the specific consumer + # project. + IP_ADDRESS_BLOCKED = 109 + + # The referer address of the consumer request is invalid for the specific + # consumer project. + REFERER_BLOCKED = 110 + + # The client application of the consumer request is invalid for the + # specific consumer project. + CLIENT_APP_BLOCKED = 111 + + # The API targeted by this request is invalid for the specified consumer + # project. + API_TARGET_BLOCKED = 122 + + # The consumer's API key is invalid. + API_KEY_INVALID = 105 + + # The consumer's API Key has expired. + API_KEY_EXPIRED = 112 + + # The consumer's API Key was not found in config record. + API_KEY_NOT_FOUND = 113 + + # The credential in the request can not be verified. + INVALID_CREDENTIAL = 123 + + # The backend server for looking up project id/number is unavailable. + NAMESPACE_LOOKUP_UNAVAILABLE = 300 + + # The backend server for checking service status is unavailable. + SERVICE_STATUS_UNAVAILABLE = 301 + + # The backend server for checking billing status is unavailable. + BILLING_STATUS_UNAVAILABLE = 302 + + # Cloud Resource Manager backend server is unavailable. + CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE = 305 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/distribution.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/distribution.rb new file mode 100644 index 000000000000..f25125b9bf74 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/distribution.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! + + +module Google + module Cloud + module ServiceControl + module V1 + # Distribution represents a frequency distribution of double-valued sample + # points. It contains the size of the population of sample points plus + # additional optional information: + # + # * the arithmetic mean of the samples + # * the minimum and maximum of the samples + # * the sum-squared-deviation of the samples, used to compute variance + # * a histogram of the values of the sample points + # @!attribute [rw] count + # @return [::Integer] + # The total number of samples in the distribution. Must be >= 0. + # @!attribute [rw] mean + # @return [::Float] + # The arithmetic mean of the samples in the distribution. If `count` is + # zero then this field must be zero. + # @!attribute [rw] minimum + # @return [::Float] + # The minimum of the population of values. Ignored if `count` is zero. + # @!attribute [rw] maximum + # @return [::Float] + # The maximum of the population of values. Ignored if `count` is zero. + # @!attribute [rw] sum_of_squared_deviation + # @return [::Float] + # The sum of squared deviations from the mean: + # Sum[i=1..count]((x_i - mean)^2) + # where each x_i is a sample values. If `count` is zero then this field + # must be zero, otherwise validation of the request fails. + # @!attribute [rw] bucket_counts + # @return [::Array<::Integer>] + # The number of samples in each histogram bucket. `bucket_counts` are + # optional. If present, they must sum to the `count` value. + # + # The buckets are defined below in `bucket_option`. There are N buckets. + # `bucket_counts[0]` is the number of samples in the underflow bucket. + # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples + # in each of the finite buckets. And `bucket_counts[N]` is the number + # of samples in the overflow bucket. See the comments of `bucket_option` + # below for more details. + # + # Any suffix of trailing zeros may be omitted. + # @!attribute [rw] linear_buckets + # @return [::Google::Cloud::ServiceControl::V1::Distribution::LinearBuckets] + # Buckets with constant width. + # + # Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exponential_buckets + # @return [::Google::Cloud::ServiceControl::V1::Distribution::ExponentialBuckets] + # Buckets with exponentially growing width. + # + # Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] explicit_buckets + # @return [::Google::Cloud::ServiceControl::V1::Distribution::ExplicitBuckets] + # Buckets with arbitrary user-provided width. + # + # Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exemplars + # @return [::Array<::Google::Api::Distribution::Exemplar>] + # Example points. Must be in increasing order of `value` field. + class Distribution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describing buckets with constant width. + # @!attribute [rw] num_finite_buckets + # @return [::Integer] + # The number of finite buckets. With the underflow and overflow buckets, + # the total number of buckets is `num_finite_buckets` + 2. + # See comments on `bucket_options` for details. + # @!attribute [rw] width + # @return [::Float] + # The i'th linear bucket covers the interval + # [offset + (i-1) * width, offset + i * width) + # where i ranges from 1 to num_finite_buckets, inclusive. + # Must be strictly positive. + # @!attribute [rw] offset + # @return [::Float] + # The i'th linear bucket covers the interval + # [offset + (i-1) * width, offset + i * width) + # where i ranges from 1 to num_finite_buckets, inclusive. + class LinearBuckets + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describing buckets with exponentially growing width. + # @!attribute [rw] num_finite_buckets + # @return [::Integer] + # The number of finite buckets. With the underflow and overflow buckets, + # the total number of buckets is `num_finite_buckets` + 2. + # See comments on `bucket_options` for details. + # @!attribute [rw] growth_factor + # @return [::Float] + # The i'th exponential bucket covers the interval + # [scale * growth_factor^(i-1), scale * growth_factor^i) + # where i ranges from 1 to num_finite_buckets inclusive. + # Must be larger than 1.0. + # @!attribute [rw] scale + # @return [::Float] + # The i'th exponential bucket covers the interval + # [scale * growth_factor^(i-1), scale * growth_factor^i) + # where i ranges from 1 to num_finite_buckets inclusive. + # Must be > 0. + class ExponentialBuckets + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describing buckets with arbitrary user-provided width. + # @!attribute [rw] bounds + # @return [::Array<::Float>] + # 'bound' is a list of strictly increasing boundaries between + # buckets. Note that a list of length N-1 defines N buckets because + # of fenceposting. See comments on `bucket_options` for details. + # + # The i'th finite bucket covers the interval + # [bound[i-1], bound[i]) + # where i ranges from 1 to bound_size() - 1. Note that there are no + # finite buckets at all if 'bound' only contains a single element; in + # that special case the single bound defines the boundary between the + # underflow and overflow buckets. + # + # bucket number lower bound upper bound + # i == 0 (underflow) -inf bound[i] + # 0 < i < bound_size() bound[i-1] bound[i] + # i == bound_size() (overflow) bound[i-1] +inf + class ExplicitBuckets + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/http_request.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/http_request.rb new file mode 100644 index 000000000000..64635c2a2991 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/http_request.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceControl + module V1 + # A common proto for logging HTTP requests. Only contains semantics + # defined by the HTTP specification. Product-specific logging + # information MUST be defined in a separate message. + # @!attribute [rw] request_method + # @return [::String] + # The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. + # @!attribute [rw] request_url + # @return [::String] + # The scheme (http, https), the host name, the path, and the query + # portion of the URL that was requested. + # Example: `"http://example.com/some/info?color=red"`. + # @!attribute [rw] request_size + # @return [::Integer] + # The size of the HTTP request message in bytes, including the request + # headers and the request body. + # @!attribute [rw] status + # @return [::Integer] + # The response code indicating the status of the response. + # Examples: 200, 404. + # @!attribute [rw] response_size + # @return [::Integer] + # The size of the HTTP response message sent back to the client, in bytes, + # including the response headers and the response body. + # @!attribute [rw] user_agent + # @return [::String] + # The user agent sent by the client. Example: + # `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET + # CLR 1.0.3705)"`. + # @!attribute [rw] remote_ip + # @return [::String] + # The IP address (IPv4 or IPv6) of the client that issued the HTTP + # request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. + # @!attribute [rw] server_ip + # @return [::String] + # The IP address (IPv4 or IPv6) of the origin server that the request was + # sent to. + # @!attribute [rw] referer + # @return [::String] + # The referer URL of the request, as defined in + # [HTTP/1.1 Header Field + # Definitions](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + # @!attribute [rw] latency + # @return [::Google::Protobuf::Duration] + # The request processing latency on the server, from the time the request was + # received until the response was sent. + # @!attribute [rw] cache_lookup + # @return [::Boolean] + # Whether or not a cache lookup was attempted. + # @!attribute [rw] cache_hit + # @return [::Boolean] + # Whether or not an entity was served from cache + # (with or without validation). + # @!attribute [rw] cache_validated_with_origin_server + # @return [::Boolean] + # Whether or not the response was validated with the origin server before + # being served from cache. This field is only meaningful if `cache_hit` is + # True. + # @!attribute [rw] cache_fill_bytes + # @return [::Integer] + # The number of HTTP response bytes inserted into cache. Set only when a + # cache fill was attempted. + # @!attribute [rw] protocol + # @return [::String] + # Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" + class HttpRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/log_entry.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/log_entry.rb new file mode 100644 index 000000000000..bb1679135a7f --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/log_entry.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceControl + module V1 + # An individual log entry. + # @!attribute [rw] name + # @return [::String] + # Required. The log to which this log entry belongs. Examples: `"syslog"`, + # `"book_log"`. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # The time the event described by the log entry occurred. If + # omitted, defaults to operation start time. + # @!attribute [rw] severity + # @return [::Google::Cloud::Logging::Type::LogSeverity] + # The severity of the log entry. The default value is + # `LogSeverity.DEFAULT`. + # @!attribute [rw] http_request + # @return [::Google::Cloud::ServiceControl::V1::HttpRequest] + # Optional. Information about the HTTP request associated with this + # log entry, if applicable. + # @!attribute [rw] trace + # @return [::String] + # Optional. Resource name of the trace associated with the log entry, if any. + # If this field contains a relative resource name, you can assume the name is + # relative to `//tracing.googleapis.com`. Example: + # `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` + # @!attribute [rw] insert_id + # @return [::String] + # A unique ID for the log entry used for deduplication. If omitted, + # the implementation will generate one based on operation_id. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # A set of user-defined (key, value) data that provides additional + # information about the log entry. + # @!attribute [rw] proto_payload + # @return [::Google::Protobuf::Any] + # The log entry payload, represented as a protocol buffer that is + # expressed as a JSON object. The only accepted type currently is + # [AuditLog][google.cloud.audit.AuditLog]. + # + # Note: The following fields are mutually exclusive: `proto_payload`, `text_payload`, `struct_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_payload + # @return [::String] + # The log entry payload, represented as a Unicode string (UTF-8). + # + # Note: The following fields are mutually exclusive: `text_payload`, `proto_payload`, `struct_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_payload + # @return [::Google::Protobuf::Struct] + # The log entry payload, represented as a structure that + # is expressed as a JSON object. + # + # Note: The following fields are mutually exclusive: `struct_payload`, `proto_payload`, `text_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] operation + # @return [::Google::Cloud::ServiceControl::V1::LogEntryOperation] + # Optional. Information about an operation associated with the log entry, if + # applicable. + # @!attribute [rw] source_location + # @return [::Google::Cloud::ServiceControl::V1::LogEntrySourceLocation] + # Optional. Source code location information associated with the log entry, + # if any. + class LogEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Additional information about a potentially long-running operation with which + # a log entry is associated. + # @!attribute [rw] id + # @return [::String] + # Optional. An arbitrary operation identifier. Log entries with the + # same identifier are assumed to be part of the same operation. + # @!attribute [rw] producer + # @return [::String] + # Optional. An arbitrary producer identifier. The combination of + # `id` and `producer` must be globally unique. Examples for `producer`: + # `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. + # @!attribute [rw] first + # @return [::Boolean] + # Optional. Set this to True if this is the first log entry in the operation. + # @!attribute [rw] last + # @return [::Boolean] + # Optional. Set this to True if this is the last log entry in the operation. + class LogEntryOperation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional information about the source code location that produced the log + # entry. + # @!attribute [rw] file + # @return [::String] + # Optional. Source file name. Depending on the runtime environment, this + # might be a simple name or a fully-qualified name. + # @!attribute [rw] line + # @return [::Integer] + # Optional. Line within the source file. 1-based; 0 indicates no line number + # available. + # @!attribute [rw] function + # @return [::String] + # Optional. Human-readable name of the function or method being invoked, with + # optional context such as the class or package name. This information may be + # used in contexts such as the logs viewer, where a file and line number are + # less meaningful. The format can vary by language. For example: + # `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` + # (Python). + class LogEntrySourceLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/metric_value.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/metric_value.rb new file mode 100644 index 000000000000..a5736d442c2a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/metric_value.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Represents a single metric value. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The labels describing the metric value. + # See comments on + # {::Google::Cloud::ServiceControl::V1::Operation#labels google.api.servicecontrol.v1.Operation.labels} + # for the overriding relationship. Note that this map must not contain + # monitored resource labels. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The start of the time period over which this metric value's measurement + # applies. The time period has different semantics for different metric + # types (cumulative, delta, and gauge). See the metric definition + # documentation in the service configuration for details. If not specified, + # {::Google::Cloud::ServiceControl::V1::Operation#start_time google.api.servicecontrol.v1.Operation.start_time} + # will be used. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The end of the time period over which this metric value's measurement + # applies. If not specified, + # {::Google::Cloud::ServiceControl::V1::Operation#end_time google.api.servicecontrol.v1.Operation.end_time} + # will be used. + # @!attribute [rw] bool_value + # @return [::Boolean] + # A boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int64_value + # @return [::Integer] + # A signed 64-bit integer value. + # + # Note: The following fields are mutually exclusive: `int64_value`, `bool_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] double_value + # @return [::Float] + # A double precision floating point value. + # + # Note: The following fields are mutually exclusive: `double_value`, `bool_value`, `int64_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # A text string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `int64_value`, `double_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] distribution_value + # @return [::Google::Cloud::ServiceControl::V1::Distribution] + # A distribution value. + # + # Note: The following fields are mutually exclusive: `distribution_value`, `bool_value`, `int64_value`, `double_value`, `string_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class MetricValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents a set of metric values in the same metric. + # Each metric value in the set should have a unique combination of start time, + # end time, and label values. + # @!attribute [rw] metric_name + # @return [::String] + # The metric name defined in the service configuration. + # @!attribute [rw] metric_values + # @return [::Array<::Google::Cloud::ServiceControl::V1::MetricValue>] + # The values in this metric. + class MetricValueSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/operation.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/operation.rb new file mode 100644 index 000000000000..4104f50bea0e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/operation.rb @@ -0,0 +1,146 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Represents information regarding an operation. + # @!attribute [rw] operation_id + # @return [::String] + # Identity of the operation. This must be unique within the scope of the + # service that generated the operation. If the service calls + # Check() and Report() on the same operation, the two calls should carry + # the same id. + # + # UUID version 4 is recommended, though not required. + # In scenarios where an operation is computed from existing information + # and an idempotent id is desirable for deduplication purpose, UUID version 5 + # is recommended. See RFC 4122 for details. + # @!attribute [rw] operation_name + # @return [::String] + # Fully qualified name of the operation. Reserved for future use. + # @!attribute [rw] consumer_id + # @return [::String] + # Identity of the consumer who is using the service. + # This field should be filled in for the operations initiated by a + # consumer, but not for service-initiated operations that are + # not related to a specific consumer. + # + # + # - This can be in one of the following formats: + # - project:PROJECT_ID, + # - project`_`number:PROJECT_NUMBER, + # - projects/PROJECT_ID or PROJECT_NUMBER, + # - folders/FOLDER_NUMBER, + # - organizations/ORGANIZATION_NUMBER, + # - api`_`key:API_KEY. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Required. Start time of the operation. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # End time of the operation. + # Required when the operation is used in + # {::Google::Cloud::ServiceControl::V1::ServiceController::Client#report ServiceController.Report}, + # but optional when the operation is used in + # {::Google::Cloud::ServiceControl::V1::ServiceController::Client#check ServiceController.Check}. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels describing the operation. Only the following labels are allowed: + # + # - Labels describing monitored resources as defined in + # the service configuration. + # - Default labels of metric values. When specified, labels defined in the + # metric value override these default. + # - The following labels defined by Google Cloud Platform: + # - `cloud.googleapis.com/location` describing the location where the + # operation happened, + # - `servicecontrol.googleapis.com/user_agent` describing the user agent + # of the API request, + # - `servicecontrol.googleapis.com/service_agent` describing the service + # used to handle the API request (e.g. ESP), + # - `servicecontrol.googleapis.com/platform` describing the platform + # where the API is served, such as App Engine, Compute Engine, or + # Kubernetes Engine. + # @!attribute [rw] metric_value_sets + # @return [::Array<::Google::Cloud::ServiceControl::V1::MetricValueSet>] + # Represents information about this operation. Each MetricValueSet + # corresponds to a metric defined in the service configuration. + # The data type used in the MetricValueSet must agree with + # the data type specified in the metric definition. + # + # Within a single operation, it is not allowed to have more than one + # MetricValue instances that have the same metric names and identical + # label value combinations. If a request has such duplicated MetricValue + # instances, the entire request is rejected with + # an invalid argument error. + # @!attribute [rw] log_entries + # @return [::Array<::Google::Cloud::ServiceControl::V1::LogEntry>] + # Represents information to be logged. + # @!attribute [rw] importance + # @return [::Google::Cloud::ServiceControl::V1::Operation::Importance] + # DO NOT USE. This is an experimental field. + # @!attribute [rw] user_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Private Preview. This feature is only available for approved services. + # + # User defined labels for the resource that this operation is associated + # with. + # @!attribute [rw] extensions + # @return [::Array<::Google::Protobuf::Any>] + # Unimplemented. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class UserLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the importance of the data contained in the operation. + module Importance + # Allows data caching, batching, and aggregation. It provides + # higher performance with higher data loss risk. + LOW = 0 + + # Disables data aggregation to minimize data loss. It is for operations + # that contains significant monetary value or audit trail. This feature + # only applies to the client libraries. + HIGH = 1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.rb new file mode 100644 index 000000000000..8d919881597e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.rb @@ -0,0 +1,235 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceControl + module V1 + # Request message for the AllocateQuota method. + # @!attribute [rw] service_name + # @return [::String] + # Name of the service as specified in the service configuration. For example, + # `"pubsub.googleapis.com"`. + # + # See [google.api.Service][google.api.Service] for the definition of a + # service name. + # @!attribute [rw] allocate_operation + # @return [::Google::Cloud::ServiceControl::V1::QuotaOperation] + # Operation that describes the quota allocation. + # @!attribute [rw] service_config_id + # @return [::String] + # Specifies which version of service configuration should be used to process + # the request. If unspecified or no matching version can be found, the latest + # one will be used. + class AllocateQuotaRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents information regarding a quota operation. + # @!attribute [rw] operation_id + # @return [::String] + # Identity of the operation. For Allocation Quota, this is expected to be + # unique within the scope of the service that generated the operation, and + # guarantees idempotency in case of retries. + # + # In order to ensure best performance and latency in the Quota backends, + # operation_ids are optimally associated with time, so that related + # operations can be accessed fast in storage. For this reason, the + # recommended token for services that intend to operate at a high QPS is + # Unix time in nanos + UUID + # @!attribute [rw] method_name + # @return [::String] + # Fully qualified name of the API method for which this quota operation is + # requested. This name is used for matching quota rules or metric rules and + # billing status rules defined in service configuration. + # + # This field should not be set if any of the following is true: + # (1) the quota operation is performed on non-API resources. + # (2) quota_metrics is set because the caller is doing quota override. + # + # + # Example of an RPC method name: + # google.example.library.v1.LibraryService.CreateShelf + # @!attribute [rw] consumer_id + # @return [::String] + # Identity of the consumer for whom this quota operation is being performed. + # + # This can be in one of the following formats: + # project:, + # project_number:, + # api_key:. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels describing the operation. + # @!attribute [rw] quota_metrics + # @return [::Array<::Google::Cloud::ServiceControl::V1::MetricValueSet>] + # Represents information about this operation. Each MetricValueSet + # corresponds to a metric defined in the service configuration. + # The data type used in the MetricValueSet must agree with + # the data type specified in the metric definition. + # + # Within a single operation, it is not allowed to have more than one + # MetricValue instances that have the same metric names and identical + # label value combinations. If a request has such duplicated MetricValue + # instances, the entire request is rejected with + # an invalid argument error. + # + # This field is mutually exclusive with method_name. + # @!attribute [rw] quota_mode + # @return [::Google::Cloud::ServiceControl::V1::QuotaOperation::QuotaMode] + # Quota mode for this operation. + class QuotaOperation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Supported quota modes. + module QuotaMode + # Guard against implicit default. Must not be used. + UNSPECIFIED = 0 + + # For AllocateQuota request, allocates quota for the amount specified in + # the service configuration or specified using the quota metrics. If the + # amount is higher than the available quota, allocation error will be + # returned and no quota will be allocated. + # If multiple quotas are part of the request, and one fails, none of the + # quotas are allocated or released. + NORMAL = 1 + + # The operation allocates quota for the amount specified in the service + # configuration or specified using the quota metrics. If the amount is + # higher than the available quota, request does not fail but all available + # quota will be allocated. + # For rate quota, BEST_EFFORT will continue to deduct from other groups + # even if one does not have enough quota. For allocation, it will find the + # minimum available amount across all groups and deduct that amount from + # all the affected groups. + BEST_EFFORT = 2 + + # For AllocateQuota request, only checks if there is enough quota + # available and does not change the available quota. No lock is placed on + # the available quota either. + CHECK_ONLY = 3 + + # Unimplemented. When used in AllocateQuotaRequest, this returns the + # effective quota limit(s) in the response, and no quota check will be + # performed. Not supported for other requests, and even for + # AllocateQuotaRequest, this is currently supported only for allowlisted + # services. + QUERY_ONLY = 4 + + # The operation allocates quota for the amount specified in the service + # configuration or specified using the quota metrics. If the requested + # amount is higher than the available quota, request does not fail and + # remaining quota would become negative (going over the limit). + # Not supported for Rate Quota. + ADJUST_ONLY = 5 + end + end + + # Response message for the AllocateQuota method. + # @!attribute [rw] operation_id + # @return [::String] + # The same operation_id value used in the AllocateQuotaRequest. Used for + # logging and diagnostics purposes. + # @!attribute [rw] allocate_errors + # @return [::Array<::Google::Cloud::ServiceControl::V1::QuotaError>] + # Indicates the decision of the allocate. + # @!attribute [rw] quota_metrics + # @return [::Array<::Google::Cloud::ServiceControl::V1::MetricValueSet>] + # Quota metrics to indicate the result of allocation. Depending on the + # request, one or more of the following metrics will be included: + # + # 1. Per quota group or per quota metric incremental usage will be specified + # using the following delta metric : + # "serviceruntime.googleapis.com/api/consumer/quota_used_count" + # + # 2. The quota limit reached condition will be specified using the following + # boolean metric : + # "serviceruntime.googleapis.com/quota/exceeded" + # @!attribute [rw] service_config_id + # @return [::String] + # ID of the actual config used to process the request. + class AllocateQuotaResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents error information for + # {::Google::Cloud::ServiceControl::V1::QuotaOperation QuotaOperation}. + # @!attribute [rw] code + # @return [::Google::Cloud::ServiceControl::V1::QuotaError::Code] + # Error code. + # @!attribute [rw] subject + # @return [::String] + # Subject to whom this error applies. See the specific enum for more details + # on this field. For example, "clientip:" or + # "project:". + # @!attribute [rw] description + # @return [::String] + # Free-form text that provides details on the cause of the error. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # Contains additional information about the quota error. + # If available, `status.code` will be non zero. + class QuotaError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Error codes related to project config validations are deprecated since the + # quota controller methods do not perform these validations. Instead services + # have to call the Check method, without quota_properties field, to perform + # these validations before calling the quota controller methods. These + # methods check only for project deletion to be wipe out compliant. + module Code + # This is never used. + UNSPECIFIED = 0 + + # Quota allocation failed. + # Same as + # [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]. + RESOURCE_EXHAUSTED = 8 + + # Consumer cannot access the service because the service requires active + # billing. + BILLING_NOT_ACTIVE = 107 + + # Consumer's project has been marked as deleted (soft deletion). + PROJECT_DELETED = 108 + + # Specified API key is invalid. + API_KEY_INVALID = 105 + + # Specified API Key has expired. + API_KEY_EXPIRED = 112 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/service_controller.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/service_controller.rb new file mode 100644 index 000000000000..c63f78cb240d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/service_controller.rb @@ -0,0 +1,217 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for 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 + module V1 + # Request message for the Check method. + # @!attribute [rw] service_name + # @return [::String] + # The service name as specified in its service configuration. For example, + # `"pubsub.googleapis.com"`. + # + # See + # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + # for the definition of a service name. + # @!attribute [rw] operation + # @return [::Google::Cloud::ServiceControl::V1::Operation] + # The operation to be checked. + # @!attribute [rw] service_config_id + # @return [::String] + # Specifies which version of service configuration should be used to process + # the request. + # + # If unspecified or no matching version can be found, the + # latest one will be used. + class CheckRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the Check method. + # @!attribute [rw] operation_id + # @return [::String] + # The same operation_id value used in the + # {::Google::Cloud::ServiceControl::V1::CheckRequest CheckRequest}. Used for logging + # and diagnostics purposes. + # @!attribute [rw] check_errors + # @return [::Array<::Google::Cloud::ServiceControl::V1::CheckError>] + # Indicate the decision of the check. + # + # If no check errors are present, the service should process the operation. + # Otherwise the service should use the list of errors to determine the + # appropriate action. + # @!attribute [rw] service_config_id + # @return [::String] + # The actual config id used to process the request. + # @!attribute [rw] service_rollout_id + # @return [::String] + # The current service rollout id used to process the request. + # @!attribute [rw] check_info + # @return [::Google::Cloud::ServiceControl::V1::CheckResponse::CheckInfo] + # Feedback data returned from the server during processing a Check request. + class CheckResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains additional information about the check operation. + # @!attribute [rw] unused_arguments + # @return [::Array<::String>] + # A list of fields and label keys that are ignored by the server. + # The client doesn't need to send them for following requests to improve + # performance and allow better aggregation. + # @!attribute [rw] consumer_info + # @return [::Google::Cloud::ServiceControl::V1::CheckResponse::ConsumerInfo] + # Consumer info of this check. + # @!attribute [rw] api_key_uid + # @return [::String] + # The unique id of the api key in the format of "apikey:". + # This field will be populated when the consumer passed to Service Control + # is an API key and all the API key related validations are successful. + class CheckInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ConsumerInfo` provides information about the consumer. + # @!attribute [rw] project_number + # @return [::Integer] + # The Google cloud project number, e.g. 1234567890. A value of 0 indicates + # no project number is found. + # + # NOTE: This field is deprecated after we support flexible consumer + # id. New code should not depend on this field anymore. + # @!attribute [rw] type + # @return [::Google::Cloud::ServiceControl::V1::CheckResponse::ConsumerInfo::ConsumerType] + # The type of the consumer which should have been defined in + # [Google Resource Manager](https://cloud.google.com/resource-manager/). + # @!attribute [rw] consumer_number + # @return [::Integer] + # The consumer identity number, can be Google cloud project number, folder + # number or organization number e.g. 1234567890. A value of 0 indicates no + # consumer number is found. + class ConsumerInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the consumer as defined in + # [Google Resource Manager](https://cloud.google.com/resource-manager/). + module ConsumerType + # This is never used. + CONSUMER_TYPE_UNSPECIFIED = 0 + + # The consumer is a Google Cloud Project. + PROJECT = 1 + + # The consumer is a Google Cloud Folder. + FOLDER = 2 + + # The consumer is a Google Cloud Organization. + ORGANIZATION = 3 + + # Service-specific resource container which is defined by the service + # producer to offer their users the ability to manage service control + # functionalities at a finer level of granularity than the PROJECT. + SERVICE_SPECIFIC = 4 + end + end + end + + # Request message for the Report method. + # @!attribute [rw] service_name + # @return [::String] + # The service name as specified in its service configuration. For example, + # `"pubsub.googleapis.com"`. + # + # See + # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) + # for the definition of a service name. + # @!attribute [rw] operations + # @return [::Array<::Google::Cloud::ServiceControl::V1::Operation>] + # Operations to be reported. + # + # Typically the service should report one operation per request. + # Putting multiple operations into a single request is allowed, but should + # be used only when multiple operations are natually available at the time + # of the report. + # + # There is no limit on the number of operations in the same ReportRequest, + # however the ReportRequest size should be no larger than 1MB. See + # {::Google::Cloud::ServiceControl::V1::ReportResponse#report_errors ReportResponse.report_errors} + # for partial failure behavior. + # @!attribute [rw] service_config_id + # @return [::String] + # Specifies which version of service config should be used to process the + # request. + # + # If unspecified or no matching version can be found, the + # latest one will be used. + class ReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the Report method. + # @!attribute [rw] report_errors + # @return [::Array<::Google::Cloud::ServiceControl::V1::ReportResponse::ReportError>] + # Partial failures, one for each `Operation` in the request that failed + # processing. There are three possible combinations of the RPC status: + # + # 1. The combination of a successful RPC status and an empty `report_errors` + # list indicates a complete success where all `Operations` in the + # request are processed successfully. + # 2. The combination of a successful RPC status and a non-empty + # `report_errors` list indicates a partial success where some + # `Operations` in the request succeeded. Each + # `Operation` that failed processing has a corresponding item + # in this list. + # 3. A failed RPC status indicates a general non-deterministic failure. + # When this happens, it's impossible to know which of the + # 'Operations' in the request succeeded or failed. + # @!attribute [rw] service_config_id + # @return [::String] + # The actual config id used to process the request. + # @!attribute [rw] service_rollout_id + # @return [::String] + # The current service rollout id used to process the request. + class ReportResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the processing error of one + # {::Google::Cloud::ServiceControl::V1::Operation Operation} in the request. + # @!attribute [rw] operation_id + # @return [::String] + # The + # {::Google::Cloud::ServiceControl::V1::Operation#operation_id Operation.operation_id} + # value from the request. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # Details of the error when processing the + # {::Google::Cloud::ServiceControl::V1::Operation Operation}. + class ReportError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/logging/type/log_severity.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/logging/type/log_severity.rb new file mode 100644 index 000000000000..63f6b0689a92 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/logging/type/log_severity.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Logging + module Type + # The severity of the event described in a log entry, expressed as one of the + # standard severity levels listed below. For your reference, the levels are + # assigned the listed numeric values. The effect of using numeric values other + # than those listed is undefined. + # + # You can filter for log entries by severity. For example, the following + # filter expression will match log entries with severities `INFO`, `NOTICE`, + # and `WARNING`: + # + # severity > DEBUG AND severity <= WARNING + # + # If you are writing log entries, you should map other severity encodings to + # one of these standard levels. For example, you might map all of Java's FINE, + # FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the + # original severity level in the log entry payload if you wish. + module LogSeverity + # (0) The log entry has no assigned severity level. + DEFAULT = 0 + + # (100) Debug or trace information. + DEBUG = 100 + + # (200) Routine information, such as ongoing status or performance. + INFO = 200 + + # (300) Normal but significant events, such as start up, shut down, or + # a configuration change. + NOTICE = 300 + + # (400) Warning events might cause problems. + WARNING = 400 + + # (500) Error events are likely to cause problems. + ERROR = 500 + + # (600) Critical events cause more severe problems or outages. + CRITICAL = 600 + + # (700) A person must take an action immediately. + ALERT = 700 + + # (800) One or more systems are unusable. + EMERGENCY = 800 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-service_control-v1/snippets/Gemfile new file mode 100644 index 000000000000..2860c5bace9a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-service_control-v1", path: "../" +else + gem "google-cloud-service_control-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/snippets/quota_controller/allocate_quota.rb b/owl-bot-staging/google-cloud-service_control-v1/snippets/quota_controller/allocate_quota.rb new file mode 100644 index 000000000000..6b1f93d4a4b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/snippets/quota_controller/allocate_quota.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicecontrol_v1_generated_QuotaController_AllocateQuota_sync] +require "google/cloud/service_control/v1" + +## +# Snippet for the allocate_quota call in the QuotaController service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceControl::V1::QuotaController::Client#allocate_quota. +# +def allocate_quota + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceControl::V1::QuotaController::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new + + # Call the allocate_quota method. + result = client.allocate_quota request + + # The returned object is of type Google::Cloud::ServiceControl::V1::AllocateQuotaResponse. + p result +end +# [END servicecontrol_v1_generated_QuotaController_AllocateQuota_sync] diff --git a/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/check.rb b/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/check.rb new file mode 100644 index 000000000000..2f26d0a78028 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/check.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicecontrol_v1_generated_ServiceController_Check_sync] +require "google/cloud/service_control/v1" + +## +# Snippet for the check call in the ServiceController service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceControl::V1::ServiceController::Client#check. +# +def check + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceControl::V1::ServiceController::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceControl::V1::CheckRequest.new + + # Call the check method. + result = client.check request + + # The returned object is of type Google::Cloud::ServiceControl::V1::CheckResponse. + p result +end +# [END servicecontrol_v1_generated_ServiceController_Check_sync] diff --git a/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/report.rb b/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/report.rb new file mode 100644 index 000000000000..cc7c77bb4409 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/report.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicecontrol_v1_generated_ServiceController_Report_sync] +require "google/cloud/service_control/v1" + +## +# Snippet for the report call in the ServiceController service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceControl::V1::ServiceController::Client#report. +# +def report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceControl::V1::ServiceController::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceControl::V1::ReportRequest.new + + # Call the report method. + result = client.report request + + # The returned object is of type Google::Cloud::ServiceControl::V1::ReportResponse. + p result +end +# [END servicecontrol_v1_generated_ServiceController_Report_sync] diff --git a/owl-bot-staging/google-cloud-service_control-v1/snippets/snippet_metadata_google.api.servicecontrol.v1.json b/owl-bot-staging/google-cloud-service_control-v1/snippets/snippet_metadata_google.api.servicecontrol.v1.json new file mode 100644 index 000000000000..fc96d4a24ac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/snippets/snippet_metadata_google.api.servicecontrol.v1.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-cloud-service_control-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.api.servicecontrol.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "servicecontrol_v1_generated_QuotaController_AllocateQuota_sync", + "title": "Snippet for the allocate_quota call in the QuotaController service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceControl::V1::QuotaController::Client#allocate_quota.", + "file": "quota_controller/allocate_quota.rb", + "language": "RUBY", + "client_method": { + "short_name": "allocate_quota", + "full_name": "::Google::Cloud::ServiceControl::V1::QuotaController::Client#allocate_quota", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse", + "client": { + "short_name": "QuotaController::Client", + "full_name": "::Google::Cloud::ServiceControl::V1::QuotaController::Client" + }, + "method": { + "short_name": "AllocateQuota", + "full_name": "google.api.servicecontrol.v1.QuotaController.AllocateQuota", + "service": { + "short_name": "QuotaController", + "full_name": "google.api.servicecontrol.v1.QuotaController" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicecontrol_v1_generated_ServiceController_Check_sync", + "title": "Snippet for the check call in the ServiceController service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceControl::V1::ServiceController::Client#check.", + "file": "service_controller/check.rb", + "language": "RUBY", + "client_method": { + "short_name": "check", + "full_name": "::Google::Cloud::ServiceControl::V1::ServiceController::Client#check", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceControl::V1::CheckRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceControl::V1::CheckResponse", + "client": { + "short_name": "ServiceController::Client", + "full_name": "::Google::Cloud::ServiceControl::V1::ServiceController::Client" + }, + "method": { + "short_name": "Check", + "full_name": "google.api.servicecontrol.v1.ServiceController.Check", + "service": { + "short_name": "ServiceController", + "full_name": "google.api.servicecontrol.v1.ServiceController" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicecontrol_v1_generated_ServiceController_Report_sync", + "title": "Snippet for the report call in the ServiceController service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceControl::V1::ServiceController::Client#report.", + "file": "service_controller/report.rb", + "language": "RUBY", + "client_method": { + "short_name": "report", + "full_name": "::Google::Cloud::ServiceControl::V1::ServiceController::Client#report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceControl::V1::ReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceControl::V1::ReportResponse", + "client": { + "short_name": "ServiceController::Client", + "full_name": "::Google::Cloud::ServiceControl::V1::ServiceController::Client" + }, + "method": { + "short_name": "Report", + "full_name": "google.api.servicecontrol.v1.ServiceController.Report", + "service": { + "short_name": "ServiceController", + "full_name": "google.api.servicecontrol.v1.ServiceController" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_test.rb b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_test.rb new file mode 100644 index 000000000000..c1138f0bb2b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_test.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/api/servicecontrol/v1/quota_controller_pb" +require "google/cloud/service_control/v1/quota_controller/rest" + + +class ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_allocate_quota + # Create test objects. + client_result = ::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + allocate_operation = {} + service_config_id = "hello world" + + allocate_quota_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::ServiceStub.stub :transcode_allocate_quota_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, allocate_quota_client_stub do + # Create client + c = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.allocate_quota({ service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.allocate_quota service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.allocate_quota ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new(service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.allocate_quota({ service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.allocate_quota(::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new(service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, allocate_quota_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_test.rb b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_test.rb new file mode 100644 index 000000000000..cdb7686f7d49 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_test.rb @@ -0,0 +1,166 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/api/servicecontrol/v1/quota_controller_pb" +require "google/cloud/service_control/v1/quota_controller" + +class ::Google::Cloud::ServiceControl::V1::QuotaController::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_allocate_quota + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + allocate_operation = {} + service_config_id = "hello world" + + allocate_quota_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :allocate_quota, name + assert_kind_of ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest, request + assert_equal "hello world", request["service_name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceControl::V1::QuotaOperation), request["allocate_operation"] + assert_equal "hello world", request["service_config_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, allocate_quota_client_stub do + # Create client + c = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.allocate_quota({ service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.allocate_quota service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.allocate_quota ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new(service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.allocate_quota({ service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.allocate_quota(::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new(service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, allocate_quota_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceControl::V1::QuotaController::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ServiceControl::V1::QuotaController::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_rest_test.rb b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_rest_test.rb new file mode 100644 index 000000000000..5136f3a08c4a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_rest_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 "gapic/rest" +require "google/api/servicecontrol/v1/service_controller_pb" +require "google/cloud/service_control/v1/service_controller/rest" + + +class ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_check + # Create test objects. + client_result = ::Google::Cloud::ServiceControl::V1::CheckResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + operation = {} + service_config_id = "hello world" + + check_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::ServiceStub.stub :transcode_check_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, check_client_stub do + # Create client + c = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.check({ service_name: service_name, operation: operation, service_config_id: service_config_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.check service_name: service_name, operation: operation, service_config_id: service_config_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.check ::Google::Cloud::ServiceControl::V1::CheckRequest.new(service_name: service_name, operation: operation, service_config_id: service_config_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.check({ service_name: service_name, operation: operation, service_config_id: service_config_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.check(::Google::Cloud::ServiceControl::V1::CheckRequest.new(service_name: service_name, operation: operation, service_config_id: service_config_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, check_client_stub.call_count + end + end + end + + def test_report + # Create test objects. + client_result = ::Google::Cloud::ServiceControl::V1::ReportResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + operations = [{}] + service_config_id = "hello world" + + report_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::ServiceStub.stub :transcode_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, report_client_stub do + # Create client + c = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.report({ service_name: service_name, operations: operations, service_config_id: service_config_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.report service_name: service_name, operations: operations, service_config_id: service_config_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.report ::Google::Cloud::ServiceControl::V1::ReportRequest.new(service_name: service_name, operations: operations, service_config_id: service_config_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.report({ service_name: service_name, operations: operations, service_config_id: service_config_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.report(::Google::Cloud::ServiceControl::V1::ReportRequest.new(service_name: service_name, operations: operations, service_config_id: service_config_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, report_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_test.rb b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_test.rb new file mode 100644 index 000000000000..1c029c06965e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_test.rb @@ -0,0 +1,228 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/api/servicecontrol/v1/service_controller_pb" +require "google/cloud/service_control/v1/service_controller" + +class ::Google::Cloud::ServiceControl::V1::ServiceController::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_check + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceControl::V1::CheckResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + operation = {} + service_config_id = "hello world" + + check_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :check, name + assert_kind_of ::Google::Cloud::ServiceControl::V1::CheckRequest, request + assert_equal "hello world", request["service_name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceControl::V1::Operation), request["operation"] + assert_equal "hello world", request["service_config_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, check_client_stub do + # Create client + c = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.check({ service_name: service_name, operation: operation, service_config_id: service_config_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.check service_name: service_name, operation: operation, service_config_id: service_config_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.check ::Google::Cloud::ServiceControl::V1::CheckRequest.new(service_name: service_name, operation: operation, service_config_id: service_config_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.check({ service_name: service_name, operation: operation, service_config_id: service_config_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.check(::Google::Cloud::ServiceControl::V1::CheckRequest.new(service_name: service_name, operation: operation, service_config_id: service_config_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, check_client_stub.call_rpc_count + end + end + + def test_report + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceControl::V1::ReportResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + operations = [{}] + service_config_id = "hello world" + + report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :report, name + assert_kind_of ::Google::Cloud::ServiceControl::V1::ReportRequest, request + assert_equal "hello world", request["service_name"] + assert_kind_of ::Google::Cloud::ServiceControl::V1::Operation, request["operations"].first + assert_equal "hello world", request["service_config_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, report_client_stub do + # Create client + c = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.report({ service_name: service_name, operations: operations, service_config_id: service_config_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.report service_name: service_name, operations: operations, service_config_id: service_config_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.report ::Google::Cloud::ServiceControl::V1::ReportRequest.new(service_name: service_name, operations: operations, service_config_id: service_config_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.report({ service_name: service_name, operations: operations, service_config_id: service_config_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.report(::Google::Cloud::ServiceControl::V1::ReportRequest.new(service_name: service_name, operations: operations, service_config_id: service_config_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, report_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceControl::V1::ServiceController::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ServiceControl::V1::ServiceController::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-service_control-v1/test/helper.rb b/owl-bot-staging/google-cloud-service_control-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_control-v1/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_directory-v1beta1/.gitignore b/owl-bot-staging/google-cloud-service_directory-v1beta1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/.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_directory-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-service_directory-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..0344f921c12e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "servicedirectory.googleapis.com", + "api_shortname": "servicedirectory", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-service_directory-v1beta1/latest", + "distribution_name": "google-cloud-service_directory-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "servicedirectory", + "name_pretty": "Service Directory V1beta1 API", + "product_documentation": "https://cloud.google.com/service-directory", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Service directory is the single place to register, browse, and resolve application services. Note that google-cloud-service_directory-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_directory instead. See the readme for more details.", + "ruby-cloud-env-prefix": "SERVICE_DIRECTORY", + "ruby-cloud-product-url": "https://cloud.google.com/service-directory", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-service_directory-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..d1efd0d6f24d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-service_directory-v1beta1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-service_directory-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/.yardopts b/owl-bot-staging/google-cloud-service_directory-v1beta1/.yardopts new file mode 100644 index 000000000000..c2eb327a2a4b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Service Directory V1beta1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_directory-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..6a7d3111b2f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-service_directory-v1beta1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-service_directory-v1beta1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/service_directory/v1beta1" + +client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/service_directory/v1beta1" + +::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-service_directory-v1beta1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/service_directory/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-service_directory-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/Gemfile b/owl-bot-staging/google-cloud-service_directory-v1beta1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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_directory-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-service_directory-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/README.md b/owl-bot-staging/google-cloud-service_directory-v1beta1/README.md new file mode 100644 index 000000000000..ea0366ca7f26 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Service Directory V1beta1 API + +Service Directory is a platform for discovering, publishing, and connecting services. + +Service directory is the single place to register, browse, and resolve application services. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Service Directory V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-service_directory](https://rubygems.org/gems/google-cloud-service_directory). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-service_directory-v1beta1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/servicedirectory.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/service_directory/v1beta1" + +client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new +request = ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new # (request fields as keyword arguments...) +response = client.resolve_service request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_directory-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/service-directory) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/service_directory/v1beta1" +require "logger" + +client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-service_directory`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-service_directory-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-service_directory`. +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_directory-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-service_directory-v1beta1/Rakefile b/owl-bot-staging/google-cloud-service_directory-v1beta1/Rakefile new file mode 100644 index 000000000000..02b546ed1792 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-service_directory-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SERVICE_DIRECTORY_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SERVICE_DIRECTORY_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SERVICE_DIRECTORY_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_DIRECTORY_TEST_PROJECT=test123 SERVICE_DIRECTORY_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/service_directory/v1beta1/lookup_service/credentials" + ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SERVICE_DIRECTORY_PROJECT"] = project + ENV["SERVICE_DIRECTORY_TEST_PROJECT"] = project + ENV["SERVICE_DIRECTORY_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_directory-v1beta1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-service_directory-v1beta1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-service_directory-v1beta1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-service_directory-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-service_directory-v1beta1" + header "google-cloud-service_directory-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-service_directory-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-service_directory-v1beta1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-service_directory-v1beta1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-service_directory-v1beta1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-service_directory-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..2ab2d2885e40 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/gapic_metadata.json @@ -0,0 +1,122 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.servicedirectory.v1beta1", + "libraryPackage": "::Google::Cloud::ServiceDirectory::V1beta1", + "services": { + "LookupService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client", + "rpcs": { + "ResolveService": { + "methods": [ + "resolve_service" + ] + } + } + } + } + }, + "RegistrationService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client", + "rpcs": { + "CreateNamespace": { + "methods": [ + "create_namespace" + ] + }, + "ListNamespaces": { + "methods": [ + "list_namespaces" + ] + }, + "GetNamespace": { + "methods": [ + "get_namespace" + ] + }, + "UpdateNamespace": { + "methods": [ + "update_namespace" + ] + }, + "DeleteNamespace": { + "methods": [ + "delete_namespace" + ] + }, + "CreateService": { + "methods": [ + "create_service" + ] + }, + "ListServices": { + "methods": [ + "list_services" + ] + }, + "GetService": { + "methods": [ + "get_service" + ] + }, + "UpdateService": { + "methods": [ + "update_service" + ] + }, + "DeleteService": { + "methods": [ + "delete_service" + ] + }, + "CreateEndpoint": { + "methods": [ + "create_endpoint" + ] + }, + "ListEndpoints": { + "methods": [ + "list_endpoints" + ] + }, + "GetEndpoint": { + "methods": [ + "get_endpoint" + ] + }, + "UpdateEndpoint": { + "methods": [ + "update_endpoint" + ] + }, + "DeleteEndpoint": { + "methods": [ + "delete_endpoint" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/google-cloud-service_directory-v1beta1.gemspec b/owl-bot-staging/google-cloud-service_directory-v1beta1/google-cloud-service_directory-v1beta1.gemspec new file mode 100644 index 000000000000..119b813d7fc5 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/google-cloud-service_directory-v1beta1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/service_directory/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-service_directory-v1beta1" + gem.version = Google::Cloud::ServiceDirectory::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Service directory is the single place to register, browse, and resolve application services. Note that google-cloud-service_directory-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_directory instead. See the readme for more details." + gem.summary = "Service Directory is a platform for discovering, publishing, and connecting services." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.rb new file mode 100644 index 000000000000..c08367906250 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/service_directory/v1beta1" diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.rb new file mode 100644 index 000000000000..6bcb343006c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/service_directory/v1beta1/lookup_service" +require "google/cloud/service_directory/v1beta1/registration_service" +require "google/cloud/service_directory/v1beta1/version" + +module Google + module Cloud + module ServiceDirectory + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/service_directory/v1beta1" + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/service_directory/v1beta1" + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new + # + module V1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/service_directory/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.rb new file mode 100644 index 000000000000..59fc75fb480d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module ServiceDirectory + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/service_directory/v1beta1/rest" + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new + # + module V1beta1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceDirectory"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.rb new file mode 100644 index 000000000000..79639aca3a89 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_directory/v1beta1/version" + +require "google/cloud/service_directory/v1beta1/lookup_service/credentials" +require "google/cloud/service_directory/v1beta1/lookup_service/paths" +require "google/cloud/service_directory/v1beta1/lookup_service/client" +require "google/cloud/service_directory/v1beta1/lookup_service/rest" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + ## + # Service Directory API for looking up service data at runtime. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/service_directory/v1beta1/lookup_service" + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/service_directory/v1beta1/lookup_service/rest" + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new + # + module LookupService + end + end + end + end +end + +helper_path = ::File.join __dir__, "lookup_service", "helpers.rb" +require "google/cloud/service_directory/v1beta1/lookup_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb new file mode 100644 index 000000000000..323fb64985c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb @@ -0,0 +1,540 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/servicedirectory/v1beta1/lookup_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module LookupService + ## + # Client for the LookupService service. + # + # Service Directory API for looking up service data at runtime. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicedirectory.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lookup_service_stub + + ## + # Configure the LookupService Client class. + # + # See {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LookupService clients + # ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceDirectory", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 15.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LookupService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @lookup_service_stub.universe_domain + end + + ## + # Create a new LookupService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LookupService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/servicedirectory/v1beta1/lookup_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @lookup_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @lookup_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @lookup_service_stub.endpoint + config.universe_domain = @lookup_service_stub.universe_domain + config.logger = @lookup_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @lookup_service_stub.logger + end + + # Service calls + + ## + # Returns a {::Google::Cloud::ServiceDirectory::V1beta1::Service service} and its + # associated endpoints. + # Resolving a service is not considered an active developer method. + # + # @overload resolve_service(request, options = nil) + # Pass arguments to `resolve_service` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload resolve_service(name: nil, max_endpoints: nil, endpoint_filter: nil) + # Pass arguments to `resolve_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the service to resolve. + # @param max_endpoints [::Integer] + # Optional. The maximum number of endpoints to return. Defaults to 25. + # Maximum is 100. If a value less than one is specified, the Default is used. + # If a value greater than the Maximum is specified, the Maximum is used. + # @param endpoint_filter [::String] + # Optional. The filter applied to the endpoints of the resolved service. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name`, `address`, `port`, or `metadata.` for + # map field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `metadata.owner` returns endpoints that have a annotation with the key + # `owner`, this is the same as `metadata:owner` + # * `metadata.protocol=gRPC` returns endpoints that have key/value + # `protocol=gRPC` + # * `address=192.108.1.105` returns endpoints that have this address + # * `port>8080` returns endpoints that have port number larger than 8080 + # * + # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` + # returns endpoints that have name that is alphabetically later than the + # string, so "endpoint-e" is returned but "endpoint-a" is not + # * + # `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` + # returns the endpoint that has an endpoint_id equal to `ep-1` + # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have + # `owner` in annotation key but value is not `sd` AND have key/value + # `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint + # doesn't have a field called "doesnotexist". Since the filter does not + # match any endpoint, it returns no results + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new + # + # # Call the resolve_service method. + # result = client.resolve_service request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse. + # p result + # + def resolve_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.resolve_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.resolve_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resolve_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lookup_service_stub.call_rpc :resolve_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LookupService API. + # + # This class represents the configuration for LookupService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # resolve_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.resolve_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.resolve_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicedirectory.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the LookupService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `resolve_service` + # @return [::Gapic::Config::Method] + # + attr_reader :resolve_service + + # @private + def initialize parent_rpcs = nil + resolve_service_config = parent_rpcs.resolve_service if parent_rpcs.respond_to? :resolve_service + @resolve_service = ::Gapic::Config::Method.new resolve_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.rb new file mode 100644 index 000000000000..53cdf629fbe5 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module LookupService + # Credentials for the LookupService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SERVICE_DIRECTORY_CREDENTIALS", + "SERVICE_DIRECTORY_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SERVICE_DIRECTORY_CREDENTIALS_JSON", + "SERVICE_DIRECTORY_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.rb new file mode 100644 index 000000000000..50d7bedddd03 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module LookupService + # Path helper methods for the LookupService API. + module Paths + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param namespace [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, namespace:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" + + "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb new file mode 100644 index 000000000000..8555356e42e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_directory/v1beta1/version" +require "google/cloud/service_directory/v1beta1/bindings_override" + +require "google/cloud/service_directory/v1beta1/lookup_service/credentials" +require "google/cloud/service_directory/v1beta1/lookup_service/paths" +require "google/cloud/service_directory/v1beta1/lookup_service/rest/client" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + ## + # Service Directory API for looking up service data at runtime. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/service_directory/v1beta1/lookup_service/rest" + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new + # + module LookupService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/service_directory/v1beta1/lookup_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb new file mode 100644 index 000000000000..f3e781d064b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb @@ -0,0 +1,498 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/servicedirectory/v1beta1/lookup_service_pb" +require "google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module LookupService + module Rest + ## + # REST client for the LookupService service. + # + # Service Directory API for looking up service data at runtime. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicedirectory.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :lookup_service_stub + + ## + # Configure the LookupService Client class. + # + # See {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LookupService clients + # ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceDirectory", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 15.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LookupService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @lookup_service_stub.universe_domain + end + + ## + # Create a new LookupService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LookupService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @lookup_service_stub = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @lookup_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @lookup_service_stub.endpoint + config.universe_domain = @lookup_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @lookup_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @lookup_service_stub.logger + end + + # Service calls + + ## + # Returns a {::Google::Cloud::ServiceDirectory::V1beta1::Service service} and its + # associated endpoints. + # Resolving a service is not considered an active developer method. + # + # @overload resolve_service(request, options = nil) + # Pass arguments to `resolve_service` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload resolve_service(name: nil, max_endpoints: nil, endpoint_filter: nil) + # Pass arguments to `resolve_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the service to resolve. + # @param max_endpoints [::Integer] + # Optional. The maximum number of endpoints to return. Defaults to 25. + # Maximum is 100. If a value less than one is specified, the Default is used. + # If a value greater than the Maximum is specified, the Maximum is used. + # @param endpoint_filter [::String] + # Optional. The filter applied to the endpoints of the resolved service. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name`, `address`, `port`, or `metadata.` for + # map field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `metadata.owner` returns endpoints that have a annotation with the key + # `owner`, this is the same as `metadata:owner` + # * `metadata.protocol=gRPC` returns endpoints that have key/value + # `protocol=gRPC` + # * `address=192.108.1.105` returns endpoints that have this address + # * `port>8080` returns endpoints that have port number larger than 8080 + # * + # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` + # returns endpoints that have name that is alphabetically later than the + # string, so "endpoint-e" is returned but "endpoint-a" is not + # * + # `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` + # returns the endpoint that has an endpoint_id equal to `ep-1` + # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have + # `owner` in annotation key but value is not `sd` AND have key/value + # `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint + # doesn't have a field called "doesnotexist". Since the filter does not + # match any endpoint, it returns no results + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new + # + # # Call the resolve_service method. + # result = client.resolve_service request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse. + # p result + # + def resolve_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.resolve_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.resolve_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.resolve_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @lookup_service_stub.resolve_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the LookupService REST API. + # + # This class represents the configuration for LookupService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # resolve_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.resolve_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.resolve_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicedirectory.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the LookupService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `resolve_service` + # @return [::Gapic::Config::Method] + # + attr_reader :resolve_service + + # @private + def initialize parent_rpcs = nil + resolve_service_config = parent_rpcs.resolve_service if parent_rpcs.respond_to? :resolve_service + @resolve_service = ::Gapic::Config::Method.new resolve_service_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb new file mode 100644 index 000000000000..b7c4ba7a4500 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/servicedirectory/v1beta1/lookup_service_pb" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module LookupService + module Rest + ## + # REST service stub for the LookupService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the resolve_service REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] + # A result object deserialized from the server's reply + def resolve_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_resolve_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "resolve_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the resolve_service REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_resolve_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{name}:resolve", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.rb new file mode 100644 index 000000000000..7acfe52f8b07 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_directory/v1beta1/version" + +require "google/cloud/service_directory/v1beta1/registration_service/credentials" +require "google/cloud/service_directory/v1beta1/registration_service/paths" +require "google/cloud/service_directory/v1beta1/registration_service/client" +require "google/cloud/service_directory/v1beta1/registration_service/rest" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + ## + # Service Directory API for registering services. It defines the following + # resource model: + # + # - The API has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Namespace Namespace} + # resources, named `projects/*/locations/*/namespaces/*`. + # + # - Each Namespace has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Service Service} resources, named + # `projects/*/locations/*/namespaces/*/services/*`. + # + # - Each Service has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Endpoint Endpoint} + # resources, named + # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/service_directory/v1beta1/registration_service" + # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/service_directory/v1beta1/registration_service/rest" + # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + module RegistrationService + end + end + end + end +end + +helper_path = ::File.join __dir__, "registration_service", "helpers.rb" +require "google/cloud/service_directory/v1beta1/registration_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb new file mode 100644 index 000000000000..85c0fcefd890 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb @@ -0,0 +1,2307 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/servicedirectory/v1beta1/registration_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module RegistrationService + ## + # Client for the RegistrationService service. + # + # Service Directory API for registering services. It defines the following + # resource model: + # + # - The API has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Namespace Namespace} + # resources, named `projects/*/locations/*/namespaces/*`. + # + # - Each Namespace has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Service Service} resources, named + # `projects/*/locations/*/namespaces/*/services/*`. + # + # - Each Service has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Endpoint Endpoint} + # resources, named + # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicedirectory.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :registration_service_stub + + ## + # Configure the RegistrationService Client class. + # + # See {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegistrationService clients + # ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceDirectory", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 15.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegistrationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @registration_service_stub.universe_domain + end + + ## + # Create a new RegistrationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegistrationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/servicedirectory/v1beta1/registration_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @registration_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @registration_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @registration_service_stub.endpoint + config.universe_domain = @registration_service_stub.universe_domain + config.logger = @registration_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @registration_service_stub.logger + end + + # Service calls + + ## + # Creates a namespace, and returns the new namespace. + # + # @overload create_namespace(request, options = nil) + # Pass arguments to `create_namespace` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_namespace(parent: nil, namespace_id: nil, namespace: nil) + # Pass arguments to `create_namespace` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project and location the namespace + # will be created in. + # @param namespace_id [::String] + # Required. The Resource ID must be 1-63 characters long, and comply with + # RFC1035. + # Specifically, the name must be 1-63 characters long and match the regular + # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + # character must be a lowercase letter, and all following characters must + # be a dash, lowercase letter, or digit, except the last character, which + # cannot be a dash. + # @param namespace [::Google::Cloud::ServiceDirectory::V1beta1::Namespace, ::Hash] + # Required. A namespace with initial fields set. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new + # + # # Call the create_namespace method. + # result = client.create_namespace request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. + # p result + # + def create_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_namespace.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :create_namespace, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all namespaces. + # + # @overload list_namespaces(request, options = nil) + # Pass arguments to `list_namespaces` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_namespaces(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_namespaces` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project and location whose namespaces + # you'd like to list. + # @param page_size [::Integer] + # Optional. The maximum number of items to return. The default value is 100. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @param filter [::String] + # Optional. The filter to list results by. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name`, `labels.` for map field, or + # `attributes.` for attributes field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `labels.owner` returns namespaces that have a label with the key + # `owner`, this is the same as `labels:owner` + # * `labels.owner=sd` returns namespaces that have key/value `owner=sd` + # * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` + # returns namespaces that have name that is alphabetically later than the + # string, so "namespace-e" is returned but "namespace-a" is not + # * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have + # `owner` in label key but value is not `sd` AND have key/value `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that namespace + # doesn't have a field called "doesnotexist". Since the filter does not + # match any namespaces, it returns no results + # * `attributes.managed_registration=true` returns namespaces that are + # managed by a GCP product or service + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + # @param order_by [::String] + # Optional. The order to list results by. + # + # General `order_by` string syntax: ` () (,)` + # + # * `` allows value: `name` + # * `` ascending or descending order by ``. If this is + # left blank, `asc` is used + # + # Note that an empty `order_by` string results in default order, which is + # order by `name` in ascending order. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new + # + # # Call the list_namespaces method. + # result = client.list_namespaces request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Namespace. + # p item + # end + # + def list_namespaces request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_namespaces.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_namespaces.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_namespaces.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :list_namespaces, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_namespaces, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a namespace. + # + # @overload get_namespace(request, options = nil) + # Pass arguments to `get_namespace` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_namespace(name: nil) + # Pass arguments to `get_namespace` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the namespace to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new + # + # # Call the get_namespace method. + # result = client.get_namespace request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. + # p result + # + def get_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_namespace.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :get_namespace, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a namespace. + # + # @overload update_namespace(request, options = nil) + # Pass arguments to `update_namespace` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_namespace(namespace: nil, update_mask: nil) + # Pass arguments to `update_namespace` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param namespace [::Google::Cloud::ServiceDirectory::V1beta1::Namespace, ::Hash] + # Required. The updated namespace. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields to be updated in this request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new + # + # # Call the update_namespace method. + # result = client.update_namespace request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. + # p result + # + def update_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_namespace.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.namespace&.name + header_params["namespace.name"] = request.namespace.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :update_namespace, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a namespace. This also deletes all services and endpoints in + # the namespace. + # + # @overload delete_namespace(request, options = nil) + # Pass arguments to `delete_namespace` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_namespace(name: nil) + # Pass arguments to `delete_namespace` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the namespace to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new + # + # # Call the delete_namespace method. + # result = client.delete_namespace request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_namespace.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :delete_namespace, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a service, and returns the new service. + # + # @overload create_service(request, options = nil) + # Pass arguments to `create_service` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_service(parent: nil, service_id: nil, service: nil) + # Pass arguments to `create_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the namespace this service will belong to. + # @param service_id [::String] + # Required. The Resource ID must be 1-63 characters long, and comply with + # RFC1035. + # Specifically, the name must be 1-63 characters long and match the regular + # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + # character must be a lowercase letter, and all following characters must + # be a dash, lowercase letter, or digit, except the last character, which + # cannot be a dash. + # @param service [::Google::Cloud::ServiceDirectory::V1beta1::Service, ::Hash] + # Required. A service with initial fields set. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new + # + # # Call the create_service method. + # result = client.create_service request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. + # p result + # + def create_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :create_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all services belonging to a namespace. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the namespace whose services you'd + # like to list. + # @param page_size [::Integer] + # Optional. The maximum number of items to return. The default value is 100. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @param filter [::String] + # Optional. The filter to list results by. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name` or `metadata.` for map field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `metadata.owner` returns services that have a metadata with the key + # `owner`, this is the same as `metadata:owner` + # * `metadata.protocol=gRPC` returns services that have key/value + # `protocol=gRPC` + # * + # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` + # returns services that have name that is alphabetically later than the + # string, so "service-e" is returned but "service-a" is not + # * `metadata.owner!=sd AND metadata.foo=bar` returns services that have + # `owner` in metadata key but value is not `sd` AND have key/value + # `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that service + # doesn't have a field called "doesnotexist". Since the filter does not + # match any services, it returns no results + # * `attributes.managed_registration=true` returns services that are + # managed + # by a GCP product or service + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + # @param order_by [::String] + # Optional. The order to list results by. + # + # General `order_by` string syntax: ` () (,)` + # + # * `` allows value: `name` + # * `` ascending or descending order by ``. If this is + # left blank, `asc` is used + # + # Note that an empty `order_by` string results in default order, which is + # order by `name` in ascending order. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Service>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Service>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :list_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_services, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a service. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_service(name: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the service to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :get_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a service. + # + # @overload update_service(request, options = nil) + # Pass arguments to `update_service` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_service(service: nil, update_mask: nil) + # Pass arguments to `update_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service [::Google::Cloud::ServiceDirectory::V1beta1::Service, ::Hash] + # Required. The updated service. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields to be updated in this request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new + # + # # Call the update_service method. + # result = client.update_service request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. + # p result + # + def update_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service&.name + header_params["service.name"] = request.service.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :update_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a service. This also deletes all endpoints associated with + # the service. + # + # @overload delete_service(request, options = nil) + # Pass arguments to `delete_service` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_service(name: nil) + # Pass arguments to `delete_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the service to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new + # + # # Call the delete_service method. + # result = client.delete_service request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :delete_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an endpoint, and returns the new endpoint. + # + # @overload create_endpoint(request, options = nil) + # Pass arguments to `create_endpoint` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_endpoint(parent: nil, endpoint_id: nil, endpoint: nil) + # Pass arguments to `create_endpoint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the service that this endpoint provides. + # @param endpoint_id [::String] + # Required. The Resource ID must be 1-63 characters long, and comply with + # RFC1035. + # Specifically, the name must be 1-63 characters long and match the regular + # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + # character must be a lowercase letter, and all following characters must + # be a dash, lowercase letter, or digit, except the last character, which + # cannot be a dash. + # @param endpoint [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint, ::Hash] + # Required. A endpoint with initial fields set. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new + # + # # Call the create_endpoint method. + # result = client.create_endpoint request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + # p result + # + def create_endpoint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_endpoint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_endpoint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_endpoint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :create_endpoint, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all endpoints. + # + # @overload list_endpoints(request, options = nil) + # Pass arguments to `list_endpoints` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_endpoints` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the service whose endpoints you'd like to + # list. + # @param page_size [::Integer] + # Optional. The maximum number of items to return. The default value is 100. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @param filter [::String] + # Optional. The filter to list results by. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name`, `address`, `port`, `metadata.` for map + # field, or `attributes.` for attributes field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `metadata.owner` returns endpoints that have a metadata with the key + # `owner`, this is the same as `metadata:owner` + # * `metadata.protocol=gRPC` returns endpoints that have key/value + # `protocol=gRPC` + # * `address=192.108.1.105` returns endpoints that have this address + # * `port>8080` returns endpoints that have port number larger than 8080 + # * + # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` + # returns endpoints that have name that is alphabetically later than the + # string, so "endpoint-e" is returned but "endpoint-a" is not + # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have + # `owner` in metadata key but value is not `sd` AND have key/value + # `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint + # doesn't have a field called "doesnotexist". Since the filter does not + # match any endpoints, it returns no results + # * `attributes.kubernetes_resource_type=KUBERNETES_RESOURCE_TYPE_CLUSTER_ + # IP` returns endpoints with the corresponding kubernetes_resource_type + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + # @param order_by [::String] + # Optional. The order to list results by. + # + # General `order_by` string syntax: ` () (,)` + # + # * `` allows values: `name`, `address`, `port` + # * `` ascending or descending order by ``. If this is + # left blank, `asc` is used + # + # Note that an empty `order_by` string results in default order, which is + # order by `name` in ascending order. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new + # + # # Call the list_endpoints method. + # result = client.list_endpoints request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + # p item + # end + # + def list_endpoints request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_endpoints.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_endpoints.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_endpoints.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :list_endpoints, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_endpoints, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an endpoint. + # + # @overload get_endpoint(request, options = nil) + # Pass arguments to `get_endpoint` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_endpoint(name: nil) + # Pass arguments to `get_endpoint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the endpoint to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new + # + # # Call the get_endpoint method. + # result = client.get_endpoint request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + # p result + # + def get_endpoint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_endpoint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_endpoint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_endpoint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :get_endpoint, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an endpoint. + # + # @overload update_endpoint(request, options = nil) + # Pass arguments to `update_endpoint` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_endpoint(endpoint: nil, update_mask: nil) + # Pass arguments to `update_endpoint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param endpoint [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint, ::Hash] + # Required. The updated endpoint. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields to be updated in this request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new + # + # # Call the update_endpoint method. + # result = client.update_endpoint request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + # p result + # + def update_endpoint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_endpoint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.endpoint&.name + header_params["endpoint.name"] = request.endpoint.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_endpoint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_endpoint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :update_endpoint, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an endpoint. + # + # @overload delete_endpoint(request, options = nil) + # Pass arguments to `delete_endpoint` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_endpoint(name: nil) + # Pass arguments to `delete_endpoint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the endpoint to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new + # + # # Call the delete_endpoint method. + # result = client.delete_endpoint request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_endpoint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_endpoint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_endpoint.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_endpoint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :delete_endpoint, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM Policy for a resource + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM Policy for a resource + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Tests IAM permissions for a resource (namespace, service or + # service workload only). + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the RegistrationService API. + # + # This class represents the configuration for RegistrationService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_namespace to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_namespace.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_namespace.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicedirectory.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the RegistrationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :create_namespace + ## + # RPC-specific configuration for `list_namespaces` + # @return [::Gapic::Config::Method] + # + attr_reader :list_namespaces + ## + # RPC-specific configuration for `get_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :get_namespace + ## + # RPC-specific configuration for `update_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :update_namespace + ## + # RPC-specific configuration for `delete_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_namespace + ## + # RPC-specific configuration for `create_service` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `update_service` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service + ## + # RPC-specific configuration for `delete_service` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service + ## + # RPC-specific configuration for `create_endpoint` + # @return [::Gapic::Config::Method] + # + attr_reader :create_endpoint + ## + # RPC-specific configuration for `list_endpoints` + # @return [::Gapic::Config::Method] + # + attr_reader :list_endpoints + ## + # RPC-specific configuration for `get_endpoint` + # @return [::Gapic::Config::Method] + # + attr_reader :get_endpoint + ## + # RPC-specific configuration for `update_endpoint` + # @return [::Gapic::Config::Method] + # + attr_reader :update_endpoint + ## + # RPC-specific configuration for `delete_endpoint` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_endpoint + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + create_namespace_config = parent_rpcs.create_namespace if parent_rpcs.respond_to? :create_namespace + @create_namespace = ::Gapic::Config::Method.new create_namespace_config + list_namespaces_config = parent_rpcs.list_namespaces if parent_rpcs.respond_to? :list_namespaces + @list_namespaces = ::Gapic::Config::Method.new list_namespaces_config + get_namespace_config = parent_rpcs.get_namespace if parent_rpcs.respond_to? :get_namespace + @get_namespace = ::Gapic::Config::Method.new get_namespace_config + update_namespace_config = parent_rpcs.update_namespace if parent_rpcs.respond_to? :update_namespace + @update_namespace = ::Gapic::Config::Method.new update_namespace_config + delete_namespace_config = parent_rpcs.delete_namespace if parent_rpcs.respond_to? :delete_namespace + @delete_namespace = ::Gapic::Config::Method.new delete_namespace_config + create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service + @create_service = ::Gapic::Config::Method.new create_service_config + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service + @update_service = ::Gapic::Config::Method.new update_service_config + delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service + @delete_service = ::Gapic::Config::Method.new delete_service_config + create_endpoint_config = parent_rpcs.create_endpoint if parent_rpcs.respond_to? :create_endpoint + @create_endpoint = ::Gapic::Config::Method.new create_endpoint_config + list_endpoints_config = parent_rpcs.list_endpoints if parent_rpcs.respond_to? :list_endpoints + @list_endpoints = ::Gapic::Config::Method.new list_endpoints_config + get_endpoint_config = parent_rpcs.get_endpoint if parent_rpcs.respond_to? :get_endpoint + @get_endpoint = ::Gapic::Config::Method.new get_endpoint_config + update_endpoint_config = parent_rpcs.update_endpoint if parent_rpcs.respond_to? :update_endpoint + @update_endpoint = ::Gapic::Config::Method.new update_endpoint_config + delete_endpoint_config = parent_rpcs.delete_endpoint if parent_rpcs.respond_to? :delete_endpoint + @delete_endpoint = ::Gapic::Config::Method.new delete_endpoint_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.rb new file mode 100644 index 000000000000..d90bb79b2ad3 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module RegistrationService + # Credentials for the RegistrationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SERVICE_DIRECTORY_CREDENTIALS", + "SERVICE_DIRECTORY_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SERVICE_DIRECTORY_CREDENTIALS_JSON", + "SERVICE_DIRECTORY_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb new file mode 100644 index 000000000000..7d67a139666f --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb @@ -0,0 +1,130 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module RegistrationService + # Path helper methods for the RegistrationService API. + module Paths + ## + # Create a fully-qualified Endpoint resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint}` + # + # @param project [String] + # @param location [String] + # @param namespace [String] + # @param service [String] + # @param endpoint [String] + # + # @return [::String] + def endpoint_path project:, location:, namespace:, service:, endpoint: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" + raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/" + + "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}/endpoints/#{endpoint}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Namespace resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/namespaces/{namespace}` + # + # @param project [String] + # @param location [String] + # @param namespace [String] + # + # @return [::String] + def namespace_path project:, location:, namespace: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/namespaces/#{namespace}" + end + + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/global/networks/{network}` + # + # @param project [String] + # @param network [String] + # + # @return [::String] + def network_path project:, network: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/global/networks/#{network}" + end + + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param namespace [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, namespace:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" + + "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb new file mode 100644 index 000000000000..3cf7fab4eda2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_directory/v1beta1/version" +require "google/cloud/service_directory/v1beta1/bindings_override" + +require "google/cloud/service_directory/v1beta1/registration_service/credentials" +require "google/cloud/service_directory/v1beta1/registration_service/paths" +require "google/cloud/service_directory/v1beta1/registration_service/rest/client" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + ## + # Service Directory API for registering services. It defines the following + # resource model: + # + # - The API has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Namespace Namespace} + # resources, named `projects/*/locations/*/namespaces/*`. + # + # - Each Namespace has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Service Service} resources, named + # `projects/*/locations/*/namespaces/*/services/*`. + # + # - Each Service has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Endpoint Endpoint} + # resources, named + # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/service_directory/v1beta1/registration_service/rest" + # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + module RegistrationService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/service_directory/v1beta1/registration_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb new file mode 100644 index 000000000000..6e0e19fc93b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb @@ -0,0 +1,2146 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/servicedirectory/v1beta1/registration_service_pb" +require "google/cloud/service_directory/v1beta1/registration_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module RegistrationService + module Rest + ## + # REST client for the RegistrationService service. + # + # Service Directory API for registering services. It defines the following + # resource model: + # + # - The API has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Namespace Namespace} + # resources, named `projects/*/locations/*/namespaces/*`. + # + # - Each Namespace has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Service Service} resources, named + # `projects/*/locations/*/namespaces/*/services/*`. + # + # - Each Service has a collection of + # {::Google::Cloud::ServiceDirectory::V1beta1::Endpoint Endpoint} + # resources, named + # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicedirectory.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :registration_service_stub + + ## + # Configure the RegistrationService Client class. + # + # See {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RegistrationService clients + # ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceDirectory", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 15.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RegistrationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @registration_service_stub.universe_domain + end + + ## + # Create a new RegistrationService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RegistrationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @registration_service_stub = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @registration_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @registration_service_stub.endpoint + config.universe_domain = @registration_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @registration_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @registration_service_stub.logger + end + + # Service calls + + ## + # Creates a namespace, and returns the new namespace. + # + # @overload create_namespace(request, options = nil) + # Pass arguments to `create_namespace` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_namespace(parent: nil, namespace_id: nil, namespace: nil) + # Pass arguments to `create_namespace` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project and location the namespace + # will be created in. + # @param namespace_id [::String] + # Required. The Resource ID must be 1-63 characters long, and comply with + # RFC1035. + # Specifically, the name must be 1-63 characters long and match the regular + # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + # character must be a lowercase letter, and all following characters must + # be a dash, lowercase letter, or digit, except the last character, which + # cannot be a dash. + # @param namespace [::Google::Cloud::ServiceDirectory::V1beta1::Namespace, ::Hash] + # Required. A namespace with initial fields set. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new + # + # # Call the create_namespace method. + # result = client.create_namespace request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. + # p result + # + def create_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_namespace.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.create_namespace request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all namespaces. + # + # @overload list_namespaces(request, options = nil) + # Pass arguments to `list_namespaces` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_namespaces(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_namespaces` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project and location whose namespaces + # you'd like to list. + # @param page_size [::Integer] + # Optional. The maximum number of items to return. The default value is 100. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @param filter [::String] + # Optional. The filter to list results by. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name`, `labels.` for map field, or + # `attributes.` for attributes field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `labels.owner` returns namespaces that have a label with the key + # `owner`, this is the same as `labels:owner` + # * `labels.owner=sd` returns namespaces that have key/value `owner=sd` + # * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` + # returns namespaces that have name that is alphabetically later than the + # string, so "namespace-e" is returned but "namespace-a" is not + # * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have + # `owner` in label key but value is not `sd` AND have key/value `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that namespace + # doesn't have a field called "doesnotexist". Since the filter does not + # match any namespaces, it returns no results + # * `attributes.managed_registration=true` returns namespaces that are + # managed by a GCP product or service + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + # @param order_by [::String] + # Optional. The order to list results by. + # + # General `order_by` string syntax: ` () (,)` + # + # * `` allows value: `name` + # * `` ascending or descending order by ``. If this is + # left blank, `asc` is used + # + # Note that an empty `order_by` string results in default order, which is + # order by `name` in ascending order. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new + # + # # Call the list_namespaces method. + # result = client.list_namespaces request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Namespace. + # p item + # end + # + def list_namespaces request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_namespaces.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_namespaces.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_namespaces.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.list_namespaces request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @registration_service_stub, :list_namespaces, "namespaces", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a namespace. + # + # @overload get_namespace(request, options = nil) + # Pass arguments to `get_namespace` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_namespace(name: nil) + # Pass arguments to `get_namespace` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the namespace to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new + # + # # Call the get_namespace method. + # result = client.get_namespace request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. + # p result + # + def get_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_namespace.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.get_namespace request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a namespace. + # + # @overload update_namespace(request, options = nil) + # Pass arguments to `update_namespace` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_namespace(namespace: nil, update_mask: nil) + # Pass arguments to `update_namespace` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param namespace [::Google::Cloud::ServiceDirectory::V1beta1::Namespace, ::Hash] + # Required. The updated namespace. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields to be updated in this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new + # + # # Call the update_namespace method. + # result = client.update_namespace request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. + # p result + # + def update_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_namespace.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.update_namespace request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a namespace. This also deletes all services and endpoints in + # the namespace. + # + # @overload delete_namespace(request, options = nil) + # Pass arguments to `delete_namespace` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_namespace(name: nil) + # Pass arguments to `delete_namespace` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the namespace to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new + # + # # Call the delete_namespace method. + # result = client.delete_namespace request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_namespace.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.delete_namespace request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a service, and returns the new service. + # + # @overload create_service(request, options = nil) + # Pass arguments to `create_service` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_service(parent: nil, service_id: nil, service: nil) + # Pass arguments to `create_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the namespace this service will belong to. + # @param service_id [::String] + # Required. The Resource ID must be 1-63 characters long, and comply with + # RFC1035. + # Specifically, the name must be 1-63 characters long and match the regular + # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + # character must be a lowercase letter, and all following characters must + # be a dash, lowercase letter, or digit, except the last character, which + # cannot be a dash. + # @param service [::Google::Cloud::ServiceDirectory::V1beta1::Service, ::Hash] + # Required. A service with initial fields set. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new + # + # # Call the create_service method. + # result = client.create_service request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. + # p result + # + def create_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.create_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all services belonging to a namespace. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the namespace whose services you'd + # like to list. + # @param page_size [::Integer] + # Optional. The maximum number of items to return. The default value is 100. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @param filter [::String] + # Optional. The filter to list results by. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name` or `metadata.` for map field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `metadata.owner` returns services that have a metadata with the key + # `owner`, this is the same as `metadata:owner` + # * `metadata.protocol=gRPC` returns services that have key/value + # `protocol=gRPC` + # * + # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` + # returns services that have name that is alphabetically later than the + # string, so "service-e" is returned but "service-a" is not + # * `metadata.owner!=sd AND metadata.foo=bar` returns services that have + # `owner` in metadata key but value is not `sd` AND have key/value + # `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that service + # doesn't have a field called "doesnotexist". Since the filter does not + # match any services, it returns no results + # * `attributes.managed_registration=true` returns services that are + # managed + # by a GCP product or service + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + # @param order_by [::String] + # Optional. The order to list results by. + # + # General `order_by` string syntax: ` () (,)` + # + # * `` allows value: `name` + # * `` ascending or descending order by ``. If this is + # left blank, `asc` is used + # + # Note that an empty `order_by` string results in default order, which is + # order by `name` in ascending order. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Service>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Service>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.list_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @registration_service_stub, :list_services, "services", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a service. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_service(name: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the service to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.get_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a service. + # + # @overload update_service(request, options = nil) + # Pass arguments to `update_service` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_service(service: nil, update_mask: nil) + # Pass arguments to `update_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service [::Google::Cloud::ServiceDirectory::V1beta1::Service, ::Hash] + # Required. The updated service. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields to be updated in this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new + # + # # Call the update_service method. + # result = client.update_service request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. + # p result + # + def update_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.update_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a service. This also deletes all endpoints associated with + # the service. + # + # @overload delete_service(request, options = nil) + # Pass arguments to `delete_service` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_service(name: nil) + # Pass arguments to `delete_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the service to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new + # + # # Call the delete_service method. + # result = client.delete_service request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.delete_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an endpoint, and returns the new endpoint. + # + # @overload create_endpoint(request, options = nil) + # Pass arguments to `create_endpoint` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_endpoint(parent: nil, endpoint_id: nil, endpoint: nil) + # Pass arguments to `create_endpoint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the service that this endpoint provides. + # @param endpoint_id [::String] + # Required. The Resource ID must be 1-63 characters long, and comply with + # RFC1035. + # Specifically, the name must be 1-63 characters long and match the regular + # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + # character must be a lowercase letter, and all following characters must + # be a dash, lowercase letter, or digit, except the last character, which + # cannot be a dash. + # @param endpoint [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint, ::Hash] + # Required. A endpoint with initial fields set. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new + # + # # Call the create_endpoint method. + # result = client.create_endpoint request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + # p result + # + def create_endpoint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_endpoint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_endpoint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_endpoint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.create_endpoint request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all endpoints. + # + # @overload list_endpoints(request, options = nil) + # Pass arguments to `list_endpoints` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_endpoints` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the service whose endpoints you'd like to + # list. + # @param page_size [::Integer] + # Optional. The maximum number of items to return. The default value is 100. + # @param page_token [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @param filter [::String] + # Optional. The filter to list results by. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name`, `address`, `port`, `metadata.` for map + # field, or `attributes.` for attributes field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `metadata.owner` returns endpoints that have a metadata with the key + # `owner`, this is the same as `metadata:owner` + # * `metadata.protocol=gRPC` returns endpoints that have key/value + # `protocol=gRPC` + # * `address=192.108.1.105` returns endpoints that have this address + # * `port>8080` returns endpoints that have port number larger than 8080 + # * + # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` + # returns endpoints that have name that is alphabetically later than the + # string, so "endpoint-e" is returned but "endpoint-a" is not + # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have + # `owner` in metadata key but value is not `sd` AND have key/value + # `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint + # doesn't have a field called "doesnotexist". Since the filter does not + # match any endpoints, it returns no results + # * `attributes.kubernetes_resource_type=KUBERNETES_RESOURCE_TYPE_CLUSTER_ + # IP` returns endpoints with the corresponding kubernetes_resource_type + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + # @param order_by [::String] + # Optional. The order to list results by. + # + # General `order_by` string syntax: ` () (,)` + # + # * `` allows values: `name`, `address`, `port` + # * `` ascending or descending order by ``. If this is + # left blank, `asc` is used + # + # Note that an empty `order_by` string results in default order, which is + # order by `name` in ascending order. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new + # + # # Call the list_endpoints method. + # result = client.list_endpoints request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + # p item + # end + # + def list_endpoints request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_endpoints.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_endpoints.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_endpoints.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.list_endpoints request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @registration_service_stub, :list_endpoints, "endpoints", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an endpoint. + # + # @overload get_endpoint(request, options = nil) + # Pass arguments to `get_endpoint` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_endpoint(name: nil) + # Pass arguments to `get_endpoint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the endpoint to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new + # + # # Call the get_endpoint method. + # result = client.get_endpoint request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + # p result + # + def get_endpoint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_endpoint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_endpoint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_endpoint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.get_endpoint request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an endpoint. + # + # @overload update_endpoint(request, options = nil) + # Pass arguments to `update_endpoint` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_endpoint(endpoint: nil, update_mask: nil) + # Pass arguments to `update_endpoint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param endpoint [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint, ::Hash] + # Required. The updated endpoint. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. List of fields to be updated in this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new + # + # # Call the update_endpoint method. + # result = client.update_endpoint request + # + # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + # p result + # + def update_endpoint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_endpoint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_endpoint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_endpoint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.update_endpoint request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an endpoint. + # + # @overload delete_endpoint(request, options = nil) + # Pass arguments to `delete_endpoint` via a request object, either of type + # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_endpoint(name: nil) + # Pass arguments to `delete_endpoint` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the endpoint to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new + # + # # Call the delete_endpoint method. + # result = client.delete_endpoint request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_endpoint request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_endpoint.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_endpoint.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_endpoint.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.delete_endpoint request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM Policy for a resource + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM Policy for a resource + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Tests IAM permissions for a resource (namespace, service or + # service workload only). + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_directory/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @registration_service_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the RegistrationService REST API. + # + # This class represents the configuration for RegistrationService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_namespace to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_namespace.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_namespace.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicedirectory.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the RegistrationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :create_namespace + ## + # RPC-specific configuration for `list_namespaces` + # @return [::Gapic::Config::Method] + # + attr_reader :list_namespaces + ## + # RPC-specific configuration for `get_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :get_namespace + ## + # RPC-specific configuration for `update_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :update_namespace + ## + # RPC-specific configuration for `delete_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_namespace + ## + # RPC-specific configuration for `create_service` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `update_service` + # @return [::Gapic::Config::Method] + # + attr_reader :update_service + ## + # RPC-specific configuration for `delete_service` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service + ## + # RPC-specific configuration for `create_endpoint` + # @return [::Gapic::Config::Method] + # + attr_reader :create_endpoint + ## + # RPC-specific configuration for `list_endpoints` + # @return [::Gapic::Config::Method] + # + attr_reader :list_endpoints + ## + # RPC-specific configuration for `get_endpoint` + # @return [::Gapic::Config::Method] + # + attr_reader :get_endpoint + ## + # RPC-specific configuration for `update_endpoint` + # @return [::Gapic::Config::Method] + # + attr_reader :update_endpoint + ## + # RPC-specific configuration for `delete_endpoint` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_endpoint + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + create_namespace_config = parent_rpcs.create_namespace if parent_rpcs.respond_to? :create_namespace + @create_namespace = ::Gapic::Config::Method.new create_namespace_config + list_namespaces_config = parent_rpcs.list_namespaces if parent_rpcs.respond_to? :list_namespaces + @list_namespaces = ::Gapic::Config::Method.new list_namespaces_config + get_namespace_config = parent_rpcs.get_namespace if parent_rpcs.respond_to? :get_namespace + @get_namespace = ::Gapic::Config::Method.new get_namespace_config + update_namespace_config = parent_rpcs.update_namespace if parent_rpcs.respond_to? :update_namespace + @update_namespace = ::Gapic::Config::Method.new update_namespace_config + delete_namespace_config = parent_rpcs.delete_namespace if parent_rpcs.respond_to? :delete_namespace + @delete_namespace = ::Gapic::Config::Method.new delete_namespace_config + create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service + @create_service = ::Gapic::Config::Method.new create_service_config + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service + @update_service = ::Gapic::Config::Method.new update_service_config + delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service + @delete_service = ::Gapic::Config::Method.new delete_service_config + create_endpoint_config = parent_rpcs.create_endpoint if parent_rpcs.respond_to? :create_endpoint + @create_endpoint = ::Gapic::Config::Method.new create_endpoint_config + list_endpoints_config = parent_rpcs.list_endpoints if parent_rpcs.respond_to? :list_endpoints + @list_endpoints = ::Gapic::Config::Method.new list_endpoints_config + get_endpoint_config = parent_rpcs.get_endpoint if parent_rpcs.respond_to? :get_endpoint + @get_endpoint = ::Gapic::Config::Method.new get_endpoint_config + update_endpoint_config = parent_rpcs.update_endpoint if parent_rpcs.respond_to? :update_endpoint + @update_endpoint = ::Gapic::Config::Method.new update_endpoint_config + delete_endpoint_config = parent_rpcs.delete_endpoint if parent_rpcs.respond_to? :delete_endpoint + @delete_endpoint = ::Gapic::Config::Method.new delete_endpoint_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb new file mode 100644 index 000000000000..c4fcd4b792c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb @@ -0,0 +1,1236 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/servicedirectory/v1beta1/registration_service_pb" + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module RegistrationService + module Rest + ## + # REST service stub for the RegistrationService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_namespace REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # A result object deserialized from the server's reply + def create_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_namespace_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_namespaces REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse] + # A result object deserialized from the server's reply + def list_namespaces request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_namespaces_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_namespaces", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_namespace REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # A result object deserialized from the server's reply + def get_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_namespace_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_namespace REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # A result object deserialized from the server's reply + def update_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_namespace_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_namespace REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_namespace_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_service REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # A result object deserialized from the server's reply + def create_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_services REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse] + # A result object deserialized from the server's reply + def list_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_service REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # A result object deserialized from the server's reply + def get_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_service REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # A result object deserialized from the server's reply + def update_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_service REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_endpoint REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # A result object deserialized from the server's reply + def create_endpoint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_endpoint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_endpoint", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_endpoints REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse] + # A result object deserialized from the server's reply + def list_endpoints request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_endpoints_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_endpoints", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_endpoint REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # A result object deserialized from the server's reply + def get_endpoint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_endpoint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_endpoint", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_endpoint REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # A result object deserialized from the server's reply + def update_endpoint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_endpoint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_endpoint", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_endpoint REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_endpoint request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_endpoint_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_endpoint", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_namespace REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/namespaces", + body: "namespace", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_namespaces REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_namespaces_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/namespaces", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_namespace REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_namespace REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{namespace.name}", + body: "namespace", + matches: [ + ["namespace.name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_namespace REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/services", + body: "service", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_services REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/services", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_service REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{service.name}", + body: "service", + matches: [ + ["service.name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_endpoint REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_endpoint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/endpoints", + body: "endpoint", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_endpoints REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_endpoints_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/endpoints", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_endpoint REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_endpoint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_endpoint REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_endpoint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta1/{endpoint.name}", + body: "endpoint", + matches: [ + ["endpoint.name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_endpoint REST call + # + # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_endpoint_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.rb new file mode 100644 index 000000000000..134b4ad50df3 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/service_directory/v1beta1/lookup_service/rest" +require "google/cloud/service_directory/v1beta1/registration_service/rest" +require "google/cloud/service_directory/v1beta1/bindings_override" +require "google/cloud/service_directory/v1beta1/version" + +module Google + module Cloud + module ServiceDirectory + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/service_directory/v1beta1/rest" + # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new + # + module V1beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/version.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/version.rb new file mode 100644 index 000000000000..36b1b4ea06f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/endpoint_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/endpoint_pb.rb new file mode 100644 index 000000000000..cfaf5542a650 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/endpoint_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/servicedirectory/v1beta1/endpoint.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/servicedirectory/v1beta1/endpoint.proto\x12%google.cloud.servicedirectory.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x04\n\x08\x45ndpoint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04port\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12T\n\x08metadata\x18\x04 \x03(\x0b\x32=.google.cloud.servicedirectory.v1beta1.Endpoint.MetadataEntryB\x03\xe0\x41\x01\x12@\n\x07network\x18\x05 \x01(\tB/\xe0\x41\x05\xfa\x41)\n\'servicedirectory.googleapis.com/Network\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x96\x01\xea\x41\x92\x01\n(servicedirectory.googleapis.com/Endpoint\x12\x66projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint}B\xf2\x02\n)com.google.cloud.servicedirectory.v1beta1B\rEndpointProtoP\x01ZUcloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb;servicedirectorypb\xaa\x02%Google.Cloud.ServiceDirectory.V1Beta1\xca\x02%Google\\Cloud\\ServiceDirectory\\V1beta1\xea\x02(Google::Cloud::ServiceDirectory::V1beta1\xea\x41\x61\n\'servicedirectory.googleapis.com/Network\x12\x36projects/{project}/locations/global/networks/{network}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + Endpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.Endpoint").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_pb.rb new file mode 100644 index 000000000000..02a971e3be35 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/servicedirectory/v1beta1/lookup_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/servicedirectory/v1beta1/service_pb' + + +descriptor_data = "\n:google/cloud/servicedirectory/v1beta1/lookup_service.proto\x12%google.cloud.servicedirectory.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/servicedirectory/v1beta1/service.proto\"\x90\x01\n\x15ResolveServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x1a\n\rmax_endpoints\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x65ndpoint_filter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Y\n\x16ResolveServiceResponse\x12?\n\x07service\x18\x01 \x01(\x0b\x32..google.cloud.servicedirectory.v1beta1.Service2\xc7\x02\n\rLookupService\x12\xe0\x01\n\x0eResolveService\x12<.google.cloud.servicedirectory.v1beta1.ResolveServiceRequest\x1a=.google.cloud.servicedirectory.v1beta1.ResolveServiceResponse\"Q\x82\xd3\xe4\x93\x02K\"F/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*}:resolve:\x01*\x1aS\xca\x41\x1fservicedirectory.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x93\x02\n)com.google.cloud.servicedirectory.v1beta1B\x12LookupServiceProtoP\x01ZUcloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb;servicedirectorypb\xaa\x02%Google.Cloud.ServiceDirectory.V1Beta1\xca\x02%Google\\Cloud\\ServiceDirectory\\V1beta1\xea\x02(Google::Cloud::ServiceDirectory::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + ResolveServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ResolveServiceRequest").msgclass + ResolveServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ResolveServiceResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb new file mode 100644 index 000000000000..dd25c43fecfb --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/servicedirectory/v1beta1/lookup_service.proto for package 'Google.Cloud.ServiceDirectory.V1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/servicedirectory/v1beta1/lookup_service_pb' + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module LookupService + # Service Directory API for looking up service data at runtime. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.servicedirectory.v1beta1.LookupService' + + # Returns a [service][google.cloud.servicedirectory.v1beta1.Service] and its + # associated endpoints. + # Resolving a service is not considered an active developer method. + rpc :ResolveService, ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/namespace_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/namespace_pb.rb new file mode 100644 index 000000000000..31939c1f5a8a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/namespace_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/servicedirectory/v1beta1/namespace.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/servicedirectory/v1beta1/namespace.proto\x12%google.cloud.servicedirectory.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8e\x03\n\tNamespace\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12Q\n\x06labels\x18\x02 \x03(\x0b\x32<.google.cloud.servicedirectory.v1beta1.Namespace.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n)servicedirectory.googleapis.com/Namespace\x12>projects/{project}/locations/{location}/namespaces/{namespace}B\x8f\x02\n)com.google.cloud.servicedirectory.v1beta1B\x0eNamespaceProtoP\x01ZUcloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb;servicedirectorypb\xaa\x02%Google.Cloud.ServiceDirectory.V1Beta1\xca\x02%Google\\Cloud\\ServiceDirectory\\V1beta1\xea\x02(Google::Cloud::ServiceDirectory::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + Namespace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.Namespace").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_pb.rb new file mode 100644 index 000000000000..a9424447815d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/servicedirectory/v1beta1/registration_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/servicedirectory/v1beta1/endpoint_pb' +require 'google/cloud/servicedirectory/v1beta1/namespace_pb' +require 'google/cloud/servicedirectory/v1beta1/service_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n@google/cloud/servicedirectory/v1beta1/registration_service.proto\x12%google.cloud.servicedirectory.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/servicedirectory/v1beta1/endpoint.proto\x1a\x35google/cloud/servicedirectory/v1beta1/namespace.proto\x1a\x33google/cloud/servicedirectory/v1beta1/service.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb8\x01\n\x16\x43reateNamespaceRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x19\n\x0cnamespace_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\tnamespace\x18\x03 \x01(\x0b\x32\x30.google.cloud.servicedirectory.v1beta1.NamespaceB\x03\xe0\x41\x02\"\xaf\x01\n\x15ListNamespacesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"w\n\x16ListNamespacesResponse\x12\x44\n\nnamespaces\x18\x01 \x03(\x0b\x32\x30.google.cloud.servicedirectory.v1beta1.Namespace\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x13GetNamespaceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)servicedirectory.googleapis.com/Namespace\"\x98\x01\n\x16UpdateNamespaceRequest\x12H\n\tnamespace\x18\x01 \x01(\x0b\x32\x30.google.cloud.servicedirectory.v1beta1.NamespaceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"Y\n\x16\x44\x65leteNamespaceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)servicedirectory.googleapis.com/Namespace\"\xb8\x01\n\x14\x43reateServiceRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)servicedirectory.googleapis.com/Namespace\x12\x17\n\nservice_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x07service\x18\x03 \x01(\x0b\x32..google.cloud.servicedirectory.v1beta1.ServiceB\x03\xe0\x41\x02\"\xb5\x01\n\x13ListServicesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)servicedirectory.googleapis.com/Namespace\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"q\n\x14ListServicesResponse\x12@\n\x08services\x18\x01 \x03(\x0b\x32..google.cloud.servicedirectory.v1beta1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x11GetServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\x92\x01\n\x14UpdateServiceRequest\x12\x44\n\x07service\x18\x01 \x01(\x0b\x32..google.cloud.servicedirectory.v1beta1.ServiceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"U\n\x14\x44\x65leteServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\xba\x01\n\x15\x43reateEndpointRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x18\n\x0b\x65ndpoint_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x08\x65ndpoint\x18\x03 \x01(\x0b\x32/.google.cloud.servicedirectory.v1beta1.EndpointB\x03\xe0\x41\x02\"\xb4\x01\n\x14ListEndpointsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"t\n\x15ListEndpointsResponse\x12\x42\n\tendpoints\x18\x01 \x03(\x0b\x32/.google.cloud.servicedirectory.v1beta1.Endpoint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"T\n\x12GetEndpointRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(servicedirectory.googleapis.com/Endpoint\"\x95\x01\n\x15UpdateEndpointRequest\x12\x46\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32/.google.cloud.servicedirectory.v1beta1.EndpointB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"W\n\x15\x44\x65leteEndpointRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(servicedirectory.googleapis.com/Endpoint2\xda\"\n\x13RegistrationService\x12\xea\x01\n\x0f\x43reateNamespace\x12=.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest\x1a\x30.google.cloud.servicedirectory.v1beta1.Namespace\"f\xda\x41\x1dparent,namespace,namespace_id\x82\xd3\xe4\x93\x02@\"3/v1beta1/{parent=projects/*/locations/*}/namespaces:\tnamespace\x12\xd3\x01\n\x0eListNamespaces\x12<.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest\x1a=.google.cloud.servicedirectory.v1beta1.ListNamespacesResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1beta1/{parent=projects/*/locations/*}/namespaces\x12\xc0\x01\n\x0cGetNamespace\x12:.google.cloud.servicedirectory.v1beta1.GetNamespaceRequest\x1a\x30.google.cloud.servicedirectory.v1beta1.Namespace\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1beta1/{name=projects/*/locations/*/namespaces/*}\x12\xec\x01\n\x0fUpdateNamespace\x12=.google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest\x1a\x30.google.cloud.servicedirectory.v1beta1.Namespace\"h\xda\x41\x15namespace,update_mask\x82\xd3\xe4\x93\x02J2=/v1beta1/{namespace.name=projects/*/locations/*/namespaces/*}:\tnamespace\x12\xac\x01\n\x0f\x44\x65leteNamespace\x12=.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1beta1/{name=projects/*/locations/*/namespaces/*}\x12\xe9\x01\n\rCreateService\x12;.google.cloud.servicedirectory.v1beta1.CreateServiceRequest\x1a..google.cloud.servicedirectory.v1beta1.Service\"k\xda\x41\x19parent,service,service_id\x82\xd3\xe4\x93\x02I\">/v1beta1/{parent=projects/*/locations/*/namespaces/*}/services:\x07service\x12\xd8\x01\n\x0cListServices\x12:.google.cloud.servicedirectory.v1beta1.ListServicesRequest\x1a;.google.cloud.servicedirectory.v1beta1.ListServicesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1beta1/{parent=projects/*/locations/*/namespaces/*}/services\x12\xc5\x01\n\nGetService\x12\x38.google.cloud.servicedirectory.v1beta1.GetServiceRequest\x1a..google.cloud.servicedirectory.v1beta1.Service\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*}\x12\xeb\x01\n\rUpdateService\x12;.google.cloud.servicedirectory.v1beta1.UpdateServiceRequest\x1a..google.cloud.servicedirectory.v1beta1.Service\"m\xda\x41\x13service,update_mask\x82\xd3\xe4\x93\x02Q2F/v1beta1/{service.name=projects/*/locations/*/namespaces/*/services/*}:\x07service\x12\xb3\x01\n\rDeleteService\x12;.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*}\x12\xfb\x01\n\x0e\x43reateEndpoint\x12<.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest\x1a/.google.cloud.servicedirectory.v1beta1.Endpoint\"z\xda\x41\x1bparent,endpoint,endpoint_id\x82\xd3\xe4\x93\x02V\"J/v1beta1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints:\x08\x65ndpoint\x12\xe7\x01\n\rListEndpoints\x12;.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest\x1a<.google.cloud.servicedirectory.v1beta1.ListEndpointsResponse\"[\xda\x41\x06parent\x82\xd3\xe4\x93\x02L\x12J/v1beta1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints\x12\xd4\x01\n\x0bGetEndpoint\x12\x39.google.cloud.servicedirectory.v1beta1.GetEndpointRequest\x1a/.google.cloud.servicedirectory.v1beta1.Endpoint\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}\x12\xfd\x01\n\x0eUpdateEndpoint\x12<.google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest\x1a/.google.cloud.servicedirectory.v1beta1.Endpoint\"|\xda\x41\x14\x65ndpoint,update_mask\x82\xd3\xe4\x93\x02_2S/v1beta1/{endpoint.name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}:\x08\x65ndpoint\x12\xc1\x01\n\x0e\x44\x65leteEndpoint\x12<.google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L*J/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}\x12\xc9\x02\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xfd\x01\x82\xd3\xe4\x93\x02\xf6\x01\"D/v1beta1/{resource=projects/*/locations/*/namespaces/*}:getIamPolicy:\x01*ZT\"O/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:getIamPolicy:\x01*ZU\"P/v1beta1/{resource=projects/*/locations/*/namespaces/*/workloads/*}:getIamPolicy:\x01*\x12\xc9\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xfd\x01\x82\xd3\xe4\x93\x02\xf6\x01\"D/v1beta1/{resource=projects/*/locations/*/namespaces/*}:setIamPolicy:\x01*ZT\"O/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:setIamPolicy:\x01*ZU\"P/v1beta1/{resource=projects/*/locations/*/namespaces/*/workloads/*}:setIamPolicy:\x01*\x12\xfb\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\x8f\x02\x82\xd3\xe4\x93\x02\x88\x02\"J/v1beta1/{resource=projects/*/locations/*/namespaces/*}:testIamPermissions:\x01*ZZ\"U/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:testIamPermissions:\x01*Z[\"V/v1beta1/{resource=projects/*/locations/*/namespaces/*/workloads/*}:testIamPermissions:\x01*\x1aS\xca\x41\x1fservicedirectory.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x02\n)com.google.cloud.servicedirectory.v1beta1B\x18RegistrationServiceProtoP\x01ZUcloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb;servicedirectorypb\xaa\x02%Google.Cloud.ServiceDirectory.V1Beta1\xca\x02%Google\\Cloud\\ServiceDirectory\\V1beta1\xea\x02(Google::Cloud::ServiceDirectory::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + CreateNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest").msgclass + ListNamespacesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListNamespacesRequest").msgclass + ListNamespacesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListNamespacesResponse").msgclass + GetNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.GetNamespaceRequest").msgclass + UpdateNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest").msgclass + DeleteNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest").msgclass + CreateServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.CreateServiceRequest").msgclass + ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListServicesRequest").msgclass + ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListServicesResponse").msgclass + GetServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.GetServiceRequest").msgclass + UpdateServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.UpdateServiceRequest").msgclass + DeleteServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.DeleteServiceRequest").msgclass + CreateEndpointRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.CreateEndpointRequest").msgclass + ListEndpointsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListEndpointsRequest").msgclass + ListEndpointsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListEndpointsResponse").msgclass + GetEndpointRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.GetEndpointRequest").msgclass + UpdateEndpointRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest").msgclass + DeleteEndpointRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb new file mode 100644 index 000000000000..062c769d7350 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb @@ -0,0 +1,96 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/servicedirectory/v1beta1/registration_service.proto for package 'Google.Cloud.ServiceDirectory.V1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/servicedirectory/v1beta1/registration_service_pb' + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + module RegistrationService + # Service Directory API for registering services. It defines the following + # resource model: + # + # - The API has a collection of + # [Namespace][google.cloud.servicedirectory.v1beta1.Namespace] + # resources, named `projects/*/locations/*/namespaces/*`. + # + # - Each Namespace has a collection of + # [Service][google.cloud.servicedirectory.v1beta1.Service] resources, named + # `projects/*/locations/*/namespaces/*/services/*`. + # + # - Each Service has a collection of + # [Endpoint][google.cloud.servicedirectory.v1beta1.Endpoint] + # resources, named + # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.servicedirectory.v1beta1.RegistrationService' + + # Creates a namespace, and returns the new namespace. + rpc :CreateNamespace, ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Namespace + # Lists all namespaces. + rpc :ListNamespaces, ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest, ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse + # Gets a namespace. + rpc :GetNamespace, ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Namespace + # Updates a namespace. + rpc :UpdateNamespace, ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Namespace + # Deletes a namespace. This also deletes all services and endpoints in + # the namespace. + rpc :DeleteNamespace, ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest, ::Google::Protobuf::Empty + # Creates a service, and returns the new service. + rpc :CreateService, ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Service + # Lists all services belonging to a namespace. + rpc :ListServices, ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest, ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse + # Gets a service. + rpc :GetService, ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Service + # Updates a service. + rpc :UpdateService, ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Service + # Deletes a service. This also deletes all endpoints associated with + # the service. + rpc :DeleteService, ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest, ::Google::Protobuf::Empty + # Creates an endpoint, and returns the new endpoint. + rpc :CreateEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint + # Lists all endpoints. + rpc :ListEndpoints, ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest, ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse + # Gets an endpoint. + rpc :GetEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint + # Updates an endpoint. + rpc :UpdateEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint + # Deletes an endpoint. + rpc :DeleteEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest, ::Google::Protobuf::Empty + # Gets the IAM Policy for a resource + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the IAM Policy for a resource + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Tests IAM permissions for a resource (namespace, service or + # service workload only). + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/service_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/service_pb.rb new file mode 100644 index 000000000000..9a7d25ed4376 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/service_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/servicedirectory/v1beta1/service.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/servicedirectory/v1beta1/endpoint_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/servicedirectory/v1beta1/service.proto\x12%google.cloud.servicedirectory.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/servicedirectory/v1beta1/endpoint.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xea\x03\n\x07Service\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12S\n\x08metadata\x18\x02 \x03(\x0b\x32<.google.cloud.servicedirectory.v1beta1.Service.MetadataEntryB\x03\xe0\x41\x01\x12G\n\tendpoints\x18\x03 \x03(\x0b\x32/.google.cloud.servicedirectory.v1beta1.EndpointB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x7f\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}B\x8d\x02\n)com.google.cloud.servicedirectory.v1beta1B\x0cServiceProtoP\x01ZUcloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb;servicedirectorypb\xaa\x02%Google.Cloud.ServiceDirectory.V1Beta1\xca\x02%Google\\Cloud\\ServiceDirectory\\V1beta1\xea\x02(Google::Cloud::ServiceDirectory::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.Service").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..93d67c3e7936 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Service Directory V1beta1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb new file mode 100644 index 000000000000..711458f230d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + # An individual endpoint that provides a + # {::Google::Cloud::ServiceDirectory::V1beta1::Service service}. The service must + # already exist to create an endpoint. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name for the endpoint in the format + # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. + # @!attribute [rw] address + # @return [::String] + # Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses + # like: + # + # * `8.8.8` + # * `8.8.8.8:53` + # * `test:bad:address` + # * `[::1]` + # * `[::1]:8080` + # + # Limited to 45 characters. + # @!attribute [rw] port + # @return [::Integer] + # Optional. Service Directory rejects values outside of `[0, 65535]`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Metadata for the endpoint. This data can be consumed by service + # clients. + # + # Restrictions: + # + # * The entire metadata dictionary may contain up to 512 characters, + # spread accoss all key-value pairs. Metadata that goes beyond this + # limit are rejected + # * Valid metadata keys have two segments: an optional prefix and name, + # separated by a slash (/). The name segment is required and must be 63 + # characters or less, beginning and ending with an alphanumeric character + # ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and + # alphanumerics between. The prefix is optional. If specified, the prefix + # must be a DNS subdomain: a series of DNS labels separated by dots (.), + # not longer than 253 characters in total, followed by a slash (/). + # Metadata that fails to meet these requirements are rejected + # + # Note: This field is equivalent to the `annotations` field in the v1 API. + # They have the same syntax and read/write to the same location in Service + # Directory. + # @!attribute [rw] network + # @return [::String] + # Immutable. The Google Compute Engine network (VPC) of the endpoint in the + # format `projects//locations/global/networks/*`. + # + # The project must be specified by project number (project id is rejected). + # Incorrectly formatted networks are rejected, but no other validation + # is performed on this field (ex. network or project existence, reachability, + # or permissions). + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the endpoint was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the endpoint was last updated. + # @!attribute [r] uid + # @return [::String] + # Output only. A globally unique identifier (in UUID4 format) for this + # endpoint. + class Endpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb new file mode 100644 index 000000000000..14fcc99f8faa --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb @@ -0,0 +1,89 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service LookupService.ResolveService}. + # Looks up a service by its name, returns the service and its endpoints. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the service to resolve. + # @!attribute [rw] max_endpoints + # @return [::Integer] + # Optional. The maximum number of endpoints to return. Defaults to 25. + # Maximum is 100. If a value less than one is specified, the Default is used. + # If a value greater than the Maximum is specified, the Maximum is used. + # @!attribute [rw] endpoint_filter + # @return [::String] + # Optional. The filter applied to the endpoints of the resolved service. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name`, `address`, `port`, or `metadata.` for + # map field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `metadata.owner` returns endpoints that have a annotation with the key + # `owner`, this is the same as `metadata:owner` + # * `metadata.protocol=gRPC` returns endpoints that have key/value + # `protocol=gRPC` + # * `address=192.108.1.105` returns endpoints that have this address + # * `port>8080` returns endpoints that have port number larger than 8080 + # * + # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` + # returns endpoints that have name that is alphabetically later than the + # string, so "endpoint-e" is returned but "endpoint-a" is not + # * + # `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` + # returns the endpoint that has an endpoint_id equal to `ep-1` + # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have + # `owner` in annotation key but value is not `sd` AND have key/value + # `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint + # doesn't have a field called "doesnotexist". Since the filter does not + # match any endpoint, it returns no results + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + class ResolveServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service LookupService.ResolveService}. + # @!attribute [rw] service + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + class ResolveServiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb new file mode 100644 index 000000000000..ccb58df1f634 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + # A container for {::Google::Cloud::ServiceDirectory::V1beta1::Service services}. + # Namespaces allow administrators to group services together and define + # permissions for a collection of services. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name for the namespace in the format + # `projects/*/locations/*/namespaces/*`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels associated with this namespace. + # No more than 64 user labels can be associated with a given resource. Label + # keys and values can be no longer than 63 characters. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the namespace was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the namespace was last updated. + # @!attribute [r] uid + # @return [::String] + # Output only. A globally unique identifier (in UUID4 format) for this + # namespace. + class Namespace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb new file mode 100644 index 000000000000..6db231e8d14a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb @@ -0,0 +1,432 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_namespace RegistrationService.CreateNamespace}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project and location the namespace + # will be created in. + # @!attribute [rw] namespace_id + # @return [::String] + # Required. The Resource ID must be 1-63 characters long, and comply with + # RFC1035. + # Specifically, the name must be 1-63 characters long and match the regular + # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + # character must be a lowercase letter, and all following characters must + # be a dash, lowercase letter, or digit, except the last character, which + # cannot be a dash. + # @!attribute [rw] namespace + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # Required. A namespace with initial fields set. + class CreateNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_namespaces RegistrationService.ListNamespaces}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project and location whose namespaces + # you'd like to list. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. The default value is 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to list results by. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name`, `labels.` for map field, or + # `attributes.` for attributes field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `labels.owner` returns namespaces that have a label with the key + # `owner`, this is the same as `labels:owner` + # * `labels.owner=sd` returns namespaces that have key/value `owner=sd` + # * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` + # returns namespaces that have name that is alphabetically later than the + # string, so "namespace-e" is returned but "namespace-a" is not + # * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have + # `owner` in label key but value is not `sd` AND have key/value `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that namespace + # doesn't have a field called "doesnotexist". Since the filter does not + # match any namespaces, it returns no results + # * `attributes.managed_registration=true` returns namespaces that are + # managed by a GCP product or service + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. The order to list results by. + # + # General `order_by` string syntax: ` () (,)` + # + # * `` allows value: `name` + # * `` ascending or descending order by ``. If this is + # left blank, `asc` is used + # + # Note that an empty `order_by` string results in default order, which is + # order by `name` in ascending order. + class ListNamespacesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_namespaces RegistrationService.ListNamespaces}. + # @!attribute [rw] namespaces + # @return [::Array<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>] + # The list of namespaces. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class ListNamespacesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_namespace RegistrationService.GetNamespace}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the namespace to retrieve. + class GetNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_namespace RegistrationService.UpdateNamespace}. + # @!attribute [rw] namespace + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] + # Required. The updated namespace. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields to be updated in this request. + class UpdateNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_namespace RegistrationService.DeleteNamespace}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the namespace to delete. + class DeleteNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_service RegistrationService.CreateService}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the namespace this service will belong to. + # @!attribute [rw] service_id + # @return [::String] + # Required. The Resource ID must be 1-63 characters long, and comply with + # RFC1035. + # Specifically, the name must be 1-63 characters long and match the regular + # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + # character must be a lowercase letter, and all following characters must + # be a dash, lowercase letter, or digit, except the last character, which + # cannot be a dash. + # @!attribute [rw] service + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # Required. A service with initial fields set. + class CreateServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_services RegistrationService.ListServices}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the namespace whose services you'd + # like to list. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. The default value is 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to list results by. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name` or `metadata.` for map field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `metadata.owner` returns services that have a metadata with the key + # `owner`, this is the same as `metadata:owner` + # * `metadata.protocol=gRPC` returns services that have key/value + # `protocol=gRPC` + # * + # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` + # returns services that have name that is alphabetically later than the + # string, so "service-e" is returned but "service-a" is not + # * `metadata.owner!=sd AND metadata.foo=bar` returns services that have + # `owner` in metadata key but value is not `sd` AND have key/value + # `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that service + # doesn't have a field called "doesnotexist". Since the filter does not + # match any services, it returns no results + # * `attributes.managed_registration=true` returns services that are + # managed + # by a GCP product or service + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. The order to list results by. + # + # General `order_by` string syntax: ` () (,)` + # + # * `` allows value: `name` + # * `` ascending or descending order by ``. If this is + # left blank, `asc` is used + # + # Note that an empty `order_by` string results in default order, which is + # order by `name` in ascending order. + class ListServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_services RegistrationService.ListServices}. + # @!attribute [rw] services + # @return [::Array<::Google::Cloud::ServiceDirectory::V1beta1::Service>] + # The list of services. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class ListServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_service RegistrationService.GetService}. + # This should not be used for looking up a service. Instead, use the `resolve` + # method as it contains all endpoints and associated metadata. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the service to get. + class GetServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_service RegistrationService.UpdateService}. + # @!attribute [rw] service + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] + # Required. The updated service. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields to be updated in this request. + class UpdateServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_service RegistrationService.DeleteService}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the service to delete. + class DeleteServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_endpoint RegistrationService.CreateEndpoint}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the service that this endpoint provides. + # @!attribute [rw] endpoint_id + # @return [::String] + # Required. The Resource ID must be 1-63 characters long, and comply with + # RFC1035. + # Specifically, the name must be 1-63 characters long and match the regular + # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first + # character must be a lowercase letter, and all following characters must + # be a dash, lowercase letter, or digit, except the last character, which + # cannot be a dash. + # @!attribute [rw] endpoint + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # Required. A endpoint with initial fields set. + class CreateEndpointRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints RegistrationService.ListEndpoints}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the service whose endpoints you'd like to + # list. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. The default value is 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to list results by. + # + # General `filter` string syntax: + # ` ()` + # + # * `` can be `name`, `address`, `port`, `metadata.` for map + # field, or `attributes.` for attributes field + # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` + # means `HAS`, and is roughly the same as `=` + # * `` must be the same data type as field + # * `` can be `AND`, `OR`, `NOT` + # + # Examples of valid filters: + # + # * `metadata.owner` returns endpoints that have a metadata with the key + # `owner`, this is the same as `metadata:owner` + # * `metadata.protocol=gRPC` returns endpoints that have key/value + # `protocol=gRPC` + # * `address=192.108.1.105` returns endpoints that have this address + # * `port>8080` returns endpoints that have port number larger than 8080 + # * + # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` + # returns endpoints that have name that is alphabetically later than the + # string, so "endpoint-e" is returned but "endpoint-a" is not + # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have + # `owner` in metadata key but value is not `sd` AND have key/value + # `foo=bar` + # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint + # doesn't have a field called "doesnotexist". Since the filter does not + # match any endpoints, it returns no results + # * `attributes.kubernetes_resource_type=KUBERNETES_RESOURCE_TYPE_CLUSTER_ + # IP` returns endpoints with the corresponding kubernetes_resource_type + # + # For more information about filtering, see + # [API Filtering](https://aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. The order to list results by. + # + # General `order_by` string syntax: ` () (,)` + # + # * `` allows values: `name`, `address`, `port` + # * `` ascending or descending order by ``. If this is + # left blank, `asc` is used + # + # Note that an empty `order_by` string results in default order, which is + # order by `name` in ascending order. + class ListEndpointsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints RegistrationService.ListEndpoints}. + # @!attribute [rw] endpoints + # @return [::Array<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] + # The list of endpoints. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class ListEndpointsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_endpoint RegistrationService.GetEndpoint}. + # This should not be used to lookup endpoints at runtime. Instead, use + # the `resolve` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the endpoint to get. + class GetEndpointRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_endpoint RegistrationService.UpdateEndpoint}. + # @!attribute [rw] endpoint + # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] + # Required. The updated endpoint. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. List of fields to be updated in this request. + class UpdateEndpointRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_endpoint RegistrationService.DeleteEndpoint}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the endpoint to delete. + class DeleteEndpointRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb new file mode 100644 index 000000000000..0f5ce424212a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceDirectory + module V1beta1 + # An individual service. A service contains a name and optional metadata. + # A service must exist before + # {::Google::Cloud::ServiceDirectory::V1beta1::Endpoint endpoints} can be + # added to it. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name for the service in the format + # `projects/*/locations/*/namespaces/*/services/*`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Metadata for the service. This data can be consumed by service + # clients. + # + # Restrictions: + # + # * The entire metadata dictionary may contain up to 2000 characters, + # spread accoss all key-value pairs. Metadata that goes beyond this + # limit are rejected + # * Valid metadata keys have two segments: an optional prefix and name, + # separated by a slash (/). The name segment is required and must be 63 + # characters or less, beginning and ending with an alphanumeric character + # ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and + # alphanumerics between. The prefix is optional. If specified, the prefix + # must be a DNS subdomain: a series of DNS labels separated by dots (.), + # not longer than 253 characters in total, followed by a slash (/). + # Metadata that fails to meet these requirements are rejected + # + # Note: This field is equivalent to the `annotations` field in the v1 API. + # They have the same syntax and read/write to the same location in Service + # Directory. + # @!attribute [r] endpoints + # @return [::Array<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] + # Output only. Endpoints associated with this service. Returned on + # {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service LookupService.ResolveService}. + # Control plane clients should use + # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints RegistrationService.ListEndpoints}. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the service was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the service was last updated. Note: + # endpoints being created/deleted/updated within the service are not + # considered service updates for the purpose of this timestamp. + # @!attribute [r] uid + # @return [::String] + # Output only. A globally unique identifier (in UUID4 format) for this + # service. + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..97414f0ec896 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-service_directory-v1beta1", path: "../" +else + gem "google-cloud-service_directory-v1beta1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/lookup_service/resolve_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/lookup_service/resolve_service.rb new file mode 100644 index 000000000000..d71eb3c1791d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/lookup_service/resolve_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_LookupService_ResolveService_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the resolve_service call in the LookupService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service. +# +def resolve_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new + + # Call the resolve_service method. + result = client.resolve_service request + + # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse. + p result +end +# [END servicedirectory_v1beta1_generated_LookupService_ResolveService_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_endpoint.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_endpoint.rb new file mode 100644 index 000000000000..3e2ad8dfb2e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_endpoint.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the create_endpoint call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_endpoint. +# +def create_endpoint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new + + # Call the create_endpoint method. + result = client.create_endpoint request + + # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_namespace.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_namespace.rb new file mode 100644 index 000000000000..ec054cee82d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_namespace.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the create_namespace call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_namespace. +# +def create_namespace + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new + + # Call the create_namespace method. + result = client.create_namespace request + + # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_service.rb new file mode 100644 index 000000000000..25d40b538366 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_CreateService_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the create_service call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_service. +# +def create_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new + + # Call the create_service method. + result = client.create_service request + + # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_CreateService_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_endpoint.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_endpoint.rb new file mode 100644 index 000000000000..a0f9e22f857a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_endpoint.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the delete_endpoint call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_endpoint. +# +def delete_endpoint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new + + # Call the delete_endpoint method. + result = client.delete_endpoint request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_namespace.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_namespace.rb new file mode 100644 index 000000000000..6571a245cbe3 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_namespace.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the delete_namespace call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_namespace. +# +def delete_namespace + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new + + # Call the delete_namespace method. + result = client.delete_namespace request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_service.rb new file mode 100644 index 000000000000..d078459a4702 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteService_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the delete_service call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_service. +# +def delete_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new + + # Call the delete_service method. + result = client.delete_service request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteService_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_endpoint.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_endpoint.rb new file mode 100644 index 000000000000..54ec62254a8f --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_endpoint.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the get_endpoint call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_endpoint. +# +def get_endpoint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new + + # Call the get_endpoint method. + result = client.get_endpoint request + + # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_iam_policy.rb new file mode 100644 index 000000000000..6c93e204b20f --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the get_iam_policy call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_namespace.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_namespace.rb new file mode 100644 index 000000000000..5050a16a6530 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_namespace.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the get_namespace call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_namespace. +# +def get_namespace + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new + + # Call the get_namespace method. + result = client.get_namespace request + + # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_service.rb new file mode 100644 index 000000000000..275196ffb4e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_GetService_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the get_service call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_service. +# +def get_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new + + # Call the get_service method. + result = client.get_service request + + # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_GetService_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_endpoints.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_endpoints.rb new file mode 100644 index 000000000000..4793441f9ebf --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_endpoints.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the list_endpoints call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints. +# +def list_endpoints + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new + + # Call the list_endpoints method. + result = client.list_endpoints request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + p item + end +end +# [END servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_namespaces.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_namespaces.rb new file mode 100644 index 000000000000..28f67143a5f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_namespaces.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the list_namespaces call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_namespaces. +# +def list_namespaces + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new + + # Call the list_namespaces method. + result = client.list_namespaces request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Namespace. + p item + end +end +# [END servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_services.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_services.rb new file mode 100644 index 000000000000..feec94510bd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_ListServices_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the list_services call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_services. +# +def list_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new + + # Call the list_services method. + result = client.list_services request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Service. + p item + end +end +# [END servicedirectory_v1beta1_generated_RegistrationService_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/set_iam_policy.rb new file mode 100644 index 000000000000..fa2aa1005639 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the set_iam_policy call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.rb new file mode 100644 index 000000000000..acb3050b1c96 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the test_iam_permissions call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_endpoint.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_endpoint.rb new file mode 100644 index 000000000000..43c96f11aaef --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_endpoint.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the update_endpoint call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_endpoint. +# +def update_endpoint + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new + + # Call the update_endpoint method. + result = client.update_endpoint request + + # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_namespace.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_namespace.rb new file mode 100644 index 000000000000..6e2d2ebcd57f --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_namespace.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the update_namespace call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_namespace. +# +def update_namespace + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new + + # Call the update_namespace method. + result = client.update_namespace request + + # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_service.rb new file mode 100644 index 000000000000..bd7b63693a51 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateService_sync] +require "google/cloud/service_directory/v1beta1" + +## +# Snippet for the update_service call in the RegistrationService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_service. +# +def update_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new + + # Call the update_service method. + result = client.update_service request + + # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. + p result +end +# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateService_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/snippet_metadata_google.cloud.servicedirectory.v1beta1.json b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/snippet_metadata_google.cloud.servicedirectory.v1beta1.json new file mode 100644 index 000000000000..3d9a66c9a57a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/snippet_metadata_google.cloud.servicedirectory.v1beta1.json @@ -0,0 +1,775 @@ +{ + "client_library": { + "name": "google-cloud-service_directory-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.servicedirectory.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "servicedirectory_v1beta1_generated_LookupService_ResolveService_sync", + "title": "Snippet for the resolve_service call in the LookupService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service.", + "file": "lookup_service/resolve_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "resolve_service", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse", + "client": { + "short_name": "LookupService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client" + }, + "method": { + "short_name": "ResolveService", + "full_name": "google.cloud.servicedirectory.v1beta1.LookupService.ResolveService", + "service": { + "short_name": "LookupService", + "full_name": "google.cloud.servicedirectory.v1beta1.LookupService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_sync", + "title": "Snippet for the create_namespace call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_namespace.", + "file": "registration_service/create_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_namespace", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Namespace", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "CreateNamespace", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.CreateNamespace", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_sync", + "title": "Snippet for the list_namespaces call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_namespaces.", + "file": "registration_service/list_namespaces.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_namespaces", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_namespaces", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "ListNamespaces", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.ListNamespaces", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_sync", + "title": "Snippet for the get_namespace call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_namespace.", + "file": "registration_service/get_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_namespace", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Namespace", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "GetNamespace", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.GetNamespace", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_sync", + "title": "Snippet for the update_namespace call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_namespace.", + "file": "registration_service/update_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_namespace", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Namespace", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "UpdateNamespace", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateNamespace", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_sync", + "title": "Snippet for the delete_namespace call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_namespace.", + "file": "registration_service/delete_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_namespace", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "DeleteNamespace", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteNamespace", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_CreateService_sync", + "title": "Snippet for the create_service call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_service.", + "file": "registration_service/create_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Service", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "CreateService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.CreateService", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_ListServices_sync", + "title": "Snippet for the list_services call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_services.", + "file": "registration_service/list_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_services", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "ListServices", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.ListServices", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_GetService_sync", + "title": "Snippet for the get_service call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_service.", + "file": "registration_service/get_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Service", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "GetService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.GetService", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateService_sync", + "title": "Snippet for the update_service call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_service.", + "file": "registration_service/update_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_service", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Service", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "UpdateService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateService", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteService_sync", + "title": "Snippet for the delete_service call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_service.", + "file": "registration_service/delete_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "DeleteService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteService", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_sync", + "title": "Snippet for the create_endpoint call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_endpoint.", + "file": "registration_service/create_endpoint.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_endpoint", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_endpoint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Endpoint", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "CreateEndpoint", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.CreateEndpoint", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_sync", + "title": "Snippet for the list_endpoints call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints.", + "file": "registration_service/list_endpoints.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_endpoints", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "ListEndpoints", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_sync", + "title": "Snippet for the get_endpoint call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_endpoint.", + "file": "registration_service/get_endpoint.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_endpoint", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_endpoint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Endpoint", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "GetEndpoint", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.GetEndpoint", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_sync", + "title": "Snippet for the update_endpoint call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_endpoint.", + "file": "registration_service/update_endpoint.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_endpoint", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_endpoint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Endpoint", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "UpdateEndpoint", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateEndpoint", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_sync", + "title": "Snippet for the delete_endpoint call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_endpoint.", + "file": "registration_service/delete_endpoint.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_endpoint", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_endpoint", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "DeleteEndpoint", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteEndpoint", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_iam_policy.", + "file": "registration_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.GetIamPolicy", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#set_iam_policy.", + "file": "registration_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.SetIamPolicy", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the RegistrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#test_iam_permissions.", + "file": "registration_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "RegistrationService::Client", + "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.TestIamPermissions", + "service": { + "short_name": "RegistrationService", + "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_test.rb new file mode 100644 index 000000000000..6353a46aff02 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/service_directory/v1beta1/lookup_service" + +class ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" + assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_test.rb new file mode 100644 index 000000000000..cf67bf538ccd --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_test.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/servicedirectory/v1beta1/lookup_service_pb" +require "google/cloud/service_directory/v1beta1/lookup_service/rest" + + +class ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_resolve_service + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + max_endpoints = 42 + endpoint_filter = "hello world" + + resolve_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::ServiceStub.stub :transcode_resolve_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, resolve_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.resolve_service({ name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.resolve_service name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.resolve_service ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new(name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.resolve_service({ name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.resolve_service(::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new(name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, resolve_service_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_test.rb new file mode 100644 index 000000000000..09d6d0129b7b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_test.rb @@ -0,0 +1,166 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/servicedirectory/v1beta1/lookup_service_pb" +require "google/cloud/service_directory/v1beta1/lookup_service" + +class ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_resolve_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + max_endpoints = 42 + endpoint_filter = "hello world" + + resolve_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resolve_service, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["max_endpoints"] + assert_equal "hello world", request["endpoint_filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, resolve_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.resolve_service({ name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.resolve_service name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.resolve_service ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new(name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.resolve_service({ name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.resolve_service(::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new(name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, resolve_service_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_test.rb new file mode 100644 index 000000000000..37f95cd118d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_test.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/service_directory/v1beta1/registration_service" + +class ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_endpoint_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.endpoint_path project: "value0", location: "value1", namespace: "value2", service: "value3", endpoint: "value4" + assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3/endpoints/value4", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_namespace_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.namespace_path project: "value0", location: "value1", namespace: "value2" + assert_equal "projects/value0/locations/value1/namespaces/value2", path + end + end + + def test_network_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_path project: "value0", network: "value1" + assert_equal "projects/value0/locations/global/networks/value1", path + end + end + + def test_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" + assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_test.rb new file mode 100644 index 000000000000..eeecb1033ab3 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_test.rb @@ -0,0 +1,1096 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/servicedirectory/v1beta1/registration_service_pb" +require "google/cloud/service_directory/v1beta1/registration_service/rest" + + +class ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_namespace + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + namespace_id = "hello world" + namespace = {} + + create_namespace_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_create_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_namespace_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_namespace({ parent: parent, namespace_id: namespace_id, namespace: namespace }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_namespace parent: parent, namespace_id: namespace_id, namespace: namespace do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_namespace ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new(parent: parent, namespace_id: namespace_id, namespace: namespace) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_namespace({ parent: parent, namespace_id: namespace_id, namespace: namespace }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_namespace(::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new(parent: parent, namespace_id: namespace_id, namespace: namespace), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_namespace_client_stub.call_count + end + end + end + + def test_list_namespaces + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_namespaces_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_list_namespaces_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_namespaces_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_namespaces({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_namespaces parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_namespaces ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_namespaces({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_namespaces(::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_namespaces_client_stub.call_count + end + end + end + + def test_get_namespace + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_namespace_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_get_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_namespace_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_namespace({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_namespace name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_namespace ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_namespace({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_namespace(::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_namespace_client_stub.call_count + end + end + end + + def test_update_namespace + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + namespace = {} + update_mask = {} + + update_namespace_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_update_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_namespace_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_namespace({ namespace: namespace, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_namespace namespace: namespace, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_namespace ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new(namespace: namespace, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_namespace({ namespace: namespace, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_namespace(::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new(namespace: namespace, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_namespace_client_stub.call_count + end + end + end + + def test_delete_namespace + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_namespace_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_delete_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_namespace_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_namespace({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_namespace name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_namespace ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_namespace({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_namespace(::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_namespace_client_stub.call_count + end + end + end + + def test_create_service + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_id = "hello world" + service = {} + + create_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_create_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_service({ parent: parent, service_id: service_id, service: service }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_service parent: parent, service_id: service_id, service: service do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_service ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_service({ parent: parent, service_id: service_id, service: service }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_service(::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_client_stub.call_count + end + end + end + + def test_list_services + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_services_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_services ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_services(::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_count + end + end + end + + def test_get_service + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_service ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_service(::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_count + end + end + end + + def test_update_service + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service = {} + update_mask = {} + + update_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_update_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_service({ service: service, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_service service: service, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_service ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new(service: service, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_service({ service: service, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_service(::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new(service: service, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_service_client_stub.call_count + end + end + end + + def test_delete_service + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_delete_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_service ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_service(::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_service_client_stub.call_count + end + end + end + + def test_create_endpoint + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + endpoint_id = "hello world" + endpoint = {} + + create_endpoint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_create_endpoint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_endpoint_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_endpoint({ parent: parent, endpoint_id: endpoint_id, endpoint: endpoint }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_endpoint parent: parent, endpoint_id: endpoint_id, endpoint: endpoint do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new(parent: parent, endpoint_id: endpoint_id, endpoint: endpoint) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_endpoint({ parent: parent, endpoint_id: endpoint_id, endpoint: endpoint }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new(parent: parent, endpoint_id: endpoint_id, endpoint: endpoint), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_endpoint_client_stub.call_count + end + end + end + + def test_list_endpoints + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_endpoints_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_list_endpoints_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_endpoints_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_endpoints({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_endpoints parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_endpoints ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_endpoints({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_endpoints(::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_endpoints_client_stub.call_count + end + end + end + + def test_get_endpoint + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_endpoint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_get_endpoint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_endpoint_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_endpoint({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_endpoint name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_endpoint({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_endpoint_client_stub.call_count + end + end + end + + def test_update_endpoint + # Create test objects. + client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + endpoint = {} + update_mask = {} + + update_endpoint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_update_endpoint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_endpoint_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_endpoint({ endpoint: endpoint, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_endpoint endpoint: endpoint, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new(endpoint: endpoint, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_endpoint({ endpoint: endpoint, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new(endpoint: endpoint, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_endpoint_client_stub.call_count + end + end + end + + def test_delete_endpoint + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_endpoint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_delete_endpoint_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_endpoint_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_endpoint({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_endpoint name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_endpoint({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_endpoint_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_test.rb new file mode 100644 index 000000000000..2a649b61c8da --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_test.rb @@ -0,0 +1,1213 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/servicedirectory/v1beta1/registration_service_pb" +require "google/cloud/service_directory/v1beta1/registration_service" + +class ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_namespace + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + namespace_id = "hello world" + namespace = {} + + create_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_namespace, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["namespace_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Namespace), request["namespace"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_namespace_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_namespace({ parent: parent, namespace_id: namespace_id, namespace: namespace }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_namespace parent: parent, namespace_id: namespace_id, namespace: namespace do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_namespace ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new(parent: parent, namespace_id: namespace_id, namespace: namespace) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_namespace({ parent: parent, namespace_id: namespace_id, namespace: namespace }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_namespace(::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new(parent: parent, namespace_id: namespace_id, namespace: namespace), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_namespace_client_stub.call_rpc_count + end + end + + def test_list_namespaces + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_namespaces_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_namespaces, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_namespaces_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_namespaces({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_namespaces parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_namespaces ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_namespaces({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_namespaces(::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_namespaces_client_stub.call_rpc_count + end + end + + def test_get_namespace + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_namespace, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_namespace_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_namespace({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_namespace name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_namespace ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_namespace({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_namespace(::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_namespace_client_stub.call_rpc_count + end + end + + def test_update_namespace + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + namespace = {} + update_mask = {} + + update_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_namespace, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Namespace), request["namespace"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_namespace_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_namespace({ namespace: namespace, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_namespace namespace: namespace, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_namespace ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new(namespace: namespace, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_namespace({ namespace: namespace, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_namespace(::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new(namespace: namespace, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_namespace_client_stub.call_rpc_count + end + end + + def test_delete_namespace + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_namespace, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_namespace_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_namespace({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_namespace name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_namespace ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_namespace({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_namespace(::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_namespace_client_stub.call_rpc_count + end + end + + def test_create_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_id = "hello world" + service = {} + + create_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["service_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Service), request["service"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_service({ parent: parent, service_id: service_id, service: service }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_service parent: parent, service_id: service_id, service: service do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_service ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_service({ parent: parent, service_id: service_id, service: service }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_service(::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_service_client_stub.call_rpc_count + end + end + + def test_list_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_services, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_services_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_services ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_services(::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_rpc_count + end + end + + def test_get_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_service ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_service(::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_rpc_count + end + end + + def test_update_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service = {} + update_mask = {} + + update_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_service, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Service), request["service"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_service({ service: service, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_service service: service, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_service ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new(service: service, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_service({ service: service, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_service(::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new(service: service, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_service_client_stub.call_rpc_count + end + end + + def test_delete_service + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_service, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_service ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_service(::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_service_client_stub.call_rpc_count + end + end + + def test_create_endpoint + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + endpoint_id = "hello world" + endpoint = {} + + create_endpoint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_endpoint, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["endpoint_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint), request["endpoint"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_endpoint_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_endpoint({ parent: parent, endpoint_id: endpoint_id, endpoint: endpoint }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_endpoint parent: parent, endpoint_id: endpoint_id, endpoint: endpoint do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new(parent: parent, endpoint_id: endpoint_id, endpoint: endpoint) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_endpoint({ parent: parent, endpoint_id: endpoint_id, endpoint: endpoint }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new(parent: parent, endpoint_id: endpoint_id, endpoint: endpoint), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_endpoint_client_stub.call_rpc_count + end + end + + def test_list_endpoints + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_endpoints_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_endpoints, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_endpoints_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_endpoints({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_endpoints parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_endpoints ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_endpoints({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_endpoints(::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_endpoints_client_stub.call_rpc_count + end + end + + def test_get_endpoint + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_endpoint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_endpoint, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_endpoint_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_endpoint({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_endpoint name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_endpoint({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_endpoint_client_stub.call_rpc_count + end + end + + def test_update_endpoint + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + endpoint = {} + update_mask = {} + + update_endpoint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_endpoint, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint), request["endpoint"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_endpoint_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_endpoint({ endpoint: endpoint, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_endpoint endpoint: endpoint, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new(endpoint: endpoint, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_endpoint({ endpoint: endpoint, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new(endpoint: endpoint, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_endpoint_client_stub.call_rpc_count + end + end + + def test_delete_endpoint + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_endpoint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_endpoint, name + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_endpoint_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_endpoint({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_endpoint name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_endpoint({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_endpoint_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_directory-v1beta1/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_health-v1/.gitignore b/owl-bot-staging/google-cloud-service_health-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/.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_health-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-service_health-v1/.repo-metadata.json new file mode 100644 index 000000000000..e5a8dac5c000 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "servicehealth.googleapis.com", + "api_shortname": "servicehealth", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-service_health-v1/latest", + "distribution_name": "google-cloud-service_health-v1", + "is_cloud": true, + "language": "ruby", + "name": "servicehealth", + "name_pretty": "Service Health V1 API", + "product_documentation": "https://cloud.google.com/service-health/docs/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Personalized Service Health helps you gain visibility into disruptive events impacting Google Cloud products. Note that google-cloud-service_health-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_health instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/service-health/docs/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-service_health-v1/.rubocop.yml b/owl-bot-staging/google-cloud-service_health-v1/.rubocop.yml new file mode 100644 index 000000000000..292707c824d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-service_health-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-service_health-v1.rb" diff --git a/owl-bot-staging/google-cloud-service_health-v1/.toys.rb b/owl-bot-staging/google-cloud-service_health-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/.yardopts b/owl-bot-staging/google-cloud-service_health-v1/.yardopts new file mode 100644 index 000000000000..26f81cadbdb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Service Health V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-service_health-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_health-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..48d8d8aa8f78 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-service_health-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-service_health-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/service_health/v1" + +client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/service_health/v1" + +::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-service_health-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/service_health/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-service_health-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-service_health-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-service_health-v1/Gemfile b/owl-bot-staging/google-cloud-service_health-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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_health-v1/LICENSE.md b/owl-bot-staging/google-cloud-service_health-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-service_health-v1/README.md b/owl-bot-staging/google-cloud-service_health-v1/README.md new file mode 100644 index 000000000000..384603b85a67 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Service Health V1 API + +Personalized Service Health helps you gain visibility into disruptive events impacting Google Cloud products. + +Personalized Service Health helps you gain visibility into disruptive events impacting Google Cloud products. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Service Health V1 API. Most users should consider using +the main client gem, +[google-cloud-service_health](https://rubygems.org/gems/google-cloud-service_health). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-service_health-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/servicehealth.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/service_health/v1" + +client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new +request = ::Google::Cloud::ServiceHealth::V1::ListEventsRequest.new # (request fields as keyword arguments...) +response = client.list_events request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_health-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/service-health/docs/overview) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/service_health/v1" +require "logger" + +client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-service_health`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-service_health-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_health`. +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_health-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_health-v1/Rakefile b/owl-bot-staging/google-cloud-service_health-v1/Rakefile new file mode 100644 index 000000000000..516ae4796426 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-service_health-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/service_health/v1/service_health/credentials" + ::Google::Cloud::ServiceHealth::V1::ServiceHealth::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-service_health-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-service_health-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-service_health-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-service_health-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-service_health-v1" + header "google-cloud-service_health-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-service_health-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-service_health-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-service_health-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-service_health-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-service_health-v1/gapic_metadata.json new file mode 100644 index 000000000000..f6d45dcb69e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.servicehealth.v1", + "libraryPackage": "::Google::Cloud::ServiceHealth::V1", + "services": { + "ServiceHealth": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client", + "rpcs": { + "ListEvents": { + "methods": [ + "list_events" + ] + }, + "GetEvent": { + "methods": [ + "get_event" + ] + }, + "ListOrganizationEvents": { + "methods": [ + "list_organization_events" + ] + }, + "GetOrganizationEvent": { + "methods": [ + "get_organization_event" + ] + }, + "ListOrganizationImpacts": { + "methods": [ + "list_organization_impacts" + ] + }, + "GetOrganizationImpact": { + "methods": [ + "get_organization_impact" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-service_health-v1/google-cloud-service_health-v1.gemspec b/owl-bot-staging/google-cloud-service_health-v1/google-cloud-service_health-v1.gemspec new file mode 100644 index 000000000000..8cf07f140906 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/google-cloud-service_health-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/service_health/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-service_health-v1" + gem.version = Google::Cloud::ServiceHealth::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Personalized Service Health helps you gain visibility into disruptive events impacting Google Cloud products. Note that google-cloud-service_health-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_health instead. See the readme for more details." + gem.summary = "Personalized Service Health helps you gain visibility into disruptive events impacting Google Cloud products." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google-cloud-service_health-v1.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google-cloud-service_health-v1.rb new file mode 100644 index 000000000000..1fd09f220a8c --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google-cloud-service_health-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/service_health/v1" diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1.rb new file mode 100644 index 000000000000..0450d1bde309 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/service_health/v1/service_health" +require "google/cloud/service_health/v1/version" + +module Google + module Cloud + module ServiceHealth + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/service_health/v1" + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/service_health/v1" + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/service_health/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/bindings_override.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/bindings_override.rb new file mode 100644 index 000000000000..1d734180955c --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module ServiceHealth + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/service_health/v1/rest" + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceHealth"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/rest.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/rest.rb new file mode 100644 index 000000000000..7c4fab8806ab --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/service_health/v1/service_health/rest" +require "google/cloud/service_health/v1/bindings_override" +require "google/cloud/service_health/v1/version" + +module Google + module Cloud + module ServiceHealth + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/service_health/v1/rest" + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health.rb new file mode 100644 index 000000000000..e2ae0bacf94a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_health/v1/version" + +require "google/cloud/service_health/v1/service_health/credentials" +require "google/cloud/service_health/v1/service_health/paths" +require "google/cloud/service_health/v1/service_health/client" +require "google/cloud/service_health/v1/service_health/rest" + +module Google + module Cloud + module ServiceHealth + module V1 + ## + # Request service health events relevant to your Google Cloud project. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/service_health/v1/service_health" + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/service_health/v1/service_health/rest" + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + module ServiceHealth + end + end + end + end +end + +helper_path = ::File.join __dir__, "service_health", "helpers.rb" +require "google/cloud/service_health/v1/service_health/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/client.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/client.rb new file mode 100644 index 000000000000..92dab2cd58d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/client.rb @@ -0,0 +1,1144 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/servicehealth/v1/event_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module ServiceHealth + module V1 + module ServiceHealth + ## + # Client for the ServiceHealth service. + # + # Request service health events relevant to your Google Cloud project. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicehealth.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :service_health_stub + + ## + # Configure the ServiceHealth Client class. + # + # See {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ServiceHealth clients + # ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceHealth", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_events.timeout = 60.0 + default_config.rpcs.list_events.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_event.timeout = 60.0 + default_config.rpcs.get_event.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_organization_events.timeout = 60.0 + default_config.rpcs.list_organization_events.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_organization_event.timeout = 60.0 + default_config.rpcs.get_organization_event.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_organization_impacts.timeout = 60.0 + default_config.rpcs.list_organization_impacts.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_organization_impact.timeout = 60.0 + default_config.rpcs.get_organization_impact.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceHealth Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @service_health_stub.universe_domain + end + + ## + # Create a new ServiceHealth client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ServiceHealth client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/servicehealth/v1/event_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @service_health_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @service_health_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @service_health_stub.endpoint + config.universe_domain = @service_health_stub.universe_domain + config.logger = @service_health_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @service_health_stub.logger + end + + # Service calls + + ## + # Lists events under a given project and location. + # + # @overload list_events(request, options = nil) + # Pass arguments to `list_events` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::ListEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::ListEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) + # Pass arguments to `list_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value using the form + # `projects/{project_id}/locations/{location}/events`. + # + # `project_id` - ID of the project for which to list service health + # events. + # `location` - The location to get the service health events from. + # To retrieve service health events of category = INCIDENT, use `location` = + # `global`. + # @param page_size [::Integer] + # Optional. The maximum number of events that should be returned. Acceptable + # values are 1 to 100, inclusive. (The default value is 10.) If more results + # are available, the service returns a next_page_token that you can use to + # get the next page of results in subsequent list requests. The service may + # return fewer events than the requested page_size. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # Provide Page token returned by a previous `ListEvents` call to retrieve the + # next page of results. When paginating, all other parameters provided to + # `ListEvents` must match the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters resources listed in the + # response. The expression takes the following forms:
+ # * field=value for `category` and `state`
+ # * field <, >, <=, or >= value for `update_time`
+ # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, + # `event_impacts.product.product_name:"Eventarc"` + #
+ # + # Multiple filter queries are separated by spaces. Example: + # `category=INCIDENT state=ACTIVE`. + # + # By default, each expression is an AND expression. However, you can include + # AND and OR expressions explicitly. + # + # Filter is supported for the following fields: `category`, `state`, + # `update_time`, `event_impacts.product.product_name` + # @param view [::Google::Cloud::ServiceHealth::V1::EventView] + # Optional. Event fields to include in response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::Event>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::Event>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::ListEventsRequest.new + # + # # Call the list_events method. + # result = client.list_events request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceHealth::V1::Event. + # p item + # end + # + def list_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_events.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.call_rpc :list_events, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @service_health_stub, :list_events, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a resource containing information about an event. + # + # @overload get_event(request, options = nil) + # Pass arguments to `get_event` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::GetEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::GetEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_event(name: nil) + # Pass arguments to `get_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Unique name of the event in this scope including project + # and location using the form + # `projects/{project_id}/locations/{location}/events/{event_id}`. + # + # `project_id` - Project ID of the project that contains the event.
+ # `location` - The location to get the service health events from.
+ # `event_id` - Event ID to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceHealth::V1::Event] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceHealth::V1::Event] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::GetEventRequest.new + # + # # Call the get_event method. + # result = client.get_event request + # + # # The returned object is of type Google::Cloud::ServiceHealth::V1::Event. + # p result + # + def get_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetEventRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_event.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.call_rpc :get_event, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists organization events under a given organization and location. + # + # @overload list_organization_events(request, options = nil) + # Pass arguments to `list_organization_events` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_organization_events(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) + # Pass arguments to `list_organization_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value using the form + # `organizations/{organization_id}/locations/{location}/organizationEvents`. + # + # `organization_id` - ID (number) of the project that contains the event. To + # get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ # `location` - The location to get the service health events from. To + # retrieve service health events of category = INCIDENT, use `location` = + # `global`. + # @param page_size [::Integer] + # Optional. The maximum number of events that should be returned. Acceptable + # values are `1` to `100`, inclusive. (The default value is `10`.) If more + # results are available, the service returns a `next_page_token` that you can + # use to get the next page of results in subsequent list requests. The + # service may return fewer events than the requested `page_size`. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # Provide Page token returned by a previous `ListOrganizationEvents` call to + # retrieve the next page of results. + # + # When paginating, all other parameters provided to + # `ListOrganizationEvents` must match the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters resources listed in the + # response. The expression takes the following forms: + # + # * field=value for `category` and `state` + # * field <, >, <=, or >= value for `update_time` + # + # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` + # + # Multiple filter queries are space-separated. Example: + # `category=INCIDENT state=ACTIVE`. + # + # By default, each expression is an AND expression. However, you can include + # AND and OR expressions explicitly. + # + # Filter is supported for the following fields: `category`, `state`, + # `update_time` + # @param view [::Google::Cloud::ServiceHealth::V1::OrganizationEventView] + # Optional. OrganizationEvent fields to include in response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationEvent>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationEvent>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new + # + # # Call the list_organization_events method. + # result = client.list_organization_events request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationEvent. + # p item + # end + # + def list_organization_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_organization_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_organization_events.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_organization_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.call_rpc :list_organization_events, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @service_health_stub, :list_organization_events, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a resource containing information about an event affecting an + # organization . + # + # @overload get_organization_event(request, options = nil) + # Pass arguments to `get_organization_event` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_organization_event(name: nil) + # Pass arguments to `get_organization_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Unique name of the event in this scope including organization and + # event ID using the form + # `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. + # + # `organization_id` - ID (number) of the project that contains the event. To + # get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ # `event_id` - Organization event ID to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new + # + # # Call the get_organization_event method. + # result = client.get_organization_event request + # + # # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationEvent. + # p result + # + def get_organization_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_organization_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_organization_event.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_organization_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.call_rpc :get_organization_event, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists assets impacted by organization events under a given organization and + # location. + # + # @overload list_organization_impacts(request, options = nil) + # Pass arguments to `list_organization_impacts` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_organization_impacts(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_organization_impacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value using the form + # `organizations/{organization_id}/locations/{location}/organizationImpacts`. + # + # `organization_id` - ID (number) of the project that contains the event. To + # get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + # @param page_size [::Integer] + # Optional. The maximum number of events that should be returned. Acceptable + # values are `1` to `100`, inclusive. The default value is `10`. + # + # If more results are available, the service returns a + # `next_page_token` that can be used to get the next page of results in + # subsequent list requests. The service may return fewer + # [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + # than the requested `page_size`. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # Provide `page_token` returned by a previous `ListOrganizationImpacts` call + # to retrieve the next page of results. + # + # When paginating, all other parameters provided to `ListOrganizationImpacts` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters resources listed in the + # response. The expression is in the form of `field:value` for checking if a + # repeated field contains a value. + # + # Example: + # `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` + # + # To get your `{organization_id}`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + # + # Multiple filter queries are separated by spaces. + # + # By default, each expression is an AND expression. However, you can include + # AND and OR expressions explicitly. + # Filter is supported for the following fields: `events`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationImpact>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationImpact>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new + # + # # Call the list_organization_impacts method. + # result = client.list_organization_impacts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationImpact. + # p item + # end + # + def list_organization_impacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_organization_impacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_organization_impacts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_organization_impacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.call_rpc :list_organization_impacts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @service_health_stub, :list_organization_impacts, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a resource containing information about impact to an asset under + # an organization affected by a service health event. + # + # @overload get_organization_impact(request, options = nil) + # Pass arguments to `get_organization_impact` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_organization_impact(name: nil) + # Pass arguments to `get_organization_impact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource using the form + # `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. + # + # `organization_id` - ID (number) of the organization that contains the + # event. To get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ # `organization_impact_id` - ID of the [OrganizationImpact + # resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new + # + # # Call the get_organization_impact method. + # result = client.get_organization_impact request + # + # # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationImpact. + # p result + # + def get_organization_impact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_organization_impact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_organization_impact.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_organization_impact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.call_rpc :get_organization_impact, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ServiceHealth API. + # + # This class represents the configuration for ServiceHealth, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_events to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_events.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_events.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicehealth.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ServiceHealth API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_events` + # @return [::Gapic::Config::Method] + # + attr_reader :list_events + ## + # RPC-specific configuration for `get_event` + # @return [::Gapic::Config::Method] + # + attr_reader :get_event + ## + # RPC-specific configuration for `list_organization_events` + # @return [::Gapic::Config::Method] + # + attr_reader :list_organization_events + ## + # RPC-specific configuration for `get_organization_event` + # @return [::Gapic::Config::Method] + # + attr_reader :get_organization_event + ## + # RPC-specific configuration for `list_organization_impacts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_organization_impacts + ## + # RPC-specific configuration for `get_organization_impact` + # @return [::Gapic::Config::Method] + # + attr_reader :get_organization_impact + + # @private + def initialize parent_rpcs = nil + list_events_config = parent_rpcs.list_events if parent_rpcs.respond_to? :list_events + @list_events = ::Gapic::Config::Method.new list_events_config + get_event_config = parent_rpcs.get_event if parent_rpcs.respond_to? :get_event + @get_event = ::Gapic::Config::Method.new get_event_config + list_organization_events_config = parent_rpcs.list_organization_events if parent_rpcs.respond_to? :list_organization_events + @list_organization_events = ::Gapic::Config::Method.new list_organization_events_config + get_organization_event_config = parent_rpcs.get_organization_event if parent_rpcs.respond_to? :get_organization_event + @get_organization_event = ::Gapic::Config::Method.new get_organization_event_config + list_organization_impacts_config = parent_rpcs.list_organization_impacts if parent_rpcs.respond_to? :list_organization_impacts + @list_organization_impacts = ::Gapic::Config::Method.new list_organization_impacts_config + get_organization_impact_config = parent_rpcs.get_organization_impact if parent_rpcs.respond_to? :get_organization_impact + @get_organization_impact = ::Gapic::Config::Method.new get_organization_impact_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.rb new file mode 100644 index 000000000000..76ceb72eed21 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module ServiceHealth + module V1 + module ServiceHealth + # Credentials for the ServiceHealth API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/paths.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/paths.rb new file mode 100644 index 000000000000..faffaa39fdf7 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/paths.rb @@ -0,0 +1,124 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceHealth + module V1 + module ServiceHealth + # Path helper methods for the ServiceHealth API. + module Paths + ## + # Create a fully-qualified Event resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/events/{event}` + # + # @param project [String] + # @param location [String] + # @param event [String] + # + # @return [::String] + def event_path project:, location:, event: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/events/#{event}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationEvent resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/organizationEvents/{event}` + # + # @param organization [String] + # @param location [String] + # @param event [String] + # + # @return [::String] + def organization_event_path organization:, location:, event: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/organizationEvents/#{event}" + end + + ## + # Create a fully-qualified OrganizationImpact resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/organizationImpacts/{organization_impact}` + # + # @param organization [String] + # @param location [String] + # @param organization_impact [String] + # + # @return [::String] + def organization_impact_path organization:, location:, organization_impact: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/organizationImpacts/#{organization_impact}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest.rb new file mode 100644 index 000000000000..205266530be8 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_health/v1/version" +require "google/cloud/service_health/v1/bindings_override" + +require "google/cloud/service_health/v1/service_health/credentials" +require "google/cloud/service_health/v1/service_health/paths" +require "google/cloud/service_health/v1/service_health/rest/client" + +module Google + module Cloud + module ServiceHealth + module V1 + ## + # Request service health events relevant to your Google Cloud project. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/service_health/v1/service_health/rest" + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + module ServiceHealth + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/service_health/v1/service_health/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.rb new file mode 100644 index 000000000000..d7232b43bd7f --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.rb @@ -0,0 +1,1067 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/servicehealth/v1/event_service_pb" +require "google/cloud/service_health/v1/service_health/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module ServiceHealth + module V1 + module ServiceHealth + module Rest + ## + # REST client for the ServiceHealth service. + # + # Request service health events relevant to your Google Cloud project. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicehealth.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :service_health_stub + + ## + # Configure the ServiceHealth Client class. + # + # See {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ServiceHealth clients + # ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceHealth", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_events.timeout = 60.0 + default_config.rpcs.list_events.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_event.timeout = 60.0 + default_config.rpcs.get_event.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_organization_events.timeout = 60.0 + default_config.rpcs.list_organization_events.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_organization_event.timeout = 60.0 + default_config.rpcs.get_organization_event.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_organization_impacts.timeout = 60.0 + default_config.rpcs.list_organization_impacts.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_organization_impact.timeout = 60.0 + default_config.rpcs.get_organization_impact.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceHealth Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @service_health_stub.universe_domain + end + + ## + # Create a new ServiceHealth REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ServiceHealth client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @service_health_stub = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @service_health_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @service_health_stub.endpoint + config.universe_domain = @service_health_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @service_health_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @service_health_stub.logger + end + + # Service calls + + ## + # Lists events under a given project and location. + # + # @overload list_events(request, options = nil) + # Pass arguments to `list_events` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::ListEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::ListEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) + # Pass arguments to `list_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value using the form + # `projects/{project_id}/locations/{location}/events`. + # + # `project_id` - ID of the project for which to list service health + # events. + # `location` - The location to get the service health events from. + # To retrieve service health events of category = INCIDENT, use `location` = + # `global`. + # @param page_size [::Integer] + # Optional. The maximum number of events that should be returned. Acceptable + # values are 1 to 100, inclusive. (The default value is 10.) If more results + # are available, the service returns a next_page_token that you can use to + # get the next page of results in subsequent list requests. The service may + # return fewer events than the requested page_size. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # Provide Page token returned by a previous `ListEvents` call to retrieve the + # next page of results. When paginating, all other parameters provided to + # `ListEvents` must match the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters resources listed in the + # response. The expression takes the following forms:
+ # * field=value for `category` and `state`
+ # * field <, >, <=, or >= value for `update_time`
+ # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, + # `event_impacts.product.product_name:"Eventarc"` + #
+ # + # Multiple filter queries are separated by spaces. Example: + # `category=INCIDENT state=ACTIVE`. + # + # By default, each expression is an AND expression. However, you can include + # AND and OR expressions explicitly. + # + # Filter is supported for the following fields: `category`, `state`, + # `update_time`, `event_impacts.product.product_name` + # @param view [::Google::Cloud::ServiceHealth::V1::EventView] + # Optional. Event fields to include in response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::Event>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::Event>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::ListEventsRequest.new + # + # # Call the list_events method. + # result = client.list_events request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceHealth::V1::Event. + # p item + # end + # + def list_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_events.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.list_events request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @service_health_stub, :list_events, "events", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a resource containing information about an event. + # + # @overload get_event(request, options = nil) + # Pass arguments to `get_event` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::GetEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::GetEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_event(name: nil) + # Pass arguments to `get_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Unique name of the event in this scope including project + # and location using the form + # `projects/{project_id}/locations/{location}/events/{event_id}`. + # + # `project_id` - Project ID of the project that contains the event.
+ # `location` - The location to get the service health events from.
+ # `event_id` - Event ID to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceHealth::V1::Event] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceHealth::V1::Event] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::GetEventRequest.new + # + # # Call the get_event method. + # result = client.get_event request + # + # # The returned object is of type Google::Cloud::ServiceHealth::V1::Event. + # p result + # + def get_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetEventRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_event.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.get_event request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists organization events under a given organization and location. + # + # @overload list_organization_events(request, options = nil) + # Pass arguments to `list_organization_events` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_organization_events(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) + # Pass arguments to `list_organization_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value using the form + # `organizations/{organization_id}/locations/{location}/organizationEvents`. + # + # `organization_id` - ID (number) of the project that contains the event. To + # get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ # `location` - The location to get the service health events from. To + # retrieve service health events of category = INCIDENT, use `location` = + # `global`. + # @param page_size [::Integer] + # Optional. The maximum number of events that should be returned. Acceptable + # values are `1` to `100`, inclusive. (The default value is `10`.) If more + # results are available, the service returns a `next_page_token` that you can + # use to get the next page of results in subsequent list requests. The + # service may return fewer events than the requested `page_size`. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # Provide Page token returned by a previous `ListOrganizationEvents` call to + # retrieve the next page of results. + # + # When paginating, all other parameters provided to + # `ListOrganizationEvents` must match the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters resources listed in the + # response. The expression takes the following forms: + # + # * field=value for `category` and `state` + # * field <, >, <=, or >= value for `update_time` + # + # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` + # + # Multiple filter queries are space-separated. Example: + # `category=INCIDENT state=ACTIVE`. + # + # By default, each expression is an AND expression. However, you can include + # AND and OR expressions explicitly. + # + # Filter is supported for the following fields: `category`, `state`, + # `update_time` + # @param view [::Google::Cloud::ServiceHealth::V1::OrganizationEventView] + # Optional. OrganizationEvent fields to include in response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationEvent>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationEvent>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new + # + # # Call the list_organization_events method. + # result = client.list_organization_events request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationEvent. + # p item + # end + # + def list_organization_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_organization_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_organization_events.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_organization_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.list_organization_events request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @service_health_stub, :list_organization_events, "organization_events", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a resource containing information about an event affecting an + # organization . + # + # @overload get_organization_event(request, options = nil) + # Pass arguments to `get_organization_event` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_organization_event(name: nil) + # Pass arguments to `get_organization_event` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Unique name of the event in this scope including organization and + # event ID using the form + # `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. + # + # `organization_id` - ID (number) of the project that contains the event. To + # get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ # `event_id` - Organization event ID to retrieve. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new + # + # # Call the get_organization_event method. + # result = client.get_organization_event request + # + # # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationEvent. + # p result + # + def get_organization_event request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_organization_event.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_organization_event.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_organization_event.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.get_organization_event request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists assets impacted by organization events under a given organization and + # location. + # + # @overload list_organization_impacts(request, options = nil) + # Pass arguments to `list_organization_impacts` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_organization_impacts(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_organization_impacts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value using the form + # `organizations/{organization_id}/locations/{location}/organizationImpacts`. + # + # `organization_id` - ID (number) of the project that contains the event. To + # get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + # @param page_size [::Integer] + # Optional. The maximum number of events that should be returned. Acceptable + # values are `1` to `100`, inclusive. The default value is `10`. + # + # If more results are available, the service returns a + # `next_page_token` that can be used to get the next page of results in + # subsequent list requests. The service may return fewer + # [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + # than the requested `page_size`. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # Provide `page_token` returned by a previous `ListOrganizationImpacts` call + # to retrieve the next page of results. + # + # When paginating, all other parameters provided to `ListOrganizationImpacts` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. A filter expression that filters resources listed in the + # response. The expression is in the form of `field:value` for checking if a + # repeated field contains a value. + # + # Example: + # `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` + # + # To get your `{organization_id}`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + # + # Multiple filter queries are separated by spaces. + # + # By default, each expression is an AND expression. However, you can include + # AND and OR expressions explicitly. + # Filter is supported for the following fields: `events`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationImpact>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationImpact>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new + # + # # Call the list_organization_impacts method. + # result = client.list_organization_impacts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationImpact. + # p item + # end + # + def list_organization_impacts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_organization_impacts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_organization_impacts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_organization_impacts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.list_organization_impacts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @service_health_stub, :list_organization_impacts, "organization_impacts", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a resource containing information about impact to an asset under + # an organization affected by a service health event. + # + # @overload get_organization_impact(request, options = nil) + # Pass arguments to `get_organization_impact` via a request object, either of type + # {::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_organization_impact(name: nil) + # Pass arguments to `get_organization_impact` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource using the form + # `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. + # + # `organization_id` - ID (number) of the organization that contains the + # event. To get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ # `organization_impact_id` - ID of the [OrganizationImpact + # resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_health/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new + # + # # Call the get_organization_impact method. + # result = client.get_organization_impact request + # + # # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationImpact. + # p result + # + def get_organization_impact request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_organization_impact.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_organization_impact.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_organization_impact.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_health_stub.get_organization_impact request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ServiceHealth REST API. + # + # This class represents the configuration for ServiceHealth REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_events to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_events.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_events.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicehealth.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ServiceHealth API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_events` + # @return [::Gapic::Config::Method] + # + attr_reader :list_events + ## + # RPC-specific configuration for `get_event` + # @return [::Gapic::Config::Method] + # + attr_reader :get_event + ## + # RPC-specific configuration for `list_organization_events` + # @return [::Gapic::Config::Method] + # + attr_reader :list_organization_events + ## + # RPC-specific configuration for `get_organization_event` + # @return [::Gapic::Config::Method] + # + attr_reader :get_organization_event + ## + # RPC-specific configuration for `list_organization_impacts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_organization_impacts + ## + # RPC-specific configuration for `get_organization_impact` + # @return [::Gapic::Config::Method] + # + attr_reader :get_organization_impact + + # @private + def initialize parent_rpcs = nil + list_events_config = parent_rpcs.list_events if parent_rpcs.respond_to? :list_events + @list_events = ::Gapic::Config::Method.new list_events_config + get_event_config = parent_rpcs.get_event if parent_rpcs.respond_to? :get_event + @get_event = ::Gapic::Config::Method.new get_event_config + list_organization_events_config = parent_rpcs.list_organization_events if parent_rpcs.respond_to? :list_organization_events + @list_organization_events = ::Gapic::Config::Method.new list_organization_events_config + get_organization_event_config = parent_rpcs.get_organization_event if parent_rpcs.respond_to? :get_organization_event + @get_organization_event = ::Gapic::Config::Method.new get_organization_event_config + list_organization_impacts_config = parent_rpcs.list_organization_impacts if parent_rpcs.respond_to? :list_organization_impacts + @list_organization_impacts = ::Gapic::Config::Method.new list_organization_impacts_config + get_organization_impact_config = parent_rpcs.get_organization_impact if parent_rpcs.respond_to? :get_organization_impact + @get_organization_impact = ::Gapic::Config::Method.new get_organization_impact_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.rb new file mode 100644 index 000000000000..334b7953ff5e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.rb @@ -0,0 +1,447 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/servicehealth/v1/event_service_pb" + +module Google + module Cloud + module ServiceHealth + module V1 + module ServiceHealth + module Rest + ## + # REST service stub for the ServiceHealth service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_events REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListEventsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceHealth::V1::ListEventsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceHealth::V1::ListEventsResponse] + # A result object deserialized from the server's reply + def list_events request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_events_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_events", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceHealth::V1::ListEventsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_event REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetEventRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceHealth::V1::Event] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceHealth::V1::Event] + # A result object deserialized from the server's reply + def get_event request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_event_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_event", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceHealth::V1::Event.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_organization_events REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse] + # A result object deserialized from the server's reply + def list_organization_events request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_organization_events_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_organization_events", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_organization_event REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] + # A result object deserialized from the server's reply + def get_organization_event request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_organization_event_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_organization_event", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceHealth::V1::OrganizationEvent.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_organization_impacts REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse] + # A result object deserialized from the server's reply + def list_organization_impacts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_organization_impacts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_organization_impacts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_organization_impact REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] + # A result object deserialized from the server's reply + def get_organization_impact request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_organization_impact_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_organization_impact", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceHealth::V1::OrganizationImpact.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_events REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListEventsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_events_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/events", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_event REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetEventRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_event_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/events/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_organization_events REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_organization_events_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/organizationEvents", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_organization_event REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_organization_event_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/organizationEvents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_organization_impacts REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_organization_impacts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/organizationImpacts", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_organization_impact REST call + # + # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_organization_impact_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/organizationImpacts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/version.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/version.rb new file mode 100644 index 000000000000..1a6b3fe921b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceHealth + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_resources_pb.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_resources_pb.rb new file mode 100644 index 000000000000..0b6bc5e2a840 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_resources_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/servicehealth/v1/event_resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/servicehealth/v1/event_resources.proto\x12\x1dgoogle.cloud.servicehealth.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x93\x0b\n\x05\x45vent\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12I\n\x08\x63\x61tegory\x18\x04 \x01(\x0e\x32\x32.google.cloud.servicehealth.v1.Event.EventCategoryB\x03\xe0\x41\x03\x12U\n\x11\x64\x65tailed_category\x18\x15 \x01(\x0e\x32\x35.google.cloud.servicehealth.v1.Event.DetailedCategoryB\x03\xe0\x41\x03\x12>\n\x05state\x18\x05 \x01(\x0e\x32*.google.cloud.servicehealth.v1.Event.StateB\x03\xe0\x41\x03\x12O\n\x0e\x64\x65tailed_state\x18\x13 \x01(\x0e\x32\x32.google.cloud.servicehealth.v1.Event.DetailedStateB\x03\xe0\x41\x03\x12\x41\n\revent_impacts\x18\x14 \x03(\x0b\x32*.google.cloud.servicehealth.v1.EventImpact\x12\x46\n\trelevance\x18\x08 \x01(\x0e\x32..google.cloud.servicehealth.v1.Event.RelevanceB\x03\xe0\x41\x03\x12@\n\x07updates\x18\t \x03(\x0b\x32*.google.cloud.servicehealth.v1.EventUpdateB\x03\xe0\x41\x03\x12\x19\n\x0cparent_event\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10next_update_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"=\n\rEventCategory\x12\x1e\n\x1a\x45VENT_CATEGORY_UNSPECIFIED\x10\x00\x12\x0c\n\x08INCIDENT\x10\x02\"d\n\x10\x44\x65tailedCategory\x12!\n\x1d\x44\x45TAILED_CATEGORY_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43ONFIRMED_INCIDENT\x10\x01\x12\x15\n\x11\x45MERGING_INCIDENT\x10\x02\"6\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\n\n\x06\x43LOSED\x10\x02\"\x8b\x01\n\rDetailedState\x12\x1e\n\x1a\x44\x45TAILED_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45MERGING\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\x0c\n\x08RESOLVED\x10\x03\x12\n\n\x06MERGED\x10\x04\x12\x0f\n\x0b\x41UTO_CLOSED\x10\t\x12\x12\n\x0e\x46\x41LSE_POSITIVE\x10\n\"w\n\tRelevance\x12\x19\n\x15RELEVANCE_UNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x02\x12\x10\n\x0cNOT_IMPACTED\x10\x06\x12\x15\n\x11PARTIALLY_RELATED\x10\x07\x12\x0b\n\x07RELATED\x10\x08\x12\x0c\n\x08IMPACTED\x10\t:n\xea\x41k\n\"servicehealth.googleapis.com/Event\x12\x36projects/{project}/locations/{location}/events/{event}*\x06\x65vents2\x05\x65vent\"\xcf\n\n\x11OrganizationEvent\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12U\n\x08\x63\x61tegory\x18\x04 \x01(\x0e\x32>.google.cloud.servicehealth.v1.OrganizationEvent.EventCategoryB\x03\xe0\x41\x03\x12\x61\n\x11\x64\x65tailed_category\x18\x11 \x01(\x0e\x32\x41.google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategoryB\x03\xe0\x41\x03\x12J\n\x05state\x18\x05 \x01(\x0e\x32\x36.google.cloud.servicehealth.v1.OrganizationEvent.StateB\x03\xe0\x41\x03\x12[\n\x0e\x64\x65tailed_state\x18\x10 \x01(\x0e\x32>.google.cloud.servicehealth.v1.OrganizationEvent.DetailedStateB\x03\xe0\x41\x03\x12\x46\n\revent_impacts\x18\x0f \x03(\x0b\x32*.google.cloud.servicehealth.v1.EventImpactB\x03\xe0\x41\x03\x12@\n\x07updates\x18\x08 \x03(\x0b\x32*.google.cloud.servicehealth.v1.EventUpdateB\x03\xe0\x41\x03\x12\x19\n\x0cparent_event\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10next_update_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"=\n\rEventCategory\x12\x1e\n\x1a\x45VENT_CATEGORY_UNSPECIFIED\x10\x00\x12\x0c\n\x08INCIDENT\x10\x02\"d\n\x10\x44\x65tailedCategory\x12!\n\x1d\x44\x45TAILED_CATEGORY_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43ONFIRMED_INCIDENT\x10\x01\x12\x15\n\x11\x45MERGING_INCIDENT\x10\x02\"6\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\n\n\x06\x43LOSED\x10\x02\"\x8b\x01\n\rDetailedState\x12\x1e\n\x1a\x44\x45TAILED_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45MERGING\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\x0c\n\x08RESOLVED\x10\x03\x12\n\n\x06MERGED\x10\x04\x12\x0f\n\x0b\x41UTO_CLOSED\x10\t\x12\x12\n\x0e\x46\x41LSE_POSITIVE\x10\n:\xa9\x01\xea\x41\xa5\x01\n.servicehealth.googleapis.com/OrganizationEvent\x12Lorganizations/{organization}/locations/{location}/organizationEvents/{event}*\x12organizationEvents2\x11organizationEvent\"\xa0\x01\n\x0b\x45ventUpdate\x12\x34\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07symptom\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nworkaround\x18\x05 \x01(\tB\x03\xe0\x41\x03\"!\n\x08Location\x12\x15\n\rlocation_name\x18\x01 \x01(\t\"+\n\x07Product\x12\x14\n\x0cproduct_name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\"\x81\x01\n\x0b\x45ventImpact\x12\x37\n\x07product\x18\x01 \x01(\x0b\x32&.google.cloud.servicehealth.v1.Product\x12\x39\n\x08location\x18\x02 \x01(\x0b\x32\'.google.cloud.servicehealth.v1.Location\"\x94\x03\n\x12OrganizationImpact\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12:\n\x06\x65vents\x18\x02 \x03(\tB*\xe0\x41\x03\xfa\x41$\n\"servicehealth.googleapis.com/Event\x12\x38\n\x05\x61sset\x18\x03 \x01(\x0b\x32$.google.cloud.servicehealth.v1.AssetB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xbb\x01\xea\x41\xb7\x01\n/servicehealth.googleapis.com/OrganizationImpact\x12[organizations/{organization}/locations/{location}/organizationImpacts/{organization_impact}*\x13organizationImpacts2\x12organizationImpact\"9\n\x05\x41sset\x12\x17\n\nasset_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nasset_type\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xd2\x01\n\x11ListEventsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"servicehealth.googleapis.com/Event\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x04view\x18\x06 \x01(\x0e\x32(.google.cloud.servicehealth.v1.EventViewB\x03\xe0\x41\x01\"\x87\x01\n\x12ListEventsResponse\x12\x39\n\x06\x65vents\x18\x01 \x03(\x0b\x32$.google.cloud.servicehealth.v1.EventB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x03\"K\n\x0fGetEventRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"servicehealth.googleapis.com/Event\"\xf6\x01\n\x1dListOrganizationEventsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.servicehealth.googleapis.com/OrganizationEvent\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x04view\x18\x06 \x01(\x0e\x32\x34.google.cloud.servicehealth.v1.OrganizationEventViewB\x03\xe0\x41\x01\"\xac\x01\n\x1eListOrganizationEventsResponse\x12R\n\x13organization_events\x18\x01 \x03(\x0b\x32\x30.google.cloud.servicehealth.v1.OrganizationEventB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x03\"c\n\x1bGetOrganizationEventRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.servicehealth.googleapis.com/OrganizationEvent\"\xaf\x01\n\x1eListOrganizationImpactsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/servicehealth.googleapis.com/OrganizationImpact\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n\x1fListOrganizationImpactsResponse\x12T\n\x14organization_impacts\x18\x01 \x03(\x0b\x32\x31.google.cloud.servicehealth.v1.OrganizationImpactB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x03\"e\n\x1cGetOrganizationImpactRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/servicehealth.googleapis.com/OrganizationImpact*R\n\tEventView\x12\x1a\n\x16\x45VENT_VIEW_UNSPECIFIED\x10\x00\x12\x14\n\x10\x45VENT_VIEW_BASIC\x10\x01\x12\x13\n\x0f\x45VENT_VIEW_FULL\x10\x02*\x85\x01\n\x15OrganizationEventView\x12\'\n#ORGANIZATION_EVENT_VIEW_UNSPECIFIED\x10\x00\x12!\n\x1dORGANIZATION_EVENT_VIEW_BASIC\x10\x01\x12 \n\x1cORGANIZATION_EVENT_VIEW_FULL\x10\x02\x42\xcf\x02\n!com.google.cloud.servicehealth.v1B\x13\x45ventResourcesProtoP\x01ZGcloud.google.com/go/servicehealth/apiv1/servicehealthpb;servicehealthpb\xaa\x02\x1dGoogle.Cloud.ServiceHealth.V1\xca\x02\x1dGoogle\\Cloud\\ServiceHealth\\V1\xea\x02 Google::Cloud::ServiceHealth::V1\xea\x41\x66\n1servicehealth.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceHealth + module V1 + Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event").msgclass + Event::EventCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event.EventCategory").enummodule + Event::DetailedCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event.DetailedCategory").enummodule + Event::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event.State").enummodule + Event::DetailedState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event.DetailedState").enummodule + Event::Relevance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event.Relevance").enummodule + OrganizationEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEvent").msgclass + OrganizationEvent::EventCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEvent.EventCategory").enummodule + OrganizationEvent::DetailedCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategory").enummodule + OrganizationEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEvent.State").enummodule + OrganizationEvent::DetailedState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEvent.DetailedState").enummodule + EventUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.EventUpdate").msgclass + Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Location").msgclass + Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Product").msgclass + EventImpact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.EventImpact").msgclass + OrganizationImpact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationImpact").msgclass + Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Asset").msgclass + ListEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListEventsRequest").msgclass + ListEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListEventsResponse").msgclass + GetEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.GetEventRequest").msgclass + ListOrganizationEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListOrganizationEventsRequest").msgclass + ListOrganizationEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListOrganizationEventsResponse").msgclass + GetOrganizationEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.GetOrganizationEventRequest").msgclass + ListOrganizationImpactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListOrganizationImpactsRequest").msgclass + ListOrganizationImpactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListOrganizationImpactsResponse").msgclass + GetOrganizationImpactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.GetOrganizationImpactRequest").msgclass + EventView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.EventView").enummodule + OrganizationEventView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEventView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_pb.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_pb.rb new file mode 100644 index 000000000000..f23b23184afe --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/servicehealth/v1/event_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/cloud/servicehealth/v1/event_resources_pb' + + +descriptor_data = "\n1google/cloud/servicehealth/v1/event_service.proto\x12\x1dgoogle.cloud.servicehealth.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x33google/cloud/servicehealth/v1/event_resources.proto2\xaa\n\n\rServiceHealth\x12\xae\x01\n\nListEvents\x12\x30.google.cloud.servicehealth.v1.ListEventsRequest\x1a\x31.google.cloud.servicehealth.v1.ListEventsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/events\x12\x9b\x01\n\x08GetEvent\x12..google.cloud.servicehealth.v1.GetEventRequest\x1a$.google.cloud.servicehealth.v1.Event\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/events/*}\x12\xe3\x01\n\x16ListOrganizationEvents\x12<.google.cloud.servicehealth.v1.ListOrganizationEventsRequest\x1a=.google.cloud.servicehealth.v1.ListOrganizationEventsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=organizations/*/locations/*}/organizationEvents\x12\xd0\x01\n\x14GetOrganizationEvent\x12:.google.cloud.servicehealth.v1.GetOrganizationEventRequest\x1a\x30.google.cloud.servicehealth.v1.OrganizationEvent\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=organizations/*/locations/*/organizationEvents/*}\x12\xe7\x01\n\x17ListOrganizationImpacts\x12=.google.cloud.servicehealth.v1.ListOrganizationImpactsRequest\x1a>.google.cloud.servicehealth.v1.ListOrganizationImpactsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.rb new file mode 100644 index 000000000000..60b89ba52554 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.rb @@ -0,0 +1,718 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceHealth + module V1 + # Represents service health events that may affect Google Cloud products. + # Event resource is a read-only view and does not allow any modifications. All + # fields are output only. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Name of the event. Unique name of the event in + # this scope including project and location using the form + # `projects/{project_id}/locations/{location}/events/{event_id}`. + # @!attribute [r] title + # @return [::String] + # Output only. Brief description for the event. + # @!attribute [r] description + # @return [::String] + # Output only. Free-form, human-readable description. + # @!attribute [r] category + # @return [::Google::Cloud::ServiceHealth::V1::Event::EventCategory] + # Output only. The category of the event. + # @!attribute [r] detailed_category + # @return [::Google::Cloud::ServiceHealth::V1::Event::DetailedCategory] + # Output only. The detailed category of the event. + # @!attribute [r] state + # @return [::Google::Cloud::ServiceHealth::V1::Event::State] + # Output only. The current state of the event. + # @!attribute [r] detailed_state + # @return [::Google::Cloud::ServiceHealth::V1::Event::DetailedState] + # Output only. The current detailed state of the incident. + # @!attribute [rw] event_impacts + # @return [::Array<::Google::Cloud::ServiceHealth::V1::EventImpact>] + # Google Cloud products and locations impacted by the event. + # @!attribute [r] relevance + # @return [::Google::Cloud::ServiceHealth::V1::Event::Relevance] + # Output only. Communicates why a given event is deemed relevant in the + # context of a given project. + # @!attribute [r] updates + # @return [::Array<::Google::Cloud::ServiceHealth::V1::EventUpdate>] + # Output only. Event updates are correspondence from Google. + # @!attribute [r] parent_event + # @return [::String] + # Output only. When `detailed_state`=`MERGED`, `parent_event` contains the + # name of the parent event. All further updates will be published to the + # parent event. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the event was last modified. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The start time of the event, if applicable. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The end time of the event, if applicable. + # @!attribute [r] next_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the next update can be expected. + class Event + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The category of the event. This enum lists all possible categories of + # event. + module EventCategory + # Unspecified category. + EVENT_CATEGORY_UNSPECIFIED = 0 + + # Event category for service outage or degradation. + INCIDENT = 2 + end + + # The detailed category of an event. Contains all possible states for all + # event categories. + module DetailedCategory + # Unspecified detailed category. + DETAILED_CATEGORY_UNSPECIFIED = 0 + + # Indicates an event with category INCIDENT has a confirmed impact to at + # least one Google Cloud product. + CONFIRMED_INCIDENT = 1 + + # Indicates an event with category INCIDENT is under investigation to + # determine if it has a confirmed impact on any Google Cloud products. + EMERGING_INCIDENT = 2 + end + + # The state of the event. This enum lists all possible states of event. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Event is actively affecting a Google Cloud product and will continue to + # receive updates. + ACTIVE = 1 + + # Event is no longer affecting the Google Cloud product or has been merged + # with another event. + CLOSED = 2 + end + + # The detailed state of the incident. This enum lists all possible detailed + # states of an incident. + module DetailedState + # Unspecified detail state. + DETAILED_STATE_UNSPECIFIED = 0 + + # Google engineers are actively investigating the event to determine the + # impact. + EMERGING = 1 + + # The incident is confirmed and impacting at least one Google Cloud + # product. Ongoing status updates will be provided until it is resolved. + CONFIRMED = 2 + + # The incident is no longer affecting any Google Cloud product, and there + # will be no further updates. + RESOLVED = 3 + + # The incident was merged into a parent incident. All further updates will + # be published to the parent only. The `parent_event` field contains the + # name of the parent. + MERGED = 4 + + # The incident was automatically closed because of the following reasons: + # + # * The impact of the incident could not be confirmed. + # * The incident was intermittent or resolved itself. + # + # The incident does not have a resolution because no action or + # investigation happened. If it is intermittent, the incident may reopen. + AUTO_CLOSED = 9 + + # Upon investigation, Google engineers concluded that the incident is not + # affecting a Google Cloud product. This state can change if the incident + # is reviewed again. + FALSE_POSITIVE = 10 + end + + # Communicates why a given incident is deemed relevant in the context of a + # given project. This enum lists all possible detailed states of relevance. + module Relevance + # Unspecified relevance. + RELEVANCE_UNSPECIFIED = 0 + + # The relevance of the incident to the project is unknown. + UNKNOWN = 2 + + # The incident does not impact the project. + NOT_IMPACTED = 6 + + # The incident is associated with a Google Cloud product your project uses, + # but the incident may not be impacting your project. For example, the + # incident may be impacting a Google Cloud product that your project uses, + # but in a location that your project does not use. + PARTIALLY_RELATED = 7 + + # The incident has a direct connection with your project and impacts a + # Google Cloud product in a location your project uses. + RELATED = 8 + + # The incident is verified to be impacting your project. + IMPACTED = 9 + end + end + + # Represents service health events that may affect Google Cloud products used + # across the organization. It is a read-only view and does not allow any + # modifications. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Name of the event. Unique name of the event in + # this scope including organization ID and location using the form + # `organizations/{organization_id}/locations/{location}/organizationEvents/{event_id}`. + # + # `organization_id` - see [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ # `location` - The location to get the service health events from.
+ # `event_id` - Organization event ID to retrieve. + # @!attribute [r] title + # @return [::String] + # Output only. Brief description for the event. + # @!attribute [r] description + # @return [::String] + # Output only. Free-form, human-readable description. + # @!attribute [r] category + # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent::EventCategory] + # Output only. The category of the event. + # @!attribute [r] detailed_category + # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent::DetailedCategory] + # Output only. The detailed category of the event. + # @!attribute [r] state + # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent::State] + # Output only. The current state of the event. + # @!attribute [r] detailed_state + # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent::DetailedState] + # Output only. The current detailed state of the incident. + # @!attribute [r] event_impacts + # @return [::Array<::Google::Cloud::ServiceHealth::V1::EventImpact>] + # Output only. Represents the Google Cloud products and locations impacted by + # the event. + # @!attribute [r] updates + # @return [::Array<::Google::Cloud::ServiceHealth::V1::EventUpdate>] + # Output only. Incident-only field. Event updates are correspondence from + # Google. + # @!attribute [r] parent_event + # @return [::String] + # Output only. When `detailed_state`=`MERGED`, `parent_event` contains the + # name of the parent event. All further updates will be published to the + # parent event. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the update was posted. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The start time of the event, if applicable. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The end time of the event, if applicable. + # @!attribute [r] next_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Incident-only field. The time when the next update can be + # expected. + class OrganizationEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The category of the event. This enum lists all possible categories of + # event. + module EventCategory + # Unspecified category. + EVENT_CATEGORY_UNSPECIFIED = 0 + + # Event category for service outage or degradation. + INCIDENT = 2 + end + + # The detailed category of an event. Contains all possible states for all + # event categories. + module DetailedCategory + # Unspecified detailed category. + DETAILED_CATEGORY_UNSPECIFIED = 0 + + # Indicates an event with category INCIDENT has a confirmed impact to at + # least one Google Cloud product. + CONFIRMED_INCIDENT = 1 + + # Indicates an event with category INCIDENT is under investigation to + # determine if it has a confirmed impact on any Google Cloud products. + EMERGING_INCIDENT = 2 + end + + # The state of the organization event. This enum lists all possible states of + # event. + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Event is actively affecting a Google Cloud product and will continue to + # receive updates. + ACTIVE = 1 + + # Event is no longer affecting the Google Cloud product or has been merged + # with another event. + CLOSED = 2 + end + + # The detailed state of the incident. This enum lists all possible detailed + # states of an incident. + module DetailedState + # Unspecified detail state. + DETAILED_STATE_UNSPECIFIED = 0 + + # Google engineers are actively investigating the incident to determine the + # impact. + EMERGING = 1 + + # The incident is confirmed and impacting at least one Google Cloud + # product. Ongoing status updates will be provided until it is resolved. + CONFIRMED = 2 + + # The incident is no longer affecting any Google Cloud product, and there + # will be no further updates. + RESOLVED = 3 + + # The incident was merged into a parent event. All further updates will be + # published to the parent only. The `parent_event` contains the name of the + # parent. + MERGED = 4 + + # The incident was automatically closed because of the following reasons: + # + # * The impact of the incident could not be confirmed. + # * The incident was intermittent or resolved itself. + # + # The incident does not have a resolution because no action or + # investigation happened. If it is intermittent, the incident may reopen. + AUTO_CLOSED = 9 + + # Upon investigation, Google engineers concluded that the incident is not + # affecting a Google Cloud product. This state can change if the incident + # is reviewed again. + FALSE_POSITIVE = 10 + end + end + + # Records an update made to the event. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the update was posted. + # @!attribute [r] title + # @return [::String] + # Output only. Brief title for the event. + # @!attribute [r] description + # @return [::String] + # Output only. Free-form, human-readable description. + # @!attribute [r] symptom + # @return [::String] + # Output only. Symptoms of the event, if available. + # @!attribute [r] workaround + # @return [::String] + # Output only. Workaround steps to remediate the event impact, if available. + class EventUpdate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the locations impacted by the event. + # @!attribute [rw] location_name + # @return [::String] + # Location impacted by the event. Example: `"us-central1"` + class Location + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the Google Cloud product impacted by the event. + # @!attribute [rw] product_name + # @return [::String] + # Google Cloud product impacted by the event. Example: `"Google Cloud SQL"` + # @!attribute [rw] id + # @return [::String] + # Unique identifier for the product. + class Product + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the Google Cloud products and locations impacted by the event. + # @!attribute [rw] product + # @return [::Google::Cloud::ServiceHealth::V1::Product] + # Google Cloud product impacted by the event. + # @!attribute [rw] location + # @return [::Google::Cloud::ServiceHealth::V1::Location] + # Location impacted by the event. + class EventImpact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents impact to assets at organizational level. It is a read-only view + # and does not allow any modifications. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Unique name of the organization impact in this + # scope including organization and location using the form + # `organizations/{organization_id}/locations/{location}/organizationImpacts/{organization_impact_id}`. + # + # `organization_id` - ID (number) of the organization that contains the + # event. To get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ # `organization_impact_id` - ID of the [OrganizationImpact + # resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + # @!attribute [r] events + # @return [::Array<::String>] + # Output only. A list of event names impacting the asset. + # @!attribute [r] asset + # @return [::Google::Cloud::ServiceHealth::V1::Asset] + # Output only. Google Cloud asset possibly impacted by the specified events. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the affected project was last modified. + class OrganizationImpact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the asset impacted by the events. + # @!attribute [r] asset_name + # @return [::String] + # Output only. Full name of the resource as defined in + # [Resource + # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name). + # @!attribute [r] asset_type + # @return [::String] + # Output only. Type of the asset. Example: + # `"cloudresourcemanager.googleapis.com/Project"` + class Asset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Requests list of events. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value using the form + # `projects/{project_id}/locations/{location}/events`. + # + # `project_id` - ID of the project for which to list service health + # events. + # `location` - The location to get the service health events from. + # To retrieve service health events of category = INCIDENT, use `location` = + # `global`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of events that should be returned. Acceptable + # values are 1 to 100, inclusive. (The default value is 10.) If more results + # are available, the service returns a next_page_token that you can use to + # get the next page of results in subsequent list requests. The service may + # return fewer events than the requested page_size. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # Provide Page token returned by a previous `ListEvents` call to retrieve the + # next page of results. When paginating, all other parameters provided to + # `ListEvents` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters resources listed in the + # response. The expression takes the following forms:
+ # * field=value for `category` and `state`
+ # * field <, >, <=, or >= value for `update_time`
+ # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, + # `event_impacts.product.product_name:"Eventarc"` + #
+ # + # Multiple filter queries are separated by spaces. Example: + # `category=INCIDENT state=ACTIVE`. + # + # By default, each expression is an AND expression. However, you can include + # AND and OR expressions explicitly. + # + # Filter is supported for the following fields: `category`, `state`, + # `update_time`, `event_impacts.product.product_name` + # @!attribute [rw] view + # @return [::Google::Cloud::ServiceHealth::V1::EventView] + # Optional. Event fields to include in response. + class ListEventsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to request for listing events. + # @!attribute [r] events + # @return [::Array<::Google::Cloud::ServiceHealth::V1::Event>] + # Output only. List of events. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The continuation token, used to page through large result + # sets. Provide this value in a subsequent request as page_token to retrieve + # the next page. + # + # If this field is not present, there are no subsequent results. + # @!attribute [r] unreachable + # @return [::Array<::String>] + # Output only. Locations that could not be reached. + class ListEventsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Gets information about a specific event. + # @!attribute [rw] name + # @return [::String] + # Required. Unique name of the event in this scope including project + # and location using the form + # `projects/{project_id}/locations/{location}/events/{event_id}`. + # + # `project_id` - Project ID of the project that contains the event.
+ # `location` - The location to get the service health events from.
+ # `event_id` - Event ID to retrieve. + class GetEventRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Requests list of events that affect an organization. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value using the form + # `organizations/{organization_id}/locations/{location}/organizationEvents`. + # + # `organization_id` - ID (number) of the project that contains the event. To + # get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ # `location` - The location to get the service health events from. To + # retrieve service health events of category = INCIDENT, use `location` = + # `global`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of events that should be returned. Acceptable + # values are `1` to `100`, inclusive. (The default value is `10`.) If more + # results are available, the service returns a `next_page_token` that you can + # use to get the next page of results in subsequent list requests. The + # service may return fewer events than the requested `page_size`. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # + # Provide Page token returned by a previous `ListOrganizationEvents` call to + # retrieve the next page of results. + # + # When paginating, all other parameters provided to + # `ListOrganizationEvents` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters resources listed in the + # response. The expression takes the following forms: + # + # * field=value for `category` and `state` + # * field <, >, <=, or >= value for `update_time` + # + # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` + # + # Multiple filter queries are space-separated. Example: + # `category=INCIDENT state=ACTIVE`. + # + # By default, each expression is an AND expression. However, you can include + # AND and OR expressions explicitly. + # + # Filter is supported for the following fields: `category`, `state`, + # `update_time` + # @!attribute [rw] view + # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEventView] + # Optional. OrganizationEvent fields to include in response. + class ListOrganizationEventsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to request for listing organization events. + # @!attribute [r] organization_events + # @return [::Array<::Google::Cloud::ServiceHealth::V1::OrganizationEvent>] + # Output only. List of organization events affecting an organization. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The continuation token, used to page through large result + # sets. Provide this value in a subsequent request as `page_token` to + # retrieve the next page. + # + # If this field is not present, there are no subsequent results. + # @!attribute [r] unreachable + # @return [::Array<::String>] + # Output only. Locations that could not be reached. + class ListOrganizationEventsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Gets information about a specific event affecting an organization. + # @!attribute [rw] name + # @return [::String] + # Required. Unique name of the event in this scope including organization and + # event ID using the form + # `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. + # + # `organization_id` - ID (number) of the project that contains the event. To + # get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ # `event_id` - Organization event ID to retrieve. + class GetOrganizationEventRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Requests list of projects under an organization affected by an event. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value using the form + # `organizations/{organization_id}/locations/{location}/organizationImpacts`. + # + # `organization_id` - ID (number) of the project that contains the event. To + # get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of events that should be returned. Acceptable + # values are `1` to `100`, inclusive. The default value is `10`. + # + # If more results are available, the service returns a + # `next_page_token` that can be used to get the next page of results in + # subsequent list requests. The service may return fewer + # [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + # than the requested `page_size`. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # + # Provide `page_token` returned by a previous `ListOrganizationImpacts` call + # to retrieve the next page of results. + # + # When paginating, all other parameters provided to `ListOrganizationImpacts` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter expression that filters resources listed in the + # response. The expression is in the form of `field:value` for checking if a + # repeated field contains a value. + # + # Example: + # `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` + # + # To get your `{organization_id}`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + # + # Multiple filter queries are separated by spaces. + # + # By default, each expression is an AND expression. However, you can include + # AND and OR expressions explicitly. + # Filter is supported for the following fields: `events`. + class ListOrganizationImpactsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to request for listing projects under an organization affected by an + # event. + # @!attribute [r] organization_impacts + # @return [::Array<::Google::Cloud::ServiceHealth::V1::OrganizationImpact>] + # Output only. List of + # [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) + # for an organization affected by service health events. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The continuation token, used to page through large result + # sets. Provide this value in a subsequent request as `page_token` to + # retrieve the next page. + # + # If this field is not present, there are no subsequent results. + # @!attribute [r] unreachable + # @return [::Array<::String>] + # Output only. Locations that could not be reached. + class ListOrganizationImpactsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Gets information about an event that affects a project under an organization. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource using the form + # `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. + # + # `organization_id` - ID (number) of the organization that contains the + # event. To get your `organization_id`, see + # [Getting your organization resource + # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+ # `organization_impact_id` - ID of the [OrganizationImpact + # resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). + class GetOrganizationImpactRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The event fields to include in ListEvents API response. This enum lists all + # possible event views. + module EventView + # Unspecified event view. Default to `EVENT_VIEW_BASIC`. + EVENT_VIEW_UNSPECIFIED = 0 + + # Includes all fields except `updates`. This view is the default for + # ListEvents API. + EVENT_VIEW_BASIC = 1 + + # Includes all event fields. + EVENT_VIEW_FULL = 2 + end + + # The organization event fields to include in ListOrganizationEvents API + # response. This enum lists all possible organization event views. + module OrganizationEventView + # Unspecified event view. Default to `ORGANIZATION_EVENT_VIEW_BASIC`. + ORGANIZATION_EVENT_VIEW_UNSPECIFIED = 0 + + # Includes all organization event fields except `updates`. This view is the + # default for ListOrganizationEvents API. + ORGANIZATION_EVENT_VIEW_BASIC = 1 + + # Includes all organization event fields. + ORGANIZATION_EVENT_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-service_health-v1/snippets/Gemfile new file mode 100644 index 000000000000..299f6cda7aba --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-service_health-v1", path: "../" +else + gem "google-cloud-service_health-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_event.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_event.rb new file mode 100644 index 000000000000..23479740a8e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_event.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicehealth_v1_generated_ServiceHealth_GetEvent_sync] +require "google/cloud/service_health/v1" + +## +# Snippet for the get_event call in the ServiceHealth service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_event. +# +def get_event + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceHealth::V1::GetEventRequest.new + + # Call the get_event method. + result = client.get_event request + + # The returned object is of type Google::Cloud::ServiceHealth::V1::Event. + p result +end +# [END servicehealth_v1_generated_ServiceHealth_GetEvent_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_event.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_event.rb new file mode 100644 index 000000000000..df9646decbc0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_event.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicehealth_v1_generated_ServiceHealth_GetOrganizationEvent_sync] +require "google/cloud/service_health/v1" + +## +# Snippet for the get_organization_event call in the ServiceHealth service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_event. +# +def get_organization_event + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new + + # Call the get_organization_event method. + result = client.get_organization_event request + + # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationEvent. + p result +end +# [END servicehealth_v1_generated_ServiceHealth_GetOrganizationEvent_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_impact.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_impact.rb new file mode 100644 index 000000000000..f0a376741737 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_impact.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicehealth_v1_generated_ServiceHealth_GetOrganizationImpact_sync] +require "google/cloud/service_health/v1" + +## +# Snippet for the get_organization_impact call in the ServiceHealth service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_impact. +# +def get_organization_impact + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new + + # Call the get_organization_impact method. + result = client.get_organization_impact request + + # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationImpact. + p result +end +# [END servicehealth_v1_generated_ServiceHealth_GetOrganizationImpact_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_events.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_events.rb new file mode 100644 index 000000000000..53e9fc3e5458 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_events.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicehealth_v1_generated_ServiceHealth_ListEvents_sync] +require "google/cloud/service_health/v1" + +## +# Snippet for the list_events call in the ServiceHealth service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_events. +# +def list_events + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceHealth::V1::ListEventsRequest.new + + # Call the list_events method. + result = client.list_events request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ServiceHealth::V1::Event. + p item + end +end +# [END servicehealth_v1_generated_ServiceHealth_ListEvents_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_events.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_events.rb new file mode 100644 index 000000000000..9d25933b9164 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_events.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicehealth_v1_generated_ServiceHealth_ListOrganizationEvents_sync] +require "google/cloud/service_health/v1" + +## +# Snippet for the list_organization_events call in the ServiceHealth service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_events. +# +def list_organization_events + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new + + # Call the list_organization_events method. + result = client.list_organization_events request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationEvent. + p item + end +end +# [END servicehealth_v1_generated_ServiceHealth_ListOrganizationEvents_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_impacts.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_impacts.rb new file mode 100644 index 000000000000..2fdbd490e47d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_impacts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicehealth_v1_generated_ServiceHealth_ListOrganizationImpacts_sync] +require "google/cloud/service_health/v1" + +## +# Snippet for the list_organization_impacts call in the ServiceHealth service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_impacts. +# +def list_organization_impacts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new + + # Call the list_organization_impacts method. + result = client.list_organization_impacts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationImpact. + p item + end +end +# [END servicehealth_v1_generated_ServiceHealth_ListOrganizationImpacts_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/snippet_metadata_google.cloud.servicehealth.v1.json b/owl-bot-staging/google-cloud-service_health-v1/snippets/snippet_metadata_google.cloud.servicehealth.v1.json new file mode 100644 index 000000000000..64879231d0a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/snippets/snippet_metadata_google.cloud.servicehealth.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-cloud-service_health-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.servicehealth.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "servicehealth_v1_generated_ServiceHealth_ListEvents_sync", + "title": "Snippet for the list_events call in the ServiceHealth service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_events.", + "file": "service_health/list_events.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_events", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_events", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceHealth::V1::ListEventsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceHealth::V1::ListEventsResponse", + "client": { + "short_name": "ServiceHealth::Client", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" + }, + "method": { + "short_name": "ListEvents", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth.ListEvents", + "service": { + "short_name": "ServiceHealth", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicehealth_v1_generated_ServiceHealth_GetEvent_sync", + "title": "Snippet for the get_event call in the ServiceHealth service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_event.", + "file": "service_health/get_event.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_event", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_event", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceHealth::V1::GetEventRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceHealth::V1::Event", + "client": { + "short_name": "ServiceHealth::Client", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" + }, + "method": { + "short_name": "GetEvent", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth.GetEvent", + "service": { + "short_name": "ServiceHealth", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicehealth_v1_generated_ServiceHealth_ListOrganizationEvents_sync", + "title": "Snippet for the list_organization_events call in the ServiceHealth service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_events.", + "file": "service_health/list_organization_events.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_organization_events", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_events", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse", + "client": { + "short_name": "ServiceHealth::Client", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" + }, + "method": { + "short_name": "ListOrganizationEvents", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth.ListOrganizationEvents", + "service": { + "short_name": "ServiceHealth", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicehealth_v1_generated_ServiceHealth_GetOrganizationEvent_sync", + "title": "Snippet for the get_organization_event call in the ServiceHealth service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_event.", + "file": "service_health/get_organization_event.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_organization_event", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_event", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceHealth::V1::OrganizationEvent", + "client": { + "short_name": "ServiceHealth::Client", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" + }, + "method": { + "short_name": "GetOrganizationEvent", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth.GetOrganizationEvent", + "service": { + "short_name": "ServiceHealth", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicehealth_v1_generated_ServiceHealth_ListOrganizationImpacts_sync", + "title": "Snippet for the list_organization_impacts call in the ServiceHealth service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_impacts.", + "file": "service_health/list_organization_impacts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_organization_impacts", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_impacts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse", + "client": { + "short_name": "ServiceHealth::Client", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" + }, + "method": { + "short_name": "ListOrganizationImpacts", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth.ListOrganizationImpacts", + "service": { + "short_name": "ServiceHealth", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicehealth_v1_generated_ServiceHealth_GetOrganizationImpact_sync", + "title": "Snippet for the get_organization_impact call in the ServiceHealth service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_impact.", + "file": "service_health/get_organization_impact.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_organization_impact", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_impact", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceHealth::V1::OrganizationImpact", + "client": { + "short_name": "ServiceHealth::Client", + "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" + }, + "method": { + "short_name": "GetOrganizationImpact", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth.GetOrganizationImpact", + "service": { + "short_name": "ServiceHealth", + "full_name": "google.cloud.servicehealth.v1.ServiceHealth" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_paths_test.rb b/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_paths_test.rb new file mode 100644 index 000000000000..230902f0df17 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_paths_test.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/service_health/v1/service_health" + +class ::Google::Cloud::ServiceHealth::V1::ServiceHealth::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_event_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.event_path project: "value0", location: "value1", event: "value2" + assert_equal "projects/value0/locations/value1/events/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_organization_event_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_event_path organization: "value0", location: "value1", event: "value2" + assert_equal "organizations/value0/locations/value1/organizationEvents/value2", path + end + end + + def test_organization_impact_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_impact_path organization: "value0", location: "value1", organization_impact: "value2" + assert_equal "organizations/value0/locations/value1/organizationImpacts/value2", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_test.rb b/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_test.rb new file mode 100644 index 000000000000..d7fb92ff8f2d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_test.rb @@ -0,0 +1,434 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/servicehealth/v1/event_service_pb" +require "google/cloud/service_health/v1/service_health/rest" + + +class ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_events + # Create test objects. + client_result = ::Google::Cloud::ServiceHealth::V1::ListEventsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + view = :EVENT_VIEW_UNSPECIFIED + + list_events_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_list_events_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_events_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_events parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_events ::Google::Cloud::ServiceHealth::V1::ListEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_events(::Google::Cloud::ServiceHealth::V1::ListEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_events_client_stub.call_count + end + end + end + + def test_get_event + # Create test objects. + client_result = ::Google::Cloud::ServiceHealth::V1::Event.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_get_event_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_event_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_event({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_event name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_event ::Google::Cloud::ServiceHealth::V1::GetEventRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_event({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_event(::Google::Cloud::ServiceHealth::V1::GetEventRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_event_client_stub.call_count + end + end + end + + def test_list_organization_events + # Create test objects. + client_result = ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + view = :ORGANIZATION_EVENT_VIEW_UNSPECIFIED + + list_organization_events_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_list_organization_events_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_organization_events_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_organization_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_organization_events parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_organization_events ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_organization_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_organization_events(::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_organization_events_client_stub.call_count + end + end + end + + def test_get_organization_event + # Create test objects. + client_result = ::Google::Cloud::ServiceHealth::V1::OrganizationEvent.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_organization_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_get_organization_event_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_organization_event_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_organization_event({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_organization_event name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_organization_event ::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_organization_event({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_organization_event(::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_organization_event_client_stub.call_count + end + end + end + + def test_list_organization_impacts + # Create test objects. + client_result = ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_organization_impacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_list_organization_impacts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_organization_impacts_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_organization_impacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_organization_impacts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_organization_impacts ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_organization_impacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_organization_impacts(::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_organization_impacts_client_stub.call_count + end + end + end + + def test_get_organization_impact + # Create test objects. + client_result = ::Google::Cloud::ServiceHealth::V1::OrganizationImpact.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_organization_impact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_get_organization_impact_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_organization_impact_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_organization_impact({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_organization_impact name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_organization_impact ::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_organization_impact({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_organization_impact(::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_organization_impact_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_test.rb b/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_test.rb new file mode 100644 index 000000000000..3112ba40ae62 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_test.rb @@ -0,0 +1,489 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/servicehealth/v1/event_service_pb" +require "google/cloud/service_health/v1/service_health" + +class ::Google::Cloud::ServiceHealth::V1::ServiceHealth::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_events + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceHealth::V1::ListEventsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + view = :EVENT_VIEW_UNSPECIFIED + + list_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_events, name + assert_kind_of ::Google::Cloud::ServiceHealth::V1::ListEventsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal :EVENT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_events_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_events parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_events ::Google::Cloud::ServiceHealth::V1::ListEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_events(::Google::Cloud::ServiceHealth::V1::ListEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_events_client_stub.call_rpc_count + end + end + + def test_get_event + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceHealth::V1::Event.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_event, name + assert_kind_of ::Google::Cloud::ServiceHealth::V1::GetEventRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_event_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_event({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_event name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_event ::Google::Cloud::ServiceHealth::V1::GetEventRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_event({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_event(::Google::Cloud::ServiceHealth::V1::GetEventRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_event_client_stub.call_rpc_count + end + end + + def test_list_organization_events + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + view = :ORGANIZATION_EVENT_VIEW_UNSPECIFIED + + list_organization_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_organization_events, name + assert_kind_of ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal :ORGANIZATION_EVENT_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_organization_events_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_organization_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_organization_events parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_organization_events ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_organization_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_organization_events(::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_organization_events_client_stub.call_rpc_count + end + end + + def test_get_organization_event + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceHealth::V1::OrganizationEvent.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_organization_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_organization_event, name + assert_kind_of ::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_organization_event_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_organization_event({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_organization_event name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_organization_event ::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_organization_event({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_organization_event(::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_organization_event_client_stub.call_rpc_count + end + end + + def test_list_organization_impacts + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_organization_impacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_organization_impacts, name + assert_kind_of ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_organization_impacts_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_organization_impacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_organization_impacts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_organization_impacts ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_organization_impacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_organization_impacts(::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_organization_impacts_client_stub.call_rpc_count + end + end + + def test_get_organization_impact + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceHealth::V1::OrganizationImpact.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_organization_impact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_organization_impact, name + assert_kind_of ::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_organization_impact_client_stub do + # Create client + c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_organization_impact({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_organization_impact name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_organization_impact ::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_organization_impact({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_organization_impact(::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_organization_impact_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-service_health-v1/test/helper.rb b/owl-bot-staging/google-cloud-service_health-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_health-v1/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_management-v1/.gitignore b/owl-bot-staging/google-cloud-service_management-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/.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_management-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-service_management-v1/.repo-metadata.json new file mode 100644 index 000000000000..966c229fd1cf --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "servicemanagement.googleapis.com", + "api_shortname": "servicemanagement", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest", + "distribution_name": "google-cloud-service_management-v1", + "is_cloud": true, + "language": "ruby", + "name": "servicemanagement", + "name_pretty": "Service Management V1 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": "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers. Note that google-cloud-service_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_management instead. See the readme for more details.", + "ruby-cloud-env-prefix": "SERVICE_MANAGEMENT", + "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_management-v1/.rubocop.yml b/owl-bot-staging/google-cloud-service_management-v1/.rubocop.yml new file mode 100644 index 000000000000..af3b43f29aeb --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-service_management-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-service_management-v1.rb" diff --git a/owl-bot-staging/google-cloud-service_management-v1/.toys.rb b/owl-bot-staging/google-cloud-service_management-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/.yardopts b/owl-bot-staging/google-cloud-service_management-v1/.yardopts new file mode 100644 index 000000000000..50c42b3fcd2e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Service Management V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-service_management-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_management-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..cf5a3d474532 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-service_management-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-service_management-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/service_management/v1" + +client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/service_management/v1" + +::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-service_management-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/service_management/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-service_management-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-service_management-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-service_management-v1/Gemfile b/owl-bot-staging/google-cloud-service_management-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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_management-v1/LICENSE.md b/owl-bot-staging/google-cloud-service_management-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-service_management-v1/README.md b/owl-bot-staging/google-cloud-service_management-v1/README.md new file mode 100644 index 000000000000..75cba9a061ce --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Service Management V1 API + +Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Service Management V1 API. Most users should consider using +the main client gem, +[google-cloud-service_management](https://rubygems.org/gems/google-cloud-service_management). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-service_management-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/servicemanagement.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/service_management/v1" + +client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new +request = ::Google::Cloud::ServiceManagement::V1::ListServicesRequest.new # (request fields as keyword arguments...) +response = client.list_services request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/service-infrastructure/docs/overview/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/service_management/v1" +require "logger" + +client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-service_management`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-service_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-service_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-service_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-service_management-v1/Rakefile b/owl-bot-staging/google-cloud-service_management-v1/Rakefile new file mode 100644 index 000000000000..2de06523c37d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-service_management-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SERVICE_MANAGEMENT_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SERVICE_MANAGEMENT_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SERVICE_MANAGEMENT_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_MANAGEMENT_TEST_PROJECT=test123 SERVICE_MANAGEMENT_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/service_management/v1/service_manager/credentials" + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SERVICE_MANAGEMENT_PROJECT"] = project + ENV["SERVICE_MANAGEMENT_TEST_PROJECT"] = project + ENV["SERVICE_MANAGEMENT_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_management-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-service_management-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-service_management-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-service_management-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-service_management-v1" + header "google-cloud-service_management-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-service_management-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-service_management-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-service_management-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-service_management-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-service_management-v1/gapic_metadata.json new file mode 100644 index 000000000000..329aa618c796 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/gapic_metadata.json @@ -0,0 +1,83 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.api.servicemanagement.v1", + "libraryPackage": "::Google::Cloud::ServiceManagement::V1", + "services": { + "ServiceManager": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client", + "rpcs": { + "ListServices": { + "methods": [ + "list_services" + ] + }, + "GetService": { + "methods": [ + "get_service" + ] + }, + "CreateService": { + "methods": [ + "create_service" + ] + }, + "DeleteService": { + "methods": [ + "delete_service" + ] + }, + "UndeleteService": { + "methods": [ + "undelete_service" + ] + }, + "ListServiceConfigs": { + "methods": [ + "list_service_configs" + ] + }, + "GetServiceConfig": { + "methods": [ + "get_service_config" + ] + }, + "CreateServiceConfig": { + "methods": [ + "create_service_config" + ] + }, + "SubmitConfigSource": { + "methods": [ + "submit_config_source" + ] + }, + "ListServiceRollouts": { + "methods": [ + "list_service_rollouts" + ] + }, + "GetServiceRollout": { + "methods": [ + "get_service_rollout" + ] + }, + "CreateServiceRollout": { + "methods": [ + "create_service_rollout" + ] + }, + "GenerateConfigReport": { + "methods": [ + "generate_config_report" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-service_management-v1/google-cloud-service_management-v1.gemspec b/owl-bot-staging/google-cloud-service_management-v1/google-cloud-service_management-v1.gemspec new file mode 100644 index 000000000000..2307d1cd8ad4 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/google-cloud-service_management-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/service_management/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-service_management-v1" + gem.version = Google::Cloud::ServiceManagement::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers. Note that google-cloud-service_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_management instead. See the readme for more details." + gem.summary = "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google-cloud-service_management-v1.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google-cloud-service_management-v1.rb new file mode 100644 index 000000000000..49cad33ce88e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google-cloud-service_management-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/service_management/v1" diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/resources_pb.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/resources_pb.rb new file mode 100644 index 000000000000..314a07cea044 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/resources_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/servicemanagement/v1/resources.proto + +require 'google/protobuf' + +require 'google/api/config_change_pb' +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n/google/api/servicemanagement/v1/resources.proto\x12\x1fgoogle.api.servicemanagement.v1\x1a\x1egoogle/api/config_change.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"C\n\x0eManagedService\x12\x14\n\x0cservice_name\x18\x02 \x01(\t\x12\x1b\n\x13producer_project_id\x18\x03 \x01(\t\"\x91\x03\n\x11OperationMetadata\x12\x16\n\x0eresource_names\x18\x01 \x03(\t\x12\x46\n\x05steps\x18\x02 \x03(\x0b\x32\x37.google.api.servicemanagement.v1.OperationMetadata.Step\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x05\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x66\n\x04Step\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12I\n\x06status\x18\x04 \x01(\x0e\x32\x39.google.api.servicemanagement.v1.OperationMetadata.Status\"g\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44ONE\x10\x01\x12\x0f\n\x0bNOT_STARTED\x10\x02\x12\x0f\n\x0bIN_PROGRESS\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\x8f\x01\n\nDiagnostic\x12\x10\n\x08location\x18\x01 \x01(\t\x12>\n\x04kind\x18\x02 \x01(\x0e\x32\x30.google.api.servicemanagement.v1.Diagnostic.Kind\x12\x0f\n\x07message\x18\x03 \x01(\t\"\x1e\n\x04Kind\x12\x0b\n\x07WARNING\x10\x00\x12\t\n\x05\x45RROR\x10\x01\"V\n\x0c\x43onfigSource\x12\n\n\x02id\x18\x05 \x01(\t\x12:\n\x05\x66iles\x18\x02 \x03(\x0b\x32+.google.api.servicemanagement.v1.ConfigFile\"\x95\x02\n\nConfigFile\x12\x11\n\tfile_path\x18\x01 \x01(\t\x12\x15\n\rfile_contents\x18\x03 \x01(\x0c\x12G\n\tfile_type\x18\x04 \x01(\x0e\x32\x34.google.api.servicemanagement.v1.ConfigFile.FileType\"\x93\x01\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13SERVICE_CONFIG_YAML\x10\x01\x12\x11\n\rOPEN_API_JSON\x10\x02\x12\x11\n\rOPEN_API_YAML\x10\x03\x12\x1d\n\x19\x46ILE_DESCRIPTOR_SET_PROTO\x10\x04\x12\x0e\n\nPROTO_FILE\x10\x06\"\x19\n\tConfigRef\x12\x0c\n\x04name\x18\x01 \x01(\t\"@\n\x0c\x43hangeReport\x12\x30\n\x0e\x63onfig_changes\x18\x01 \x03(\x0b\x32\x18.google.api.ConfigChange\"\xf9\x05\n\x07Rollout\x12\x17\n\nrollout_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ncreated_by\x18\x03 \x01(\t\x12\x46\n\x06status\x18\x04 \x01(\x0e\x32\x36.google.api.servicemanagement.v1.Rollout.RolloutStatus\x12\x63\n\x18traffic_percent_strategy\x18\x05 \x01(\x0b\x32?.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategyH\x00\x12\x62\n\x17\x64\x65lete_service_strategy\x18\xc8\x01 \x01(\x0b\x32>.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategyH\x00\x12\x14\n\x0cservice_name\x18\x08 \x01(\t\x1a\xb3\x01\n\x16TrafficPercentStrategy\x12\x65\n\x0bpercentages\x18\x01 \x03(\x0b\x32P.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.PercentagesEntry\x1a\x32\n\x10PercentagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x17\n\x15\x44\x65leteServiceStrategy\"\x8d\x01\n\rRolloutStatus\x12\x1e\n\x1aROLLOUT_STATUS_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\x0b\n\x07SUCCESS\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0b\n\x07PENDING\x10\x05\x12\x16\n\x12\x46\x41ILED_ROLLED_BACK\x10\x06\x42\n\n\x08strategyB\x82\x02\n#com.google.api.servicemanagement.v1B\x0eResourcesProtoP\x01ZScloud.google.com/go/servicemanagement/apiv1/servicemanagementpb;servicemanagementpb\xa2\x02\x04GASM\xaa\x02!Google.Cloud.ServiceManagement.V1\xca\x02!Google\\Cloud\\ServiceManagement\\V1\xea\x02$Google::Cloud::ServiceManagement::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceManagement + module V1 + ManagedService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ManagedService").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.OperationMetadata").msgclass + OperationMetadata::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.OperationMetadata.Step").msgclass + OperationMetadata::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.OperationMetadata.Status").enummodule + Diagnostic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Diagnostic").msgclass + Diagnostic::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Diagnostic.Kind").enummodule + ConfigSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ConfigSource").msgclass + ConfigFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ConfigFile").msgclass + ConfigFile::FileType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ConfigFile.FileType").enummodule + ConfigRef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ConfigRef").msgclass + ChangeReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ChangeReport").msgclass + Rollout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Rollout").msgclass + Rollout::TrafficPercentStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy").msgclass + Rollout::DeleteServiceStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy").msgclass + Rollout::RolloutStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Rollout.RolloutStatus").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_pb.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_pb.rb new file mode 100644 index 000000000000..6e78a42d7363 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/servicemanagement/v1/servicemanager.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/service_pb' +require 'google/api/servicemanagement/v1/resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/any_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n4google/api/servicemanagement/v1/servicemanager.proto\x12\x1fgoogle.api.servicemanagement.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x18google/api/service.proto\x1a/google/api/servicemanagement/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\"r\n\x13ListServicesRequest\x12\x1b\n\x13producer_project_id\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\x12\x17\n\x0b\x63onsumer_id\x18\x07 \x01(\tB\x02\x18\x01\"r\n\x14ListServicesResponse\x12\x41\n\x08services\x18\x01 \x03(\x0b\x32/.google.api.servicemanagement.v1.ManagedService\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\".\n\x11GetServiceRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"]\n\x14\x43reateServiceRequest\x12\x45\n\x07service\x18\x01 \x01(\x0b\x32/.google.api.servicemanagement.v1.ManagedServiceB\x03\xe0\x41\x02\"1\n\x14\x44\x65leteServiceRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"3\n\x16UndeleteServiceRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"[\n\x17UndeleteServiceResponse\x12@\n\x07service\x18\x01 \x01(\x0b\x32/.google.api.servicemanagement.v1.ManagedService\"\xc2\x01\n\x17GetServiceConfigRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tconfig_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x04view\x18\x03 \x01(\x0e\x32\x43.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView\"!\n\nConfigView\x12\t\n\x05\x42\x41SIC\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\"]\n\x19ListServiceConfigsRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"c\n\x1aListServiceConfigsResponse\x12,\n\x0fservice_configs\x18\x01 \x03(\x0b\x32\x13.google.api.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"i\n\x1a\x43reateServiceConfigRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x30\n\x0eservice_config\x18\x02 \x01(\x0b\x32\x13.google.api.ServiceB\x03\xe0\x41\x02\"\x9d\x01\n\x19SubmitConfigSourceRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\rconfig_source\x18\x02 \x01(\x0b\x32-.google.api.servicemanagement.v1.ConfigSourceB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"I\n\x1aSubmitConfigSourceResponse\x12+\n\x0eservice_config\x18\x01 \x01(\x0b\x32\x13.google.api.Service\"x\n\x1b\x43reateServiceRolloutRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12>\n\x07rollout\x18\x02 \x01(\x0b\x32(.google.api.servicemanagement.v1.RolloutB\x03\xe0\x41\x02\"s\n\x1aListServiceRolloutsRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x02\"r\n\x1bListServiceRolloutsResponse\x12:\n\x08rollouts\x18\x01 \x03(\x0b\x32(.google.api.servicemanagement.v1.Rollout\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x18GetServiceRolloutRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrollout_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15\x45nableServiceResponse\"{\n\x1bGenerateConfigReportRequest\x12-\n\nnew_config\x18\x01 \x01(\x0b\x32\x14.google.protobuf.AnyB\x03\xe0\x41\x02\x12-\n\nold_config\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyB\x03\xe0\x41\x01\"\xc9\x01\n\x1cGenerateConfigReportResponse\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x45\n\x0e\x63hange_reports\x18\x03 \x03(\x0b\x32-.google.api.servicemanagement.v1.ChangeReport\x12@\n\x0b\x64iagnostics\x18\x04 \x03(\x0b\x32+.google.api.servicemanagement.v1.Diagnostic2\xc8\x19\n\x0eServiceManager\x12\xb3\x01\n\x0cListServices\x12\x34.google.api.servicemanagement.v1.ListServicesRequest\x1a\x35.google.api.servicemanagement.v1.ListServicesResponse\"6\xda\x41\x1fproducer_project_id,consumer_id\x82\xd3\xe4\x93\x02\x0e\x12\x0c/v1/services\x12\xa5\x01\n\nGetService\x12\x32.google.api.servicemanagement.v1.GetServiceRequest\x1a/.google.api.servicemanagement.v1.ManagedService\"2\xda\x41\x0cservice_name\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/services/{service_name}\x12\xf5\x01\n\rCreateService\x12\x35.google.api.servicemanagement.v1.CreateServiceRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x63\n.google.api.servicemanagement.v1.ManagedService\x12\x31google.api.servicemanagement.v1.OperationMetadata\xda\x41\x07service\x82\xd3\xe4\x93\x02\x17\"\x0c/v1/services:\x07service\x12\xe6\x01\n\rDeleteService\x12\x35.google.api.servicemanagement.v1.DeleteServiceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.api.servicemanagement.v1.OperationMetadata\xda\x41\x0cservice_name\x82\xd3\xe4\x93\x02\x1d*\x1b/v1/services/{service_name}\x12\x96\x02\n\x0fUndeleteService\x12\x37.google.api.servicemanagement.v1.UndeleteServiceRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41l\n7google.api.servicemanagement.v1.UndeleteServiceResponse\x12\x31google.api.servicemanagement.v1.OperationMetadata\xda\x41\x0cservice_name\x82\xd3\xe4\x93\x02&\"$/v1/services/{service_name}:undelete\x12\xc9\x01\n\x12ListServiceConfigs\x12:.google.api.servicemanagement.v1.ListServiceConfigsRequest\x1a;.google.api.servicemanagement.v1.ListServiceConfigsResponse\":\xda\x41\x0cservice_name\x82\xd3\xe4\x93\x02%\x12#/v1/services/{service_name}/configs\x12\xde\x01\n\x10GetServiceConfig\x12\x38.google.api.servicemanagement.v1.GetServiceConfigRequest\x1a\x13.google.api.Service\"{\xda\x41\x1bservice_name,config_id,view\x82\xd3\xe4\x93\x02W\x12//v1/services/{service_name}/configs/{config_id}Z$\x12\"/v1/services/{service_name}/config\x12\xc2\x01\n\x13\x43reateServiceConfig\x12;.google.api.servicemanagement.v1.CreateServiceConfigRequest\x1a\x13.google.api.Service\"Y\xda\x41\x1bservice_name,service_config\x82\xd3\xe4\x93\x02\x35\"#/v1/services/{service_name}/configs:\x0eservice_config\x12\xc4\x02\n\x12SubmitConfigSource\x12:.google.api.servicemanagement.v1.SubmitConfigSourceRequest\x1a\x1d.google.longrunning.Operation\"\xd2\x01\xca\x41o\n:google.api.servicemanagement.v1.SubmitConfigSourceResponse\x12\x31google.api.servicemanagement.v1.OperationMetadata\xda\x41(service_name,config_source,validate_only\x82\xd3\xe4\x93\x02/\"*/v1/services/{service_name}/configs:submit:\x01*\x12\xd4\x01\n\x13ListServiceRollouts\x12;.google.api.servicemanagement.v1.ListServiceRolloutsRequest\x1a<.google.api.servicemanagement.v1.ListServiceRolloutsResponse\"B\xda\x41\x13service_name,filter\x82\xd3\xe4\x93\x02&\x12$/v1/services/{service_name}/rollouts\x12\xcd\x01\n\x11GetServiceRollout\x12\x39.google.api.servicemanagement.v1.GetServiceRolloutRequest\x1a(.google.api.servicemanagement.v1.Rollout\"S\xda\x41\x17service_name,rollout_id\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/services/{service_name}/rollouts/{rollout_id}\x12\xa1\x02\n\x14\x43reateServiceRollout\x12<.google.api.servicemanagement.v1.CreateServiceRolloutRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41\\\n\'google.api.servicemanagement.v1.Rollout\x12\x31google.api.servicemanagement.v1.OperationMetadata\xda\x41\x14service_name,rollout\x82\xd3\xe4\x93\x02/\"$/v1/services/{service_name}/rollouts:\x07rollout\x12\xd9\x01\n\x14GenerateConfigReport\x12<.google.api.servicemanagement.v1.GenerateConfigReportRequest\x1a=.google.api.servicemanagement.v1.GenerateConfigReportResponse\"D\xda\x41\x15new_config,old_config\x82\xd3\xe4\x93\x02&\"!/v1/services:generateConfigReport:\x01*\x1a\xfd\x01\xca\x41 servicemanagement.googleapis.com\xd2\x41\xd6\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/service.management,https://www.googleapis.com/auth/service.management.readonlyB\x87\x02\n#com.google.api.servicemanagement.v1B\x13ServiceManagerProtoP\x01ZScloud.google.com/go/servicemanagement/apiv1/servicemanagementpb;servicemanagementpb\xa2\x02\x04GASM\xaa\x02!Google.Cloud.ServiceManagement.V1\xca\x02!Google\\Cloud\\ServiceManagement\\V1\xea\x02$Google::Cloud::ServiceManagement::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceManagement + module V1 + ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServicesRequest").msgclass + ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServicesResponse").msgclass + GetServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GetServiceRequest").msgclass + CreateServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.CreateServiceRequest").msgclass + DeleteServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.DeleteServiceRequest").msgclass + UndeleteServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.UndeleteServiceRequest").msgclass + UndeleteServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.UndeleteServiceResponse").msgclass + GetServiceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GetServiceConfigRequest").msgclass + GetServiceConfigRequest::ConfigView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView").enummodule + ListServiceConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServiceConfigsRequest").msgclass + ListServiceConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServiceConfigsResponse").msgclass + CreateServiceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.CreateServiceConfigRequest").msgclass + SubmitConfigSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.SubmitConfigSourceRequest").msgclass + SubmitConfigSourceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.SubmitConfigSourceResponse").msgclass + CreateServiceRolloutRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.CreateServiceRolloutRequest").msgclass + ListServiceRolloutsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServiceRolloutsRequest").msgclass + ListServiceRolloutsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServiceRolloutsResponse").msgclass + GetServiceRolloutRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GetServiceRolloutRequest").msgclass + EnableServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.EnableServiceResponse").msgclass + GenerateConfigReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GenerateConfigReportRequest").msgclass + GenerateConfigReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GenerateConfigReportResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb new file mode 100644 index 000000000000..12d089c4f77e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb @@ -0,0 +1,143 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/api/servicemanagement/v1/servicemanager.proto for package 'Google.Cloud.ServiceManagement.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/api/servicemanagement/v1/servicemanager_pb' + +module Google + module Cloud + module ServiceManagement + module V1 + module ServiceManager + # [Google Service Management + # API](https://cloud.google.com/service-infrastructure/docs/overview) + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.api.servicemanagement.v1.ServiceManager' + + # Lists managed services. + # + # Returns all public services. For authenticated users, also returns all + # services the calling user has "servicemanagement.services.get" permission + # for. + rpc :ListServices, ::Google::Cloud::ServiceManagement::V1::ListServicesRequest, ::Google::Cloud::ServiceManagement::V1::ListServicesResponse + # Gets a managed service. Authentication is required unless the service is + # public. + rpc :GetService, ::Google::Cloud::ServiceManagement::V1::GetServiceRequest, ::Google::Cloud::ServiceManagement::V1::ManagedService + # Creates a new managed service. + # + # A managed service is immutable, and is subject to mandatory 30-day + # data retention. You cannot move a service or recreate it within 30 days + # after deletion. + # + # One producer project can own no more than 500 services. For security and + # reliability purposes, a production service should be hosted in a + # dedicated producer project. + # + # Operation + rpc :CreateService, ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest, ::Google::Longrunning::Operation + # Deletes a managed service. This method will change the service to the + # `Soft-Delete` state for 30 days. Within this period, service producers may + # call + # [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] + # to restore the service. After 30 days, the service will be permanently + # deleted. + # + # Operation + rpc :DeleteService, ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest, ::Google::Longrunning::Operation + # Revives a previously deleted managed service. The method restores the + # service using the configuration at the time the service was deleted. + # The target service must exist and must have been deleted within the + # last 30 days. + # + # Operation + rpc :UndeleteService, ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest, ::Google::Longrunning::Operation + # Lists the history of the service configuration for a managed service, + # from the newest to the oldest. + rpc :ListServiceConfigs, ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest, ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse + # Gets a service configuration (version) for a managed service. + rpc :GetServiceConfig, ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest, ::Google::Api::Service + # Creates a new service configuration (version) for a managed service. + # This method only stores the service configuration. To roll out the service + # configuration to backend systems please call + # [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + # + # Only the 100 most recent service configurations and ones referenced by + # existing rollouts are kept for each service. The rest will be deleted + # eventually. + rpc :CreateServiceConfig, ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest, ::Google::Api::Service + # Creates a new service configuration (version) for a managed service based + # on + # user-supplied configuration source files (for example: OpenAPI + # Specification). This method stores the source configurations as well as the + # generated service configuration. To rollout the service configuration to + # other services, + # please call + # [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + # + # Only the 100 most recent configuration sources and ones referenced by + # existing service configurtions are kept for each service. The rest will be + # deleted eventually. + # + # Operation + rpc :SubmitConfigSource, ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest, ::Google::Longrunning::Operation + # Lists the history of the service configuration rollouts for a managed + # service, from the newest to the oldest. + rpc :ListServiceRollouts, ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest, ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse + # Gets a service configuration + # [rollout][google.api.servicemanagement.v1.Rollout]. + rpc :GetServiceRollout, ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest, ::Google::Cloud::ServiceManagement::V1::Rollout + # Creates a new service configuration rollout. Based on rollout, the + # Google Service Management will roll out the service configurations to + # different backend services. For example, the logging configuration will be + # pushed to Google Cloud Logging. + # + # Please note that any previous pending and running Rollouts and associated + # Operations will be automatically cancelled so that the latest Rollout will + # not be blocked by previous Rollouts. + # + # Only the 100 most recent (in any state) and the last 10 successful (if not + # already part of the set of 100 most recent) rollouts are kept for each + # service. The rest will be deleted eventually. + # + # Operation + rpc :CreateServiceRollout, ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest, ::Google::Longrunning::Operation + # Generates and returns a report (errors, warnings and changes from + # existing configurations) associated with + # GenerateConfigReportRequest.new_value + # + # If GenerateConfigReportRequest.old_value is specified, + # GenerateConfigReportRequest will contain a single ChangeReport based on the + # comparison between GenerateConfigReportRequest.new_value and + # GenerateConfigReportRequest.old_value. + # If GenerateConfigReportRequest.old_value is not specified, this method + # will compare GenerateConfigReportRequest.new_value with the last pushed + # service configuration. + rpc :GenerateConfigReport, ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest, ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.rb new file mode 100644 index 000000000000..741429ff6b3d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/service_management/v1/service_manager" +require "google/cloud/service_management/v1/version" + +module Google + module Cloud + module ServiceManagement + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/service_management/v1" + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/service_management/v1" + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/service_management/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/bindings_override.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/bindings_override.rb new file mode 100644 index 000000000000..8f225f8662b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/bindings_override.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module ServiceManagement + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/service_management/v1/rest" + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceManagement"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^services/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^services/[^/]+/consumers/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^services/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^services/[^/]+/consumers/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^services/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^services/[^/]+/consumers/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/rest.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/rest.rb new file mode 100644 index 000000000000..76294f210607 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/service_management/v1/service_manager/rest" +require "google/cloud/service_management/v1/bindings_override" +require "google/cloud/service_management/v1/version" + +module Google + module Cloud + module ServiceManagement + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/service_management/v1/rest" + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager.rb new file mode 100644 index 000000000000..675475e70222 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_management/v1/version" + +require "google/cloud/service_management/v1/service_manager/credentials" +require "google/cloud/service_management/v1/service_manager/operations" +require "google/cloud/service_management/v1/service_manager/client" +require "google/cloud/service_management/v1/service_manager/rest" + +module Google + module Cloud + module ServiceManagement + module V1 + ## + # [Google Service Management + # API](https://cloud.google.com/service-infrastructure/docs/overview) + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/service_management/v1/service_manager" + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/service_management/v1/service_manager/rest" + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + module ServiceManager + end + end + end + end +end + +helper_path = ::File.join __dir__, "service_manager", "helpers.rb" +require "google/cloud/service_management/v1/service_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.rb new file mode 100644 index 000000000000..c370b0cbaa39 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.rb @@ -0,0 +1,1811 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/api/servicemanagement/v1/servicemanager_pb" +require "google/iam/v1" + +module Google + module Cloud + module ServiceManagement + module V1 + module ServiceManager + ## + # Client for the ServiceManager service. + # + # [Google Service Management + # API](https://cloud.google.com/service-infrastructure/docs/overview) + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicemanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :service_manager_stub + + ## + # Configure the ServiceManager Client class. + # + # See {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ServiceManager clients + # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceManagement", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 10.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceManager Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @service_manager_stub.universe_domain + end + + ## + # Create a new ServiceManager client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ServiceManager client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/api/servicemanagement/v1/servicemanager_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @service_manager_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @service_manager_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @service_manager_stub.endpoint + config.universe_domain = @service_manager_stub.universe_domain + config.logger = @service_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @service_manager_stub.logger + end + + # Service calls + + ## + # Lists managed services. + # + # Returns all public services. For authenticated users, also returns all + # services the calling user has "servicemanagement.services.get" permission + # for. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_services(producer_project_id: nil, page_size: nil, page_token: nil, consumer_id: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param producer_project_id [::String] + # Include services produced by the specified project. + # @param page_size [::Integer] + # The max number of items to include in the response list. Page size is 50 + # if not specified. Maximum value is 500. + # @param page_token [::String] + # Token identifying which result to start with; returned by a previous list + # call. + # @param consumer_id [::String] + # Include services consumed by the specified consumer. + # + # The Google Service Management implementation accepts the following + # forms: + # - project: + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::ManagedService>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::ManagedService>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceManagement::V1::ManagedService. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :list_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @service_manager_stub, :list_services, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a managed service. Authentication is required unless the service is + # public. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_service(service_name: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the `ServiceManager` overview for + # naming requirements. For example: `example.googleapis.com`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceManagement::V1::ManagedService] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceManagement::V1::ManagedService] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::ServiceManagement::V1::ManagedService. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :get_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new managed service. + # + # A managed service is immutable, and is subject to mandatory 30-day + # data retention. You cannot move a service or recreate it within 30 days + # after deletion. + # + # One producer project can own no more than 500 services. For security and + # reliability purposes, a production service should be hosted in a + # dedicated producer project. + # + # Operation + # + # @overload create_service(request, options = nil) + # Pass arguments to `create_service` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::CreateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_service(service: nil) + # Pass arguments to `create_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service [::Google::Cloud::ServiceManagement::V1::ManagedService, ::Hash] + # Required. Initial values for the service resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new + # + # # Call the create_service method. + # result = client.create_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :create_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a managed service. This method will change the service to the + # `Soft-Delete` state for 30 days. Within this period, service producers may + # call + # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#undelete_service UndeleteService} + # to restore the service. After 30 days, the service will be permanently + # deleted. + # + # Operation + # + # @overload delete_service(request, options = nil) + # Pass arguments to `delete_service` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_service(service_name: nil) + # Pass arguments to `delete_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new + # + # # Call the delete_service method. + # result = client.delete_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :delete_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Revives a previously deleted managed service. The method restores the + # service using the configuration at the time the service was deleted. + # The target service must exist and must have been deleted within the + # last 30 days. + # + # Operation + # + # @overload undelete_service(request, options = nil) + # Pass arguments to `undelete_service` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload undelete_service(service_name: nil) + # Pass arguments to `undelete_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new + # + # # Call the undelete_service method. + # result = client.undelete_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undelete_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.undelete_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.undelete_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undelete_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :undelete_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the history of the service configuration for a managed service, + # from the newest to the oldest. + # + # @overload list_service_configs(request, options = nil) + # Pass arguments to `list_service_configs` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_service_configs(service_name: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_service_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param page_token [::String] + # The token of the page to retrieve. + # @param page_size [::Integer] + # The max number of items to include in the response list. Page size is 50 + # if not specified. Maximum value is 100. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Api::Service>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Api::Service>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new + # + # # Call the list_service_configs method. + # result = client.list_service_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Api::Service. + # p item + # end + # + def list_service_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_service_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_service_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_service_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :list_service_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @service_manager_stub, :list_service_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a service configuration (version) for a managed service. + # + # @overload get_service_config(request, options = nil) + # Pass arguments to `get_service_config` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_service_config(service_name: nil, config_id: nil, view: nil) + # Pass arguments to `get_service_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param config_id [::String] + # Required. The id of the service configuration resource. + # + # This field must be specified for the server to return all fields, including + # `SourceInfo`. + # @param view [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest::ConfigView] + # Specifies which parts of the Service Config should be returned in the + # response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::Service] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::Service] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new + # + # # Call the get_service_config method. + # result = client.get_service_config request + # + # # The returned object is of type Google::Api::Service. + # p result + # + def get_service_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_service_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + if request.config_id + header_params["config_id"] = request.config_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :get_service_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new service configuration (version) for a managed service. + # This method only stores the service configuration. To roll out the service + # configuration to backend systems please call + # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_rollout CreateServiceRollout}. + # + # Only the 100 most recent service configurations and ones referenced by + # existing rollouts are kept for each service. The rest will be deleted + # eventually. + # + # @overload create_service_config(request, options = nil) + # Pass arguments to `create_service_config` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_service_config(service_name: nil, service_config: nil) + # Pass arguments to `create_service_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param service_config [::Google::Api::Service, ::Hash] + # Required. The service configuration resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Api::Service] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Api::Service] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new + # + # # Call the create_service_config method. + # result = client.create_service_config request + # + # # The returned object is of type Google::Api::Service. + # p result + # + def create_service_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_service_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_service_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :create_service_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new service configuration (version) for a managed service based + # on + # user-supplied configuration source files (for example: OpenAPI + # Specification). This method stores the source configurations as well as the + # generated service configuration. To rollout the service configuration to + # other services, + # please call + # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_rollout CreateServiceRollout}. + # + # Only the 100 most recent configuration sources and ones referenced by + # existing service configurtions are kept for each service. The rest will be + # deleted eventually. + # + # Operation + # + # @overload submit_config_source(request, options = nil) + # Pass arguments to `submit_config_source` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload submit_config_source(service_name: nil, config_source: nil, validate_only: nil) + # Pass arguments to `submit_config_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param config_source [::Google::Cloud::ServiceManagement::V1::ConfigSource, ::Hash] + # Required. The source configuration for the service. + # @param validate_only [::Boolean] + # Optional. If set, this will result in the generation of a + # `google.api.Service` configuration based on the `ConfigSource` provided, + # but the generated config and the sources will NOT be persisted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new + # + # # Call the submit_config_source method. + # result = client.submit_config_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def submit_config_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.submit_config_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.submit_config_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.submit_config_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :submit_config_source, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the history of the service configuration rollouts for a managed + # service, from the newest to the oldest. + # + # @overload list_service_rollouts(request, options = nil) + # Pass arguments to `list_service_rollouts` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_service_rollouts(service_name: nil, page_token: nil, page_size: nil, filter: nil) + # Pass arguments to `list_service_rollouts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param page_token [::String] + # The token of the page to retrieve. + # @param page_size [::Integer] + # The max number of items to include in the response list. Page size is 50 + # if not specified. Maximum value is 100. + # @param filter [::String] + # Required. Use `filter` to return subset of rollouts. + # The following filters are supported: + # + # -- By [status] + # [google.api.servicemanagement.v1.Rollout.RolloutStatus]. For example, + # `filter='status=SUCCESS'` + # + # -- By [strategy] + # [google.api.servicemanagement.v1.Rollout.strategy]. For example, + # `filter='strategy=TrafficPercentStrategy'` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::Rollout>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::Rollout>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new + # + # # Call the list_service_rollouts method. + # result = client.list_service_rollouts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceManagement::V1::Rollout. + # p item + # end + # + def list_service_rollouts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_service_rollouts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_service_rollouts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_service_rollouts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :list_service_rollouts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @service_manager_stub, :list_service_rollouts, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a service configuration + # {::Google::Cloud::ServiceManagement::V1::Rollout rollout}. + # + # @overload get_service_rollout(request, options = nil) + # Pass arguments to `get_service_rollout` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_service_rollout(service_name: nil, rollout_id: nil) + # Pass arguments to `get_service_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param rollout_id [::String] + # Required. The id of the rollout resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceManagement::V1::Rollout] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceManagement::V1::Rollout] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new + # + # # Call the get_service_rollout method. + # result = client.get_service_rollout request + # + # # The returned object is of type Google::Cloud::ServiceManagement::V1::Rollout. + # p result + # + def get_service_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_service_rollout.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + if request.rollout_id + header_params["rollout_id"] = request.rollout_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service_rollout.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :get_service_rollout, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new service configuration rollout. Based on rollout, the + # Google Service Management will roll out the service configurations to + # different backend services. For example, the logging configuration will be + # pushed to Google Cloud Logging. + # + # Please note that any previous pending and running Rollouts and associated + # Operations will be automatically cancelled so that the latest Rollout will + # not be blocked by previous Rollouts. + # + # Only the 100 most recent (in any state) and the last 10 successful (if not + # already part of the set of 100 most recent) rollouts are kept for each + # service. The rest will be deleted eventually. + # + # Operation + # + # @overload create_service_rollout(request, options = nil) + # Pass arguments to `create_service_rollout` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_service_rollout(service_name: nil, rollout: nil) + # Pass arguments to `create_service_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param rollout [::Google::Cloud::ServiceManagement::V1::Rollout, ::Hash] + # Required. The rollout resource. The `service_name` field is output only. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new + # + # # Call the create_service_rollout method. + # result = client.create_service_rollout request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_service_rollout.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.service_name + header_params["service_name"] = request.service_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_service_rollout.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_service_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :create_service_rollout, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Generates and returns a report (errors, warnings and changes from + # existing configurations) associated with + # GenerateConfigReportRequest.new_value + # + # If GenerateConfigReportRequest.old_value is specified, + # GenerateConfigReportRequest will contain a single ChangeReport based on the + # comparison between GenerateConfigReportRequest.new_value and + # GenerateConfigReportRequest.old_value. + # If GenerateConfigReportRequest.old_value is not specified, this method + # will compare GenerateConfigReportRequest.new_value with the last pushed + # service configuration. + # + # @overload generate_config_report(request, options = nil) + # Pass arguments to `generate_config_report` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_config_report(new_config: nil, old_config: nil) + # Pass arguments to `generate_config_report` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param new_config [::Google::Protobuf::Any, ::Hash] + # Required. Service configuration for which we want to generate the report. + # For this version of API, the supported types are + # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, + # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, + # and {::Google::Api::Service google.api.Service} + # @param old_config [::Google::Protobuf::Any, ::Hash] + # Optional. Service configuration against which the comparison will be done. + # For this version of API, the supported types are + # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, + # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, + # and {::Google::Api::Service google.api.Service} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new + # + # # Call the generate_config_report method. + # result = client.generate_config_report request + # + # # The returned object is of type Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse. + # p result + # + def generate_config_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_config_report.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.generate_config_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_config_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.call_rpc :generate_config_report, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ServiceManager API. + # + # This class represents the configuration for ServiceManager, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_services to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicemanagement.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ServiceManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `create_service` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service + ## + # RPC-specific configuration for `delete_service` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service + ## + # RPC-specific configuration for `undelete_service` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_service + ## + # RPC-specific configuration for `list_service_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_configs + ## + # RPC-specific configuration for `get_service_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_config + ## + # RPC-specific configuration for `create_service_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_config + ## + # RPC-specific configuration for `submit_config_source` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_config_source + ## + # RPC-specific configuration for `list_service_rollouts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_rollouts + ## + # RPC-specific configuration for `get_service_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_rollout + ## + # RPC-specific configuration for `create_service_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_rollout + ## + # RPC-specific configuration for `generate_config_report` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_config_report + + # @private + def initialize parent_rpcs = nil + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service + @create_service = ::Gapic::Config::Method.new create_service_config + delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service + @delete_service = ::Gapic::Config::Method.new delete_service_config + undelete_service_config = parent_rpcs.undelete_service if parent_rpcs.respond_to? :undelete_service + @undelete_service = ::Gapic::Config::Method.new undelete_service_config + list_service_configs_config = parent_rpcs.list_service_configs if parent_rpcs.respond_to? :list_service_configs + @list_service_configs = ::Gapic::Config::Method.new list_service_configs_config + get_service_config_config = parent_rpcs.get_service_config if parent_rpcs.respond_to? :get_service_config + @get_service_config = ::Gapic::Config::Method.new get_service_config_config + create_service_config_config = parent_rpcs.create_service_config if parent_rpcs.respond_to? :create_service_config + @create_service_config = ::Gapic::Config::Method.new create_service_config_config + submit_config_source_config = parent_rpcs.submit_config_source if parent_rpcs.respond_to? :submit_config_source + @submit_config_source = ::Gapic::Config::Method.new submit_config_source_config + list_service_rollouts_config = parent_rpcs.list_service_rollouts if parent_rpcs.respond_to? :list_service_rollouts + @list_service_rollouts = ::Gapic::Config::Method.new list_service_rollouts_config + get_service_rollout_config = parent_rpcs.get_service_rollout if parent_rpcs.respond_to? :get_service_rollout + @get_service_rollout = ::Gapic::Config::Method.new get_service_rollout_config + create_service_rollout_config = parent_rpcs.create_service_rollout if parent_rpcs.respond_to? :create_service_rollout + @create_service_rollout = ::Gapic::Config::Method.new create_service_rollout_config + generate_config_report_config = parent_rpcs.generate_config_report if parent_rpcs.respond_to? :generate_config_report + @generate_config_report = ::Gapic::Config::Method.new generate_config_report_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.rb new file mode 100644 index 000000000000..a4c9815cf939 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module ServiceManagement + module V1 + module ServiceManager + # Credentials for the ServiceManager API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ] + self.env_vars = [ + "SERVICE_MANAGEMENT_CREDENTIALS", + "SERVICE_MANAGEMENT_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SERVICE_MANAGEMENT_CREDENTIALS_JSON", + "SERVICE_MANAGEMENT_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.rb new file mode 100644 index 000000000000..21aa897cfe85 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.rb @@ -0,0 +1,835 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module ServiceManagement + module V1 + module ServiceManager + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicemanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ServiceManager Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceManager Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicemanagement.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.rb new file mode 100644 index 000000000000..7c6d55e49768 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_management/v1/version" +require "google/cloud/service_management/v1/bindings_override" + +require "google/cloud/service_management/v1/service_manager/credentials" +require "google/cloud/service_management/v1/service_manager/rest/operations" +require "google/cloud/service_management/v1/service_manager/rest/client" + +module Google + module Cloud + module ServiceManagement + module V1 + ## + # [Google Service Management + # API](https://cloud.google.com/service-infrastructure/docs/overview) + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/service_management/v1/service_manager/rest" + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + module ServiceManager + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/service_management/v1/service_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.rb new file mode 100644 index 000000000000..1a1ac451fa89 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.rb @@ -0,0 +1,1703 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/api/servicemanagement/v1/servicemanager_pb" +require "google/cloud/service_management/v1/service_manager/rest/service_stub" +require "google/iam/v1/rest" + +module Google + module Cloud + module ServiceManagement + module V1 + module ServiceManager + module Rest + ## + # REST client for the ServiceManager service. + # + # [Google Service Management + # API](https://cloud.google.com/service-infrastructure/docs/overview) + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicemanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :service_manager_stub + + ## + # Configure the ServiceManager Client class. + # + # See {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ServiceManager clients + # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceManagement", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 10.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceManager Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @service_manager_stub.universe_domain + end + + ## + # Create a new ServiceManager REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ServiceManager client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @service_manager_stub = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @service_manager_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @service_manager_stub.endpoint + config.universe_domain = @service_manager_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @service_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @service_manager_stub.logger + end + + # Service calls + + ## + # Lists managed services. + # + # Returns all public services. For authenticated users, also returns all + # services the calling user has "servicemanagement.services.get" permission + # for. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_services(producer_project_id: nil, page_size: nil, page_token: nil, consumer_id: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param producer_project_id [::String] + # Include services produced by the specified project. + # @param page_size [::Integer] + # The max number of items to include in the response list. Page size is 50 + # if not specified. Maximum value is 500. + # @param page_token [::String] + # Token identifying which result to start with; returned by a previous list + # call. + # @param consumer_id [::String] + # Include services consumed by the specified consumer. + # + # The Google Service Management implementation accepts the following + # forms: + # - project: + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::ManagedService>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::ManagedService>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceManagement::V1::ManagedService. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.list_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @service_manager_stub, :list_services, "services", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a managed service. Authentication is required unless the service is + # public. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_service(service_name: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the `ServiceManager` overview for + # naming requirements. For example: `example.googleapis.com`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceManagement::V1::ManagedService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceManagement::V1::ManagedService] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::ServiceManagement::V1::ManagedService. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.get_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new managed service. + # + # A managed service is immutable, and is subject to mandatory 30-day + # data retention. You cannot move a service or recreate it within 30 days + # after deletion. + # + # One producer project can own no more than 500 services. For security and + # reliability purposes, a production service should be hosted in a + # dedicated producer project. + # + # Operation + # + # @overload create_service(request, options = nil) + # Pass arguments to `create_service` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::CreateServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_service(service: nil) + # Pass arguments to `create_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service [::Google::Cloud::ServiceManagement::V1::ManagedService, ::Hash] + # Required. Initial values for the service resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new + # + # # Call the create_service method. + # result = client.create_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.create_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a managed service. This method will change the service to the + # `Soft-Delete` state for 30 days. Within this period, service producers may + # call + # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client#undelete_service UndeleteService} + # to restore the service. After 30 days, the service will be permanently + # deleted. + # + # Operation + # + # @overload delete_service(request, options = nil) + # Pass arguments to `delete_service` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_service(service_name: nil) + # Pass arguments to `delete_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new + # + # # Call the delete_service method. + # result = client.delete_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.delete_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Revives a previously deleted managed service. The method restores the + # service using the configuration at the time the service was deleted. + # The target service must exist and must have been deleted within the + # last 30 days. + # + # Operation + # + # @overload undelete_service(request, options = nil) + # Pass arguments to `undelete_service` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload undelete_service(service_name: nil) + # Pass arguments to `undelete_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new + # + # # Call the undelete_service method. + # result = client.undelete_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undelete_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.undelete_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.undelete_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undelete_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.undelete_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the history of the service configuration for a managed service, + # from the newest to the oldest. + # + # @overload list_service_configs(request, options = nil) + # Pass arguments to `list_service_configs` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_service_configs(service_name: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_service_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param page_token [::String] + # The token of the page to retrieve. + # @param page_size [::Integer] + # The max number of items to include in the response list. Page size is 50 + # if not specified. Maximum value is 100. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Api::Service>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Api::Service>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new + # + # # Call the list_service_configs method. + # result = client.list_service_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Api::Service. + # p item + # end + # + def list_service_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_service_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_service_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_service_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.list_service_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @service_manager_stub, :list_service_configs, "service_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a service configuration (version) for a managed service. + # + # @overload get_service_config(request, options = nil) + # Pass arguments to `get_service_config` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_service_config(service_name: nil, config_id: nil, view: nil) + # Pass arguments to `get_service_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param config_id [::String] + # Required. The id of the service configuration resource. + # + # This field must be specified for the server to return all fields, including + # `SourceInfo`. + # @param view [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest::ConfigView] + # Specifies which parts of the Service Config should be returned in the + # response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::Service] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new + # + # # Call the get_service_config method. + # result = client.get_service_config request + # + # # The returned object is of type Google::Api::Service. + # p result + # + def get_service_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_service_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_service_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.get_service_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new service configuration (version) for a managed service. + # This method only stores the service configuration. To roll out the service + # configuration to backend systems please call + # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client#create_service_rollout CreateServiceRollout}. + # + # Only the 100 most recent service configurations and ones referenced by + # existing rollouts are kept for each service. The rest will be deleted + # eventually. + # + # @overload create_service_config(request, options = nil) + # Pass arguments to `create_service_config` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_service_config(service_name: nil, service_config: nil) + # Pass arguments to `create_service_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param service_config [::Google::Api::Service, ::Hash] + # Required. The service configuration resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::Service] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new + # + # # Call the create_service_config method. + # result = client.create_service_config request + # + # # The returned object is of type Google::Api::Service. + # p result + # + def create_service_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_service_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_service_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.create_service_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new service configuration (version) for a managed service based + # on + # user-supplied configuration source files (for example: OpenAPI + # Specification). This method stores the source configurations as well as the + # generated service configuration. To rollout the service configuration to + # other services, + # please call + # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client#create_service_rollout CreateServiceRollout}. + # + # Only the 100 most recent configuration sources and ones referenced by + # existing service configurtions are kept for each service. The rest will be + # deleted eventually. + # + # Operation + # + # @overload submit_config_source(request, options = nil) + # Pass arguments to `submit_config_source` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload submit_config_source(service_name: nil, config_source: nil, validate_only: nil) + # Pass arguments to `submit_config_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param config_source [::Google::Cloud::ServiceManagement::V1::ConfigSource, ::Hash] + # Required. The source configuration for the service. + # @param validate_only [::Boolean] + # Optional. If set, this will result in the generation of a + # `google.api.Service` configuration based on the `ConfigSource` provided, + # but the generated config and the sources will NOT be persisted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new + # + # # Call the submit_config_source method. + # result = client.submit_config_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def submit_config_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.submit_config_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.submit_config_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.submit_config_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.submit_config_source request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the history of the service configuration rollouts for a managed + # service, from the newest to the oldest. + # + # @overload list_service_rollouts(request, options = nil) + # Pass arguments to `list_service_rollouts` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_service_rollouts(service_name: nil, page_token: nil, page_size: nil, filter: nil) + # Pass arguments to `list_service_rollouts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param page_token [::String] + # The token of the page to retrieve. + # @param page_size [::Integer] + # The max number of items to include in the response list. Page size is 50 + # if not specified. Maximum value is 100. + # @param filter [::String] + # Required. Use `filter` to return subset of rollouts. + # The following filters are supported: + # + # -- By [status] + # [google.api.servicemanagement.v1.Rollout.RolloutStatus]. For example, + # `filter='status=SUCCESS'` + # + # -- By [strategy] + # [google.api.servicemanagement.v1.Rollout.strategy]. For example, + # `filter='strategy=TrafficPercentStrategy'` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::Rollout>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::Rollout>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new + # + # # Call the list_service_rollouts method. + # result = client.list_service_rollouts request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceManagement::V1::Rollout. + # p item + # end + # + def list_service_rollouts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_service_rollouts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_service_rollouts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_service_rollouts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.list_service_rollouts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @service_manager_stub, :list_service_rollouts, "rollouts", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a service configuration + # {::Google::Cloud::ServiceManagement::V1::Rollout rollout}. + # + # @overload get_service_rollout(request, options = nil) + # Pass arguments to `get_service_rollout` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_service_rollout(service_name: nil, rollout_id: nil) + # Pass arguments to `get_service_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param rollout_id [::String] + # Required. The id of the rollout resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceManagement::V1::Rollout] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceManagement::V1::Rollout] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new + # + # # Call the get_service_rollout method. + # result = client.get_service_rollout request + # + # # The returned object is of type Google::Cloud::ServiceManagement::V1::Rollout. + # p result + # + def get_service_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_service_rollout.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_service_rollout.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.get_service_rollout request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new service configuration rollout. Based on rollout, the + # Google Service Management will roll out the service configurations to + # different backend services. For example, the logging configuration will be + # pushed to Google Cloud Logging. + # + # Please note that any previous pending and running Rollouts and associated + # Operations will be automatically cancelled so that the latest Rollout will + # not be blocked by previous Rollouts. + # + # Only the 100 most recent (in any state) and the last 10 successful (if not + # already part of the set of 100 most recent) rollouts are kept for each + # service. The rest will be deleted eventually. + # + # Operation + # + # @overload create_service_rollout(request, options = nil) + # Pass arguments to `create_service_rollout` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_service_rollout(service_name: nil, rollout: nil) + # Pass arguments to `create_service_rollout` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param service_name [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @param rollout [::Google::Cloud::ServiceManagement::V1::Rollout, ::Hash] + # Required. The rollout resource. The `service_name` field is output only. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new + # + # # Call the create_service_rollout method. + # result = client.create_service_rollout request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_service_rollout request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_service_rollout.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_service_rollout.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_service_rollout.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.create_service_rollout request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Generates and returns a report (errors, warnings and changes from + # existing configurations) associated with + # GenerateConfigReportRequest.new_value + # + # If GenerateConfigReportRequest.old_value is specified, + # GenerateConfigReportRequest will contain a single ChangeReport based on the + # comparison between GenerateConfigReportRequest.new_value and + # GenerateConfigReportRequest.old_value. + # If GenerateConfigReportRequest.old_value is not specified, this method + # will compare GenerateConfigReportRequest.new_value with the last pushed + # service configuration. + # + # @overload generate_config_report(request, options = nil) + # Pass arguments to `generate_config_report` via a request object, either of type + # {::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload generate_config_report(new_config: nil, old_config: nil) + # Pass arguments to `generate_config_report` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param new_config [::Google::Protobuf::Any, ::Hash] + # Required. Service configuration for which we want to generate the report. + # For this version of API, the supported types are + # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, + # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, + # and {::Google::Api::Service google.api.Service} + # @param old_config [::Google::Protobuf::Any, ::Hash] + # Optional. Service configuration against which the comparison will be done. + # For this version of API, the supported types are + # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, + # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, + # and {::Google::Api::Service google.api.Service} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_management/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new + # + # # Call the generate_config_report method. + # result = client.generate_config_report request + # + # # The returned object is of type Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse. + # p result + # + def generate_config_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.generate_config_report.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.generate_config_report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_config_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_manager_stub.generate_config_report request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ServiceManager REST API. + # + # This class represents the configuration for ServiceManager REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_services to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicemanagement.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ServiceManager API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `create_service` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service + ## + # RPC-specific configuration for `delete_service` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_service + ## + # RPC-specific configuration for `undelete_service` + # @return [::Gapic::Config::Method] + # + attr_reader :undelete_service + ## + # RPC-specific configuration for `list_service_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_configs + ## + # RPC-specific configuration for `get_service_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_config + ## + # RPC-specific configuration for `create_service_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_config + ## + # RPC-specific configuration for `submit_config_source` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_config_source + ## + # RPC-specific configuration for `list_service_rollouts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_service_rollouts + ## + # RPC-specific configuration for `get_service_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service_rollout + ## + # RPC-specific configuration for `create_service_rollout` + # @return [::Gapic::Config::Method] + # + attr_reader :create_service_rollout + ## + # RPC-specific configuration for `generate_config_report` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_config_report + + # @private + def initialize parent_rpcs = nil + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service + @create_service = ::Gapic::Config::Method.new create_service_config + delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service + @delete_service = ::Gapic::Config::Method.new delete_service_config + undelete_service_config = parent_rpcs.undelete_service if parent_rpcs.respond_to? :undelete_service + @undelete_service = ::Gapic::Config::Method.new undelete_service_config + list_service_configs_config = parent_rpcs.list_service_configs if parent_rpcs.respond_to? :list_service_configs + @list_service_configs = ::Gapic::Config::Method.new list_service_configs_config + get_service_config_config = parent_rpcs.get_service_config if parent_rpcs.respond_to? :get_service_config + @get_service_config = ::Gapic::Config::Method.new get_service_config_config + create_service_config_config = parent_rpcs.create_service_config if parent_rpcs.respond_to? :create_service_config + @create_service_config = ::Gapic::Config::Method.new create_service_config_config + submit_config_source_config = parent_rpcs.submit_config_source if parent_rpcs.respond_to? :submit_config_source + @submit_config_source = ::Gapic::Config::Method.new submit_config_source_config + list_service_rollouts_config = parent_rpcs.list_service_rollouts if parent_rpcs.respond_to? :list_service_rollouts + @list_service_rollouts = ::Gapic::Config::Method.new list_service_rollouts_config + get_service_rollout_config = parent_rpcs.get_service_rollout if parent_rpcs.respond_to? :get_service_rollout + @get_service_rollout = ::Gapic::Config::Method.new get_service_rollout_config + create_service_rollout_config = parent_rpcs.create_service_rollout if parent_rpcs.respond_to? :create_service_rollout + @create_service_rollout = ::Gapic::Config::Method.new create_service_rollout_config + generate_config_report_config = parent_rpcs.generate_config_report if parent_rpcs.respond_to? :generate_config_report + @generate_config_report = ::Gapic::Config::Method.new generate_config_report_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb new file mode 100644 index 000000000000..c8a9916924a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module ServiceManagement + module V1 + module ServiceManager + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "servicemanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ServiceManager Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceManager Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "servicemanagement.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/operations", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb new file mode 100644 index 000000000000..7f7177af359f --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb @@ -0,0 +1,882 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/api/servicemanagement/v1/servicemanager_pb" + +module Google + module Cloud + module ServiceManagement + module V1 + module ServiceManager + module Rest + ## + # REST service stub for the ServiceManager service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_services REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceManagement::V1::ListServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceManagement::V1::ListServicesResponse] + # A result object deserialized from the server's reply + def list_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceManagement::V1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_service REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceManagement::V1::ManagedService] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceManagement::V1::ManagedService] + # A result object deserialized from the server's reply + def get_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceManagement::V1::ManagedService.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_service REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_service REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the undelete_service REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def undelete_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undelete_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "undelete_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_service_configs REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse] + # A result object deserialized from the server's reply + def list_service_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_service_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_service_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_service_config REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::Service] + # A result object deserialized from the server's reply + def get_service_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_service_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::Service.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_service_config REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Api::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Api::Service] + # A result object deserialized from the server's reply + def create_service_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_service_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Api::Service.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the submit_config_source REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def submit_config_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_submit_config_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "submit_config_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_service_rollouts REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse] + # A result object deserialized from the server's reply + def list_service_rollouts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_service_rollouts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_service_rollouts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_service_rollout REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceManagement::V1::Rollout] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceManagement::V1::Rollout] + # A result object deserialized from the server's reply + def get_service_rollout request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_rollout_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_service_rollout", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceManagement::V1::Rollout.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_service_rollout REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_service_rollout request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_service_rollout_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_service_rollout", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the generate_config_report REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] + # A result object deserialized from the server's reply + def generate_config_report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_config_report_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "generate_config_report", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_services REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/services", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/services/{service_name}", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/services", + body: "service", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_service REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/services/{service_name}", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undelete_service REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undelete_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/services/{service_name}:undelete", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_service_configs REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_service_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/services/{service_name}/configs", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service_config REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_service_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/services/{service_name}/configs/{config_id}", + matches: [ + ["service_name", %r{^[^/]+/?$}, false], + ["config_id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/services/{service_name}/config", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service_config REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_service_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/services/{service_name}/configs", + body: "service_config", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the submit_config_source REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_submit_config_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/services/{service_name}/configs:submit", + body: "*", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_service_rollouts REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_service_rollouts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/services/{service_name}/rollouts", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service_rollout REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_service_rollout_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/services/{service_name}/rollouts/{rollout_id}", + matches: [ + ["service_name", %r{^[^/]+/?$}, false], + ["rollout_id", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_service_rollout REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_service_rollout_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/services/{service_name}/rollouts", + body: "rollout", + matches: [ + ["service_name", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_config_report REST call + # + # @param request_pb [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_config_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/services:generateConfigReport", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/version.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/version.rb new file mode 100644 index 000000000000..b07821095257 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceManagement + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/README.md new file mode 100644 index 000000000000..b2331f606235 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Service Management V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/auth.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/auth.rb new file mode 100644 index 000000000000..2f1afd9a7f19 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/auth.rb @@ -0,0 +1,259 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # `Authentication` defines the authentication configuration for API methods + # provided by an API service. + # + # Example: + # + # name: calendar.googleapis.com + # authentication: + # providers: + # - id: google_calendar_auth + # jwks_uri: https://www.googleapis.com/oauth2/v1/certs + # issuer: https://securetoken.google.com + # rules: + # - selector: "*" + # requirements: + # provider_id: google_calendar_auth + # - selector: google.calendar.Delegate + # oauth: + # canonical_scopes: https://www.googleapis.com/auth/calendar.read + # @!attribute [rw] rules + # @return [::Array<::Google::Api::AuthenticationRule>] + # A list of authentication rules that apply to individual API methods. + # + # **NOTE:** All service configuration rules follow "last one wins" order. + # @!attribute [rw] providers + # @return [::Array<::Google::Api::AuthProvider>] + # Defines a set of authentication providers that a service supports. + class Authentication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Authentication rules for the service. + # + # By default, if a method has any authentication requirements, every request + # must include a valid credential matching one of the requirements. + # It's an error to include more than one kind of credential in a single + # request. + # + # If a method doesn't have any auth requirements, request credentials will be + # ignored. + # @!attribute [rw] selector + # @return [::String] + # Selects the methods to which this rule applies. + # + # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax + # details. + # @!attribute [rw] oauth + # @return [::Google::Api::OAuthRequirements] + # The requirements for OAuth credentials. + # @!attribute [rw] allow_without_credential + # @return [::Boolean] + # If true, the service accepts API keys without any other credential. + # This flag only applies to HTTP and gRPC requests. + # @!attribute [rw] requirements + # @return [::Array<::Google::Api::AuthRequirement>] + # Requirements for additional authentication providers. + class AuthenticationRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a location to extract JWT from an API request. + # @!attribute [rw] header + # @return [::String] + # Specifies HTTP header name to extract JWT token. + # + # Note: The following fields are mutually exclusive: `header`, `query`, `cookie`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] query + # @return [::String] + # Specifies URL query parameter name to extract JWT token. + # + # Note: The following fields are mutually exclusive: `query`, `header`, `cookie`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cookie + # @return [::String] + # Specifies cookie name to extract JWT token. + # + # Note: The following fields are mutually exclusive: `cookie`, `header`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] value_prefix + # @return [::String] + # The value prefix. The value format is "value_prefix\\{token}" + # Only applies to "in" header type. Must be empty for "in" query type. + # If not empty, the header value has to match (case sensitive) this prefix. + # If not matched, JWT will not be extracted. If matched, JWT will be + # extracted after the prefix is removed. + # + # For example, for "Authorization: Bearer \\{JWT}", + # value_prefix="Bearer " with a space at the end. + class JwtLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for an authentication provider, including support for + # [JSON Web Token + # (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). + # @!attribute [rw] id + # @return [::String] + # The unique identifier of the auth provider. It will be referred to by + # `AuthRequirement.provider_id`. + # + # Example: "bookstore_auth". + # @!attribute [rw] issuer + # @return [::String] + # Identifies the principal that issued the JWT. See + # https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 + # Usually a URL or an email address. + # + # Example: https://securetoken.google.com + # Example: 1234567-compute@developer.gserviceaccount.com + # @!attribute [rw] jwks_uri + # @return [::String] + # URL of the provider's public key set to validate signature of the JWT. See + # [OpenID + # Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). + # Optional if the key set document: + # - can be retrieved from + # [OpenID + # Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) + # of the issuer. + # - can be inferred from the email domain of the issuer (e.g. a Google + # service account). + # + # Example: https://www.googleapis.com/oauth2/v1/certs + # @!attribute [rw] audiences + # @return [::String] + # The list of JWT + # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). + # that are allowed to access. A JWT containing any of these audiences will + # be accepted. When this setting is absent, JWTs with audiences: + # - "https://[service.name]/[google.protobuf.Api.name]" + # - "https://[service.name]/" + # will be accepted. + # For example, if no audiences are in the setting, LibraryService API will + # accept JWTs with the following audiences: + # - + # https://library-example.googleapis.com/google.example.library.v1.LibraryService + # - https://library-example.googleapis.com/ + # + # Example: + # + # audiences: bookstore_android.apps.googleusercontent.com, + # bookstore_web.apps.googleusercontent.com + # @!attribute [rw] authorization_url + # @return [::String] + # Redirect URL if JWT token is required but not present or is expired. + # Implement authorizationUrl of securityDefinitions in OpenAPI spec. + # @!attribute [rw] jwt_locations + # @return [::Array<::Google::Api::JwtLocation>] + # Defines the locations to extract the JWT. For now it is only used by the + # Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] + # (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) + # + # JWT locations can be one of HTTP headers, URL query parameters or + # cookies. The rule is that the first match wins. + # + # If not specified, default to use following 3 locations: + # 1) Authorization: Bearer + # 2) x-goog-iap-jwt-assertion + # 3) access_token query parameter + # + # Default locations can be specified as followings: + # jwt_locations: + # - header: Authorization + # value_prefix: "Bearer " + # - header: x-goog-iap-jwt-assertion + # - query: access_token + class AuthProvider + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # OAuth scopes are a way to define data and permissions on data. For example, + # there are scopes defined for "Read-only access to Google Calendar" and + # "Access to Cloud Platform". Users can consent to a scope for an application, + # giving it permission to access that data on their behalf. + # + # OAuth scope specifications should be fairly coarse grained; a user will need + # to see and understand the text description of what your scope means. + # + # In most cases: use one or at most two OAuth scopes for an entire family of + # products. If your product has multiple APIs, you should probably be sharing + # the OAuth scope across all of those APIs. + # + # When you need finer grained OAuth consent screens: talk with your product + # management about how developers will use them in practice. + # + # Please note that even though each of the canonical scopes is enough for a + # request to be accepted and passed to the backend, a request can still fail + # due to the backend requiring additional scopes or permissions. + # @!attribute [rw] canonical_scopes + # @return [::String] + # The list of publicly documented OAuth scopes that are allowed access. An + # OAuth token containing any of these scopes will be accepted. + # + # + # Example: + # + # canonical_scopes: https://www.googleapis.com/auth/calendar, + # https://www.googleapis.com/auth/calendar.read + class OAuthRequirements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User-defined authentication requirements, including support for + # [JSON Web Token + # (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). + # @!attribute [rw] provider_id + # @return [::String] + # {::Google::Api::AuthProvider#id id} from authentication provider. + # + # Example: + # + # provider_id: bookstore_auth + # @!attribute [rw] audiences + # @return [::String] + # NOTE: This will be deprecated soon, once AuthProvider.audiences is + # implemented and accepted in all the runtime components. + # + # The list of JWT + # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). + # that are allowed to access. A JWT containing any of these audiences will + # be accepted. When this setting is absent, only JWTs with audience + # "https://{::Google::Api::Service#name Service_name}/{::Google::Protobuf::Api#name API_name}" + # will be accepted. For example, if no audiences are in the setting, + # LibraryService API will only accept JWTs with the following audience + # "https://library-example.googleapis.com/google.example.library.v1.LibraryService". + # + # Example: + # + # audiences: bookstore_android.apps.googleusercontent.com, + # bookstore_web.apps.googleusercontent.com + class AuthRequirement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/backend.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/backend.rb new file mode 100644 index 000000000000..7d69596fe349 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/backend.rb @@ -0,0 +1,199 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # `Backend` defines the backend configuration for a service. + # @!attribute [rw] rules + # @return [::Array<::Google::Api::BackendRule>] + # A list of API backend rules that apply to individual API methods. + # + # **NOTE:** All service configuration rules follow "last one wins" order. + class Backend + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A backend rule provides configuration for an individual API element. + # @!attribute [rw] selector + # @return [::String] + # Selects the methods to which this rule applies. + # + # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax + # details. + # @!attribute [rw] address + # @return [::String] + # The address of the API backend. + # + # The scheme is used to determine the backend protocol and security. + # The following schemes are accepted: + # + # SCHEME PROTOCOL SECURITY + # http:// HTTP None + # https:// HTTP TLS + # grpc:// gRPC None + # grpcs:// gRPC TLS + # + # It is recommended to explicitly include a scheme. Leaving out the scheme + # may cause constrasting behaviors across platforms. + # + # If the port is unspecified, the default is: + # - 80 for schemes without TLS + # - 443 for schemes with TLS + # + # For HTTP backends, use {::Google::Api::BackendRule#protocol protocol} + # to specify the protocol version. + # @!attribute [rw] deadline + # @return [::Float] + # The number of seconds to wait for a response from a request. The default + # varies based on the request protocol and deployment environment. + # @!attribute [rw] min_deadline + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Float] + # Deprecated, do not use. + # @!attribute [rw] operation_deadline + # @return [::Float] + # The number of seconds to wait for the completion of a long running + # operation. The default is no deadline. + # @!attribute [rw] path_translation + # @return [::Google::Api::BackendRule::PathTranslation] + # Path translation specifies how to combine the backend address with the + # request path in order to produce the appropriate forwarding URL for the + # request. See {::Google::Api::BackendRule::PathTranslation PathTranslation} for + # more details. + # @!attribute [rw] jwt_audience + # @return [::String] + # The JWT audience is used when generating a JWT ID token for the backend. + # This ID token will be added in the HTTP "authorization" header, and sent + # to the backend. + # + # Note: The following fields are mutually exclusive: `jwt_audience`, `disable_auth`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] disable_auth + # @return [::Boolean] + # When disable_auth is true, a JWT ID token won't be generated and the + # original "Authorization" HTTP header will be preserved. If the header is + # used to carry the original token and is expected by the backend, this + # field must be set to true to preserve the header. + # + # Note: The following fields are mutually exclusive: `disable_auth`, `jwt_audience`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] protocol + # @return [::String] + # The protocol used for sending a request to the backend. + # The supported values are "http/1.1" and "h2". + # + # The default value is inferred from the scheme in the + # {::Google::Api::BackendRule#address address} field: + # + # SCHEME PROTOCOL + # http:// http/1.1 + # https:// http/1.1 + # grpc:// h2 + # grpcs:// h2 + # + # For secure HTTP backends (https://) that support HTTP/2, set this field + # to "h2" for improved performance. + # + # Configuring this field to non-default values is only supported for secure + # HTTP backends. This field will be ignored for all other backends. + # + # See + # https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids + # for more details on the supported values. + # @!attribute [rw] overrides_by_request_protocol + # @return [::Google::Protobuf::Map{::String => ::Google::Api::BackendRule}] + # The map between request protocol and the backend address. + # @!attribute [rw] load_balancing_policy + # @return [::String] + # The load balancing policy used for connection to the application backend. + # + # Defined as an arbitrary string to accomondate custom load balancing + # policies supported by the underlying channel, but suggest most users use + # one of the standard policies, such as the default, "RoundRobin". + class BackendRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Api::BackendRule] + class OverridesByRequestProtocolEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Path Translation specifies how to combine the backend address with the + # request path in order to produce the appropriate forwarding URL for the + # request. + # + # Path Translation is applicable only to HTTP-based backends. Backends which + # do not accept requests over HTTP/HTTPS should leave `path_translation` + # unspecified. + module PathTranslation + PATH_TRANSLATION_UNSPECIFIED = 0 + + # Use the backend address as-is, with no modification to the path. If the + # URL pattern contains variables, the variable names and values will be + # appended to the query string. If a query string parameter and a URL + # pattern variable have the same name, this may result in duplicate keys in + # the query string. + # + # # Examples + # + # Given the following operation config: + # + # Method path: /api/company/{cid}/user/{uid} + # Backend address: https://example.cloudfunctions.net/getUser + # + # Requests to the following request paths will call the backend at the + # translated path: + # + # Request path: /api/company/widgetworks/user/johndoe + # Translated: + # https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe + # + # Request path: /api/company/widgetworks/user/johndoe?timezone=EST + # Translated: + # https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe + CONSTANT_ADDRESS = 1 + + # The request path will be appended to the backend address. + # + # # Examples + # + # Given the following operation config: + # + # Method path: /api/company/{cid}/user/{uid} + # Backend address: https://example.appspot.com + # + # Requests to the following request paths will call the backend at the + # translated path: + # + # Request path: /api/company/widgetworks/user/johndoe + # Translated: + # https://example.appspot.com/api/company/widgetworks/user/johndoe + # + # Request path: /api/company/widgetworks/user/johndoe?timezone=EST + # Translated: + # https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST + APPEND_PATH_TO_ADDRESS = 2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/billing.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/billing.rb new file mode 100644 index 000000000000..75d55089e3a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/billing.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Billing related configuration of the service. + # + # The following example shows how to configure monitored resources and metrics + # for billing, `consumer_destinations` is the only supported destination and + # the monitored resources need at least one label key + # `cloud.googleapis.com/location` to indicate the location of the billing + # usage, using different monitored resources between monitoring and billing is + # recommended so they can be evolved independently: + # + # + # monitored_resources: + # - type: library.googleapis.com/billing_branch + # labels: + # - key: cloud.googleapis.com/location + # description: | + # Predefined label to support billing location restriction. + # - key: city + # description: | + # Custom label to define the city where the library branch is located + # in. + # - key: name + # description: Custom label to define the name of the library branch. + # metrics: + # - name: library.googleapis.com/book/borrowed_count + # metric_kind: DELTA + # value_type: INT64 + # unit: "1" + # billing: + # consumer_destinations: + # - monitored_resource: library.googleapis.com/billing_branch + # metrics: + # - library.googleapis.com/book/borrowed_count + # @!attribute [rw] consumer_destinations + # @return [::Array<::Google::Api::Billing::BillingDestination>] + # Billing configurations for sending metrics to the consumer project. + # There can be multiple consumer destinations per service, each one must have + # a different monitored resource type. A metric can be used in at most + # one consumer destination. + class Billing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration of a specific billing destination (Currently only support + # bill against consumer project). + # @!attribute [rw] monitored_resource + # @return [::String] + # The monitored resource type. The type must be defined in + # {::Google::Api::Service#monitored_resources Service.monitored_resources} + # section. + # @!attribute [rw] metrics + # @return [::Array<::String>] + # Names of the metrics to report to this billing destination. + # Each name must be defined in + # {::Google::Api::Service#metrics Service.metrics} section. + class BillingDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/config_change.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/config_change.rb new file mode 100644 index 000000000000..ca20a231d6b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/config_change.rb @@ -0,0 +1,89 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Output generated from semantically comparing two versions of a service + # configuration. + # + # Includes detailed information about a field that have changed with + # applicable advice about potential consequences for the change, such as + # backwards-incompatibility. + # @!attribute [rw] element + # @return [::String] + # Object hierarchy path to the change, with levels separated by a '.' + # character. For repeated fields, an applicable unique identifier field is + # used for the index (usually selector, name, or id). For maps, the term + # 'key' is used. If the field has no unique identifier, the numeric index + # is used. + # Examples: + # - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction + # - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value + # - logging.producer_destinations[0] + # @!attribute [rw] old_value + # @return [::String] + # Value of the changed object in the old Service configuration, + # in JSON format. This field will not be populated if ChangeType == ADDED. + # @!attribute [rw] new_value + # @return [::String] + # Value of the changed object in the new Service configuration, + # in JSON format. This field will not be populated if ChangeType == REMOVED. + # @!attribute [rw] change_type + # @return [::Google::Api::ChangeType] + # The type for this change, either ADDED, REMOVED, or MODIFIED. + # @!attribute [rw] advices + # @return [::Array<::Google::Api::Advice>] + # Collection of advice provided for this change, useful for determining the + # possible impact of this change. + class ConfigChange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Generated advice about this change, used for providing more + # information about how a change will affect the existing service. + # @!attribute [rw] description + # @return [::String] + # Useful description for why this advice was applied and what actions should + # be taken to mitigate any implied risks. + class Advice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Classifies set of possible modifications to an object in the service + # configuration. + module ChangeType + # No value was provided. + CHANGE_TYPE_UNSPECIFIED = 0 + + # The changed object exists in the 'new' service configuration, but not + # in the 'old' service configuration. + ADDED = 1 + + # The changed object exists in the 'old' service configuration, but not + # in the 'new' service configuration. + REMOVED = 2 + + # The changed object exists in both service configurations, but its value + # is different. + MODIFIED = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/context.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/context.rb new file mode 100644 index 000000000000..871ef9830982 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/context.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # `Context` defines which contexts an API requests. + # + # Example: + # + # context: + # rules: + # - selector: "*" + # requested: + # - google.rpc.context.ProjectContext + # - google.rpc.context.OriginContext + # + # The above specifies that all methods in the API request + # `google.rpc.context.ProjectContext` and + # `google.rpc.context.OriginContext`. + # + # Available context types are defined in package + # `google.rpc.context`. + # + # This also provides mechanism to allowlist any protobuf message extension that + # can be sent in grpc metadata using “x-goog-ext--bin” and + # “x-goog-ext--jspb” format. For example, list any service + # specific protobuf types that can appear in grpc metadata as follows in your + # yaml file: + # + # Example: + # + # context: + # rules: + # - selector: "google.example.library.v1.LibraryService.CreateBook" + # allowed_request_extensions: + # - google.foo.v1.NewExtension + # allowed_response_extensions: + # - google.foo.v1.NewExtension + # + # You can also specify extension ID instead of fully qualified extension name + # here. + # @!attribute [rw] rules + # @return [::Array<::Google::Api::ContextRule>] + # A list of RPC context rules that apply to individual API methods. + # + # **NOTE:** All service configuration rules follow "last one wins" order. + class Context + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A context rule provides information about the context for an individual API + # element. + # @!attribute [rw] selector + # @return [::String] + # Selects the methods to which this rule applies. + # + # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax + # details. + # @!attribute [rw] requested + # @return [::Array<::String>] + # A list of full type names of requested contexts, only the requested context + # will be made available to the backend. + # @!attribute [rw] provided + # @return [::Array<::String>] + # A list of full type names of provided contexts. It is used to support + # propagating HTTP headers and ETags from the response extension. + # @!attribute [rw] allowed_request_extensions + # @return [::Array<::String>] + # A list of full type names or extension IDs of extensions allowed in grpc + # side channel from client to backend. + # @!attribute [rw] allowed_response_extensions + # @return [::Array<::String>] + # A list of full type names or extension IDs of extensions allowed in grpc + # side channel from backend to client. + class ContextRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/control.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/control.rb new file mode 100644 index 000000000000..ad857f7a1157 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/control.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Selects and configures the service controller used by the service. + # + # Example: + # + # control: + # environment: servicecontrol.googleapis.com + # @!attribute [rw] environment + # @return [::String] + # The service controller environment to use. If empty, no control plane + # features (like quota and billing) will be enabled. The recommended value + # for most services is servicecontrol.googleapis.com. + # @!attribute [rw] method_policies + # @return [::Array<::Google::Api::MethodPolicy>] + # Defines policies applying to the API methods of the service. + class Control + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/documentation.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/documentation.rb new file mode 100644 index 000000000000..ccefcdf22809 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/documentation.rb @@ -0,0 +1,176 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # `Documentation` provides the information for describing a service. + # + # Example: + #
documentation:
+    #   summary: >
+    #     The Google Calendar API gives access
+    #     to most calendar features.
+    #   pages:
+    #   - name: Overview
+    #     content: (== include google/foo/overview.md ==)
+    #   - name: Tutorial
+    #     content: (== include google/foo/tutorial.md ==)
+    #     subpages:
+    #     - name: Java
+    #       content: (== include google/foo/tutorial_java.md ==)
+    #   rules:
+    #   - selector: google.calendar.Calendar.Get
+    #     description: >
+    #       ...
+    #   - selector: google.calendar.Calendar.Put
+    #     description: >
+    #       ...
+    # 
+ # Documentation is provided in markdown syntax. In addition to + # standard markdown features, definition lists, tables and fenced + # code blocks are supported. Section headers can be provided and are + # interpreted relative to the section nesting of the context where + # a documentation fragment is embedded. + # + # Documentation from the IDL is merged with documentation defined + # via the config at normalization time, where documentation provided + # by config rules overrides IDL provided. + # + # A number of constructs specific to the API platform are supported + # in documentation text. + # + # In order to reference a proto element, the following + # notation can be used: + #
[fully.qualified.proto.name][]
+ # To override the display text used for the link, this can be used: + #
[display text][fully.qualified.proto.name]
+ # Text can be excluded from doc using the following notation: + #
(-- internal comment --)
+ # + # A few directives are available in documentation. Note that + # directives must appear on a single line to be properly + # identified. The `include` directive includes a markdown file from + # an external source: + #
(== include path/to/file ==)
+ # The `resource_for` directive marks a message to be the resource of + # a collection in REST view. If it is not specified, tools attempt + # to infer the resource from the operations in a collection: + #
(== resource_for v1.shelves.books ==)
+ # The directive `suppress_warning` does not directly affect documentation + # and is documented together with service config validation. + # @!attribute [rw] summary + # @return [::String] + # A short description of what the service does. The summary must be plain + # text. It becomes the overview of the service displayed in Google Cloud + # Console. + # NOTE: This field is equivalent to the standard field `description`. + # @!attribute [rw] pages + # @return [::Array<::Google::Api::Page>] + # The top level pages for the documentation set. + # @!attribute [rw] rules + # @return [::Array<::Google::Api::DocumentationRule>] + # A list of documentation rules that apply to individual API elements. + # + # **NOTE:** All service configuration rules follow "last one wins" order. + # @!attribute [rw] documentation_root_url + # @return [::String] + # The URL to the root of documentation. + # @!attribute [rw] service_root_url + # @return [::String] + # Specifies the service root url if the default one (the service name + # from the yaml file) is not suitable. This can be seen in any fully + # specified service urls as well as sections that show a base that other + # urls are relative to. + # @!attribute [rw] overview + # @return [::String] + # Declares a single overview page. For example: + #
documentation:
+    #       summary: ...
+    #       overview: (== include overview.md ==)
+    #     
+ # This is a shortcut for the following declaration (using pages style): + #
documentation:
+    #       summary: ...
+    #       pages:
+    #       - name: Overview
+    #         content: (== include overview.md ==)
+    #     
+ # Note: you cannot specify both `overview` field and `pages` field. + class Documentation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A documentation rule provides information about individual API elements. + # @!attribute [rw] selector + # @return [::String] + # The selector is a comma-separated list of patterns for any element such as + # a method, a field, an enum value. Each pattern is a qualified name of the + # element which may end in "*", indicating a wildcard. Wildcards are only + # allowed at the end and for a whole component of the qualified name, + # i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match + # one or more components. To specify a default for all applicable elements, + # the whole pattern "*" is used. + # @!attribute [rw] description + # @return [::String] + # Description of the selected proto element (e.g. a message, a method, a + # 'service' definition, or a field). Defaults to leading & trailing comments + # taken from the proto source definition of the proto element. + # @!attribute [rw] deprecation_description + # @return [::String] + # Deprecation description of the selected element(s). It can be provided if + # an element is marked as `deprecated`. + class DocumentationRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a documentation page. A page can contain subpages to represent + # nested documentation set structure. + # @!attribute [rw] name + # @return [::String] + # The name of the page. It will be used as an identity of the page to + # generate URI of the page, text of the link to this page in navigation, + # etc. The full page name (start from the root page name to this page + # concatenated with `.`) can be used as reference to the page in your + # documentation. For example: + #
pages:
+    #     - name: Tutorial
+    #       content: (== include tutorial.md ==)
+    #       subpages:
+    #       - name: Java
+    #         content: (== include tutorial_java.md ==)
+    #     
+ # You can reference `Java` page using Markdown reference link syntax: + # `[Java][Tutorial.Java]`. + # @!attribute [rw] content + # @return [::String] + # The Markdown content of the page. You can use ```(== include {path} + # ==)``` to include content from a Markdown file. The content can be used + # to produce the documentation page such as HTML format page. + # @!attribute [rw] subpages + # @return [::Array<::Google::Api::Page>] + # Subpages of this page. The order of subpages specified here will be + # honored in the generated docset. + class Page + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/endpoint.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/endpoint.rb new file mode 100644 index 000000000000..57d040a793ab --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/endpoint.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # `Endpoint` describes a network address of a service that serves a set of + # APIs. It is commonly known as a service endpoint. A service may expose + # any number of service endpoints, and all service endpoints share the same + # service definition, such as quota limits and monitoring metrics. + # + # Example: + # + # type: google.api.Service + # name: library-example.googleapis.com + # endpoints: + # # Declares network address `https://library-example.googleapis.com` + # # for service `library-example.googleapis.com`. The `https` scheme + # # is implicit for all service endpoints. Other schemes may be + # # supported in the future. + # - name: library-example.googleapis.com + # allow_cors: false + # - name: content-staging-library-example.googleapis.com + # # Allows HTTP OPTIONS calls to be passed to the API frontend, for it + # # to decide whether the subsequent cross-origin request is allowed + # # to proceed. + # allow_cors: true + # @!attribute [rw] name + # @return [::String] + # The canonical name of this endpoint. + # @!attribute [rw] aliases + # @return [::Array<::String>] + # Aliases for this endpoint, these will be served by the same UrlMap as the + # parent endpoint, and will be provisioned in the GCP stack for the Regional + # Endpoints. + # @!attribute [rw] target + # @return [::String] + # The specification of an Internet routable address of API frontend that will + # handle requests to this [API + # Endpoint](https://cloud.google.com/apis/design/glossary). It should be + # either a valid IPv4 address or a fully-qualified domain name. For example, + # "8.8.8.8" or "myservice.appspot.com". + # @!attribute [rw] allow_cors + # @return [::Boolean] + # Allowing + # [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka + # cross-domain traffic, would allow the backends served from this endpoint to + # receive and respond to HTTP OPTIONS requests. The response will be used by + # the browser to determine whether the subsequent cross-origin request is + # allowed to proceed. + class Endpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/label.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/label.rb new file mode 100644 index 000000000000..02d2f8d451f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/label.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A description of a label. + # @!attribute [rw] key + # @return [::String] + # The label key. + # @!attribute [rw] value_type + # @return [::Google::Api::LabelDescriptor::ValueType] + # The type of data that can be assigned to the label. + # @!attribute [rw] description + # @return [::String] + # A human-readable description for the label. + class LabelDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value types that can be used as label values. + module ValueType + # A variable-length string. This is the default. + STRING = 0 + + # Boolean; true or false. + BOOL = 1 + + # A 64-bit signed integer. + INT64 = 2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/log.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/log.rb new file mode 100644 index 000000000000..e977a6844da3 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/log.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A description of a log type. Example in YAML format: + # + # - name: library.googleapis.com/activity_history + # description: The history of borrowing and returning library items. + # display_name: Activity + # labels: + # - key: /customer_id + # description: Identifier of a library customer + # @!attribute [rw] name + # @return [::String] + # The name of the log. It must be less than 512 characters long and can + # include the following characters: upper- and lower-case alphanumeric + # characters [A-Za-z0-9], and punctuation characters including + # slash, underscore, hyphen, period [/_-.]. + # @!attribute [rw] labels + # @return [::Array<::Google::Api::LabelDescriptor>] + # The set of labels that are available to describe a specific log entry. + # Runtime requests that contain labels not specified here are + # considered invalid. + # @!attribute [rw] description + # @return [::String] + # A human-readable description of this log. This information appears in + # the documentation and can contain details. + # @!attribute [rw] display_name + # @return [::String] + # The human-readable name for this log. This information appears on + # the user interface and should be concise. + class LogDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/logging.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/logging.rb new file mode 100644 index 000000000000..7a784dd32332 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/logging.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Logging configuration of the service. + # + # The following example shows how to configure logs to be sent to the + # producer and consumer projects. In the example, the `activity_history` + # log is sent to both the producer and consumer projects, whereas the + # `purchase_history` log is only sent to the producer project. + # + # monitored_resources: + # - type: library.googleapis.com/branch + # labels: + # - key: /city + # description: The city where the library branch is located in. + # - key: /name + # description: The name of the branch. + # logs: + # - name: activity_history + # labels: + # - key: /customer_id + # - name: purchase_history + # logging: + # producer_destinations: + # - monitored_resource: library.googleapis.com/branch + # logs: + # - activity_history + # - purchase_history + # consumer_destinations: + # - monitored_resource: library.googleapis.com/branch + # logs: + # - activity_history + # @!attribute [rw] producer_destinations + # @return [::Array<::Google::Api::Logging::LoggingDestination>] + # Logging configurations for sending logs to the producer project. + # There can be multiple producer destinations, each one must have a + # different monitored resource type. A log can be used in at most + # one producer destination. + # @!attribute [rw] consumer_destinations + # @return [::Array<::Google::Api::Logging::LoggingDestination>] + # Logging configurations for sending logs to the consumer project. + # There can be multiple consumer destinations, each one must have a + # different monitored resource type. A log can be used in at most + # one consumer destination. + class Logging + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration of a specific logging destination (the producer project + # or the consumer project). + # @!attribute [rw] monitored_resource + # @return [::String] + # The monitored resource type. The type must be defined in the + # {::Google::Api::Service#monitored_resources Service.monitored_resources} + # section. + # @!attribute [rw] logs + # @return [::Array<::String>] + # Names of the logs to be sent to this destination. Each name must + # be defined in the {::Google::Api::Service#logs Service.logs} section. If the + # log name is not a domain scoped name, it will be automatically prefixed + # with the service name followed by "/". + class LoggingDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/metric.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/metric.rb new file mode 100644 index 000000000000..329058c374d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/metric.rb @@ -0,0 +1,299 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Defines a metric type and its schema. Once a metric descriptor is created, + # deleting or altering it stops data collection and makes the metric type's + # existing data unusable. + # @!attribute [rw] name + # @return [::String] + # The resource name of the metric descriptor. + # @!attribute [rw] type + # @return [::String] + # The metric type, including its DNS name prefix. The type is not + # URL-encoded. All user-defined metric types have the DNS name + # `custom.googleapis.com` or `external.googleapis.com`. Metric types should + # use a natural hierarchical grouping. For example: + # + # "custom.googleapis.com/invoice/paid/amount" + # "external.googleapis.com/prometheus/up" + # "appengine.googleapis.com/http/server/response_latencies" + # @!attribute [rw] labels + # @return [::Array<::Google::Api::LabelDescriptor>] + # The set of labels that can be used to describe a specific + # instance of this metric type. For example, the + # `appengine.googleapis.com/http/server/response_latencies` metric + # type has a label for the HTTP response code, `response_code`, so + # you can look at latencies for successful responses or just + # for responses that failed. + # @!attribute [rw] metric_kind + # @return [::Google::Api::MetricDescriptor::MetricKind] + # Whether the metric records instantaneous values, changes to a value, etc. + # Some combinations of `metric_kind` and `value_type` might not be supported. + # @!attribute [rw] value_type + # @return [::Google::Api::MetricDescriptor::ValueType] + # Whether the measurement is an integer, a floating-point number, etc. + # Some combinations of `metric_kind` and `value_type` might not be supported. + # @!attribute [rw] unit + # @return [::String] + # The units in which the metric value is reported. It is only applicable + # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` + # defines the representation of the stored metric values. + # + # Different systems might scale the values to be more easily displayed (so a + # value of `0.02kBy` _might_ be displayed as `20By`, and a value of + # `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is + # `kBy`, then the value of the metric is always in thousands of bytes, no + # matter how it might be displayed. + # + # If you want a custom metric to record the exact number of CPU-seconds used + # by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is + # `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 + # CPU-seconds, then the value is written as `12005`. + # + # Alternatively, if you want a custom metric to record data in a more + # granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is + # `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), + # or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). + # + # The supported units are a subset of [The Unified Code for Units of + # Measure](https://unitsofmeasure.org/ucum.html) standard: + # + # **Basic units (UNIT)** + # + # * `bit` bit + # * `By` byte + # * `s` second + # * `min` minute + # * `h` hour + # * `d` day + # * `1` dimensionless + # + # **Prefixes (PREFIX)** + # + # * `k` kilo (10^3) + # * `M` mega (10^6) + # * `G` giga (10^9) + # * `T` tera (10^12) + # * `P` peta (10^15) + # * `E` exa (10^18) + # * `Z` zetta (10^21) + # * `Y` yotta (10^24) + # + # * `m` milli (10^-3) + # * `u` micro (10^-6) + # * `n` nano (10^-9) + # * `p` pico (10^-12) + # * `f` femto (10^-15) + # * `a` atto (10^-18) + # * `z` zepto (10^-21) + # * `y` yocto (10^-24) + # + # * `Ki` kibi (2^10) + # * `Mi` mebi (2^20) + # * `Gi` gibi (2^30) + # * `Ti` tebi (2^40) + # * `Pi` pebi (2^50) + # + # **Grammar** + # + # The grammar also includes these connectors: + # + # * `/` division or ratio (as an infix operator). For examples, + # `kBy/{email}` or `MiBy/10ms` (although you should almost never + # have `/s` in a metric `unit`; rates should always be computed at + # query time from the underlying cumulative or delta value). + # * `.` multiplication or composition (as an infix operator). For + # examples, `GBy.d` or `k{watt}.h`. + # + # The grammar for a unit is as follows: + # + # Expression = Component { "." Component } { "/" Component } ; + # + # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] + # | Annotation + # | "1" + # ; + # + # Annotation = "{" NAME "}" ; + # + # Notes: + # + # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation + # is used alone, then the unit is equivalent to `1`. For examples, + # `{request}/s == 1/s`, `By{transmitted}/s == By/s`. + # * `NAME` is a sequence of non-blank printable ASCII characters not + # containing `{` or `}`. + # * `1` represents a unitary [dimensionless + # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such + # as in `1/s`. It is typically used when none of the basic units are + # appropriate. For example, "new users per day" can be represented as + # `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new + # users). Alternatively, "thousands of page views per day" would be + # represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric + # value of `5.3` would mean "5300 page views per day"). + # * `%` represents dimensionless value of 1/100, and annotates values giving + # a percentage (so the metric values are typically in the range of 0..100, + # and a metric value `3` means "3 percent"). + # * `10^2.%` indicates a metric contains a ratio, typically in the range + # 0..1, that will be multiplied by 100 and displayed as a percentage + # (so a metric value `0.03` means "3 percent"). + # @!attribute [rw] description + # @return [::String] + # A detailed description of the metric, which can be used in documentation. + # @!attribute [rw] display_name + # @return [::String] + # A concise name for the metric, which can be displayed in user interfaces. + # Use sentence case without an ending period, for example "Request count". + # This field is optional but it is recommended to be set for any metrics + # associated with user-visible concepts, such as Quota. + # @!attribute [rw] metadata + # @return [::Google::Api::MetricDescriptor::MetricDescriptorMetadata] + # Optional. Metadata which can be used to guide usage of the metric. + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Optional. The launch stage of the metric definition. + # @!attribute [rw] monitored_resource_types + # @return [::Array<::String>] + # Read-only. If present, then a [time + # series][google.monitoring.v3.TimeSeries], which is identified partially by + # a metric type and a + # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor}, that + # is associated with this metric type can only be associated with one of the + # monitored resource types listed here. + class MetricDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional annotations that can be used to guide the usage of a metric. + # @!attribute [rw] launch_stage + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Api::LaunchStage] + # Deprecated. Must use the + # {::Google::Api::MetricDescriptor#launch_stage MetricDescriptor.launch_stage} + # instead. + # @!attribute [rw] sample_period + # @return [::Google::Protobuf::Duration] + # The sampling period of metric data points. For metrics which are written + # periodically, consecutive data points are stored at this time interval, + # excluding data loss due to errors. Metrics with a higher granularity have + # a smaller sampling period. + # @!attribute [rw] ingest_delay + # @return [::Google::Protobuf::Duration] + # The delay of data points caused by ingestion. Data points older than this + # age are guaranteed to be ingested and available to be read, excluding + # data loss due to errors. + # @!attribute [rw] time_series_resource_hierarchy_level + # @return [::Array<::Google::Api::MetricDescriptor::MetricDescriptorMetadata::TimeSeriesResourceHierarchyLevel>] + # The scope of the timeseries data of the metric. + class MetricDescriptorMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The resource hierarchy level of the timeseries data of a metric. + module TimeSeriesResourceHierarchyLevel + # Do not use this default value. + TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0 + + # Scopes a metric to a project. + PROJECT = 1 + + # Scopes a metric to an organization. + ORGANIZATION = 2 + + # Scopes a metric to a folder. + FOLDER = 3 + end + end + + # The kind of measurement. It describes how the data is reported. + # For information on setting the start time and end time based on + # the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval]. + module MetricKind + # Do not use this default value. + METRIC_KIND_UNSPECIFIED = 0 + + # An instantaneous measurement of a value. + GAUGE = 1 + + # The change in a value during a time interval. + DELTA = 2 + + # A value accumulated over a time interval. Cumulative + # measurements in a time series should have the same start time + # and increasing end times, until an event resets the cumulative + # value to zero and sets a new start time for the following + # points. + CUMULATIVE = 3 + end + + # The value type of a metric. + module ValueType + # Do not use this default value. + VALUE_TYPE_UNSPECIFIED = 0 + + # The value is a boolean. + # This value type can be used only if the metric kind is `GAUGE`. + BOOL = 1 + + # The value is a signed 64-bit integer. + INT64 = 2 + + # The value is a double precision floating point number. + DOUBLE = 3 + + # The value is a text string. + # This value type can be used only if the metric kind is `GAUGE`. + STRING = 4 + + # The value is a [`Distribution`][google.api.Distribution]. + DISTRIBUTION = 5 + + # The value is money. + MONEY = 6 + end + end + + # A specific metric, identified by specifying values for all of the + # labels of a {::Google::Api::MetricDescriptor `MetricDescriptor`}. + # @!attribute [rw] type + # @return [::String] + # An existing metric type, see + # {::Google::Api::MetricDescriptor google.api.MetricDescriptor}. For example, + # `custom.googleapis.com/invoice/paid/amount`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The set of label values that uniquely identify this metric. All + # labels listed in the `MetricDescriptor` must be assigned values. + class Metric + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitored_resource.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitored_resource.rb new file mode 100644 index 000000000000..4d1ec410ddac --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitored_resource.rb @@ -0,0 +1,150 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An object that describes the schema of a + # {::Google::Api::MonitoredResource MonitoredResource} object using a type name + # and a set of labels. For example, the monitored resource descriptor for + # Google Compute Engine VM instances has a type of + # `"gce_instance"` and specifies the use of the labels `"instance_id"` and + # `"zone"` to identify particular VM instances. + # + # Different APIs can support different monitored resource types. APIs generally + # provide a `list` method that returns the monitored resource descriptors used + # by the API. + # @!attribute [rw] name + # @return [::String] + # Optional. The resource name of the monitored resource descriptor: + # `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where + # \\{type} is the value of the `type` field in this object and + # \\{project_id} is a project ID that provides API-specific context for + # accessing the type. APIs that do not use project information can use the + # resource name format `"monitoredResourceDescriptors/{type}"`. + # @!attribute [rw] type + # @return [::String] + # Required. The monitored resource type. For example, the type + # `"cloudsql_database"` represents databases in Google Cloud SQL. + # For a list of types, see [Monitored resource + # types](https://cloud.google.com/monitoring/api/resources) + # and [Logging resource + # types](https://cloud.google.com/logging/docs/api/v2/resource-list). + # @!attribute [rw] display_name + # @return [::String] + # Optional. A concise name for the monitored resource type that might be + # displayed in user interfaces. It should be a Title Cased Noun Phrase, + # without any article or other determiners. For example, + # `"Google Cloud SQL Database"`. + # @!attribute [rw] description + # @return [::String] + # Optional. A detailed description of the monitored resource type that might + # be used in documentation. + # @!attribute [rw] labels + # @return [::Array<::Google::Api::LabelDescriptor>] + # Required. A set of labels used to describe instances of this monitored + # resource type. For example, an individual Google Cloud SQL database is + # identified by values for the labels `"database_id"` and `"zone"`. + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Optional. The launch stage of the monitored resource definition. + class MonitoredResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The `type` field identifies a + # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} object + # that describes the resource's schema. Information in the `labels` field + # identifies the actual resource and its attributes according to the schema. + # For example, a particular Compute Engine VM instance could be represented by + # the following object, because the + # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} for + # `"gce_instance"` has labels + # `"project_id"`, `"instance_id"` and `"zone"`: + # + # { "type": "gce_instance", + # "labels": { "project_id": "my-project", + # "instance_id": "12345678901234", + # "zone": "us-central1-a" }} + # @!attribute [rw] type + # @return [::String] + # Required. The monitored resource type. This field must match + # the `type` field of a + # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} + # object. For example, the type of a Compute Engine VM instance is + # `gce_instance`. Some descriptors include the service name in the type; for + # example, the type of a Datastream stream is + # `datastream.googleapis.com/Stream`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Required. Values for all of the labels listed in the associated monitored + # resource descriptor. For example, Compute Engine VM instances use the + # labels `"project_id"`, `"instance_id"`, and `"zone"`. + class MonitoredResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Auxiliary metadata for a {::Google::Api::MonitoredResource MonitoredResource} + # object. {::Google::Api::MonitoredResource MonitoredResource} objects contain the + # minimum set of information to uniquely identify a monitored resource + # instance. There is some other useful auxiliary metadata. Monitoring and + # Logging use an ingestion pipeline to extract metadata for cloud resources of + # all types, and store the metadata in this message. + # @!attribute [rw] system_labels + # @return [::Google::Protobuf::Struct] + # Output only. Values for predefined system metadata labels. + # System labels are a kind of metadata extracted by Google, including + # "machine_image", "vpc", "subnet_id", + # "security_group", "name", etc. + # System label values can be only strings, Boolean values, or a list of + # strings. For example: + # + # { "name": "my-test-instance", + # "security_group": ["a", "b", "c"], + # "spot_instance": false } + # @!attribute [rw] user_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. A map of user-defined metadata labels. + class MonitoredResourceMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class UserLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitoring.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitoring.rb new file mode 100644 index 000000000000..09aaf1885816 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitoring.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Monitoring configuration of the service. + # + # The example below shows how to configure monitored resources and metrics + # for monitoring. In the example, a monitored resource and two metrics are + # defined. The `library.googleapis.com/book/returned_count` metric is sent + # to both producer and consumer projects, whereas the + # `library.googleapis.com/book/num_overdue` metric is only sent to the + # consumer project. + # + # monitored_resources: + # - type: library.googleapis.com/Branch + # display_name: "Library Branch" + # description: "A branch of a library." + # launch_stage: GA + # labels: + # - key: resource_container + # description: "The Cloud container (ie. project id) for the Branch." + # - key: location + # description: "The location of the library branch." + # - key: branch_id + # description: "The id of the branch." + # metrics: + # - name: library.googleapis.com/book/returned_count + # display_name: "Books Returned" + # description: "The count of books that have been returned." + # launch_stage: GA + # metric_kind: DELTA + # value_type: INT64 + # unit: "1" + # labels: + # - key: customer_id + # description: "The id of the customer." + # - name: library.googleapis.com/book/num_overdue + # display_name: "Books Overdue" + # description: "The current number of overdue books." + # launch_stage: GA + # metric_kind: GAUGE + # value_type: INT64 + # unit: "1" + # labels: + # - key: customer_id + # description: "The id of the customer." + # monitoring: + # producer_destinations: + # - monitored_resource: library.googleapis.com/Branch + # metrics: + # - library.googleapis.com/book/returned_count + # consumer_destinations: + # - monitored_resource: library.googleapis.com/Branch + # metrics: + # - library.googleapis.com/book/returned_count + # - library.googleapis.com/book/num_overdue + # @!attribute [rw] producer_destinations + # @return [::Array<::Google::Api::Monitoring::MonitoringDestination>] + # Monitoring configurations for sending metrics to the producer project. + # There can be multiple producer destinations. A monitored resource type may + # appear in multiple monitoring destinations if different aggregations are + # needed for different sets of metrics associated with that monitored + # resource type. A monitored resource and metric pair may only be used once + # in the Monitoring configuration. + # @!attribute [rw] consumer_destinations + # @return [::Array<::Google::Api::Monitoring::MonitoringDestination>] + # Monitoring configurations for sending metrics to the consumer project. + # There can be multiple consumer destinations. A monitored resource type may + # appear in multiple monitoring destinations if different aggregations are + # needed for different sets of metrics associated with that monitored + # resource type. A monitored resource and metric pair may only be used once + # in the Monitoring configuration. + class Monitoring + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration of a specific monitoring destination (the producer project + # or the consumer project). + # @!attribute [rw] monitored_resource + # @return [::String] + # The monitored resource type. The type must be defined in + # {::Google::Api::Service#monitored_resources Service.monitored_resources} + # section. + # @!attribute [rw] metrics + # @return [::Array<::String>] + # Types of the metrics to report to this monitoring destination. + # Each type must be defined in + # {::Google::Api::Service#metrics Service.metrics} section. + class MonitoringDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/policy.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/policy.rb new file mode 100644 index 000000000000..eb5db26fc933 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/policy.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Google API Policy Annotation + # + # This message defines a simple API policy annotation that can be used to + # annotate API request and response message fields with applicable policies. + # One field may have multiple applicable policies that must all be satisfied + # before a request can be processed. This policy annotation is used to + # generate the overall policy that will be used for automatic runtime + # policy enforcement and documentation generation. + # @!attribute [rw] selector + # @return [::String] + # Selects one or more request or response message fields to apply this + # `FieldPolicy`. + # + # When a `FieldPolicy` is used in proto annotation, the selector must + # be left as empty. The service config generator will automatically fill + # the correct value. + # + # When a `FieldPolicy` is used in service config, the selector must be a + # comma-separated string with valid request or response field paths, + # such as "foo.bar" or "foo.bar,foo.baz". + # @!attribute [rw] resource_permission + # @return [::String] + # Specifies the required permission(s) for the resource referred to by the + # field. It requires the field contains a valid resource reference, and + # the request must pass the permission checks to proceed. For example, + # "resourcemanager.projects.get". + # @!attribute [rw] resource_type + # @return [::String] + # Specifies the resource type for the resource referred to by the field. + class FieldPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines policies applying to an RPC method. + # @!attribute [rw] selector + # @return [::String] + # Selects a method to which these policies should be enforced, for example, + # "google.pubsub.v1.Subscriber.CreateSubscription". + # + # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax + # details. + # + # NOTE: This field must not be set in the proto annotation. It will be + # automatically filled by the service config compiler . + # @!attribute [rw] request_policies + # @return [::Array<::Google::Api::FieldPolicy>] + # Policies that are applicable to the request message. + class MethodPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/quota.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/quota.rb new file mode 100644 index 000000000000..606c3036c888 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/quota.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Quota configuration helps to achieve fairness and budgeting in service + # usage. + # + # The metric based quota configuration works this way: + # - The service configuration defines a set of metrics. + # - For API calls, the quota.metric_rules maps methods to metrics with + # corresponding costs. + # - The quota.limits defines limits on the metrics, which will be used for + # quota checks at runtime. + # + # An example quota configuration in yaml format: + # + # quota: + # limits: + # + # - name: apiWriteQpsPerProject + # metric: library.googleapis.com/write_calls + # unit: "1/min/\\{project}" # rate limit for consumer projects + # values: + # STANDARD: 10000 + # + # + # (The metric rules bind all methods to the read_calls metric, + # except for the UpdateBook and DeleteBook methods. These two methods + # are mapped to the write_calls metric, with the UpdateBook method + # consuming at twice rate as the DeleteBook method.) + # metric_rules: + # - selector: "*" + # metric_costs: + # library.googleapis.com/read_calls: 1 + # - selector: google.example.library.v1.LibraryService.UpdateBook + # metric_costs: + # library.googleapis.com/write_calls: 2 + # - selector: google.example.library.v1.LibraryService.DeleteBook + # metric_costs: + # library.googleapis.com/write_calls: 1 + # + # Corresponding Metric definition: + # + # metrics: + # - name: library.googleapis.com/read_calls + # display_name: Read requests + # metric_kind: DELTA + # value_type: INT64 + # + # - name: library.googleapis.com/write_calls + # display_name: Write requests + # metric_kind: DELTA + # value_type: INT64 + # @!attribute [rw] limits + # @return [::Array<::Google::Api::QuotaLimit>] + # List of QuotaLimit definitions for the service. + # @!attribute [rw] metric_rules + # @return [::Array<::Google::Api::MetricRule>] + # List of MetricRule definitions, each one mapping a selected method to one + # or more metrics. + class Quota + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Bind API methods to metrics. Binding a method to a metric causes that + # metric's configured quota behaviors to apply to the method call. + # @!attribute [rw] selector + # @return [::String] + # Selects the methods to which this rule applies. + # + # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax + # details. + # @!attribute [rw] metric_costs + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # Metrics to update when the selected methods are called, and the associated + # cost applied to each metric. + # + # The key of the map is the metric name, and the values are the amount + # increased for the metric against which the quota limits are defined. + # The value must not be negative. + class MetricRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class MetricCostsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `QuotaLimit` defines a specific limit that applies over a specified duration + # for a limit type. There can be at most one limit for a duration and limit + # type combination defined within a `QuotaGroup`. + # @!attribute [rw] name + # @return [::String] + # Name of the quota limit. + # + # The name must be provided, and it must be unique within the service. The + # name can only include alphanumeric characters as well as '-'. + # + # The maximum length of the limit name is 64 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. User-visible, extended description for this quota limit. + # Should be used only when more context is needed to understand this limit + # than provided by the limit's display name (see: `display_name`). + # @!attribute [rw] default_limit + # @return [::Integer] + # Default number of tokens that can be consumed during the specified + # duration. This is the number of tokens assigned when a client + # application developer activates the service for his/her project. + # + # Specifying a value of 0 will block all requests. This can be used if you + # are provisioning quota to selected consumers and blocking others. + # Similarly, a value of -1 will indicate an unlimited quota. No other + # negative values are allowed. + # + # Used by group-based quotas only. + # @!attribute [rw] max_limit + # @return [::Integer] + # Maximum number of tokens that can be consumed during the specified + # duration. Client application developers can override the default limit up + # to this maximum. If specified, this value cannot be set to a value less + # than the default limit. If not specified, it is set to the default limit. + # + # To allow clients to apply overrides with no upper bound, set this to -1, + # indicating unlimited maximum quota. + # + # Used by group-based quotas only. + # @!attribute [rw] free_tier + # @return [::Integer] + # Free tier value displayed in the Developers Console for this limit. + # The free tier is the number of tokens that will be subtracted from the + # billed amount when billing is enabled. + # This field can only be set on a limit with duration "1d", in a billable + # group; it is invalid on any other limit. If this field is not set, it + # defaults to 0, indicating that there is no free tier for this service. + # + # Used by group-based quotas only. + # @!attribute [rw] duration + # @return [::String] + # Duration of this limit in textual notation. Must be "100s" or "1d". + # + # Used by group-based quotas only. + # @!attribute [rw] metric + # @return [::String] + # The name of the metric this quota limit applies to. The quota limits with + # the same metric will be checked together during runtime. The metric must be + # defined within the service config. + # @!attribute [rw] unit + # @return [::String] + # Specify the unit of the quota limit. It uses the same syntax as + # {::Google::Api::MetricDescriptor#unit MetricDescriptor.unit}. The supported + # unit kinds are determined by the quota backend system. + # + # Here are some examples: + # * "1/min/\\{project}" for quota per minute per project. + # + # Note: the order of unit components is insignificant. + # The "1" at the beginning is required to follow the metric unit syntax. + # @!attribute [rw] values + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # Tiered limit values. You must specify this as a key:value pair, with an + # integer value that is the maximum number of requests allowed for the + # specified unit. Currently only STANDARD is supported. + # @!attribute [rw] display_name + # @return [::String] + # User-visible display name for this limit. + # Optional. If not set, the UI will provide a default display name based on + # the quota configuration. This field can be used to override the default + # display name generated from the configuration. + class QuotaLimit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class ValuesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/service.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/service.rb new file mode 100644 index 000000000000..49f36f188207 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/service.rb @@ -0,0 +1,170 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # `Service` is the root object of Google API service configuration (service + # config). It describes the basic information about a logical service, + # such as the service name and the user-facing title, and delegates other + # aspects to sub-sections. Each sub-section is either a proto message or a + # repeated proto message that configures a specific aspect, such as auth. + # For more information, see each proto message definition. + # + # Example: + # + # type: google.api.Service + # name: calendar.googleapis.com + # title: Google Calendar API + # apis: + # - name: google.calendar.v3.Calendar + # + # visibility: + # rules: + # - selector: "google.calendar.v3.*" + # restriction: PREVIEW + # backend: + # rules: + # - selector: "google.calendar.v3.*" + # address: calendar.example.com + # + # authentication: + # providers: + # - id: google_calendar_auth + # jwks_uri: https://www.googleapis.com/oauth2/v1/certs + # issuer: https://securetoken.google.com + # rules: + # - selector: "*" + # requirements: + # provider_id: google_calendar_auth + # @!attribute [rw] name + # @return [::String] + # The service name, which is a DNS-like logical identifier for the + # service, such as `calendar.googleapis.com`. The service name + # typically goes through DNS verification to make sure the owner + # of the service also owns the DNS name. + # @!attribute [rw] title + # @return [::String] + # The product title for this service, it is the name displayed in Google + # Cloud Console. + # @!attribute [rw] producer_project_id + # @return [::String] + # The Google project that owns this service. + # @!attribute [rw] id + # @return [::String] + # A unique ID for a specific instance of this message, typically assigned + # by the client for tracking purpose. Must be no longer than 63 characters + # and only lower case letters, digits, '.', '_' and '-' are allowed. If + # empty, the server may choose to generate one instead. + # @!attribute [rw] apis + # @return [::Array<::Google::Protobuf::Api>] + # A list of API interfaces exported by this service. Only the `name` field + # of the {::Google::Protobuf::Api google.protobuf.Api} needs to be provided by + # the configuration author, as the remaining fields will be derived from the + # IDL during the normalization process. It is an error to specify an API + # interface here which cannot be resolved against the associated IDL files. + # @!attribute [rw] types + # @return [::Array<::Google::Protobuf::Type>] + # A list of all proto message types included in this API service. + # Types referenced directly or indirectly by the `apis` are automatically + # included. Messages which are not referenced but shall be included, such as + # types used by the `google.protobuf.Any` type, should be listed here by + # name by the configuration author. Example: + # + # types: + # - name: google.protobuf.Int32 + # @!attribute [rw] enums + # @return [::Array<::Google::Protobuf::Enum>] + # A list of all enum types included in this API service. Enums referenced + # directly or indirectly by the `apis` are automatically included. Enums + # which are not referenced but shall be included should be listed here by + # name by the configuration author. Example: + # + # enums: + # - name: google.someapi.v1.SomeEnum + # @!attribute [rw] documentation + # @return [::Google::Api::Documentation] + # Additional API documentation. + # @!attribute [rw] backend + # @return [::Google::Api::Backend] + # API backend configuration. + # @!attribute [rw] http + # @return [::Google::Api::Http] + # HTTP configuration. + # @!attribute [rw] quota + # @return [::Google::Api::Quota] + # Quota configuration. + # @!attribute [rw] authentication + # @return [::Google::Api::Authentication] + # Auth configuration. + # @!attribute [rw] context + # @return [::Google::Api::Context] + # Context configuration. + # @!attribute [rw] usage + # @return [::Google::Api::Usage] + # Configuration controlling usage of this service. + # @!attribute [rw] endpoints + # @return [::Array<::Google::Api::Endpoint>] + # Configuration for network endpoints. If this is empty, then an endpoint + # with the same name as the service is automatically generated to service all + # defined APIs. + # @!attribute [rw] control + # @return [::Google::Api::Control] + # Configuration for the service control plane. + # @!attribute [rw] logs + # @return [::Array<::Google::Api::LogDescriptor>] + # Defines the logs used by this service. + # @!attribute [rw] metrics + # @return [::Array<::Google::Api::MetricDescriptor>] + # Defines the metrics used by this service. + # @!attribute [rw] monitored_resources + # @return [::Array<::Google::Api::MonitoredResourceDescriptor>] + # Defines the monitored resources used by this service. This is required + # by the `Service.monitoring` and `Service.logging` configurations. + # @!attribute [rw] billing + # @return [::Google::Api::Billing] + # Billing configuration. + # @!attribute [rw] logging + # @return [::Google::Api::Logging] + # Logging configuration. + # @!attribute [rw] monitoring + # @return [::Google::Api::Monitoring] + # Monitoring configuration. + # @!attribute [rw] system_parameters + # @return [::Google::Api::SystemParameters] + # System parameter configuration. + # @!attribute [rw] source_info + # @return [::Google::Api::SourceInfo] + # Output only. The source information for this configuration if available. + # @!attribute [rw] publishing + # @return [::Google::Api::Publishing] + # Settings for [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from APIs defined as protocol buffers. + # @!attribute [rw] config_version + # @return [::Google::Protobuf::UInt32Value] + # Obsolete. Do not use. + # + # This field has no semantic meaning. The service config compiler always + # sets this field to `3`. + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/resources.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/resources.rb new file mode 100644 index 000000000000..a314ecbf57fa --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/resources.rb @@ -0,0 +1,332 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceManagement + module V1 + # The full representation of a Service that is managed by + # Google Service Management. + # @!attribute [rw] service_name + # @return [::String] + # The name of the service. See the + # [overview](https://cloud.google.com/service-infrastructure/docs/overview) + # for naming requirements. + # @!attribute [rw] producer_project_id + # @return [::String] + # ID of the project that produces and owns this service. + class ManagedService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The metadata associated with a long running operation resource. + # @!attribute [rw] resource_names + # @return [::Array<::String>] + # The full name of the resources that this operation is directly + # associated with. + # @!attribute [rw] steps + # @return [::Array<::Google::Cloud::ServiceManagement::V1::OperationMetadata::Step>] + # Detailed status information for each step. The order is undetermined. + # @!attribute [rw] progress_percentage + # @return [::Integer] + # Percentage of completion of this operation, ranging from 0 to 100. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The start time of the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the status of one operation step. + # @!attribute [rw] description + # @return [::String] + # The short description of the step. + # @!attribute [rw] status + # @return [::Google::Cloud::ServiceManagement::V1::OperationMetadata::Status] + # The status code. + class Step + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Code describes the status of the operation (or one of its steps). + module Status + # Unspecifed code. + STATUS_UNSPECIFIED = 0 + + # The operation or step has completed without errors. + DONE = 1 + + # The operation or step has not started yet. + NOT_STARTED = 2 + + # The operation or step is in progress. + IN_PROGRESS = 3 + + # The operation or step has completed with errors. If the operation is + # rollbackable, the rollback completed with errors too. + FAILED = 4 + + # The operation or step has completed with cancellation. + CANCELLED = 5 + end + end + + # Represents a diagnostic message (error or warning) + # @!attribute [rw] location + # @return [::String] + # File name and line number of the error or warning. + # @!attribute [rw] kind + # @return [::Google::Cloud::ServiceManagement::V1::Diagnostic::Kind] + # The kind of diagnostic information provided. + # @!attribute [rw] message + # @return [::String] + # Message describing the error or warning. + class Diagnostic + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The kind of diagnostic information possible. + module Kind + # Warnings and errors + WARNING = 0 + + # Only errors + ERROR = 1 + end + end + + # Represents a source file which is used to generate the service configuration + # defined by `google.api.Service`. + # @!attribute [rw] id + # @return [::String] + # A unique ID for a specific instance of this message, typically assigned + # by the client for tracking purpose. If empty, the server may choose to + # generate one instead. + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::ServiceManagement::V1::ConfigFile>] + # Set of source configuration files that are used to generate a service + # configuration (`google.api.Service`). + class ConfigSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Generic specification of a source configuration file + # @!attribute [rw] file_path + # @return [::String] + # The file name of the configuration file (full or relative path). + # @!attribute [rw] file_contents + # @return [::String] + # The bytes that constitute the file. + # @!attribute [rw] file_type + # @return [::Google::Cloud::ServiceManagement::V1::ConfigFile::FileType] + # The type of configuration file this represents. + class ConfigFile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module FileType + # Unknown file type. + FILE_TYPE_UNSPECIFIED = 0 + + # YAML-specification of service. + SERVICE_CONFIG_YAML = 1 + + # OpenAPI specification, serialized in JSON. + OPEN_API_JSON = 2 + + # OpenAPI specification, serialized in YAML. + OPEN_API_YAML = 3 + + # FileDescriptorSet, generated by protoc. + # + # To generate, use protoc with imports and source info included. + # For an example test.proto file, the following command would put the value + # in a new file named out.pb. + # + # $protoc --include_imports --include_source_info test.proto -o out.pb + FILE_DESCRIPTOR_SET_PROTO = 4 + + # Uncompiled Proto file. Used for storage and display purposes only, + # currently server-side compilation is not supported. Should match the + # inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A + # file of this type can only be included if at least one file of type + # FILE_DESCRIPTOR_SET_PROTO is included. + PROTO_FILE = 6 + end + end + + # Represents a service configuration with its name and id. + # @!attribute [rw] name + # @return [::String] + # Resource name of a service config. It must have the following + # format: "services/\\{service name}/configs/\\{config id}". + class ConfigRef + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Change report associated with a particular service configuration. + # + # It contains a list of ConfigChanges based on the comparison between + # two service configurations. + # @!attribute [rw] config_changes + # @return [::Array<::Google::Api::ConfigChange>] + # List of changes between two service configurations. + # The changes will be alphabetically sorted based on the identifier + # of each change. + # A ConfigChange identifier is a dot separated path to the configuration. + # Example: visibility.rules[selector='LibraryService.CreateBook'].restriction + class ChangeReport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A rollout resource that defines how service configuration versions are pushed + # to control plane systems. Typically, you create a new version of the + # service config, and then create a Rollout to push the service config. + # @!attribute [rw] rollout_id + # @return [::String] + # Optional. Unique identifier of this Rollout. Must be no longer than 63 + # characters and only lower case letters, digits, '.', '_' and '-' are + # allowed. + # + # If not specified by client, the server will generate one. The generated id + # will have the form of , where "date" is the create + # date in ISO 8601 format. "revision number" is a monotonically increasing + # positive number that is reset every day for each service. + # An example of the generated rollout_id is '2016-02-16r1' + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Creation time of the rollout. Readonly. + # @!attribute [rw] created_by + # @return [::String] + # The user who created the Rollout. Readonly. + # @!attribute [rw] status + # @return [::Google::Cloud::ServiceManagement::V1::Rollout::RolloutStatus] + # The status of this rollout. Readonly. In case of a failed rollout, + # the system will automatically rollback to the current Rollout + # version. Readonly. + # @!attribute [rw] traffic_percent_strategy + # @return [::Google::Cloud::ServiceManagement::V1::Rollout::TrafficPercentStrategy] + # Google Service Control selects service configurations based on + # traffic percentage. + # + # Note: The following fields are mutually exclusive: `traffic_percent_strategy`, `delete_service_strategy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] delete_service_strategy + # @return [::Google::Cloud::ServiceManagement::V1::Rollout::DeleteServiceStrategy] + # The strategy associated with a rollout to delete a `ManagedService`. + # Readonly. + # + # Note: The following fields are mutually exclusive: `delete_service_strategy`, `traffic_percent_strategy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] service_name + # @return [::String] + # The name of the service associated with this Rollout. + class Rollout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Strategy that specifies how clients of Google Service Controller want to + # send traffic to use different config versions. This is generally + # used by API proxy to split traffic based on your configured percentage for + # each config version. + # + # One example of how to gradually rollout a new service configuration using + # this + # strategy: + # Day 1 + # + # Rollout { + # id: "example.googleapis.com/rollout_20160206" + # traffic_percent_strategy { + # percentages: { + # "example.googleapis.com/20160201": 70.00 + # "example.googleapis.com/20160206": 30.00 + # } + # } + # } + # + # Day 2 + # + # Rollout { + # id: "example.googleapis.com/rollout_20160207" + # traffic_percent_strategy: { + # percentages: { + # "example.googleapis.com/20160206": 100.00 + # } + # } + # } + # @!attribute [rw] percentages + # @return [::Google::Protobuf::Map{::String => ::Float}] + # Maps service configuration IDs to their corresponding traffic percentage. + # Key is the service configuration ID, Value is the traffic percentage + # which must be greater than 0.0 and the sum must equal to 100.0. + class TrafficPercentStrategy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Float] + class PercentagesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Strategy used to delete a service. This strategy is a placeholder only + # used by the system generated rollout to delete a service. + class DeleteServiceStrategy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of a Rollout. + module RolloutStatus + # No status specified. + ROLLOUT_STATUS_UNSPECIFIED = 0 + + # The Rollout is in progress. + IN_PROGRESS = 1 + + # The Rollout has completed successfully. + SUCCESS = 2 + + # The Rollout has been cancelled. This can happen if you have overlapping + # Rollout pushes, and the previous ones will be cancelled. + CANCELLED = 3 + + # The Rollout has failed and the rollback attempt has failed too. + FAILED = 4 + + # The Rollout has not started yet and is pending for execution. + PENDING = 5 + + # The Rollout has failed and rolled back to the previous successful + # Rollout. + FAILED_ROLLED_BACK = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.rb new file mode 100644 index 000000000000..8d0f61c93e76 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.rb @@ -0,0 +1,334 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceManagement + module V1 + # Request message for `ListServices` method. + # @!attribute [rw] producer_project_id + # @return [::String] + # Include services produced by the specified project. + # @!attribute [rw] page_size + # @return [::Integer] + # The max number of items to include in the response list. Page size is 50 + # if not specified. Maximum value is 500. + # @!attribute [rw] page_token + # @return [::String] + # Token identifying which result to start with; returned by a previous list + # call. + # @!attribute [rw] consumer_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Include services consumed by the specified consumer. + # + # The Google Service Management implementation accepts the following + # forms: + # - project: + class ListServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `ListServices` method. + # @!attribute [rw] services + # @return [::Array<::Google::Cloud::ServiceManagement::V1::ManagedService>] + # The returned services will only have the name field set. + # @!attribute [rw] next_page_token + # @return [::String] + # Token that can be passed to `ListServices` to resume a paginated query. + class ListServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetService` method. + # @!attribute [rw] service_name + # @return [::String] + # Required. The name of the service. See the `ServiceManager` overview for + # naming requirements. For example: `example.googleapis.com`. + class GetServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateService method. + # @!attribute [rw] service + # @return [::Google::Cloud::ServiceManagement::V1::ManagedService] + # Required. Initial values for the service resource. + class CreateServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteService method. + # @!attribute [rw] service_name + # @return [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + class DeleteServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UndeleteService method. + # @!attribute [rw] service_name + # @return [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + class UndeleteServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for UndeleteService method. + # @!attribute [rw] service + # @return [::Google::Cloud::ServiceManagement::V1::ManagedService] + # Revived service resource. + class UndeleteServiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetServiceConfig method. + # @!attribute [rw] service_name + # @return [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @!attribute [rw] config_id + # @return [::String] + # Required. The id of the service configuration resource. + # + # This field must be specified for the server to return all fields, including + # `SourceInfo`. + # @!attribute [rw] view + # @return [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest::ConfigView] + # Specifies which parts of the Service Config should be returned in the + # response. + class GetServiceConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module ConfigView + # Server response includes all fields except SourceInfo. + BASIC = 0 + + # Server response includes all fields including SourceInfo. + # SourceFiles are of type 'google.api.servicemanagement.v1.ConfigFile' + # and are only available for configs created using the + # SubmitConfigSource method. + FULL = 1 + end + end + + # Request message for ListServiceConfigs method. + # @!attribute [rw] service_name + # @return [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @!attribute [rw] page_token + # @return [::String] + # The token of the page to retrieve. + # @!attribute [rw] page_size + # @return [::Integer] + # The max number of items to include in the response list. Page size is 50 + # if not specified. Maximum value is 100. + class ListServiceConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListServiceConfigs method. + # @!attribute [rw] service_configs + # @return [::Array<::Google::Api::Service>] + # The list of service configuration resources. + # @!attribute [rw] next_page_token + # @return [::String] + # The token of the next page of results. + class ListServiceConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateServiceConfig method. + # @!attribute [rw] service_name + # @return [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @!attribute [rw] service_config + # @return [::Google::Api::Service] + # Required. The service configuration resource. + class CreateServiceConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for SubmitConfigSource method. + # @!attribute [rw] service_name + # @return [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @!attribute [rw] config_source + # @return [::Google::Cloud::ServiceManagement::V1::ConfigSource] + # Required. The source configuration for the service. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, this will result in the generation of a + # `google.api.Service` configuration based on the `ConfigSource` provided, + # but the generated config and the sources will NOT be persisted. + class SubmitConfigSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for SubmitConfigSource method. + # @!attribute [rw] service_config + # @return [::Google::Api::Service] + # The generated service configuration. + class SubmitConfigSourceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for 'CreateServiceRollout' + # @!attribute [rw] service_name + # @return [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @!attribute [rw] rollout + # @return [::Google::Cloud::ServiceManagement::V1::Rollout] + # Required. The rollout resource. The `service_name` field is output only. + class CreateServiceRolloutRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for 'ListServiceRollouts' + # @!attribute [rw] service_name + # @return [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @!attribute [rw] page_token + # @return [::String] + # The token of the page to retrieve. + # @!attribute [rw] page_size + # @return [::Integer] + # The max number of items to include in the response list. Page size is 50 + # if not specified. Maximum value is 100. + # @!attribute [rw] filter + # @return [::String] + # Required. Use `filter` to return subset of rollouts. + # The following filters are supported: + # + # -- By [status] + # [google.api.servicemanagement.v1.Rollout.RolloutStatus]. For example, + # `filter='status=SUCCESS'` + # + # -- By [strategy] + # [google.api.servicemanagement.v1.Rollout.strategy]. For example, + # `filter='strategy=TrafficPercentStrategy'` + class ListServiceRolloutsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListServiceRollouts method. + # @!attribute [rw] rollouts + # @return [::Array<::Google::Cloud::ServiceManagement::V1::Rollout>] + # The list of rollout resources. + # @!attribute [rw] next_page_token + # @return [::String] + # The token of the next page of results. + class ListServiceRolloutsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetServiceRollout method. + # @!attribute [rw] service_name + # @return [::String] + # Required. The name of the service. See the + # [overview](https://cloud.google.com/service-management/overview) for naming + # requirements. For example: `example.googleapis.com`. + # @!attribute [rw] rollout_id + # @return [::String] + # Required. The id of the rollout resource. + class GetServiceRolloutRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation payload for EnableService method. + class EnableServiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GenerateConfigReport method. + # @!attribute [rw] new_config + # @return [::Google::Protobuf::Any] + # Required. Service configuration for which we want to generate the report. + # For this version of API, the supported types are + # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, + # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, + # and {::Google::Api::Service google.api.Service} + # @!attribute [rw] old_config + # @return [::Google::Protobuf::Any] + # Optional. Service configuration against which the comparison will be done. + # For this version of API, the supported types are + # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, + # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, + # and {::Google::Api::Service google.api.Service} + class GenerateConfigReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for GenerateConfigReport method. + # @!attribute [rw] service_name + # @return [::String] + # Name of the service this report belongs to. + # @!attribute [rw] id + # @return [::String] + # ID of the service configuration this report belongs to. + # @!attribute [rw] change_reports + # @return [::Array<::Google::Cloud::ServiceManagement::V1::ChangeReport>] + # list of ChangeReport, each corresponding to comparison between two + # service configurations. + # @!attribute [rw] diagnostics + # @return [::Array<::Google::Cloud::ServiceManagement::V1::Diagnostic>] + # Errors / Linter warnings associated with the service definition this + # report + # belongs to. + class GenerateConfigReportResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/source_info.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/source_info.rb new file mode 100644 index 000000000000..c7bfc8db0769 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/source_info.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Source information used to create a Service Config + # @!attribute [rw] source_files + # @return [::Array<::Google::Protobuf::Any>] + # All files used during config generation. + class SourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/system_parameter.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/system_parameter.rb new file mode 100644 index 000000000000..4bb72da7b22c --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/system_parameter.rb @@ -0,0 +1,104 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # ### System parameter configuration + # + # A system parameter is a special kind of parameter defined by the API + # system, not by an individual API. It is typically mapped to an HTTP header + # and/or a URL query parameter. This configuration specifies which methods + # change the names of the system parameters. + # @!attribute [rw] rules + # @return [::Array<::Google::Api::SystemParameterRule>] + # Define system parameters. + # + # The parameters defined here will override the default parameters + # implemented by the system. If this field is missing from the service + # config, default system parameters will be used. Default system parameters + # and names is implementation-dependent. + # + # Example: define api key for all methods + # + # system_parameters + # rules: + # - selector: "*" + # parameters: + # - name: api_key + # url_query_parameter: api_key + # + # + # Example: define 2 api key names for a specific method. + # + # system_parameters + # rules: + # - selector: "/ListShelves" + # parameters: + # - name: api_key + # http_header: Api-Key1 + # - name: api_key + # http_header: Api-Key2 + # + # **NOTE:** All service configuration rules follow "last one wins" order. + class SystemParameters + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Define a system parameter rule mapping system parameter definitions to + # methods. + # @!attribute [rw] selector + # @return [::String] + # Selects the methods to which this rule applies. Use '*' to indicate all + # methods in all APIs. + # + # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax + # details. + # @!attribute [rw] parameters + # @return [::Array<::Google::Api::SystemParameter>] + # Define parameters. Multiple names may be defined for a parameter. + # For a given method call, only one of them should be used. If multiple + # names are used the behavior is implementation-dependent. + # If none of the specified names are present the behavior is + # parameter-dependent. + class SystemParameterRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Define a parameter's name and location. The parameter may be passed as either + # an HTTP header or a URL query parameter, and if both are passed the behavior + # is implementation-dependent. + # @!attribute [rw] name + # @return [::String] + # Define the name of the parameter, such as "api_key" . It is case sensitive. + # @!attribute [rw] http_header + # @return [::String] + # Define the HTTP header name to use for the parameter. It is case + # insensitive. + # @!attribute [rw] url_query_parameter + # @return [::String] + # Define the URL query parameter name to use for the parameter. It is case + # sensitive. + class SystemParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/usage.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/usage.rb new file mode 100644 index 000000000000..42ed23536d71 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/usage.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Configuration controlling usage of a service. + # @!attribute [rw] requirements + # @return [::Array<::String>] + # Requirements that must be satisfied before a consumer project can use the + # service. Each requirement is of the form /; + # for example 'serviceusage.googleapis.com/billing-enabled'. + # + # For Google APIs, a Terms of Service requirement must be included here. + # Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". + # Other Google APIs should include + # "serviceusage.googleapis.com/tos/universal". Additional ToS can be + # included based on the business needs. + # @!attribute [rw] rules + # @return [::Array<::Google::Api::UsageRule>] + # A list of usage rules that apply to individual API methods. + # + # **NOTE:** All service configuration rules follow "last one wins" order. + # @!attribute [rw] producer_notification_channel + # @return [::String] + # The full resource name of a channel used for sending notifications to the + # service producer. + # + # Google Service Management currently only supports + # [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification + # channel. To use Google Cloud Pub/Sub as the channel, this must be the name + # of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format + # documented in https://cloud.google.com/pubsub/docs/overview. + class Usage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Usage configuration rules for the service. + # @!attribute [rw] selector + # @return [::String] + # Selects the methods to which this rule applies. Use '*' to indicate all + # methods in all APIs. + # + # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax + # details. + # @!attribute [rw] allow_unregistered_calls + # @return [::Boolean] + # Use this rule to configure unregistered calls for the service. Unregistered + # calls are calls that do not contain consumer project identity. + # (Example: calls that do not contain an API key). + # + # WARNING: By default, API methods do not allow unregistered calls, and each + # method call must be identified by a consumer project identity. + # @!attribute [rw] skip_service_control + # @return [::Boolean] + # If true, the selected method should skip service control and the control + # plane features, such as quota and billing, will not be available. + # This flag is used by Google Cloud Endpoints to bypass checks for internal + # methods, such as service health check methods. + class UsageRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/api.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/api.rb new file mode 100644 index 000000000000..e6e576b4cf8a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/api.rb @@ -0,0 +1,218 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Api is a light-weight descriptor for an API Interface. + # + # Interfaces are also described as "protocol buffer services" in some contexts, + # such as by the "service" keyword in a .proto file, but they are different + # from API Services, which represent a concrete implementation of an interface + # as opposed to simply a description of methods and bindings. They are also + # sometimes simply referred to as "APIs" in other contexts, such as the name of + # this message itself. See https://cloud.google.com/apis/design/glossary for + # detailed terminology. + # + # New usages of this message as an alternative to ServiceDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] name + # @return [::String] + # The fully qualified name of this interface, including package name + # followed by the interface's simple name. + # @!attribute [rw] methods + # @return [::Array<::Google::Protobuf::Method>] + # The methods of this interface, in unspecified order. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # Any metadata attached to the interface. + # @!attribute [rw] version + # @return [::String] + # A version string for this interface. If specified, must have the form + # `major-version.minor-version`, as in `1.10`. If the minor version is + # omitted, it defaults to zero. If the entire version field is empty, the + # major version is derived from the package name, as outlined below. If the + # field is not empty, the version in the package name will be verified to be + # consistent with what is provided here. + # + # The versioning schema uses [semantic + # versioning](http://semver.org) where the major version number + # indicates a breaking change and the minor version an additive, + # non-breaking change. Both version numbers are signals to users + # what to expect from different versions, and should be carefully + # chosen based on the product plan. + # + # The major version is also reflected in the package name of the + # interface, which must end in `v`, as in + # `google.feature.v1`. For major versions 0 and 1, the suffix can + # be omitted. Zero major versions must only be used for + # experimental, non-GA interfaces. + # @!attribute [rw] source_context + # @return [::Google::Protobuf::SourceContext] + # Source context for the protocol buffer service represented by this + # message. + # @!attribute [rw] mixins + # @return [::Array<::Google::Protobuf::Mixin>] + # Included interfaces. See [Mixin][]. + # @!attribute [rw] syntax + # @return [::Google::Protobuf::Syntax] + # The source syntax of the service. + # @!attribute [rw] edition + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. + class Api + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Method represents a method of an API interface. + # + # New usages of this message as an alternative to MethodDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] name + # @return [::String] + # The simple name of this method. + # @!attribute [rw] request_type_url + # @return [::String] + # A URL of the input message type. + # @!attribute [rw] request_streaming + # @return [::Boolean] + # If true, the request is streamed. + # @!attribute [rw] response_type_url + # @return [::String] + # The URL of the output message type. + # @!attribute [rw] response_streaming + # @return [::Boolean] + # If true, the response is streamed. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # Any metadata attached to the method. + # @!attribute [rw] syntax + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Syntax] + # The source syntax of this method. + # + # This field should be ignored, instead the syntax should be inherited from + # Api. This is similar to Field and EnumValue. + # @!attribute [rw] edition + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. + # + # This field should be ignored, instead the edition should be inherited from + # Api. This is similar to Field and EnumValue. + class Method + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Declares an API Interface to be included in this interface. The including + # interface must redeclare all the methods from the included interface, but + # documentation and options are inherited as follows: + # + # - If after comment and whitespace stripping, the documentation + # string of the redeclared method is empty, it will be inherited + # from the original method. + # + # - Each annotation belonging to the service config (http, + # visibility) which is not set in the redeclared method will be + # inherited. + # + # - If an http annotation is inherited, the path pattern will be + # modified as follows. Any version prefix will be replaced by the + # version of the including interface plus the [root][] path if + # specified. + # + # Example of a simple mixin: + # + # package google.acl.v1; + # service AccessControl { + # // Get the underlying ACL object. + # rpc GetAcl(GetAclRequest) returns (Acl) { + # option (google.api.http).get = "/v1/{resource=**}:getAcl"; + # } + # } + # + # package google.storage.v2; + # service Storage { + # rpc GetAcl(GetAclRequest) returns (Acl); + # + # // Get a data record. + # rpc GetData(GetDataRequest) returns (Data) { + # option (google.api.http).get = "/v2/{resource=**}"; + # } + # } + # + # Example of a mixin configuration: + # + # apis: + # - name: google.storage.v2.Storage + # mixins: + # - name: google.acl.v1.AccessControl + # + # The mixin construct implies that all methods in `AccessControl` are + # also declared with same name and request/response types in + # `Storage`. A documentation generator or annotation processor will + # see the effective `Storage.GetAcl` method after inheriting + # documentation and annotations as follows: + # + # service Storage { + # // Get the underlying ACL object. + # rpc GetAcl(GetAclRequest) returns (Acl) { + # option (google.api.http).get = "/v2/{resource=**}:getAcl"; + # } + # ... + # } + # + # Note how the version in the path pattern changed from `v1` to `v2`. + # + # If the `root` field in the mixin is specified, it should be a + # relative path under which inherited HTTP paths are placed. Example: + # + # apis: + # - name: google.storage.v2.Storage + # mixins: + # - name: google.acl.v1.AccessControl + # root: acls + # + # This implies the following inherited HTTP annotation: + # + # service Storage { + # // Get the underlying ACL object. + # rpc GetAcl(GetAclRequest) returns (Acl) { + # option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; + # } + # ... + # } + # @!attribute [rw] name + # @return [::String] + # The fully qualified name of the interface which is included. + # @!attribute [rw] root + # @return [::String] + # If non-empty specifies a path under which inherited HTTP paths + # are rooted. + class Mixin + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/source_context.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/source_context.rb new file mode 100644 index 000000000000..1bc7c0900aec --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/source_context.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `SourceContext` represents information about the source of a + # protobuf element, like the file in which it is defined. + # @!attribute [rw] file_name + # @return [::String] + # The path-qualified name of the .proto file that contained the associated + # protobuf element. For example: `"google/protobuf/source_context.proto"`. + class SourceContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/type.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/type.rb new file mode 100644 index 000000000000..c9c8ea649289 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/type.rb @@ -0,0 +1,256 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A protocol buffer message type. + # + # New usages of this message as an alternative to DescriptorProto are strongly + # discouraged. This message does not reliability preserve all information + # necessary to model the schema and preserve semantics. Instead make use of + # FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] name + # @return [::String] + # The fully qualified message name. + # @!attribute [rw] fields + # @return [::Array<::Google::Protobuf::Field>] + # The list of fields. + # @!attribute [rw] oneofs + # @return [::Array<::String>] + # The list of types appearing in `oneof` definitions in this type. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # The protocol buffer options. + # @!attribute [rw] source_context + # @return [::Google::Protobuf::SourceContext] + # The source context. + # @!attribute [rw] syntax + # @return [::Google::Protobuf::Syntax] + # The source syntax. + # @!attribute [rw] edition + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. + class Type + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single field of a message type. + # + # New usages of this message as an alternative to FieldDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] kind + # @return [::Google::Protobuf::Field::Kind] + # The field type. + # @!attribute [rw] cardinality + # @return [::Google::Protobuf::Field::Cardinality] + # The field cardinality. + # @!attribute [rw] number + # @return [::Integer] + # The field number. + # @!attribute [rw] name + # @return [::String] + # The field name. + # @!attribute [rw] type_url + # @return [::String] + # The field type URL, without the scheme, for message or enumeration + # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + # @!attribute [rw] oneof_index + # @return [::Integer] + # The index of the field type in `Type.oneofs`, for message or enumeration + # types. The first type has index 1; zero means the type is not in the list. + # @!attribute [rw] packed + # @return [::Boolean] + # Whether to use alternative packed wire representation. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # The protocol buffer options. + # @!attribute [rw] json_name + # @return [::String] + # The field JSON name. + # @!attribute [rw] default_value + # @return [::String] + # The string value of the default value of this field. Proto2 syntax only. + class Field + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Basic field types. + module Kind + # Field type unknown. + TYPE_UNKNOWN = 0 + + # Field type double. + TYPE_DOUBLE = 1 + + # Field type float. + TYPE_FLOAT = 2 + + # Field type int64. + TYPE_INT64 = 3 + + # Field type uint64. + TYPE_UINT64 = 4 + + # Field type int32. + TYPE_INT32 = 5 + + # Field type fixed64. + TYPE_FIXED64 = 6 + + # Field type fixed32. + TYPE_FIXED32 = 7 + + # Field type bool. + TYPE_BOOL = 8 + + # Field type string. + TYPE_STRING = 9 + + # Field type group. Proto2 syntax only, and deprecated. + TYPE_GROUP = 10 + + # Field type message. + TYPE_MESSAGE = 11 + + # Field type bytes. + TYPE_BYTES = 12 + + # Field type uint32. + TYPE_UINT32 = 13 + + # Field type enum. + TYPE_ENUM = 14 + + # Field type sfixed32. + TYPE_SFIXED32 = 15 + + # Field type sfixed64. + TYPE_SFIXED64 = 16 + + # Field type sint32. + TYPE_SINT32 = 17 + + # Field type sint64. + TYPE_SINT64 = 18 + end + + # Whether a field is optional, required, or repeated. + module Cardinality + # For fields with unknown cardinality. + CARDINALITY_UNKNOWN = 0 + + # For optional fields. + CARDINALITY_OPTIONAL = 1 + + # For required fields. Proto2 syntax only. + CARDINALITY_REQUIRED = 2 + + # For repeated fields. + CARDINALITY_REPEATED = 3 + end + end + + # Enum type definition. + # + # New usages of this message as an alternative to EnumDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] name + # @return [::String] + # Enum type name. + # @!attribute [rw] enumvalue + # @return [::Array<::Google::Protobuf::EnumValue>] + # Enum value definitions. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # Protocol buffer options. + # @!attribute [rw] source_context + # @return [::Google::Protobuf::SourceContext] + # The source context. + # @!attribute [rw] syntax + # @return [::Google::Protobuf::Syntax] + # The source syntax. + # @!attribute [rw] edition + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. + class Enum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum value definition. + # + # New usages of this message as an alternative to EnumValueDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] name + # @return [::String] + # Enum value name. + # @!attribute [rw] number + # @return [::Integer] + # Enum value number. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # Protocol buffer options. + class EnumValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A protocol buffer option, which can be attached to a message, field, + # enumeration, etc. + # + # New usages of this message as an alternative to FileOptions, MessageOptions, + # FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions + # are strongly discouraged. + # @!attribute [rw] name + # @return [::String] + # The option's name. For protobuf built-in options (options defined in + # descriptor.proto), this is the short name. For example, `"map_entry"`. + # For custom options, it should be the fully-qualified name. For example, + # `"google.api.http"`. + # @!attribute [rw] value + # @return [::Google::Protobuf::Any] + # The option's value packed in an Any message. If the value is a primitive, + # the corresponding wrapper type defined in google/protobuf/wrappers.proto + # should be used. If the value is an enum, it should be stored as an int32 + # value using the google.protobuf.Int32Value type. + class Option + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The syntax in which a protocol buffer element is defined. + module Syntax + # Syntax `proto2`. + SYNTAX_PROTO2 = 0 + + # Syntax `proto3`. + SYNTAX_PROTO3 = 1 + + # Syntax `editions`. + SYNTAX_EDITIONS = 2 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-service_management-v1/snippets/Gemfile new file mode 100644 index 000000000000..c216e7e1548e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-service_management-v1", path: "../" +else + gem "google-cloud-service_management-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service.rb new file mode 100644 index 000000000000..1c68ff74701c --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_CreateService_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the create_service call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service. +# +def create_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new + + # Call the create_service method. + result = client.create_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END servicemanagement_v1_generated_ServiceManager_CreateService_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_config.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_config.rb new file mode 100644 index 000000000000..11c36e9ef1af --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the create_service_config call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_config. +# +def create_service_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new + + # Call the create_service_config method. + result = client.create_service_config request + + # The returned object is of type Google::Api::Service. + p result +end +# [END servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_rollout.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_rollout.rb new file mode 100644 index 000000000000..3676dfc62845 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_rollout.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the create_service_rollout call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_rollout. +# +def create_service_rollout + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new + + # Call the create_service_rollout method. + result = client.create_service_rollout request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/delete_service.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/delete_service.rb new file mode 100644 index 000000000000..510fb8a4ad39 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/delete_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_DeleteService_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the delete_service call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#delete_service. +# +def delete_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new + + # Call the delete_service method. + result = client.delete_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END servicemanagement_v1_generated_ServiceManager_DeleteService_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/generate_config_report.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/generate_config_report.rb new file mode 100644 index 000000000000..842fe0c160e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/generate_config_report.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the generate_config_report call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#generate_config_report. +# +def generate_config_report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new + + # Call the generate_config_report method. + result = client.generate_config_report request + + # The returned object is of type Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse. + p result +end +# [END servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service.rb new file mode 100644 index 000000000000..467349ad1ee9 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_GetService_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the get_service call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service. +# +def get_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::GetServiceRequest.new + + # Call the get_service method. + result = client.get_service request + + # The returned object is of type Google::Cloud::ServiceManagement::V1::ManagedService. + p result +end +# [END servicemanagement_v1_generated_ServiceManager_GetService_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_config.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_config.rb new file mode 100644 index 000000000000..610df5b47573 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_GetServiceConfig_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the get_service_config call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_config. +# +def get_service_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new + + # Call the get_service_config method. + result = client.get_service_config request + + # The returned object is of type Google::Api::Service. + p result +end +# [END servicemanagement_v1_generated_ServiceManager_GetServiceConfig_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_rollout.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_rollout.rb new file mode 100644 index 000000000000..3dda230e49fb --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_rollout.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_GetServiceRollout_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the get_service_rollout call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_rollout. +# +def get_service_rollout + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new + + # Call the get_service_rollout method. + result = client.get_service_rollout request + + # The returned object is of type Google::Cloud::ServiceManagement::V1::Rollout. + p result +end +# [END servicemanagement_v1_generated_ServiceManager_GetServiceRollout_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_configs.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_configs.rb new file mode 100644 index 000000000000..eeb38ca2aff8 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the list_service_configs call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_configs. +# +def list_service_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new + + # Call the list_service_configs method. + result = client.list_service_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Api::Service. + p item + end +end +# [END servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_rollouts.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_rollouts.rb new file mode 100644 index 000000000000..589785deffe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_rollouts.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the list_service_rollouts call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_rollouts. +# +def list_service_rollouts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new + + # Call the list_service_rollouts method. + result = client.list_service_rollouts request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ServiceManagement::V1::Rollout. + p item + end +end +# [END servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_services.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_services.rb new file mode 100644 index 000000000000..eb978eb8fc46 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_ListServices_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the list_services call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_services. +# +def list_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::ListServicesRequest.new + + # Call the list_services method. + result = client.list_services request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ServiceManagement::V1::ManagedService. + p item + end +end +# [END servicemanagement_v1_generated_ServiceManager_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/submit_config_source.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/submit_config_source.rb new file mode 100644 index 000000000000..329b0d68e2f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/submit_config_source.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the submit_config_source call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#submit_config_source. +# +def submit_config_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new + + # Call the submit_config_source method. + result = client.submit_config_source request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/undelete_service.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/undelete_service.rb new file mode 100644 index 000000000000..e6831d656f74 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/undelete_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START servicemanagement_v1_generated_ServiceManager_UndeleteService_sync] +require "google/cloud/service_management/v1" + +## +# Snippet for the undelete_service call in the ServiceManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#undelete_service. +# +def undelete_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new + + # Call the undelete_service method. + result = client.undelete_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END servicemanagement_v1_generated_ServiceManager_UndeleteService_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/snippet_metadata_google.api.servicemanagement.v1.json b/owl-bot-staging/google-cloud-service_management-v1/snippets/snippet_metadata_google.api.servicemanagement.v1.json new file mode 100644 index 000000000000..6e3a8680e282 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/snippets/snippet_metadata_google.api.servicemanagement.v1.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-cloud-service_management-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.api.servicemanagement.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_ListServices_sync", + "title": "Snippet for the list_services call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_services.", + "file": "service_manager/list_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_services", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::ListServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceManagement::V1::ListServicesResponse", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "ListServices", + "full_name": "google.api.servicemanagement.v1.ServiceManager.ListServices", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_GetService_sync", + "title": "Snippet for the get_service call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service.", + "file": "service_manager/get_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::GetServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceManagement::V1::ManagedService", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "GetService", + "full_name": "google.api.servicemanagement.v1.ServiceManager.GetService", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_CreateService_sync", + "title": "Snippet for the create_service call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service.", + "file": "service_manager/create_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::CreateServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "CreateService", + "full_name": "google.api.servicemanagement.v1.ServiceManager.CreateService", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_DeleteService_sync", + "title": "Snippet for the delete_service call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#delete_service.", + "file": "service_manager/delete_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_service", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#delete_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "DeleteService", + "full_name": "google.api.servicemanagement.v1.ServiceManager.DeleteService", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_UndeleteService_sync", + "title": "Snippet for the undelete_service call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#undelete_service.", + "file": "service_manager/undelete_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "undelete_service", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#undelete_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "UndeleteService", + "full_name": "google.api.servicemanagement.v1.ServiceManager.UndeleteService", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_sync", + "title": "Snippet for the list_service_configs call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_configs.", + "file": "service_manager/list_service_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_service_configs", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "ListServiceConfigs", + "full_name": "google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_GetServiceConfig_sync", + "title": "Snippet for the get_service_config call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_config.", + "file": "service_manager/get_service_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service_config", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::Service", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "GetServiceConfig", + "full_name": "google.api.servicemanagement.v1.ServiceManager.GetServiceConfig", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_sync", + "title": "Snippet for the create_service_config call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_config.", + "file": "service_manager/create_service_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service_config", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Api::Service", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "CreateServiceConfig", + "full_name": "google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_sync", + "title": "Snippet for the submit_config_source call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#submit_config_source.", + "file": "service_manager/submit_config_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "submit_config_source", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#submit_config_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "SubmitConfigSource", + "full_name": "google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_sync", + "title": "Snippet for the list_service_rollouts call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_rollouts.", + "file": "service_manager/list_service_rollouts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_service_rollouts", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_rollouts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "ListServiceRollouts", + "full_name": "google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_GetServiceRollout_sync", + "title": "Snippet for the get_service_rollout call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_rollout.", + "file": "service_manager/get_service_rollout.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service_rollout", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_rollout", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceManagement::V1::Rollout", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "GetServiceRollout", + "full_name": "google.api.servicemanagement.v1.ServiceManager.GetServiceRollout", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_sync", + "title": "Snippet for the create_service_rollout call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_rollout.", + "file": "service_manager/create_service_rollout.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_service_rollout", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_rollout", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "CreateServiceRollout", + "full_name": "google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_sync", + "title": "Snippet for the generate_config_report call in the ServiceManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#generate_config_report.", + "file": "service_manager/generate_config_report.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_config_report", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#generate_config_report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse", + "client": { + "short_name": "ServiceManager::Client", + "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" + }, + "method": { + "short_name": "GenerateConfigReport", + "full_name": "google.api.servicemanagement.v1.ServiceManager.GenerateConfigReport", + "service": { + "short_name": "ServiceManager", + "full_name": "google.api.servicemanagement.v1.ServiceManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_test.rb b/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_test.rb new file mode 100644 index 000000000000..a7e637722b9c --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/api/servicemanagement/v1/servicemanager_pb" +require "google/api/servicemanagement/v1/servicemanager_services_pb" +require "google/cloud/service_management/v1/service_manager" + +class ::Google::Cloud::ServiceManagement::V1::ServiceManager::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_rest_test.rb b/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_rest_test.rb new file mode 100644 index 000000000000..6ca859efecf7 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_rest_test.rb @@ -0,0 +1,817 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/api/servicemanagement/v1/servicemanager_pb" +require "google/cloud/service_management/v1/service_manager/rest" + + +class ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_services + # Create test objects. + client_result = ::Google::Cloud::ServiceManagement::V1::ListServicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + producer_project_id = "hello world" + page_size = 42 + page_token = "hello world" + consumer_id = "hello world" + + list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_services_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_services({ producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_services producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_services ::Google::Cloud::ServiceManagement::V1::ListServicesRequest.new(producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_services({ producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_services(::Google::Cloud::ServiceManagement::V1::ListServicesRequest.new(producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_count + end + end + end + + def test_get_service + # Create test objects. + client_result = ::Google::Cloud::ServiceManagement::V1::ManagedService.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + + get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_service({ service_name: service_name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_service service_name: service_name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_service ::Google::Cloud::ServiceManagement::V1::GetServiceRequest.new(service_name: service_name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_service({ service_name: service_name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_service(::Google::Cloud::ServiceManagement::V1::GetServiceRequest.new(service_name: service_name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_count + end + end + end + + def test_create_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service = {} + + create_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_create_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_service({ service: service }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_service service: service do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_service ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new(service: service) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_service({ service: service }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_service(::Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new(service: service), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_client_stub.call_count + end + end + end + + def test_delete_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + + delete_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_delete_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_service({ service_name: service_name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_service service_name: service_name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_service ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new(service_name: service_name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_service({ service_name: service_name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_service(::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new(service_name: service_name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_service_client_stub.call_count + end + end + end + + def test_undelete_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + + undelete_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_undelete_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undelete_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.undelete_service({ service_name: service_name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.undelete_service service_name: service_name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.undelete_service ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new(service_name: service_name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.undelete_service({ service_name: service_name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.undelete_service(::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new(service_name: service_name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undelete_service_client_stub.call_count + end + end + end + + def test_list_service_configs + # Create test objects. + client_result = ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + page_token = "hello world" + page_size = 42 + + list_service_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_list_service_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_service_configs_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_service_configs({ service_name: service_name, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_service_configs service_name: service_name, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_service_configs ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_service_configs({ service_name: service_name, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_service_configs(::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_service_configs_client_stub.call_count + end + end + end + + def test_get_service_config + # Create test objects. + client_result = ::Google::Api::Service.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + config_id = "hello world" + view = :BASIC + + get_service_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_get_service_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_config_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_service_config({ service_name: service_name, config_id: config_id, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_service_config service_name: service_name, config_id: config_id, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_service_config ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new(service_name: service_name, config_id: config_id, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_service_config({ service_name: service_name, config_id: config_id, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_service_config(::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new(service_name: service_name, config_id: config_id, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_config_client_stub.call_count + end + end + end + + def test_create_service_config + # Create test objects. + client_result = ::Google::Api::Service.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + service_config = {} + + create_service_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_create_service_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_config_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_service_config({ service_name: service_name, service_config: service_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_service_config service_name: service_name, service_config: service_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_service_config ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new(service_name: service_name, service_config: service_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_service_config({ service_name: service_name, service_config: service_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_service_config(::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new(service_name: service_name, service_config: service_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_config_client_stub.call_count + end + end + end + + def test_submit_config_source + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + config_source = {} + validate_only = true + + submit_config_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_submit_config_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, submit_config_source_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.submit_config_source({ service_name: service_name, config_source: config_source, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.submit_config_source service_name: service_name, config_source: config_source, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.submit_config_source ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new(service_name: service_name, config_source: config_source, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.submit_config_source({ service_name: service_name, config_source: config_source, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.submit_config_source(::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new(service_name: service_name, config_source: config_source, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, submit_config_source_client_stub.call_count + end + end + end + + def test_list_service_rollouts + # Create test objects. + client_result = ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + page_token = "hello world" + page_size = 42 + filter = "hello world" + + list_service_rollouts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_list_service_rollouts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_service_rollouts_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_service_rollouts({ service_name: service_name, page_token: page_token, page_size: page_size, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_service_rollouts service_name: service_name, page_token: page_token, page_size: page_size, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_service_rollouts ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_service_rollouts({ service_name: service_name, page_token: page_token, page_size: page_size, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_service_rollouts(::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_service_rollouts_client_stub.call_count + end + end + end + + def test_get_service_rollout + # Create test objects. + client_result = ::Google::Cloud::ServiceManagement::V1::Rollout.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + rollout_id = "hello world" + + get_service_rollout_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_get_service_rollout_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_rollout_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_service_rollout({ service_name: service_name, rollout_id: rollout_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_service_rollout service_name: service_name, rollout_id: rollout_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_service_rollout ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new(service_name: service_name, rollout_id: rollout_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_service_rollout({ service_name: service_name, rollout_id: rollout_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_service_rollout(::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new(service_name: service_name, rollout_id: rollout_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_rollout_client_stub.call_count + end + end + end + + def test_create_service_rollout + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + rollout = {} + + create_service_rollout_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_create_service_rollout_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_service_rollout_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_service_rollout({ service_name: service_name, rollout: rollout }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_service_rollout service_name: service_name, rollout: rollout do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_service_rollout ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new(service_name: service_name, rollout: rollout) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_service_rollout({ service_name: service_name, rollout: rollout }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_service_rollout(::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new(service_name: service_name, rollout: rollout), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_service_rollout_client_stub.call_count + end + end + end + + def test_generate_config_report + # Create test objects. + client_result = ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + new_config = {} + old_config = {} + + generate_config_report_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_generate_config_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_config_report_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.generate_config_report({ new_config: new_config, old_config: old_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.generate_config_report new_config: new_config, old_config: old_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.generate_config_report ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new(new_config: new_config, old_config: old_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.generate_config_report({ new_config: new_config, old_config: old_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.generate_config_report(::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new(new_config: new_config, old_config: old_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_config_report_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_test.rb b/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_test.rb new file mode 100644 index 000000000000..97e3b6131b65 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_test.rb @@ -0,0 +1,944 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/api/servicemanagement/v1/servicemanager_pb" +require "google/cloud/service_management/v1/service_manager" + +class ::Google::Cloud::ServiceManagement::V1::ServiceManager::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceManagement::V1::ListServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + producer_project_id = "hello world" + page_size = 42 + page_token = "hello world" + consumer_id = "hello world" + + list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_services, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::ListServicesRequest, request + assert_equal "hello world", request["producer_project_id"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["consumer_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_services_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_services({ producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_services producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_services ::Google::Cloud::ServiceManagement::V1::ListServicesRequest.new(producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_services({ producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_services(::Google::Cloud::ServiceManagement::V1::ListServicesRequest.new(producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_rpc_count + end + end + + def test_get_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceManagement::V1::ManagedService.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + + get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::GetServiceRequest, request + assert_equal "hello world", request["service_name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_service({ service_name: service_name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_service service_name: service_name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_service ::Google::Cloud::ServiceManagement::V1::GetServiceRequest.new(service_name: service_name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_service({ service_name: service_name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_service(::Google::Cloud::ServiceManagement::V1::GetServiceRequest.new(service_name: service_name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_rpc_count + end + end + + def test_create_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service = {} + + create_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceManagement::V1::ManagedService), request["service"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_service({ service: service }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_service service: service do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_service ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new(service: service) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_service({ service: service }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_service(::Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new(service: service), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_service_client_stub.call_rpc_count + end + end + + def test_delete_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + + delete_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_service, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest, request + assert_equal "hello world", request["service_name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_service({ service_name: service_name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_service service_name: service_name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_service ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new(service_name: service_name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_service({ service_name: service_name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_service(::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new(service_name: service_name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_service_client_stub.call_rpc_count + end + end + + def test_undelete_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + + undelete_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undelete_service, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest, request + assert_equal "hello world", request["service_name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undelete_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.undelete_service({ service_name: service_name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.undelete_service service_name: service_name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.undelete_service ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new(service_name: service_name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.undelete_service({ service_name: service_name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.undelete_service(::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new(service_name: service_name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, undelete_service_client_stub.call_rpc_count + end + end + + def test_list_service_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + page_token = "hello world" + page_size = 42 + + list_service_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_service_configs, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest, request + assert_equal "hello world", request["service_name"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_service_configs_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_service_configs({ service_name: service_name, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_service_configs service_name: service_name, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_service_configs ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_service_configs({ service_name: service_name, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_service_configs(::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_service_configs_client_stub.call_rpc_count + end + end + + def test_get_service_config + # Create GRPC objects. + grpc_response = ::Google::Api::Service.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + config_id = "hello world" + view = :BASIC + + get_service_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service_config, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest, request + assert_equal "hello world", request["service_name"] + assert_equal "hello world", request["config_id"] + assert_equal :BASIC, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_config_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_service_config({ service_name: service_name, config_id: config_id, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_service_config service_name: service_name, config_id: config_id, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_service_config ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new(service_name: service_name, config_id: config_id, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_service_config({ service_name: service_name, config_id: config_id, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_service_config(::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new(service_name: service_name, config_id: config_id, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_service_config_client_stub.call_rpc_count + end + end + + def test_create_service_config + # Create GRPC objects. + grpc_response = ::Google::Api::Service.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + service_config = {} + + create_service_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service_config, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest, request + assert_equal "hello world", request["service_name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Api::Service), request["service_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_config_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_service_config({ service_name: service_name, service_config: service_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_service_config service_name: service_name, service_config: service_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_service_config ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new(service_name: service_name, service_config: service_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_service_config({ service_name: service_name, service_config: service_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_service_config(::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new(service_name: service_name, service_config: service_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_service_config_client_stub.call_rpc_count + end + end + + def test_submit_config_source + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + config_source = {} + validate_only = true + + submit_config_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :submit_config_source, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest, request + assert_equal "hello world", request["service_name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceManagement::V1::ConfigSource), request["config_source"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, submit_config_source_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.submit_config_source({ service_name: service_name, config_source: config_source, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.submit_config_source service_name: service_name, config_source: config_source, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.submit_config_source ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new(service_name: service_name, config_source: config_source, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.submit_config_source({ service_name: service_name, config_source: config_source, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.submit_config_source(::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new(service_name: service_name, config_source: config_source, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, submit_config_source_client_stub.call_rpc_count + end + end + + def test_list_service_rollouts + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + page_token = "hello world" + page_size = 42 + filter = "hello world" + + list_service_rollouts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_service_rollouts, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest, request + assert_equal "hello world", request["service_name"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_service_rollouts_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_service_rollouts({ service_name: service_name, page_token: page_token, page_size: page_size, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_service_rollouts service_name: service_name, page_token: page_token, page_size: page_size, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_service_rollouts ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_service_rollouts({ service_name: service_name, page_token: page_token, page_size: page_size, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_service_rollouts(::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_service_rollouts_client_stub.call_rpc_count + end + end + + def test_get_service_rollout + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceManagement::V1::Rollout.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + rollout_id = "hello world" + + get_service_rollout_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service_rollout, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest, request + assert_equal "hello world", request["service_name"] + assert_equal "hello world", request["rollout_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_rollout_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_service_rollout({ service_name: service_name, rollout_id: rollout_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_service_rollout service_name: service_name, rollout_id: rollout_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_service_rollout ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new(service_name: service_name, rollout_id: rollout_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_service_rollout({ service_name: service_name, rollout_id: rollout_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_service_rollout(::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new(service_name: service_name, rollout_id: rollout_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_service_rollout_client_stub.call_rpc_count + end + end + + def test_create_service_rollout + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + service_name = "hello world" + rollout = {} + + create_service_rollout_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_service_rollout, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest, request + assert_equal "hello world", request["service_name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceManagement::V1::Rollout), request["rollout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_service_rollout_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_service_rollout({ service_name: service_name, rollout: rollout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_service_rollout service_name: service_name, rollout: rollout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_service_rollout ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new(service_name: service_name, rollout: rollout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_service_rollout({ service_name: service_name, rollout: rollout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_service_rollout(::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new(service_name: service_name, rollout: rollout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_service_rollout_client_stub.call_rpc_count + end + end + + def test_generate_config_report + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + new_config = {} + old_config = {} + + generate_config_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_config_report, name + assert_kind_of ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Any), request["new_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Any), request["old_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_config_report_client_stub do + # Create client + c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.generate_config_report({ new_config: new_config, old_config: old_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.generate_config_report new_config: new_config, old_config: old_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.generate_config_report ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new(new_config: new_config, old_config: old_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.generate_config_report({ new_config: new_config, old_config: old_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.generate_config_report(::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new(new_config: new_config, old_config: old_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_config_report_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-service_management-v1/test/helper.rb b/owl-bot-staging/google-cloud-service_management-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_management-v1/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_usage-v1/.gitignore b/owl-bot-staging/google-cloud-service_usage-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/.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_usage-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-service_usage-v1/.repo-metadata.json new file mode 100644 index 000000000000..8e59ad13577b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "serviceusage.googleapis.com", + "api_shortname": "serviceusage", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest", + "distribution_name": "google-cloud-service_usage-v1", + "is_cloud": true, + "language": "ruby", + "name": "serviceusage", + "name_pretty": "Service Usage V1 API", + "product_documentation": "https://cloud.google.com/service-usage/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Service Usage is an infrastructure service of Google Cloud that lets you list and manage other APIs and services in your Cloud projects. You can list and manage Google Cloud services and their APIs, as well as services created using Cloud Endpoints. Note that google-cloud-service_usage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_usage instead. See the readme for more details.", + "ruby-cloud-env-prefix": "SERVICE_USAGE", + "ruby-cloud-product-url": "https://cloud.google.com/service-usage/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-service_usage-v1/.rubocop.yml b/owl-bot-staging/google-cloud-service_usage-v1/.rubocop.yml new file mode 100644 index 000000000000..e4a9da8eab3b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-service_usage-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-service_usage-v1.rb" diff --git a/owl-bot-staging/google-cloud-service_usage-v1/.toys.rb b/owl-bot-staging/google-cloud-service_usage-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/.yardopts b/owl-bot-staging/google-cloud-service_usage-v1/.yardopts new file mode 100644 index 000000000000..082c42437dcc --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Service Usage V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-service_usage-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_usage-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..ac6fd4e7ead4 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-service_usage-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-service_usage-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/service_usage/v1" + +client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/service_usage/v1" + +::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-service_usage-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/service_usage/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-service_usage-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-service_usage-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-service_usage-v1/Gemfile b/owl-bot-staging/google-cloud-service_usage-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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_usage-v1/LICENSE.md b/owl-bot-staging/google-cloud-service_usage-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-service_usage-v1/README.md b/owl-bot-staging/google-cloud-service_usage-v1/README.md new file mode 100644 index 000000000000..391b55f8975b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Service Usage V1 API + +Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use. + +Service Usage is an infrastructure service of Google Cloud that lets you list and manage other APIs and services in your Cloud projects. You can list and manage Google Cloud services and their APIs, as well as services created using Cloud Endpoints. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Service Usage V1 API. Most users should consider using +the main client gem, +[google-cloud-service_usage](https://rubygems.org/gems/google-cloud-service_usage). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-service_usage-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/serviceusage.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/service_usage/v1" + +client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new +request = ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new # (request fields as keyword arguments...) +response = client.enable_service request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/service-usage/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/service_usage/v1" +require "logger" + +client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-service_usage`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-service_usage-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_usage`. +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_usage-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_usage-v1/Rakefile b/owl-bot-staging/google-cloud-service_usage-v1/Rakefile new file mode 100644 index 000000000000..aa26e213bd12 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-service_usage-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SERVICE_USAGE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SERVICE_USAGE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SERVICE_USAGE_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_USAGE_TEST_PROJECT=test123 SERVICE_USAGE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/service_usage/v1/service_usage/credentials" + ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SERVICE_USAGE_PROJECT"] = project + ENV["SERVICE_USAGE_TEST_PROJECT"] = project + ENV["SERVICE_USAGE_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_usage-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-service_usage-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-service_usage-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-service_usage-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-service_usage-v1" + header "google-cloud-service_usage-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-service_usage-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-service_usage-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-service_usage-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-service_usage-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-service_usage-v1/gapic_metadata.json new file mode 100644 index 000000000000..343aa839bde6 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.api.serviceusage.v1", + "libraryPackage": "::Google::Cloud::ServiceUsage::V1", + "services": { + "ServiceUsage": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client", + "rpcs": { + "EnableService": { + "methods": [ + "enable_service" + ] + }, + "DisableService": { + "methods": [ + "disable_service" + ] + }, + "GetService": { + "methods": [ + "get_service" + ] + }, + "ListServices": { + "methods": [ + "list_services" + ] + }, + "BatchEnableServices": { + "methods": [ + "batch_enable_services" + ] + }, + "BatchGetServices": { + "methods": [ + "batch_get_services" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-service_usage-v1/google-cloud-service_usage-v1.gemspec b/owl-bot-staging/google-cloud-service_usage-v1/google-cloud-service_usage-v1.gemspec new file mode 100644 index 000000000000..7a93057bd6ff --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/google-cloud-service_usage-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/service_usage/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-service_usage-v1" + gem.version = Google::Cloud::ServiceUsage::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Service Usage is an infrastructure service of Google Cloud that lets you list and manage other APIs and services in your Cloud projects. You can list and manage Google Cloud services and their APIs, as well as services created using Cloud Endpoints. Note that google-cloud-service_usage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_usage instead. See the readme for more details." + gem.summary = "Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google-cloud-service_usage-v1.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google-cloud-service_usage-v1.rb new file mode 100644 index 000000000000..024e67974bb5 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google-cloud-service_usage-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/service_usage/v1" diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/resources_pb.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/resources_pb.rb new file mode 100644 index 000000000000..9c7b8777ba6e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/resources_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/serviceusage/v1/resources.proto + +require 'google/protobuf' + +require 'google/api/auth_pb' +require 'google/api/documentation_pb' +require 'google/api/endpoint_pb' +require 'google/api/monitored_resource_pb' +require 'google/api/monitoring_pb' +require 'google/api/quota_pb' +require 'google/api/resource_pb' +require 'google/api/usage_pb' +require 'google/protobuf/api_pb' + + +descriptor_data = "\n*google/api/serviceusage/v1/resources.proto\x12\x1agoogle.api.serviceusage.v1\x1a\x15google/api/auth.proto\x1a\x1egoogle/api/documentation.proto\x1a\x19google/api/endpoint.proto\x1a#google/api/monitored_resource.proto\x1a\x1bgoogle/api/monitoring.proto\x1a\x16google/api/quota.proto\x1a\x19google/api/resource.proto\x1a\x16google/api/usage.proto\x1a\x19google/protobuf/api.proto\"\xbd\x02\n\x07Service\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12\x39\n\x06\x63onfig\x18\x02 \x01(\x0b\x32).google.api.serviceusage.v1.ServiceConfig\x12\x30\n\x05state\x18\x04 \x01(\x0e\x32!.google.api.serviceusage.v1.State:\xa6\x01\xea\x41\xa2\x01\n#serviceusage.googleapis.com/Service\x12%projects/{project}/services/{service}\x12#folders/{folder}/services/{service}\x12/organizations/{organization}/services/{service}\"\x95\x03\n\rServiceConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\"\n\x04\x61pis\x18\x03 \x03(\x0b\x32\x14.google.protobuf.Api\x12\x30\n\rdocumentation\x18\x06 \x01(\x0b\x32\x19.google.api.Documentation\x12 \n\x05quota\x18\n \x01(\x0b\x32\x11.google.api.Quota\x12\x32\n\x0e\x61uthentication\x18\x0b \x01(\x0b\x32\x1a.google.api.Authentication\x12 \n\x05usage\x18\x0f \x01(\x0b\x32\x11.google.api.Usage\x12\'\n\tendpoints\x18\x12 \x03(\x0b\x32\x14.google.api.Endpoint\x12\x44\n\x13monitored_resources\x18\x19 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12*\n\nmonitoring\x18\x1c \x01(\x0b\x32\x16.google.api.Monitoring\"+\n\x11OperationMetadata\x12\x16\n\x0eresource_names\x18\x02 \x03(\t*9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x42\xd8\x01\n\x1e\x63om.google.api.serviceusage.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/serviceusage/apiv1/serviceusagepb;serviceusagepb\xaa\x02\x1cGoogle.Cloud.ServiceUsage.V1\xca\x02\x1cGoogle\\Cloud\\ServiceUsage\\V1\xea\x02\x1fGoogle::Cloud::ServiceUsage::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceUsage + module V1 + Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.Service").msgclass + ServiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.ServiceConfig").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.OperationMetadata").msgclass + State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_pb.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_pb.rb new file mode 100644 index 000000000000..3a926161d952 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/serviceusage/v1/serviceusage.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/serviceusage/v1/resources_pb' +require 'google/longrunning/operations_pb' + + +descriptor_data = "\n-google/api/serviceusage/v1/serviceusage.proto\x12\x1agoogle.api.serviceusage.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a*google/api/serviceusage/v1/resources.proto\x1a#google/longrunning/operations.proto\"$\n\x14\x45nableServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"M\n\x15\x45nableServiceResponse\x12\x34\n\x07service\x18\x01 \x01(\x0b\x32#.google.api.serviceusage.v1.Service\"\x92\x02\n\x15\x44isableServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\"\n\x1a\x64isable_dependent_services\x18\x02 \x01(\x08\x12l\n\x1a\x63heck_if_service_has_usage\x18\x03 \x01(\x0e\x32H.google.api.serviceusage.v1.DisableServiceRequest.CheckIfServiceHasUsage\"Y\n\x16\x43heckIfServiceHasUsage\x12*\n&CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED\x10\x00\x12\x08\n\x04SKIP\x10\x01\x12\t\n\x05\x43HECK\x10\x02\"N\n\x16\x44isableServiceResponse\x12\x34\n\x07service\x18\x01 \x01(\x0b\x32#.google.api.serviceusage.v1.Service\"!\n\x11GetServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\\\n\x13ListServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"f\n\x14ListServicesResponse\x12\x35\n\x08services\x18\x01 \x03(\x0b\x32#.google.api.serviceusage.v1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"A\n\x1a\x42\x61tchEnableServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x13\n\x0bservice_ids\x18\x02 \x03(\t\"\xe9\x01\n\x1b\x42\x61tchEnableServicesResponse\x12\x35\n\x08services\x18\x01 \x03(\x0b\x32#.google.api.serviceusage.v1.Service\x12W\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x45.google.api.serviceusage.v1.BatchEnableServicesResponse.EnableFailure\x1a:\n\rEnableFailure\x12\x12\n\nservice_id\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\"8\n\x17\x42\x61tchGetServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\r\n\x05names\x18\x02 \x03(\t\"Q\n\x18\x42\x61tchGetServicesResponse\x12\x35\n\x08services\x18\x01 \x03(\x0b\x32#.google.api.serviceusage.v1.Service2\xe8\t\n\x0cServiceUsage\x12\xba\x01\n\rEnableService\x12\x30.google.api.serviceusage.v1.EnableServiceRequest\x1a\x1d.google.longrunning.Operation\"X\xca\x41*\n\x15\x45nableServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02%\" /v1/{name=*/*/services/*}:enable:\x01*\x12\xbe\x01\n\x0e\x44isableService\x12\x31.google.api.serviceusage.v1.DisableServiceRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41+\n\x16\x44isableServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02&\"!/v1/{name=*/*/services/*}:disable:\x01*\x12\x83\x01\n\nGetService\x12-.google.api.serviceusage.v1.GetServiceRequest\x1a#.google.api.serviceusage.v1.Service\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{name=*/*/services/*}\x12\x94\x01\n\x0cListServices\x12/.google.api.serviceusage.v1.ListServicesRequest\x1a\x30.google.api.serviceusage.v1.ListServicesResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{parent=*/*}/services\x12\xd1\x01\n\x13\x42\x61tchEnableServices\x12\x36.google.api.serviceusage.v1.BatchEnableServicesRequest\x1a\x1d.google.longrunning.Operation\"c\xca\x41\x30\n\x1b\x42\x61tchEnableServicesResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02*\"%/v1/{parent=*/*}/services:batchEnable:\x01*\x12\xa9\x01\n\x10\x42\x61tchGetServices\x12\x33.google.api.serviceusage.v1.BatchGetServicesRequest\x1a\x34.google.api.serviceusage.v1.BatchGetServicesResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/{parent=*/*}/services:batchGet\x1a\xbc\x01\xca\x41\x1bserviceusage.googleapis.com\xd2\x41\x9a\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/service.managementB\xdb\x01\n\x1e\x63om.google.api.serviceusage.v1B\x11ServiceUsageProtoP\x01ZDcloud.google.com/go/serviceusage/apiv1/serviceusagepb;serviceusagepb\xaa\x02\x1cGoogle.Cloud.ServiceUsage.V1\xca\x02\x1cGoogle\\Cloud\\ServiceUsage\\V1\xea\x02\x1fGoogle::Cloud::ServiceUsage::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ServiceUsage + module V1 + EnableServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.EnableServiceRequest").msgclass + EnableServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.EnableServiceResponse").msgclass + DisableServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.DisableServiceRequest").msgclass + DisableServiceRequest::CheckIfServiceHasUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.DisableServiceRequest.CheckIfServiceHasUsage").enummodule + DisableServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.DisableServiceResponse").msgclass + GetServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.GetServiceRequest").msgclass + ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.ListServicesRequest").msgclass + ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.ListServicesResponse").msgclass + BatchEnableServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.BatchEnableServicesRequest").msgclass + BatchEnableServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.BatchEnableServicesResponse").msgclass + BatchEnableServicesResponse::EnableFailure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.BatchEnableServicesResponse.EnableFailure").msgclass + BatchGetServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.BatchGetServicesRequest").msgclass + BatchGetServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.BatchGetServicesResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb new file mode 100644 index 000000000000..77a57299004d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb @@ -0,0 +1,80 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/api/serviceusage/v1/serviceusage.proto for package 'Google.Cloud.ServiceUsage.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/api/serviceusage/v1/serviceusage_pb' + +module Google + module Cloud + module ServiceUsage + module V1 + module ServiceUsage + # Enables services that service consumers want to use on Google Cloud Platform, + # lists the available or enabled services, or disables services that service + # consumers no longer use. + # + # See [Service Usage API](https://cloud.google.com/service-usage/docs/overview) + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.api.serviceusage.v1.ServiceUsage' + + # Enable a service so that it can be used with a project. + rpc :EnableService, ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest, ::Google::Longrunning::Operation + # Disable a service so that it can no longer be used with a project. + # This prevents unintended usage that may cause unexpected billing + # charges or security leaks. + # + # It is not valid to call the disable method on a service that is not + # currently enabled. Callers will receive a `FAILED_PRECONDITION` status if + # the target service is not currently enabled. + rpc :DisableService, ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest, ::Google::Longrunning::Operation + # Returns the service configuration and enabled state for a given service. + rpc :GetService, ::Google::Cloud::ServiceUsage::V1::GetServiceRequest, ::Google::Cloud::ServiceUsage::V1::Service + # List all services available to the specified project, and the current + # state of those services with respect to the project. The list includes + # all public services, all services for which the calling user has the + # `servicemanagement.services.bind` permission, and all services that have + # already been enabled on the project. The list can be filtered to + # only include services in a specific state, for example to only include + # services enabled on the project. + # + # WARNING: If you need to query enabled services frequently or across + # an organization, you should use + # [Cloud Asset Inventory + # API](https://cloud.google.com/asset-inventory/docs/apis), which provides + # higher throughput and richer filtering capability. + rpc :ListServices, ::Google::Cloud::ServiceUsage::V1::ListServicesRequest, ::Google::Cloud::ServiceUsage::V1::ListServicesResponse + # Enable multiple services on a project. The operation is atomic: if enabling + # any service fails, then the entire batch fails, and no state changes occur. + # To enable a single service, use the `EnableService` method instead. + rpc :BatchEnableServices, ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest, ::Google::Longrunning::Operation + # Returns the service configurations and enabled states for a given list of + # services. + rpc :BatchGetServices, ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest, ::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.rb new file mode 100644 index 000000000000..6574d05185b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/service_usage/v1/service_usage" +require "google/cloud/service_usage/v1/version" + +module Google + module Cloud + module ServiceUsage + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/service_usage/v1" + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/service_usage/v1" + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/service_usage/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/rest.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/rest.rb new file mode 100644 index 000000000000..30771378b1cd --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/service_usage/v1/service_usage/rest" +require "google/cloud/service_usage/v1/version" + +module Google + module Cloud + module ServiceUsage + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/service_usage/v1/rest" + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.rb new file mode 100644 index 000000000000..47ad7fc9b613 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_usage/v1/version" + +require "google/cloud/service_usage/v1/service_usage/credentials" +require "google/cloud/service_usage/v1/service_usage/operations" +require "google/cloud/service_usage/v1/service_usage/client" +require "google/cloud/service_usage/v1/service_usage/rest" + +module Google + module Cloud + module ServiceUsage + module V1 + ## + # Enables services that service consumers want to use on Google Cloud Platform, + # lists the available or enabled services, or disables services that service + # consumers no longer use. + # + # See [Service Usage API](https://cloud.google.com/service-usage/docs/overview) + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/service_usage/v1/service_usage" + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/service_usage/v1/service_usage/rest" + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new + # + module ServiceUsage + end + end + end + end +end + +helper_path = ::File.join __dir__, "service_usage", "helpers.rb" +require "google/cloud/service_usage/v1/service_usage/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.rb new file mode 100644 index 000000000000..4230f5ca16e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.rb @@ -0,0 +1,1077 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/api/serviceusage/v1/serviceusage_pb" + +module Google + module Cloud + module ServiceUsage + module V1 + module ServiceUsage + ## + # Client for the ServiceUsage service. + # + # Enables services that service consumers want to use on Google Cloud Platform, + # lists the available or enabled services, or disables services that service + # consumers no longer use. + # + # See [Service Usage API](https://cloud.google.com/service-usage/docs/overview) + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "serviceusage.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :service_usage_stub + + ## + # Configure the ServiceUsage Client class. + # + # See {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ServiceUsage clients + # ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceUsage", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceUsage Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @service_usage_stub.universe_domain + end + + ## + # Create a new ServiceUsage client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ServiceUsage client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/api/serviceusage/v1/serviceusage_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @service_usage_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @service_usage_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @service_usage_stub.logger + end + + # Service calls + + ## + # Enable a service so that it can be used with a project. + # + # @overload enable_service(request, options = nil) + # Pass arguments to `enable_service` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::EnableServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::EnableServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enable_service(name: nil) + # Pass arguments to `enable_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the consumer and service to enable the service on. + # + # The `EnableService` and `DisableService` methods currently only support + # projects. + # + # Enabling a service requires that the service is public or is shared with + # the user enabling the service. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new + # + # # Call the enable_service method. + # result = client.enable_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def enable_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enable_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enable_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.call_rpc :enable_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable a service so that it can no longer be used with a project. + # This prevents unintended usage that may cause unexpected billing + # charges or security leaks. + # + # It is not valid to call the disable method on a service that is not + # currently enabled. Callers will receive a `FAILED_PRECONDITION` status if + # the target service is not currently enabled. + # + # @overload disable_service(request, options = nil) + # Pass arguments to `disable_service` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::DisableServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload disable_service(name: nil, disable_dependent_services: nil, check_if_service_has_usage: nil) + # Pass arguments to `disable_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the consumer and service to disable the service on. + # + # The enable and disable methods currently only support projects. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + # @param disable_dependent_services [::Boolean] + # Indicates if services that are enabled and which depend on this service + # should also be disabled. If not set, an error will be generated if any + # enabled services depend on the service to be disabled. When set, the + # service, and any enabled services that depend on it, will be disabled + # together. + # @param check_if_service_has_usage [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest::CheckIfServiceHasUsage] + # Defines the behavior for checking service usage when disabling a service. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new + # + # # Call the disable_service method. + # result = client.disable_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def disable_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.disable_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.disable_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.call_rpc :disable_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the service configuration and enabled state for a given service. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_service(name: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the consumer and service to get the `ConsumerState` for. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceUsage::V1::Service] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceUsage::V1::Service] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::ServiceUsage::V1::Service. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.call_rpc :get_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all services available to the specified project, and the current + # state of those services with respect to the project. The list includes + # all public services, all services for which the calling user has the + # `servicemanagement.services.bind` permission, and all services that have + # already been enabled on the project. The list can be filtered to + # only include services in a specific state, for example to only include + # services enabled on the project. + # + # WARNING: If you need to query enabled services frequently or across + # an organization, you should use + # [Cloud Asset Inventory + # API](https://cloud.google.com/asset-inventory/docs/apis), which provides + # higher throughput and richer filtering capability. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent to search for services on. + # + # An example name would be: + # `projects/123` where `123` is the project number. + # @param page_size [::Integer] + # Requested size of the next page of data. + # Requested page size cannot exceed 200. + # If not set, the default page size is 50. + # @param page_token [::String] + # Token identifying which result to start with, which is returned by a + # previous list call. + # @param filter [::String] + # Only list services that conform to the given filter. + # The allowed filter strings are `state:ENABLED` and `state:DISABLED`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceUsage::V1::Service>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceUsage::V1::Service>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceUsage::V1::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.call_rpc :list_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @service_usage_stub, :list_services, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable multiple services on a project. The operation is atomic: if enabling + # any service fails, then the entire batch fails, and no state changes occur. + # To enable a single service, use the `EnableService` method instead. + # + # @overload batch_enable_services(request, options = nil) + # Pass arguments to `batch_enable_services` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_enable_services(parent: nil, service_ids: nil) + # Pass arguments to `batch_enable_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent to enable services on. + # + # An example name would be: + # `projects/123` where `123` is the project number. + # + # The `BatchEnableServices` method currently only supports projects. + # @param service_ids [::Array<::String>] + # The identifiers of the services to enable on the project. + # + # A valid identifier would be: + # serviceusage.googleapis.com + # + # Enabling services requires that each service is public or is shared with + # the user enabling the service. + # + # A single request can enable a maximum of 20 services at a time. If more + # than 20 services are specified, the request will fail, and no state changes + # will occur. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new + # + # # Call the batch_enable_services method. + # result = client.batch_enable_services request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_enable_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_enable_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_enable_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_enable_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.call_rpc :batch_enable_services, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the service configurations and enabled states for a given list of + # services. + # + # @overload batch_get_services(request, options = nil) + # Pass arguments to `batch_get_services` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_get_services(parent: nil, names: nil) + # Pass arguments to `batch_get_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent to retrieve services from. + # If this is set, the parent of all of the services specified in `names` must + # match this field. An example name would be: `projects/123` where `123` is + # the project number. The `BatchGetServices` method currently only supports + # projects. + # @param names [::Array<::String>] + # Names of the services to retrieve. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + # A single request can get a maximum of 30 services at a time. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new + # + # # Call the batch_get_services method. + # result = client.batch_get_services request + # + # # The returned object is of type Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse. + # p result + # + def batch_get_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_get_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_get_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_get_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.call_rpc :batch_get_services, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ServiceUsage API. + # + # This class represents the configuration for ServiceUsage, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # enable_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.enable_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.enable_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "serviceusage.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ServiceUsage API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `enable_service` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_service + ## + # RPC-specific configuration for `disable_service` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_service + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `batch_enable_services` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_enable_services + ## + # RPC-specific configuration for `batch_get_services` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_services + + # @private + def initialize parent_rpcs = nil + enable_service_config = parent_rpcs.enable_service if parent_rpcs.respond_to? :enable_service + @enable_service = ::Gapic::Config::Method.new enable_service_config + disable_service_config = parent_rpcs.disable_service if parent_rpcs.respond_to? :disable_service + @disable_service = ::Gapic::Config::Method.new disable_service_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + batch_enable_services_config = parent_rpcs.batch_enable_services if parent_rpcs.respond_to? :batch_enable_services + @batch_enable_services = ::Gapic::Config::Method.new batch_enable_services_config + batch_get_services_config = parent_rpcs.batch_get_services if parent_rpcs.respond_to? :batch_get_services + @batch_get_services = ::Gapic::Config::Method.new batch_get_services_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.rb new file mode 100644 index 000000000000..d29b072c389d --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module ServiceUsage + module V1 + module ServiceUsage + # Credentials for the ServiceUsage API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management" + ] + self.env_vars = [ + "SERVICE_USAGE_CREDENTIALS", + "SERVICE_USAGE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SERVICE_USAGE_CREDENTIALS_JSON", + "SERVICE_USAGE_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.rb new file mode 100644 index 000000000000..3dddbf825634 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.rb @@ -0,0 +1,835 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module ServiceUsage + module V1 + module ServiceUsage + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "serviceusage.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ServiceUsage Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceUsage Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "serviceusage.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.rb new file mode 100644 index 000000000000..33ff36f88f2c --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/service_usage/v1/version" + +require "google/cloud/service_usage/v1/service_usage/credentials" +require "google/cloud/service_usage/v1/service_usage/rest/operations" +require "google/cloud/service_usage/v1/service_usage/rest/client" + +module Google + module Cloud + module ServiceUsage + module V1 + ## + # Enables services that service consumers want to use on Google Cloud Platform, + # lists the available or enabled services, or disables services that service + # consumers no longer use. + # + # See [Service Usage API](https://cloud.google.com/service-usage/docs/overview) + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/service_usage/v1/service_usage/rest" + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new + # + module ServiceUsage + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/service_usage/v1/service_usage/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.rb new file mode 100644 index 000000000000..c6bf1ad93ac0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.rb @@ -0,0 +1,992 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/api/serviceusage/v1/serviceusage_pb" +require "google/cloud/service_usage/v1/service_usage/rest/service_stub" + +module Google + module Cloud + module ServiceUsage + module V1 + module ServiceUsage + module Rest + ## + # REST client for the ServiceUsage service. + # + # Enables services that service consumers want to use on Google Cloud Platform, + # lists the available or enabled services, or disables services that service + # consumers no longer use. + # + # See [Service Usage API](https://cloud.google.com/service-usage/docs/overview) + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "serviceusage.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :service_usage_stub + + ## + # Configure the ServiceUsage Client class. + # + # See {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ServiceUsage clients + # ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ServiceUsage", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceUsage Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @service_usage_stub.universe_domain + end + + ## + # Create a new ServiceUsage REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ServiceUsage client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @service_usage_stub = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @service_usage_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @service_usage_stub.logger + end + + # Service calls + + ## + # Enable a service so that it can be used with a project. + # + # @overload enable_service(request, options = nil) + # Pass arguments to `enable_service` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::EnableServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::EnableServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enable_service(name: nil) + # Pass arguments to `enable_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the consumer and service to enable the service on. + # + # The `EnableService` and `DisableService` methods currently only support + # projects. + # + # Enabling a service requires that the service is public or is shared with + # the user enabling the service. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new + # + # # Call the enable_service method. + # result = client.enable_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def enable_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enable_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.enable_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.enable_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Disable a service so that it can no longer be used with a project. + # This prevents unintended usage that may cause unexpected billing + # charges or security leaks. + # + # It is not valid to call the disable method on a service that is not + # currently enabled. Callers will receive a `FAILED_PRECONDITION` status if + # the target service is not currently enabled. + # + # @overload disable_service(request, options = nil) + # Pass arguments to `disable_service` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::DisableServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload disable_service(name: nil, disable_dependent_services: nil, check_if_service_has_usage: nil) + # Pass arguments to `disable_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the consumer and service to disable the service on. + # + # The enable and disable methods currently only support projects. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + # @param disable_dependent_services [::Boolean] + # Indicates if services that are enabled and which depend on this service + # should also be disabled. If not set, an error will be generated if any + # enabled services depend on the service to be disabled. When set, the + # service, and any enabled services that depend on it, will be disabled + # together. + # @param check_if_service_has_usage [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest::CheckIfServiceHasUsage] + # Defines the behavior for checking service usage when disabling a service. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new + # + # # Call the disable_service method. + # result = client.disable_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def disable_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.disable_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.disable_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.disable_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the service configuration and enabled state for a given service. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_service(name: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the consumer and service to get the `ConsumerState` for. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceUsage::V1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceUsage::V1::Service] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::ServiceUsage::V1::Service. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.get_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all services available to the specified project, and the current + # state of those services with respect to the project. The list includes + # all public services, all services for which the calling user has the + # `servicemanagement.services.bind` permission, and all services that have + # already been enabled on the project. The list can be filtered to + # only include services in a specific state, for example to only include + # services enabled on the project. + # + # WARNING: If you need to query enabled services frequently or across + # an organization, you should use + # [Cloud Asset Inventory + # API](https://cloud.google.com/asset-inventory/docs/apis), which provides + # higher throughput and richer filtering capability. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent to search for services on. + # + # An example name would be: + # `projects/123` where `123` is the project number. + # @param page_size [::Integer] + # Requested size of the next page of data. + # Requested page size cannot exceed 200. + # If not set, the default page size is 50. + # @param page_token [::String] + # Token identifying which result to start with, which is returned by a + # previous list call. + # @param filter [::String] + # Only list services that conform to the given filter. + # The allowed filter strings are `state:ENABLED` and `state:DISABLED`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceUsage::V1::Service>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceUsage::V1::Service>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ServiceUsage::V1::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.list_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @service_usage_stub, :list_services, "services", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Enable multiple services on a project. The operation is atomic: if enabling + # any service fails, then the entire batch fails, and no state changes occur. + # To enable a single service, use the `EnableService` method instead. + # + # @overload batch_enable_services(request, options = nil) + # Pass arguments to `batch_enable_services` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_enable_services(parent: nil, service_ids: nil) + # Pass arguments to `batch_enable_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent to enable services on. + # + # An example name would be: + # `projects/123` where `123` is the project number. + # + # The `BatchEnableServices` method currently only supports projects. + # @param service_ids [::Array<::String>] + # The identifiers of the services to enable on the project. + # + # A valid identifier would be: + # serviceusage.googleapis.com + # + # Enabling services requires that each service is public or is shared with + # the user enabling the service. + # + # A single request can enable a maximum of 20 services at a time. If more + # than 20 services are specified, the request will fail, and no state changes + # will occur. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new + # + # # Call the batch_enable_services method. + # result = client.batch_enable_services request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def batch_enable_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_enable_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_enable_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_enable_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.batch_enable_services request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the service configurations and enabled states for a given list of + # services. + # + # @overload batch_get_services(request, options = nil) + # Pass arguments to `batch_get_services` via a request object, either of type + # {::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_get_services(parent: nil, names: nil) + # Pass arguments to `batch_get_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Parent to retrieve services from. + # If this is set, the parent of all of the services specified in `names` must + # match this field. An example name would be: `projects/123` where `123` is + # the project number. The `BatchGetServices` method currently only supports + # projects. + # @param names [::Array<::String>] + # Names of the services to retrieve. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + # A single request can get a maximum of 30 services at a time. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/service_usage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new + # + # # Call the batch_get_services method. + # result = client.batch_get_services request + # + # # The returned object is of type Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse. + # p result + # + def batch_get_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_get_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_get_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_get_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @service_usage_stub.batch_get_services request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ServiceUsage REST API. + # + # This class represents the configuration for ServiceUsage REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # enable_service to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.enable_service.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.enable_service.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "serviceusage.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ServiceUsage API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `enable_service` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_service + ## + # RPC-specific configuration for `disable_service` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_service + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `batch_enable_services` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_enable_services + ## + # RPC-specific configuration for `batch_get_services` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_services + + # @private + def initialize parent_rpcs = nil + enable_service_config = parent_rpcs.enable_service if parent_rpcs.respond_to? :enable_service + @enable_service = ::Gapic::Config::Method.new enable_service_config + disable_service_config = parent_rpcs.disable_service if parent_rpcs.respond_to? :disable_service + @disable_service = ::Gapic::Config::Method.new disable_service_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + batch_enable_services_config = parent_rpcs.batch_enable_services if parent_rpcs.respond_to? :batch_enable_services + @batch_enable_services = ::Gapic::Config::Method.new batch_enable_services_config + batch_get_services_config = parent_rpcs.batch_get_services if parent_rpcs.respond_to? :batch_get_services + @batch_get_services = ::Gapic::Config::Method.new batch_get_services_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.rb new file mode 100644 index 000000000000..e634e343da18 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module ServiceUsage + module V1 + module ServiceUsage + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "serviceusage.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ServiceUsage Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ServiceUsage Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "serviceusage.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/operations", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.rb new file mode 100644 index 000000000000..c4a05bd4b705 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.rb @@ -0,0 +1,450 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/api/serviceusage/v1/serviceusage_pb" + +module Google + module Cloud + module ServiceUsage + module V1 + module ServiceUsage + module Rest + ## + # REST service stub for the ServiceUsage service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the enable_service REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::EnableServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def enable_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "enable_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the disable_service REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def disable_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "disable_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_service REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::GetServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceUsage::V1::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceUsage::V1::Service] + # A result object deserialized from the server's reply + def get_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceUsage::V1::Service.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_services REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceUsage::V1::ListServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceUsage::V1::ListServicesResponse] + # A result object deserialized from the server's reply + def list_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceUsage::V1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_enable_services REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def batch_enable_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_enable_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_enable_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_get_services REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] + # A result object deserialized from the server's reply + def batch_get_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_get_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_service REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::EnableServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enable_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:enable", + body: "*", + matches: [ + ["name", %r{^[^/]+/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_service REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_disable_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:disable", + body: "*", + matches: [ + ["name", %r{^[^/]+/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::GetServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^[^/]+/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_services REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/services", + matches: [ + ["parent", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_enable_services REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_enable_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/services:batchEnable", + body: "*", + matches: [ + ["parent", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_get_services REST call + # + # @param request_pb [::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_get_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/services:batchGet", + matches: [ + ["parent", %r{^[^/]+/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/version.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/version.rb new file mode 100644 index 000000000000..6a3e3ab95ccd --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceUsage + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/README.md new file mode 100644 index 000000000000..a60825fd97db --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Service Usage V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/auth.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/auth.rb new file mode 100644 index 000000000000..c71d3c7421d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/auth.rb @@ -0,0 +1,259 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # `Authentication` defines the authentication configuration for API methods + # provided by an API service. + # + # Example: + # + # name: calendar.googleapis.com + # authentication: + # providers: + # - id: google_calendar_auth + # jwks_uri: https://www.googleapis.com/oauth2/v1/certs + # issuer: https://securetoken.google.com + # rules: + # - selector: "*" + # requirements: + # provider_id: google_calendar_auth + # - selector: google.calendar.Delegate + # oauth: + # canonical_scopes: https://www.googleapis.com/auth/calendar.read + # @!attribute [rw] rules + # @return [::Array<::Google::Api::AuthenticationRule>] + # A list of authentication rules that apply to individual API methods. + # + # **NOTE:** All service configuration rules follow "last one wins" order. + # @!attribute [rw] providers + # @return [::Array<::Google::Api::AuthProvider>] + # Defines a set of authentication providers that a service supports. + class Authentication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Authentication rules for the service. + # + # By default, if a method has any authentication requirements, every request + # must include a valid credential matching one of the requirements. + # It's an error to include more than one kind of credential in a single + # request. + # + # If a method doesn't have any auth requirements, request credentials will be + # ignored. + # @!attribute [rw] selector + # @return [::String] + # Selects the methods to which this rule applies. + # + # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax + # details. + # @!attribute [rw] oauth + # @return [::Google::Api::OAuthRequirements] + # The requirements for OAuth credentials. + # @!attribute [rw] allow_without_credential + # @return [::Boolean] + # If true, the service accepts API keys without any other credential. + # This flag only applies to HTTP and gRPC requests. + # @!attribute [rw] requirements + # @return [::Array<::Google::Api::AuthRequirement>] + # Requirements for additional authentication providers. + class AuthenticationRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a location to extract JWT from an API request. + # @!attribute [rw] header + # @return [::String] + # Specifies HTTP header name to extract JWT token. + # + # Note: The following fields are mutually exclusive: `header`, `query`, `cookie`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] query + # @return [::String] + # Specifies URL query parameter name to extract JWT token. + # + # Note: The following fields are mutually exclusive: `query`, `header`, `cookie`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cookie + # @return [::String] + # Specifies cookie name to extract JWT token. + # + # Note: The following fields are mutually exclusive: `cookie`, `header`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] value_prefix + # @return [::String] + # The value prefix. The value format is "value_prefix\\{token}" + # Only applies to "in" header type. Must be empty for "in" query type. + # If not empty, the header value has to match (case sensitive) this prefix. + # If not matched, JWT will not be extracted. If matched, JWT will be + # extracted after the prefix is removed. + # + # For example, for "Authorization: Bearer \\{JWT}", + # value_prefix="Bearer " with a space at the end. + class JwtLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for an authentication provider, including support for + # [JSON Web Token + # (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). + # @!attribute [rw] id + # @return [::String] + # The unique identifier of the auth provider. It will be referred to by + # `AuthRequirement.provider_id`. + # + # Example: "bookstore_auth". + # @!attribute [rw] issuer + # @return [::String] + # Identifies the principal that issued the JWT. See + # https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 + # Usually a URL or an email address. + # + # Example: https://securetoken.google.com + # Example: 1234567-compute@developer.gserviceaccount.com + # @!attribute [rw] jwks_uri + # @return [::String] + # URL of the provider's public key set to validate signature of the JWT. See + # [OpenID + # Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). + # Optional if the key set document: + # - can be retrieved from + # [OpenID + # Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) + # of the issuer. + # - can be inferred from the email domain of the issuer (e.g. a Google + # service account). + # + # Example: https://www.googleapis.com/oauth2/v1/certs + # @!attribute [rw] audiences + # @return [::String] + # The list of JWT + # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). + # that are allowed to access. A JWT containing any of these audiences will + # be accepted. When this setting is absent, JWTs with audiences: + # - "https://[service.name]/[google.protobuf.Api.name]" + # - "https://[service.name]/" + # will be accepted. + # For example, if no audiences are in the setting, LibraryService API will + # accept JWTs with the following audiences: + # - + # https://library-example.googleapis.com/google.example.library.v1.LibraryService + # - https://library-example.googleapis.com/ + # + # Example: + # + # audiences: bookstore_android.apps.googleusercontent.com, + # bookstore_web.apps.googleusercontent.com + # @!attribute [rw] authorization_url + # @return [::String] + # Redirect URL if JWT token is required but not present or is expired. + # Implement authorizationUrl of securityDefinitions in OpenAPI spec. + # @!attribute [rw] jwt_locations + # @return [::Array<::Google::Api::JwtLocation>] + # Defines the locations to extract the JWT. For now it is only used by the + # Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] + # (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) + # + # JWT locations can be one of HTTP headers, URL query parameters or + # cookies. The rule is that the first match wins. + # + # If not specified, default to use following 3 locations: + # 1) Authorization: Bearer + # 2) x-goog-iap-jwt-assertion + # 3) access_token query parameter + # + # Default locations can be specified as followings: + # jwt_locations: + # - header: Authorization + # value_prefix: "Bearer " + # - header: x-goog-iap-jwt-assertion + # - query: access_token + class AuthProvider + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # OAuth scopes are a way to define data and permissions on data. For example, + # there are scopes defined for "Read-only access to Google Calendar" and + # "Access to Cloud Platform". Users can consent to a scope for an application, + # giving it permission to access that data on their behalf. + # + # OAuth scope specifications should be fairly coarse grained; a user will need + # to see and understand the text description of what your scope means. + # + # In most cases: use one or at most two OAuth scopes for an entire family of + # products. If your product has multiple APIs, you should probably be sharing + # the OAuth scope across all of those APIs. + # + # When you need finer grained OAuth consent screens: talk with your product + # management about how developers will use them in practice. + # + # Please note that even though each of the canonical scopes is enough for a + # request to be accepted and passed to the backend, a request can still fail + # due to the backend requiring additional scopes or permissions. + # @!attribute [rw] canonical_scopes + # @return [::String] + # The list of publicly documented OAuth scopes that are allowed access. An + # OAuth token containing any of these scopes will be accepted. + # + # + # Example: + # + # canonical_scopes: https://www.googleapis.com/auth/calendar, + # https://www.googleapis.com/auth/calendar.read + class OAuthRequirements + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User-defined authentication requirements, including support for + # [JSON Web Token + # (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). + # @!attribute [rw] provider_id + # @return [::String] + # {::Google::Api::AuthProvider#id id} from authentication provider. + # + # Example: + # + # provider_id: bookstore_auth + # @!attribute [rw] audiences + # @return [::String] + # NOTE: This will be deprecated soon, once AuthProvider.audiences is + # implemented and accepted in all the runtime components. + # + # The list of JWT + # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). + # that are allowed to access. A JWT containing any of these audiences will + # be accepted. When this setting is absent, only JWTs with audience + # "https://[Service_name][google.api.Service.name]/{::Google::Protobuf::Api#name API_name}" + # will be accepted. For example, if no audiences are in the setting, + # LibraryService API will only accept JWTs with the following audience + # "https://library-example.googleapis.com/google.example.library.v1.LibraryService". + # + # Example: + # + # audiences: bookstore_android.apps.googleusercontent.com, + # bookstore_web.apps.googleusercontent.com + class AuthRequirement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/documentation.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/documentation.rb new file mode 100644 index 000000000000..ccefcdf22809 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/documentation.rb @@ -0,0 +1,176 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # `Documentation` provides the information for describing a service. + # + # Example: + #
documentation:
+    #   summary: >
+    #     The Google Calendar API gives access
+    #     to most calendar features.
+    #   pages:
+    #   - name: Overview
+    #     content: (== include google/foo/overview.md ==)
+    #   - name: Tutorial
+    #     content: (== include google/foo/tutorial.md ==)
+    #     subpages:
+    #     - name: Java
+    #       content: (== include google/foo/tutorial_java.md ==)
+    #   rules:
+    #   - selector: google.calendar.Calendar.Get
+    #     description: >
+    #       ...
+    #   - selector: google.calendar.Calendar.Put
+    #     description: >
+    #       ...
+    # 
+ # Documentation is provided in markdown syntax. In addition to + # standard markdown features, definition lists, tables and fenced + # code blocks are supported. Section headers can be provided and are + # interpreted relative to the section nesting of the context where + # a documentation fragment is embedded. + # + # Documentation from the IDL is merged with documentation defined + # via the config at normalization time, where documentation provided + # by config rules overrides IDL provided. + # + # A number of constructs specific to the API platform are supported + # in documentation text. + # + # In order to reference a proto element, the following + # notation can be used: + #
[fully.qualified.proto.name][]
+ # To override the display text used for the link, this can be used: + #
[display text][fully.qualified.proto.name]
+ # Text can be excluded from doc using the following notation: + #
(-- internal comment --)
+ # + # A few directives are available in documentation. Note that + # directives must appear on a single line to be properly + # identified. The `include` directive includes a markdown file from + # an external source: + #
(== include path/to/file ==)
+ # The `resource_for` directive marks a message to be the resource of + # a collection in REST view. If it is not specified, tools attempt + # to infer the resource from the operations in a collection: + #
(== resource_for v1.shelves.books ==)
+ # The directive `suppress_warning` does not directly affect documentation + # and is documented together with service config validation. + # @!attribute [rw] summary + # @return [::String] + # A short description of what the service does. The summary must be plain + # text. It becomes the overview of the service displayed in Google Cloud + # Console. + # NOTE: This field is equivalent to the standard field `description`. + # @!attribute [rw] pages + # @return [::Array<::Google::Api::Page>] + # The top level pages for the documentation set. + # @!attribute [rw] rules + # @return [::Array<::Google::Api::DocumentationRule>] + # A list of documentation rules that apply to individual API elements. + # + # **NOTE:** All service configuration rules follow "last one wins" order. + # @!attribute [rw] documentation_root_url + # @return [::String] + # The URL to the root of documentation. + # @!attribute [rw] service_root_url + # @return [::String] + # Specifies the service root url if the default one (the service name + # from the yaml file) is not suitable. This can be seen in any fully + # specified service urls as well as sections that show a base that other + # urls are relative to. + # @!attribute [rw] overview + # @return [::String] + # Declares a single overview page. For example: + #
documentation:
+    #       summary: ...
+    #       overview: (== include overview.md ==)
+    #     
+ # This is a shortcut for the following declaration (using pages style): + #
documentation:
+    #       summary: ...
+    #       pages:
+    #       - name: Overview
+    #         content: (== include overview.md ==)
+    #     
+ # Note: you cannot specify both `overview` field and `pages` field. + class Documentation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A documentation rule provides information about individual API elements. + # @!attribute [rw] selector + # @return [::String] + # The selector is a comma-separated list of patterns for any element such as + # a method, a field, an enum value. Each pattern is a qualified name of the + # element which may end in "*", indicating a wildcard. Wildcards are only + # allowed at the end and for a whole component of the qualified name, + # i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match + # one or more components. To specify a default for all applicable elements, + # the whole pattern "*" is used. + # @!attribute [rw] description + # @return [::String] + # Description of the selected proto element (e.g. a message, a method, a + # 'service' definition, or a field). Defaults to leading & trailing comments + # taken from the proto source definition of the proto element. + # @!attribute [rw] deprecation_description + # @return [::String] + # Deprecation description of the selected element(s). It can be provided if + # an element is marked as `deprecated`. + class DocumentationRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a documentation page. A page can contain subpages to represent + # nested documentation set structure. + # @!attribute [rw] name + # @return [::String] + # The name of the page. It will be used as an identity of the page to + # generate URI of the page, text of the link to this page in navigation, + # etc. The full page name (start from the root page name to this page + # concatenated with `.`) can be used as reference to the page in your + # documentation. For example: + #
pages:
+    #     - name: Tutorial
+    #       content: (== include tutorial.md ==)
+    #       subpages:
+    #       - name: Java
+    #         content: (== include tutorial_java.md ==)
+    #     
+ # You can reference `Java` page using Markdown reference link syntax: + # `[Java][Tutorial.Java]`. + # @!attribute [rw] content + # @return [::String] + # The Markdown content of the page. You can use ```(== include {path} + # ==)``` to include content from a Markdown file. The content can be used + # to produce the documentation page such as HTML format page. + # @!attribute [rw] subpages + # @return [::Array<::Google::Api::Page>] + # Subpages of this page. The order of subpages specified here will be + # honored in the generated docset. + class Page + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/endpoint.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/endpoint.rb new file mode 100644 index 000000000000..57d040a793ab --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/endpoint.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # `Endpoint` describes a network address of a service that serves a set of + # APIs. It is commonly known as a service endpoint. A service may expose + # any number of service endpoints, and all service endpoints share the same + # service definition, such as quota limits and monitoring metrics. + # + # Example: + # + # type: google.api.Service + # name: library-example.googleapis.com + # endpoints: + # # Declares network address `https://library-example.googleapis.com` + # # for service `library-example.googleapis.com`. The `https` scheme + # # is implicit for all service endpoints. Other schemes may be + # # supported in the future. + # - name: library-example.googleapis.com + # allow_cors: false + # - name: content-staging-library-example.googleapis.com + # # Allows HTTP OPTIONS calls to be passed to the API frontend, for it + # # to decide whether the subsequent cross-origin request is allowed + # # to proceed. + # allow_cors: true + # @!attribute [rw] name + # @return [::String] + # The canonical name of this endpoint. + # @!attribute [rw] aliases + # @return [::Array<::String>] + # Aliases for this endpoint, these will be served by the same UrlMap as the + # parent endpoint, and will be provisioned in the GCP stack for the Regional + # Endpoints. + # @!attribute [rw] target + # @return [::String] + # The specification of an Internet routable address of API frontend that will + # handle requests to this [API + # Endpoint](https://cloud.google.com/apis/design/glossary). It should be + # either a valid IPv4 address or a fully-qualified domain name. For example, + # "8.8.8.8" or "myservice.appspot.com". + # @!attribute [rw] allow_cors + # @return [::Boolean] + # Allowing + # [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka + # cross-domain traffic, would allow the backends served from this endpoint to + # receive and respond to HTTP OPTIONS requests. The response will be used by + # the browser to determine whether the subsequent cross-origin request is + # allowed to proceed. + class Endpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/label.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/label.rb new file mode 100644 index 000000000000..02d2f8d451f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/label.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A description of a label. + # @!attribute [rw] key + # @return [::String] + # The label key. + # @!attribute [rw] value_type + # @return [::Google::Api::LabelDescriptor::ValueType] + # The type of data that can be assigned to the label. + # @!attribute [rw] description + # @return [::String] + # A human-readable description for the label. + class LabelDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value types that can be used as label values. + module ValueType + # A variable-length string. This is the default. + STRING = 0 + + # Boolean; true or false. + BOOL = 1 + + # A 64-bit signed integer. + INT64 = 2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitored_resource.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitored_resource.rb new file mode 100644 index 000000000000..4d1ec410ddac --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitored_resource.rb @@ -0,0 +1,150 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An object that describes the schema of a + # {::Google::Api::MonitoredResource MonitoredResource} object using a type name + # and a set of labels. For example, the monitored resource descriptor for + # Google Compute Engine VM instances has a type of + # `"gce_instance"` and specifies the use of the labels `"instance_id"` and + # `"zone"` to identify particular VM instances. + # + # Different APIs can support different monitored resource types. APIs generally + # provide a `list` method that returns the monitored resource descriptors used + # by the API. + # @!attribute [rw] name + # @return [::String] + # Optional. The resource name of the monitored resource descriptor: + # `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where + # \\{type} is the value of the `type` field in this object and + # \\{project_id} is a project ID that provides API-specific context for + # accessing the type. APIs that do not use project information can use the + # resource name format `"monitoredResourceDescriptors/{type}"`. + # @!attribute [rw] type + # @return [::String] + # Required. The monitored resource type. For example, the type + # `"cloudsql_database"` represents databases in Google Cloud SQL. + # For a list of types, see [Monitored resource + # types](https://cloud.google.com/monitoring/api/resources) + # and [Logging resource + # types](https://cloud.google.com/logging/docs/api/v2/resource-list). + # @!attribute [rw] display_name + # @return [::String] + # Optional. A concise name for the monitored resource type that might be + # displayed in user interfaces. It should be a Title Cased Noun Phrase, + # without any article or other determiners. For example, + # `"Google Cloud SQL Database"`. + # @!attribute [rw] description + # @return [::String] + # Optional. A detailed description of the monitored resource type that might + # be used in documentation. + # @!attribute [rw] labels + # @return [::Array<::Google::Api::LabelDescriptor>] + # Required. A set of labels used to describe instances of this monitored + # resource type. For example, an individual Google Cloud SQL database is + # identified by values for the labels `"database_id"` and `"zone"`. + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Optional. The launch stage of the monitored resource definition. + class MonitoredResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The `type` field identifies a + # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} object + # that describes the resource's schema. Information in the `labels` field + # identifies the actual resource and its attributes according to the schema. + # For example, a particular Compute Engine VM instance could be represented by + # the following object, because the + # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} for + # `"gce_instance"` has labels + # `"project_id"`, `"instance_id"` and `"zone"`: + # + # { "type": "gce_instance", + # "labels": { "project_id": "my-project", + # "instance_id": "12345678901234", + # "zone": "us-central1-a" }} + # @!attribute [rw] type + # @return [::String] + # Required. The monitored resource type. This field must match + # the `type` field of a + # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} + # object. For example, the type of a Compute Engine VM instance is + # `gce_instance`. Some descriptors include the service name in the type; for + # example, the type of a Datastream stream is + # `datastream.googleapis.com/Stream`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Required. Values for all of the labels listed in the associated monitored + # resource descriptor. For example, Compute Engine VM instances use the + # labels `"project_id"`, `"instance_id"`, and `"zone"`. + class MonitoredResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Auxiliary metadata for a {::Google::Api::MonitoredResource MonitoredResource} + # object. {::Google::Api::MonitoredResource MonitoredResource} objects contain the + # minimum set of information to uniquely identify a monitored resource + # instance. There is some other useful auxiliary metadata. Monitoring and + # Logging use an ingestion pipeline to extract metadata for cloud resources of + # all types, and store the metadata in this message. + # @!attribute [rw] system_labels + # @return [::Google::Protobuf::Struct] + # Output only. Values for predefined system metadata labels. + # System labels are a kind of metadata extracted by Google, including + # "machine_image", "vpc", "subnet_id", + # "security_group", "name", etc. + # System label values can be only strings, Boolean values, or a list of + # strings. For example: + # + # { "name": "my-test-instance", + # "security_group": ["a", "b", "c"], + # "spot_instance": false } + # @!attribute [rw] user_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. A map of user-defined metadata labels. + class MonitoredResourceMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class UserLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitoring.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitoring.rb new file mode 100644 index 000000000000..666ca63971d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitoring.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Monitoring configuration of the service. + # + # The example below shows how to configure monitored resources and metrics + # for monitoring. In the example, a monitored resource and two metrics are + # defined. The `library.googleapis.com/book/returned_count` metric is sent + # to both producer and consumer projects, whereas the + # `library.googleapis.com/book/num_overdue` metric is only sent to the + # consumer project. + # + # monitored_resources: + # - type: library.googleapis.com/Branch + # display_name: "Library Branch" + # description: "A branch of a library." + # launch_stage: GA + # labels: + # - key: resource_container + # description: "The Cloud container (ie. project id) for the Branch." + # - key: location + # description: "The location of the library branch." + # - key: branch_id + # description: "The id of the branch." + # metrics: + # - name: library.googleapis.com/book/returned_count + # display_name: "Books Returned" + # description: "The count of books that have been returned." + # launch_stage: GA + # metric_kind: DELTA + # value_type: INT64 + # unit: "1" + # labels: + # - key: customer_id + # description: "The id of the customer." + # - name: library.googleapis.com/book/num_overdue + # display_name: "Books Overdue" + # description: "The current number of overdue books." + # launch_stage: GA + # metric_kind: GAUGE + # value_type: INT64 + # unit: "1" + # labels: + # - key: customer_id + # description: "The id of the customer." + # monitoring: + # producer_destinations: + # - monitored_resource: library.googleapis.com/Branch + # metrics: + # - library.googleapis.com/book/returned_count + # consumer_destinations: + # - monitored_resource: library.googleapis.com/Branch + # metrics: + # - library.googleapis.com/book/returned_count + # - library.googleapis.com/book/num_overdue + # @!attribute [rw] producer_destinations + # @return [::Array<::Google::Api::Monitoring::MonitoringDestination>] + # Monitoring configurations for sending metrics to the producer project. + # There can be multiple producer destinations. A monitored resource type may + # appear in multiple monitoring destinations if different aggregations are + # needed for different sets of metrics associated with that monitored + # resource type. A monitored resource and metric pair may only be used once + # in the Monitoring configuration. + # @!attribute [rw] consumer_destinations + # @return [::Array<::Google::Api::Monitoring::MonitoringDestination>] + # Monitoring configurations for sending metrics to the consumer project. + # There can be multiple consumer destinations. A monitored resource type may + # appear in multiple monitoring destinations if different aggregations are + # needed for different sets of metrics associated with that monitored + # resource type. A monitored resource and metric pair may only be used once + # in the Monitoring configuration. + class Monitoring + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration of a specific monitoring destination (the producer project + # or the consumer project). + # @!attribute [rw] monitored_resource + # @return [::String] + # The monitored resource type. The type must be defined in + # [Service.monitored_resources][google.api.Service.monitored_resources] + # section. + # @!attribute [rw] metrics + # @return [::Array<::String>] + # Types of the metrics to report to this monitoring destination. + # Each type must be defined in + # [Service.metrics][google.api.Service.metrics] section. + class MonitoringDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/quota.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/quota.rb new file mode 100644 index 000000000000..410251c03d80 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/quota.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Quota configuration helps to achieve fairness and budgeting in service + # usage. + # + # The metric based quota configuration works this way: + # - The service configuration defines a set of metrics. + # - For API calls, the quota.metric_rules maps methods to metrics with + # corresponding costs. + # - The quota.limits defines limits on the metrics, which will be used for + # quota checks at runtime. + # + # An example quota configuration in yaml format: + # + # quota: + # limits: + # + # - name: apiWriteQpsPerProject + # metric: library.googleapis.com/write_calls + # unit: "1/min/\\{project}" # rate limit for consumer projects + # values: + # STANDARD: 10000 + # + # + # (The metric rules bind all methods to the read_calls metric, + # except for the UpdateBook and DeleteBook methods. These two methods + # are mapped to the write_calls metric, with the UpdateBook method + # consuming at twice rate as the DeleteBook method.) + # metric_rules: + # - selector: "*" + # metric_costs: + # library.googleapis.com/read_calls: 1 + # - selector: google.example.library.v1.LibraryService.UpdateBook + # metric_costs: + # library.googleapis.com/write_calls: 2 + # - selector: google.example.library.v1.LibraryService.DeleteBook + # metric_costs: + # library.googleapis.com/write_calls: 1 + # + # Corresponding Metric definition: + # + # metrics: + # - name: library.googleapis.com/read_calls + # display_name: Read requests + # metric_kind: DELTA + # value_type: INT64 + # + # - name: library.googleapis.com/write_calls + # display_name: Write requests + # metric_kind: DELTA + # value_type: INT64 + # @!attribute [rw] limits + # @return [::Array<::Google::Api::QuotaLimit>] + # List of QuotaLimit definitions for the service. + # @!attribute [rw] metric_rules + # @return [::Array<::Google::Api::MetricRule>] + # List of MetricRule definitions, each one mapping a selected method to one + # or more metrics. + class Quota + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Bind API methods to metrics. Binding a method to a metric causes that + # metric's configured quota behaviors to apply to the method call. + # @!attribute [rw] selector + # @return [::String] + # Selects the methods to which this rule applies. + # + # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax + # details. + # @!attribute [rw] metric_costs + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # Metrics to update when the selected methods are called, and the associated + # cost applied to each metric. + # + # The key of the map is the metric name, and the values are the amount + # increased for the metric against which the quota limits are defined. + # The value must not be negative. + class MetricRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class MetricCostsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `QuotaLimit` defines a specific limit that applies over a specified duration + # for a limit type. There can be at most one limit for a duration and limit + # type combination defined within a `QuotaGroup`. + # @!attribute [rw] name + # @return [::String] + # Name of the quota limit. + # + # The name must be provided, and it must be unique within the service. The + # name can only include alphanumeric characters as well as '-'. + # + # The maximum length of the limit name is 64 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. User-visible, extended description for this quota limit. + # Should be used only when more context is needed to understand this limit + # than provided by the limit's display name (see: `display_name`). + # @!attribute [rw] default_limit + # @return [::Integer] + # Default number of tokens that can be consumed during the specified + # duration. This is the number of tokens assigned when a client + # application developer activates the service for his/her project. + # + # Specifying a value of 0 will block all requests. This can be used if you + # are provisioning quota to selected consumers and blocking others. + # Similarly, a value of -1 will indicate an unlimited quota. No other + # negative values are allowed. + # + # Used by group-based quotas only. + # @!attribute [rw] max_limit + # @return [::Integer] + # Maximum number of tokens that can be consumed during the specified + # duration. Client application developers can override the default limit up + # to this maximum. If specified, this value cannot be set to a value less + # than the default limit. If not specified, it is set to the default limit. + # + # To allow clients to apply overrides with no upper bound, set this to -1, + # indicating unlimited maximum quota. + # + # Used by group-based quotas only. + # @!attribute [rw] free_tier + # @return [::Integer] + # Free tier value displayed in the Developers Console for this limit. + # The free tier is the number of tokens that will be subtracted from the + # billed amount when billing is enabled. + # This field can only be set on a limit with duration "1d", in a billable + # group; it is invalid on any other limit. If this field is not set, it + # defaults to 0, indicating that there is no free tier for this service. + # + # Used by group-based quotas only. + # @!attribute [rw] duration + # @return [::String] + # Duration of this limit in textual notation. Must be "100s" or "1d". + # + # Used by group-based quotas only. + # @!attribute [rw] metric + # @return [::String] + # The name of the metric this quota limit applies to. The quota limits with + # the same metric will be checked together during runtime. The metric must be + # defined within the service config. + # @!attribute [rw] unit + # @return [::String] + # Specify the unit of the quota limit. It uses the same syntax as + # [MetricDescriptor.unit][google.api.MetricDescriptor.unit]. The supported + # unit kinds are determined by the quota backend system. + # + # Here are some examples: + # * "1/min/\\{project}" for quota per minute per project. + # + # Note: the order of unit components is insignificant. + # The "1" at the beginning is required to follow the metric unit syntax. + # @!attribute [rw] values + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # Tiered limit values. You must specify this as a key:value pair, with an + # integer value that is the maximum number of requests allowed for the + # specified unit. Currently only STANDARD is supported. + # @!attribute [rw] display_name + # @return [::String] + # User-visible display name for this limit. + # Optional. If not set, the UI will provide a default display name based on + # the quota configuration. This field can be used to override the default + # display name generated from the configuration. + class QuotaLimit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class ValuesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.rb new file mode 100644 index 000000000000..7895c440ea25 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.rb @@ -0,0 +1,123 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceUsage + module V1 + # A service that is available for use by the consumer. + # @!attribute [rw] name + # @return [::String] + # The resource name of the consumer and service. + # + # A valid name would be: + # - projects/123/services/serviceusage.googleapis.com + # @!attribute [rw] parent + # @return [::String] + # The resource name of the consumer. + # + # A valid name would be: + # - projects/123 + # @!attribute [rw] config + # @return [::Google::Cloud::ServiceUsage::V1::ServiceConfig] + # The service configuration of the available service. + # Some fields may be filtered out of the configuration in responses to + # the `ListServices` method. These fields are present only in responses to + # the `GetService` method. + # @!attribute [rw] state + # @return [::Google::Cloud::ServiceUsage::V1::State] + # Whether or not the service has been enabled for use by the consumer. + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration of the service. + # @!attribute [rw] name + # @return [::String] + # The DNS address at which this service is available. + # + # An example DNS address would be: + # `calendar.googleapis.com`. + # @!attribute [rw] title + # @return [::String] + # The product title for this service. + # @!attribute [rw] apis + # @return [::Array<::Google::Protobuf::Api>] + # A list of API interfaces exported by this service. Contains only the names, + # versions, and method names of the interfaces. + # @!attribute [rw] documentation + # @return [::Google::Api::Documentation] + # Additional API documentation. Contains only the summary and the + # documentation URL. + # @!attribute [rw] quota + # @return [::Google::Api::Quota] + # Quota configuration. + # @!attribute [rw] authentication + # @return [::Google::Api::Authentication] + # Auth configuration. Contains only the OAuth rules. + # @!attribute [rw] usage + # @return [::Google::Api::Usage] + # Configuration controlling usage of this service. + # @!attribute [rw] endpoints + # @return [::Array<::Google::Api::Endpoint>] + # Configuration for network endpoints. Contains only the names and aliases + # of the endpoints. + # @!attribute [rw] monitored_resources + # @return [::Array<::Google::Api::MonitoredResourceDescriptor>] + # Defines the monitored resources used by this service. This is required + # by the [Service.monitoring][google.api.Service.monitoring] and + # [Service.logging][google.api.Service.logging] configurations. + # @!attribute [rw] monitoring + # @return [::Google::Api::Monitoring] + # Monitoring configuration. + # This should not include the 'producer_destinations' field. + class ServiceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The operation metadata returned for the batchend services operation. + # @!attribute [rw] resource_names + # @return [::Array<::String>] + # The full name of the resources that this operation is directly + # associated with. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Whether or not a service has been enabled for use by a consumer. + module State + # The default value, which indicates that the enabled state of the service + # is unspecified or not meaningful. Currently, all consumers other than + # projects (such as folders and organizations) are always in this state. + STATE_UNSPECIFIED = 0 + + # The service cannot be used by this consumer. It has either been explicitly + # disabled, or has never been enabled. + DISABLED = 1 + + # The service has been explicitly enabled for use by this consumer. + ENABLED = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.rb new file mode 100644 index 000000000000..ac900c98b599 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.rb @@ -0,0 +1,242 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ServiceUsage + module V1 + # Request message for the `EnableService` method. + # @!attribute [rw] name + # @return [::String] + # Name of the consumer and service to enable the service on. + # + # The `EnableService` and `DisableService` methods currently only support + # projects. + # + # Enabling a service requires that the service is public or is shared with + # the user enabling the service. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + class EnableServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `EnableService` method. + # This response message is assigned to the `response` field of the returned + # Operation when that operation is done. + # @!attribute [rw] service + # @return [::Google::Cloud::ServiceUsage::V1::Service] + # The new state of the service after enabling. + class EnableServiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `DisableService` method. + # @!attribute [rw] name + # @return [::String] + # Name of the consumer and service to disable the service on. + # + # The enable and disable methods currently only support projects. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + # @!attribute [rw] disable_dependent_services + # @return [::Boolean] + # Indicates if services that are enabled and which depend on this service + # should also be disabled. If not set, an error will be generated if any + # enabled services depend on the service to be disabled. When set, the + # service, and any enabled services that depend on it, will be disabled + # together. + # @!attribute [rw] check_if_service_has_usage + # @return [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest::CheckIfServiceHasUsage] + # Defines the behavior for checking service usage when disabling a service. + class DisableServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum to determine if service usage should be checked when disabling a + # service. + module CheckIfServiceHasUsage + # When unset, the default behavior is used, which is SKIP. + CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED = 0 + + # If set, skip checking service usage when disabling a service. + SKIP = 1 + + # If set, service usage is checked when disabling the service. If a + # service, or its dependents, has usage in the last 30 days, the request + # returns a FAILED_PRECONDITION error. + CHECK = 2 + end + end + + # Response message for the `DisableService` method. + # This response message is assigned to the `response` field of the returned + # Operation when that operation is done. + # @!attribute [rw] service + # @return [::Google::Cloud::ServiceUsage::V1::Service] + # The new state of the service after disabling. + class DisableServiceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GetService` method. + # @!attribute [rw] name + # @return [::String] + # Name of the consumer and service to get the `ConsumerState` for. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + class GetServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `ListServices` method. + # @!attribute [rw] parent + # @return [::String] + # Parent to search for services on. + # + # An example name would be: + # `projects/123` where `123` is the project number. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested size of the next page of data. + # Requested page size cannot exceed 200. + # If not set, the default page size is 50. + # @!attribute [rw] page_token + # @return [::String] + # Token identifying which result to start with, which is returned by a + # previous list call. + # @!attribute [rw] filter + # @return [::String] + # Only list services that conform to the given filter. + # The allowed filter strings are `state:ENABLED` and `state:DISABLED`. + class ListServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `ListServices` method. + # @!attribute [rw] services + # @return [::Array<::Google::Cloud::ServiceUsage::V1::Service>] + # The available services for the requested project. + # @!attribute [rw] next_page_token + # @return [::String] + # Token that can be passed to `ListServices` to resume a paginated + # query. + class ListServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `BatchEnableServices` method. + # @!attribute [rw] parent + # @return [::String] + # Parent to enable services on. + # + # An example name would be: + # `projects/123` where `123` is the project number. + # + # The `BatchEnableServices` method currently only supports projects. + # @!attribute [rw] service_ids + # @return [::Array<::String>] + # The identifiers of the services to enable on the project. + # + # A valid identifier would be: + # serviceusage.googleapis.com + # + # Enabling services requires that each service is public or is shared with + # the user enabling the service. + # + # A single request can enable a maximum of 20 services at a time. If more + # than 20 services are specified, the request will fail, and no state changes + # will occur. + class BatchEnableServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `BatchEnableServices` method. + # This response message is assigned to the `response` field of the returned + # Operation when that operation is done. + # @!attribute [rw] services + # @return [::Array<::Google::Cloud::ServiceUsage::V1::Service>] + # The new state of the services after enabling. + # @!attribute [rw] failures + # @return [::Array<::Google::Cloud::ServiceUsage::V1::BatchEnableServicesResponse::EnableFailure>] + # If allow_partial_success is true, and one or more services could not be + # enabled, this field contains the details about each failure. + class BatchEnableServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Provides error messages for the failing services. + # @!attribute [rw] service_id + # @return [::String] + # The service id of a service that could not be enabled. + # @!attribute [rw] error_message + # @return [::String] + # An error message describing why the service could not be enabled. + class EnableFailure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for the `BatchGetServices` method. + # @!attribute [rw] parent + # @return [::String] + # Parent to retrieve services from. + # If this is set, the parent of all of the services specified in `names` must + # match this field. An example name would be: `projects/123` where `123` is + # the project number. The `BatchGetServices` method currently only supports + # projects. + # @!attribute [rw] names + # @return [::Array<::String>] + # Names of the services to retrieve. + # + # An example name would be: + # `projects/123/services/serviceusage.googleapis.com` where `123` is the + # project number. + # A single request can get a maximum of 30 services at a time. + class BatchGetServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `BatchGetServices` method. + # @!attribute [rw] services + # @return [::Array<::Google::Cloud::ServiceUsage::V1::Service>] + # The requested Service states. + class BatchGetServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/usage.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/usage.rb new file mode 100644 index 000000000000..42ed23536d71 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/usage.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Configuration controlling usage of a service. + # @!attribute [rw] requirements + # @return [::Array<::String>] + # Requirements that must be satisfied before a consumer project can use the + # service. Each requirement is of the form /; + # for example 'serviceusage.googleapis.com/billing-enabled'. + # + # For Google APIs, a Terms of Service requirement must be included here. + # Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". + # Other Google APIs should include + # "serviceusage.googleapis.com/tos/universal". Additional ToS can be + # included based on the business needs. + # @!attribute [rw] rules + # @return [::Array<::Google::Api::UsageRule>] + # A list of usage rules that apply to individual API methods. + # + # **NOTE:** All service configuration rules follow "last one wins" order. + # @!attribute [rw] producer_notification_channel + # @return [::String] + # The full resource name of a channel used for sending notifications to the + # service producer. + # + # Google Service Management currently only supports + # [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification + # channel. To use Google Cloud Pub/Sub as the channel, this must be the name + # of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format + # documented in https://cloud.google.com/pubsub/docs/overview. + class Usage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Usage configuration rules for the service. + # @!attribute [rw] selector + # @return [::String] + # Selects the methods to which this rule applies. Use '*' to indicate all + # methods in all APIs. + # + # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax + # details. + # @!attribute [rw] allow_unregistered_calls + # @return [::Boolean] + # Use this rule to configure unregistered calls for the service. Unregistered + # calls are calls that do not contain consumer project identity. + # (Example: calls that do not contain an API key). + # + # WARNING: By default, API methods do not allow unregistered calls, and each + # method call must be identified by a consumer project identity. + # @!attribute [rw] skip_service_control + # @return [::Boolean] + # If true, the selected method should skip service control and the control + # plane features, such as quota and billing, will not be available. + # This flag is used by Google Cloud Endpoints to bypass checks for internal + # methods, such as service health check methods. + class UsageRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/api.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/api.rb new file mode 100644 index 000000000000..e6e576b4cf8a --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/api.rb @@ -0,0 +1,218 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Api is a light-weight descriptor for an API Interface. + # + # Interfaces are also described as "protocol buffer services" in some contexts, + # such as by the "service" keyword in a .proto file, but they are different + # from API Services, which represent a concrete implementation of an interface + # as opposed to simply a description of methods and bindings. They are also + # sometimes simply referred to as "APIs" in other contexts, such as the name of + # this message itself. See https://cloud.google.com/apis/design/glossary for + # detailed terminology. + # + # New usages of this message as an alternative to ServiceDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] name + # @return [::String] + # The fully qualified name of this interface, including package name + # followed by the interface's simple name. + # @!attribute [rw] methods + # @return [::Array<::Google::Protobuf::Method>] + # The methods of this interface, in unspecified order. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # Any metadata attached to the interface. + # @!attribute [rw] version + # @return [::String] + # A version string for this interface. If specified, must have the form + # `major-version.minor-version`, as in `1.10`. If the minor version is + # omitted, it defaults to zero. If the entire version field is empty, the + # major version is derived from the package name, as outlined below. If the + # field is not empty, the version in the package name will be verified to be + # consistent with what is provided here. + # + # The versioning schema uses [semantic + # versioning](http://semver.org) where the major version number + # indicates a breaking change and the minor version an additive, + # non-breaking change. Both version numbers are signals to users + # what to expect from different versions, and should be carefully + # chosen based on the product plan. + # + # The major version is also reflected in the package name of the + # interface, which must end in `v`, as in + # `google.feature.v1`. For major versions 0 and 1, the suffix can + # be omitted. Zero major versions must only be used for + # experimental, non-GA interfaces. + # @!attribute [rw] source_context + # @return [::Google::Protobuf::SourceContext] + # Source context for the protocol buffer service represented by this + # message. + # @!attribute [rw] mixins + # @return [::Array<::Google::Protobuf::Mixin>] + # Included interfaces. See [Mixin][]. + # @!attribute [rw] syntax + # @return [::Google::Protobuf::Syntax] + # The source syntax of the service. + # @!attribute [rw] edition + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. + class Api + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Method represents a method of an API interface. + # + # New usages of this message as an alternative to MethodDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] name + # @return [::String] + # The simple name of this method. + # @!attribute [rw] request_type_url + # @return [::String] + # A URL of the input message type. + # @!attribute [rw] request_streaming + # @return [::Boolean] + # If true, the request is streamed. + # @!attribute [rw] response_type_url + # @return [::String] + # The URL of the output message type. + # @!attribute [rw] response_streaming + # @return [::Boolean] + # If true, the response is streamed. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # Any metadata attached to the method. + # @!attribute [rw] syntax + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Syntax] + # The source syntax of this method. + # + # This field should be ignored, instead the syntax should be inherited from + # Api. This is similar to Field and EnumValue. + # @!attribute [rw] edition + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. + # + # This field should be ignored, instead the edition should be inherited from + # Api. This is similar to Field and EnumValue. + class Method + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Declares an API Interface to be included in this interface. The including + # interface must redeclare all the methods from the included interface, but + # documentation and options are inherited as follows: + # + # - If after comment and whitespace stripping, the documentation + # string of the redeclared method is empty, it will be inherited + # from the original method. + # + # - Each annotation belonging to the service config (http, + # visibility) which is not set in the redeclared method will be + # inherited. + # + # - If an http annotation is inherited, the path pattern will be + # modified as follows. Any version prefix will be replaced by the + # version of the including interface plus the [root][] path if + # specified. + # + # Example of a simple mixin: + # + # package google.acl.v1; + # service AccessControl { + # // Get the underlying ACL object. + # rpc GetAcl(GetAclRequest) returns (Acl) { + # option (google.api.http).get = "/v1/{resource=**}:getAcl"; + # } + # } + # + # package google.storage.v2; + # service Storage { + # rpc GetAcl(GetAclRequest) returns (Acl); + # + # // Get a data record. + # rpc GetData(GetDataRequest) returns (Data) { + # option (google.api.http).get = "/v2/{resource=**}"; + # } + # } + # + # Example of a mixin configuration: + # + # apis: + # - name: google.storage.v2.Storage + # mixins: + # - name: google.acl.v1.AccessControl + # + # The mixin construct implies that all methods in `AccessControl` are + # also declared with same name and request/response types in + # `Storage`. A documentation generator or annotation processor will + # see the effective `Storage.GetAcl` method after inheriting + # documentation and annotations as follows: + # + # service Storage { + # // Get the underlying ACL object. + # rpc GetAcl(GetAclRequest) returns (Acl) { + # option (google.api.http).get = "/v2/{resource=**}:getAcl"; + # } + # ... + # } + # + # Note how the version in the path pattern changed from `v1` to `v2`. + # + # If the `root` field in the mixin is specified, it should be a + # relative path under which inherited HTTP paths are placed. Example: + # + # apis: + # - name: google.storage.v2.Storage + # mixins: + # - name: google.acl.v1.AccessControl + # root: acls + # + # This implies the following inherited HTTP annotation: + # + # service Storage { + # // Get the underlying ACL object. + # rpc GetAcl(GetAclRequest) returns (Acl) { + # option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; + # } + # ... + # } + # @!attribute [rw] name + # @return [::String] + # The fully qualified name of the interface which is included. + # @!attribute [rw] root + # @return [::String] + # If non-empty specifies a path under which inherited HTTP paths + # are rooted. + class Mixin + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/source_context.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/source_context.rb new file mode 100644 index 000000000000..1bc7c0900aec --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/source_context.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `SourceContext` represents information about the source of a + # protobuf element, like the file in which it is defined. + # @!attribute [rw] file_name + # @return [::String] + # The path-qualified name of the .proto file that contained the associated + # protobuf element. For example: `"google/protobuf/source_context.proto"`. + class SourceContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/type.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/type.rb new file mode 100644 index 000000000000..c9c8ea649289 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/type.rb @@ -0,0 +1,256 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A protocol buffer message type. + # + # New usages of this message as an alternative to DescriptorProto are strongly + # discouraged. This message does not reliability preserve all information + # necessary to model the schema and preserve semantics. Instead make use of + # FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] name + # @return [::String] + # The fully qualified message name. + # @!attribute [rw] fields + # @return [::Array<::Google::Protobuf::Field>] + # The list of fields. + # @!attribute [rw] oneofs + # @return [::Array<::String>] + # The list of types appearing in `oneof` definitions in this type. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # The protocol buffer options. + # @!attribute [rw] source_context + # @return [::Google::Protobuf::SourceContext] + # The source context. + # @!attribute [rw] syntax + # @return [::Google::Protobuf::Syntax] + # The source syntax. + # @!attribute [rw] edition + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. + class Type + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single field of a message type. + # + # New usages of this message as an alternative to FieldDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] kind + # @return [::Google::Protobuf::Field::Kind] + # The field type. + # @!attribute [rw] cardinality + # @return [::Google::Protobuf::Field::Cardinality] + # The field cardinality. + # @!attribute [rw] number + # @return [::Integer] + # The field number. + # @!attribute [rw] name + # @return [::String] + # The field name. + # @!attribute [rw] type_url + # @return [::String] + # The field type URL, without the scheme, for message or enumeration + # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + # @!attribute [rw] oneof_index + # @return [::Integer] + # The index of the field type in `Type.oneofs`, for message or enumeration + # types. The first type has index 1; zero means the type is not in the list. + # @!attribute [rw] packed + # @return [::Boolean] + # Whether to use alternative packed wire representation. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # The protocol buffer options. + # @!attribute [rw] json_name + # @return [::String] + # The field JSON name. + # @!attribute [rw] default_value + # @return [::String] + # The string value of the default value of this field. Proto2 syntax only. + class Field + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Basic field types. + module Kind + # Field type unknown. + TYPE_UNKNOWN = 0 + + # Field type double. + TYPE_DOUBLE = 1 + + # Field type float. + TYPE_FLOAT = 2 + + # Field type int64. + TYPE_INT64 = 3 + + # Field type uint64. + TYPE_UINT64 = 4 + + # Field type int32. + TYPE_INT32 = 5 + + # Field type fixed64. + TYPE_FIXED64 = 6 + + # Field type fixed32. + TYPE_FIXED32 = 7 + + # Field type bool. + TYPE_BOOL = 8 + + # Field type string. + TYPE_STRING = 9 + + # Field type group. Proto2 syntax only, and deprecated. + TYPE_GROUP = 10 + + # Field type message. + TYPE_MESSAGE = 11 + + # Field type bytes. + TYPE_BYTES = 12 + + # Field type uint32. + TYPE_UINT32 = 13 + + # Field type enum. + TYPE_ENUM = 14 + + # Field type sfixed32. + TYPE_SFIXED32 = 15 + + # Field type sfixed64. + TYPE_SFIXED64 = 16 + + # Field type sint32. + TYPE_SINT32 = 17 + + # Field type sint64. + TYPE_SINT64 = 18 + end + + # Whether a field is optional, required, or repeated. + module Cardinality + # For fields with unknown cardinality. + CARDINALITY_UNKNOWN = 0 + + # For optional fields. + CARDINALITY_OPTIONAL = 1 + + # For required fields. Proto2 syntax only. + CARDINALITY_REQUIRED = 2 + + # For repeated fields. + CARDINALITY_REPEATED = 3 + end + end + + # Enum type definition. + # + # New usages of this message as an alternative to EnumDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] name + # @return [::String] + # Enum type name. + # @!attribute [rw] enumvalue + # @return [::Array<::Google::Protobuf::EnumValue>] + # Enum value definitions. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # Protocol buffer options. + # @!attribute [rw] source_context + # @return [::Google::Protobuf::SourceContext] + # The source context. + # @!attribute [rw] syntax + # @return [::Google::Protobuf::Syntax] + # The source syntax. + # @!attribute [rw] edition + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. + class Enum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum value definition. + # + # New usages of this message as an alternative to EnumValueDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. + # @!attribute [rw] name + # @return [::String] + # Enum value name. + # @!attribute [rw] number + # @return [::Integer] + # Enum value number. + # @!attribute [rw] options + # @return [::Array<::Google::Protobuf::Option>] + # Protocol buffer options. + class EnumValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A protocol buffer option, which can be attached to a message, field, + # enumeration, etc. + # + # New usages of this message as an alternative to FileOptions, MessageOptions, + # FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions + # are strongly discouraged. + # @!attribute [rw] name + # @return [::String] + # The option's name. For protobuf built-in options (options defined in + # descriptor.proto), this is the short name. For example, `"map_entry"`. + # For custom options, it should be the fully-qualified name. For example, + # `"google.api.http"`. + # @!attribute [rw] value + # @return [::Google::Protobuf::Any] + # The option's value packed in an Any message. If the value is a primitive, + # the corresponding wrapper type defined in google/protobuf/wrappers.proto + # should be used. If the value is an enum, it should be stored as an int32 + # value using the google.protobuf.Int32Value type. + class Option + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The syntax in which a protocol buffer element is defined. + module Syntax + # Syntax `proto2`. + SYNTAX_PROTO2 = 0 + + # Syntax `proto3`. + SYNTAX_PROTO3 = 1 + + # Syntax `editions`. + SYNTAX_EDITIONS = 2 + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-service_usage-v1/snippets/Gemfile new file mode 100644 index 000000000000..d5e54b2240b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-service_usage-v1", path: "../" +else + gem "google-cloud-service_usage-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_enable_services.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_enable_services.rb new file mode 100644 index 000000000000..3dca1ec69065 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_enable_services.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START serviceusage_v1_generated_ServiceUsage_BatchEnableServices_sync] +require "google/cloud/service_usage/v1" + +## +# Snippet for the batch_enable_services call in the ServiceUsage service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_enable_services. +# +def batch_enable_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new + + # Call the batch_enable_services method. + result = client.batch_enable_services request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END serviceusage_v1_generated_ServiceUsage_BatchEnableServices_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_get_services.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_get_services.rb new file mode 100644 index 000000000000..86456494e1ce --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_get_services.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START serviceusage_v1_generated_ServiceUsage_BatchGetServices_sync] +require "google/cloud/service_usage/v1" + +## +# Snippet for the batch_get_services call in the ServiceUsage service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_get_services. +# +def batch_get_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new + + # Call the batch_get_services method. + result = client.batch_get_services request + + # The returned object is of type Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse. + p result +end +# [END serviceusage_v1_generated_ServiceUsage_BatchGetServices_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/disable_service.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/disable_service.rb new file mode 100644 index 000000000000..5bc9366a51e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/disable_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START serviceusage_v1_generated_ServiceUsage_DisableService_sync] +require "google/cloud/service_usage/v1" + +## +# Snippet for the disable_service call in the ServiceUsage service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#disable_service. +# +def disable_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new + + # Call the disable_service method. + result = client.disable_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END serviceusage_v1_generated_ServiceUsage_DisableService_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/enable_service.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/enable_service.rb new file mode 100644 index 000000000000..9d41562dd5d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/enable_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START serviceusage_v1_generated_ServiceUsage_EnableService_sync] +require "google/cloud/service_usage/v1" + +## +# Snippet for the enable_service call in the ServiceUsage service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#enable_service. +# +def enable_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new + + # Call the enable_service method. + result = client.enable_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END serviceusage_v1_generated_ServiceUsage_EnableService_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/get_service.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/get_service.rb new file mode 100644 index 000000000000..81f2e0dc7fb9 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/get_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START serviceusage_v1_generated_ServiceUsage_GetService_sync] +require "google/cloud/service_usage/v1" + +## +# Snippet for the get_service call in the ServiceUsage service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#get_service. +# +def get_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceUsage::V1::GetServiceRequest.new + + # Call the get_service method. + result = client.get_service request + + # The returned object is of type Google::Cloud::ServiceUsage::V1::Service. + p result +end +# [END serviceusage_v1_generated_ServiceUsage_GetService_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/list_services.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/list_services.rb new file mode 100644 index 000000000000..13e90b729e12 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/list_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START serviceusage_v1_generated_ServiceUsage_ListServices_sync] +require "google/cloud/service_usage/v1" + +## +# Snippet for the list_services call in the ServiceUsage service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#list_services. +# +def list_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ServiceUsage::V1::ListServicesRequest.new + + # Call the list_services method. + result = client.list_services request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ServiceUsage::V1::Service. + p item + end +end +# [END serviceusage_v1_generated_ServiceUsage_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/snippet_metadata_google.api.serviceusage.v1.json b/owl-bot-staging/google-cloud-service_usage-v1/snippets/snippet_metadata_google.api.serviceusage.v1.json new file mode 100644 index 000000000000..633aac1aafdf --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/snippets/snippet_metadata_google.api.serviceusage.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-cloud-service_usage-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.api.serviceusage.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "serviceusage_v1_generated_ServiceUsage_EnableService_sync", + "title": "Snippet for the enable_service call in the ServiceUsage service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#enable_service.", + "file": "service_usage/enable_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_service", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#enable_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceUsage::V1::EnableServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ServiceUsage::Client", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" + }, + "method": { + "short_name": "EnableService", + "full_name": "google.api.serviceusage.v1.ServiceUsage.EnableService", + "service": { + "short_name": "ServiceUsage", + "full_name": "google.api.serviceusage.v1.ServiceUsage" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "serviceusage_v1_generated_ServiceUsage_DisableService_sync", + "title": "Snippet for the disable_service call in the ServiceUsage service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#disable_service.", + "file": "service_usage/disable_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_service", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#disable_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceUsage::V1::DisableServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ServiceUsage::Client", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" + }, + "method": { + "short_name": "DisableService", + "full_name": "google.api.serviceusage.v1.ServiceUsage.DisableService", + "service": { + "short_name": "ServiceUsage", + "full_name": "google.api.serviceusage.v1.ServiceUsage" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "serviceusage_v1_generated_ServiceUsage_GetService_sync", + "title": "Snippet for the get_service call in the ServiceUsage service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#get_service.", + "file": "service_usage/get_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#get_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceUsage::V1::GetServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceUsage::V1::Service", + "client": { + "short_name": "ServiceUsage::Client", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" + }, + "method": { + "short_name": "GetService", + "full_name": "google.api.serviceusage.v1.ServiceUsage.GetService", + "service": { + "short_name": "ServiceUsage", + "full_name": "google.api.serviceusage.v1.ServiceUsage" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "serviceusage_v1_generated_ServiceUsage_ListServices_sync", + "title": "Snippet for the list_services call in the ServiceUsage service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#list_services.", + "file": "service_usage/list_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_services", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#list_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceUsage::V1::ListServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceUsage::V1::ListServicesResponse", + "client": { + "short_name": "ServiceUsage::Client", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" + }, + "method": { + "short_name": "ListServices", + "full_name": "google.api.serviceusage.v1.ServiceUsage.ListServices", + "service": { + "short_name": "ServiceUsage", + "full_name": "google.api.serviceusage.v1.ServiceUsage" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "serviceusage_v1_generated_ServiceUsage_BatchEnableServices_sync", + "title": "Snippet for the batch_enable_services call in the ServiceUsage service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_enable_services.", + "file": "service_usage/batch_enable_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_enable_services", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_enable_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ServiceUsage::Client", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" + }, + "method": { + "short_name": "BatchEnableServices", + "full_name": "google.api.serviceusage.v1.ServiceUsage.BatchEnableServices", + "service": { + "short_name": "ServiceUsage", + "full_name": "google.api.serviceusage.v1.ServiceUsage" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "serviceusage_v1_generated_ServiceUsage_BatchGetServices_sync", + "title": "Snippet for the batch_get_services call in the ServiceUsage service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_get_services.", + "file": "service_usage/batch_get_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_get_services", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_get_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse", + "client": { + "short_name": "ServiceUsage::Client", + "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" + }, + "method": { + "short_name": "BatchGetServices", + "full_name": "google.api.serviceusage.v1.ServiceUsage.BatchGetServices", + "service": { + "short_name": "ServiceUsage", + "full_name": "google.api.serviceusage.v1.ServiceUsage" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_test.rb b/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_test.rb new file mode 100644 index 000000000000..a553f01fc551 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/api/serviceusage/v1/serviceusage_pb" +require "google/api/serviceusage/v1/serviceusage_services_pb" +require "google/cloud/service_usage/v1/service_usage" + +class ::Google::Cloud::ServiceUsage::V1::ServiceUsage::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_test.rb b/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_test.rb new file mode 100644 index 000000000000..adc9b2fb6a9b --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_test.rb @@ -0,0 +1,430 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/api/serviceusage/v1/serviceusage_pb" +require "google/cloud/service_usage/v1/service_usage/rest" + + +class ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_enable_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_enable_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.enable_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.enable_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.enable_service ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.enable_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.enable_service(::Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_service_client_stub.call_count + end + end + end + + def test_disable_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + disable_dependent_services = true + check_if_service_has_usage = :CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED + + disable_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_disable_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.disable_service({ name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.disable_service name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.disable_service ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new(name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.disable_service({ name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.disable_service(::Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new(name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_service_client_stub.call_count + end + end + end + + def test_get_service + # Create test objects. + client_result = ::Google::Cloud::ServiceUsage::V1::Service.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_service({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_service name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_service ::Google::Cloud::ServiceUsage::V1::GetServiceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_service({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_service(::Google::Cloud::ServiceUsage::V1::GetServiceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_count + end + end + end + + def test_list_services + # Create test objects. + client_result = ::Google::Cloud::ServiceUsage::V1::ListServicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_services_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_services ::Google::Cloud::ServiceUsage::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_services(::Google::Cloud::ServiceUsage::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_count + end + end + end + + def test_batch_enable_services + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_ids = ["hello world"] + + batch_enable_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_batch_enable_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_enable_services_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.batch_enable_services({ parent: parent, service_ids: service_ids }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.batch_enable_services parent: parent, service_ids: service_ids do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.batch_enable_services ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new(parent: parent, service_ids: service_ids) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.batch_enable_services({ parent: parent, service_ids: service_ids }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.batch_enable_services(::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new(parent: parent, service_ids: service_ids), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_enable_services_client_stub.call_count + end + end + end + + def test_batch_get_services + # Create test objects. + client_result = ::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + + batch_get_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_batch_get_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_get_services_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.batch_get_services({ parent: parent, names: names }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.batch_get_services parent: parent, names: names do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.batch_get_services ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new(parent: parent, names: names) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.batch_get_services({ parent: parent, names: names }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.batch_get_services(::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new(parent: parent, names: names), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_get_services_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_test.rb b/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_test.rb new file mode 100644 index 000000000000..450e6e083a28 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_test.rb @@ -0,0 +1,500 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/api/serviceusage/v1/serviceusage_pb" +require "google/cloud/service_usage/v1/service_usage" + +class ::Google::Cloud::ServiceUsage::V1::ServiceUsage::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_enable_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_service, name + assert_kind_of ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.enable_service({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.enable_service name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.enable_service ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.enable_service({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.enable_service(::Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enable_service_client_stub.call_rpc_count + end + end + + def test_disable_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + disable_dependent_services = true + check_if_service_has_usage = :CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED + + disable_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_service, name + assert_kind_of ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["disable_dependent_services"] + assert_equal :CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED, request["check_if_service_has_usage"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.disable_service({ name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.disable_service name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.disable_service ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new(name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.disable_service({ name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.disable_service(::Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new(name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, disable_service_client_stub.call_rpc_count + end + end + + def test_get_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceUsage::V1::Service.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service, name + assert_kind_of ::Google::Cloud::ServiceUsage::V1::GetServiceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_service({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_service name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_service ::Google::Cloud::ServiceUsage::V1::GetServiceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_service({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_service(::Google::Cloud::ServiceUsage::V1::GetServiceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_rpc_count + end + end + + def test_list_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceUsage::V1::ListServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_services, name + assert_kind_of ::Google::Cloud::ServiceUsage::V1::ListServicesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_services_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_services ::Google::Cloud::ServiceUsage::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_services(::Google::Cloud::ServiceUsage::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_rpc_count + end + end + + def test_batch_enable_services + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + service_ids = ["hello world"] + + batch_enable_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_enable_services, name + assert_kind_of ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["service_ids"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_enable_services_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_enable_services({ parent: parent, service_ids: service_ids }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_enable_services parent: parent, service_ids: service_ids do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_enable_services ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new(parent: parent, service_ids: service_ids) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_enable_services({ parent: parent, service_ids: service_ids }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_enable_services(::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new(parent: parent, service_ids: service_ids), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_enable_services_client_stub.call_rpc_count + end + end + + def test_batch_get_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + + batch_get_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_get_services, name + assert_kind_of ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_get_services_client_stub do + # Create client + c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_get_services({ parent: parent, names: names }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_get_services parent: parent, names: names do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_get_services ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new(parent: parent, names: names) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_get_services({ parent: parent, names: names }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_get_services(::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new(parent: parent, names: names), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_get_services_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/test/helper.rb b/owl-bot-staging/google-cloud-service_usage-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-service_usage-v1/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-shell-v1/.gitignore b/owl-bot-staging/google-cloud-shell-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/.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-shell-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-shell-v1/.repo-metadata.json new file mode 100644 index 000000000000..928c50bb2ebd --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudshell.googleapis.com", + "api_shortname": "cloudshell", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-shell-v1/latest", + "distribution_name": "google-cloud-shell-v1", + "is_cloud": true, + "language": "ruby", + "name": "cloudshell", + "name_pretty": "Cloud Shell V1 API", + "product_documentation": "https://cloud.google.com/shell/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Shell is an interactive shell environment for Google Cloud that makes it easy for you to learn and experiment with Google Cloud and manage your projects and resources from your web browser. Note that google-cloud-shell-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-shell instead. See the readme for more details.", + "ruby-cloud-env-prefix": "CLOUD_SHELL", + "ruby-cloud-product-url": "https://cloud.google.com/shell/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-shell-v1/.rubocop.yml b/owl-bot-staging/google-cloud-shell-v1/.rubocop.yml new file mode 100644 index 000000000000..63ca4175e823 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-shell-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-shell-v1.rb" diff --git a/owl-bot-staging/google-cloud-shell-v1/.toys.rb b/owl-bot-staging/google-cloud-shell-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-shell-v1/.yardopts b/owl-bot-staging/google-cloud-shell-v1/.yardopts new file mode 100644 index 000000000000..eac9d9000676 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Shell V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-shell-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-shell-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..4d8d9081cbb9 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-shell-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-shell-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/shell/v1" + +client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/shell/v1" + +::Google::Cloud::Shell::V1::CloudShellService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-shell-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/shell/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-shell-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-shell-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-shell-v1/Gemfile b/owl-bot-staging/google-cloud-shell-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-shell-v1/LICENSE.md b/owl-bot-staging/google-cloud-shell-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-shell-v1/README.md b/owl-bot-staging/google-cloud-shell-v1/README.md new file mode 100644 index 000000000000..f4715201f927 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Shell V1 API + +Allows users to start, configure, and connect to interactive shell sessions running in the cloud. + +Cloud Shell is an interactive shell environment for Google Cloud that makes it easy for you to learn and experiment with Google Cloud and manage your projects and resources from your web browser. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Shell V1 API. Most users should consider using +the main client gem, +[google-cloud-shell](https://rubygems.org/gems/google-cloud-shell). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-shell-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudshell.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/shell/v1" + +client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new +request = ::Google::Cloud::Shell::V1::GetEnvironmentRequest.new # (request fields as keyword arguments...) +response = client.get_environment request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-shell-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/shell/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/shell/v1" +require "logger" + +client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-shell`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-shell-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-shell`. +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-shell-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-shell-v1/Rakefile b/owl-bot-staging/google-cloud-shell-v1/Rakefile new file mode 100644 index 000000000000..fec628dc4e26 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-shell-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["CLOUD_SHELL_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["CLOUD_SHELL_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["CLOUD_SHELL_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or CLOUD_SHELL_TEST_PROJECT=test123 CLOUD_SHELL_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/shell/v1/cloud_shell_service/credentials" + ::Google::Cloud::Shell::V1::CloudShellService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["CLOUD_SHELL_PROJECT"] = project + ENV["CLOUD_SHELL_TEST_PROJECT"] = project + ENV["CLOUD_SHELL_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-shell-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-shell-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-shell-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-shell-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-shell-v1" + header "google-cloud-shell-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-shell-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-shell-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-shell-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-shell-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-shell-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-shell-v1/gapic_metadata.json new file mode 100644 index 000000000000..23f6c55881ac --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/gapic_metadata.json @@ -0,0 +1,43 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.shell.v1", + "libraryPackage": "::Google::Cloud::Shell::V1", + "services": { + "CloudShellService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Shell::V1::CloudShellService::Client", + "rpcs": { + "GetEnvironment": { + "methods": [ + "get_environment" + ] + }, + "StartEnvironment": { + "methods": [ + "start_environment" + ] + }, + "AuthorizeEnvironment": { + "methods": [ + "authorize_environment" + ] + }, + "AddPublicKey": { + "methods": [ + "add_public_key" + ] + }, + "RemovePublicKey": { + "methods": [ + "remove_public_key" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-shell-v1/google-cloud-shell-v1.gemspec b/owl-bot-staging/google-cloud-shell-v1/google-cloud-shell-v1.gemspec new file mode 100644 index 000000000000..aad7467f0c24 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/google-cloud-shell-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/shell/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-shell-v1" + gem.version = Google::Cloud::Shell::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Shell is an interactive shell environment for Google Cloud that makes it easy for you to learn and experiment with Google Cloud and manage your projects and resources from your web browser. Note that google-cloud-shell-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-shell instead. See the readme for more details." + gem.summary = "Allows users to start, configure, and connect to interactive shell sessions running in the 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") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google-cloud-shell-v1.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google-cloud-shell-v1.rb new file mode 100644 index 000000000000..4f94ddb87d3e --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google-cloud-shell-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/shell/v1" diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1.rb new file mode 100644 index 000000000000..c94c21ed2929 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/shell/v1/cloud_shell_service" +require "google/cloud/shell/v1/version" + +module Google + module Cloud + module Shell + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/shell/v1" + # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/shell/v1" + # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/shell/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.rb new file mode 100644 index 000000000000..7e5d994d8637 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/shell/v1/version" + +require "google/cloud/shell/v1/cloud_shell_service/credentials" +require "google/cloud/shell/v1/cloud_shell_service/paths" +require "google/cloud/shell/v1/cloud_shell_service/operations" +require "google/cloud/shell/v1/cloud_shell_service/client" +require "google/cloud/shell/v1/cloud_shell_service/rest" + +module Google + module Cloud + module Shell + module V1 + ## + # API for interacting with Google Cloud Shell. Each user of Cloud Shell has at + # least one environment, which has the ID "default". Environment consists of a + # Docker image defining what is installed on the environment and a home + # directory containing the user's data that will remain across sessions. + # Clients use this API to start and fetch information about their environment, + # which can then be used to connect to that environment via a separate SSH + # client. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/shell/v1/cloud_shell_service" + # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/shell/v1/cloud_shell_service/rest" + # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new + # + module CloudShellService + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_shell_service", "helpers.rb" +require "google/cloud/shell/v1/cloud_shell_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.rb new file mode 100644 index 000000000000..4051e0f1f3fb --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.rb @@ -0,0 +1,956 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/shell/v1/cloudshell_pb" + +module Google + module Cloud + module Shell + module V1 + module CloudShellService + ## + # Client for the CloudShellService service. + # + # API for interacting with Google Cloud Shell. Each user of Cloud Shell has at + # least one environment, which has the ID "default". Environment consists of a + # Docker image defining what is installed on the environment and a home + # directory containing the user's data that will remain across sessions. + # Clients use this API to start and fetch information about their environment, + # which can then be used to connect to that environment via a separate SSH + # client. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudshell.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_shell_service_stub + + ## + # Configure the CloudShellService Client class. + # + # See {::Google::Cloud::Shell::V1::CloudShellService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudShellService clients + # ::Google::Cloud::Shell::V1::CloudShellService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Shell", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_environment.timeout = 60.0 + default_config.rpcs.get_environment.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.start_environment.timeout = 60.0 + + default_config.rpcs.authorize_environment.timeout = 60.0 + + default_config.rpcs.add_public_key.timeout = 60.0 + + default_config.rpcs.remove_public_key.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudShellService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Shell::V1::CloudShellService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_shell_service_stub.universe_domain + end + + ## + # Create a new CloudShellService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudShellService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/shell/v1/cloudshell_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @cloud_shell_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Shell::V1::CloudShellService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @cloud_shell_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Shell::V1::CloudShellService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_shell_service_stub.logger + end + + # Service calls + + ## + # Gets an environment. Returns NOT_FOUND if the environment does not exist. + # + # @overload get_environment(request, options = nil) + # Pass arguments to `get_environment` via a request object, either of type + # {::Google::Cloud::Shell::V1::GetEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Shell::V1::GetEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_environment(name: nil) + # Pass arguments to `get_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested resource, for example `users/me/environments/default` + # or `users/someone@example.com/environments/default`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Shell::V1::Environment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Shell::V1::Environment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/shell/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Shell::V1::CloudShellService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Shell::V1::GetEnvironmentRequest.new + # + # # Call the get_environment method. + # result = client.get_environment request + # + # # The returned object is of type Google::Cloud::Shell::V1::Environment. + # p result + # + def get_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::GetEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_environment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_environment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_shell_service_stub.call_rpc :get_environment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts an existing environment, allowing clients to connect to it. The + # returned operation will contain an instance of StartEnvironmentMetadata in + # its metadata field. Users can wait for the environment to start by polling + # this operation via GetOperation. Once the environment has finished starting + # and is ready to accept connections, the operation will contain a + # StartEnvironmentResponse in its response field. + # + # @overload start_environment(request, options = nil) + # Pass arguments to `start_environment` via a request object, either of type + # {::Google::Cloud::Shell::V1::StartEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Shell::V1::StartEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_environment(name: nil, access_token: nil, public_keys: nil) + # Pass arguments to `start_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource that should be started, for example + # `users/me/environments/default` or + # `users/someone@example.com/environments/default`. + # @param access_token [::String] + # The initial access token passed to the environment. If this is present and + # valid, the environment will be pre-authenticated with gcloud so that the + # user can run gcloud commands in Cloud Shell without having to log in. This + # code can be updated later by calling AuthorizeEnvironment. + # @param public_keys [::Array<::String>] + # Public keys that should be added to the environment before it is started. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/shell/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Shell::V1::CloudShellService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Shell::V1::StartEnvironmentRequest.new + # + # # Call the start_environment method. + # result = client.start_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def start_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::StartEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.start_environment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_environment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_shell_service_stub.call_rpc :start_environment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sends OAuth credentials to a running environment on behalf of a user. When + # this completes, the environment will be authorized to run various Google + # Cloud command line tools without requiring the user to manually + # authenticate. + # + # @overload authorize_environment(request, options = nil) + # Pass arguments to `authorize_environment` via a request object, either of type + # {::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload authorize_environment(name: nil, access_token: nil, id_token: nil, expire_time: nil) + # Pass arguments to `authorize_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource that should receive the credentials, for example + # `users/me/environments/default` or + # `users/someone@example.com/environments/default`. + # @param access_token [::String] + # The OAuth access token that should be sent to the environment. + # @param id_token [::String] + # The OAuth ID token that should be sent to the environment. + # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] + # The time when the credentials expire. If not set, defaults to one hour from + # when the server received the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/shell/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Shell::V1::CloudShellService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new + # + # # Call the authorize_environment method. + # result = client.authorize_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def authorize_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.authorize_environment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.authorize_environment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.authorize_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_shell_service_stub.call_rpc :authorize_environment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds a public SSH key to an environment, allowing clients with the + # corresponding private key to connect to that environment via SSH. If a key + # with the same content already exists, this will error with ALREADY_EXISTS. + # + # @overload add_public_key(request, options = nil) + # Pass arguments to `add_public_key` via a request object, either of type + # {::Google::Cloud::Shell::V1::AddPublicKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Shell::V1::AddPublicKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload add_public_key(environment: nil, key: nil) + # Pass arguments to `add_public_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param environment [::String] + # Environment this key should be added to, e.g. + # `users/me/environments/default`. + # @param key [::String] + # Key that should be added to the environment. Supported formats are + # `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` + # (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and + # `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as + # <format> <content>, where <content> part is encoded with + # Base64. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/shell/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Shell::V1::CloudShellService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Shell::V1::AddPublicKeyRequest.new + # + # # Call the add_public_key method. + # result = client.add_public_key request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def add_public_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::AddPublicKeyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.add_public_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.environment + header_params["environment"] = request.environment + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.add_public_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.add_public_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_shell_service_stub.call_rpc :add_public_key, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a public SSH key from an environment. Clients will no longer be + # able to connect to the environment using the corresponding private key. + # If a key with the same content is not present, this will error with + # NOT_FOUND. + # + # @overload remove_public_key(request, options = nil) + # Pass arguments to `remove_public_key` via a request object, either of type + # {::Google::Cloud::Shell::V1::RemovePublicKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Shell::V1::RemovePublicKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload remove_public_key(environment: nil, key: nil) + # Pass arguments to `remove_public_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param environment [::String] + # Environment this key should be removed from, e.g. + # `users/me/environments/default`. + # @param key [::String] + # Key that should be removed from the environment. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/shell/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Shell::V1::CloudShellService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Shell::V1::RemovePublicKeyRequest.new + # + # # Call the remove_public_key method. + # result = client.remove_public_key request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def remove_public_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::RemovePublicKeyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.remove_public_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.environment + header_params["environment"] = request.environment + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.remove_public_key.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_public_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_shell_service_stub.call_rpc :remove_public_key, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudShellService API. + # + # This class represents the configuration for CloudShellService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Shell::V1::CloudShellService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_environment to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Shell::V1::CloudShellService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_environment.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_environment.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudshell.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CloudShellService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_environment + ## + # RPC-specific configuration for `start_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :start_environment + ## + # RPC-specific configuration for `authorize_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :authorize_environment + ## + # RPC-specific configuration for `add_public_key` + # @return [::Gapic::Config::Method] + # + attr_reader :add_public_key + ## + # RPC-specific configuration for `remove_public_key` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_public_key + + # @private + def initialize parent_rpcs = nil + get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment + @get_environment = ::Gapic::Config::Method.new get_environment_config + start_environment_config = parent_rpcs.start_environment if parent_rpcs.respond_to? :start_environment + @start_environment = ::Gapic::Config::Method.new start_environment_config + authorize_environment_config = parent_rpcs.authorize_environment if parent_rpcs.respond_to? :authorize_environment + @authorize_environment = ::Gapic::Config::Method.new authorize_environment_config + add_public_key_config = parent_rpcs.add_public_key if parent_rpcs.respond_to? :add_public_key + @add_public_key = ::Gapic::Config::Method.new add_public_key_config + remove_public_key_config = parent_rpcs.remove_public_key if parent_rpcs.respond_to? :remove_public_key + @remove_public_key = ::Gapic::Config::Method.new remove_public_key_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.rb new file mode 100644 index 000000000000..c19294dbdf8e --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Shell + module V1 + module CloudShellService + # Credentials for the CloudShellService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "CLOUD_SHELL_CREDENTIALS", + "CLOUD_SHELL_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "CLOUD_SHELL_CREDENTIALS_JSON", + "CLOUD_SHELL_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.rb new file mode 100644 index 000000000000..e11349338763 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Shell + module V1 + module CloudShellService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudshell.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudShellService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudShellService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudshell.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.rb new file mode 100644 index 000000000000..f03f93ba390f --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Shell + module V1 + module CloudShellService + # Path helper methods for the CloudShellService API. + module Paths + ## + # Create a fully-qualified Environment resource string. + # + # The resource will be in the following format: + # + # `users/{user}/environments/{environment}` + # + # @param user [String] + # @param environment [String] + # + # @return [::String] + def environment_path user:, environment: + raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/" + + "users/#{user}/environments/#{environment}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.rb new file mode 100644 index 000000000000..478c24d2218a --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/shell/v1/version" + +require "google/cloud/shell/v1/cloud_shell_service/credentials" +require "google/cloud/shell/v1/cloud_shell_service/paths" +require "google/cloud/shell/v1/cloud_shell_service/rest/operations" +require "google/cloud/shell/v1/cloud_shell_service/rest/client" + +module Google + module Cloud + module Shell + module V1 + ## + # API for interacting with Google Cloud Shell. Each user of Cloud Shell has at + # least one environment, which has the ID "default". Environment consists of a + # Docker image defining what is installed on the environment and a home + # directory containing the user's data that will remain across sessions. + # Clients use this API to start and fetch information about their environment, + # which can then be used to connect to that environment via a separate SSH + # client. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/shell/v1/cloud_shell_service/rest" + # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new + # + module CloudShellService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/shell/v1/cloud_shell_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.rb new file mode 100644 index 000000000000..3e117501069f --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.rb @@ -0,0 +1,878 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/shell/v1/cloudshell_pb" +require "google/cloud/shell/v1/cloud_shell_service/rest/service_stub" + +module Google + module Cloud + module Shell + module V1 + module CloudShellService + module Rest + ## + # REST client for the CloudShellService service. + # + # API for interacting with Google Cloud Shell. Each user of Cloud Shell has at + # least one environment, which has the ID "default". Environment consists of a + # Docker image defining what is installed on the environment and a home + # directory containing the user's data that will remain across sessions. + # Clients use this API to start and fetch information about their environment, + # which can then be used to connect to that environment via a separate SSH + # client. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudshell.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_shell_service_stub + + ## + # Configure the CloudShellService Client class. + # + # See {::Google::Cloud::Shell::V1::CloudShellService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudShellService clients + # ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Shell", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_environment.timeout = 60.0 + default_config.rpcs.get_environment.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.start_environment.timeout = 60.0 + + default_config.rpcs.authorize_environment.timeout = 60.0 + + default_config.rpcs.add_public_key.timeout = 60.0 + + default_config.rpcs.remove_public_key.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudShellService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Shell::V1::CloudShellService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_shell_service_stub.universe_domain + end + + ## + # Create a new CloudShellService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudShellService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @cloud_shell_service_stub = ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_shell_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Shell::V1::CloudShellService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_shell_service_stub.logger + end + + # Service calls + + ## + # Gets an environment. Returns NOT_FOUND if the environment does not exist. + # + # @overload get_environment(request, options = nil) + # Pass arguments to `get_environment` via a request object, either of type + # {::Google::Cloud::Shell::V1::GetEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Shell::V1::GetEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_environment(name: nil) + # Pass arguments to `get_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested resource, for example `users/me/environments/default` + # or `users/someone@example.com/environments/default`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Shell::V1::Environment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Shell::V1::Environment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/shell/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Shell::V1::GetEnvironmentRequest.new + # + # # Call the get_environment method. + # result = client.get_environment request + # + # # The returned object is of type Google::Cloud::Shell::V1::Environment. + # p result + # + def get_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::GetEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_environment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_environment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_shell_service_stub.get_environment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts an existing environment, allowing clients to connect to it. The + # returned operation will contain an instance of StartEnvironmentMetadata in + # its metadata field. Users can wait for the environment to start by polling + # this operation via GetOperation. Once the environment has finished starting + # and is ready to accept connections, the operation will contain a + # StartEnvironmentResponse in its response field. + # + # @overload start_environment(request, options = nil) + # Pass arguments to `start_environment` via a request object, either of type + # {::Google::Cloud::Shell::V1::StartEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Shell::V1::StartEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload start_environment(name: nil, access_token: nil, public_keys: nil) + # Pass arguments to `start_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource that should be started, for example + # `users/me/environments/default` or + # `users/someone@example.com/environments/default`. + # @param access_token [::String] + # The initial access token passed to the environment. If this is present and + # valid, the environment will be pre-authenticated with gcloud so that the + # user can run gcloud commands in Cloud Shell without having to log in. This + # code can be updated later by calling AuthorizeEnvironment. + # @param public_keys [::Array<::String>] + # Public keys that should be added to the environment before it is started. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/shell/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Shell::V1::StartEnvironmentRequest.new + # + # # Call the start_environment method. + # result = client.start_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def start_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::StartEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.start_environment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.start_environment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_shell_service_stub.start_environment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sends OAuth credentials to a running environment on behalf of a user. When + # this completes, the environment will be authorized to run various Google + # Cloud command line tools without requiring the user to manually + # authenticate. + # + # @overload authorize_environment(request, options = nil) + # Pass arguments to `authorize_environment` via a request object, either of type + # {::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload authorize_environment(name: nil, access_token: nil, id_token: nil, expire_time: nil) + # Pass arguments to `authorize_environment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Name of the resource that should receive the credentials, for example + # `users/me/environments/default` or + # `users/someone@example.com/environments/default`. + # @param access_token [::String] + # The OAuth access token that should be sent to the environment. + # @param id_token [::String] + # The OAuth ID token that should be sent to the environment. + # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] + # The time when the credentials expire. If not set, defaults to one hour from + # when the server received the request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/shell/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new + # + # # Call the authorize_environment method. + # result = client.authorize_environment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def authorize_environment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.authorize_environment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.authorize_environment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.authorize_environment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_shell_service_stub.authorize_environment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds a public SSH key to an environment, allowing clients with the + # corresponding private key to connect to that environment via SSH. If a key + # with the same content already exists, this will error with ALREADY_EXISTS. + # + # @overload add_public_key(request, options = nil) + # Pass arguments to `add_public_key` via a request object, either of type + # {::Google::Cloud::Shell::V1::AddPublicKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Shell::V1::AddPublicKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload add_public_key(environment: nil, key: nil) + # Pass arguments to `add_public_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param environment [::String] + # Environment this key should be added to, e.g. + # `users/me/environments/default`. + # @param key [::String] + # Key that should be added to the environment. Supported formats are + # `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` + # (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and + # `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as + # <format> <content>, where <content> part is encoded with + # Base64. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/shell/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Shell::V1::AddPublicKeyRequest.new + # + # # Call the add_public_key method. + # result = client.add_public_key request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def add_public_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::AddPublicKeyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.add_public_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.add_public_key.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.add_public_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_shell_service_stub.add_public_key request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a public SSH key from an environment. Clients will no longer be + # able to connect to the environment using the corresponding private key. + # If a key with the same content is not present, this will error with + # NOT_FOUND. + # + # @overload remove_public_key(request, options = nil) + # Pass arguments to `remove_public_key` via a request object, either of type + # {::Google::Cloud::Shell::V1::RemovePublicKeyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Shell::V1::RemovePublicKeyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload remove_public_key(environment: nil, key: nil) + # Pass arguments to `remove_public_key` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param environment [::String] + # Environment this key should be removed from, e.g. + # `users/me/environments/default`. + # @param key [::String] + # Key that should be removed from the environment. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/shell/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Shell::V1::RemovePublicKeyRequest.new + # + # # Call the remove_public_key method. + # result = client.remove_public_key request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def remove_public_key request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::RemovePublicKeyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.remove_public_key.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.remove_public_key.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.remove_public_key.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_shell_service_stub.remove_public_key request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudShellService REST API. + # + # This class represents the configuration for CloudShellService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Shell::V1::CloudShellService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_environment to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_environment.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_environment.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudshell.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the CloudShellService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_environment + ## + # RPC-specific configuration for `start_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :start_environment + ## + # RPC-specific configuration for `authorize_environment` + # @return [::Gapic::Config::Method] + # + attr_reader :authorize_environment + ## + # RPC-specific configuration for `add_public_key` + # @return [::Gapic::Config::Method] + # + attr_reader :add_public_key + ## + # RPC-specific configuration for `remove_public_key` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_public_key + + # @private + def initialize parent_rpcs = nil + get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment + @get_environment = ::Gapic::Config::Method.new get_environment_config + start_environment_config = parent_rpcs.start_environment if parent_rpcs.respond_to? :start_environment + @start_environment = ::Gapic::Config::Method.new start_environment_config + authorize_environment_config = parent_rpcs.authorize_environment if parent_rpcs.respond_to? :authorize_environment + @authorize_environment = ::Gapic::Config::Method.new authorize_environment_config + add_public_key_config = parent_rpcs.add_public_key if parent_rpcs.respond_to? :add_public_key + @add_public_key = ::Gapic::Config::Method.new add_public_key_config + remove_public_key_config = parent_rpcs.remove_public_key if parent_rpcs.respond_to? :remove_public_key + @remove_public_key = ::Gapic::Config::Method.new remove_public_key_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.rb new file mode 100644 index 000000000000..3187ad80f71c --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Shell + module V1 + module CloudShellService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudshell.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudShellService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudShellService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Shell::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudshell.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.rb new file mode 100644 index 000000000000..6b15a0548b64 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/shell/v1/cloudshell_pb" + +module Google + module Cloud + module Shell + module V1 + module CloudShellService + module Rest + ## + # REST service stub for the CloudShellService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_environment REST call + # + # @param request_pb [::Google::Cloud::Shell::V1::GetEnvironmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Shell::V1::Environment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Shell::V1::Environment] + # A result object deserialized from the server's reply + def get_environment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_environment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_environment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Shell::V1::Environment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the start_environment REST call + # + # @param request_pb [::Google::Cloud::Shell::V1::StartEnvironmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def start_environment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_environment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "start_environment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the authorize_environment REST call + # + # @param request_pb [::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def authorize_environment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_authorize_environment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "authorize_environment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the add_public_key REST call + # + # @param request_pb [::Google::Cloud::Shell::V1::AddPublicKeyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def add_public_key request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_add_public_key_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "add_public_key", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the remove_public_key REST call + # + # @param request_pb [::Google::Cloud::Shell::V1::RemovePublicKeyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def remove_public_key request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_remove_public_key_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "remove_public_key", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_environment REST call + # + # @param request_pb [::Google::Cloud::Shell::V1::GetEnvironmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_environment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^users/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_environment REST call + # + # @param request_pb [::Google::Cloud::Shell::V1::StartEnvironmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_environment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:start", + body: "*", + matches: [ + ["name", %r{^users/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the authorize_environment REST call + # + # @param request_pb [::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_authorize_environment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:authorize", + body: "*", + matches: [ + ["name", %r{^users/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the add_public_key REST call + # + # @param request_pb [::Google::Cloud::Shell::V1::AddPublicKeyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_add_public_key_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{environment}:addPublicKey", + body: "*", + matches: [ + ["environment", %r{^users/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the remove_public_key REST call + # + # @param request_pb [::Google::Cloud::Shell::V1::RemovePublicKeyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_remove_public_key_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{environment}:removePublicKey", + body: "*", + matches: [ + ["environment", %r{^users/[^/]+/environments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_pb.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_pb.rb new file mode 100644 index 000000000000..553b989af184 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/shell/v1/cloudshell.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/shell/v1/cloudshell.proto\x12\x15google.cloud.shell.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x03\n\x0b\x45nvironment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0c\x64ocker_image\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12<\n\x05state\x18\x04 \x01(\x0e\x32(.google.cloud.shell.v1.Environment.StateB\x03\xe0\x41\x03\x12\x15\n\x08web_host\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cssh_username\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08ssh_host\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08ssh_port\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0bpublic_keys\x18\x08 \x03(\tB\x03\xe0\x41\x03\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUSPENDED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04:S\xea\x41P\n%cloudshell.googleapis.com/Environment\x12\'users/{user}/environments/{environment}\"T\n\x15GetEnvironmentRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%cloudshell.googleapis.com/Environment\"\x1b\n\x19\x43reateEnvironmentMetadata\"\x1b\n\x19\x44\x65leteEnvironmentMetadata\"R\n\x17StartEnvironmentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x02 \x01(\t\x12\x13\n\x0bpublic_keys\x18\x03 \x03(\t\"\x84\x01\n\x1b\x41uthorizeEnvironmentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x02 \x01(\t\x12\x10\n\x08id_token\x18\x04 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x1e\n\x1c\x41uthorizeEnvironmentResponse\"\x1e\n\x1c\x41uthorizeEnvironmentMetadata\"\xd2\x01\n\x18StartEnvironmentMetadata\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x35.google.cloud.shell.v1.StartEnvironmentMetadata.State\"p\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x14\n\x10UNARCHIVING_DISK\x10\x02\x12\x1e\n\x1a\x41WAITING_COMPUTE_RESOURCES\x10\x04\x12\x0c\n\x08\x46INISHED\x10\x03\"S\n\x18StartEnvironmentResponse\x12\x37\n\x0b\x65nvironment\x18\x01 \x01(\x0b\x32\".google.cloud.shell.v1.Environment\"7\n\x13\x41\x64\x64PublicKeyRequest\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\"#\n\x14\x41\x64\x64PublicKeyResponse\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x16\n\x14\x41\x64\x64PublicKeyMetadata\":\n\x16RemovePublicKeyRequest\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\"\x19\n\x17RemovePublicKeyResponse\"\x19\n\x17RemovePublicKeyMetadata\"\x9e\x02\n\x16\x43loudShellErrorDetails\x12O\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x41.google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode\"\xb2\x01\n\x13\x43loudShellErrorCode\x12&\n\"CLOUD_SHELL_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x15\n\x11IMAGE_UNAVAILABLE\x10\x01\x12\x18\n\x14\x43LOUD_SHELL_DISABLED\x10\x02\x12\x11\n\rTOS_VIOLATION\x10\x04\x12\x12\n\x0eQUOTA_EXCEEDED\x10\x05\x12\x1b\n\x17\x45NVIRONMENT_UNAVAILABLE\x10\x06\x32\xd4\x08\n\x11\x43loudShellService\x12\x94\x01\n\x0eGetEnvironment\x12,.google.cloud.shell.v1.GetEnvironmentRequest\x1a\".google.cloud.shell.v1.Environment\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=users/*/environments/*}\x12\xcc\x01\n\x10StartEnvironment\x12..google.cloud.shell.v1.StartEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41\x34\n\x18StartEnvironmentResponse\x12\x18StartEnvironmentMetadata\x82\xd3\xe4\x93\x02,\"\'/v1/{name=users/*/environments/*}:start:\x01*\x12\xe0\x01\n\x14\x41uthorizeEnvironment\x12\x32.google.cloud.shell.v1.AuthorizeEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41<\n\x1c\x41uthorizeEnvironmentResponse\x12\x1c\x41uthorizeEnvironmentMetadata\x82\xd3\xe4\x93\x02\x30\"+/v1/{name=users/*/environments/*}:authorize:\x01*\x12\xca\x01\n\x0c\x41\x64\x64PublicKey\x12*.google.cloud.shell.v1.AddPublicKeyRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41,\n\x14\x41\x64\x64PublicKeyResponse\x12\x14\x41\x64\x64PublicKeyMetadata\x82\xd3\xe4\x93\x02:\"5/v1/{environment=users/*/environments/*}:addPublicKey:\x01*\x12\xd9\x01\n\x0fRemovePublicKey\x12-.google.cloud.shell.v1.RemovePublicKeyRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x32\n\x17RemovePublicKeyResponse\x12\x17RemovePublicKeyMetadata\x82\xd3\xe4\x93\x02=\"8/v1/{environment=users/*/environments/*}:removePublicKey:\x01*\x1aM\xca\x41\x19\x63loudshell.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB_\n\x19\x63om.google.cloud.shell.v1B\x0f\x43loudShellProtoP\x01Z/cloud.google.com/go/shell/apiv1/shellpb;shellpbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Shell + module V1 + Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.Environment").msgclass + Environment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.Environment.State").enummodule + GetEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.GetEnvironmentRequest").msgclass + CreateEnvironmentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.CreateEnvironmentMetadata").msgclass + DeleteEnvironmentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.DeleteEnvironmentMetadata").msgclass + StartEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.StartEnvironmentRequest").msgclass + AuthorizeEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AuthorizeEnvironmentRequest").msgclass + AuthorizeEnvironmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AuthorizeEnvironmentResponse").msgclass + AuthorizeEnvironmentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AuthorizeEnvironmentMetadata").msgclass + StartEnvironmentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.StartEnvironmentMetadata").msgclass + StartEnvironmentMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.StartEnvironmentMetadata.State").enummodule + StartEnvironmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.StartEnvironmentResponse").msgclass + AddPublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AddPublicKeyRequest").msgclass + AddPublicKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AddPublicKeyResponse").msgclass + AddPublicKeyMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AddPublicKeyMetadata").msgclass + RemovePublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.RemovePublicKeyRequest").msgclass + RemovePublicKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.RemovePublicKeyResponse").msgclass + RemovePublicKeyMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.RemovePublicKeyMetadata").msgclass + CloudShellErrorDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.CloudShellErrorDetails").msgclass + CloudShellErrorDetails::CloudShellErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb new file mode 100644 index 000000000000..a9cf73ced654 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb @@ -0,0 +1,72 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/shell/v1/cloudshell.proto for package 'google.cloud.shell.v1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/shell/v1/cloudshell_pb' + +module Google + module Cloud + module Shell + module V1 + module CloudShellService + # API for interacting with Google Cloud Shell. Each user of Cloud Shell has at + # least one environment, which has the ID "default". Environment consists of a + # Docker image defining what is installed on the environment and a home + # directory containing the user's data that will remain across sessions. + # Clients use this API to start and fetch information about their environment, + # which can then be used to connect to that environment via a separate SSH + # client. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.shell.v1.CloudShellService' + + # Gets an environment. Returns NOT_FOUND if the environment does not exist. + rpc :GetEnvironment, ::Google::Cloud::Shell::V1::GetEnvironmentRequest, ::Google::Cloud::Shell::V1::Environment + # Starts an existing environment, allowing clients to connect to it. The + # returned operation will contain an instance of StartEnvironmentMetadata in + # its metadata field. Users can wait for the environment to start by polling + # this operation via GetOperation. Once the environment has finished starting + # and is ready to accept connections, the operation will contain a + # StartEnvironmentResponse in its response field. + rpc :StartEnvironment, ::Google::Cloud::Shell::V1::StartEnvironmentRequest, ::Google::Longrunning::Operation + # Sends OAuth credentials to a running environment on behalf of a user. When + # this completes, the environment will be authorized to run various Google + # Cloud command line tools without requiring the user to manually + # authenticate. + rpc :AuthorizeEnvironment, ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest, ::Google::Longrunning::Operation + # Adds a public SSH key to an environment, allowing clients with the + # corresponding private key to connect to that environment via SSH. If a key + # with the same content already exists, this will error with ALREADY_EXISTS. + rpc :AddPublicKey, ::Google::Cloud::Shell::V1::AddPublicKeyRequest, ::Google::Longrunning::Operation + # Removes a public SSH key from an environment. Clients will no longer be + # able to connect to the environment using the corresponding private key. + # If a key with the same content is not present, this will error with + # NOT_FOUND. + rpc :RemovePublicKey, ::Google::Cloud::Shell::V1::RemovePublicKeyRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.rb new file mode 100644 index 000000000000..a29fd5893233 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/shell/v1/cloud_shell_service/rest" +require "google/cloud/shell/v1/version" + +module Google + module Cloud + module Shell + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/shell/v1/rest" + # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/version.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/version.rb new file mode 100644 index 000000000000..b3e028a7b6d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Shell + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-shell-v1/proto_docs/README.md new file mode 100644 index 000000000000..b2196eb48b44 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Shell V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.rb new file mode 100644 index 000000000000..56848a1f0233 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.rb @@ -0,0 +1,331 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Shell + module V1 + # A Cloud Shell environment, which is defined as the combination of a Docker + # image specifying what is installed on the environment and a home directory + # containing the user's data that will remain across sessions. Each user has + # at least an environment with the ID "default". + # @!attribute [rw] name + # @return [::String] + # Immutable. Full name of this resource, in the format + # `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the + # email address of the user to whom this environment belongs, and + # `{environment_id}` is the identifier of this environment. For example, + # `users/someone@example.com/environments/default`. + # @!attribute [r] id + # @return [::String] + # Output only. The environment's identifier, unique among the user's + # environments. + # @!attribute [rw] docker_image + # @return [::String] + # Required. Immutable. Full path to the Docker image used to run this environment, e.g. + # "gcr.io/dev-con/cloud-devshell:latest". + # @!attribute [r] state + # @return [::Google::Cloud::Shell::V1::Environment::State] + # Output only. Current execution state of this environment. + # @!attribute [r] web_host + # @return [::String] + # Output only. Host to which clients can connect to initiate HTTPS or WSS + # connections with the environment. + # @!attribute [r] ssh_username + # @return [::String] + # Output only. Username that clients should use when initiating SSH sessions + # with the environment. + # @!attribute [r] ssh_host + # @return [::String] + # Output only. Host to which clients can connect to initiate SSH sessions + # with the environment. + # @!attribute [r] ssh_port + # @return [::Integer] + # Output only. Port to which clients can connect to initiate SSH sessions + # with the environment. + # @!attribute [r] public_keys + # @return [::Array<::String>] + # Output only. Public keys associated with the environment. Clients can + # connect to this environment via SSH only if they possess a private key + # corresponding to at least one of these public keys. Keys can be added to or + # removed from the environment using the AddPublicKey and RemovePublicKey + # methods. + class Environment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible execution states for an environment. + module State + # The environment's states is unknown. + STATE_UNSPECIFIED = 0 + + # The environment is not running and can't be connected to. Starting the + # environment will transition it to the PENDING state. + SUSPENDED = 1 + + # The environment is being started but is not yet ready to accept + # connections. + PENDING = 2 + + # The environment is running and ready to accept connections. It will + # automatically transition back to DISABLED after a period of inactivity or + # if another environment is started. + RUNNING = 3 + + # The environment is being deleted and can't be connected to. + DELETING = 4 + end + end + + # Request message for + # {::Google::Cloud::Shell::V1::CloudShellService::Client#get_environment GetEnvironment}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the requested resource, for example `users/me/environments/default` + # or `users/someone@example.com/environments/default`. + class GetEnvironmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message included in the metadata field of operations returned from + # [CreateEnvironment][google.cloud.shell.v1.CloudShellService.CreateEnvironment]. + class CreateEnvironmentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message included in the metadata field of operations returned from + # [DeleteEnvironment][google.cloud.shell.v1.CloudShellService.DeleteEnvironment]. + class DeleteEnvironmentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Shell::V1::CloudShellService::Client#start_environment StartEnvironment}. + # @!attribute [rw] name + # @return [::String] + # Name of the resource that should be started, for example + # `users/me/environments/default` or + # `users/someone@example.com/environments/default`. + # @!attribute [rw] access_token + # @return [::String] + # The initial access token passed to the environment. If this is present and + # valid, the environment will be pre-authenticated with gcloud so that the + # user can run gcloud commands in Cloud Shell without having to log in. This + # code can be updated later by calling AuthorizeEnvironment. + # @!attribute [rw] public_keys + # @return [::Array<::String>] + # Public keys that should be added to the environment before it is started. + class StartEnvironmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment AuthorizeEnvironment}. + # @!attribute [rw] name + # @return [::String] + # Name of the resource that should receive the credentials, for example + # `users/me/environments/default` or + # `users/someone@example.com/environments/default`. + # @!attribute [rw] access_token + # @return [::String] + # The OAuth access token that should be sent to the environment. + # @!attribute [rw] id_token + # @return [::String] + # The OAuth ID token that should be sent to the environment. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # The time when the credentials expire. If not set, defaults to one hour from + # when the server received the request. + class AuthorizeEnvironmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment AuthorizeEnvironment}. + class AuthorizeEnvironmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message included in the metadata field of operations returned from + # {::Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment AuthorizeEnvironment}. + class AuthorizeEnvironmentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message included in the metadata field of operations returned from + # {::Google::Cloud::Shell::V1::CloudShellService::Client#start_environment StartEnvironment}. + # @!attribute [rw] state + # @return [::Google::Cloud::Shell::V1::StartEnvironmentMetadata::State] + # Current state of the environment being started. + class StartEnvironmentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states an environment might transition between during startup. + # These states are not normally actionable by clients, but may be used to + # show a progress message to the user. An environment won't necessarily go + # through all of these states when starting. More states are likely to be + # added in the future. + module State + # The environment's start state is unknown. + STATE_UNSPECIFIED = 0 + + # The environment is in the process of being started, but no additional + # details are available. + STARTING = 1 + + # Startup is waiting for the user's disk to be unarchived. This can happen + # when the user returns to Cloud Shell after not having used it for a + # while, and suggests that startup will take longer than normal. + UNARCHIVING_DISK = 2 + + # Startup is waiting for compute resources to be assigned to the + # environment. This should normally happen very quickly, but an environment + # might stay in this state for an extended period of time if the system is + # experiencing heavy load. + AWAITING_COMPUTE_RESOURCES = 4 + + # Startup has completed. If the start operation was successful, the user + # should be able to establish an SSH connection to their environment. + # Otherwise, the operation will contain details of the failure. + FINISHED = 3 + end + end + + # Message included in the response field of operations returned from + # {::Google::Cloud::Shell::V1::CloudShellService::Client#start_environment StartEnvironment} + # once the operation is complete. + # @!attribute [rw] environment + # @return [::Google::Cloud::Shell::V1::Environment] + # Environment that was started. + class StartEnvironmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key AddPublicKey}. + # @!attribute [rw] environment + # @return [::String] + # Environment this key should be added to, e.g. + # `users/me/environments/default`. + # @!attribute [rw] key + # @return [::String] + # Key that should be added to the environment. Supported formats are + # `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` + # (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and + # `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as + # <format> <content>, where <content> part is encoded with + # Base64. + class AddPublicKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key AddPublicKey}. + # @!attribute [rw] key + # @return [::String] + # Key that was added to the environment. + class AddPublicKeyResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message included in the metadata field of operations returned from + # {::Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key AddPublicKey}. + class AddPublicKeyMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key RemovePublicKey}. + # @!attribute [rw] environment + # @return [::String] + # Environment this key should be removed from, e.g. + # `users/me/environments/default`. + # @!attribute [rw] key + # @return [::String] + # Key that should be removed from the environment. + class RemovePublicKeyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key RemovePublicKey}. + class RemovePublicKeyResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message included in the metadata field of operations returned from + # {::Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key RemovePublicKey}. + class RemovePublicKeyMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Cloud-shell specific information that will be included as details in failure + # responses. + # @!attribute [rw] code + # @return [::Google::Cloud::Shell::V1::CloudShellErrorDetails::CloudShellErrorCode] + # Code indicating the specific error the occurred. + class CloudShellErrorDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Set of possible errors returned from API calls. + module CloudShellErrorCode + # An unknown error occurred. + CLOUD_SHELL_ERROR_CODE_UNSPECIFIED = 0 + + # The image used by the Cloud Shell environment either does not exist or + # the user does not have access to it. + IMAGE_UNAVAILABLE = 1 + + # Cloud Shell has been disabled by an administrator for the user making the + # request. + CLOUD_SHELL_DISABLED = 2 + + # Cloud Shell has been permanently disabled due to a Terms of Service + # violation by the user. + TOS_VIOLATION = 4 + + # The user has exhausted their weekly Cloud Shell quota, and Cloud Shell + # will be disabled until the quota resets. + QUOTA_EXCEEDED = 5 + + # The Cloud Shell environment is unavailable and cannot be connected to at + # the moment. + ENVIRONMENT_UNAVAILABLE = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-shell-v1/snippets/Gemfile new file mode 100644 index 000000000000..bf1674af9c6d --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-shell-v1", path: "../" +else + gem "google-cloud-shell-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/add_public_key.rb b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/add_public_key.rb new file mode 100644 index 000000000000..da6e75c81361 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/add_public_key.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudshell_v1_generated_CloudShellService_AddPublicKey_sync] +require "google/cloud/shell/v1" + +## +# Snippet for the add_public_key call in the CloudShellService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key. +# +def add_public_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Shell::V1::CloudShellService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Shell::V1::AddPublicKeyRequest.new + + # Call the add_public_key method. + result = client.add_public_key request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudshell_v1_generated_CloudShellService_AddPublicKey_sync] diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/authorize_environment.rb b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/authorize_environment.rb new file mode 100644 index 000000000000..b16bf5d9babc --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/authorize_environment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudshell_v1_generated_CloudShellService_AuthorizeEnvironment_sync] +require "google/cloud/shell/v1" + +## +# Snippet for the authorize_environment call in the CloudShellService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment. +# +def authorize_environment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Shell::V1::CloudShellService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new + + # Call the authorize_environment method. + result = client.authorize_environment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudshell_v1_generated_CloudShellService_AuthorizeEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/get_environment.rb b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/get_environment.rb new file mode 100644 index 000000000000..c36b2f501286 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/get_environment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudshell_v1_generated_CloudShellService_GetEnvironment_sync] +require "google/cloud/shell/v1" + +## +# Snippet for the get_environment call in the CloudShellService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Shell::V1::CloudShellService::Client#get_environment. +# +def get_environment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Shell::V1::CloudShellService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Shell::V1::GetEnvironmentRequest.new + + # Call the get_environment method. + result = client.get_environment request + + # The returned object is of type Google::Cloud::Shell::V1::Environment. + p result +end +# [END cloudshell_v1_generated_CloudShellService_GetEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/remove_public_key.rb b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/remove_public_key.rb new file mode 100644 index 000000000000..aefbd90a0735 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/remove_public_key.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudshell_v1_generated_CloudShellService_RemovePublicKey_sync] +require "google/cloud/shell/v1" + +## +# Snippet for the remove_public_key call in the CloudShellService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key. +# +def remove_public_key + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Shell::V1::CloudShellService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Shell::V1::RemovePublicKeyRequest.new + + # Call the remove_public_key method. + result = client.remove_public_key request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudshell_v1_generated_CloudShellService_RemovePublicKey_sync] diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/start_environment.rb b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/start_environment.rb new file mode 100644 index 000000000000..4f91952a7a8c --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/start_environment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudshell_v1_generated_CloudShellService_StartEnvironment_sync] +require "google/cloud/shell/v1" + +## +# Snippet for the start_environment call in the CloudShellService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Shell::V1::CloudShellService::Client#start_environment. +# +def start_environment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Shell::V1::CloudShellService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Shell::V1::StartEnvironmentRequest.new + + # Call the start_environment method. + result = client.start_environment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudshell_v1_generated_CloudShellService_StartEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/snippet_metadata_google.cloud.shell.v1.json b/owl-bot-staging/google-cloud-shell-v1/snippets/snippet_metadata_google.cloud.shell.v1.json new file mode 100644 index 000000000000..5f8796a64fec --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/snippets/snippet_metadata_google.cloud.shell.v1.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-cloud-shell-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.shell.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudshell_v1_generated_CloudShellService_GetEnvironment_sync", + "title": "Snippet for the get_environment call in the CloudShellService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Shell::V1::CloudShellService::Client#get_environment.", + "file": "cloud_shell_service/get_environment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_environment", + "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client#get_environment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Shell::V1::GetEnvironmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Shell::V1::Environment", + "client": { + "short_name": "CloudShellService::Client", + "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client" + }, + "method": { + "short_name": "GetEnvironment", + "full_name": "google.cloud.shell.v1.CloudShellService.GetEnvironment", + "service": { + "short_name": "CloudShellService", + "full_name": "google.cloud.shell.v1.CloudShellService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudshell_v1_generated_CloudShellService_StartEnvironment_sync", + "title": "Snippet for the start_environment call in the CloudShellService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Shell::V1::CloudShellService::Client#start_environment.", + "file": "cloud_shell_service/start_environment.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_environment", + "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client#start_environment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Shell::V1::StartEnvironmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudShellService::Client", + "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client" + }, + "method": { + "short_name": "StartEnvironment", + "full_name": "google.cloud.shell.v1.CloudShellService.StartEnvironment", + "service": { + "short_name": "CloudShellService", + "full_name": "google.cloud.shell.v1.CloudShellService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudshell_v1_generated_CloudShellService_AuthorizeEnvironment_sync", + "title": "Snippet for the authorize_environment call in the CloudShellService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment.", + "file": "cloud_shell_service/authorize_environment.rb", + "language": "RUBY", + "client_method": { + "short_name": "authorize_environment", + "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudShellService::Client", + "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client" + }, + "method": { + "short_name": "AuthorizeEnvironment", + "full_name": "google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment", + "service": { + "short_name": "CloudShellService", + "full_name": "google.cloud.shell.v1.CloudShellService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudshell_v1_generated_CloudShellService_AddPublicKey_sync", + "title": "Snippet for the add_public_key call in the CloudShellService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key.", + "file": "cloud_shell_service/add_public_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "add_public_key", + "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Shell::V1::AddPublicKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudShellService::Client", + "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client" + }, + "method": { + "short_name": "AddPublicKey", + "full_name": "google.cloud.shell.v1.CloudShellService.AddPublicKey", + "service": { + "short_name": "CloudShellService", + "full_name": "google.cloud.shell.v1.CloudShellService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudshell_v1_generated_CloudShellService_RemovePublicKey_sync", + "title": "Snippet for the remove_public_key call in the CloudShellService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key.", + "file": "cloud_shell_service/remove_public_key.rb", + "language": "RUBY", + "client_method": { + "short_name": "remove_public_key", + "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Shell::V1::RemovePublicKeyRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudShellService::Client", + "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client" + }, + "method": { + "short_name": "RemovePublicKey", + "full_name": "google.cloud.shell.v1.CloudShellService.RemovePublicKey", + "service": { + "short_name": "CloudShellService", + "full_name": "google.cloud.shell.v1.CloudShellService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_test.rb b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_test.rb new file mode 100644 index 000000000000..5749a70f2d54 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/shell/v1/cloudshell_pb" +require "google/cloud/shell/v1/cloudshell_services_pb" +require "google/cloud/shell/v1/cloud_shell_service" + +class ::Google::Cloud::Shell::V1::CloudShellService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Shell::V1::CloudShellService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_test.rb b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_test.rb new file mode 100644 index 000000000000..04962e8b8cea --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/shell/v1/cloud_shell_service" + +class ::Google::Cloud::Shell::V1::CloudShellService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_environment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.environment_path user: "value0", environment: "value1" + assert_equal "users/value0/environments/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_test.rb b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_test.rb new file mode 100644 index 000000000000..bf9df56a12a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_test.rb @@ -0,0 +1,376 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/shell/v1/cloudshell_pb" +require "google/cloud/shell/v1/cloud_shell_service/rest" + + +class ::Google::Cloud::Shell::V1::CloudShellService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_environment + # Create test objects. + client_result = ::Google::Cloud::Shell::V1::Environment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.stub :transcode_get_environment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_environment_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_environment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_environment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_environment ::Google::Cloud::Shell::V1::GetEnvironmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_environment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_environment(::Google::Cloud::Shell::V1::GetEnvironmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_environment_client_stub.call_count + end + end + end + + def test_start_environment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + access_token = "hello world" + public_keys = ["hello world"] + + start_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.stub :transcode_start_environment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_environment_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.start_environment({ name: name, access_token: access_token, public_keys: public_keys }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.start_environment name: name, access_token: access_token, public_keys: public_keys do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.start_environment ::Google::Cloud::Shell::V1::StartEnvironmentRequest.new(name: name, access_token: access_token, public_keys: public_keys) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.start_environment({ name: name, access_token: access_token, public_keys: public_keys }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.start_environment(::Google::Cloud::Shell::V1::StartEnvironmentRequest.new(name: name, access_token: access_token, public_keys: public_keys), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_environment_client_stub.call_count + end + end + end + + def test_authorize_environment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + access_token = "hello world" + id_token = "hello world" + expire_time = {} + + authorize_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.stub :transcode_authorize_environment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, authorize_environment_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.authorize_environment({ name: name, access_token: access_token, id_token: id_token, expire_time: expire_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.authorize_environment name: name, access_token: access_token, id_token: id_token, expire_time: expire_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.authorize_environment ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new(name: name, access_token: access_token, id_token: id_token, expire_time: expire_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.authorize_environment({ name: name, access_token: access_token, id_token: id_token, expire_time: expire_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.authorize_environment(::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new(name: name, access_token: access_token, id_token: id_token, expire_time: expire_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, authorize_environment_client_stub.call_count + end + end + end + + def test_add_public_key + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + environment = "hello world" + key = "hello world" + + add_public_key_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.stub :transcode_add_public_key_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, add_public_key_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.add_public_key({ environment: environment, key: key }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.add_public_key environment: environment, key: key do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.add_public_key ::Google::Cloud::Shell::V1::AddPublicKeyRequest.new(environment: environment, key: key) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.add_public_key({ environment: environment, key: key }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.add_public_key(::Google::Cloud::Shell::V1::AddPublicKeyRequest.new(environment: environment, key: key), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, add_public_key_client_stub.call_count + end + end + end + + def test_remove_public_key + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + environment = "hello world" + key = "hello world" + + remove_public_key_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.stub :transcode_remove_public_key_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, remove_public_key_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.remove_public_key({ environment: environment, key: key }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.remove_public_key environment: environment, key: key do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.remove_public_key ::Google::Cloud::Shell::V1::RemovePublicKeyRequest.new(environment: environment, key: key) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.remove_public_key({ environment: environment, key: key }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.remove_public_key(::Google::Cloud::Shell::V1::RemovePublicKeyRequest.new(environment: environment, key: key), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, remove_public_key_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_test.rb b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_test.rb new file mode 100644 index 000000000000..a2ff907f6c85 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_test.rb @@ -0,0 +1,442 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/shell/v1/cloudshell_pb" +require "google/cloud/shell/v1/cloud_shell_service" + +class ::Google::Cloud::Shell::V1::CloudShellService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_environment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Shell::V1::Environment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_environment, name + assert_kind_of ::Google::Cloud::Shell::V1::GetEnvironmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_environment_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_environment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_environment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_environment ::Google::Cloud::Shell::V1::GetEnvironmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_environment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_environment(::Google::Cloud::Shell::V1::GetEnvironmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_environment_client_stub.call_rpc_count + end + end + + def test_start_environment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + access_token = "hello world" + public_keys = ["hello world"] + + start_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_environment, name + assert_kind_of ::Google::Cloud::Shell::V1::StartEnvironmentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["access_token"] + assert_equal ["hello world"], request["public_keys"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_environment_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.start_environment({ name: name, access_token: access_token, public_keys: public_keys }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.start_environment name: name, access_token: access_token, public_keys: public_keys do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.start_environment ::Google::Cloud::Shell::V1::StartEnvironmentRequest.new(name: name, access_token: access_token, public_keys: public_keys) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.start_environment({ name: name, access_token: access_token, public_keys: public_keys }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.start_environment(::Google::Cloud::Shell::V1::StartEnvironmentRequest.new(name: name, access_token: access_token, public_keys: public_keys), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, start_environment_client_stub.call_rpc_count + end + end + + def test_authorize_environment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + access_token = "hello world" + id_token = "hello world" + expire_time = {} + + authorize_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :authorize_environment, name + assert_kind_of ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["access_token"] + assert_equal "hello world", request["id_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["expire_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, authorize_environment_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.authorize_environment({ name: name, access_token: access_token, id_token: id_token, expire_time: expire_time }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.authorize_environment name: name, access_token: access_token, id_token: id_token, expire_time: expire_time do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.authorize_environment ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new(name: name, access_token: access_token, id_token: id_token, expire_time: expire_time) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.authorize_environment({ name: name, access_token: access_token, id_token: id_token, expire_time: expire_time }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.authorize_environment(::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new(name: name, access_token: access_token, id_token: id_token, expire_time: expire_time), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, authorize_environment_client_stub.call_rpc_count + end + end + + def test_add_public_key + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + environment = "hello world" + key = "hello world" + + add_public_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :add_public_key, name + assert_kind_of ::Google::Cloud::Shell::V1::AddPublicKeyRequest, request + assert_equal "hello world", request["environment"] + assert_equal "hello world", request["key"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, add_public_key_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.add_public_key({ environment: environment, key: key }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.add_public_key environment: environment, key: key do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.add_public_key ::Google::Cloud::Shell::V1::AddPublicKeyRequest.new(environment: environment, key: key) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.add_public_key({ environment: environment, key: key }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.add_public_key(::Google::Cloud::Shell::V1::AddPublicKeyRequest.new(environment: environment, key: key), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, add_public_key_client_stub.call_rpc_count + end + end + + def test_remove_public_key + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + environment = "hello world" + key = "hello world" + + remove_public_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :remove_public_key, name + assert_kind_of ::Google::Cloud::Shell::V1::RemovePublicKeyRequest, request + assert_equal "hello world", request["environment"] + assert_equal "hello world", request["key"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, remove_public_key_client_stub do + # Create client + c = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.remove_public_key({ environment: environment, key: key }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.remove_public_key environment: environment, key: key do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.remove_public_key ::Google::Cloud::Shell::V1::RemovePublicKeyRequest.new(environment: environment, key: key) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.remove_public_key({ environment: environment, key: key }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.remove_public_key(::Google::Cloud::Shell::V1::RemovePublicKeyRequest.new(environment: environment, key: key), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, remove_public_key_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Shell::V1::CloudShellService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Shell::V1::CloudShellService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Shell::V1::CloudShellService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-shell-v1/test/helper.rb b/owl-bot-staging/google-cloud-shell-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-shell-v1/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-spanner-admin-database-v1/.gitignore b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.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-spanner-admin-database-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.repo-metadata.json new file mode 100644 index 000000000000..e3f41ff59e96 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "spanner.googleapis.com", + "api_shortname": "spanner", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-database-v1/latest", + "distribution_name": "google-cloud-spanner-admin-database-v1", + "is_cloud": true, + "language": "ruby", + "name": "spanner", + "name_pretty": "Cloud Spanner Database Admin V1 API", + "product_documentation": "https://cloud.google.com/spanner", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-admin-database-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details.", + "ruby-cloud-env-prefix": "SPANNER", + "ruby-cloud-product-url": "https://cloud.google.com/spanner", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/.rubocop.yml b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.rubocop.yml new file mode 100644 index 000000000000..7278d0340d48 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-spanner-admin-database-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-spanner-admin-database-v1.rb" diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/.toys.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/.yardopts b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.yardopts new file mode 100644 index 000000000000..11ef47976a02 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Spanner Database Admin V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-spanner-admin-database-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..dff234acc315 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-spanner-admin-database-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-spanner-admin-database-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/spanner/admin/database/v1" + +client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/spanner/admin/database/v1" + +::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-spanner-admin-database-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/spanner/admin/database/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-spanner-admin-database-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/Gemfile b/owl-bot-staging/google-cloud-spanner-admin-database-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-spanner-admin-database-v1/LICENSE.md b/owl-bot-staging/google-cloud-spanner-admin-database-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/README.md b/owl-bot-staging/google-cloud-spanner-admin-database-v1/README.md new file mode 100644 index 000000000000..48f2166e6611 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Spanner Database Admin V1 API + +Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Spanner Database Admin V1 API. Most users should consider using +the main client gem, +[google-cloud-spanner](https://rubygems.org/gems/google-cloud-spanner). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-spanner-admin-database-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/spanner.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/spanner/admin/database/v1" + +client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new +request = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new # (request fields as keyword arguments...) +response = client.list_databases request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-database-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/spanner) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/spanner/admin/database/v1" +require "logger" + +client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-spanner`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-spanner-admin-database-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-spanner`. +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-spanner-admin-database-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-spanner-admin-database-v1/Rakefile b/owl-bot-staging/google-cloud-spanner-admin-database-v1/Rakefile new file mode 100644 index 000000000000..49214abd44ec --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-spanner-admin-database-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SPANNER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SPANNER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SPANNER_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 SPANNER_TEST_PROJECT=test123 SPANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/spanner/admin/database/v1/database_admin/credentials" + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SPANNER_PROJECT"] = project + ENV["SPANNER_TEST_PROJECT"] = project + ENV["SPANNER_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-spanner-admin-database-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-spanner-admin-database-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-spanner-admin-database-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-spanner-admin-database-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-spanner-admin-database-v1" + header "google-cloud-spanner-admin-database-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-spanner-admin-database-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-spanner-admin-database-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-spanner-admin-database-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-spanner-admin-database-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-spanner-admin-database-v1/gapic_metadata.json new file mode 100644 index 000000000000..d7aa9420ad18 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/gapic_metadata.json @@ -0,0 +1,153 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.spanner.admin.database.v1", + "libraryPackage": "::Google::Cloud::Spanner::Admin::Database::V1", + "services": { + "DatabaseAdmin": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client", + "rpcs": { + "ListDatabases": { + "methods": [ + "list_databases" + ] + }, + "CreateDatabase": { + "methods": [ + "create_database" + ] + }, + "GetDatabase": { + "methods": [ + "get_database" + ] + }, + "UpdateDatabase": { + "methods": [ + "update_database" + ] + }, + "UpdateDatabaseDdl": { + "methods": [ + "update_database_ddl" + ] + }, + "DropDatabase": { + "methods": [ + "drop_database" + ] + }, + "GetDatabaseDdl": { + "methods": [ + "get_database_ddl" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "CreateBackup": { + "methods": [ + "create_backup" + ] + }, + "CopyBackup": { + "methods": [ + "copy_backup" + ] + }, + "GetBackup": { + "methods": [ + "get_backup" + ] + }, + "UpdateBackup": { + "methods": [ + "update_backup" + ] + }, + "DeleteBackup": { + "methods": [ + "delete_backup" + ] + }, + "ListBackups": { + "methods": [ + "list_backups" + ] + }, + "RestoreDatabase": { + "methods": [ + "restore_database" + ] + }, + "ListDatabaseOperations": { + "methods": [ + "list_database_operations" + ] + }, + "ListBackupOperations": { + "methods": [ + "list_backup_operations" + ] + }, + "ListDatabaseRoles": { + "methods": [ + "list_database_roles" + ] + }, + "AddSplitPoints": { + "methods": [ + "add_split_points" + ] + }, + "CreateBackupSchedule": { + "methods": [ + "create_backup_schedule" + ] + }, + "GetBackupSchedule": { + "methods": [ + "get_backup_schedule" + ] + }, + "UpdateBackupSchedule": { + "methods": [ + "update_backup_schedule" + ] + }, + "DeleteBackupSchedule": { + "methods": [ + "delete_backup_schedule" + ] + }, + "ListBackupSchedules": { + "methods": [ + "list_backup_schedules" + ] + }, + "InternalUpdateGraphOperation": { + "methods": [ + "internal_update_graph_operation" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/google-cloud-spanner-admin-database-v1.gemspec b/owl-bot-staging/google-cloud-spanner-admin-database-v1/google-cloud-spanner-admin-database-v1.gemspec new file mode 100644 index 000000000000..b5a16dfeef6c --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/google-cloud-spanner-admin-database-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/spanner/admin/database/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-spanner-admin-database-v1" + gem.version = Google::Cloud::Spanner::Admin::Database::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-admin-database-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details." + gem.summary = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.rb new file mode 100644 index 000000000000..4a1420305d7f --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/spanner/admin/database/v1" diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.rb new file mode 100644 index 000000000000..ab4f375dca61 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/spanner/admin/database/v1/database_admin" +require "google/cloud/spanner/admin/database/v1/version" + +module Google + module Cloud + module Spanner + module Admin + module Database + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/spanner/admin/database/v1" + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/spanner/admin/database/v1" + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + module V1 + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/spanner/admin/database/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.rb new file mode 100644 index 000000000000..31d5189b1b85 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/spanner/admin/database/v1/version" + +require "google/cloud/spanner/admin/database/v1/database_admin/credentials" +require "google/cloud/spanner/admin/database/v1/database_admin/paths" +require "google/cloud/spanner/admin/database/v1/database_admin/operations" +require "google/cloud/spanner/admin/database/v1/database_admin/client" +require "google/cloud/spanner/admin/database/v1/database_admin/rest" + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + ## + # Cloud Spanner Database Admin API + # + # The Cloud Spanner Database Admin API can be used to: + # * create, drop, and list databases + # * update the schema of pre-existing databases + # * create, delete, copy and list backups for a database + # * restore a database from an existing backup + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/spanner/admin/database/v1/database_admin" + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/spanner/admin/database/v1/database_admin/rest" + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + module DatabaseAdmin + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "database_admin", "helpers.rb" +require "google/cloud/spanner/admin/database/v1/database_admin/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb new file mode 100644 index 000000000000..8ce5e1e179bd --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb @@ -0,0 +1,3660 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/spanner/admin/database/v1/spanner_database_admin_pb" + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + module DatabaseAdmin + ## + # Client for the DatabaseAdmin service. + # + # Cloud Spanner Database Admin API + # + # The Cloud Spanner Database Admin API can be used to: + # * create, drop, and list databases + # * update the schema of pre-existing databases + # * create, delete, copy and list backups for a database + # * restore a database from an existing backup + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :database_admin_stub + + ## + # Configure the DatabaseAdmin Client class. + # + # See {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DatabaseAdmin clients + # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Spanner", "Admin", "Database", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_databases.timeout = 3600.0 + default_config.rpcs.list_databases.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_database.timeout = 3600.0 + + default_config.rpcs.get_database.timeout = 3600.0 + default_config.rpcs.get_database.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_database.timeout = 3600.0 + default_config.rpcs.update_database.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_database_ddl.timeout = 3600.0 + default_config.rpcs.update_database_ddl.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.drop_database.timeout = 3600.0 + default_config.rpcs.drop_database.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_database_ddl.timeout = 3600.0 + default_config.rpcs.get_database_ddl.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.set_iam_policy.timeout = 30.0 + + default_config.rpcs.get_iam_policy.timeout = 30.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.test_iam_permissions.timeout = 30.0 + + default_config.rpcs.create_backup.timeout = 3600.0 + + default_config.rpcs.copy_backup.timeout = 3600.0 + + default_config.rpcs.get_backup.timeout = 3600.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_backup.timeout = 3600.0 + default_config.rpcs.update_backup.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_backup.timeout = 3600.0 + default_config.rpcs.delete_backup.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_backups.timeout = 3600.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.restore_database.timeout = 3600.0 + + default_config.rpcs.list_database_operations.timeout = 3600.0 + default_config.rpcs.list_database_operations.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_backup_operations.timeout = 3600.0 + default_config.rpcs.list_backup_operations.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_database_roles.timeout = 3600.0 + default_config.rpcs.list_database_roles.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.add_split_points.timeout = 3600.0 + default_config.rpcs.add_split_points.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_backup_schedule.timeout = 3600.0 + default_config.rpcs.create_backup_schedule.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_backup_schedule.timeout = 3600.0 + default_config.rpcs.get_backup_schedule.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_backup_schedule.timeout = 3600.0 + default_config.rpcs.update_backup_schedule.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_backup_schedule.timeout = 3600.0 + default_config.rpcs.delete_backup_schedule.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_backup_schedules.timeout = 3600.0 + default_config.rpcs.list_backup_schedules.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DatabaseAdmin Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @database_admin_stub.universe_domain + end + + ## + # Create a new DatabaseAdmin client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DatabaseAdmin client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/spanner/admin/database/v1/spanner_database_admin_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @database_admin_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @database_admin_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @database_admin_stub.logger + end + + # Service calls + + ## + # Lists Cloud Spanner databases. + # + # @overload list_databases(request, options = nil) + # Pass arguments to `list_databases` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_databases(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_databases` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance whose databases should be listed. + # Values are of the form `projects//instances/`. + # @param page_size [::Integer] + # Number of databases to be returned in the response. If 0 or less, + # defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new + # + # # Call the list_databases method. + # result = client.list_databases request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Database. + # p item + # end + # + def list_databases request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_databases.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_databases.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_databases.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :list_databases, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_databases, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new Cloud Spanner database and starts to prepare it for serving. + # The returned {::Google::Longrunning::Operation long-running operation} will + # have a name of the format `/operations/` and + # can be used to track preparation of the database. The + # {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful. + # + # @overload create_database(request, options = nil) + # Pass arguments to `create_database` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_database(parent: nil, create_statement: nil, extra_statements: nil, encryption_config: nil, database_dialect: nil, proto_descriptors: nil) + # Pass arguments to `create_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the instance that will serve the new database. + # Values are of the form `projects//instances/`. + # @param create_statement [::String] + # Required. A `CREATE DATABASE` statement, which specifies the ID of the + # new database. The database ID must conform to the regular expression + # `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length. + # If the database ID is a reserved word or if it contains a hyphen, the + # database ID must be enclosed in backticks (`` ` ``). + # @param extra_statements [::Array<::String>] + # Optional. A list of DDL statements to run inside the newly created + # database. Statements can create tables, indexes, etc. These + # statements execute atomically with the creation of the database: + # if there is an error in any statement, the database is not created. + # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig, ::Hash] + # Optional. The encryption configuration for the database. If this field is + # not specified, Cloud Spanner will encrypt/decrypt all data at rest using + # Google default encryption. + # @param database_dialect [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect] + # Optional. The dialect of the Cloud Spanner Database. + # @param proto_descriptors [::String] + # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in + # 'extra_statements' above. + # Contains a protobuf-serialized + # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). + # To generate it, [install](https://grpc.io/docs/protoc-installation/) and + # run `protoc` with --include_imports and --descriptor_set_out. For example, + # to generate for moon/shot/app.proto, run + # ``` + # $protoc --proto_path=/app_path --proto_path=/lib_path \ + # --include_imports \ + # --descriptor_set_out=descriptors.data \ + # moon/shot/app.proto + # ``` + # For more details, see protobuffer [self + # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new + # + # # Call the create_database method. + # result = client.create_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :create_database, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the state of a Cloud Spanner database. + # + # @overload get_database(request, options = nil) + # Pass arguments to `get_database` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_database(name: nil) + # Pass arguments to `get_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the requested database. Values are of the form + # `projects//instances//databases/`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::Database] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Database] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new + # + # # Call the get_database method. + # result = client.get_database request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Database. + # p result + # + def get_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :get_database, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Cloud Spanner database. The returned + # {::Google::Longrunning::Operation long-running operation} can be used to track + # the progress of updating the database. If the named database does not + # exist, returns `NOT_FOUND`. + # + # While the operation is pending: + # + # * The database's + # {::Google::Cloud::Spanner::Admin::Database::V1::Database#reconciling reconciling} + # field is set to true. + # * Cancelling the operation is best-effort. If the cancellation succeeds, + # the operation metadata's + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseMetadata#cancel_time cancel_time} + # is set, the updates are reverted, and the operation terminates with a + # `CANCELLED` status. + # * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error + # until the pending operation is done (returns successfully or with + # error). + # * Reading the database via the API continues to give the pre-request + # values. + # + # Upon completion of the returned operation: + # + # * The new values are in effect and readable via the API. + # * The database's + # {::Google::Cloud::Spanner::Admin::Database::V1::Database#reconciling reconciling} + # field becomes false. + # + # The returned {::Google::Longrunning::Operation long-running operation} will + # have a name of the format + # `projects//instances//databases//operations/` + # and can be used to track the database modification. The + # {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseMetadata UpdateDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful. + # + # @overload update_database(request, options = nil) + # Pass arguments to `update_database` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_database(database: nil, update_mask: nil) + # Pass arguments to `update_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::Google::Cloud::Spanner::Admin::Database::V1::Database, ::Hash] + # Required. The database to update. + # The `name` field of the database is of the form + # `projects//instances//databases/`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. Currently, only + # `enable_drop_protection` field can be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new + # + # # Call the update_database method. + # result = client.update_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database&.name + header_params["database.name"] = request.database.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :update_database, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the schema of a Cloud Spanner database by + # creating/altering/dropping tables, columns, indexes, etc. The returned + # {::Google::Longrunning::Operation long-running operation} will have a name of + # the format `/operations/` and can be used to + # track execution of the schema change(s). The + # {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}. + # The operation has no response. + # + # @overload update_database_ddl(request, options = nil) + # Pass arguments to `update_database_ddl` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_database_ddl(database: nil, statements: nil, operation_id: nil, proto_descriptors: nil, throughput_mode: nil) + # Pass arguments to `update_database_ddl` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database to update. + # @param statements [::Array<::String>] + # Required. DDL statements to be applied to the database. + # @param operation_id [::String] + # If empty, the new update request is assigned an + # automatically-generated operation ID. Otherwise, `operation_id` + # is used to construct the name of the resulting + # {::Google::Longrunning::Operation Operation}. + # + # Specifying an explicit operation ID simplifies determining + # whether the statements were executed in the event that the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} + # call is replayed, or the return value is otherwise lost: the + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} + # and `operation_id` fields can be combined to form the + # {::Google::Longrunning::Operation#name name} of the resulting + # {::Google::Longrunning::Operation longrunning.Operation}: + # `/operations/`. + # + # `operation_id` should be unique within the database, and must be + # a valid identifier: `[a-z][a-z0-9_]*`. Note that + # automatically-generated operation IDs always begin with an + # underscore. If the named operation already exists, + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} + # returns `ALREADY_EXISTS`. + # @param proto_descriptors [::String] + # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. + # Contains a protobuf-serialized + # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). + # To generate it, [install](https://grpc.io/docs/protoc-installation/) and + # run `protoc` with --include_imports and --descriptor_set_out. For example, + # to generate for moon/shot/app.proto, run + # ``` + # $protoc --proto_path=/app_path --proto_path=/lib_path \ + # --include_imports \ + # --descriptor_set_out=descriptors.data \ + # moon/shot/app.proto + # ``` + # For more details, see protobuffer [self + # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + # @param throughput_mode [::Boolean] + # Optional. This field is exposed to be used by the Spanner Migration Tool. + # For more details, see + # [SMT](https://github.com/GoogleCloudPlatform/spanner-migration-tool). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new + # + # # Call the update_database_ddl method. + # result = client.update_database_ddl request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_database_ddl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_database_ddl.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_database_ddl.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_database_ddl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :update_database_ddl, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Drops (aka deletes) a Cloud Spanner database. + # Completed backups for the database will be retained according to their + # `expire_time`. + # Note: Cloud Spanner might continue to accept requests for a few seconds + # after the database has been deleted. + # + # @overload drop_database(request, options = nil) + # Pass arguments to `drop_database` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload drop_database(database: nil) + # Pass arguments to `drop_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database to be dropped. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new + # + # # Call the drop_database method. + # result = client.drop_database request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def drop_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.drop_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.drop_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.drop_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :drop_database, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the schema of a Cloud Spanner database as a list of formatted + # DDL statements. This method does not show pending schema updates, those may + # be queried using the Operations API. + # + # @overload get_database_ddl(request, options = nil) + # Pass arguments to `get_database_ddl` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_database_ddl(database: nil) + # Pass arguments to `get_database_ddl` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database whose schema we wish to get. + # Values are of the form + # `projects//instances//databases/` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new + # + # # Call the get_database_ddl method. + # result = client.get_database_ddl request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse. + # p result + # + def get_database_ddl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_database_ddl.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_database_ddl.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_database_ddl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :get_database_ddl, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on a database or backup resource. + # Replaces any existing policy. + # + # Authorization requires `spanner.databases.setIamPolicy` + # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. + # For backups, authorization requires `spanner.backups.setIamPolicy` + # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a database or backup resource. + # Returns an empty policy if a database or backup exists but does not have a + # policy set. + # + # Authorization requires `spanner.databases.getIamPolicy` permission on + # [resource][google.iam.v1.GetIamPolicyRequest.resource]. + # For backups, authorization requires `spanner.backups.getIamPolicy` + # permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that the caller has on the specified database or backup + # resource. + # + # Attempting this RPC on a non-existent Cloud Spanner database will + # result in a NOT_FOUND error if the user has + # `spanner.databases.list` permission on the containing Cloud + # Spanner instance. Otherwise returns an empty set of permissions. + # Calling this method on a backup that does not exist will + # result in a NOT_FOUND error if the user has + # `spanner.backups.list` permission on the containing instance. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts creating a new Cloud Spanner Backup. + # The returned backup {::Google::Longrunning::Operation long-running operation} + # will have a name of the format + # `projects//instances//backups//operations/` + # and can be used to track creation of the backup. The + # {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. + # The {::Google::Longrunning::Operation#response response} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. + # Cancelling the returned operation will stop the creation and delete the + # backup. There can be only one pending backup creation per database. Backup + # creation of different databases can run concurrently. + # + # @overload create_backup(request, options = nil) + # Pass arguments to `create_backup` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_backup(parent: nil, backup_id: nil, backup: nil, encryption_config: nil) + # Pass arguments to `create_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the instance in which the backup will be + # created. This must be the same instance that contains the database the + # backup will be created from. The backup will be stored in the + # location(s) specified in the instance configuration of this + # instance. Values are of the form + # `projects//instances/`. + # @param backup_id [::String] + # Required. The id of the backup to be created. The `backup_id` appended to + # `parent` forms the full backup name of the form + # `projects//instances//backups/`. + # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash] + # Required. The backup to create. + # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig, ::Hash] + # Optional. The encryption configuration used to encrypt the backup. If this + # field is not specified, the backup will use the same encryption + # configuration as the database by default, namely + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} + # = `USE_DATABASE_ENCRYPTION`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new + # + # # Call the create_backup method. + # result = client.create_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :create_backup, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts copying a Cloud Spanner Backup. + # The returned backup {::Google::Longrunning::Operation long-running operation} + # will have a name of the format + # `projects//instances//backups//operations/` + # and can be used to track copying of the backup. The operation is associated + # with the destination backup. + # The {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}. + # The {::Google::Longrunning::Operation#response response} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. + # Cancelling the returned operation will stop the copying and delete the + # destination backup. Concurrent CopyBackup requests can run on the same + # source backup. + # + # @overload copy_backup(request, options = nil) + # Pass arguments to `copy_backup` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload copy_backup(parent: nil, backup_id: nil, source_backup: nil, expire_time: nil, encryption_config: nil) + # Pass arguments to `copy_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the destination instance that will contain the backup + # copy. Values are of the form: `projects//instances/`. + # @param backup_id [::String] + # Required. The id of the backup copy. + # The `backup_id` appended to `parent` forms the full backup_uri of the form + # `projects//instances//backups/`. + # @param source_backup [::String] + # Required. The source backup to be copied. + # The source backup needs to be in READY state for it to be copied. + # Once CopyBackup is in progress, the source backup cannot be deleted or + # cleaned up on expiration until CopyBackup is finished. + # Values are of the form: + # `projects//instances//backups/`. + # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The expiration time of the backup in microsecond granularity. + # The expiration time must be at least 6 hours and at most 366 days + # from the `create_time` of the source backup. Once the `expire_time` has + # passed, the backup is eligible to be automatically deleted by Cloud Spanner + # to free the resources used by the backup. + # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig, ::Hash] + # Optional. The encryption configuration used to encrypt the backup. If this + # field is not specified, the backup will use the same encryption + # configuration as the source backup by default, namely + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type} + # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new + # + # # Call the copy_backup method. + # result = client.copy_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def copy_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.copy_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.copy_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.copy_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :copy_backup, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata on a pending or completed + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup(name: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup. + # Values are of the form + # `projects//instances//backups/`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :get_backup, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a pending or completed + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_backup(backup: nil, update_mask: nil) + # Pass arguments to `update_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash] + # Required. The backup to update. `backup.name`, and the fields to be updated + # as specified by `update_mask` are required. Other fields are ignored. + # Update is only supported for the following fields: + # * `backup.expire_time`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask specifying which fields (e.g. `expire_time`) in the + # Backup resource should be updated. This mask is relative to the Backup + # resource, not to the request message. The field mask must always be + # specified; this prevents any future fields from being erased accidentally + # by clients that do not know about them. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_backup request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. + # p result + # + def update_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup&.name + header_params["backup.name"] = request.backup.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :update_backup, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a pending or completed + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup(name: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup to delete. + # Values are of the form + # `projects//instances//backups/`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists completed and pending backups. + # Backups returned are ordered by `create_time` in descending order, + # starting from the most recent `create_time`. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backups(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance to list backups from. Values are of the + # form `projects//instances/`. + # @param filter [::String] + # An expression that filters the list of returned backups. + # + # A filter expression consists of a field name, a comparison operator, and a + # value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for + # filtering: + # + # * `name` + # * `database` + # * `state` + # * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + # * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + # * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + # * `size_bytes` + # * `backup_schedules` + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic, but + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `name:Howl` - The backup's name contains the string "howl". + # * `database:prod` + # - The database's name contains the string "prod". + # * `state:CREATING` - The backup is pending creation. + # * `state:READY` - The backup is fully created and ready for use. + # * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + # - The backup name contains the string "howl" and `create_time` + # of the backup is before 2018-03-28T14:50:00Z. + # * `expire_time < \"2018-03-28T14:50:00Z\"` + # - The backup `expire_time` is before 2018-03-28T14:50:00Z. + # * `size_bytes > 10000000000` - The backup's size is greater than 10GB + # * `backup_schedules:daily` + # - The backup is created from a schedule with "daily" in its name. + # @param page_size [::Integer] + # Number of backups to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} + # to the same `parent` and with the same `filter`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Backup. + # p item + # end + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :list_backups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_backups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a new database by restoring from a completed backup. The new + # database must be in the same project and in an instance with the same + # instance configuration as the instance containing + # the backup. The returned database [long-running + # operation][google.longrunning.Operation] has a name of the format + # `projects//instances//databases//operations/`, + # and can be used to track the progress of the operation, and to cancel it. + # The {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} type + # is {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if + # successful. Cancelling the returned operation will stop the restore and + # delete the database. + # There can be only one database being restored into an instance at a time. + # Once the restore operation completes, a new restore operation can be + # initiated, without waiting for the optimize operation associated with the + # first restore to complete. + # + # @overload restore_database(request, options = nil) + # Pass arguments to `restore_database` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil) + # Pass arguments to `restore_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the instance in which to create the + # restored database. This instance must be in the same project and + # have the same instance configuration as the instance containing + # the source backup. Values are of the form + # `projects//instances/`. + # @param database_id [::String] + # Required. The id of the database to create and restore to. This + # database must not already exist. The `database_id` appended to + # `parent` forms the full database name of the form + # `projects//instances//databases/`. + # @param backup [::String] + # Name of the backup from which to restore. Values are of the form + # `projects//instances//backups/`. + # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig, ::Hash] + # Optional. An encryption configuration describing the encryption type and + # key resources in Cloud KMS used to encrypt/decrypt the database to restore + # to. If this field is not specified, the restored database will use the same + # encryption configuration as the backup by default, namely + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} + # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new + # + # # Call the restore_database method. + # result = client.restore_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restore_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.restore_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restore_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :restore_database, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists database {::Google::Longrunning::Operation longrunning-operations}. + # A database operation has a name of the form + # `projects//instances//databases//operations/`. + # The long-running operation + # {::Google::Longrunning::Operation#metadata metadata} field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. + # + # @overload list_database_operations(request, options = nil) + # Pass arguments to `list_database_operations` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_database_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_database_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance of the database operations. + # Values are of the form `projects//instances/`. + # @param filter [::String] + # An expression that filters the list of returned operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the {::Google::Longrunning::Operation Operation} + # are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} + # is + # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first, if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic. However, + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + # `(metadata.source_type:BACKUP) AND` \ + # `(metadata.backup_info.backup:backup_howl) AND` \ + # `(metadata.name:restored_howl) AND` \ + # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Return operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. + # * The database is restored from a backup. + # * The backup name contains "backup_howl". + # * The restored database's name contains "restored_howl". + # * The operation started before 2018-03-28T14:50:00Z. + # * The operation resulted in an error. + # @param page_size [::Integer] + # Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} + # to the same `parent` and with the same `filter`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new + # + # # Call the list_database_operations method. + # result = client.list_database_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_database_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_database_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_database_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_database_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :list_database_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_database_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the backup {::Google::Longrunning::Operation long-running operations} in + # the given instance. A backup operation has a name of the form + # `projects//instances//backups//operations/`. + # The long-running operation + # {::Google::Longrunning::Operation#metadata metadata} field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. Operations returned are ordered by + # `operation.metadata.value.progress.start_time` in descending order starting + # from the most recently started operation. + # + # @overload list_backup_operations(request, options = nil) + # Pass arguments to `list_backup_operations` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance of the backup operations. Values are of + # the form `projects//instances/`. + # @param filter [::String] + # An expression that filters the list of returned backup operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the {::Google::Longrunning::Operation operation} + # are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} + # is + # `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic, but + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + # `metadata.database:prod` - Returns operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. + # * The source database name of backup contains the string "prod". + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + # `(metadata.name:howl) AND` \ + # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Returns operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. + # * The backup name contains the string "howl". + # * The operation started before 2018-03-28T14:50:00Z. + # * The operation resulted in an error. + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + # `(metadata.source_backup:test) AND` \ + # `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + # `(error:*)` - Returns operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}. + # * The source backup name contains the string "test". + # * The operation started before 2022-01-18T14:50:00Z. + # * The operation resulted in an error. + # * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + # `(metadata.database:test_db)) OR` \ + # `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + # AND` \ + # `(metadata.source_backup:test_bkp)) AND` \ + # `(error:*)` - Returns operations where: + # * The operation's metadata matches either of criteria: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} + # AND the source database name of the backup contains the string + # "test_db" + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata} + # AND the source backup name contains the string "test_bkp" + # * The operation resulted in an error. + # @param page_size [::Integer] + # Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} + # to the same `parent` and with the same `filter`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new + # + # # Call the list_backup_operations method. + # result = client.list_backup_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_backup_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backup_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backup_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :list_backup_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_backup_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Cloud Spanner database roles. + # + # @overload list_database_roles(request, options = nil) + # Pass arguments to `list_database_roles` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_database_roles(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_database_roles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The database whose roles should be listed. + # Values are of the form + # `projects//instances//databases/`. + # @param page_size [::Integer] + # Number of database roles to be returned in the response. If 0 or less, + # defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new + # + # # Call the list_database_roles method. + # result = client.list_database_roles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole. + # p item + # end + # + def list_database_roles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_database_roles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_database_roles.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_database_roles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :list_database_roles, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_database_roles, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds split points to specified tables, indexes of a database. + # + # @overload add_split_points(request, options = nil) + # Pass arguments to `add_split_points` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload add_split_points(database: nil, split_points: nil, initiator: nil) + # Pass arguments to `add_split_points` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database on whose tables/indexes split points are to be + # added. Values are of the form + # `projects//instances//databases/`. + # @param split_points [::Array<::Google::Cloud::Spanner::Admin::Database::V1::SplitPoints, ::Hash>] + # Required. The split points to add. + # @param initiator [::String] + # Optional. A user-supplied tag associated with the split points. + # For example, "intital_data_load", "special_event_1". + # Defaults to "CloudAddSplitPointsAPI" if not specified. + # The length of the tag must not exceed 50 characters,else will be trimmed. + # Only valid UTF8 characters are allowed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new + # + # # Call the add_split_points method. + # result = client.add_split_points request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse. + # p result + # + def add_split_points request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.add_split_points.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.add_split_points.timeout, + metadata: metadata, + retry_policy: @config.rpcs.add_split_points.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :add_split_points, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new backup schedule. + # + # @overload create_backup_schedule(request, options = nil) + # Pass arguments to `create_backup_schedule` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_backup_schedule(parent: nil, backup_schedule_id: nil, backup_schedule: nil) + # Pass arguments to `create_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the database that this backup schedule applies to. + # @param backup_schedule_id [::String] + # Required. The Id to use for the backup schedule. The `backup_schedule_id` + # appended to `parent` forms the full backup schedule name of the form + # `projects//instances//databases//backupSchedules/`. + # @param backup_schedule [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule, ::Hash] + # Required. The backup schedule to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new + # + # # Call the create_backup_schedule method. + # result = client.create_backup_schedule request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + # p result + # + def create_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_backup_schedule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :create_backup_schedule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets backup schedule for the input schedule name. + # + # @overload get_backup_schedule(request, options = nil) + # Pass arguments to `get_backup_schedule` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_schedule(name: nil) + # Pass arguments to `get_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the schedule to retrieve. + # Values are of the form + # `projects//instances//databases//backupSchedules/`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new + # + # # Call the get_backup_schedule method. + # result = client.get_backup_schedule request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + # p result + # + def get_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_backup_schedule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :get_backup_schedule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a backup schedule. + # + # @overload update_backup_schedule(request, options = nil) + # Pass arguments to `update_backup_schedule` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_backup_schedule(backup_schedule: nil, update_mask: nil) + # Pass arguments to `update_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_schedule [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule, ::Hash] + # Required. The backup schedule to update. `backup_schedule.name`, and the + # fields to be updated as specified by `update_mask` are required. Other + # fields are ignored. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask specifying which fields in the BackupSchedule resource + # should be updated. This mask is relative to the BackupSchedule resource, + # not to the request message. The field mask must always be + # specified; this prevents any future fields from being erased + # accidentally. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new + # + # # Call the update_backup_schedule method. + # result = client.update_backup_schedule request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + # p result + # + def update_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup_schedule&.name + header_params["backup_schedule.name"] = request.backup_schedule.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_backup_schedule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :update_backup_schedule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a backup schedule. + # + # @overload delete_backup_schedule(request, options = nil) + # Pass arguments to `delete_backup_schedule` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup_schedule(name: nil) + # Pass arguments to `delete_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the schedule to delete. + # Values are of the form + # `projects//instances//databases//backupSchedules/`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new + # + # # Call the delete_backup_schedule method. + # result = client.delete_backup_schedule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_backup_schedule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :delete_backup_schedule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the backup schedules for the database. + # + # @overload list_backup_schedules(request, options = nil) + # Pass arguments to `list_backup_schedules` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_schedules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_schedules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Database is the parent resource whose backup schedules should be + # listed. Values are of the form + # projects//instances//databases/ + # @param page_size [::Integer] + # Optional. Number of backup schedules to be returned in the response. If 0 + # or less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # Optional. If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse ListBackupSchedulesResponse} + # to the same `parent`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new + # + # # Call the list_backup_schedules method. + # result = client.list_backup_schedules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + # p item + # end + # + def list_backup_schedules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_backup_schedules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_backup_schedules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_schedules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :list_backup_schedules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_backup_schedules, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # This is an internal API called by Spanner Graph jobs. You should never need + # to call this API directly. + # + # @overload internal_update_graph_operation(request, options = nil) + # Pass arguments to `internal_update_graph_operation` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload internal_update_graph_operation(database: nil, operation_id: nil, vm_identity_token: nil, progress: nil, status: nil) + # Pass arguments to `internal_update_graph_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Internal field, do not use directly. + # @param operation_id [::String] + # Internal field, do not use directly. + # @param vm_identity_token [::String] + # Internal field, do not use directly. + # @param progress [::Float] + # Internal field, do not use directly. + # @param status [::Google::Rpc::Status, ::Hash] + # Internal field, do not use directly. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new + # + # # Call the internal_update_graph_operation method. + # result = client.internal_update_graph_operation request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse. + # p result + # + def internal_update_graph_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.internal_update_graph_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.internal_update_graph_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.internal_update_graph_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.call_rpc :internal_update_graph_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DatabaseAdmin API. + # + # This class represents the configuration for DatabaseAdmin, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_databases to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_databases.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_databases.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "spanner.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DatabaseAdmin API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_databases` + # @return [::Gapic::Config::Method] + # + attr_reader :list_databases + ## + # RPC-specific configuration for `create_database` + # @return [::Gapic::Config::Method] + # + attr_reader :create_database + ## + # RPC-specific configuration for `get_database` + # @return [::Gapic::Config::Method] + # + attr_reader :get_database + ## + # RPC-specific configuration for `update_database` + # @return [::Gapic::Config::Method] + # + attr_reader :update_database + ## + # RPC-specific configuration for `update_database_ddl` + # @return [::Gapic::Config::Method] + # + attr_reader :update_database_ddl + ## + # RPC-specific configuration for `drop_database` + # @return [::Gapic::Config::Method] + # + attr_reader :drop_database + ## + # RPC-specific configuration for `get_database_ddl` + # @return [::Gapic::Config::Method] + # + attr_reader :get_database_ddl + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `create_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup + ## + # RPC-specific configuration for `copy_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :copy_backup + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `update_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `restore_database` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_database + ## + # RPC-specific configuration for `list_database_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_database_operations + ## + # RPC-specific configuration for `list_backup_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_operations + ## + # RPC-specific configuration for `list_database_roles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_database_roles + ## + # RPC-specific configuration for `add_split_points` + # @return [::Gapic::Config::Method] + # + attr_reader :add_split_points + ## + # RPC-specific configuration for `create_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_schedule + ## + # RPC-specific configuration for `get_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_schedule + ## + # RPC-specific configuration for `update_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_schedule + ## + # RPC-specific configuration for `delete_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_schedule + ## + # RPC-specific configuration for `list_backup_schedules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_schedules + ## + # RPC-specific configuration for `internal_update_graph_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :internal_update_graph_operation + + # @private + def initialize parent_rpcs = nil + list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases + @list_databases = ::Gapic::Config::Method.new list_databases_config + create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database + @create_database = ::Gapic::Config::Method.new create_database_config + get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database + @get_database = ::Gapic::Config::Method.new get_database_config + update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database + @update_database = ::Gapic::Config::Method.new update_database_config + update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl + @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config + drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database + @drop_database = ::Gapic::Config::Method.new drop_database_config + get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl + @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup + @create_backup = ::Gapic::Config::Method.new create_backup_config + copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup + @copy_backup = ::Gapic::Config::Method.new copy_backup_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup + @update_backup = ::Gapic::Config::Method.new update_backup_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database + @restore_database = ::Gapic::Config::Method.new restore_database_config + list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations + @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config + list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations + @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config + list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles + @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config + add_split_points_config = parent_rpcs.add_split_points if parent_rpcs.respond_to? :add_split_points + @add_split_points = ::Gapic::Config::Method.new add_split_points_config + create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule + @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config + get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule + @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config + update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule + @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config + delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule + @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config + list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules + @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config + internal_update_graph_operation_config = parent_rpcs.internal_update_graph_operation if parent_rpcs.respond_to? :internal_update_graph_operation + @internal_update_graph_operation = ::Gapic::Config::Method.new internal_update_graph_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb new file mode 100644 index 000000000000..b3c941a3dbff --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + module DatabaseAdmin + # Credentials for the DatabaseAdmin API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + self.env_vars = [ + "SPANNER_CREDENTIALS", + "SPANNER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SPANNER_CREDENTIALS_JSON", + "SPANNER_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb new file mode 100644 index 000000000000..1ab3e2d17a2c --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb @@ -0,0 +1,847 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + module DatabaseAdmin + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DatabaseAdmin Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DatabaseAdmin Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "spanner.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb new file mode 100644 index 000000000000..ca3d3e310737 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb @@ -0,0 +1,176 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + module DatabaseAdmin + # Path helper methods for the DatabaseAdmin API. + module Paths + ## + # Create a fully-qualified Backup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}/backups/{backup}` + # + # @param project [String] + # @param instance [String] + # @param backup [String] + # + # @return [::String] + def backup_path project:, instance:, backup: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/instances/#{instance}/backups/#{backup}" + end + + ## + # Create a fully-qualified BackupSchedule resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}/databases/{database}/backupSchedules/{schedule}` + # + # @param project [String] + # @param instance [String] + # @param database [String] + # @param schedule [String] + # + # @return [::String] + def backup_schedule_path project:, instance:, database:, schedule: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" + + "projects/#{project}/instances/#{instance}/databases/#{database}/backupSchedules/#{schedule}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # Create a fully-qualified CryptoKeyVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # @param crypto_key_version [String] + # + # @return [::String] + def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" + end + + ## + # Create a fully-qualified Database resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}/databases/{database}` + # + # @param project [String] + # @param instance [String] + # @param database [String] + # + # @return [::String] + def database_path project:, instance:, database: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/instances/#{instance}/databases/#{database}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}` + # + # @param project [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/instances/#{instance}" + end + + ## + # Create a fully-qualified InstancePartition resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` + # + # @param project [String] + # @param instance [String] + # @param instance_partition [String] + # + # @return [::String] + def instance_partition_path project:, instance:, instance_partition: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/instances/#{instance}/instancePartitions/#{instance_partition}" + end + + extend self + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb new file mode 100644 index 000000000000..1d9a8d24707b --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/spanner/admin/database/v1/version" + +require "google/cloud/spanner/admin/database/v1/database_admin/credentials" +require "google/cloud/spanner/admin/database/v1/database_admin/paths" +require "google/cloud/spanner/admin/database/v1/database_admin/rest/operations" +require "google/cloud/spanner/admin/database/v1/database_admin/rest/client" + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + ## + # Cloud Spanner Database Admin API + # + # The Cloud Spanner Database Admin API can be used to: + # * create, drop, and list databases + # * update the schema of pre-existing databases + # * create, delete, copy and list backups for a database + # * restore a database from an existing backup + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/spanner/admin/database/v1/database_admin/rest" + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + module DatabaseAdmin + # Client for the REST transport + module Rest + end + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/spanner/admin/database/v1/database_admin/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb new file mode 100644 index 000000000000..d691caea026c --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb @@ -0,0 +1,3340 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/spanner/admin/database/v1/spanner_database_admin_pb" +require "google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub" + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + module DatabaseAdmin + module Rest + ## + # REST client for the DatabaseAdmin service. + # + # Cloud Spanner Database Admin API + # + # The Cloud Spanner Database Admin API can be used to: + # * create, drop, and list databases + # * update the schema of pre-existing databases + # * create, delete, copy and list backups for a database + # * restore a database from an existing backup + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :database_admin_stub + + ## + # Configure the DatabaseAdmin Client class. + # + # See {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DatabaseAdmin clients + # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Spanner", "Admin", "Database", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_databases.timeout = 3600.0 + default_config.rpcs.list_databases.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_database.timeout = 3600.0 + + default_config.rpcs.get_database.timeout = 3600.0 + default_config.rpcs.get_database.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_database.timeout = 3600.0 + default_config.rpcs.update_database.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_database_ddl.timeout = 3600.0 + default_config.rpcs.update_database_ddl.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.drop_database.timeout = 3600.0 + default_config.rpcs.drop_database.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_database_ddl.timeout = 3600.0 + default_config.rpcs.get_database_ddl.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.set_iam_policy.timeout = 30.0 + + default_config.rpcs.get_iam_policy.timeout = 30.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.test_iam_permissions.timeout = 30.0 + + default_config.rpcs.create_backup.timeout = 3600.0 + + default_config.rpcs.copy_backup.timeout = 3600.0 + + default_config.rpcs.get_backup.timeout = 3600.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_backup.timeout = 3600.0 + default_config.rpcs.update_backup.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_backup.timeout = 3600.0 + default_config.rpcs.delete_backup.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_backups.timeout = 3600.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.restore_database.timeout = 3600.0 + + default_config.rpcs.list_database_operations.timeout = 3600.0 + default_config.rpcs.list_database_operations.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_backup_operations.timeout = 3600.0 + default_config.rpcs.list_backup_operations.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_database_roles.timeout = 3600.0 + default_config.rpcs.list_database_roles.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.add_split_points.timeout = 3600.0 + default_config.rpcs.add_split_points.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_backup_schedule.timeout = 3600.0 + default_config.rpcs.create_backup_schedule.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_backup_schedule.timeout = 3600.0 + default_config.rpcs.get_backup_schedule.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_backup_schedule.timeout = 3600.0 + default_config.rpcs.update_backup_schedule.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_backup_schedule.timeout = 3600.0 + default_config.rpcs.delete_backup_schedule.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_backup_schedules.timeout = 3600.0 + default_config.rpcs.list_backup_schedules.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DatabaseAdmin Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @database_admin_stub.universe_domain + end + + ## + # Create a new DatabaseAdmin REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DatabaseAdmin client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @database_admin_stub = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @database_admin_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @database_admin_stub.logger + end + + # Service calls + + ## + # Lists Cloud Spanner databases. + # + # @overload list_databases(request, options = nil) + # Pass arguments to `list_databases` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_databases(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_databases` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance whose databases should be listed. + # Values are of the form `projects//instances/`. + # @param page_size [::Integer] + # Number of databases to be returned in the response. If 0 or less, + # defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new + # + # # Call the list_databases method. + # result = client.list_databases request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Database. + # p item + # end + # + def list_databases request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_databases.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_databases.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_databases.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.list_databases request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_databases, "databases", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new Cloud Spanner database and starts to prepare it for serving. + # The returned {::Google::Longrunning::Operation long-running operation} will + # have a name of the format `/operations/` and + # can be used to track preparation of the database. The + # {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful. + # + # @overload create_database(request, options = nil) + # Pass arguments to `create_database` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_database(parent: nil, create_statement: nil, extra_statements: nil, encryption_config: nil, database_dialect: nil, proto_descriptors: nil) + # Pass arguments to `create_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the instance that will serve the new database. + # Values are of the form `projects//instances/`. + # @param create_statement [::String] + # Required. A `CREATE DATABASE` statement, which specifies the ID of the + # new database. The database ID must conform to the regular expression + # `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length. + # If the database ID is a reserved word or if it contains a hyphen, the + # database ID must be enclosed in backticks (`` ` ``). + # @param extra_statements [::Array<::String>] + # Optional. A list of DDL statements to run inside the newly created + # database. Statements can create tables, indexes, etc. These + # statements execute atomically with the creation of the database: + # if there is an error in any statement, the database is not created. + # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig, ::Hash] + # Optional. The encryption configuration for the database. If this field is + # not specified, Cloud Spanner will encrypt/decrypt all data at rest using + # Google default encryption. + # @param database_dialect [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect] + # Optional. The dialect of the Cloud Spanner Database. + # @param proto_descriptors [::String] + # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in + # 'extra_statements' above. + # Contains a protobuf-serialized + # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). + # To generate it, [install](https://grpc.io/docs/protoc-installation/) and + # run `protoc` with --include_imports and --descriptor_set_out. For example, + # to generate for moon/shot/app.proto, run + # ``` + # $protoc --proto_path=/app_path --proto_path=/lib_path \ + # --include_imports \ + # --descriptor_set_out=descriptors.data \ + # moon/shot/app.proto + # ``` + # For more details, see protobuffer [self + # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new + # + # # Call the create_database method. + # result = client.create_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.create_database request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the state of a Cloud Spanner database. + # + # @overload get_database(request, options = nil) + # Pass arguments to `get_database` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_database(name: nil) + # Pass arguments to `get_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the requested database. Values are of the form + # `projects//instances//databases/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Database] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Database] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new + # + # # Call the get_database method. + # result = client.get_database request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Database. + # p result + # + def get_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.get_database request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Cloud Spanner database. The returned + # {::Google::Longrunning::Operation long-running operation} can be used to track + # the progress of updating the database. If the named database does not + # exist, returns `NOT_FOUND`. + # + # While the operation is pending: + # + # * The database's + # {::Google::Cloud::Spanner::Admin::Database::V1::Database#reconciling reconciling} + # field is set to true. + # * Cancelling the operation is best-effort. If the cancellation succeeds, + # the operation metadata's + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseMetadata#cancel_time cancel_time} + # is set, the updates are reverted, and the operation terminates with a + # `CANCELLED` status. + # * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error + # until the pending operation is done (returns successfully or with + # error). + # * Reading the database via the API continues to give the pre-request + # values. + # + # Upon completion of the returned operation: + # + # * The new values are in effect and readable via the API. + # * The database's + # {::Google::Cloud::Spanner::Admin::Database::V1::Database#reconciling reconciling} + # field becomes false. + # + # The returned {::Google::Longrunning::Operation long-running operation} will + # have a name of the format + # `projects//instances//databases//operations/` + # and can be used to track the database modification. The + # {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseMetadata UpdateDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful. + # + # @overload update_database(request, options = nil) + # Pass arguments to `update_database` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_database(database: nil, update_mask: nil) + # Pass arguments to `update_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::Google::Cloud::Spanner::Admin::Database::V1::Database, ::Hash] + # Required. The database to update. + # The `name` field of the database is of the form + # `projects//instances//databases/`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. Currently, only + # `enable_drop_protection` field can be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new + # + # # Call the update_database method. + # result = client.update_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.update_database request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the schema of a Cloud Spanner database by + # creating/altering/dropping tables, columns, indexes, etc. The returned + # {::Google::Longrunning::Operation long-running operation} will have a name of + # the format `/operations/` and can be used to + # track execution of the schema change(s). The + # {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}. + # The operation has no response. + # + # @overload update_database_ddl(request, options = nil) + # Pass arguments to `update_database_ddl` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_database_ddl(database: nil, statements: nil, operation_id: nil, proto_descriptors: nil, throughput_mode: nil) + # Pass arguments to `update_database_ddl` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database to update. + # @param statements [::Array<::String>] + # Required. DDL statements to be applied to the database. + # @param operation_id [::String] + # If empty, the new update request is assigned an + # automatically-generated operation ID. Otherwise, `operation_id` + # is used to construct the name of the resulting + # {::Google::Longrunning::Operation Operation}. + # + # Specifying an explicit operation ID simplifies determining + # whether the statements were executed in the event that the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client#update_database_ddl UpdateDatabaseDdl} + # call is replayed, or the return value is otherwise lost: the + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} + # and `operation_id` fields can be combined to form the + # {::Google::Longrunning::Operation#name name} of the resulting + # {::Google::Longrunning::Operation longrunning.Operation}: + # `/operations/`. + # + # `operation_id` should be unique within the database, and must be + # a valid identifier: `[a-z][a-z0-9_]*`. Note that + # automatically-generated operation IDs always begin with an + # underscore. If the named operation already exists, + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client#update_database_ddl UpdateDatabaseDdl} + # returns `ALREADY_EXISTS`. + # @param proto_descriptors [::String] + # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. + # Contains a protobuf-serialized + # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). + # To generate it, [install](https://grpc.io/docs/protoc-installation/) and + # run `protoc` with --include_imports and --descriptor_set_out. For example, + # to generate for moon/shot/app.proto, run + # ``` + # $protoc --proto_path=/app_path --proto_path=/lib_path \ + # --include_imports \ + # --descriptor_set_out=descriptors.data \ + # moon/shot/app.proto + # ``` + # For more details, see protobuffer [self + # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + # @param throughput_mode [::Boolean] + # Optional. This field is exposed to be used by the Spanner Migration Tool. + # For more details, see + # [SMT](https://github.com/GoogleCloudPlatform/spanner-migration-tool). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new + # + # # Call the update_database_ddl method. + # result = client.update_database_ddl request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_database_ddl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_database_ddl.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_database_ddl.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_database_ddl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.update_database_ddl request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Drops (aka deletes) a Cloud Spanner database. + # Completed backups for the database will be retained according to their + # `expire_time`. + # Note: Cloud Spanner might continue to accept requests for a few seconds + # after the database has been deleted. + # + # @overload drop_database(request, options = nil) + # Pass arguments to `drop_database` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload drop_database(database: nil) + # Pass arguments to `drop_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database to be dropped. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new + # + # # Call the drop_database method. + # result = client.drop_database request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def drop_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.drop_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.drop_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.drop_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.drop_database request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the schema of a Cloud Spanner database as a list of formatted + # DDL statements. This method does not show pending schema updates, those may + # be queried using the Operations API. + # + # @overload get_database_ddl(request, options = nil) + # Pass arguments to `get_database_ddl` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_database_ddl(database: nil) + # Pass arguments to `get_database_ddl` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database whose schema we wish to get. + # Values are of the form + # `projects//instances//databases/` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new + # + # # Call the get_database_ddl method. + # result = client.get_database_ddl request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse. + # p result + # + def get_database_ddl request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_database_ddl.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_database_ddl.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_database_ddl.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.get_database_ddl request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on a database or backup resource. + # Replaces any existing policy. + # + # Authorization requires `spanner.databases.setIamPolicy` + # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. + # For backups, authorization requires `spanner.backups.setIamPolicy` + # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for a database or backup resource. + # Returns an empty policy if a database or backup exists but does not have a + # policy set. + # + # Authorization requires `spanner.databases.getIamPolicy` permission on + # [resource][google.iam.v1.GetIamPolicyRequest.resource]. + # For backups, authorization requires `spanner.backups.getIamPolicy` + # permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that the caller has on the specified database or backup + # resource. + # + # Attempting this RPC on a non-existent Cloud Spanner database will + # result in a NOT_FOUND error if the user has + # `spanner.databases.list` permission on the containing Cloud + # Spanner instance. Otherwise returns an empty set of permissions. + # Calling this method on a backup that does not exist will + # result in a NOT_FOUND error if the user has + # `spanner.backups.list` permission on the containing instance. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts creating a new Cloud Spanner Backup. + # The returned backup {::Google::Longrunning::Operation long-running operation} + # will have a name of the format + # `projects//instances//backups//operations/` + # and can be used to track creation of the backup. The + # {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. + # The {::Google::Longrunning::Operation#response response} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. + # Cancelling the returned operation will stop the creation and delete the + # backup. There can be only one pending backup creation per database. Backup + # creation of different databases can run concurrently. + # + # @overload create_backup(request, options = nil) + # Pass arguments to `create_backup` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_backup(parent: nil, backup_id: nil, backup: nil, encryption_config: nil) + # Pass arguments to `create_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the instance in which the backup will be + # created. This must be the same instance that contains the database the + # backup will be created from. The backup will be stored in the + # location(s) specified in the instance configuration of this + # instance. Values are of the form + # `projects//instances/`. + # @param backup_id [::String] + # Required. The id of the backup to be created. The `backup_id` appended to + # `parent` forms the full backup name of the form + # `projects//instances//backups/`. + # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash] + # Required. The backup to create. + # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig, ::Hash] + # Optional. The encryption configuration used to encrypt the backup. If this + # field is not specified, the backup will use the same encryption + # configuration as the database by default, namely + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} + # = `USE_DATABASE_ENCRYPTION`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new + # + # # Call the create_backup method. + # result = client.create_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.create_backup request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts copying a Cloud Spanner Backup. + # The returned backup {::Google::Longrunning::Operation long-running operation} + # will have a name of the format + # `projects//instances//backups//operations/` + # and can be used to track copying of the backup. The operation is associated + # with the destination backup. + # The {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}. + # The {::Google::Longrunning::Operation#response response} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. + # Cancelling the returned operation will stop the copying and delete the + # destination backup. Concurrent CopyBackup requests can run on the same + # source backup. + # + # @overload copy_backup(request, options = nil) + # Pass arguments to `copy_backup` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload copy_backup(parent: nil, backup_id: nil, source_backup: nil, expire_time: nil, encryption_config: nil) + # Pass arguments to `copy_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the destination instance that will contain the backup + # copy. Values are of the form: `projects//instances/`. + # @param backup_id [::String] + # Required. The id of the backup copy. + # The `backup_id` appended to `parent` forms the full backup_uri of the form + # `projects//instances//backups/`. + # @param source_backup [::String] + # Required. The source backup to be copied. + # The source backup needs to be in READY state for it to be copied. + # Once CopyBackup is in progress, the source backup cannot be deleted or + # cleaned up on expiration until CopyBackup is finished. + # Values are of the form: + # `projects//instances//backups/`. + # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. The expiration time of the backup in microsecond granularity. + # The expiration time must be at least 6 hours and at most 366 days + # from the `create_time` of the source backup. Once the `expire_time` has + # passed, the backup is eligible to be automatically deleted by Cloud Spanner + # to free the resources used by the backup. + # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig, ::Hash] + # Optional. The encryption configuration used to encrypt the backup. If this + # field is not specified, the backup will use the same encryption + # configuration as the source backup by default, namely + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type} + # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new + # + # # Call the copy_backup method. + # result = client.copy_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def copy_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.copy_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.copy_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.copy_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.copy_backup request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets metadata on a pending or completed + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup(name: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup. + # Values are of the form + # `projects//instances//backups/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.get_backup request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a pending or completed + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_backup(backup: nil, update_mask: nil) + # Pass arguments to `update_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash] + # Required. The backup to update. `backup.name`, and the fields to be updated + # as specified by `update_mask` are required. Other fields are ignored. + # Update is only supported for the following fields: + # * `backup.expire_time`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask specifying which fields (e.g. `expire_time`) in the + # Backup resource should be updated. This mask is relative to the Backup + # resource, not to the request message. The field mask must always be + # specified; this prevents any future fields from being erased accidentally + # by clients that do not know about them. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_backup request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. + # p result + # + def update_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.update_backup request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a pending or completed + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup(name: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup to delete. + # Values are of the form + # `projects//instances//backups/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.delete_backup request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists completed and pending backups. + # Backups returned are ordered by `create_time` in descending order, + # starting from the most recent `create_time`. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backups(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance to list backups from. Values are of the + # form `projects//instances/`. + # @param filter [::String] + # An expression that filters the list of returned backups. + # + # A filter expression consists of a field name, a comparison operator, and a + # value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for + # filtering: + # + # * `name` + # * `database` + # * `state` + # * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + # * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + # * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + # * `size_bytes` + # * `backup_schedules` + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic, but + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `name:Howl` - The backup's name contains the string "howl". + # * `database:prod` + # - The database's name contains the string "prod". + # * `state:CREATING` - The backup is pending creation. + # * `state:READY` - The backup is fully created and ready for use. + # * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + # - The backup name contains the string "howl" and `create_time` + # of the backup is before 2018-03-28T14:50:00Z. + # * `expire_time < \"2018-03-28T14:50:00Z\"` + # - The backup `expire_time` is before 2018-03-28T14:50:00Z. + # * `size_bytes > 10000000000` - The backup's size is greater than 10GB + # * `backup_schedules:daily` + # - The backup is created from a schedule with "daily" in its name. + # @param page_size [::Integer] + # Number of backups to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} + # to the same `parent` and with the same `filter`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Backup. + # p item + # end + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.list_backups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_backups, "backups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a new database by restoring from a completed backup. The new + # database must be in the same project and in an instance with the same + # instance configuration as the instance containing + # the backup. The returned database [long-running + # operation][google.longrunning.Operation] has a name of the format + # `projects//instances//databases//operations/`, + # and can be used to track the progress of the operation, and to cancel it. + # The {::Google::Longrunning::Operation#metadata metadata} field type is + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} type + # is {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if + # successful. Cancelling the returned operation will stop the restore and + # delete the database. + # There can be only one database being restored into an instance at a time. + # Once the restore operation completes, a new restore operation can be + # initiated, without waiting for the optimize operation associated with the + # first restore to complete. + # + # @overload restore_database(request, options = nil) + # Pass arguments to `restore_database` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil) + # Pass arguments to `restore_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the instance in which to create the + # restored database. This instance must be in the same project and + # have the same instance configuration as the instance containing + # the source backup. Values are of the form + # `projects//instances/`. + # @param database_id [::String] + # Required. The id of the database to create and restore to. This + # database must not already exist. The `database_id` appended to + # `parent` forms the full database name of the form + # `projects//instances//databases/`. + # @param backup [::String] + # Name of the backup from which to restore. Values are of the form + # `projects//instances//backups/`. + # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig, ::Hash] + # Optional. An encryption configuration describing the encryption type and + # key resources in Cloud KMS used to encrypt/decrypt the database to restore + # to. If this field is not specified, the restored database will use the same + # encryption configuration as the backup by default, namely + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} + # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new + # + # # Call the restore_database method. + # result = client.restore_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restore_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.restore_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restore_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.restore_database request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists database {::Google::Longrunning::Operation longrunning-operations}. + # A database operation has a name of the form + # `projects//instances//databases//operations/`. + # The long-running operation + # {::Google::Longrunning::Operation#metadata metadata} field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. + # + # @overload list_database_operations(request, options = nil) + # Pass arguments to `list_database_operations` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_database_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_database_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance of the database operations. + # Values are of the form `projects//instances/`. + # @param filter [::String] + # An expression that filters the list of returned operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the {::Google::Longrunning::Operation Operation} + # are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} + # is + # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first, if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic. However, + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + # `(metadata.source_type:BACKUP) AND` \ + # `(metadata.backup_info.backup:backup_howl) AND` \ + # `(metadata.name:restored_howl) AND` \ + # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Return operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. + # * The database is restored from a backup. + # * The backup name contains "backup_howl". + # * The restored database's name contains "restored_howl". + # * The operation started before 2018-03-28T14:50:00Z. + # * The operation resulted in an error. + # @param page_size [::Integer] + # Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} + # to the same `parent` and with the same `filter`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new + # + # # Call the list_database_operations method. + # result = client.list_database_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_database_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_database_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_database_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_database_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.list_database_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_database_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the backup {::Google::Longrunning::Operation long-running operations} in + # the given instance. A backup operation has a name of the form + # `projects//instances//backups//operations/`. + # The long-running operation + # {::Google::Longrunning::Operation#metadata metadata} field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. Operations returned are ordered by + # `operation.metadata.value.progress.start_time` in descending order starting + # from the most recently started operation. + # + # @overload list_backup_operations(request, options = nil) + # Pass arguments to `list_backup_operations` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance of the backup operations. Values are of + # the form `projects//instances/`. + # @param filter [::String] + # An expression that filters the list of returned backup operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the {::Google::Longrunning::Operation operation} + # are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} + # is + # `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic, but + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + # `metadata.database:prod` - Returns operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. + # * The source database name of backup contains the string "prod". + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + # `(metadata.name:howl) AND` \ + # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Returns operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. + # * The backup name contains the string "howl". + # * The operation started before 2018-03-28T14:50:00Z. + # * The operation resulted in an error. + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + # `(metadata.source_backup:test) AND` \ + # `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + # `(error:*)` - Returns operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}. + # * The source backup name contains the string "test". + # * The operation started before 2022-01-18T14:50:00Z. + # * The operation resulted in an error. + # * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + # `(metadata.database:test_db)) OR` \ + # `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + # AND` \ + # `(metadata.source_backup:test_bkp)) AND` \ + # `(error:*)` - Returns operations where: + # * The operation's metadata matches either of criteria: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} + # AND the source database name of the backup contains the string + # "test_db" + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata} + # AND the source backup name contains the string "test_bkp" + # * The operation resulted in an error. + # @param page_size [::Integer] + # Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} + # to the same `parent` and with the same `filter`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new + # + # # Call the list_backup_operations method. + # result = client.list_backup_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_backup_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backup_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backup_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.list_backup_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_backup_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Cloud Spanner database roles. + # + # @overload list_database_roles(request, options = nil) + # Pass arguments to `list_database_roles` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_database_roles(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_database_roles` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The database whose roles should be listed. + # Values are of the form + # `projects//instances//databases/`. + # @param page_size [::Integer] + # Number of database roles to be returned in the response. If 0 or less, + # defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new + # + # # Call the list_database_roles method. + # result = client.list_database_roles request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole. + # p item + # end + # + def list_database_roles request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_database_roles.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_database_roles.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_database_roles.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.list_database_roles request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_database_roles, "database_roles", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds split points to specified tables, indexes of a database. + # + # @overload add_split_points(request, options = nil) + # Pass arguments to `add_split_points` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload add_split_points(database: nil, split_points: nil, initiator: nil) + # Pass arguments to `add_split_points` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database on whose tables/indexes split points are to be + # added. Values are of the form + # `projects//instances//databases/`. + # @param split_points [::Array<::Google::Cloud::Spanner::Admin::Database::V1::SplitPoints, ::Hash>] + # Required. The split points to add. + # @param initiator [::String] + # Optional. A user-supplied tag associated with the split points. + # For example, "intital_data_load", "special_event_1". + # Defaults to "CloudAddSplitPointsAPI" if not specified. + # The length of the tag must not exceed 50 characters,else will be trimmed. + # Only valid UTF8 characters are allowed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new + # + # # Call the add_split_points method. + # result = client.add_split_points request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse. + # p result + # + def add_split_points request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.add_split_points.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.add_split_points.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.add_split_points.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.add_split_points request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new backup schedule. + # + # @overload create_backup_schedule(request, options = nil) + # Pass arguments to `create_backup_schedule` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_backup_schedule(parent: nil, backup_schedule_id: nil, backup_schedule: nil) + # Pass arguments to `create_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the database that this backup schedule applies to. + # @param backup_schedule_id [::String] + # Required. The Id to use for the backup schedule. The `backup_schedule_id` + # appended to `parent` forms the full backup schedule name of the form + # `projects//instances//databases//backupSchedules/`. + # @param backup_schedule [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule, ::Hash] + # Required. The backup schedule to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new + # + # # Call the create_backup_schedule method. + # result = client.create_backup_schedule request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + # p result + # + def create_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_backup_schedule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.create_backup_schedule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets backup schedule for the input schedule name. + # + # @overload get_backup_schedule(request, options = nil) + # Pass arguments to `get_backup_schedule` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_schedule(name: nil) + # Pass arguments to `get_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the schedule to retrieve. + # Values are of the form + # `projects//instances//databases//backupSchedules/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new + # + # # Call the get_backup_schedule method. + # result = client.get_backup_schedule request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + # p result + # + def get_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_backup_schedule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.get_backup_schedule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a backup schedule. + # + # @overload update_backup_schedule(request, options = nil) + # Pass arguments to `update_backup_schedule` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_backup_schedule(backup_schedule: nil, update_mask: nil) + # Pass arguments to `update_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_schedule [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule, ::Hash] + # Required. The backup schedule to update. `backup_schedule.name`, and the + # fields to be updated as specified by `update_mask` are required. Other + # fields are ignored. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask specifying which fields in the BackupSchedule resource + # should be updated. This mask is relative to the BackupSchedule resource, + # not to the request message. The field mask must always be + # specified; this prevents any future fields from being erased + # accidentally. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new + # + # # Call the update_backup_schedule method. + # result = client.update_backup_schedule request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + # p result + # + def update_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_backup_schedule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.update_backup_schedule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a backup schedule. + # + # @overload delete_backup_schedule(request, options = nil) + # Pass arguments to `delete_backup_schedule` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup_schedule(name: nil) + # Pass arguments to `delete_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the schedule to delete. + # Values are of the form + # `projects//instances//databases//backupSchedules/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new + # + # # Call the delete_backup_schedule method. + # result = client.delete_backup_schedule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_backup_schedule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.delete_backup_schedule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the backup schedules for the database. + # + # @overload list_backup_schedules(request, options = nil) + # Pass arguments to `list_backup_schedules` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_schedules(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_schedules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Database is the parent resource whose backup schedules should be + # listed. Values are of the form + # projects//instances//databases/ + # @param page_size [::Integer] + # Optional. Number of backup schedules to be returned in the response. If 0 + # or less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # Optional. If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse ListBackupSchedulesResponse} + # to the same `parent`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/database/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new + # + # # Call the list_backup_schedules method. + # result = client.list_backup_schedules request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + # p item + # end + # + def list_backup_schedules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_backup_schedules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_backup_schedules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_schedules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_admin_stub.list_backup_schedules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_backup_schedules, "backup_schedules", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the DatabaseAdmin REST API. + # + # This class represents the configuration for DatabaseAdmin REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_databases to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_databases.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_databases.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "spanner.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DatabaseAdmin API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_databases` + # @return [::Gapic::Config::Method] + # + attr_reader :list_databases + ## + # RPC-specific configuration for `create_database` + # @return [::Gapic::Config::Method] + # + attr_reader :create_database + ## + # RPC-specific configuration for `get_database` + # @return [::Gapic::Config::Method] + # + attr_reader :get_database + ## + # RPC-specific configuration for `update_database` + # @return [::Gapic::Config::Method] + # + attr_reader :update_database + ## + # RPC-specific configuration for `update_database_ddl` + # @return [::Gapic::Config::Method] + # + attr_reader :update_database_ddl + ## + # RPC-specific configuration for `drop_database` + # @return [::Gapic::Config::Method] + # + attr_reader :drop_database + ## + # RPC-specific configuration for `get_database_ddl` + # @return [::Gapic::Config::Method] + # + attr_reader :get_database_ddl + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `create_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup + ## + # RPC-specific configuration for `copy_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :copy_backup + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `update_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `restore_database` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_database + ## + # RPC-specific configuration for `list_database_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_database_operations + ## + # RPC-specific configuration for `list_backup_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_operations + ## + # RPC-specific configuration for `list_database_roles` + # @return [::Gapic::Config::Method] + # + attr_reader :list_database_roles + ## + # RPC-specific configuration for `add_split_points` + # @return [::Gapic::Config::Method] + # + attr_reader :add_split_points + ## + # RPC-specific configuration for `create_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_schedule + ## + # RPC-specific configuration for `get_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_schedule + ## + # RPC-specific configuration for `update_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_schedule + ## + # RPC-specific configuration for `delete_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_schedule + ## + # RPC-specific configuration for `list_backup_schedules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_schedules + + # @private + def initialize parent_rpcs = nil + list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases + @list_databases = ::Gapic::Config::Method.new list_databases_config + create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database + @create_database = ::Gapic::Config::Method.new create_database_config + get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database + @get_database = ::Gapic::Config::Method.new get_database_config + update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database + @update_database = ::Gapic::Config::Method.new update_database_config + update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl + @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config + drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database + @drop_database = ::Gapic::Config::Method.new drop_database_config + get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl + @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup + @create_backup = ::Gapic::Config::Method.new create_backup_config + copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup + @copy_backup = ::Gapic::Config::Method.new copy_backup_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup + @update_backup = ::Gapic::Config::Method.new update_backup_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database + @restore_database = ::Gapic::Config::Method.new restore_database_config + list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations + @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config + list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations + @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config + list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles + @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config + add_split_points_config = parent_rpcs.add_split_points if parent_rpcs.respond_to? :add_split_points + @add_split_points = ::Gapic::Config::Method.new add_split_points_config + create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule + @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config + get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule + @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config + update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule + @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config + delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule + @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config + list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules + @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb new file mode 100644 index 000000000000..59a81545701e --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb @@ -0,0 +1,1014 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + module DatabaseAdmin + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DatabaseAdmin Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the DatabaseAdmin Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "spanner.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb new file mode 100644 index 000000000000..1322d594b811 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb @@ -0,0 +1,1740 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/spanner/admin/database/v1/spanner_database_admin_pb" + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + module DatabaseAdmin + module Rest + ## + # REST service stub for the DatabaseAdmin service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_databases REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse] + # A result object deserialized from the server's reply + def list_databases request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_databases_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_databases", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_database REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_database_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_database", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_database REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Database] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Database] + # A result object deserialized from the server's reply + def get_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_database_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_database", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::Database.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_database REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_database_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_database", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_database_ddl REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_database_ddl request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_database_ddl_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_database_ddl", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the drop_database REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def drop_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_drop_database_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "drop_database", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_database_ddl REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] + # A result object deserialized from the server's reply + def get_database_ddl request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_database_ddl_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_database_ddl", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_backup REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the copy_backup REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def copy_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_copy_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "copy_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # A result object deserialized from the server's reply + def get_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_backup REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # A result object deserialized from the server's reply + def update_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backups REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse] + # A result object deserialized from the server's reply + def list_backups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the restore_database REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def restore_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restore_database_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "restore_database", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_database_operations REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse] + # A result object deserialized from the server's reply + def list_database_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_database_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_database_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backup_operations REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse] + # A result object deserialized from the server's reply + def list_backup_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backup_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_database_roles REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse] + # A result object deserialized from the server's reply + def list_database_roles request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_database_roles_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_database_roles", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the add_split_points REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] + # A result object deserialized from the server's reply + def add_split_points request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_add_split_points_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "add_split_points", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # A result object deserialized from the server's reply + def create_backup_schedule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_schedule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_backup_schedule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # A result object deserialized from the server's reply + def get_backup_schedule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_schedule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_backup_schedule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # A result object deserialized from the server's reply + def update_backup_schedule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_schedule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_backup_schedule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_backup_schedule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_schedule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_backup_schedule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_backup_schedules REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse] + # A result object deserialized from the server's reply + def list_backup_schedules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_schedules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_backup_schedules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_databases REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_databases_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/databases", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_database REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/databases", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_database REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_database REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{database.name}", + body: "database", + matches: [ + ["database.name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_database_ddl REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_database_ddl_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{database}/ddl", + body: "*", + matches: [ + ["database", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the drop_database REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_drop_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{database}", + matches: [ + ["database", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_database_ddl REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_database_ddl_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{database}/ddl", + matches: [ + ["database", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/databaseRoles/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backups", + body: "backup", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the copy_backup REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_copy_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backups:copy", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup.name}", + body: "backup", + matches: [ + ["backup.name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backups REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backups", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restore_database REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restore_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/databases:restore", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_database_operations REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_database_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/databaseOperations", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_operations REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupOperations", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_database_roles REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_database_roles_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/databaseRoles", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the add_split_points REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_add_split_points_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{database}:addSplitPoints", + body: "*", + matches: [ + ["database", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_backup_schedule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupSchedules", + body: "backup_schedule", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_schedule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_schedule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_schedule.name}", + body: "backup_schedule", + matches: [ + ["backup_schedule.name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_schedule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_schedules REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_schedules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupSchedules", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.rb new file mode 100644 index 000000000000..d33ad82d059e --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/spanner/admin/database/v1/database_admin/rest" +require "google/cloud/spanner/admin/database/v1/version" + +module Google + module Cloud + module Spanner + module Admin + module Database + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/spanner/admin/database/v1/rest" + # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new + # + module V1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb new file mode 100644 index 000000000000..112d0b089460 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + VERSION = "0.0.1" + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_pb.rb new file mode 100644 index 000000000000..6435707649ba --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/admin/database/v1/backup.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/spanner/admin/database/v1/common_pb' + + +descriptor_data = "\n-google/spanner/admin/database/v1/backup.proto\x12 google.spanner.admin.database.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a-google/spanner/admin/database/v1/common.proto\"\xed\t\n\x06\x42\x61\x63kup\x12\x36\n\x08\x64\x61tabase\x18\x02 \x01(\tB$\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x30\n\x0cversion_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12 \n\x13\x66reeable_size_bytes\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03\x12!\n\x14\x65xclusive_size_bytes\x18\x10 \x01(\x03\x42\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x06 \x01(\x0e\x32..google.spanner.admin.database.v1.Backup.StateB\x03\xe0\x41\x03\x12\x46\n\x15referencing_databases\x18\x07 \x03(\tB\'\xe0\x41\x03\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12N\n\x0f\x65ncryption_info\x18\x08 \x01(\x0b\x32\x30.google.spanner.admin.database.v1.EncryptionInfoB\x03\xe0\x41\x03\x12U\n\x16\x65ncryption_information\x18\r \x03(\x0b\x32\x30.google.spanner.admin.database.v1.EncryptionInfoB\x03\xe0\x41\x03\x12P\n\x10\x64\x61tabase_dialect\x18\n \x01(\x0e\x32\x31.google.spanner.admin.database.v1.DatabaseDialectB\x03\xe0\x41\x03\x12\x42\n\x13referencing_backups\x18\x0b \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x38\n\x0fmax_expire_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x10\x62\x61\x63kup_schedules\x18\x0e \x03(\tB-\xe0\x41\x03\xfa\x41\'\n%spanner.googleapis.com/BackupSchedule\x12(\n\x1bincremental_backup_chain_id\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12<\n\x13oldest_version_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x13instance_partitions\x18\x13 \x03(\x0b\x32\x39.google.spanner.admin.database.v1.BackupInstancePartitionB\x03\xe0\x41\x03\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02:\\\xea\x41Y\n\x1dspanner.googleapis.com/Backup\x12\x38projects/{project}/instances/{instance}/backups/{backup}\"\x85\x02\n\x13\x43reateBackupRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x16\n\tbackup_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x06\x62\x61\x63kup\x18\x03 \x01(\x0b\x32(.google.spanner.admin.database.v1.BackupB\x03\xe0\x41\x02\x12^\n\x11\x65ncryption_config\x18\x04 \x01(\x0b\x32>.google.spanner.admin.database.v1.CreateBackupEncryptionConfigB\x03\xe0\x41\x01\"\xf8\x01\n\x14\x43reateBackupMetadata\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x36\n\x08\x64\x61tabase\x18\x02 \x01(\tB$\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x45\n\x08progress\x18\x03 \x01(\x0b\x32\x33.google.spanner.admin.database.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xb6\x02\n\x11\x43opyBackupRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x16\n\tbackup_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\rsource_backup\x18\x03 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x34\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\\\n\x11\x65ncryption_config\x18\x05 \x01(\x0b\x32<.google.spanner.admin.database.v1.CopyBackupEncryptionConfigB\x03\xe0\x41\x01\"\xf9\x01\n\x12\x43opyBackupMetadata\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x39\n\rsource_backup\x18\x02 \x01(\tB\"\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x45\n\x08progress\x18\x03 \x01(\x0b\x32\x33.google.spanner.admin.database.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8a\x01\n\x13UpdateBackupRequest\x12=\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32(.google.spanner.admin.database.v1.BackupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"G\n\x10GetBackupRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\"J\n\x13\x44\x65leteBackupRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\"\x84\x01\n\x12ListBackupsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"i\n\x13ListBackupsResponse\x12\x39\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32(.google.spanner.admin.database.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8d\x01\n\x1bListBackupOperationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"j\n\x1cListBackupOperationsResponse\x12\x31\n\noperations\x18\x01 \x03(\x0b\x32\x1d.google.longrunning.Operation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe2\x01\n\nBackupInfo\x12\x32\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x30\n\x0cversion_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12=\n\x0fsource_database\x18\x03 \x01(\tB$\xfa\x41!\n\x1fspanner.googleapis.com/Database\"\x9f\x03\n\x1c\x43reateBackupEncryptionConfig\x12k\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32M.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionTypeB\x03\xe0\x41\x02\x12?\n\x0ckms_key_name\x18\x02 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12@\n\rkms_key_names\x18\x03 \x03(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\x8e\x01\n\x0e\x45ncryptionType\x12\x1f\n\x1b\x45NCRYPTION_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17USE_DATABASE_ENCRYPTION\x10\x01\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x02\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x03\"\xab\x03\n\x1a\x43opyBackupEncryptionConfig\x12i\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32K.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionTypeB\x03\xe0\x41\x02\x12?\n\x0ckms_key_name\x18\x02 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12@\n\rkms_key_names\x18\x03 \x03(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\x9e\x01\n\x0e\x45ncryptionType\x12\x1f\n\x1b\x45NCRYPTION_TYPE_UNSPECIFIED\x10\x00\x12+\n\'USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION\x10\x01\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x02\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x03\"\x10\n\x0e\x46ullBackupSpec\"\x17\n\x15IncrementalBackupSpec\"d\n\x17\x42\x61\x63kupInstancePartition\x12I\n\x12instance_partition\x18\x01 \x01(\tB-\xfa\x41*\n(spanner.googleapis.com/InstancePartitionB\xfd\x01\n$com.google.spanner.admin.database.v1B\x0b\x42\x61\x63kupProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Backup").msgclass + Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Backup.State").enummodule + CreateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupRequest").msgclass + CreateBackupMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupMetadata").msgclass + CopyBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CopyBackupRequest").msgclass + CopyBackupMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CopyBackupMetadata").msgclass + UpdateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateBackupRequest").msgclass + GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetBackupRequest").msgclass + DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DeleteBackupRequest").msgclass + ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupsRequest").msgclass + ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupsResponse").msgclass + ListBackupOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsRequest").msgclass + ListBackupOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsResponse").msgclass + BackupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupInfo").msgclass + CreateBackupEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupEncryptionConfig").msgclass + CreateBackupEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType").enummodule + CopyBackupEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CopyBackupEncryptionConfig").msgclass + CopyBackupEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType").enummodule + FullBackupSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.FullBackupSpec").msgclass + IncrementalBackupSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.IncrementalBackupSpec").msgclass + BackupInstancePartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupInstancePartition").msgclass + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_schedule_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_schedule_pb.rb new file mode 100644 index 000000000000..1a24f3b3670a --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_schedule_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/admin/database/v1/backup_schedule.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/spanner/admin/database/v1/backup_pb' + + +descriptor_data = "\n6google/spanner/admin/database/v1/backup_schedule.proto\x12 google.spanner.admin.database.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a-google/spanner/admin/database/v1/backup.proto\"i\n\x12\x42\x61\x63kupScheduleSpec\x12\x42\n\tcron_spec\x18\x01 \x01(\x0b\x32-.google.spanner.admin.database.v1.CrontabSpecH\x00\x42\x0f\n\rschedule_spec\"\xa4\x05\n\x0e\x42\x61\x63kupSchedule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12G\n\x04spec\x18\x06 \x01(\x0b\x32\x34.google.spanner.admin.database.v1.BackupScheduleSpecB\x03\xe0\x41\x01\x12:\n\x12retention_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12^\n\x11\x65ncryption_config\x18\x04 \x01(\x0b\x32>.google.spanner.admin.database.v1.CreateBackupEncryptionConfigB\x03\xe0\x41\x01\x12L\n\x10\x66ull_backup_spec\x18\x07 \x01(\x0b\x32\x30.google.spanner.admin.database.v1.FullBackupSpecH\x00\x12Z\n\x17incremental_backup_spec\x18\x08 \x01(\x0b\x32\x37.google.spanner.admin.database.v1.IncrementalBackupSpecH\x00\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xa5\x01\xea\x41\xa1\x01\n%spanner.googleapis.com/BackupSchedule\x12Wprojects/{project}/instances/{instance}/databases/{database}/backupSchedules/{schedule}*\x0f\x62\x61\x63kupSchedules2\x0e\x62\x61\x63kupScheduleB\x12\n\x10\x62\x61\x63kup_type_spec\"q\n\x0b\x43rontabSpec\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\ttime_zone\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x37\n\x0f\x63reation_window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\"\xc7\x01\n\x1b\x43reateBackupScheduleRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x1f\n\x12\x62\x61\x63kup_schedule_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\x0f\x62\x61\x63kup_schedule\x18\x03 \x01(\x0b\x32\x30.google.spanner.admin.database.v1.BackupScheduleB\x03\xe0\x41\x02\"W\n\x18GetBackupScheduleRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/BackupSchedule\"Z\n\x1b\x44\x65leteBackupScheduleRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/BackupSchedule\"\x86\x01\n\x1aListBackupSchedulesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\x1bListBackupSchedulesResponse\x12J\n\x10\x62\x61\x63kup_schedules\x18\x01 \x03(\x0b\x32\x30.google.spanner.admin.database.v1.BackupSchedule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa3\x01\n\x1bUpdateBackupScheduleRequest\x12N\n\x0f\x62\x61\x63kup_schedule\x18\x01 \x01(\x0b\x32\x30.google.spanner.admin.database.v1.BackupScheduleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x42\x85\x02\n$com.google.spanner.admin.database.v1B\x13\x42\x61\x63kupScheduleProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + BackupScheduleSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupScheduleSpec").msgclass + BackupSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupSchedule").msgclass + CrontabSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CrontabSpec").msgclass + CreateBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupScheduleRequest").msgclass + GetBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetBackupScheduleRequest").msgclass + DeleteBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DeleteBackupScheduleRequest").msgclass + ListBackupSchedulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupSchedulesRequest").msgclass + ListBackupSchedulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupSchedulesResponse").msgclass + UpdateBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateBackupScheduleRequest").msgclass + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/common_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/common_pb.rb new file mode 100644 index 000000000000..407157236bdf --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/common_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/admin/database/v1/common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n-google/spanner/admin/database/v1/common.proto\x12 google.spanner.admin.database.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8b\x01\n\x11OperationProgress\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8f\x01\n\x10\x45ncryptionConfig\x12<\n\x0ckms_key_name\x18\x02 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12=\n\rkms_key_names\x18\x03 \x03(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\xc2\x02\n\x0e\x45ncryptionInfo\x12S\n\x0f\x65ncryption_type\x18\x03 \x01(\x0e\x32\x35.google.spanner.admin.database.v1.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12\x32\n\x11\x65ncryption_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12I\n\x0fkms_key_version\x18\x02 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02*\\\n\x0f\x44\x61tabaseDialect\x12 \n\x1c\x44\x41TABASE_DIALECT_UNSPECIFIED\x10\x00\x12\x17\n\x13GOOGLE_STANDARD_SQL\x10\x01\x12\x0e\n\nPOSTGRESQL\x10\x02\x42\xa2\x04\n$com.google.spanner.admin.database.v1B\x0b\x43ommonProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + OperationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OperationProgress").msgclass + EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionConfig").msgclass + EncryptionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionInfo").msgclass + EncryptionInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionInfo.Type").enummodule + DatabaseDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DatabaseDialect").enummodule + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb new file mode 100644 index 000000000000..5cccf7377b63 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/admin/database/v1/spanner_database_admin.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' +require 'google/spanner/admin/database/v1/backup_pb' +require 'google/spanner/admin/database/v1/backup_schedule_pb' +require 'google/spanner/admin/database/v1/common_pb' + + +descriptor_data = "\n=google/spanner/admin/database/v1/spanner_database_admin.proto\x12 google.spanner.admin.database.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a-google/spanner/admin/database/v1/backup.proto\x1a\x36google/spanner/admin/database/v1/backup_schedule.proto\x1a-google/spanner/admin/database/v1/common.proto\"\xab\x01\n\x0bRestoreInfo\x12H\n\x0bsource_type\x18\x01 \x01(\x0e\x32\x33.google.spanner.admin.database.v1.RestoreSourceType\x12\x43\n\x0b\x62\x61\x63kup_info\x18\x02 \x01(\x0b\x32,.google.spanner.admin.database.v1.BackupInfoH\x00\x42\r\n\x0bsource_info\"\xca\x06\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x30.google.spanner.admin.database.v1.Database.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0crestore_info\x18\x04 \x01(\x0b\x32-.google.spanner.admin.database.v1.RestoreInfoB\x03\xe0\x41\x03\x12R\n\x11\x65ncryption_config\x18\x05 \x01(\x0b\x32\x32.google.spanner.admin.database.v1.EncryptionConfigB\x03\xe0\x41\x03\x12N\n\x0f\x65ncryption_info\x18\x08 \x03(\x0b\x32\x30.google.spanner.admin.database.v1.EncryptionInfoB\x03\xe0\x41\x03\x12%\n\x18version_retention_period\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12>\n\x15\x65\x61rliest_version_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0e\x64\x65\x66\x61ult_leader\x18\t \x01(\tB\x03\xe0\x41\x03\x12P\n\x10\x64\x61tabase_dialect\x18\n \x01(\x0e\x32\x31.google.spanner.admin.database.v1.DatabaseDialectB\x03\xe0\x41\x03\x12\x1e\n\x16\x65nable_drop_protection\x18\x0b \x01(\x08\x12\x18\n\x0breconciling\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\"M\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x14\n\x10READY_OPTIMIZING\x10\x03:b\xea\x41_\n\x1fspanner.googleapis.com/Database\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/instances/*}/databases\x12\xa4\x02\n\x0e\x43reateDatabase\x12\x37.google.spanner.admin.database.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41\x64\n)google.spanner.admin.database.v1.Database\x12\x37google.spanner.admin.database.v1.CreateDatabaseMetadata\xda\x41\x17parent,create_statement\x82\xd3\xe4\x93\x02\x32\"-/v1/{parent=projects/*/instances/*}/databases:\x01*\x12\xad\x01\n\x0bGetDatabase\x12\x34.google.spanner.admin.database.v1.GetDatabaseRequest\x1a*.google.spanner.admin.database.v1.Database\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/instances/*/databases/*}\x12\xef\x01\n\x0eUpdateDatabase\x12\x37.google.spanner.admin.database.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{database.name=projects/*/instances/*/databases/*}:\x08\x64\x61tabase\x12\x9d\x02\n\x11UpdateDatabaseDdl\x12:.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata\xda\x41\x13\x64\x61tabase,statements\x82\xd3\xe4\x93\x02:25/v1/{database=projects/*/instances/*/databases/*}/ddl:\x01*\x12\xa3\x01\n\x0c\x44ropDatabase\x12\x35.google.spanner.admin.database.v1.DropDatabaseRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x33*1/v1/{database=projects/*/instances/*/databases/*}\x12\xcd\x01\n\x0eGetDatabaseDdl\x12\x37.google.spanner.admin.database.v1.GetDatabaseDdlRequest\x1a\x38.google.spanner.admin.database.v1.GetDatabaseDdlResponse\"H\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{database=projects/*/instances/*/databases/*}/ddl\x12\xc2\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xf6\x01\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\xdd\x01\">/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy:\x01*ZA\"/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy:\x01*ZA\".google.spanner.admin.database.v1.ListBackupOperationsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/instances/*}/backupOperations\x12\xdc\x01\n\x11ListDatabaseRoles\x12:.google.spanner.admin.database.v1.ListDatabaseRolesRequest\x1a;.google.spanner.admin.database.v1.ListDatabaseRolesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/instances/*/databases/*}/databaseRoles\x12\xe8\x01\n\x0e\x41\x64\x64SplitPoints\x12\x37.google.spanner.admin.database.v1.AddSplitPointsRequest\x1a\x38.google.spanner.admin.database.v1.AddSplitPointsResponse\"c\xda\x41\x15\x64\x61tabase,split_points\x82\xd3\xe4\x93\x02\x45\"@/v1/{database=projects/*/instances/*/databases/*}:addSplitPoints:\x01*\x12\x8e\x02\n\x14\x43reateBackupSchedule\x12=.google.spanner.admin.database.v1.CreateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x84\x01\xda\x41)parent,backup_schedule,backup_schedule_id\x82\xd3\xe4\x93\x02R\"?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xd1\x01\n\x11GetBackupSchedule\x12:.google.spanner.admin.database.v1.GetBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\x90\x02\n\x14UpdateBackupSchedule\x12=.google.spanner.admin.database.v1.UpdateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x86\x01\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02\x62\x32O/v1/{backup_schedule.name=projects/*/instances/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xbd\x01\n\x14\x44\x65leteBackupSchedule\x12=.google.spanner.admin.database.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\xe4\x01\n\x13ListBackupSchedules\x12<.google.spanner.admin.database.v1.ListBackupSchedulesRequest\x1a=.google.spanner.admin.database.v1.ListBackupSchedulesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules\x12\xc7\x01\n\x1cInternalUpdateGraphOperation\x12\x45.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest\x1a\x46.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse\"\x18\xda\x41\x15\x64\x61tabase,operation_id\x1ax\xca\x41\x16spanner.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.adminB\xd6\x03\n$com.google.spanner.admin.database.v1B\x19SpannerDatabaseAdminProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1\xea\x41J\n\x1fspanner.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41{\n(spanner.googleapis.com/InstancePartition\x12Oprojects/{project}/instances/{instance}/instancePartitions/{instance_partition}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + RestoreInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreInfo").msgclass + Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Database").msgclass + Database::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Database.State").enummodule + ListDatabasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabasesRequest").msgclass + ListDatabasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabasesResponse").msgclass + CreateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateDatabaseRequest").msgclass + CreateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateDatabaseMetadata").msgclass + GetDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseRequest").msgclass + UpdateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseRequest").msgclass + UpdateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseMetadata").msgclass + UpdateDatabaseDdlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseDdlRequest").msgclass + DdlStatementActionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DdlStatementActionInfo").msgclass + UpdateDatabaseDdlMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata").msgclass + DropDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DropDatabaseRequest").msgclass + GetDatabaseDdlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseDdlRequest").msgclass + GetDatabaseDdlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseDdlResponse").msgclass + ListDatabaseOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsRequest").msgclass + ListDatabaseOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsResponse").msgclass + RestoreDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseRequest").msgclass + RestoreDatabaseEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig").msgclass + RestoreDatabaseEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType").enummodule + RestoreDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseMetadata").msgclass + OptimizeRestoredDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata").msgclass + DatabaseRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DatabaseRole").msgclass + ListDatabaseRolesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseRolesRequest").msgclass + ListDatabaseRolesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseRolesResponse").msgclass + AddSplitPointsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.AddSplitPointsRequest").msgclass + AddSplitPointsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.AddSplitPointsResponse").msgclass + SplitPoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.SplitPoints").msgclass + SplitPoints::Key = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.SplitPoints.Key").msgclass + InternalUpdateGraphOperationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest").msgclass + InternalUpdateGraphOperationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse").msgclass + RestoreSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreSourceType").enummodule + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb new file mode 100644 index 000000000000..84dcc83177fd --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb @@ -0,0 +1,245 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/spanner/admin/database/v1/spanner_database_admin.proto for package 'Google.Cloud.Spanner.Admin.Database.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/spanner/admin/database/v1/spanner_database_admin_pb' + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + module DatabaseAdmin + # Cloud Spanner Database Admin API + # + # The Cloud Spanner Database Admin API can be used to: + # * create, drop, and list databases + # * update the schema of pre-existing databases + # * create, delete, copy and list backups for a database + # * restore a database from an existing backup + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.spanner.admin.database.v1.DatabaseAdmin' + + # Lists Cloud Spanner databases. + rpc :ListDatabases, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse + # Creates a new Cloud Spanner database and starts to prepare it for serving. + # The returned [long-running operation][google.longrunning.Operation] will + # have a name of the format `/operations/` and + # can be used to track preparation of the database. The + # [metadata][google.longrunning.Operation.metadata] field type is + # [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. + # The [response][google.longrunning.Operation.response] field type is + # [Database][google.spanner.admin.database.v1.Database], if successful. + rpc :CreateDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, ::Google::Longrunning::Operation + # Gets the state of a Cloud Spanner database. + rpc :GetDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Database + # Updates a Cloud Spanner database. The returned + # [long-running operation][google.longrunning.Operation] can be used to track + # the progress of updating the database. If the named database does not + # exist, returns `NOT_FOUND`. + # + # While the operation is pending: + # + # * The database's + # [reconciling][google.spanner.admin.database.v1.Database.reconciling] + # field is set to true. + # * Cancelling the operation is best-effort. If the cancellation succeeds, + # the operation metadata's + # [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time] + # is set, the updates are reverted, and the operation terminates with a + # `CANCELLED` status. + # * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error + # until the pending operation is done (returns successfully or with + # error). + # * Reading the database via the API continues to give the pre-request + # values. + # + # Upon completion of the returned operation: + # + # * The new values are in effect and readable via the API. + # * The database's + # [reconciling][google.spanner.admin.database.v1.Database.reconciling] + # field becomes false. + # + # The returned [long-running operation][google.longrunning.Operation] will + # have a name of the format + # `projects//instances//databases//operations/` + # and can be used to track the database modification. The + # [metadata][google.longrunning.Operation.metadata] field type is + # [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata]. + # The [response][google.longrunning.Operation.response] field type is + # [Database][google.spanner.admin.database.v1.Database], if successful. + rpc :UpdateDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest, ::Google::Longrunning::Operation + # Updates the schema of a Cloud Spanner database by + # creating/altering/dropping tables, columns, indexes, etc. The returned + # [long-running operation][google.longrunning.Operation] will have a name of + # the format `/operations/` and can be used to + # track execution of the schema change(s). The + # [metadata][google.longrunning.Operation.metadata] field type is + # [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. + # The operation has no response. + rpc :UpdateDatabaseDdl, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, ::Google::Longrunning::Operation + # Drops (aka deletes) a Cloud Spanner database. + # Completed backups for the database will be retained according to their + # `expire_time`. + # Note: Cloud Spanner might continue to accept requests for a few seconds + # after the database has been deleted. + rpc :DropDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest, ::Google::Protobuf::Empty + # Returns the schema of a Cloud Spanner database as a list of formatted + # DDL statements. This method does not show pending schema updates, those may + # be queried using the [Operations][google.longrunning.Operations] API. + rpc :GetDatabaseDdl, ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest, ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse + # Sets the access control policy on a database or backup resource. + # Replaces any existing policy. + # + # Authorization requires `spanner.databases.setIamPolicy` + # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. + # For backups, authorization requires `spanner.backups.setIamPolicy` + # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets the access control policy for a database or backup resource. + # Returns an empty policy if a database or backup exists but does not have a + # policy set. + # + # Authorization requires `spanner.databases.getIamPolicy` permission on + # [resource][google.iam.v1.GetIamPolicyRequest.resource]. + # For backups, authorization requires `spanner.backups.getIamPolicy` + # permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns permissions that the caller has on the specified database or backup + # resource. + # + # Attempting this RPC on a non-existent Cloud Spanner database will + # result in a NOT_FOUND error if the user has + # `spanner.databases.list` permission on the containing Cloud + # Spanner instance. Otherwise returns an empty set of permissions. + # Calling this method on a backup that does not exist will + # result in a NOT_FOUND error if the user has + # `spanner.backups.list` permission on the containing instance. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Starts creating a new Cloud Spanner Backup. + # The returned backup [long-running operation][google.longrunning.Operation] + # will have a name of the format + # `projects//instances//backups//operations/` + # and can be used to track creation of the backup. The + # [metadata][google.longrunning.Operation.metadata] field type is + # [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. + # The [response][google.longrunning.Operation.response] field type is + # [Backup][google.spanner.admin.database.v1.Backup], if successful. + # Cancelling the returned operation will stop the creation and delete the + # backup. There can be only one pending backup creation per database. Backup + # creation of different databases can run concurrently. + rpc :CreateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, ::Google::Longrunning::Operation + # Starts copying a Cloud Spanner Backup. + # The returned backup [long-running operation][google.longrunning.Operation] + # will have a name of the format + # `projects//instances//backups//operations/` + # and can be used to track copying of the backup. The operation is associated + # with the destination backup. + # The [metadata][google.longrunning.Operation.metadata] field type is + # [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. + # The [response][google.longrunning.Operation.response] field type is + # [Backup][google.spanner.admin.database.v1.Backup], if successful. + # Cancelling the returned operation will stop the copying and delete the + # destination backup. Concurrent CopyBackup requests can run on the same + # source backup. + rpc :CopyBackup, ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest, ::Google::Longrunning::Operation + # Gets metadata on a pending or completed + # [Backup][google.spanner.admin.database.v1.Backup]. + rpc :GetBackup, ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup + # Updates a pending or completed + # [Backup][google.spanner.admin.database.v1.Backup]. + rpc :UpdateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup + # Deletes a pending or completed + # [Backup][google.spanner.admin.database.v1.Backup]. + rpc :DeleteBackup, ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, ::Google::Protobuf::Empty + # Lists completed and pending backups. + # Backups returned are ordered by `create_time` in descending order, + # starting from the most recent `create_time`. + rpc :ListBackups, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse + # Create a new database by restoring from a completed backup. The new + # database must be in the same project and in an instance with the same + # instance configuration as the instance containing + # the backup. The returned database [long-running + # operation][google.longrunning.Operation] has a name of the format + # `projects//instances//databases//operations/`, + # and can be used to track the progress of the operation, and to cancel it. + # The [metadata][google.longrunning.Operation.metadata] field type is + # [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. + # The [response][google.longrunning.Operation.response] type + # is [Database][google.spanner.admin.database.v1.Database], if + # successful. Cancelling the returned operation will stop the restore and + # delete the database. + # There can be only one database being restored into an instance at a time. + # Once the restore operation completes, a new restore operation can be + # initiated, without waiting for the optimize operation associated with the + # first restore to complete. + rpc :RestoreDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest, ::Google::Longrunning::Operation + # Lists database [longrunning-operations][google.longrunning.Operation]. + # A database operation has a name of the form + # `projects//instances//databases//operations/`. + # The long-running operation + # [metadata][google.longrunning.Operation.metadata] field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. + rpc :ListDatabaseOperations, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse + # Lists the backup [long-running operations][google.longrunning.Operation] in + # the given instance. A backup operation has a name of the form + # `projects//instances//backups//operations/`. + # The long-running operation + # [metadata][google.longrunning.Operation.metadata] field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. Operations returned are ordered by + # `operation.metadata.value.progress.start_time` in descending order starting + # from the most recently started operation. + rpc :ListBackupOperations, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse + # Lists Cloud Spanner database roles. + rpc :ListDatabaseRoles, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse + # Adds split points to specified tables, indexes of a database. + rpc :AddSplitPoints, ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest, ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse + # Creates a new backup schedule. + rpc :CreateBackupSchedule, ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest, ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule + # Gets backup schedule for the input schedule name. + rpc :GetBackupSchedule, ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest, ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule + # Updates a backup schedule. + rpc :UpdateBackupSchedule, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest, ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule + # Deletes a backup schedule. + rpc :DeleteBackupSchedule, ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest, ::Google::Protobuf::Empty + # Lists all the backup schedules for the database. + rpc :ListBackupSchedules, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse + # This is an internal API called by Spanner Graph jobs. You should never need + # to call this API directly. + rpc :InternalUpdateGraphOperation, ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest, ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/README.md new file mode 100644 index 000000000000..c27a38fa2526 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Spanner Database Admin V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.rb new file mode 100644 index 000000000000..e94d6cbaa8e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.rb @@ -0,0 +1,730 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + # A backup of a Cloud Spanner database. + # @!attribute [rw] database + # @return [::String] + # Required for the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} + # operation. Name of the database from which this backup was created. This + # needs to be in the same instance as the backup. Values are of the form + # `projects//instances//databases/`. + # @!attribute [rw] version_time + # @return [::Google::Protobuf::Timestamp] + # The backup will contain an externally consistent copy of the database at + # the timestamp specified by `version_time`. If `version_time` is not + # specified, the system will set `version_time` to the `create_time` of the + # backup. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Required for the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} + # operation. The expiration time of the backup, with microseconds + # granularity that must be at least 6 hours and at most 366 days + # from the time the CreateBackup request is processed. Once the `expire_time` + # has passed, the backup is eligible to be automatically deleted by Cloud + # Spanner to free the resources used by the backup. + # @!attribute [rw] name + # @return [::String] + # Output only for the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} + # operation. Required for the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup} + # operation. + # + # A globally unique identifier for the backup which cannot be + # changed. Values are of the form + # `projects//instances//backups/[a-z][a-z0-9_\-]*[a-z0-9]` + # The final segment of the name must be between 2 and 60 characters + # in length. + # + # The backup is stored in the location(s) specified in the instance + # configuration of the instance containing the backup, identified + # by the prefix of the backup name of the form + # `projects//instances/`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} + # request is received. If the request does not specify `version_time`, the + # `version_time` of the backup will be equivalent to the `create_time`. + # @!attribute [r] size_bytes + # @return [::Integer] + # Output only. Size of the backup in bytes. + # @!attribute [r] freeable_size_bytes + # @return [::Integer] + # Output only. The number of bytes that will be freed by deleting this + # backup. This value will be zero if, for example, this backup is part of an + # incremental backup chain and younger backups in the chain require that we + # keep its data. For backups not in an incremental backup chain, this is + # always the size of the backup. This value may change if backups on the same + # chain get created, deleted or expired. + # @!attribute [r] exclusive_size_bytes + # @return [::Integer] + # Output only. For a backup in an incremental backup chain, this is the + # storage space needed to keep the data that has changed since the previous + # backup. For all other backups, this is always the size of the backup. This + # value may change if backups on the same chain get deleted or expired. + # + # This field can be used to calculate the total storage space used by a set + # of backups. For example, the total space used by all backups of a database + # can be computed by summing up this field. + # @!attribute [r] state + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup::State] + # Output only. The current state of the backup. + # @!attribute [r] referencing_databases + # @return [::Array<::String>] + # Output only. The names of the restored databases that reference the backup. + # The database names are of + # the form `projects//instances//databases/`. + # Referencing databases may exist in different instances. The existence of + # any referencing database prevents the backup from being deleted. When a + # restored database from the backup enters the `READY` state, the reference + # to the backup is removed. + # @!attribute [r] encryption_info + # @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo] + # Output only. The encryption information for the backup. + # @!attribute [r] encryption_information + # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo>] + # Output only. The encryption information for the backup, whether it is + # protected by one or more KMS keys. The information includes all Cloud + # KMS key versions used to encrypt the backup. The `encryption_status' field + # inside of each `EncryptionInfo` is not populated. At least one of the key + # versions must be available for the backup to be restored. If a key version + # is revoked in the middle of a restore, the restore behavior is undefined. + # @!attribute [r] database_dialect + # @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect] + # Output only. The database dialect information for the backup. + # @!attribute [r] referencing_backups + # @return [::Array<::String>] + # Output only. The names of the destination backups being created by copying + # this source backup. The backup names are of the form + # `projects//instances//backups/`. + # Referencing backups may exist in different instances. The existence of + # any referencing backup prevents the backup from being deleted. When the + # copy operation is done (either successfully completed or cancelled or the + # destination backup is deleted), the reference to the backup is removed. + # @!attribute [r] max_expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The max allowed expiration time of the backup, with + # microseconds granularity. A backup's expiration time can be configured in + # multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or + # copying an existing backup, the expiration time specified must be + # less than `Backup.max_expire_time`. + # @!attribute [r] backup_schedules + # @return [::Array<::String>] + # Output only. List of backup schedule URIs that are associated with + # creating this backup. This is only applicable for scheduled backups, and + # is empty for on-demand backups. + # + # To optimize for storage, whenever possible, multiple schedules are + # collapsed together to create one backup. In such cases, this field captures + # the list of all backup schedule URIs that are associated with creating + # this backup. If collapsing is not done, then this field captures the + # single backup schedule URI associated with creating this backup. + # @!attribute [r] incremental_backup_chain_id + # @return [::String] + # Output only. Populated only for backups in an incremental backup chain. + # Backups share the same chain id if and only if they belong to the same + # incremental backup chain. Use this field to determine which backups are + # part of the same incremental backup chain. The ordering of backups in the + # chain can be determined by ordering the backup `version_time`. + # @!attribute [r] oldest_version_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Data deleted at a time older than this is guaranteed not to be + # retained in order to support this backup. For a backup in an incremental + # backup chain, this is the version time of the oldest backup that exists or + # ever existed in the chain. For all other backups, this is the version time + # of the backup. This field can be used to understand what data is being + # retained by the backup system. + # @!attribute [r] instance_partitions + # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::BackupInstancePartition>] + # Output only. The instance partition(s) storing the backup. + # + # This is the same as the list of the instance partition(s) that the database + # had footprint in at the backup's `version_time`. + class Backup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates the current state of the backup. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # The pending backup is still being created. Operations on the + # backup may fail with `FAILED_PRECONDITION` in this state. + CREATING = 1 + + # The backup is complete and ready for use. + READY = 2 + end + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the instance in which the backup will be + # created. This must be the same instance that contains the database the + # backup will be created from. The backup will be stored in the + # location(s) specified in the instance configuration of this + # instance. Values are of the form + # `projects//instances/`. + # @!attribute [rw] backup_id + # @return [::String] + # Required. The id of the backup to be created. The `backup_id` appended to + # `parent` forms the full backup name of the form + # `projects//instances//backups/`. + # @!attribute [rw] backup + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # Required. The backup to create. + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig] + # Optional. The encryption configuration used to encrypt the backup. If this + # field is not specified, the backup will use the same encryption + # configuration as the database by default, namely + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} + # = `USE_DATABASE_ENCRYPTION`. + class CreateBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}. + # @!attribute [rw] name + # @return [::String] + # The name of the backup being created. + # @!attribute [rw] database + # @return [::String] + # The name of the database the backup is created from. + # @!attribute [rw] progress + # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress] + # The progress of the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} + # operation. + # @!attribute [rw] cancel_time + # @return [::Google::Protobuf::Timestamp] + # The time at which cancellation of this operation was received. + # Operations.CancelOperation + # starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not guaranteed. + # Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + class CreateBackupMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup}. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the destination instance that will contain the backup + # copy. Values are of the form: `projects//instances/`. + # @!attribute [rw] backup_id + # @return [::String] + # Required. The id of the backup copy. + # The `backup_id` appended to `parent` forms the full backup_uri of the form + # `projects//instances//backups/`. + # @!attribute [rw] source_backup + # @return [::String] + # Required. The source backup to be copied. + # The source backup needs to be in READY state for it to be copied. + # Once CopyBackup is in progress, the source backup cannot be deleted or + # cleaned up on expiration until CopyBackup is finished. + # Values are of the form: + # `projects//instances//backups/`. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Required. The expiration time of the backup in microsecond granularity. + # The expiration time must be at least 6 hours and at most 366 days + # from the `create_time` of the source backup. Once the `expire_time` has + # passed, the backup is eligible to be automatically deleted by Cloud Spanner + # to free the resources used by the backup. + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig] + # Optional. The encryption configuration used to encrypt the backup. If this + # field is not specified, the backup will use the same encryption + # configuration as the source backup by default, namely + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type} + # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + class CopyBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup}. + # @!attribute [rw] name + # @return [::String] + # The name of the backup being created through the copy operation. + # Values are of the form + # `projects//instances//backups/`. + # @!attribute [rw] source_backup + # @return [::String] + # The name of the source backup that is being copied. + # Values are of the form + # `projects//instances//backups/`. + # @!attribute [rw] progress + # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress] + # The progress of the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup} + # operation. + # @!attribute [rw] cancel_time + # @return [::Google::Protobuf::Timestamp] + # The time at which cancellation of CopyBackup operation was received. + # Operations.CancelOperation + # starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not guaranteed. + # Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + class CopyBackupMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}. + # @!attribute [rw] backup + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] + # Required. The backup to update. `backup.name`, and the fields to be updated + # as specified by `update_mask` are required. Other fields are ignored. + # Update is only supported for the following fields: + # * `backup.expire_time`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A mask specifying which fields (e.g. `expire_time`) in the + # Backup resource should be updated. This mask is relative to the Backup + # resource, not to the request message. The field mask must always be + # specified; this prevents any future fields from being erased accidentally + # by clients that do not know about them. + class UpdateBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup GetBackup}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup. + # Values are of the form + # `projects//instances//backups/`. + class GetBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup DeleteBackup}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup to delete. + # Values are of the form + # `projects//instances//backups/`. + class DeleteBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}. + # @!attribute [rw] parent + # @return [::String] + # Required. The instance to list backups from. Values are of the + # form `projects//instances/`. + # @!attribute [rw] filter + # @return [::String] + # An expression that filters the list of returned backups. + # + # A filter expression consists of a field name, a comparison operator, and a + # value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the + # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for + # filtering: + # + # * `name` + # * `database` + # * `state` + # * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + # * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + # * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) + # * `size_bytes` + # * `backup_schedules` + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic, but + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `name:Howl` - The backup's name contains the string "howl". + # * `database:prod` + # - The database's name contains the string "prod". + # * `state:CREATING` - The backup is pending creation. + # * `state:READY` - The backup is fully created and ready for use. + # * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` + # - The backup name contains the string "howl" and `create_time` + # of the backup is before 2018-03-28T14:50:00Z. + # * `expire_time < \"2018-03-28T14:50:00Z\"` + # - The backup `expire_time` is before 2018-03-28T14:50:00Z. + # * `size_bytes > 10000000000` - The backup's size is greater than 10GB + # * `backup_schedules:daily` + # - The backup is created from a schedule with "daily" in its name. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of backups to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} + # to the same `parent` and with the same `filter`. + class ListBackupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}. + # @!attribute [rw] backups + # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Backup>] + # The list of matching backups. Backups returned are ordered by `create_time` + # in descending order, starting from the most recent `create_time`. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups} + # call to fetch more of the matching backups. + class ListBackupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations ListBackupOperations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The instance of the backup operations. Values are of + # the form `projects//instances/`. + # @!attribute [rw] filter + # @return [::String] + # An expression that filters the list of returned backup operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the {::Google::Longrunning::Operation operation} + # are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} + # is + # `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic, but + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + # `metadata.database:prod` - Returns operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. + # * The source database name of backup contains the string "prod". + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + # `(metadata.name:howl) AND` \ + # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Returns operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. + # * The backup name contains the string "howl". + # * The operation started before 2018-03-28T14:50:00Z. + # * The operation resulted in an error. + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ + # `(metadata.source_backup:test) AND` \ + # `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ + # `(error:*)` - Returns operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}. + # * The source backup name contains the string "test". + # * The operation started before 2022-01-18T14:50:00Z. + # * The operation resulted in an error. + # * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ + # `(metadata.database:test_db)) OR` \ + # `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) + # AND` \ + # `(metadata.source_backup:test_bkp)) AND` \ + # `(error:*)` - Returns operations where: + # * The operation's metadata matches either of criteria: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} + # AND the source database name of the backup contains the string + # "test_db" + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata} + # AND the source backup name contains the string "test_bkp" + # * The operation resulted in an error. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} + # to the same `parent` and with the same `filter`. + class ListBackupOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations ListBackupOperations}. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # The list of matching backup [long-running + # operations][google.longrunning.Operation]. Each operation's name will be + # prefixed by the backup's name. The operation's + # {::Google::Longrunning::Operation#metadata metadata} field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that are pending or have completed/failed/canceled within the + # last 7 days. Operations returned are ordered by + # `operation.metadata.value.progress.start_time` in descending order starting + # from the most recently started operation. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations ListBackupOperations} + # call to fetch more of the matching metadata. + class ListBackupOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about a backup. + # @!attribute [rw] backup + # @return [::String] + # Name of the backup. + # @!attribute [rw] version_time + # @return [::Google::Protobuf::Timestamp] + # The backup contains an externally consistent copy of `source_database` at + # the timestamp specified by `version_time`. If the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} + # request did not specify `version_time`, the `version_time` of the backup is + # equivalent to the `create_time`. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} + # request was received. + # @!attribute [rw] source_database + # @return [::String] + # Name of the database the backup was created from. + class BackupInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Encryption configuration for the backup to create. + # @!attribute [rw] encryption_type + # @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig::EncryptionType] + # Required. The encryption type of the backup. + # @!attribute [rw] kms_key_name + # @return [::String] + # Optional. The Cloud KMS key that will be used to protect the backup. + # This field should be set only when + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} + # is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form + # `projects//locations//keyRings//cryptoKeys/`. + # @!attribute [rw] kms_key_names + # @return [::Array<::String>] + # Optional. Specifies the KMS configuration for the one or more keys used to + # protect the backup. Values are of the form + # `projects//locations//keyRings//cryptoKeys/`. + # + # The keys referenced by kms_key_names must fully cover all + # regions of the backup's instance configuration. Some examples: + # * For single region instance configs, specify a single regional + # location KMS key. + # * For multi-regional instance configs of type GOOGLE_MANAGED, + # either specify a multi-regional location KMS key or multiple regional + # location KMS keys that cover all regions in the instance config. + # * For an instance config of type USER_MANAGED, please specify only + # regional location KMS keys to cover each region in the instance config. + # Multi-regional location KMS keys are not supported for USER_MANAGED + # instance configs. + class CreateBackupEncryptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Encryption types for the backup. + module EncryptionType + # Unspecified. Do not use. + ENCRYPTION_TYPE_UNSPECIFIED = 0 + + # Use the same encryption configuration as the database. This is the + # default option when + # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig encryption_config} + # is empty. For example, if the database is using + # `Customer_Managed_Encryption`, the backup will be using the same Cloud + # KMS key as the database. + USE_DATABASE_ENCRYPTION = 1 + + # Use Google default encryption. + GOOGLE_DEFAULT_ENCRYPTION = 2 + + # Use customer managed encryption. If specified, `kms_key_name` + # must contain a valid Cloud KMS key. + CUSTOMER_MANAGED_ENCRYPTION = 3 + end + end + + # Encryption configuration for the copied backup. + # @!attribute [rw] encryption_type + # @return [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig::EncryptionType] + # Required. The encryption type of the backup. + # @!attribute [rw] kms_key_name + # @return [::String] + # Optional. The Cloud KMS key that will be used to protect the backup. + # This field should be set only when + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type} + # is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form + # `projects//locations//keyRings//cryptoKeys/`. + # @!attribute [rw] kms_key_names + # @return [::Array<::String>] + # Optional. Specifies the KMS configuration for the one or more keys used to + # protect the backup. Values are of the form + # `projects//locations//keyRings//cryptoKeys/`. + # Kms keys specified can be in any order. + # + # The keys referenced by kms_key_names must fully cover all + # regions of the backup's instance configuration. Some examples: + # * For single region instance configs, specify a single regional + # location KMS key. + # * For multi-regional instance configs of type GOOGLE_MANAGED, + # either specify a multi-regional location KMS key or multiple regional + # location KMS keys that cover all regions in the instance config. + # * For an instance config of type USER_MANAGED, please specify only + # regional location KMS keys to cover each region in the instance config. + # Multi-regional location KMS keys are not supported for USER_MANAGED + # instance configs. + class CopyBackupEncryptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Encryption types for the backup. + module EncryptionType + # Unspecified. Do not use. + ENCRYPTION_TYPE_UNSPECIFIED = 0 + + # This is the default option for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup} + # when + # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig encryption_config} + # is not specified. For example, if the source backup is using + # `Customer_Managed_Encryption`, the backup will be using the same Cloud + # KMS key as the source backup. + USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1 + + # Use Google default encryption. + GOOGLE_DEFAULT_ENCRYPTION = 2 + + # Use customer managed encryption. If specified, either `kms_key_name` or + # `kms_key_names` must contain valid Cloud KMS key(s). + CUSTOMER_MANAGED_ENCRYPTION = 3 + end + end + + # The specification for full backups. + # A full backup stores the entire contents of the database at a given + # version time. + class FullBackupSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The specification for incremental backup chains. + # An incremental backup stores the delta of changes between a previous + # backup and the database contents at a given version time. An + # incremental backup chain consists of a full backup and zero or more + # successive incremental backups. The first backup created for an + # incremental backup chain is always a full backup. + class IncrementalBackupSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Instance partition information for the backup. + # @!attribute [rw] instance_partition + # @return [::String] + # A unique identifier for the instance partition. Values are of the form + # `projects//instances//instancePartitions/` + class BackupInstancePartition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb new file mode 100644 index 000000000000..99370211c6c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb @@ -0,0 +1,220 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + # Defines specifications of the backup schedule. + # @!attribute [rw] cron_spec + # @return [::Google::Cloud::Spanner::Admin::Database::V1::CrontabSpec] + # Cron style schedule specification. + class BackupScheduleSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupSchedule expresses the automated backup creation specification for a + # Spanner database. + # Next ID: 10 + # @!attribute [rw] name + # @return [::String] + # Identifier. Output only for the + # [CreateBackupSchedule][DatabaseAdmin.CreateBackupSchededule] operation. + # Required for the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule UpdateBackupSchedule} + # operation. A globally unique identifier for the backup schedule which + # cannot be changed. Values are of the form + # `projects//instances//databases//backupSchedules/[a-z][a-z0-9_\-]*[a-z0-9]` + # The final segment of the name must be between 2 and 60 characters in + # length. + # @!attribute [rw] spec + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupScheduleSpec] + # Optional. The schedule specification based on which the backup creations + # are triggered. + # @!attribute [rw] retention_duration + # @return [::Google::Protobuf::Duration] + # Optional. The retention duration of a backup that must be at least 6 hours + # and at most 366 days. The backup is eligible to be automatically deleted + # once the retention period has elapsed. + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig] + # Optional. The encryption configuration that will be used to encrypt the + # backup. If this field is not specified, the backup will use the same + # encryption configuration as the database. + # @!attribute [rw] full_backup_spec + # @return [::Google::Cloud::Spanner::Admin::Database::V1::FullBackupSpec] + # The schedule creates only full backups. + # + # Note: The following fields are mutually exclusive: `full_backup_spec`, `incremental_backup_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] incremental_backup_spec + # @return [::Google::Cloud::Spanner::Admin::Database::V1::IncrementalBackupSpec] + # The schedule creates incremental backup chains. + # + # Note: The following fields are mutually exclusive: `incremental_backup_spec`, `full_backup_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp at which the schedule was last updated. + # If the schedule has never been updated, this field contains the timestamp + # when the schedule was first created. + class BackupSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CrontabSpec can be used to specify the version time and frequency at + # which the backup should be created. + # @!attribute [rw] text + # @return [::String] + # Required. Textual representation of the crontab. User can customize the + # backup frequency and the backup version time using the cron + # expression. The version time must be in UTC timezone. + # + # The backup will contain an externally consistent copy of the + # database at the version time. Allowed frequencies are 12 hour, 1 day, + # 1 week and 1 month. Examples of valid cron specifications: + # * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. + # * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. + # * `0 2 * * * ` : once a day at 2 past midnight in UTC. + # * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. + # * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. + # @!attribute [r] time_zone + # @return [::String] + # Output only. The time zone of the times in `CrontabSpec.text`. Currently + # only UTC is supported. + # @!attribute [r] creation_window + # @return [::Google::Protobuf::Duration] + # Output only. Schedule backups will contain an externally consistent copy + # of the database at the version time specified in + # `schedule_spec.cron_spec`. However, Spanner may not initiate the creation + # of the scheduled backups at that version time. Spanner will initiate + # the creation of scheduled backups within the time window bounded by the + # version_time specified in `schedule_spec.cron_spec` and version_time + + # `creation_window`. + class CrontabSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup_schedule CreateBackupSchedule}. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the database that this backup schedule applies to. + # @!attribute [rw] backup_schedule_id + # @return [::String] + # Required. The Id to use for the backup schedule. The `backup_schedule_id` + # appended to `parent` forms the full backup schedule name of the form + # `projects//instances//databases//backupSchedules/`. + # @!attribute [rw] backup_schedule + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # Required. The backup schedule to create. + class CreateBackupScheduleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup_schedule GetBackupSchedule}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the schedule to retrieve. + # Values are of the form + # `projects//instances//databases//backupSchedules/`. + class GetBackupScheduleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup_schedule DeleteBackupSchedule}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the schedule to delete. + # Values are of the form + # `projects//instances//databases//backupSchedules/`. + class DeleteBackupScheduleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules ListBackupSchedules}. + # @!attribute [rw] parent + # @return [::String] + # Required. Database is the parent resource whose backup schedules should be + # listed. Values are of the form + # projects//instances//databases/ + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of backup schedules to be returned in the response. If 0 + # or less, defaults to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # Optional. If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse ListBackupSchedulesResponse} + # to the same `parent`. + class ListBackupSchedulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules ListBackupSchedules}. + # @!attribute [rw] backup_schedules + # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>] + # The list of backup schedules for a database. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules ListBackupSchedules} + # call to fetch more of the schedules. + class ListBackupSchedulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule UpdateBackupScheduleRequest}. + # @!attribute [rw] backup_schedule + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] + # Required. The backup schedule to update. `backup_schedule.name`, and the + # fields to be updated as specified by `update_mask` are required. Other + # fields are ignored. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A mask specifying which fields in the BackupSchedule resource + # should be updated. This mask is relative to the BackupSchedule resource, + # not to the request message. The field mask must always be + # specified; this prevents any future fields from being erased + # accidentally. + class UpdateBackupScheduleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.rb new file mode 100644 index 000000000000..7deaa30f1933 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.rb @@ -0,0 +1,123 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + # Encapsulates progress related information for a Cloud Spanner long + # running operation. + # @!attribute [rw] progress_percent + # @return [::Integer] + # Percent completion of the operation. + # Values are between 0 and 100 inclusive. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time the request was received. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # If set, the time at which this operation failed or was completed + # successfully. + class OperationProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Encryption configuration for a Cloud Spanner database. + # @!attribute [rw] kms_key_name + # @return [::String] + # The Cloud KMS key to be used for encrypting and decrypting + # the database. Values are of the form + # `projects//locations//keyRings//cryptoKeys/`. + # @!attribute [rw] kms_key_names + # @return [::Array<::String>] + # Specifies the KMS configuration for the one or more keys used to encrypt + # the database. Values are of the form + # `projects//locations//keyRings//cryptoKeys/`. + # + # The keys referenced by kms_key_names must fully cover all + # regions of the database instance configuration. Some examples: + # * For single region database instance configs, specify a single regional + # location KMS key. + # * For multi-regional database instance configs of type GOOGLE_MANAGED, + # either specify a multi-regional location KMS key or multiple regional + # location KMS keys that cover all regions in the instance config. + # * For a database instance config of type USER_MANAGED, please specify only + # regional location KMS keys to cover each region in the instance config. + # Multi-regional location KMS keys are not supported for USER_MANAGED + # instance configs. + class EncryptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Encryption information for a Cloud Spanner database or backup. + # @!attribute [r] encryption_type + # @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo::Type] + # Output only. The type of encryption. + # @!attribute [r] encryption_status + # @return [::Google::Rpc::Status] + # Output only. If present, the status of a recent encrypt/decrypt call on + # underlying data for this database or backup. Regardless of status, data is + # always encrypted at rest. + # @!attribute [r] kms_key_version + # @return [::String] + # Output only. A Cloud KMS key version that is being used to protect the + # database or backup. + class EncryptionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible encryption types. + module Type + # Encryption type was not specified, though data at rest remains encrypted. + TYPE_UNSPECIFIED = 0 + + # The data is encrypted at rest with a key that is + # fully managed by Google. No key version or status will be populated. + # This is the default state. + GOOGLE_DEFAULT_ENCRYPTION = 1 + + # The data is encrypted at rest with a key that is + # managed by the customer. The active version of the key. `kms_key_version` + # will be populated, and `encryption_status` may be populated. + CUSTOMER_MANAGED_ENCRYPTION = 2 + end + end + + # Indicates the dialect type of a database. + module DatabaseDialect + # Default value. This value will create a database with the + # GOOGLE_STANDARD_SQL dialect. + DATABASE_DIALECT_UNSPECIFIED = 0 + + # GoogleSQL supported SQL. + GOOGLE_STANDARD_SQL = 1 + + # PostgreSQL supported SQL. + POSTGRESQL = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb new file mode 100644 index 000000000000..4c996f50b61f --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb @@ -0,0 +1,834 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module Admin + module Database + module V1 + # Information about the database restore. + # @!attribute [rw] source_type + # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreSourceType] + # The type of the restore source. + # @!attribute [rw] backup_info + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupInfo] + # Information about the backup used to restore the database. The backup + # may no longer exist. + class RestoreInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Cloud Spanner database. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the database. Values are of the form + # `projects//instances//databases/`, + # where `` is as specified in the `CREATE DATABASE` + # statement. This name can be passed to other API methods to + # identify the database. + # @!attribute [r] state + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Database::State] + # Output only. The current database state. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. If exists, the time at which the database creation started. + # @!attribute [r] restore_info + # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreInfo] + # Output only. Applicable only for restored databases. Contains information + # about the restore source. + # @!attribute [r] encryption_config + # @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig] + # Output only. For databases that are using customer managed encryption, this + # field contains the encryption configuration for the database. + # For databases that are using Google default or other types of encryption, + # this field is empty. + # @!attribute [r] encryption_info + # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo>] + # Output only. For databases that are using customer managed encryption, this + # field contains the encryption information for the database, such as + # all Cloud KMS key versions that are in use. The `encryption_status' field + # inside of each `EncryptionInfo` is not populated. + # + # For databases that are using Google default or other types of encryption, + # this field is empty. + # + # This field is propagated lazily from the backend. There might be a delay + # from when a key version is being used and when it appears in this field. + # @!attribute [r] version_retention_period + # @return [::String] + # Output only. The period in which Cloud Spanner retains all versions of data + # for the database. This is the same as the value of version_retention_period + # database option set using + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}. + # Defaults to 1 hour, if not set. + # @!attribute [r] earliest_version_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Earliest timestamp at which older versions of the data can be + # read. This value is continuously updated by Cloud Spanner and becomes stale + # the moment it is queried. If you are using this value to recover data, make + # sure to account for the time from the moment when the value is queried to + # the moment when you initiate the recovery. + # @!attribute [r] default_leader + # @return [::String] + # Output only. The read-write region which contains the database's leader + # replicas. + # + # This is the same as the value of default_leader + # database option set using DatabaseAdmin.CreateDatabase or + # DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty. + # @!attribute [r] database_dialect + # @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect] + # Output only. The dialect of the Cloud Spanner Database. + # @!attribute [rw] enable_drop_protection + # @return [::Boolean] + # Whether drop protection is enabled for this database. Defaults to false, + # if not set. For more details, please see how to [prevent accidental + # database + # deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion). + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. If true, the database is being updated. If false, there are no + # ongoing update operations for the database. + class Database + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates the current state of the database. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # The database is still being created. Operations on the database may fail + # with `FAILED_PRECONDITION` in this state. + CREATING = 1 + + # The database is fully created and ready for use. + READY = 2 + + # The database is fully created and ready for use, but is still + # being optimized for performance and cannot handle full load. + # + # In this state, the database still references the backup + # it was restore from, preventing the backup + # from being deleted. When optimizations are complete, the full performance + # of the database will be restored, and the database will transition to + # `READY` state. + READY_OPTIMIZING = 3 + end + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}. + # @!attribute [rw] parent + # @return [::String] + # Required. The instance whose databases should be listed. + # Values are of the form `projects//instances/`. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of databases to be returned in the response. If 0 or less, + # defaults to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}. + class ListDatabasesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}. + # @!attribute [rw] databases + # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Database>] + # Databases that matched the request. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases} + # call to fetch more of the matching databases. + class ListDatabasesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database CreateDatabase}. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the instance that will serve the new database. + # Values are of the form `projects//instances/`. + # @!attribute [rw] create_statement + # @return [::String] + # Required. A `CREATE DATABASE` statement, which specifies the ID of the + # new database. The database ID must conform to the regular expression + # `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length. + # If the database ID is a reserved word or if it contains a hyphen, the + # database ID must be enclosed in backticks (`` ` ``). + # @!attribute [rw] extra_statements + # @return [::Array<::String>] + # Optional. A list of DDL statements to run inside the newly created + # database. Statements can create tables, indexes, etc. These + # statements execute atomically with the creation of the database: + # if there is an error in any statement, the database is not created. + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig] + # Optional. The encryption configuration for the database. If this field is + # not specified, Cloud Spanner will encrypt/decrypt all data at rest using + # Google default encryption. + # @!attribute [rw] database_dialect + # @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect] + # Optional. The dialect of the Cloud Spanner Database. + # @!attribute [rw] proto_descriptors + # @return [::String] + # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in + # 'extra_statements' above. + # Contains a protobuf-serialized + # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). + # To generate it, [install](https://grpc.io/docs/protoc-installation/) and + # run `protoc` with --include_imports and --descriptor_set_out. For example, + # to generate for moon/shot/app.proto, run + # ``` + # $protoc --proto_path=/app_path --proto_path=/lib_path \ + # --include_imports \ + # --descriptor_set_out=descriptors.data \ + # moon/shot/app.proto + # ``` + # For more details, see protobuffer [self + # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + class CreateDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database CreateDatabase}. + # @!attribute [rw] database + # @return [::String] + # The database being created. + class CreateDatabaseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database GetDatabase}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the requested database. Values are of the form + # `projects//instances//databases/`. + class GetDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database UpdateDatabase}. + # @!attribute [rw] database + # @return [::Google::Cloud::Spanner::Admin::Database::V1::Database] + # Required. The database to update. + # The `name` field of the database is of the form + # `projects//instances//databases/`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. Currently, only + # `enable_drop_protection` field can be updated. + class UpdateDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database UpdateDatabase}. + # @!attribute [rw] request + # @return [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest] + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database UpdateDatabase}. + # @!attribute [rw] progress + # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress] + # The progress of the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database UpdateDatabase} + # operation. + # @!attribute [rw] cancel_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation was cancelled. If set, this operation is + # in the process of undoing itself (which is best-effort). + class UpdateDatabaseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enqueues the given DDL statements to be applied, in order but not + # necessarily all at once, to the database schema at some point (or + # points) in the future. The server checks that the statements + # are executable (syntactically valid, name tables that exist, etc.) + # before enqueueing them, but they may still fail upon + # later execution (e.g., if a statement from another batch of + # statements is applied first and it conflicts in some way, or if + # there is some data-related problem like a `NULL` value in a column to + # which `NOT NULL` would be added). If a statement fails, all + # subsequent statements in the batch are automatically cancelled. + # + # Each batch of statements is assigned a name which can be used with + # the Operations API to monitor + # progress. See the + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#operation_id operation_id} + # field for more details. + # @!attribute [rw] database + # @return [::String] + # Required. The database to update. + # @!attribute [rw] statements + # @return [::Array<::String>] + # Required. DDL statements to be applied to the database. + # @!attribute [rw] operation_id + # @return [::String] + # If empty, the new update request is assigned an + # automatically-generated operation ID. Otherwise, `operation_id` + # is used to construct the name of the resulting + # {::Google::Longrunning::Operation Operation}. + # + # Specifying an explicit operation ID simplifies determining + # whether the statements were executed in the event that the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} + # call is replayed, or the return value is otherwise lost: the + # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} + # and `operation_id` fields can be combined to form the + # {::Google::Longrunning::Operation#name name} of the resulting + # {::Google::Longrunning::Operation longrunning.Operation}: + # `/operations/`. + # + # `operation_id` should be unique within the database, and must be + # a valid identifier: `[a-z][a-z0-9_]*`. Note that + # automatically-generated operation IDs always begin with an + # underscore. If the named operation already exists, + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} + # returns `ALREADY_EXISTS`. + # @!attribute [rw] proto_descriptors + # @return [::String] + # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. + # Contains a protobuf-serialized + # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). + # To generate it, [install](https://grpc.io/docs/protoc-installation/) and + # run `protoc` with --include_imports and --descriptor_set_out. For example, + # to generate for moon/shot/app.proto, run + # ``` + # $protoc --proto_path=/app_path --proto_path=/lib_path \ + # --include_imports \ + # --descriptor_set_out=descriptors.data \ + # moon/shot/app.proto + # ``` + # For more details, see protobuffer [self + # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + # @!attribute [rw] throughput_mode + # @return [::Boolean] + # Optional. This field is exposed to be used by the Spanner Migration Tool. + # For more details, see + # [SMT](https://github.com/GoogleCloudPlatform/spanner-migration-tool). + class UpdateDatabaseDdlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Action information extracted from a DDL statement. This proto is used to + # display the brief info of the DDL statement for the operation + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}. + # @!attribute [rw] action + # @return [::String] + # The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. + # This field is a non-empty string. + # @!attribute [rw] entity_type + # @return [::String] + # The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. + # This field can be empty string for some DDL statement, + # e.g. for statement "ANALYZE", `entity_type` = "". + # @!attribute [rw] entity_names + # @return [::Array<::String>] + # The entity name(s) being operated on the DDL statement. + # E.g. + # 1. For statement "CREATE TABLE t1(...)", `entity_names` = ["t1"]. + # 2. For statement "GRANT ROLE r1, r2 ...", `entity_names` = ["r1", "r2"]. + # 3. For statement "ANALYZE", `entity_names` = []. + class DdlStatementActionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}. + # @!attribute [rw] database + # @return [::String] + # The database being modified. + # @!attribute [rw] statements + # @return [::Array<::String>] + # For an update this list contains all the statements. For an + # individual statement, this list contains only that statement. + # @!attribute [rw] commit_timestamps + # @return [::Array<::Google::Protobuf::Timestamp>] + # Reports the commit timestamps of all statements that have + # succeeded so far, where `commit_timestamps[i]` is the commit + # timestamp for the statement `statements[i]`. + # @!attribute [r] throttled + # @return [::Boolean] + # Output only. When true, indicates that the operation is throttled e.g. + # due to resource constraints. When resources become available the operation + # will resume and this field will be false again. + # @!attribute [rw] progress + # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress>] + # The progress of the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} + # operations. All DDL statements will have continuously updating progress, + # and `progress[i]` is the operation progress for `statements[i]`. Also, + # `progress[i]` will have start time and end time populated with commit + # timestamp of operation, as well as a progress of 100% once the operation + # has completed. + # @!attribute [rw] actions + # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::DdlStatementActionInfo>] + # The brief action info for the DDL statements. + # `actions[i]` is the brief info for `statements[i]`. + class UpdateDatabaseDdlMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database DropDatabase}. + # @!attribute [rw] database + # @return [::String] + # Required. The database to be dropped. + class DropDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}. + # @!attribute [rw] database + # @return [::String] + # Required. The database whose schema we wish to get. + # Values are of the form + # `projects//instances//databases/` + class GetDatabaseDdlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}. + # @!attribute [rw] statements + # @return [::Array<::String>] + # A list of formatted DDL statements defining the schema of the database + # specified in the request. + # @!attribute [rw] proto_descriptors + # @return [::String] + # Proto descriptors stored in the database. + # Contains a protobuf-serialized + # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). + # For more details, see protobuffer [self + # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + class GetDatabaseDdlResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations ListDatabaseOperations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The instance of the database operations. + # Values are of the form `projects//instances/`. + # @!attribute [rw] filter + # @return [::String] + # An expression that filters the list of returned operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the {::Google::Longrunning::Operation Operation} + # are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} + # is + # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first, if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic. However, + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ + # `(metadata.source_type:BACKUP) AND` \ + # `(metadata.backup_info.backup:backup_howl) AND` \ + # `(metadata.name:restored_howl) AND` \ + # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Return operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. + # * The database is restored from a backup. + # * The backup name contains "backup_howl". + # * The restored database's name contains "restored_howl". + # * The operation started before 2018-03-28T14:50:00Z. + # * The operation resulted in an error. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} + # to the same `parent` and with the same `filter`. + class ListDatabaseOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations ListDatabaseOperations}. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # The list of matching database [long-running + # operations][google.longrunning.Operation]. Each operation's name will be + # prefixed by the database's name. The operation's + # {::Google::Longrunning::Operation#metadata metadata} field type + # `metadata.type_url` describes the type of the metadata. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations ListDatabaseOperations} + # call to fetch more of the matching metadata. + class ListDatabaseOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database RestoreDatabase}. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the instance in which to create the + # restored database. This instance must be in the same project and + # have the same instance configuration as the instance containing + # the source backup. Values are of the form + # `projects//instances/`. + # @!attribute [rw] database_id + # @return [::String] + # Required. The id of the database to create and restore to. This + # database must not already exist. The `database_id` appended to + # `parent` forms the full database name of the form + # `projects//instances//databases/`. + # @!attribute [rw] backup + # @return [::String] + # Name of the backup from which to restore. Values are of the form + # `projects//instances//backups/`. + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig] + # Optional. An encryption configuration describing the encryption type and + # key resources in Cloud KMS used to encrypt/decrypt the database to restore + # to. If this field is not specified, the restored database will use the same + # encryption configuration as the backup by default, namely + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} + # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. + class RestoreDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Encryption configuration for the restored database. + # @!attribute [rw] encryption_type + # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig::EncryptionType] + # Required. The encryption type of the restored database. + # @!attribute [rw] kms_key_name + # @return [::String] + # Optional. The Cloud KMS key that will be used to encrypt/decrypt the + # restored database. This field should be set only when + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} + # is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form + # `projects//locations//keyRings//cryptoKeys/`. + # @!attribute [rw] kms_key_names + # @return [::Array<::String>] + # Optional. Specifies the KMS configuration for the one or more keys used to + # encrypt the database. Values are of the form + # `projects//locations//keyRings//cryptoKeys/`. + # + # The keys referenced by kms_key_names must fully cover all + # regions of the database instance configuration. Some examples: + # * For single region database instance configs, specify a single regional + # location KMS key. + # * For multi-regional database instance configs of type GOOGLE_MANAGED, + # either specify a multi-regional location KMS key or multiple regional + # location KMS keys that cover all regions in the instance config. + # * For a database instance config of type USER_MANAGED, please specify only + # regional location KMS keys to cover each region in the instance config. + # Multi-regional location KMS keys are not supported for USER_MANAGED + # instance configs. + class RestoreDatabaseEncryptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Encryption types for the database to be restored. + module EncryptionType + # Unspecified. Do not use. + ENCRYPTION_TYPE_UNSPECIFIED = 0 + + # This is the default option when + # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig encryption_config} + # is not specified. + USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1 + + # Use Google default encryption. + GOOGLE_DEFAULT_ENCRYPTION = 2 + + # Use customer managed encryption. If specified, `kms_key_name` must + # must contain a valid Cloud KMS key. + CUSTOMER_MANAGED_ENCRYPTION = 3 + end + end + + # Metadata type for the long-running operation returned by + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database RestoreDatabase}. + # @!attribute [rw] name + # @return [::String] + # Name of the database being created and restored to. + # @!attribute [rw] source_type + # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreSourceType] + # The type of the restore source. + # @!attribute [rw] backup_info + # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupInfo] + # Information about the backup used to restore the database. + # @!attribute [rw] progress + # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress] + # The progress of the + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database RestoreDatabase} + # operation. + # @!attribute [rw] cancel_time + # @return [::Google::Protobuf::Timestamp] + # The time at which cancellation of this operation was received. + # Operations.CancelOperation + # starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not guaranteed. + # Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [rw] optimize_database_operation_name + # @return [::String] + # If exists, the name of the long-running operation that will be used to + # track the post-restore optimization process to optimize the performance of + # the restored database, and remove the dependency on the restore source. + # The name is of the form + # `projects//instances//databases//operations/` + # where the is the name of database being created and restored to. + # The metadata type of the long-running operation is + # {::Google::Cloud::Spanner::Admin::Database::V1::OptimizeRestoredDatabaseMetadata OptimizeRestoredDatabaseMetadata}. + # This long-running operation will be automatically created by the system + # after the RestoreDatabase long-running operation completes successfully. + # This operation will not be created if the restore was not successful. + class RestoreDatabaseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata type for the long-running operation used to track the progress + # of optimizations performed on a newly restored database. This long-running + # operation is automatically created by the system after the successful + # completion of a database restore, and cannot be cancelled. + # @!attribute [rw] name + # @return [::String] + # Name of the restored database being optimized. + # @!attribute [rw] progress + # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress] + # The progress of the post-restore optimizations. + class OptimizeRestoredDatabaseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Cloud Spanner database role. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the database role. Values are of the form + # `projects//instances//databases//databaseRoles/` + # where `` is as specified in the `CREATE ROLE` DDL statement. + class DatabaseRole + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles ListDatabaseRoles}. + # @!attribute [rw] parent + # @return [::String] + # Required. The database whose roles should be listed. + # Values are of the form + # `projects//instances//databases/`. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of database roles to be returned in the response. If 0 or less, + # defaults to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}. + class ListDatabaseRolesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles ListDatabaseRoles}. + # @!attribute [rw] database_roles + # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>] + # Database roles that matched the request. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles ListDatabaseRoles} + # call to fetch more of the matching roles. + class ListDatabaseRolesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#add_split_points AddSplitPoints}. + # @!attribute [rw] database + # @return [::String] + # Required. The database on whose tables/indexes split points are to be + # added. Values are of the form + # `projects//instances//databases/`. + # @!attribute [rw] split_points + # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::SplitPoints>] + # Required. The split points to add. + # @!attribute [rw] initiator + # @return [::String] + # Optional. A user-supplied tag associated with the split points. + # For example, "intital_data_load", "special_event_1". + # Defaults to "CloudAddSplitPointsAPI" if not specified. + # The length of the tag must not exceed 50 characters,else will be trimmed. + # Only valid UTF8 characters are allowed. + class AddSplitPointsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#add_split_points AddSplitPoints}. + class AddSplitPointsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The split points of a table/index. + # @!attribute [rw] table + # @return [::String] + # The table to split. + # @!attribute [rw] index + # @return [::String] + # The index to split. + # If specified, the `table` field must refer to the index's base table. + # @!attribute [rw] keys + # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::SplitPoints::Key>] + # Required. The list of split keys, i.e., the split boundaries. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The expiration timestamp of the split points. + # A timestamp in the past means immediate expiration. + # The maximum value can be 30 days in the future. + # Defaults to 10 days in the future if not specified. + class SplitPoints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A split key. + # @!attribute [rw] key_parts + # @return [::Google::Protobuf::ListValue] + # Required. The column values making up the split key. + class Key + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Internal request proto, do not use directly. + # @!attribute [rw] database + # @return [::String] + # Internal field, do not use directly. + # @!attribute [rw] operation_id + # @return [::String] + # Internal field, do not use directly. + # @!attribute [rw] vm_identity_token + # @return [::String] + # Internal field, do not use directly. + # @!attribute [rw] progress + # @return [::Float] + # Internal field, do not use directly. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # Internal field, do not use directly. + class InternalUpdateGraphOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Internal response proto, do not use directly. + class InternalUpdateGraphOperationResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicates the type of the restore source. + module RestoreSourceType + # No restore associated. + TYPE_UNSPECIFIED = 0 + + # A backup was used as the source of the restore. + BACKUP = 1 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/Gemfile new file mode 100644 index 000000000000..9f880b7cd501 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-spanner-admin-database-v1", path: "../" +else + gem "google-cloud-spanner-admin-database-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/add_split_points.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/add_split_points.rb new file mode 100644 index 000000000000..b40f9ed68996 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/add_split_points.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_AddSplitPoints_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the add_split_points call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#add_split_points. +# +def add_split_points + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new + + # Call the add_split_points method. + result = client.add_split_points request + + # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_AddSplitPoints_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/copy_backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/copy_backup.rb new file mode 100644 index 000000000000..4f5d4e196698 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/copy_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_CopyBackup_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the copy_backup call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup. +# +def copy_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new + + # Call the copy_backup method. + result = client.copy_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_DatabaseAdmin_CopyBackup_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup.rb new file mode 100644 index 000000000000..7bdb66daafbb --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_CreateBackup_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the create_backup call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup. +# +def create_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new + + # Call the create_backup method. + result = client.create_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_DatabaseAdmin_CreateBackup_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.rb new file mode 100644 index 000000000000..0e52ad4acecc --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_CreateBackupSchedule_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the create_backup_schedule call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup_schedule. +# +def create_backup_schedule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new + + # Call the create_backup_schedule method. + result = client.create_backup_schedule request + + # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_CreateBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_database.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_database.rb new file mode 100644 index 000000000000..7071ecb8f557 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_database.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_CreateDatabase_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the create_database call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database. +# +def create_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new + + # Call the create_database method. + result = client.create_database request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_DatabaseAdmin_CreateDatabase_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup.rb new file mode 100644 index 000000000000..4193a0014644 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_DeleteBackup_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the delete_backup call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup. +# +def delete_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new + + # Call the delete_backup method. + result = client.delete_backup request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.rb new file mode 100644 index 000000000000..60427f4241f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_DeleteBackupSchedule_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the delete_backup_schedule call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup_schedule. +# +def delete_backup_schedule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new + + # Call the delete_backup_schedule method. + result = client.delete_backup_schedule request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_DeleteBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/drop_database.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/drop_database.rb new file mode 100644 index 000000000000..7d960d68517c --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/drop_database.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_DropDatabase_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the drop_database call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database. +# +def drop_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new + + # Call the drop_database method. + result = client.drop_database request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_DropDatabase_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup.rb new file mode 100644 index 000000000000..45401693ebdb --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_GetBackup_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the get_backup call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup. +# +def get_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new + + # Call the get_backup method. + result = client.get_backup request + + # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.rb new file mode 100644 index 000000000000..29edea9a86fa --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_GetBackupSchedule_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the get_backup_schedule call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup_schedule. +# +def get_backup_schedule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new + + # Call the get_backup_schedule method. + result = client.get_backup_schedule request + + # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_GetBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database.rb new file mode 100644 index 000000000000..cee9d27e148b --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_GetDatabase_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the get_database call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database. +# +def get_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new + + # Call the get_database method. + result = client.get_database request + + # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Database. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_GetDatabase_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.rb new file mode 100644 index 000000000000..0bcdf7f40932 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_GetDatabaseDdl_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the get_database_ddl call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl. +# +def get_database_ddl + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new + + # Call the get_database_ddl method. + result = client.get_database_ddl request + + # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_GetDatabaseDdl_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.rb new file mode 100644 index 000000000000..ec196400f896 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_GetIamPolicy_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the get_iam_policy call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb new file mode 100644 index 000000000000..d28d071db2e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_InternalUpdateGraphOperation_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the internal_update_graph_operation call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#internal_update_graph_operation. +# +def internal_update_graph_operation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new + + # Call the internal_update_graph_operation method. + result = client.internal_update_graph_operation request + + # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_InternalUpdateGraphOperation_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.rb new file mode 100644 index 000000000000..aa01ffea3aca --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_ListBackupOperations_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the list_backup_operations call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations. +# +def list_backup_operations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new + + # Call the list_backup_operations method. + result = client.list_backup_operations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Longrunning::Operation. + p item + end +end +# [END spanner_v1_generated_DatabaseAdmin_ListBackupOperations_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.rb new file mode 100644 index 000000000000..bbb680f5318f --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_ListBackupSchedules_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the list_backup_schedules call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules. +# +def list_backup_schedules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new + + # Call the list_backup_schedules method. + result = client.list_backup_schedules request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + p item + end +end +# [END spanner_v1_generated_DatabaseAdmin_ListBackupSchedules_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backups.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backups.rb new file mode 100644 index 000000000000..db27cb097f7c --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_ListBackups_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the list_backups call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups. +# +def list_backups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new + + # Call the list_backups method. + result = client.list_backups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Backup. + p item + end +end +# [END spanner_v1_generated_DatabaseAdmin_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_operations.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_operations.rb new file mode 100644 index 000000000000..2bc09405f027 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_operations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_ListDatabaseOperations_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the list_database_operations call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations. +# +def list_database_operations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new + + # Call the list_database_operations method. + result = client.list_database_operations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Longrunning::Operation. + p item + end +end +# [END spanner_v1_generated_DatabaseAdmin_ListDatabaseOperations_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_roles.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_roles.rb new file mode 100644 index 000000000000..0c3f79067aae --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_roles.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_ListDatabaseRoles_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the list_database_roles call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles. +# +def list_database_roles + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new + + # Call the list_database_roles method. + result = client.list_database_roles request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole. + p item + end +end +# [END spanner_v1_generated_DatabaseAdmin_ListDatabaseRoles_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_databases.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_databases.rb new file mode 100644 index 000000000000..6fc0fc085df9 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_databases.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_ListDatabases_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the list_databases call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases. +# +def list_databases + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new + + # Call the list_databases method. + result = client.list_databases request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Database. + p item + end +end +# [END spanner_v1_generated_DatabaseAdmin_ListDatabases_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/restore_database.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/restore_database.rb new file mode 100644 index 000000000000..29fba6511896 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/restore_database.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_RestoreDatabase_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the restore_database call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database. +# +def restore_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new + + # Call the restore_database method. + result = client.restore_database request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_DatabaseAdmin_RestoreDatabase_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.rb new file mode 100644 index 000000000000..c009dea6b085 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_SetIamPolicy_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the set_iam_policy call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.rb new file mode 100644 index 000000000000..0758fe97ccf3 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_TestIamPermissions_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the test_iam_permissions call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup.rb new file mode 100644 index 000000000000..0d378479ff72 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_UpdateBackup_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the update_backup call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup. +# +def update_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new + + # Call the update_backup method. + result = client.update_backup request + + # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.rb new file mode 100644 index 000000000000..25c121a40b2e --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_UpdateBackupSchedule_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the update_backup_schedule call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule. +# +def update_backup_schedule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new + + # Call the update_backup_schedule method. + result = client.update_backup_schedule request + + # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. + p result +end +# [END spanner_v1_generated_DatabaseAdmin_UpdateBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database.rb new file mode 100644 index 000000000000..7e8b003939c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_UpdateDatabase_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the update_database call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database. +# +def update_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new + + # Call the update_database method. + result = client.update_database request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_DatabaseAdmin_UpdateDatabase_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.rb new file mode 100644 index 000000000000..16bc289eab58 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_DatabaseAdmin_UpdateDatabaseDdl_sync] +require "google/cloud/spanner/admin/database/v1" + +## +# Snippet for the update_database_ddl call in the DatabaseAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl. +# +def update_database_ddl + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new + + # Call the update_database_ddl method. + result = client.update_database_ddl request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_DatabaseAdmin_UpdateDatabaseDdl_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json new file mode 100644 index 000000000000..804d69497d76 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json @@ -0,0 +1,1095 @@ +{ + "client_library": { + "name": "google-cloud-spanner-admin-database-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.spanner.admin.database.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_ListDatabases_sync", + "title": "Snippet for the list_databases call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases.", + "file": "database_admin/list_databases.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_databases", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "ListDatabases", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_CreateDatabase_sync", + "title": "Snippet for the create_database call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database.", + "file": "database_admin/create_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_database", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "CreateDatabase", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_GetDatabase_sync", + "title": "Snippet for the get_database call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database.", + "file": "database_admin/get_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_database", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::Database", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "GetDatabase", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_UpdateDatabase_sync", + "title": "Snippet for the update_database call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database.", + "file": "database_admin/update_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_database", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "UpdateDatabase", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_UpdateDatabaseDdl_sync", + "title": "Snippet for the update_database_ddl call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl.", + "file": "database_admin/update_database_ddl.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_database_ddl", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "UpdateDatabaseDdl", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_DropDatabase_sync", + "title": "Snippet for the drop_database call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database.", + "file": "database_admin/drop_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "drop_database", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "DropDatabase", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_GetDatabaseDdl_sync", + "title": "Snippet for the get_database_ddl call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl.", + "file": "database_admin/get_database_ddl.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_database_ddl", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "GetDatabaseDdl", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#set_iam_policy.", + "file": "database_admin/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.SetIamPolicy", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_iam_policy.", + "file": "database_admin/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.GetIamPolicy", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#test_iam_permissions.", + "file": "database_admin/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.TestIamPermissions", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_CreateBackup_sync", + "title": "Snippet for the create_backup call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup.", + "file": "database_admin/create_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "CreateBackup", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_CopyBackup_sync", + "title": "Snippet for the copy_backup call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup.", + "file": "database_admin/copy_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "copy_backup", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "CopyBackup", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_GetBackup_sync", + "title": "Snippet for the get_backup call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup.", + "file": "database_admin/get_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::Backup", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "GetBackup", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.GetBackup", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_UpdateBackup_sync", + "title": "Snippet for the update_backup call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup.", + "file": "database_admin/update_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::Backup", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "UpdateBackup", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_DeleteBackup_sync", + "title": "Snippet for the delete_backup call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup.", + "file": "database_admin/delete_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "DeleteBackup", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_ListBackups_sync", + "title": "Snippet for the list_backups call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups.", + "file": "database_admin/list_backups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backups", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "ListBackups", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListBackups", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_RestoreDatabase_sync", + "title": "Snippet for the restore_database call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database.", + "file": "database_admin/restore_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "restore_database", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "RestoreDatabase", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_ListDatabaseOperations_sync", + "title": "Snippet for the list_database_operations call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations.", + "file": "database_admin/list_database_operations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_database_operations", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "ListDatabaseOperations", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_ListBackupOperations_sync", + "title": "Snippet for the list_backup_operations call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations.", + "file": "database_admin/list_backup_operations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_operations", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "ListBackupOperations", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_ListDatabaseRoles_sync", + "title": "Snippet for the list_database_roles call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles.", + "file": "database_admin/list_database_roles.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_database_roles", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "ListDatabaseRoles", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_AddSplitPoints_sync", + "title": "Snippet for the add_split_points call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#add_split_points.", + "file": "database_admin/add_split_points.rb", + "language": "RUBY", + "client_method": { + "short_name": "add_split_points", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#add_split_points", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "AddSplitPoints", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_CreateBackupSchedule_sync", + "title": "Snippet for the create_backup_schedule call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup_schedule.", + "file": "database_admin/create_backup_schedule.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_schedule", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup_schedule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "CreateBackupSchedule", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.CreateBackupSchedule", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_GetBackupSchedule_sync", + "title": "Snippet for the get_backup_schedule call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup_schedule.", + "file": "database_admin/get_backup_schedule.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_schedule", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup_schedule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "GetBackupSchedule", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.GetBackupSchedule", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_UpdateBackupSchedule_sync", + "title": "Snippet for the update_backup_schedule call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule.", + "file": "database_admin/update_backup_schedule.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_schedule", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "UpdateBackupSchedule", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackupSchedule", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_DeleteBackupSchedule_sync", + "title": "Snippet for the delete_backup_schedule call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup_schedule.", + "file": "database_admin/delete_backup_schedule.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_schedule", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup_schedule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "DeleteBackupSchedule", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackupSchedule", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_ListBackupSchedules_sync", + "title": "Snippet for the list_backup_schedules call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules.", + "file": "database_admin/list_backup_schedules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_schedules", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "ListBackupSchedules", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListBackupSchedules", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_DatabaseAdmin_InternalUpdateGraphOperation_sync", + "title": "Snippet for the internal_update_graph_operation call in the DatabaseAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#internal_update_graph_operation.", + "file": "database_admin/internal_update_graph_operation.rb", + "language": "RUBY", + "client_method": { + "short_name": "internal_update_graph_operation", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#internal_update_graph_operation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse", + "client": { + "short_name": "DatabaseAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" + }, + "method": { + "short_name": "InternalUpdateGraphOperation", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.InternalUpdateGraphOperation", + "service": { + "short_name": "DatabaseAdmin", + "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_test.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_test.rb new file mode 100644 index 000000000000..4761219864bf --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/spanner/admin/database/v1/spanner_database_admin_pb" +require "google/spanner/admin/database/v1/spanner_database_admin_services_pb" +require "google/cloud/spanner/admin/database/v1/database_admin" + +class ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_test.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_test.rb new file mode 100644 index 000000000000..5c96b14460f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_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 "gapic/grpc/service_stub" + +require "google/cloud/spanner/admin/database/v1/database_admin" + +class ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_backup_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_path project: "value0", instance: "value1", backup: "value2" + assert_equal "projects/value0/instances/value1/backups/value2", path + end + end + + def test_backup_schedule_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_schedule_path project: "value0", instance: "value1", database: "value2", schedule: "value3" + assert_equal "projects/value0/instances/value1/databases/value2/backupSchedules/value3", path + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_crypto_key_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_version_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path + end + end + + def test_database_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.database_path project: "value0", instance: "value1", database: "value2" + assert_equal "projects/value0/instances/value1/databases/value2", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", instance: "value1" + assert_equal "projects/value0/instances/value1", path + end + end + + def test_instance_partition_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_partition_path project: "value0", instance: "value1", instance_partition: "value2" + assert_equal "projects/value0/instances/value1/instancePartitions/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb new file mode 100644 index 000000000000..143ae5b632e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb @@ -0,0 +1,1548 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/spanner/admin/database/v1/spanner_database_admin_pb" +require "google/cloud/spanner/admin/database/v1/database_admin/rest" + + +class ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_databases + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_databases_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_databases_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_databases_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_databases({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_databases parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_databases ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_databases({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_databases(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_databases_client_stub.call_count + end + end + end + + def test_create_database + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + create_statement = "hello world" + extra_statements = ["hello world"] + encryption_config = {} + database_dialect = :DATABASE_DIALECT_UNSPECIFIED + proto_descriptors = "hello world" + + create_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_create_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_database_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_database({ parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_database parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_database ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new(parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_database({ parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_database(::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new(parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_database_client_stub.call_count + end + end + end + + def test_get_database + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::Database.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_get_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_database_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_database({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_database name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_database ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_database({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_database(::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_database_client_stub.call_count + end + end + end + + def test_update_database + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + database = {} + update_mask = {} + + update_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_update_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_database_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_database({ database: database, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_database database: database, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_database ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_database({ database: database, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_database(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_database_client_stub.call_count + end + end + end + + def test_update_database_ddl + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + database = "hello world" + statements = ["hello world"] + operation_id = "hello world" + proto_descriptors = "hello world" + throughput_mode = true + + update_database_ddl_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_update_database_ddl_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_database_ddl_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_database_ddl database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_database_ddl_client_stub.call_count + end + end + end + + def test_drop_database + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + database = "hello world" + + drop_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_drop_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, drop_database_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.drop_database({ database: database }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.drop_database database: database do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.drop_database ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new(database: database) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.drop_database({ database: database }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.drop_database(::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new(database: database), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, drop_database_client_stub.call_count + end + end + end + + def test_get_database_ddl + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + database = "hello world" + + get_database_ddl_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_get_database_ddl_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_database_ddl_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_database_ddl({ database: database }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_database_ddl database: database do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new(database: database) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_database_ddl({ database: database }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new(database: database), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_database_ddl_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_create_backup + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_id = "hello world" + backup = {} + encryption_config = {} + + create_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_create_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_backup({ parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_backup parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_backup ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new(parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_backup({ parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_backup(::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new(parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_client_stub.call_count + end + end + end + + def test_copy_backup + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_id = "hello world" + source_backup = "hello world" + expire_time = {} + encryption_config = {} + + copy_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_copy_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, copy_backup_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.copy_backup({ parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.copy_backup parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.copy_backup ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new(parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.copy_backup({ parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.copy_backup(::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new(parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, copy_backup_client_stub.call_count + end + end + end + + def test_get_backup + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_backup({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_backup name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_backup ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_backup({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_backup(::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_count + end + end + end + + def test_update_backup + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup = {} + update_mask = {} + + update_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_backup({ backup: backup, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_backup backup: backup, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_backup ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_backup({ backup: backup, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_backup(::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_client_stub.call_count + end + end + end + + def test_delete_backup + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_backup({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_backup name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_backup ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_backup({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_backup(::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_client_stub.call_count + end + end + end + + def test_list_backups + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_backups({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_backups parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_backups ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_backups({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_backups(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backups_client_stub.call_count + end + end + end + + def test_restore_database + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + database_id = "hello world" + backup = "hello world" + encryption_config = {} + + restore_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_restore_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restore_database_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.restore_database ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.restore_database(::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restore_database_client_stub.call_count + end + end + end + + def test_list_database_operations + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_database_operations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_database_operations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_database_operations_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_database_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_database_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_database_operations ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_database_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_database_operations(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_database_operations_client_stub.call_count + end + end + end + + def test_list_backup_operations + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_backup_operations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_backup_operations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_operations_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_backup_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_backup_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_backup_operations ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_backup_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_backup_operations(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_operations_client_stub.call_count + end + end + end + + def test_list_database_roles + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_database_roles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_database_roles_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_database_roles_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_database_roles({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_database_roles parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_database_roles ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_database_roles({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_database_roles(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_database_roles_client_stub.call_count + end + end + end + + def test_add_split_points + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + database = "hello world" + split_points = [{}] + initiator = "hello world" + + add_split_points_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_add_split_points_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, add_split_points_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.add_split_points({ database: database, split_points: split_points, initiator: initiator }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.add_split_points database: database, split_points: split_points, initiator: initiator do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.add_split_points ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new(database: database, split_points: split_points, initiator: initiator) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.add_split_points({ database: database, split_points: split_points, initiator: initiator }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.add_split_points(::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new(database: database, split_points: split_points, initiator: initiator), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, add_split_points_client_stub.call_count + end + end + end + + def test_create_backup_schedule + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_schedule_id = "hello world" + backup_schedule = {} + + create_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_create_backup_schedule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_schedule_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_backup_schedule({ parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_backup_schedule parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_backup_schedule({ parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_schedule_client_stub.call_count + end + end + end + + def test_get_backup_schedule + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_get_backup_schedule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_schedule_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_backup_schedule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_backup_schedule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_backup_schedule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_schedule_client_stub.call_count + end + end + end + + def test_update_backup_schedule + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup_schedule = {} + update_mask = {} + + update_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_update_backup_schedule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_schedule_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_backup_schedule backup_schedule: backup_schedule, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_schedule_client_stub.call_count + end + end + end + + def test_delete_backup_schedule + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_delete_backup_schedule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_schedule_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_backup_schedule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_backup_schedule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_backup_schedule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_schedule_client_stub.call_count + end + end + end + + def test_list_backup_schedules + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_backup_schedules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_backup_schedules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_schedules_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_backup_schedules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_backup_schedules parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_backup_schedules ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_backup_schedules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_backup_schedules(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_schedules_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb new file mode 100644 index 000000000000..c684ea03954b --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb @@ -0,0 +1,1843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/spanner/admin/database/v1/spanner_database_admin_pb" +require "google/cloud/spanner/admin/database/v1/database_admin" + +class ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_databases + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_databases_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_databases, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_databases_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_databases({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_databases parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_databases ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_databases({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_databases(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_databases_client_stub.call_rpc_count + end + end + + def test_create_database + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + create_statement = "hello world" + extra_statements = ["hello world"] + encryption_config = {} + database_dialect = :DATABASE_DIALECT_UNSPECIFIED + proto_descriptors = "hello world" + + create_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_database, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["create_statement"] + assert_equal ["hello world"], request["extra_statements"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig), request["encryption_config"] + assert_equal :DATABASE_DIALECT_UNSPECIFIED, request["database_dialect"] + assert_equal "hello world", request["proto_descriptors"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_database_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_database({ parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_database parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_database ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new(parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_database({ parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_database(::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new(parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_database_client_stub.call_rpc_count + end + end + + def test_get_database + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::Database.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_database, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_database_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_database({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_database name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_database ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_database({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_database(::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_database_client_stub.call_rpc_count + end + end + + def test_update_database + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = {} + update_mask = {} + + update_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_database, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::Database), request["database"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_database_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_database({ database: database, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_database database: database, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_database ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_database({ database: database, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_database(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_database_client_stub.call_rpc_count + end + end + + def test_update_database_ddl + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = "hello world" + statements = ["hello world"] + operation_id = "hello world" + proto_descriptors = "hello world" + throughput_mode = true + + update_database_ddl_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_database_ddl, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, request + assert_equal "hello world", request["database"] + assert_equal ["hello world"], request["statements"] + assert_equal "hello world", request["operation_id"] + assert_equal "hello world", request["proto_descriptors"] + assert_equal true, request["throughput_mode"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_database_ddl_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_database_ddl database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_database_ddl_client_stub.call_rpc_count + end + end + + def test_drop_database + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = "hello world" + + drop_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :drop_database, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest, request + assert_equal "hello world", request["database"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, drop_database_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.drop_database({ database: database }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.drop_database database: database do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.drop_database ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new(database: database) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.drop_database({ database: database }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.drop_database(::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new(database: database), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, drop_database_client_stub.call_rpc_count + end + end + + def test_get_database_ddl + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = "hello world" + + get_database_ddl_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_database_ddl, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest, request + assert_equal "hello world", request["database"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_database_ddl_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_database_ddl({ database: database }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_database_ddl database: database do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new(database: database) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_database_ddl({ database: database }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new(database: database), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_database_ddl_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_create_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_id = "hello world" + backup = {} + encryption_config = {} + + create_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::Backup), request["backup"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig), request["encryption_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_backup({ parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_backup parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_backup ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new(parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_backup({ parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_backup(::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new(parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_backup_client_stub.call_rpc_count + end + end + + def test_copy_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_id = "hello world" + source_backup = "hello world" + expire_time = {} + encryption_config = {} + + copy_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :copy_backup, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_id"] + assert_equal "hello world", request["source_backup"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["expire_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig), request["encryption_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, copy_backup_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.copy_backup({ parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.copy_backup parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.copy_backup ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new(parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.copy_backup({ parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.copy_backup(::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new(parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, copy_backup_client_stub.call_rpc_count + end + end + + def test_get_backup + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_backup({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_backup name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_backup ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_backup({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_backup(::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_rpc_count + end + end + + def test_update_backup + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup = {} + update_mask = {} + + update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::Backup), request["backup"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_backup({ backup: backup, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_backup backup: backup, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_backup ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_backup({ backup: backup, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_backup(::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_client_stub.call_rpc_count + end + end + + def test_delete_backup + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_backup({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_backup name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_backup ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_backup({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_backup(::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_backup_client_stub.call_rpc_count + end + end + + def test_list_backups + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backups, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backups_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_backups({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_backups parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_backups ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_backups({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_backups(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backups_client_stub.call_rpc_count + end + end + + def test_restore_database + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + database_id = "hello world" + backup = "hello world" + encryption_config = {} + + restore_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restore_database, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["database_id"] + assert_equal "hello world", request["backup"] + assert_equal :backup, request.source + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig), request["encryption_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, restore_database_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.restore_database ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.restore_database(::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, restore_database_client_stub.call_rpc_count + end + end + + def test_list_database_operations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_database_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_database_operations, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_database_operations_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_database_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_database_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_database_operations ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_database_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_database_operations(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_database_operations_client_stub.call_rpc_count + end + end + + def test_list_backup_operations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_backup_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_operations, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_operations_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_backup_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_backup_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_backup_operations ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_backup_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_backup_operations(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backup_operations_client_stub.call_rpc_count + end + end + + def test_list_database_roles + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_database_roles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_database_roles, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_database_roles_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_database_roles({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_database_roles parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_database_roles ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_database_roles({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_database_roles(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_database_roles_client_stub.call_rpc_count + end + end + + def test_add_split_points + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = "hello world" + split_points = [{}] + initiator = "hello world" + + add_split_points_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :add_split_points, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest, request + assert_equal "hello world", request["database"] + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::SplitPoints, request["split_points"].first + assert_equal "hello world", request["initiator"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, add_split_points_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.add_split_points({ database: database, split_points: split_points, initiator: initiator }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.add_split_points database: database, split_points: split_points, initiator: initiator do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.add_split_points ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new(database: database, split_points: split_points, initiator: initiator) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.add_split_points({ database: database, split_points: split_points, initiator: initiator }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.add_split_points(::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new(database: database, split_points: split_points, initiator: initiator), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, add_split_points_client_stub.call_rpc_count + end + end + + def test_create_backup_schedule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_schedule_id = "hello world" + backup_schedule = {} + + create_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_schedule, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backup_schedule_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule), request["backup_schedule"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_schedule_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_backup_schedule({ parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_backup_schedule parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_backup_schedule({ parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_backup_schedule_client_stub.call_rpc_count + end + end + + def test_get_backup_schedule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_schedule, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_schedule_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_backup_schedule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_backup_schedule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_backup_schedule({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_schedule_client_stub.call_rpc_count + end + end + + def test_update_backup_schedule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup_schedule = {} + update_mask = {} + + update_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_schedule, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule), request["backup_schedule"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_schedule_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_backup_schedule backup_schedule: backup_schedule, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_backup_schedule_client_stub.call_rpc_count + end + end + + def test_delete_backup_schedule + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_schedule, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_schedule_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_backup_schedule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_backup_schedule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_backup_schedule({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_backup_schedule_client_stub.call_rpc_count + end + end + + def test_list_backup_schedules + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_backup_schedules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_schedules, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_schedules_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_backup_schedules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_backup_schedules parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_backup_schedules ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_backup_schedules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_backup_schedules(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backup_schedules_client_stub.call_rpc_count + end + end + + def test_internal_update_graph_operation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = "hello world" + operation_id = "hello world" + vm_identity_token = "hello world" + progress = 3.5 + status = {} + + internal_update_graph_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :internal_update_graph_operation, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest, request + assert_equal "hello world", request["database"] + assert_equal "hello world", request["operation_id"] + assert_equal "hello world", request["vm_identity_token"] + assert_equal 3.5, request["progress"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Rpc::Status), request["status"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, internal_update_graph_operation_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.internal_update_graph_operation({ database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.internal_update_graph_operation database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.internal_update_graph_operation ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new(database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.internal_update_graph_operation({ database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.internal_update_graph_operation(::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new(database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, internal_update_graph_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/helper.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-database-v1/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-spanner-admin-instance-v1/.gitignore b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.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-spanner-admin-instance-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.repo-metadata.json new file mode 100644 index 000000000000..f5020bbedc04 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "spanner.googleapis.com", + "api_shortname": "spanner", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-instance-v1/latest", + "distribution_name": "google-cloud-spanner-admin-instance-v1", + "is_cloud": true, + "language": "ruby", + "name": "spanner", + "name_pretty": "Cloud Spanner Instance Admin V1 API", + "product_documentation": "https://cloud.google.com/spanner", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-admin-instance-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details.", + "ruby-cloud-env-prefix": "SPANNER", + "ruby-cloud-product-url": "https://cloud.google.com/spanner", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.rubocop.yml b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.rubocop.yml new file mode 100644 index 000000000000..d1a683d9ac76 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-spanner-admin-instance-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-spanner-admin-instance-v1.rb" diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.toys.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.yardopts b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.yardopts new file mode 100644 index 000000000000..5a169a006a69 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Spanner Instance Admin V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..cfb0ca7fb54f --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-spanner-admin-instance-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-spanner-admin-instance-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/spanner/admin/instance/v1" + +client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/spanner/admin/instance/v1" + +::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-spanner-admin-instance-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/spanner/admin/instance/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/Gemfile b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-spanner-admin-instance-v1/LICENSE.md b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/README.md b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/README.md new file mode 100644 index 000000000000..b5822cdbe42b --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Spanner Instance Admin V1 API + +Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Spanner Instance Admin V1 API. Most users should consider using +the main client gem, +[google-cloud-spanner](https://rubygems.org/gems/google-cloud-spanner). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-spanner-admin-instance-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/spanner.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/spanner/admin/instance/v1" + +client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new +request = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new # (request fields as keyword arguments...) +response = client.list_instance_configs request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-instance-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/spanner) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/spanner/admin/instance/v1" +require "logger" + +client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-spanner`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-spanner-admin-instance-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-spanner`. +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-spanner-admin-instance-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-spanner-admin-instance-v1/Rakefile b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/Rakefile new file mode 100644 index 000000000000..ec4f0e71b11c --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-spanner-admin-instance-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SPANNER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SPANNER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SPANNER_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 SPANNER_TEST_PROJECT=test123 SPANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/spanner/admin/instance/v1/instance_admin/credentials" + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SPANNER_PROJECT"] = project + ENV["SPANNER_TEST_PROJECT"] = project + ENV["SPANNER_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-spanner-admin-instance-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-spanner-admin-instance-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-spanner-admin-instance-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-spanner-admin-instance-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-spanner-admin-instance-v1" + header "google-cloud-spanner-admin-instance-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-spanner-admin-instance-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-spanner-admin-instance-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-spanner-admin-instance-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-spanner-admin-instance-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/gapic_metadata.json new file mode 100644 index 000000000000..2e44d0f21e72 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/gapic_metadata.json @@ -0,0 +1,123 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.spanner.admin.instance.v1", + "libraryPackage": "::Google::Cloud::Spanner::Admin::Instance::V1", + "services": { + "InstanceAdmin": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client", + "rpcs": { + "ListInstanceConfigs": { + "methods": [ + "list_instance_configs" + ] + }, + "GetInstanceConfig": { + "methods": [ + "get_instance_config" + ] + }, + "CreateInstanceConfig": { + "methods": [ + "create_instance_config" + ] + }, + "UpdateInstanceConfig": { + "methods": [ + "update_instance_config" + ] + }, + "DeleteInstanceConfig": { + "methods": [ + "delete_instance_config" + ] + }, + "ListInstanceConfigOperations": { + "methods": [ + "list_instance_config_operations" + ] + }, + "ListInstances": { + "methods": [ + "list_instances" + ] + }, + "ListInstancePartitions": { + "methods": [ + "list_instance_partitions" + ] + }, + "GetInstance": { + "methods": [ + "get_instance" + ] + }, + "CreateInstance": { + "methods": [ + "create_instance" + ] + }, + "UpdateInstance": { + "methods": [ + "update_instance" + ] + }, + "DeleteInstance": { + "methods": [ + "delete_instance" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "GetInstancePartition": { + "methods": [ + "get_instance_partition" + ] + }, + "CreateInstancePartition": { + "methods": [ + "create_instance_partition" + ] + }, + "DeleteInstancePartition": { + "methods": [ + "delete_instance_partition" + ] + }, + "UpdateInstancePartition": { + "methods": [ + "update_instance_partition" + ] + }, + "ListInstancePartitionOperations": { + "methods": [ + "list_instance_partition_operations" + ] + }, + "MoveInstance": { + "methods": [ + "move_instance" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec new file mode 100644 index 000000000000..7023112563df --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/spanner/admin/instance/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-spanner-admin-instance-v1" + gem.version = Google::Cloud::Spanner::Admin::Instance::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-admin-instance-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details." + gem.summary = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.rb new file mode 100644 index 000000000000..31e76b3589b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/spanner/admin/instance/v1" diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.rb new file mode 100644 index 000000000000..36a77f21a4d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/spanner/admin/instance/v1/instance_admin" +require "google/cloud/spanner/admin/instance/v1/version" + +module Google + module Cloud + module Spanner + module Admin + module Instance + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/spanner/admin/instance/v1" + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/spanner/admin/instance/v1" + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + module V1 + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/spanner/admin/instance/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb new file mode 100644 index 000000000000..80c300501ca9 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/spanner/admin/instance/v1/version" + +require "google/cloud/spanner/admin/instance/v1/instance_admin/credentials" +require "google/cloud/spanner/admin/instance/v1/instance_admin/paths" +require "google/cloud/spanner/admin/instance/v1/instance_admin/operations" +require "google/cloud/spanner/admin/instance/v1/instance_admin/client" +require "google/cloud/spanner/admin/instance/v1/instance_admin/rest" + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + ## + # Cloud Spanner Instance Admin API + # + # The Cloud Spanner Instance Admin API can be used to create, delete, + # modify and list instances. Instances are dedicated Cloud Spanner serving + # and storage resources to be used by Cloud Spanner databases. + # + # Each instance has a "configuration", which dictates where the + # serving resources for the Cloud Spanner instance are located (e.g., + # US-central, Europe). Configurations are created by Google based on + # resource availability. + # + # Cloud Spanner billing is based on the instances that exist and their + # sizes. After an instance exists, there are no additional + # per-database or per-operation charges for use of the instance + # (though there may be additional network bandwidth charges). + # Instances offer isolation: problems with databases in one instance + # will not affect other instances. However, within an instance + # databases can affect each other. For example, if one database in an + # instance receives a lot of requests and consumes most of the + # instance resources, fewer resources are available for other + # databases in that instance, and their performance may suffer. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/spanner/admin/instance/v1/instance_admin" + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/spanner/admin/instance/v1/instance_admin/rest" + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + module InstanceAdmin + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "instance_admin", "helpers.rb" +require "google/cloud/spanner/admin/instance/v1/instance_admin/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb new file mode 100644 index 000000000000..0d6216cdec1f --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb @@ -0,0 +1,3142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + module InstanceAdmin + ## + # Client for the InstanceAdmin service. + # + # Cloud Spanner Instance Admin API + # + # The Cloud Spanner Instance Admin API can be used to create, delete, + # modify and list instances. Instances are dedicated Cloud Spanner serving + # and storage resources to be used by Cloud Spanner databases. + # + # Each instance has a "configuration", which dictates where the + # serving resources for the Cloud Spanner instance are located (e.g., + # US-central, Europe). Configurations are created by Google based on + # resource availability. + # + # Cloud Spanner billing is based on the instances that exist and their + # sizes. After an instance exists, there are no additional + # per-database or per-operation charges for use of the instance + # (though there may be additional network bandwidth charges). + # Instances offer isolation: problems with databases in one instance + # will not affect other instances. However, within an instance + # databases can affect each other. For example, if one database in an + # instance receives a lot of requests and consumes most of the + # instance resources, fewer resources are available for other + # databases in that instance, and their performance may suffer. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :instance_admin_stub + + ## + # Configure the InstanceAdmin Client class. + # + # See {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InstanceAdmin clients + # ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Spanner", "Admin", "Instance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_instance_configs.timeout = 3600.0 + default_config.rpcs.list_instance_configs.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_instance_config.timeout = 3600.0 + default_config.rpcs.get_instance_config.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_instances.timeout = 3600.0 + default_config.rpcs.list_instances.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_instance.timeout = 3600.0 + default_config.rpcs.get_instance.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_instance.timeout = 3600.0 + + default_config.rpcs.update_instance.timeout = 3600.0 + + default_config.rpcs.delete_instance.timeout = 3600.0 + default_config.rpcs.delete_instance.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.set_iam_policy.timeout = 30.0 + + default_config.rpcs.get_iam_policy.timeout = 30.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.test_iam_permissions.timeout = 30.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InstanceAdmin Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @instance_admin_stub.universe_domain + end + + ## + # Create a new InstanceAdmin client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InstanceAdmin client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/spanner/admin/instance/v1/spanner_instance_admin_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @instance_admin_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @instance_admin_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @instance_admin_stub.logger + end + + # Service calls + + ## + # Lists the supported instance configurations for a given project. + # + # Returns both Google-managed configurations and user-managed + # configurations. + # + # @overload list_instance_configs(request, options = nil) + # Pass arguments to `list_instance_configs` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_instance_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_instance_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project for which a list of supported instance + # configurations is requested. Values are of the form + # `projects/`. + # @param page_size [::Integer] + # Number of instance configurations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse ListInstanceConfigsResponse}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new + # + # # Call the list_instance_configs method. + # result = client.list_instance_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. + # p item + # end + # + def list_instance_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_instance_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_instance_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_instance_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :list_instance_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information about a particular instance configuration. + # + # @overload get_instance_config(request, options = nil) + # Pass arguments to `get_instance_config` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_instance_config(name: nil) + # Pass arguments to `get_instance_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the requested instance configuration. Values are of + # the form `projects//instanceConfigs/`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new + # + # # Call the get_instance_config method. + # result = client.get_instance_config request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. + # p result + # + def get_instance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_instance_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_instance_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_instance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :get_instance_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an instance configuration and begins preparing it to be used. The + # returned long-running operation + # can be used to track the progress of preparing the new + # instance configuration. The instance configuration name is assigned by the + # caller. If the named instance configuration already exists, + # `CreateInstanceConfig` returns `ALREADY_EXISTS`. + # + # Immediately after the request returns: + # + # * The instance configuration is readable via the API, with all requested + # attributes. The instance configuration's + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} + # field is set to true. Its state is `CREATING`. + # + # While the operation is pending: + # + # * Cancelling the operation renders the instance configuration immediately + # unreadable via the API. + # * Except for deleting the creating resource, all other attempts to modify + # the instance configuration are rejected. + # + # Upon completion of the returned operation: + # + # * Instances can be created using the instance configuration. + # * The instance configuration's + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} + # field becomes false. Its state becomes `READY`. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to track + # creation of the instance configuration. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if + # successful. + # + # Authorization requires `spanner.instanceConfigs.create` permission on + # the resource + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest#parent parent}. + # + # @overload create_instance_config(request, options = nil) + # Pass arguments to `create_instance_config` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_instance_config(parent: nil, instance_config_id: nil, instance_config: nil, validate_only: nil) + # Pass arguments to `create_instance_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project in which to create the instance + # configuration. Values are of the form `projects/`. + # @param instance_config_id [::String] + # Required. The ID of the instance configuration to create. Valid identifiers + # are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 + # characters in length. The `custom-` prefix is required to avoid name + # conflicts with Google-managed configurations. + # @param instance_config [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig, ::Hash] + # Required. The `InstanceConfig` proto of the configuration to create. + # `instance_config.name` must be + # `/instanceConfigs/`. + # `instance_config.base_config` must be a Google-managed configuration name, + # e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3. + # @param validate_only [::Boolean] + # An option to validate, but not actually execute, a request, + # and provide the same response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new + # + # # Call the create_instance_config method. + # result = client.create_instance_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_instance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_instance_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_instance_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_instance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :create_instance_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an instance configuration. The returned + # long-running operation can be used to track + # the progress of updating the instance. If the named instance configuration + # does not exist, returns `NOT_FOUND`. + # + # Only user-managed configurations can be updated. + # + # Immediately after the request returns: + # + # * The instance configuration's + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} + # field is set to true. + # + # While the operation is pending: + # + # * Cancelling the operation sets its metadata's + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigMetadata#cancel_time cancel_time}. + # The operation is guaranteed to succeed at undoing all changes, after + # which point it terminates with a `CANCELLED` status. + # * All other attempts to modify the instance configuration are rejected. + # * Reading the instance configuration via the API continues to give the + # pre-request values. + # + # Upon completion of the returned operation: + # + # * Creating instances using the instance configuration uses the new + # values. + # * The new values of the instance configuration are readable via the API. + # * The instance configuration's + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} + # field becomes false. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to track + # the instance configuration modification. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigMetadata UpdateInstanceConfigMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if + # successful. + # + # Authorization requires `spanner.instanceConfigs.update` permission on + # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#name name}. + # + # @overload update_instance_config(request, options = nil) + # Pass arguments to `update_instance_config` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_instance_config(instance_config: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_instance_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance_config [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig, ::Hash] + # Required. The user instance configuration to update, which must always + # include the instance configuration name. Otherwise, only fields mentioned + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest#update_mask update_mask} + # need be included. To prevent conflicts of concurrent updates, + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling etag} can + # be used. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask specifying which fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} should be + # updated. The field mask must always be specified; this prevents any future + # fields in {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} + # from being erased accidentally by clients that do not know about them. Only + # display_name and labels can be updated. + # @param validate_only [::Boolean] + # An option to validate, but not actually execute, a request, + # and provide the same response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new + # + # # Call the update_instance_config method. + # result = client.update_instance_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_instance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_instance_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.instance_config&.name + header_params["instance_config.name"] = request.instance_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_instance_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_instance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :update_instance_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the instance configuration. Deletion is only allowed when no + # instances are using the configuration. If any instances are using + # the configuration, returns `FAILED_PRECONDITION`. + # + # Only user-managed configurations can be deleted. + # + # Authorization requires `spanner.instanceConfigs.delete` permission on + # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#name name}. + # + # @overload delete_instance_config(request, options = nil) + # Pass arguments to `delete_instance_config` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_instance_config(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_instance_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the instance configuration to be deleted. + # Values are of the form + # `projects//instanceConfigs/` + # @param etag [::String] + # Used for optimistic concurrency control as a way to help prevent + # simultaneous deletes of an instance configuration from overwriting each + # other. If not empty, the API + # only deletes the instance configuration when the etag provided matches the + # current status of the requested instance configuration. Otherwise, deletes + # the instance configuration without checking the current status of the + # requested instance configuration. + # @param validate_only [::Boolean] + # An option to validate, but not actually execute, a request, + # and provide the same response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new + # + # # Call the delete_instance_config method. + # result = client.delete_instance_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_instance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_instance_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_instance_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_instance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :delete_instance_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the user-managed instance configuration long-running + # operations in the given project. An instance + # configuration operation has a name of the form + # `projects//instanceConfigs//operations/`. + # The long-running operation + # metadata field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. Operations returned are ordered by + # `operation.metadata.value.start_time` in descending order starting + # from the most recently started operation. + # + # @overload list_instance_config_operations(request, options = nil) + # Pass arguments to `list_instance_config_operations` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_instance_config_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_instance_config_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project of the instance configuration operations. + # Values are of the form `projects/`. + # @param filter [::String] + # An expression that filters the list of returned operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the Operation are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata} + # is + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first, if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic. However, + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=` \ + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + # AND` \ + # `(metadata.instance_config.name:custom-config) AND` \ + # `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Return operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}. + # * The instance configuration name contains "custom-config". + # * The operation started before 2021-03-28T14:50:00Z. + # * The operation resulted in an error. + # @param page_size [::Integer] + # Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse ListInstanceConfigOperationsResponse} + # to the same `parent` and with the same `filter`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new + # + # # Call the list_instance_config_operations method. + # result = client.list_instance_config_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_instance_config_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_instance_config_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_instance_config_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_instance_config_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :list_instance_config_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_config_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all instances in the given project. + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, instance_deadline: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project for which a list of instances is + # requested. Values are of the form `projects/`. + # @param page_size [::Integer] + # Number of instances to be returned in the response. If 0 or less, defaults + # to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `display_name` + # * `labels.key` where key is the name of a label + # + # Some examples of using filters are: + # + # * `name:*` --> The instance has a name. + # * `name:Howl` --> The instance's name contains the string "howl". + # * `name:HOWL` --> Equivalent to above. + # * `NAME:howl` --> Equivalent to above. + # * `labels.env:*` --> The instance has the label "env". + # * `labels.env:dev` --> The instance has the label "env" and the value of + # the label contains the string "dev". + # * `name:howl labels.env:dev` --> The instance's name contains "howl" and + # it has the label "env" with its value + # containing "dev". + # @param instance_deadline [::Google::Protobuf::Timestamp, ::Hash] + # Deadline used while retrieving metadata for instances. + # Instances whose metadata cannot be retrieved within this deadline will be + # added to + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#unreachable unreachable} + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::Instance>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::Instance>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_instances.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :list_instances, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instances, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all instance partitions for the given instance. + # + # @overload list_instance_partitions(request, options = nil) + # Pass arguments to `list_instance_partitions` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_instance_partitions(parent: nil, page_size: nil, page_token: nil, instance_partition_deadline: nil) + # Pass arguments to `list_instance_partitions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance whose instance partitions should be listed. Values + # are of the form `projects//instances/`. Use `{instance} + # = '-'` to list instance partitions for all Instances in a project, e.g., + # `projects/myproject/instances/-`. + # @param page_size [::Integer] + # Number of instance partitions to be returned in the response. If 0 or less, + # defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. + # @param instance_partition_deadline [::Google::Protobuf::Timestamp, ::Hash] + # Optional. Deadline used while retrieving metadata for instance partitions. + # Instance partitions whose metadata cannot be retrieved within this deadline + # will be added to + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#unreachable unreachable} + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new + # + # # Call the list_instance_partitions method. + # result = client.list_instance_partitions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. + # p item + # end + # + def list_instance_partitions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_instance_partitions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_instance_partitions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_instance_partitions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :list_instance_partitions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_partitions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information about a particular instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_instance(name: nil, field_mask: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the requested instance. Values are of the form + # `projects//instances/`. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # If field_mask is present, specifies the subset of + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields that should be + # returned. If absent, all + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields are returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :get_instance, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an instance and begins preparing it to begin serving. The + # returned long-running operation + # can be used to track the progress of preparing the new + # instance. The instance name is assigned by the caller. If the + # named instance already exists, `CreateInstance` returns + # `ALREADY_EXISTS`. + # + # Immediately upon completion of this request: + # + # * The instance is readable via the API, with all requested attributes + # but no allocated resources. Its state is `CREATING`. + # + # Until completion of the returned operation: + # + # * Cancelling the operation renders the instance immediately unreadable + # via the API. + # * The instance can be deleted. + # * All other attempts to modify the instance are rejected. + # + # Upon completion of the returned operation: + # + # * Billing for all successfully-allocated resources begins (some types + # may have lower than the requested levels). + # * Databases can be created in the instance. + # * The instance's allocated resource levels are readable via the API. + # * The instance's state becomes `READY`. + # + # The returned long-running operation will + # have a name of the format `/operations/` and + # can be used to track creation of the instance. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceMetadata CreateInstanceMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful. + # + # @overload create_instance(request, options = nil) + # Pass arguments to `create_instance` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_instance(parent: nil, instance_id: nil, instance: nil) + # Pass arguments to `create_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project in which to create the instance. Values + # are of the form `projects/`. + # @param instance_id [::String] + # Required. The ID of the instance to create. Valid identifiers are of the + # form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in + # length. + # @param instance [::Google::Cloud::Spanner::Admin::Instance::V1::Instance, ::Hash] + # Required. The instance to create. The name may be omitted, but if + # specified must be `/instances/`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new + # + # # Call the create_instance method. + # result = client.create_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :create_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an instance, and begins allocating or releasing resources + # as requested. The returned long-running operation can be used to track the + # progress of updating the instance. If the named instance does not + # exist, returns `NOT_FOUND`. + # + # Immediately upon completion of this request: + # + # * For resource types for which a decrease in the instance's allocation + # has been requested, billing is based on the newly-requested level. + # + # Until completion of the returned operation: + # + # * Cancelling the operation sets its metadata's + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceMetadata#cancel_time cancel_time}, + # and begins restoring resources to their pre-request values. The + # operation is guaranteed to succeed at undoing all resource changes, + # after which point it terminates with a `CANCELLED` status. + # * All other attempts to modify the instance are rejected. + # * Reading the instance via the API continues to give the pre-request + # resource levels. + # + # Upon completion of the returned operation: + # + # * Billing begins for all successfully-allocated resources (some types + # may have lower than the requested levels). + # * All newly-reserved resources are available for serving the instance's + # tables. + # * The instance's new resource levels are readable via the API. + # + # The returned long-running operation will + # have a name of the format `/operations/` and + # can be used to track the instance modification. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceMetadata UpdateInstanceMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful. + # + # Authorization requires `spanner.instances.update` permission on + # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::Instance#name name}. + # + # @overload update_instance(request, options = nil) + # Pass arguments to `update_instance` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_instance(instance: nil, field_mask: nil) + # Pass arguments to `update_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance [::Google::Cloud::Spanner::Admin::Instance::V1::Instance, ::Hash] + # Required. The instance to update, which must always include the instance + # name. Otherwise, only fields mentioned in + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest#field_mask field_mask} + # need be included. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask specifying which fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} should be updated. + # The field mask must always be specified; this prevents any future fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} from being erased + # accidentally by clients that do not know about them. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new + # + # # Call the update_instance method. + # result = client.update_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.instance&.name + header_params["instance.name"] = request.instance.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :update_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an instance. + # + # Immediately upon completion of the request: + # + # * Billing ceases for all of the instance's reserved resources. + # + # Soon afterward: + # + # * The instance and *all of its databases* immediately and + # irrevocably disappear from the API. All data in the databases + # is permanently deleted. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_instance(name: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the instance to be deleted. Values are of the form + # `projects//instances/` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :delete_instance, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on an instance resource. Replaces any + # existing policy. + # + # Authorization requires `spanner.instances.setIamPolicy` on + # [resource][google.iam.v1.SetIamPolicyRequest.resource]. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for an instance resource. Returns an empty + # policy if an instance exists but does not have a policy set. + # + # Authorization requires `spanner.instances.getIamPolicy` on + # [resource][google.iam.v1.GetIamPolicyRequest.resource]. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that the caller has on the specified instance resource. + # + # Attempting this RPC on a non-existent Cloud Spanner instance resource will + # result in a NOT_FOUND error if the user has `spanner.instances.list` + # permission on the containing Google Cloud Project. Otherwise returns an + # empty set of permissions. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information about a particular instance partition. + # + # @overload get_instance_partition(request, options = nil) + # Pass arguments to `get_instance_partition` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_instance_partition(name: nil) + # Pass arguments to `get_instance_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the requested instance partition. Values are of + # the form + # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new + # + # # Call the get_instance_partition method. + # result = client.get_instance_partition request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. + # p result + # + def get_instance_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_instance_partition.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_instance_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_instance_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :get_instance_partition, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an instance partition and begins preparing it to be used. The + # returned long-running operation + # can be used to track the progress of preparing the new instance partition. + # The instance partition name is assigned by the caller. If the named + # instance partition already exists, `CreateInstancePartition` returns + # `ALREADY_EXISTS`. + # + # Immediately upon completion of this request: + # + # * The instance partition is readable via the API, with all requested + # attributes but no allocated resources. Its state is `CREATING`. + # + # Until completion of the returned operation: + # + # * Cancelling the operation renders the instance partition immediately + # unreadable via the API. + # * The instance partition can be deleted. + # * All other attempts to modify the instance partition are rejected. + # + # Upon completion of the returned operation: + # + # * Billing for all successfully-allocated resources begins (some types + # may have lower than the requested levels). + # * Databases can start using this instance partition. + # * The instance partition's allocated resource levels are readable via the + # API. + # * The instance partition's state becomes `READY`. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to + # track creation of the instance partition. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if + # successful. + # + # @overload create_instance_partition(request, options = nil) + # Pass arguments to `create_instance_partition` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_instance_partition(parent: nil, instance_partition_id: nil, instance_partition: nil) + # Pass arguments to `create_instance_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the instance in which to create the instance + # partition. Values are of the form + # `projects//instances/`. + # @param instance_partition_id [::String] + # Required. The ID of the instance partition to create. Valid identifiers are + # of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 + # characters in length. + # @param instance_partition [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition, ::Hash] + # Required. The instance partition to create. The instance_partition.name may + # be omitted, but if specified must be + # `/instancePartitions/`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new + # + # # Call the create_instance_partition method. + # result = client.create_instance_partition request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_instance_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_instance_partition.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_instance_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_instance_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :create_instance_partition, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing instance partition. Requires that the + # instance partition is not used by any database or backup and is not the + # default instance partition of an instance. + # + # Authorization requires `spanner.instancePartitions.delete` permission on + # the resource + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition#name name}. + # + # @overload delete_instance_partition(request, options = nil) + # Pass arguments to `delete_instance_partition` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_instance_partition(name: nil, etag: nil) + # Pass arguments to `delete_instance_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the instance partition to be deleted. + # Values are of the form + # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` + # @param etag [::String] + # Optional. If not empty, the API only deletes the instance partition when + # the etag provided matches the current status of the requested instance + # partition. Otherwise, deletes the instance partition without checking the + # current status of the requested instance partition. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new + # + # # Call the delete_instance_partition method. + # result = client.delete_instance_partition request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_instance_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_instance_partition.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_instance_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_instance_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :delete_instance_partition, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an instance partition, and begins allocating or releasing resources + # as requested. The returned long-running operation can be used to track the + # progress of updating the instance partition. If the named instance + # partition does not exist, returns `NOT_FOUND`. + # + # Immediately upon completion of this request: + # + # * For resource types for which a decrease in the instance partition's + # allocation has been requested, billing is based on the newly-requested + # level. + # + # Until completion of the returned operation: + # + # * Cancelling the operation sets its metadata's + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionMetadata#cancel_time cancel_time}, + # and begins restoring resources to their pre-request values. The + # operation is guaranteed to succeed at undoing all resource changes, + # after which point it terminates with a `CANCELLED` status. + # * All other attempts to modify the instance partition are rejected. + # * Reading the instance partition via the API continues to give the + # pre-request resource levels. + # + # Upon completion of the returned operation: + # + # * Billing begins for all successfully-allocated resources (some types + # may have lower than the requested levels). + # * All newly-reserved resources are available for serving the instance + # partition's tables. + # * The instance partition's new resource levels are readable via the API. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to + # track the instance partition modification. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionMetadata UpdateInstancePartitionMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if + # successful. + # + # Authorization requires `spanner.instancePartitions.update` permission on + # the resource + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition#name name}. + # + # @overload update_instance_partition(request, options = nil) + # Pass arguments to `update_instance_partition` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_instance_partition(instance_partition: nil, field_mask: nil) + # Pass arguments to `update_instance_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance_partition [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition, ::Hash] + # Required. The instance partition to update, which must always include the + # instance partition name. Otherwise, only fields mentioned in + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest#field_mask field_mask} + # need be included. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask specifying which fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} + # should be updated. The field mask must always be specified; this prevents + # any future fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} + # from being erased accidentally by clients that do not know about them. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new + # + # # Call the update_instance_partition method. + # result = client.update_instance_partition request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_instance_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_instance_partition.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.instance_partition&.name + header_params["instance_partition.name"] = request.instance_partition.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_instance_partition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_instance_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :update_instance_partition, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists instance partition long-running operations in the given instance. + # An instance partition operation has a name of the form + # `projects//instances//instancePartitions//operations/`. + # The long-running operation + # metadata field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. Operations returned are ordered by + # `operation.metadata.value.start_time` in descending order starting from the + # most recently started operation. + # + # Authorization requires `spanner.instancePartitionOperations.list` + # permission on the resource + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest#parent parent}. + # + # @overload list_instance_partition_operations(request, options = nil) + # Pass arguments to `list_instance_partition_operations` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_instance_partition_operations(parent: nil, filter: nil, page_size: nil, page_token: nil, instance_partition_deadline: nil) + # Pass arguments to `list_instance_partition_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent instance of the instance partition operations. + # Values are of the form `projects//instances/`. + # @param filter [::String] + # Optional. An expression that filters the list of returned operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the Operation are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata} + # is + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first, if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic. However, + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=` \ + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + # AND` \ + # `(metadata.instance_partition.name:custom-instance-partition) AND` \ + # `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Return operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}. + # * The instance partition name contains "custom-instance-partition". + # * The operation started before 2021-03-28T14:50:00Z. + # * The operation resulted in an error. + # @param page_size [::Integer] + # Optional. Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # Optional. If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse} + # to the same `parent` and with the same `filter`. + # @param instance_partition_deadline [::Google::Protobuf::Timestamp, ::Hash] + # Optional. Deadline used while retrieving metadata for instance partition + # operations. Instance partitions whose operation metadata cannot be + # retrieved within this deadline will be added to + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#unreachable_instance_partitions unreachable_instance_partitions} + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new + # + # # Call the list_instance_partition_operations method. + # result = client.list_instance_partition_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_instance_partition_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_instance_partition_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_instance_partition_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_instance_partition_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :list_instance_partition_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_partition_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Moves an instance to the target instance configuration. You can use the + # returned long-running operation to track + # the progress of moving the instance. + # + # `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of + # the following criteria: + # + # * Is undergoing a move to a different instance configuration + # * Has backups + # * Has an ongoing update + # * Contains any CMEK-enabled databases + # * Is a free trial instance + # + # While the operation is pending: + # + # * All other attempts to modify the instance, including changes to its + # compute capacity, are rejected. + # * The following database and backup admin operations are rejected: + # + # * `DatabaseAdmin.CreateDatabase` + # * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is + # specified in the request.) + # * `DatabaseAdmin.RestoreDatabase` + # * `DatabaseAdmin.CreateBackup` + # * `DatabaseAdmin.CopyBackup` + # + # * Both the source and target instance configurations are subject to + # hourly compute and storage charges. + # * The instance might experience higher read-write latencies and a higher + # transaction abort rate. However, moving an instance doesn't cause any + # downtime. + # + # The returned long-running operation has + # a name of the format + # `/operations/` and can be used to track + # the move instance operation. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceMetadata MoveInstanceMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, + # if successful. + # Cancelling the operation sets its metadata's + # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceMetadata#cancel_time cancel_time}. + # Cancellation is not immediate because it involves moving any data + # previously moved to the target instance configuration back to the original + # instance configuration. You can use this operation to track the progress of + # the cancellation. Upon successful completion of the cancellation, the + # operation terminates with `CANCELLED` status. + # + # If not cancelled, upon completion of the returned operation: + # + # * The instance successfully moves to the target instance + # configuration. + # * You are billed for compute and storage in target instance + # configuration. + # + # Authorization requires the `spanner.instances.update` permission on + # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::Instance instance}. + # + # For more details, see + # [Move an instance](https://cloud.google.com/spanner/docs/move-instance). + # + # @overload move_instance(request, options = nil) + # Pass arguments to `move_instance` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload move_instance(name: nil, target_config: nil) + # Pass arguments to `move_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The instance to move. + # Values are of the form `projects//instances/`. + # @param target_config [::String] + # Required. The target instance configuration where to move the instance. + # Values are of the form `projects//instanceConfigs/`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new + # + # # Call the move_instance method. + # result = client.move_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def move_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.move_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.move_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.move_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.call_rpc :move_instance, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the InstanceAdmin API. + # + # This class represents the configuration for InstanceAdmin, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_instance_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instance_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instance_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "spanner.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the InstanceAdmin API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_instance_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instance_configs + ## + # RPC-specific configuration for `get_instance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance_config + ## + # RPC-specific configuration for `create_instance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance_config + ## + # RPC-specific configuration for `update_instance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance_config + ## + # RPC-specific configuration for `delete_instance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance_config + ## + # RPC-specific configuration for `list_instance_config_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instance_config_operations + ## + # RPC-specific configuration for `list_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `list_instance_partitions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instance_partitions + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `create_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance + ## + # RPC-specific configuration for `update_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `get_instance_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance_partition + ## + # RPC-specific configuration for `create_instance_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance_partition + ## + # RPC-specific configuration for `delete_instance_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance_partition + ## + # RPC-specific configuration for `update_instance_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance_partition + ## + # RPC-specific configuration for `list_instance_partition_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instance_partition_operations + ## + # RPC-specific configuration for `move_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :move_instance + + # @private + def initialize parent_rpcs = nil + list_instance_configs_config = parent_rpcs.list_instance_configs if parent_rpcs.respond_to? :list_instance_configs + @list_instance_configs = ::Gapic::Config::Method.new list_instance_configs_config + get_instance_config_config = parent_rpcs.get_instance_config if parent_rpcs.respond_to? :get_instance_config + @get_instance_config = ::Gapic::Config::Method.new get_instance_config_config + create_instance_config_config = parent_rpcs.create_instance_config if parent_rpcs.respond_to? :create_instance_config + @create_instance_config = ::Gapic::Config::Method.new create_instance_config_config + update_instance_config_config = parent_rpcs.update_instance_config if parent_rpcs.respond_to? :update_instance_config + @update_instance_config = ::Gapic::Config::Method.new update_instance_config_config + delete_instance_config_config = parent_rpcs.delete_instance_config if parent_rpcs.respond_to? :delete_instance_config + @delete_instance_config = ::Gapic::Config::Method.new delete_instance_config_config + list_instance_config_operations_config = parent_rpcs.list_instance_config_operations if parent_rpcs.respond_to? :list_instance_config_operations + @list_instance_config_operations = ::Gapic::Config::Method.new list_instance_config_operations_config + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + list_instance_partitions_config = parent_rpcs.list_instance_partitions if parent_rpcs.respond_to? :list_instance_partitions + @list_instance_partitions = ::Gapic::Config::Method.new list_instance_partitions_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance + @create_instance = ::Gapic::Config::Method.new create_instance_config + update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance + @update_instance = ::Gapic::Config::Method.new update_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + get_instance_partition_config = parent_rpcs.get_instance_partition if parent_rpcs.respond_to? :get_instance_partition + @get_instance_partition = ::Gapic::Config::Method.new get_instance_partition_config + create_instance_partition_config = parent_rpcs.create_instance_partition if parent_rpcs.respond_to? :create_instance_partition + @create_instance_partition = ::Gapic::Config::Method.new create_instance_partition_config + delete_instance_partition_config = parent_rpcs.delete_instance_partition if parent_rpcs.respond_to? :delete_instance_partition + @delete_instance_partition = ::Gapic::Config::Method.new delete_instance_partition_config + update_instance_partition_config = parent_rpcs.update_instance_partition if parent_rpcs.respond_to? :update_instance_partition + @update_instance_partition = ::Gapic::Config::Method.new update_instance_partition_config + list_instance_partition_operations_config = parent_rpcs.list_instance_partition_operations if parent_rpcs.respond_to? :list_instance_partition_operations + @list_instance_partition_operations = ::Gapic::Config::Method.new list_instance_partition_operations_config + move_instance_config = parent_rpcs.move_instance if parent_rpcs.respond_to? :move_instance + @move_instance = ::Gapic::Config::Method.new move_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb new file mode 100644 index 000000000000..f1cfbb949203 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + module InstanceAdmin + # Credentials for the InstanceAdmin API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + self.env_vars = [ + "SPANNER_CREDENTIALS", + "SPANNER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SPANNER_CREDENTIALS_JSON", + "SPANNER_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb new file mode 100644 index 000000000000..400c0ee971d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb @@ -0,0 +1,847 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + module InstanceAdmin + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the InstanceAdmin Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the InstanceAdmin Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "spanner.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb new file mode 100644 index 000000000000..58eb65bcfcfe --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb @@ -0,0 +1,104 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + module InstanceAdmin + # Path helper methods for the InstanceAdmin API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}` + # + # @param project [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/instances/#{instance}" + end + + ## + # Create a fully-qualified InstanceConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instanceConfigs/{instance_config}` + # + # @param project [String] + # @param instance_config [String] + # + # @return [::String] + def instance_config_path project:, instance_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/instanceConfigs/#{instance_config}" + end + + ## + # Create a fully-qualified InstancePartition resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` + # + # @param project [String] + # @param instance [String] + # @param instance_partition [String] + # + # @return [::String] + def instance_partition_path project:, instance:, instance_partition: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/instances/#{instance}/instancePartitions/#{instance_partition}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + extend self + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.rb new file mode 100644 index 000000000000..17c9131daf5d --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/spanner/admin/instance/v1/version" + +require "google/cloud/spanner/admin/instance/v1/instance_admin/credentials" +require "google/cloud/spanner/admin/instance/v1/instance_admin/paths" +require "google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations" +require "google/cloud/spanner/admin/instance/v1/instance_admin/rest/client" + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + ## + # Cloud Spanner Instance Admin API + # + # The Cloud Spanner Instance Admin API can be used to create, delete, + # modify and list instances. Instances are dedicated Cloud Spanner serving + # and storage resources to be used by Cloud Spanner databases. + # + # Each instance has a "configuration", which dictates where the + # serving resources for the Cloud Spanner instance are located (e.g., + # US-central, Europe). Configurations are created by Google based on + # resource availability. + # + # Cloud Spanner billing is based on the instances that exist and their + # sizes. After an instance exists, there are no additional + # per-database or per-operation charges for use of the instance + # (though there may be additional network bandwidth charges). + # Instances offer isolation: problems with databases in one instance + # will not affect other instances. However, within an instance + # databases can affect each other. For example, if one database in an + # instance receives a lot of requests and consumes most of the + # instance resources, fewer resources are available for other + # databases in that instance, and their performance may suffer. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/spanner/admin/instance/v1/instance_admin/rest" + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + module InstanceAdmin + # Client for the REST transport + module Rest + end + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/spanner/admin/instance/v1/instance_admin/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.rb new file mode 100644 index 000000000000..2b3a9223a425 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.rb @@ -0,0 +1,2950 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" +require "google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub" + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + module InstanceAdmin + module Rest + ## + # REST client for the InstanceAdmin service. + # + # Cloud Spanner Instance Admin API + # + # The Cloud Spanner Instance Admin API can be used to create, delete, + # modify and list instances. Instances are dedicated Cloud Spanner serving + # and storage resources to be used by Cloud Spanner databases. + # + # Each instance has a "configuration", which dictates where the + # serving resources for the Cloud Spanner instance are located (e.g., + # US-central, Europe). Configurations are created by Google based on + # resource availability. + # + # Cloud Spanner billing is based on the instances that exist and their + # sizes. After an instance exists, there are no additional + # per-database or per-operation charges for use of the instance + # (though there may be additional network bandwidth charges). + # Instances offer isolation: problems with databases in one instance + # will not affect other instances. However, within an instance + # databases can affect each other. For example, if one database in an + # instance receives a lot of requests and consumes most of the + # instance resources, fewer resources are available for other + # databases in that instance, and their performance may suffer. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :instance_admin_stub + + ## + # Configure the InstanceAdmin Client class. + # + # See {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InstanceAdmin clients + # ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Spanner", "Admin", "Instance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_instance_configs.timeout = 3600.0 + default_config.rpcs.list_instance_configs.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_instance_config.timeout = 3600.0 + default_config.rpcs.get_instance_config.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_instances.timeout = 3600.0 + default_config.rpcs.list_instances.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_instance.timeout = 3600.0 + default_config.rpcs.get_instance.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_instance.timeout = 3600.0 + + default_config.rpcs.update_instance.timeout = 3600.0 + + default_config.rpcs.delete_instance.timeout = 3600.0 + default_config.rpcs.delete_instance.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.set_iam_policy.timeout = 30.0 + + default_config.rpcs.get_iam_policy.timeout = 30.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.test_iam_permissions.timeout = 30.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InstanceAdmin Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @instance_admin_stub.universe_domain + end + + ## + # Create a new InstanceAdmin REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InstanceAdmin client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @instance_admin_stub = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @instance_admin_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @instance_admin_stub.logger + end + + # Service calls + + ## + # Lists the supported instance configurations for a given project. + # + # Returns both Google-managed configurations and user-managed + # configurations. + # + # @overload list_instance_configs(request, options = nil) + # Pass arguments to `list_instance_configs` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_instance_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_instance_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project for which a list of supported instance + # configurations is requested. Values are of the form + # `projects/`. + # @param page_size [::Integer] + # Number of instance configurations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse ListInstanceConfigsResponse}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new + # + # # Call the list_instance_configs method. + # result = client.list_instance_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. + # p item + # end + # + def list_instance_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_instance_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_instance_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_instance_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.list_instance_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instance_configs, "instance_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information about a particular instance configuration. + # + # @overload get_instance_config(request, options = nil) + # Pass arguments to `get_instance_config` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_instance_config(name: nil) + # Pass arguments to `get_instance_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the requested instance configuration. Values are of + # the form `projects//instanceConfigs/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new + # + # # Call the get_instance_config method. + # result = client.get_instance_config request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. + # p result + # + def get_instance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_instance_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_instance_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.get_instance_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an instance configuration and begins preparing it to be used. The + # returned long-running operation + # can be used to track the progress of preparing the new + # instance configuration. The instance configuration name is assigned by the + # caller. If the named instance configuration already exists, + # `CreateInstanceConfig` returns `ALREADY_EXISTS`. + # + # Immediately after the request returns: + # + # * The instance configuration is readable via the API, with all requested + # attributes. The instance configuration's + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} + # field is set to true. Its state is `CREATING`. + # + # While the operation is pending: + # + # * Cancelling the operation renders the instance configuration immediately + # unreadable via the API. + # * Except for deleting the creating resource, all other attempts to modify + # the instance configuration are rejected. + # + # Upon completion of the returned operation: + # + # * Instances can be created using the instance configuration. + # * The instance configuration's + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} + # field becomes false. Its state becomes `READY`. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to track + # creation of the instance configuration. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if + # successful. + # + # Authorization requires `spanner.instanceConfigs.create` permission on + # the resource + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest#parent parent}. + # + # @overload create_instance_config(request, options = nil) + # Pass arguments to `create_instance_config` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_instance_config(parent: nil, instance_config_id: nil, instance_config: nil, validate_only: nil) + # Pass arguments to `create_instance_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project in which to create the instance + # configuration. Values are of the form `projects/`. + # @param instance_config_id [::String] + # Required. The ID of the instance configuration to create. Valid identifiers + # are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 + # characters in length. The `custom-` prefix is required to avoid name + # conflicts with Google-managed configurations. + # @param instance_config [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig, ::Hash] + # Required. The `InstanceConfig` proto of the configuration to create. + # `instance_config.name` must be + # `/instanceConfigs/`. + # `instance_config.base_config` must be a Google-managed configuration name, + # e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3. + # @param validate_only [::Boolean] + # An option to validate, but not actually execute, a request, + # and provide the same response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new + # + # # Call the create_instance_config method. + # result = client.create_instance_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_instance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_instance_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_instance_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_instance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.create_instance_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an instance configuration. The returned + # long-running operation can be used to track + # the progress of updating the instance. If the named instance configuration + # does not exist, returns `NOT_FOUND`. + # + # Only user-managed configurations can be updated. + # + # Immediately after the request returns: + # + # * The instance configuration's + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} + # field is set to true. + # + # While the operation is pending: + # + # * Cancelling the operation sets its metadata's + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigMetadata#cancel_time cancel_time}. + # The operation is guaranteed to succeed at undoing all changes, after + # which point it terminates with a `CANCELLED` status. + # * All other attempts to modify the instance configuration are rejected. + # * Reading the instance configuration via the API continues to give the + # pre-request values. + # + # Upon completion of the returned operation: + # + # * Creating instances using the instance configuration uses the new + # values. + # * The new values of the instance configuration are readable via the API. + # * The instance configuration's + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} + # field becomes false. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to track + # the instance configuration modification. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigMetadata UpdateInstanceConfigMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if + # successful. + # + # Authorization requires `spanner.instanceConfigs.update` permission on + # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#name name}. + # + # @overload update_instance_config(request, options = nil) + # Pass arguments to `update_instance_config` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_instance_config(instance_config: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_instance_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance_config [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig, ::Hash] + # Required. The user instance configuration to update, which must always + # include the instance configuration name. Otherwise, only fields mentioned + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest#update_mask update_mask} + # need be included. To prevent conflicts of concurrent updates, + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling etag} can + # be used. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask specifying which fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} should be + # updated. The field mask must always be specified; this prevents any future + # fields in {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} + # from being erased accidentally by clients that do not know about them. Only + # display_name and labels can be updated. + # @param validate_only [::Boolean] + # An option to validate, but not actually execute, a request, + # and provide the same response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new + # + # # Call the update_instance_config method. + # result = client.update_instance_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_instance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_instance_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_instance_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_instance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.update_instance_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the instance configuration. Deletion is only allowed when no + # instances are using the configuration. If any instances are using + # the configuration, returns `FAILED_PRECONDITION`. + # + # Only user-managed configurations can be deleted. + # + # Authorization requires `spanner.instanceConfigs.delete` permission on + # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#name name}. + # + # @overload delete_instance_config(request, options = nil) + # Pass arguments to `delete_instance_config` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_instance_config(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_instance_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the instance configuration to be deleted. + # Values are of the form + # `projects//instanceConfigs/` + # @param etag [::String] + # Used for optimistic concurrency control as a way to help prevent + # simultaneous deletes of an instance configuration from overwriting each + # other. If not empty, the API + # only deletes the instance configuration when the etag provided matches the + # current status of the requested instance configuration. Otherwise, deletes + # the instance configuration without checking the current status of the + # requested instance configuration. + # @param validate_only [::Boolean] + # An option to validate, but not actually execute, a request, + # and provide the same response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new + # + # # Call the delete_instance_config method. + # result = client.delete_instance_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_instance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_instance_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_instance_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_instance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.delete_instance_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the user-managed instance configuration long-running + # operations in the given project. An instance + # configuration operation has a name of the form + # `projects//instanceConfigs//operations/`. + # The long-running operation + # metadata field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. Operations returned are ordered by + # `operation.metadata.value.start_time` in descending order starting + # from the most recently started operation. + # + # @overload list_instance_config_operations(request, options = nil) + # Pass arguments to `list_instance_config_operations` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_instance_config_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_instance_config_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project of the instance configuration operations. + # Values are of the form `projects/`. + # @param filter [::String] + # An expression that filters the list of returned operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the Operation are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata} + # is + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first, if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic. However, + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=` \ + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + # AND` \ + # `(metadata.instance_config.name:custom-config) AND` \ + # `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Return operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}. + # * The instance configuration name contains "custom-config". + # * The operation started before 2021-03-28T14:50:00Z. + # * The operation resulted in an error. + # @param page_size [::Integer] + # Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse ListInstanceConfigOperationsResponse} + # to the same `parent` and with the same `filter`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new + # + # # Call the list_instance_config_operations method. + # result = client.list_instance_config_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_instance_config_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_instance_config_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_instance_config_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_instance_config_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.list_instance_config_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instance_config_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all instances in the given project. + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, instance_deadline: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project for which a list of instances is + # requested. Values are of the form `projects/`. + # @param page_size [::Integer] + # Number of instances to be returned in the response. If 0 or less, defaults + # to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `display_name` + # * `labels.key` where key is the name of a label + # + # Some examples of using filters are: + # + # * `name:*` --> The instance has a name. + # * `name:Howl` --> The instance's name contains the string "howl". + # * `name:HOWL` --> Equivalent to above. + # * `NAME:howl` --> Equivalent to above. + # * `labels.env:*` --> The instance has the label "env". + # * `labels.env:dev` --> The instance has the label "env" and the value of + # the label contains the string "dev". + # * `name:howl labels.env:dev` --> The instance's name contains "howl" and + # it has the label "env" with its value + # containing "dev". + # @param instance_deadline [::Google::Protobuf::Timestamp, ::Hash] + # Deadline used while retrieving metadata for instances. + # Instances whose metadata cannot be retrieved within this deadline will be + # added to + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#unreachable unreachable} + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::Instance>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::Instance>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_instances.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.list_instances request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instances, "instances", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all instance partitions for the given instance. + # + # @overload list_instance_partitions(request, options = nil) + # Pass arguments to `list_instance_partitions` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_instance_partitions(parent: nil, page_size: nil, page_token: nil, instance_partition_deadline: nil) + # Pass arguments to `list_instance_partitions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance whose instance partitions should be listed. Values + # are of the form `projects//instances/`. Use `{instance} + # = '-'` to list instance partitions for all Instances in a project, e.g., + # `projects/myproject/instances/-`. + # @param page_size [::Integer] + # Number of instance partitions to be returned in the response. If 0 or less, + # defaults to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. + # @param instance_partition_deadline [::Google::Protobuf::Timestamp, ::Hash] + # Optional. Deadline used while retrieving metadata for instance partitions. + # Instance partitions whose metadata cannot be retrieved within this deadline + # will be added to + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#unreachable unreachable} + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new + # + # # Call the list_instance_partitions method. + # result = client.list_instance_partitions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. + # p item + # end + # + def list_instance_partitions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_instance_partitions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_instance_partitions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_instance_partitions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.list_instance_partitions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instance_partitions, "instance_partitions", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information about a particular instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_instance(name: nil, field_mask: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the requested instance. Values are of the form + # `projects//instances/`. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # If field_mask is present, specifies the subset of + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields that should be + # returned. If absent, all + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields are returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.get_instance request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an instance and begins preparing it to begin serving. The + # returned long-running operation + # can be used to track the progress of preparing the new + # instance. The instance name is assigned by the caller. If the + # named instance already exists, `CreateInstance` returns + # `ALREADY_EXISTS`. + # + # Immediately upon completion of this request: + # + # * The instance is readable via the API, with all requested attributes + # but no allocated resources. Its state is `CREATING`. + # + # Until completion of the returned operation: + # + # * Cancelling the operation renders the instance immediately unreadable + # via the API. + # * The instance can be deleted. + # * All other attempts to modify the instance are rejected. + # + # Upon completion of the returned operation: + # + # * Billing for all successfully-allocated resources begins (some types + # may have lower than the requested levels). + # * Databases can be created in the instance. + # * The instance's allocated resource levels are readable via the API. + # * The instance's state becomes `READY`. + # + # The returned long-running operation will + # have a name of the format `/operations/` and + # can be used to track creation of the instance. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceMetadata CreateInstanceMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful. + # + # @overload create_instance(request, options = nil) + # Pass arguments to `create_instance` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_instance(parent: nil, instance_id: nil, instance: nil) + # Pass arguments to `create_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the project in which to create the instance. Values + # are of the form `projects/`. + # @param instance_id [::String] + # Required. The ID of the instance to create. Valid identifiers are of the + # form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in + # length. + # @param instance [::Google::Cloud::Spanner::Admin::Instance::V1::Instance, ::Hash] + # Required. The instance to create. The name may be omitted, but if + # specified must be `/instances/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new + # + # # Call the create_instance method. + # result = client.create_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.create_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an instance, and begins allocating or releasing resources + # as requested. The returned long-running operation can be used to track the + # progress of updating the instance. If the named instance does not + # exist, returns `NOT_FOUND`. + # + # Immediately upon completion of this request: + # + # * For resource types for which a decrease in the instance's allocation + # has been requested, billing is based on the newly-requested level. + # + # Until completion of the returned operation: + # + # * Cancelling the operation sets its metadata's + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceMetadata#cancel_time cancel_time}, + # and begins restoring resources to their pre-request values. The + # operation is guaranteed to succeed at undoing all resource changes, + # after which point it terminates with a `CANCELLED` status. + # * All other attempts to modify the instance are rejected. + # * Reading the instance via the API continues to give the pre-request + # resource levels. + # + # Upon completion of the returned operation: + # + # * Billing begins for all successfully-allocated resources (some types + # may have lower than the requested levels). + # * All newly-reserved resources are available for serving the instance's + # tables. + # * The instance's new resource levels are readable via the API. + # + # The returned long-running operation will + # have a name of the format `/operations/` and + # can be used to track the instance modification. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceMetadata UpdateInstanceMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful. + # + # Authorization requires `spanner.instances.update` permission on + # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::Instance#name name}. + # + # @overload update_instance(request, options = nil) + # Pass arguments to `update_instance` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_instance(instance: nil, field_mask: nil) + # Pass arguments to `update_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance [::Google::Cloud::Spanner::Admin::Instance::V1::Instance, ::Hash] + # Required. The instance to update, which must always include the instance + # name. Otherwise, only fields mentioned in + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest#field_mask field_mask} + # need be included. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask specifying which fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} should be updated. + # The field mask must always be specified; this prevents any future fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} from being erased + # accidentally by clients that do not know about them. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new + # + # # Call the update_instance method. + # result = client.update_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.update_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an instance. + # + # Immediately upon completion of the request: + # + # * Billing ceases for all of the instance's reserved resources. + # + # Soon afterward: + # + # * The instance and *all of its databases* immediately and + # irrevocably disappear from the API. All data in the databases + # is permanently deleted. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_instance(name: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the instance to be deleted. Values are of the form + # `projects//instances/` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.delete_instance request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on an instance resource. Replaces any + # existing policy. + # + # Authorization requires `spanner.instances.setIamPolicy` on + # [resource][google.iam.v1.SetIamPolicyRequest.resource]. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the access control policy for an instance resource. Returns an empty + # policy if an instance exists but does not have a policy set. + # + # Authorization requires `spanner.instances.getIamPolicy` on + # [resource][google.iam.v1.GetIamPolicyRequest.resource]. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that the caller has on the specified instance resource. + # + # Attempting this RPC on a non-existent Cloud Spanner instance resource will + # result in a NOT_FOUND error if the user has `spanner.instances.list` + # permission on the containing Google Cloud Project. Otherwise returns an + # empty set of permissions. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information about a particular instance partition. + # + # @overload get_instance_partition(request, options = nil) + # Pass arguments to `get_instance_partition` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_instance_partition(name: nil) + # Pass arguments to `get_instance_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the requested instance partition. Values are of + # the form + # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new + # + # # Call the get_instance_partition method. + # result = client.get_instance_partition request + # + # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. + # p result + # + def get_instance_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_instance_partition.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_instance_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.get_instance_partition request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an instance partition and begins preparing it to be used. The + # returned long-running operation + # can be used to track the progress of preparing the new instance partition. + # The instance partition name is assigned by the caller. If the named + # instance partition already exists, `CreateInstancePartition` returns + # `ALREADY_EXISTS`. + # + # Immediately upon completion of this request: + # + # * The instance partition is readable via the API, with all requested + # attributes but no allocated resources. Its state is `CREATING`. + # + # Until completion of the returned operation: + # + # * Cancelling the operation renders the instance partition immediately + # unreadable via the API. + # * The instance partition can be deleted. + # * All other attempts to modify the instance partition are rejected. + # + # Upon completion of the returned operation: + # + # * Billing for all successfully-allocated resources begins (some types + # may have lower than the requested levels). + # * Databases can start using this instance partition. + # * The instance partition's allocated resource levels are readable via the + # API. + # * The instance partition's state becomes `READY`. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to + # track creation of the instance partition. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if + # successful. + # + # @overload create_instance_partition(request, options = nil) + # Pass arguments to `create_instance_partition` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_instance_partition(parent: nil, instance_partition_id: nil, instance_partition: nil) + # Pass arguments to `create_instance_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the instance in which to create the instance + # partition. Values are of the form + # `projects//instances/`. + # @param instance_partition_id [::String] + # Required. The ID of the instance partition to create. Valid identifiers are + # of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 + # characters in length. + # @param instance_partition [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition, ::Hash] + # Required. The instance partition to create. The instance_partition.name may + # be omitted, but if specified must be + # `/instancePartitions/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new + # + # # Call the create_instance_partition method. + # result = client.create_instance_partition request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_instance_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_instance_partition.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_instance_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_instance_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.create_instance_partition request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing instance partition. Requires that the + # instance partition is not used by any database or backup and is not the + # default instance partition of an instance. + # + # Authorization requires `spanner.instancePartitions.delete` permission on + # the resource + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition#name name}. + # + # @overload delete_instance_partition(request, options = nil) + # Pass arguments to `delete_instance_partition` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_instance_partition(name: nil, etag: nil) + # Pass arguments to `delete_instance_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the instance partition to be deleted. + # Values are of the form + # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` + # @param etag [::String] + # Optional. If not empty, the API only deletes the instance partition when + # the etag provided matches the current status of the requested instance + # partition. Otherwise, deletes the instance partition without checking the + # current status of the requested instance partition. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new + # + # # Call the delete_instance_partition method. + # result = client.delete_instance_partition request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_instance_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_instance_partition.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_instance_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_instance_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.delete_instance_partition request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an instance partition, and begins allocating or releasing resources + # as requested. The returned long-running operation can be used to track the + # progress of updating the instance partition. If the named instance + # partition does not exist, returns `NOT_FOUND`. + # + # Immediately upon completion of this request: + # + # * For resource types for which a decrease in the instance partition's + # allocation has been requested, billing is based on the newly-requested + # level. + # + # Until completion of the returned operation: + # + # * Cancelling the operation sets its metadata's + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionMetadata#cancel_time cancel_time}, + # and begins restoring resources to their pre-request values. The + # operation is guaranteed to succeed at undoing all resource changes, + # after which point it terminates with a `CANCELLED` status. + # * All other attempts to modify the instance partition are rejected. + # * Reading the instance partition via the API continues to give the + # pre-request resource levels. + # + # Upon completion of the returned operation: + # + # * Billing begins for all successfully-allocated resources (some types + # may have lower than the requested levels). + # * All newly-reserved resources are available for serving the instance + # partition's tables. + # * The instance partition's new resource levels are readable via the API. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to + # track the instance partition modification. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionMetadata UpdateInstancePartitionMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if + # successful. + # + # Authorization requires `spanner.instancePartitions.update` permission on + # the resource + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition#name name}. + # + # @overload update_instance_partition(request, options = nil) + # Pass arguments to `update_instance_partition` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_instance_partition(instance_partition: nil, field_mask: nil) + # Pass arguments to `update_instance_partition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance_partition [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition, ::Hash] + # Required. The instance partition to update, which must always include the + # instance partition name. Otherwise, only fields mentioned in + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest#field_mask field_mask} + # need be included. + # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask specifying which fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} + # should be updated. The field mask must always be specified; this prevents + # any future fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} + # from being erased accidentally by clients that do not know about them. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new + # + # # Call the update_instance_partition method. + # result = client.update_instance_partition request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_instance_partition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_instance_partition.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_instance_partition.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_instance_partition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.update_instance_partition request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists instance partition long-running operations in the given instance. + # An instance partition operation has a name of the form + # `projects//instances//instancePartitions//operations/`. + # The long-running operation + # metadata field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. Operations returned are ordered by + # `operation.metadata.value.start_time` in descending order starting from the + # most recently started operation. + # + # Authorization requires `spanner.instancePartitionOperations.list` + # permission on the resource + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest#parent parent}. + # + # @overload list_instance_partition_operations(request, options = nil) + # Pass arguments to `list_instance_partition_operations` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_instance_partition_operations(parent: nil, filter: nil, page_size: nil, page_token: nil, instance_partition_deadline: nil) + # Pass arguments to `list_instance_partition_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent instance of the instance partition operations. + # Values are of the form `projects//instances/`. + # @param filter [::String] + # Optional. An expression that filters the list of returned operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the Operation are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata} + # is + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first, if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic. However, + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=` \ + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + # AND` \ + # `(metadata.instance_partition.name:custom-instance-partition) AND` \ + # `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Return operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}. + # * The instance partition name contains "custom-instance-partition". + # * The operation started before 2021-03-28T14:50:00Z. + # * The operation resulted in an error. + # @param page_size [::Integer] + # Optional. Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param page_token [::String] + # Optional. If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse} + # to the same `parent` and with the same `filter`. + # @param instance_partition_deadline [::Google::Protobuf::Timestamp, ::Hash] + # Optional. Deadline used while retrieving metadata for instance partition + # operations. Instance partitions whose operation metadata cannot be + # retrieved within this deadline will be added to + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#unreachable_instance_partitions unreachable_instance_partitions} + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new + # + # # Call the list_instance_partition_operations method. + # result = client.list_instance_partition_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_instance_partition_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_instance_partition_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_instance_partition_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_instance_partition_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.list_instance_partition_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instance_partition_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Moves an instance to the target instance configuration. You can use the + # returned long-running operation to track + # the progress of moving the instance. + # + # `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of + # the following criteria: + # + # * Is undergoing a move to a different instance configuration + # * Has backups + # * Has an ongoing update + # * Contains any CMEK-enabled databases + # * Is a free trial instance + # + # While the operation is pending: + # + # * All other attempts to modify the instance, including changes to its + # compute capacity, are rejected. + # * The following database and backup admin operations are rejected: + # + # * `DatabaseAdmin.CreateDatabase` + # * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is + # specified in the request.) + # * `DatabaseAdmin.RestoreDatabase` + # * `DatabaseAdmin.CreateBackup` + # * `DatabaseAdmin.CopyBackup` + # + # * Both the source and target instance configurations are subject to + # hourly compute and storage charges. + # * The instance might experience higher read-write latencies and a higher + # transaction abort rate. However, moving an instance doesn't cause any + # downtime. + # + # The returned long-running operation has + # a name of the format + # `/operations/` and can be used to track + # the move instance operation. The + # metadata field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceMetadata MoveInstanceMetadata}. + # The response field type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, + # if successful. + # Cancelling the operation sets its metadata's + # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceMetadata#cancel_time cancel_time}. + # Cancellation is not immediate because it involves moving any data + # previously moved to the target instance configuration back to the original + # instance configuration. You can use this operation to track the progress of + # the cancellation. Upon successful completion of the cancellation, the + # operation terminates with `CANCELLED` status. + # + # If not cancelled, upon completion of the returned operation: + # + # * The instance successfully moves to the target instance + # configuration. + # * You are billed for compute and storage in target instance + # configuration. + # + # Authorization requires the `spanner.instances.update` permission on + # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::Instance instance}. + # + # For more details, see + # [Move an instance](https://cloud.google.com/spanner/docs/move-instance). + # + # @overload move_instance(request, options = nil) + # Pass arguments to `move_instance` via a request object, either of type + # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload move_instance(name: nil, target_config: nil) + # Pass arguments to `move_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The instance to move. + # Values are of the form `projects//instances/`. + # @param target_config [::String] + # Required. The target instance configuration where to move the instance. + # Values are of the form `projects//instanceConfigs/`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/spanner/admin/instance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new + # + # # Call the move_instance method. + # result = client.move_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def move_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.move_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.move_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.move_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_admin_stub.move_instance request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the InstanceAdmin REST API. + # + # This class represents the configuration for InstanceAdmin REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_instance_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instance_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instance_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "spanner.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the InstanceAdmin API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_instance_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instance_configs + ## + # RPC-specific configuration for `get_instance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance_config + ## + # RPC-specific configuration for `create_instance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance_config + ## + # RPC-specific configuration for `update_instance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance_config + ## + # RPC-specific configuration for `delete_instance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance_config + ## + # RPC-specific configuration for `list_instance_config_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instance_config_operations + ## + # RPC-specific configuration for `list_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `list_instance_partitions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instance_partitions + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `create_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance + ## + # RPC-specific configuration for `update_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `get_instance_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance_partition + ## + # RPC-specific configuration for `create_instance_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance_partition + ## + # RPC-specific configuration for `delete_instance_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance_partition + ## + # RPC-specific configuration for `update_instance_partition` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance_partition + ## + # RPC-specific configuration for `list_instance_partition_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instance_partition_operations + ## + # RPC-specific configuration for `move_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :move_instance + + # @private + def initialize parent_rpcs = nil + list_instance_configs_config = parent_rpcs.list_instance_configs if parent_rpcs.respond_to? :list_instance_configs + @list_instance_configs = ::Gapic::Config::Method.new list_instance_configs_config + get_instance_config_config = parent_rpcs.get_instance_config if parent_rpcs.respond_to? :get_instance_config + @get_instance_config = ::Gapic::Config::Method.new get_instance_config_config + create_instance_config_config = parent_rpcs.create_instance_config if parent_rpcs.respond_to? :create_instance_config + @create_instance_config = ::Gapic::Config::Method.new create_instance_config_config + update_instance_config_config = parent_rpcs.update_instance_config if parent_rpcs.respond_to? :update_instance_config + @update_instance_config = ::Gapic::Config::Method.new update_instance_config_config + delete_instance_config_config = parent_rpcs.delete_instance_config if parent_rpcs.respond_to? :delete_instance_config + @delete_instance_config = ::Gapic::Config::Method.new delete_instance_config_config + list_instance_config_operations_config = parent_rpcs.list_instance_config_operations if parent_rpcs.respond_to? :list_instance_config_operations + @list_instance_config_operations = ::Gapic::Config::Method.new list_instance_config_operations_config + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + list_instance_partitions_config = parent_rpcs.list_instance_partitions if parent_rpcs.respond_to? :list_instance_partitions + @list_instance_partitions = ::Gapic::Config::Method.new list_instance_partitions_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance + @create_instance = ::Gapic::Config::Method.new create_instance_config + update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance + @update_instance = ::Gapic::Config::Method.new update_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + get_instance_partition_config = parent_rpcs.get_instance_partition if parent_rpcs.respond_to? :get_instance_partition + @get_instance_partition = ::Gapic::Config::Method.new get_instance_partition_config + create_instance_partition_config = parent_rpcs.create_instance_partition if parent_rpcs.respond_to? :create_instance_partition + @create_instance_partition = ::Gapic::Config::Method.new create_instance_partition_config + delete_instance_partition_config = parent_rpcs.delete_instance_partition if parent_rpcs.respond_to? :delete_instance_partition + @delete_instance_partition = ::Gapic::Config::Method.new delete_instance_partition_config + update_instance_partition_config = parent_rpcs.update_instance_partition if parent_rpcs.respond_to? :update_instance_partition + @update_instance_partition = ::Gapic::Config::Method.new update_instance_partition_config + list_instance_partition_operations_config = parent_rpcs.list_instance_partition_operations if parent_rpcs.respond_to? :list_instance_partition_operations + @list_instance_partition_operations = ::Gapic::Config::Method.new list_instance_partition_operations_config + move_instance_config = parent_rpcs.move_instance if parent_rpcs.respond_to? :move_instance + @move_instance = ::Gapic::Config::Method.new move_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb new file mode 100644 index 000000000000..e2943c53c438 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb @@ -0,0 +1,1070 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + module InstanceAdmin + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the InstanceAdmin Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the InstanceAdmin Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "spanner.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.rb new file mode 100644 index 000000000000..7f927a943f3e --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.rb @@ -0,0 +1,1376 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + module InstanceAdmin + module Rest + ## + # REST service stub for the InstanceAdmin service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_instance_configs REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse] + # A result object deserialized from the server's reply + def list_instance_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_instance_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_instance_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_instance_config REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] + # A result object deserialized from the server's reply + def get_instance_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_instance_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_instance_config REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_instance_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_instance_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_instance_config REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_instance_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_instance_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_instance_config REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_instance_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_instance_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_instance_config_operations REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse] + # A result object deserialized from the server's reply + def list_instance_config_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_instance_config_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_instance_config_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_instances REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse] + # A result object deserialized from the server's reply + def list_instances request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_instances", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_instance_partitions REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse] + # A result object deserialized from the server's reply + def list_instance_partitions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_instance_partitions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_instance_partitions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_instance REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] + # A result object deserialized from the server's reply + def get_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Instance::V1::Instance.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_instance REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_instance REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_instance_partition REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] + # A result object deserialized from the server's reply + def get_instance_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_instance_partition", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_instance_partition REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_instance_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_instance_partition", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_instance_partition REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_instance_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_instance_partition", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_instance_partition REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_instance_partition request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_partition_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_instance_partition", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_instance_partition_operations REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse] + # A result object deserialized from the server's reply + def list_instance_partition_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_instance_partition_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_instance_partition_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the move_instance REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def move_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_move_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "move_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_instance_configs REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_instance_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/instanceConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance_config REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_instance_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_instance_config REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_instance_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/instanceConfigs", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_instance_config REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_instance_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{instance_config.name}", + body: "*", + matches: [ + ["instance_config.name", %r{^projects/[^/]+/instanceConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_instance_config REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_instance_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_instance_config_operations REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_instance_config_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/instanceConfigOperations", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_instances REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_instances_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/instances", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_instance_partitions REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_instance_partitions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/instancePartitions", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_instance REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/instances", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_instance REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{instance.name}", + body: "*", + matches: [ + ["instance.name", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance_partition REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_instance_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_instance_partition REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_instance_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/instancePartitions", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_instance_partition REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_instance_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_instance_partition REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_instance_partition_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{instance_partition.name}", + body: "*", + matches: [ + ["instance_partition.name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_instance_partition_operations REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_instance_partition_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/instancePartitionOperations", + matches: [ + ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the move_instance REST call + # + # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_move_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:move", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.rb new file mode 100644 index 000000000000..bc6ad4b7dcf4 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/spanner/admin/instance/v1/instance_admin/rest" +require "google/cloud/spanner/admin/instance/v1/version" + +module Google + module Cloud + module Spanner + module Admin + module Instance + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/spanner/admin/instance/v1/rest" + # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new + # + module V1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/version.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/version.rb new file mode 100644 index 000000000000..a9cfa90b04fb --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/version.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + VERSION = "0.0.1" + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/common_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/common_pb.rb new file mode 100644 index 000000000000..f6f080766f8d --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/common_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/admin/instance/v1/common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/spanner/admin/instance/v1/common.proto\x12 google.spanner.admin.instance.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8b\x01\n\x11OperationProgress\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\")\n\x10ReplicaSelection\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x02*w\n\x11\x46ulfillmentPeriod\x12\"\n\x1e\x46ULFILLMENT_PERIOD_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x46ULFILLMENT_PERIOD_NORMAL\x10\x01\x12\x1f\n\x1b\x46ULFILLMENT_PERIOD_EXTENDED\x10\x02\x42\xfd\x01\n$com.google.spanner.admin.instance.v1B\x0b\x43ommonProtoP\x01ZFcloud.google.com/go/spanner/admin/instance/apiv1/instancepb;instancepb\xaa\x02&Google.Cloud.Spanner.Admin.Instance.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Instance\\V1\xea\x02+Google::Cloud::Spanner::Admin::Instance::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + OperationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.OperationProgress").msgclass + ReplicaSelection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaSelection").msgclass + FulfillmentPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.FulfillmentPeriod").enummodule + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb new file mode 100644 index 000000000000..49f467979b51 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb @@ -0,0 +1,89 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/admin/instance/v1/spanner_instance_admin.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/spanner/admin/instance/v1/common_pb' + + +descriptor_data = "\n=google/spanner/admin/instance/v1/spanner_instance_admin.proto\x12 google.spanner.admin.instance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a-google/spanner/admin/instance/v1/common.proto\"\xda\x01\n\x0bReplicaInfo\x12\x10\n\x08location\x18\x01 \x01(\t\x12G\n\x04type\x18\x02 \x01(\x0e\x32\x39.google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType\x12\x1f\n\x17\x64\x65\x66\x61ult_leader_location\x18\x03 \x01(\x08\"O\n\x0bReplicaType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\x0b\n\x07WITNESS\x10\x03\"\xc0\n\n\x0eInstanceConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12O\n\x0b\x63onfig_type\x18\x05 \x01(\x0e\x32\x35.google.spanner.admin.instance.v1.InstanceConfig.TypeB\x03\xe0\x41\x03\x12?\n\x08replicas\x18\x03 \x03(\x0b\x32-.google.spanner.admin.instance.v1.ReplicaInfo\x12M\n\x11optional_replicas\x18\x06 \x03(\x0b\x32-.google.spanner.admin.instance.v1.ReplicaInfoB\x03\xe0\x41\x03\x12?\n\x0b\x62\x61se_config\x18\x07 \x01(\tB*\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\x12L\n\x06labels\x18\x08 \x03(\x0b\x32<.google.spanner.admin.instance.v1.InstanceConfig.LabelsEntry\x12\x0c\n\x04\x65tag\x18\t \x01(\t\x12\x16\n\x0eleader_options\x18\x04 \x03(\t\x12\x18\n\x0breconciling\x18\n \x01(\x08\x42\x03\xe0\x41\x03\x12J\n\x05state\x18\x0b \x01(\x0e\x32\x36.google.spanner.admin.instance.v1.InstanceConfig.StateB\x03\xe0\x41\x03\x12r\n\x1a\x66ree_instance_availability\x18\x0c \x01(\x0e\x32I.google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailabilityB\x03\xe0\x41\x03\x12U\n\x0bquorum_type\x18\x12 \x01(\x0e\x32;.google.spanner.admin.instance.v1.InstanceConfig.QuorumTypeB\x03\xe0\x41\x03\x12.\n!storage_limit_per_processing_unit\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"B\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eGOOGLE_MANAGED\x10\x01\x12\x10\n\x0cUSER_MANAGED\x10\x02\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\"\x88\x01\n\x18\x46reeInstanceAvailability\x12*\n&FREE_INSTANCE_AVAILABILITY_UNSPECIFIED\x10\x00\x12\r\n\tAVAILABLE\x10\x01\x12\x0f\n\x0bUNSUPPORTED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\x12\n\x0eQUOTA_EXCEEDED\x10\x04\"X\n\nQuorumType\x12\x1b\n\x17QUORUM_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06REGION\x10\x01\x12\x0f\n\x0b\x44UAL_REGION\x10\x02\x12\x10\n\x0cMULTI_REGION\x10\x03:\x81\x01\xea\x41~\n%spanner.googleapis.com/InstanceConfig\x12\x34projects/{project}/instanceConfigs/{instance_config}*\x0finstanceConfigs2\x0einstanceConfig\"\xb2\x01\n\x16ReplicaComputeCapacity\x12R\n\x11replica_selection\x18\x01 \x01(\x0b\x32\x32.google.spanner.admin.instance.v1.ReplicaSelectionB\x03\xe0\x41\x02\x12\x14\n\nnode_count\x18\x02 \x01(\x05H\x00\x12\x1a\n\x10processing_units\x18\x03 \x01(\x05H\x00\x42\x12\n\x10\x63ompute_capacity\"\x84\n\n\x11\x41utoscalingConfig\x12\x66\n\x12\x61utoscaling_limits\x18\x01 \x01(\x0b\x32\x45.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsB\x03\xe0\x41\x02\x12h\n\x13\x61utoscaling_targets\x18\x02 \x01(\x0b\x32\x46.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsB\x03\xe0\x41\x02\x12|\n\x1e\x61symmetric_autoscaling_options\x18\x03 \x03(\x0b\x32O.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOptionB\x03\xe0\x41\x01\x1a\x97\x01\n\x11\x41utoscalingLimits\x12\x13\n\tmin_nodes\x18\x01 \x01(\x05H\x00\x12\x1e\n\x14min_processing_units\x18\x02 \x01(\x05H\x00\x12\x13\n\tmax_nodes\x18\x03 \x01(\x05H\x01\x12\x1e\n\x14max_processing_units\x18\x04 \x01(\x05H\x01\x42\x0b\n\tmin_limitB\x0b\n\tmax_limit\x1a\x9e\x01\n\x12\x41utoscalingTargets\x12\x32\n%high_priority_cpu_utilization_percent\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12*\n\x1dtotal_cpu_utilization_percent\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12(\n\x1bstorage_utilization_percent\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\xe3\x04\n\x1b\x41symmetricAutoscalingOption\x12R\n\x11replica_selection\x18\x01 \x01(\x0b\x32\x32.google.spanner.admin.instance.v1.ReplicaSelectionB\x03\xe0\x41\x02\x12\x82\x01\n\toverrides\x18\x02 \x01(\x0b\x32j.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverridesB\x03\xe0\x41\x01\x1a\xea\x02\n\x1a\x41utoscalingConfigOverrides\x12\x66\n\x12\x61utoscaling_limits\x18\x01 \x01(\x0b\x32\x45.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsB\x03\xe0\x41\x01\x12\x45\n8autoscaling_target_high_priority_cpu_utilization_percent\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12=\n0autoscaling_target_total_cpu_utilization_percent\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x32\n%disable_high_priority_cpu_autoscaling\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1d\x64isable_total_cpu_autoscaling\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xaa\x0b\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12=\n\x06\x63onfig\x18\x02 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nnode_count\x18\x05 \x01(\x05\x12\x18\n\x10processing_units\x18\t \x01(\x05\x12_\n\x18replica_compute_capacity\x18\x13 \x03(\x0b\x32\x38.google.spanner.admin.instance.v1.ReplicaComputeCapacityB\x03\xe0\x41\x03\x12T\n\x12\x61utoscaling_config\x18\x11 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.AutoscalingConfigB\x03\xe0\x41\x01\x12\x44\n\x05state\x18\x06 \x01(\x0e\x32\x30.google.spanner.admin.instance.v1.Instance.StateB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x07 \x03(\x0b\x32\x36.google.spanner.admin.instance.v1.Instance.LabelsEntry\x12N\n\rinstance_type\x18\n \x01(\x0e\x32\x37.google.spanner.admin.instance.v1.Instance.InstanceType\x12\x15\n\rendpoint_uris\x18\x08 \x03(\t\x12\x34\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x16\x66ree_instance_metadata\x18\r \x01(\x0b\x32\x36.google.spanner.admin.instance.v1.FreeInstanceMetadata\x12H\n\x07\x65\x64ition\x18\x14 \x01(\x0e\x32\x32.google.spanner.admin.instance.v1.Instance.EditionB\x03\xe0\x41\x01\x12o\n\x1c\x64\x65\x66\x61ult_backup_schedule_type\x18\x17 \x01(\x0e\x32\x44.google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleTypeB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\"Q\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPROVISIONED\x10\x01\x12\x11\n\rFREE_INSTANCE\x10\x02\"U\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x03\"b\n\x19\x44\x65\x66\x61ultBackupScheduleType\x12,\n(DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\r\n\tAUTOMATIC\x10\x02:b\xea\x41_\n\x1fspanner.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}*\tinstances2\x08instance\"\x88\x01\n\x1aListInstanceConfigsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1bListInstanceConfigsResponse\x12J\n\x10instance_configs\x18\x01 \x03(\x0b\x32\x30.google.spanner.admin.instance.v1.InstanceConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"W\n\x18GetInstanceConfigRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\"\xea\x01\n\x1b\x43reateInstanceConfigRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x1f\n\x12instance_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\x0finstance_config\x18\x03 \x01(\x0b\x32\x30.google.spanner.admin.instance.v1.InstanceConfigB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xba\x01\n\x1bUpdateInstanceConfigRequest\x12N\n\x0finstance_config\x18\x01 \x01(\x0b\x32\x30.google.spanner.admin.instance.v1.InstanceConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\x7f\n\x1b\x44\x65leteInstanceConfigRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\xa1\x01\n#ListInstanceConfigOperationsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"r\n$ListInstanceConfigOperationsResponse\x12\x31\n\noperations\x18\x01 \x03(\x0b\x32\x1d.google.longrunning.Operation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"{\n\x12GetInstanceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12.\n\nfield_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb9\x01\n\x15\x43reateInstanceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x08instance\x18\x03 \x01(\x0b\x32*.google.spanner.admin.instance.v1.InstanceB\x03\xe0\x41\x02\"\xc9\x01\n\x14ListInstancesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x35\n\x11instance_deadline\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x84\x01\n\x15ListInstancesResponse\x12=\n\tinstances\x18\x01 \x03(\x0b\x32*.google.spanner.admin.instance.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8f\x01\n\x15UpdateInstanceRequest\x12\x41\n\x08instance\x18\x01 \x01(\x0b\x32*.google.spanner.admin.instance.v1.InstanceB\x03\xe0\x41\x02\x12\x33\n\nfield_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"N\n\x15\x44\x65leteInstanceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\"\xbf\x02\n\x16\x43reateInstanceMetadata\x12<\n\x08instance\x18\x01 \x01(\x0b\x32*.google.spanner.admin.instance.v1.Instance\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x1b\x65xpected_fulfillment_period\x18\x05 \x01(\x0e\x32\x33.google.spanner.admin.instance.v1.FulfillmentPeriod\"\xbf\x02\n\x16UpdateInstanceMetadata\x12<\n\x08instance\x18\x01 \x01(\x0b\x32*.google.spanner.admin.instance.v1.Instance\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x1b\x65xpected_fulfillment_period\x18\x05 \x01(\x0e\x32\x33.google.spanner.admin.instance.v1.FulfillmentPeriod\"\xce\x02\n\x14\x46reeInstanceMetadata\x12\x34\n\x0b\x65xpire_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0cupgrade_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12^\n\x0f\x65xpire_behavior\x18\x03 \x01(\x0e\x32\x45.google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior\"i\n\x0e\x45xpireBehavior\x12\x1f\n\x1b\x45XPIRE_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x17\n\x13\x46REE_TO_PROVISIONED\x10\x01\x12\x1d\n\x19REMOVE_AFTER_GRACE_PERIOD\x10\x02\"\xe1\x01\n\x1c\x43reateInstanceConfigMetadata\x12I\n\x0finstance_config\x18\x01 \x01(\x0b\x32\x30.google.spanner.admin.instance.v1.InstanceConfig\x12\x45\n\x08progress\x18\x02 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe1\x01\n\x1cUpdateInstanceConfigMetadata\x12I\n\x0finstance_config\x18\x01 \x01(\x0b\x32\x30.google.spanner.admin.instance.v1.InstanceConfig\x12\x45\n\x08progress\x18\x02 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8f\x06\n\x11InstancePartition\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12=\n\x06\x63onfig\x18\x02 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\nnode_count\x18\x05 \x01(\x05H\x00\x12\x1a\n\x10processing_units\x18\x06 \x01(\x05H\x00\x12T\n\x12\x61utoscaling_config\x18\r \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.AutoscalingConfigB\x03\xe0\x41\x01\x12M\n\x05state\x18\x07 \x01(\x0e\x32\x39.google.spanner.admin.instance.v1.InstancePartition.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\"\n\x15referencing_databases\x18\n \x03(\tB\x03\xe0\x41\x03\x12\"\n\x13referencing_backups\x18\x0b \x03(\tB\x05\x18\x01\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0c \x01(\t\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02:\xa6\x01\xea\x41\xa2\x01\n(spanner.googleapis.com/InstancePartition\x12Oprojects/{project}/instances/{instance}/instancePartitions/{instance_partition}*\x12instancePartitions2\x11instancePartitionB\x12\n\x10\x63ompute_capacity\"\x81\x02\n\x1f\x43reateInstancePartitionMetadata\x12O\n\x12instance_partition\x18\x01 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.InstancePartition\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd3\x01\n\x1e\x43reateInstancePartitionRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\"\n\x15instance_partition_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x12instance_partition\x18\x03 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.InstancePartitionB\x03\xe0\x41\x02\"n\n\x1e\x44\x65leteInstancePartitionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(spanner.googleapis.com/InstancePartition\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\"]\n\x1bGetInstancePartitionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(spanner.googleapis.com/InstancePartition\"\xab\x01\n\x1eUpdateInstancePartitionRequest\x12T\n\x12instance_partition\x18\x01 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.InstancePartitionB\x03\xe0\x41\x02\x12\x33\n\nfield_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x81\x02\n\x1fUpdateInstancePartitionMetadata\x12O\n\x12instance_partition\x18\x01 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.InstancePartition\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc5\x01\n\x1dListInstancePartitionsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x44\n\x1binstance_partition_deadline\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xa0\x01\n\x1eListInstancePartitionsResponse\x12P\n\x13instance_partitions\x18\x01 \x03(\x0b\x32\x33.google.spanner.admin.instance.v1.InstancePartition\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xed\x01\n&ListInstancePartitionOperationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x1binstance_partition_deadline\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\x9e\x01\n\'ListInstancePartitionOperationsResponse\x12\x31\n\noperations\x18\x01 \x03(\x0b\x32\x1d.google.longrunning.Operation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\'\n\x1funreachable_instance_partitions\x18\x03 \x03(\t\"\x92\x01\n\x13MoveInstanceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x44\n\rtarget_config\x18\x02 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\"\x16\n\x14MoveInstanceResponse\"\xa5\x01\n\x14MoveInstanceMetadata\x12\x15\n\rtarget_config\x18\x01 \x01(\t\x12\x45\n\x08progress\x18\x02 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xda\'\n\rInstanceAdmin\x12\xcc\x01\n\x13ListInstanceConfigs\x12<.google.spanner.admin.instance.v1.ListInstanceConfigsRequest\x1a=.google.spanner.admin.instance.v1.ListInstanceConfigsResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/v1/{parent=projects/*}/instanceConfigs\x12\xb9\x01\n\x11GetInstanceConfig\x12:.google.spanner.admin.instance.v1.GetInstanceConfigRequest\x1a\x30.google.spanner.admin.instance.v1.InstanceConfig\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/v1/{name=projects/*/instanceConfigs/*}\x12\xc8\x02\n\x14\x43reateInstanceConfig\x12=.google.spanner.admin.instance.v1.CreateInstanceConfigRequest\x1a\x1d.google.longrunning.Operation\"\xd1\x01\xca\x41p\n/google.spanner.admin.instance.v1.InstanceConfig\x12=google.spanner.admin.instance.v1.CreateInstanceConfigMetadata\xda\x41)parent,instance_config,instance_config_id\x82\xd3\xe4\x93\x02,\"\'/v1/{parent=projects/*}/instanceConfigs:\x01*\x12\xca\x02\n\x14UpdateInstanceConfig\x12=.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest\x1a\x1d.google.longrunning.Operation\"\xd3\x01\xca\x41p\n/google.spanner.admin.instance.v1.InstanceConfig\x12=google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata\xda\x41\x1binstance_config,update_mask\x82\xd3\xe4\x93\x02<27/v1/{instance_config.name=projects/*/instanceConfigs/*}:\x01*\x12\xa5\x01\n\x14\x44\x65leteInstanceConfig\x12=.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest\x1a\x16.google.protobuf.Empty\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)*\'/v1/{name=projects/*/instanceConfigs/*}\x12\xf0\x01\n\x1cListInstanceConfigOperations\x12\x45.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest\x1a\x46.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*}/instanceConfigOperations\x12\xb4\x01\n\rListInstances\x12\x36.google.spanner.admin.instance.v1.ListInstancesRequest\x1a\x37.google.spanner.admin.instance.v1.ListInstancesResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/instances\x12\xe4\x01\n\x16ListInstancePartitions\x12?.google.spanner.admin.instance.v1.ListInstancePartitionsRequest\x1a@.google.spanner.admin.instance.v1.ListInstancePartitionsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/instances/*}/instancePartitions\x12\xa1\x01\n\x0bGetInstance\x12\x34.google.spanner.admin.instance.v1.GetInstanceRequest\x1a*.google.spanner.admin.instance.v1.Instance\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/instances/*}\x12\x9c\x02\n\x0e\x43reateInstance\x12\x37.google.spanner.admin.instance.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41\x64\n)google.spanner.admin.instance.v1.Instance\x12\x37google.spanner.admin.instance.v1.CreateInstanceMetadata\xda\x41\x1bparent,instance_id,instance\x82\xd3\xe4\x93\x02&\"!/v1/{parent=projects/*}/instances:\x01*\x12\x9d\x02\n\x0eUpdateInstance\x12\x37.google.spanner.admin.instance.v1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x01\xca\x41\x64\n)google.spanner.admin.instance.v1.Instance\x12\x37google.spanner.admin.instance.v1.UpdateInstanceMetadata\xda\x41\x13instance,field_mask\x82\xd3\xe4\x93\x02/2*/v1/{instance.name=projects/*/instances/*}:\x01*\x12\x93\x01\n\x0e\x44\x65leteInstance\x12\x37.google.spanner.admin.instance.v1.DeleteInstanceRequest\x1a\x16.google.protobuf.Empty\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=projects/*/instances/*}\x12\x9a\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"O\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x37\"2/v1/{resource=projects/*/instances/*}:setIamPolicy:\x01*\x12\x93\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"H\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x37\"2/v1/{resource=projects/*/instances/*}:getIamPolicy:\x01*\x12\xc5\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"Z\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02=\"8/v1/{resource=projects/*/instances/*}:testIamPermissions:\x01*\x12\xd1\x01\n\x14GetInstancePartition\x12=.google.spanner.admin.instance.v1.GetInstancePartitionRequest\x1a\x33.google.spanner.admin.instance.v1.InstancePartition\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/instances/*/instancePartitions/*}\x12\xe9\x02\n\x17\x43reateInstancePartition\x12@.google.spanner.admin.instance.v1.CreateInstancePartitionRequest\x1a\x1d.google.longrunning.Operation\"\xec\x01\xca\x41v\n2google.spanner.admin.instance.v1.InstancePartition\x12@google.spanner.admin.instance.v1.CreateInstancePartitionMetadata\xda\x41/parent,instance_partition,instance_partition_id\x82\xd3\xe4\x93\x02;\"6/v1/{parent=projects/*/instances/*}/instancePartitions:\x01*\x12\xba\x01\n\x17\x44\x65leteInstancePartition\x12@.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/instances/*/instancePartitions/*}\x12\xea\x02\n\x17UpdateInstancePartition\x12@.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest\x1a\x1d.google.longrunning.Operation\"\xed\x01\xca\x41v\n2google.spanner.admin.instance.v1.InstancePartition\x12@google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata\xda\x41\x1dinstance_partition,field_mask\x82\xd3\xe4\x93\x02N2I/v1/{instance_partition.name=projects/*/instances/*/instancePartitions/*}:\x01*\x12\x88\x02\n\x1fListInstancePartitionOperations\x12H.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest\x1aI.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/instances/*}/instancePartitionOperations\x12\x89\x02\n\x0cMoveInstance\x12\x35.google.spanner.admin.instance.v1.MoveInstanceRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41n\n5google.spanner.admin.instance.v1.MoveInstanceResponse\x12\x35google.spanner.admin.instance.v1.MoveInstanceMetadata\x82\xd3\xe4\x93\x02+\"&/v1/{name=projects/*/instances/*}:move:\x01*\x1ax\xca\x41\x16spanner.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.adminB\x8b\x02\n$com.google.spanner.admin.instance.v1B\x19SpannerInstanceAdminProtoP\x01ZFcloud.google.com/go/spanner/admin/instance/apiv1/instancepb;instancepb\xaa\x02&Google.Cloud.Spanner.Admin.Instance.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Instance\\V1\xea\x02+Google::Cloud::Spanner::Admin::Instance::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + ReplicaInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaInfo").msgclass + ReplicaInfo::ReplicaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType").enummodule + InstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig").msgclass + InstanceConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig.Type").enummodule + InstanceConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig.State").enummodule + InstanceConfig::FreeInstanceAvailability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailability").enummodule + InstanceConfig::QuorumType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig.QuorumType").enummodule + ReplicaComputeCapacity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaComputeCapacity").msgclass + AutoscalingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.AutoscalingConfig").msgclass + AutoscalingConfig::AutoscalingLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits").msgclass + AutoscalingConfig::AutoscalingTargets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets").msgclass + AutoscalingConfig::AsymmetricAutoscalingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption").msgclass + AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides").msgclass + Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance").msgclass + Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance.State").enummodule + Instance::InstanceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance.InstanceType").enummodule + Instance::Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance.Edition").enummodule + Instance::DefaultBackupScheduleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType").enummodule + ListInstanceConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigsRequest").msgclass + ListInstanceConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigsResponse").msgclass + GetInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.GetInstanceConfigRequest").msgclass + CreateInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceConfigRequest").msgclass + UpdateInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceConfigRequest").msgclass + DeleteInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.DeleteInstanceConfigRequest").msgclass + ListInstanceConfigOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest").msgclass + ListInstanceConfigOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse").msgclass + GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.GetInstanceRequest").msgclass + CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceRequest").msgclass + ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancesRequest").msgclass + ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancesResponse").msgclass + UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceRequest").msgclass + DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.DeleteInstanceRequest").msgclass + CreateInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceMetadata").msgclass + UpdateInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceMetadata").msgclass + FreeInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.FreeInstanceMetadata").msgclass + FreeInstanceMetadata::ExpireBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior").enummodule + CreateInstanceConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceConfigMetadata").msgclass + UpdateInstanceConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata").msgclass + InstancePartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstancePartition").msgclass + InstancePartition::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstancePartition.State").enummodule + CreateInstancePartitionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstancePartitionMetadata").msgclass + CreateInstancePartitionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstancePartitionRequest").msgclass + DeleteInstancePartitionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.DeleteInstancePartitionRequest").msgclass + GetInstancePartitionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.GetInstancePartitionRequest").msgclass + UpdateInstancePartitionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstancePartitionRequest").msgclass + UpdateInstancePartitionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata").msgclass + ListInstancePartitionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancePartitionsRequest").msgclass + ListInstancePartitionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancePartitionsResponse").msgclass + ListInstancePartitionOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest").msgclass + ListInstancePartitionOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse").msgclass + MoveInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.MoveInstanceRequest").msgclass + MoveInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.MoveInstanceResponse").msgclass + MoveInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.MoveInstanceMetadata").msgclass + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb new file mode 100644 index 000000000000..d5b8848f47b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb @@ -0,0 +1,463 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/spanner/admin/instance/v1/spanner_instance_admin.proto for package 'Google.Cloud.Spanner.Admin.Instance.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/spanner/admin/instance/v1/spanner_instance_admin_pb' + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + module InstanceAdmin + # Cloud Spanner Instance Admin API + # + # The Cloud Spanner Instance Admin API can be used to create, delete, + # modify and list instances. Instances are dedicated Cloud Spanner serving + # and storage resources to be used by Cloud Spanner databases. + # + # Each instance has a "configuration", which dictates where the + # serving resources for the Cloud Spanner instance are located (e.g., + # US-central, Europe). Configurations are created by Google based on + # resource availability. + # + # Cloud Spanner billing is based on the instances that exist and their + # sizes. After an instance exists, there are no additional + # per-database or per-operation charges for use of the instance + # (though there may be additional network bandwidth charges). + # Instances offer isolation: problems with databases in one instance + # will not affect other instances. However, within an instance + # databases can affect each other. For example, if one database in an + # instance receives a lot of requests and consumes most of the + # instance resources, fewer resources are available for other + # databases in that instance, and their performance may suffer. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.spanner.admin.instance.v1.InstanceAdmin' + + # Lists the supported instance configurations for a given project. + # + # Returns both Google-managed configurations and user-managed + # configurations. + rpc :ListInstanceConfigs, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse + # Gets information about a particular instance configuration. + rpc :GetInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig + # Creates an instance configuration and begins preparing it to be used. The + # returned long-running operation + # can be used to track the progress of preparing the new + # instance configuration. The instance configuration name is assigned by the + # caller. If the named instance configuration already exists, + # `CreateInstanceConfig` returns `ALREADY_EXISTS`. + # + # Immediately after the request returns: + # + # * The instance configuration is readable via the API, with all requested + # attributes. The instance configuration's + # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] + # field is set to true. Its state is `CREATING`. + # + # While the operation is pending: + # + # * Cancelling the operation renders the instance configuration immediately + # unreadable via the API. + # * Except for deleting the creating resource, all other attempts to modify + # the instance configuration are rejected. + # + # Upon completion of the returned operation: + # + # * Instances can be created using the instance configuration. + # * The instance configuration's + # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] + # field becomes false. Its state becomes `READY`. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to track + # creation of the instance configuration. The + # metadata field type is + # [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. + # The response field type is + # [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if + # successful. + # + # Authorization requires `spanner.instanceConfigs.create` permission on + # the resource + # [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent]. + rpc :CreateInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest, ::Google::Longrunning::Operation + # Updates an instance configuration. The returned + # long-running operation can be used to track + # the progress of updating the instance. If the named instance configuration + # does not exist, returns `NOT_FOUND`. + # + # Only user-managed configurations can be updated. + # + # Immediately after the request returns: + # + # * The instance configuration's + # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] + # field is set to true. + # + # While the operation is pending: + # + # * Cancelling the operation sets its metadata's + # [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time]. + # The operation is guaranteed to succeed at undoing all changes, after + # which point it terminates with a `CANCELLED` status. + # * All other attempts to modify the instance configuration are rejected. + # * Reading the instance configuration via the API continues to give the + # pre-request values. + # + # Upon completion of the returned operation: + # + # * Creating instances using the instance configuration uses the new + # values. + # * The new values of the instance configuration are readable via the API. + # * The instance configuration's + # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] + # field becomes false. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to track + # the instance configuration modification. The + # metadata field type is + # [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata]. + # The response field type is + # [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if + # successful. + # + # Authorization requires `spanner.instanceConfigs.update` permission on + # the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name]. + rpc :UpdateInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest, ::Google::Longrunning::Operation + # Deletes the instance configuration. Deletion is only allowed when no + # instances are using the configuration. If any instances are using + # the configuration, returns `FAILED_PRECONDITION`. + # + # Only user-managed configurations can be deleted. + # + # Authorization requires `spanner.instanceConfigs.delete` permission on + # the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name]. + rpc :DeleteInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest, ::Google::Protobuf::Empty + # Lists the user-managed instance configuration long-running + # operations in the given project. An instance + # configuration operation has a name of the form + # `projects//instanceConfigs//operations/`. + # The long-running operation + # metadata field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. Operations returned are ordered by + # `operation.metadata.value.start_time` in descending order starting + # from the most recently started operation. + rpc :ListInstanceConfigOperations, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse + # Lists all instances in the given project. + rpc :ListInstances, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse + # Lists all instance partitions for the given instance. + rpc :ListInstancePartitions, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse + # Gets information about a particular instance. + rpc :GetInstance, ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::Instance + # Creates an instance and begins preparing it to begin serving. The + # returned long-running operation + # can be used to track the progress of preparing the new + # instance. The instance name is assigned by the caller. If the + # named instance already exists, `CreateInstance` returns + # `ALREADY_EXISTS`. + # + # Immediately upon completion of this request: + # + # * The instance is readable via the API, with all requested attributes + # but no allocated resources. Its state is `CREATING`. + # + # Until completion of the returned operation: + # + # * Cancelling the operation renders the instance immediately unreadable + # via the API. + # * The instance can be deleted. + # * All other attempts to modify the instance are rejected. + # + # Upon completion of the returned operation: + # + # * Billing for all successfully-allocated resources begins (some types + # may have lower than the requested levels). + # * Databases can be created in the instance. + # * The instance's allocated resource levels are readable via the API. + # * The instance's state becomes `READY`. + # + # The returned long-running operation will + # have a name of the format `/operations/` and + # can be used to track creation of the instance. The + # metadata field type is + # [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. + # The response field type is + # [Instance][google.spanner.admin.instance.v1.Instance], if successful. + rpc :CreateInstance, ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest, ::Google::Longrunning::Operation + # Updates an instance, and begins allocating or releasing resources + # as requested. The returned long-running operation can be used to track the + # progress of updating the instance. If the named instance does not + # exist, returns `NOT_FOUND`. + # + # Immediately upon completion of this request: + # + # * For resource types for which a decrease in the instance's allocation + # has been requested, billing is based on the newly-requested level. + # + # Until completion of the returned operation: + # + # * Cancelling the operation sets its metadata's + # [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], + # and begins restoring resources to their pre-request values. The + # operation is guaranteed to succeed at undoing all resource changes, + # after which point it terminates with a `CANCELLED` status. + # * All other attempts to modify the instance are rejected. + # * Reading the instance via the API continues to give the pre-request + # resource levels. + # + # Upon completion of the returned operation: + # + # * Billing begins for all successfully-allocated resources (some types + # may have lower than the requested levels). + # * All newly-reserved resources are available for serving the instance's + # tables. + # * The instance's new resource levels are readable via the API. + # + # The returned long-running operation will + # have a name of the format `/operations/` and + # can be used to track the instance modification. The + # metadata field type is + # [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. + # The response field type is + # [Instance][google.spanner.admin.instance.v1.Instance], if successful. + # + # Authorization requires `spanner.instances.update` permission on + # the resource [name][google.spanner.admin.instance.v1.Instance.name]. + rpc :UpdateInstance, ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest, ::Google::Longrunning::Operation + # Deletes an instance. + # + # Immediately upon completion of the request: + # + # * Billing ceases for all of the instance's reserved resources. + # + # Soon afterward: + # + # * The instance and *all of its databases* immediately and + # irrevocably disappear from the API. All data in the databases + # is permanently deleted. + rpc :DeleteInstance, ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest, ::Google::Protobuf::Empty + # Sets the access control policy on an instance resource. Replaces any + # existing policy. + # + # Authorization requires `spanner.instances.setIamPolicy` on + # [resource][google.iam.v1.SetIamPolicyRequest.resource]. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets the access control policy for an instance resource. Returns an empty + # policy if an instance exists but does not have a policy set. + # + # Authorization requires `spanner.instances.getIamPolicy` on + # [resource][google.iam.v1.GetIamPolicyRequest.resource]. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns permissions that the caller has on the specified instance resource. + # + # Attempting this RPC on a non-existent Cloud Spanner instance resource will + # result in a NOT_FOUND error if the user has `spanner.instances.list` + # permission on the containing Google Cloud Project. Otherwise returns an + # empty set of permissions. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Gets information about a particular instance partition. + rpc :GetInstancePartition, ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition + # Creates an instance partition and begins preparing it to be used. The + # returned long-running operation + # can be used to track the progress of preparing the new instance partition. + # The instance partition name is assigned by the caller. If the named + # instance partition already exists, `CreateInstancePartition` returns + # `ALREADY_EXISTS`. + # + # Immediately upon completion of this request: + # + # * The instance partition is readable via the API, with all requested + # attributes but no allocated resources. Its state is `CREATING`. + # + # Until completion of the returned operation: + # + # * Cancelling the operation renders the instance partition immediately + # unreadable via the API. + # * The instance partition can be deleted. + # * All other attempts to modify the instance partition are rejected. + # + # Upon completion of the returned operation: + # + # * Billing for all successfully-allocated resources begins (some types + # may have lower than the requested levels). + # * Databases can start using this instance partition. + # * The instance partition's allocated resource levels are readable via the + # API. + # * The instance partition's state becomes `READY`. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to + # track creation of the instance partition. The + # metadata field type is + # [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. + # The response field type is + # [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if + # successful. + rpc :CreateInstancePartition, ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest, ::Google::Longrunning::Operation + # Deletes an existing instance partition. Requires that the + # instance partition is not used by any database or backup and is not the + # default instance partition of an instance. + # + # Authorization requires `spanner.instancePartitions.delete` permission on + # the resource + # [name][google.spanner.admin.instance.v1.InstancePartition.name]. + rpc :DeleteInstancePartition, ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest, ::Google::Protobuf::Empty + # Updates an instance partition, and begins allocating or releasing resources + # as requested. The returned long-running operation can be used to track the + # progress of updating the instance partition. If the named instance + # partition does not exist, returns `NOT_FOUND`. + # + # Immediately upon completion of this request: + # + # * For resource types for which a decrease in the instance partition's + # allocation has been requested, billing is based on the newly-requested + # level. + # + # Until completion of the returned operation: + # + # * Cancelling the operation sets its metadata's + # [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], + # and begins restoring resources to their pre-request values. The + # operation is guaranteed to succeed at undoing all resource changes, + # after which point it terminates with a `CANCELLED` status. + # * All other attempts to modify the instance partition are rejected. + # * Reading the instance partition via the API continues to give the + # pre-request resource levels. + # + # Upon completion of the returned operation: + # + # * Billing begins for all successfully-allocated resources (some types + # may have lower than the requested levels). + # * All newly-reserved resources are available for serving the instance + # partition's tables. + # * The instance partition's new resource levels are readable via the API. + # + # The returned long-running operation will + # have a name of the format + # `/operations/` and can be used to + # track the instance partition modification. The + # metadata field type is + # [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. + # The response field type is + # [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if + # successful. + # + # Authorization requires `spanner.instancePartitions.update` permission on + # the resource + # [name][google.spanner.admin.instance.v1.InstancePartition.name]. + rpc :UpdateInstancePartition, ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest, ::Google::Longrunning::Operation + # Lists instance partition long-running operations in the given instance. + # An instance partition operation has a name of the form + # `projects//instances//instancePartitions//operations/`. + # The long-running operation + # metadata field type + # `metadata.type_url` describes the type of the metadata. Operations returned + # include those that have completed/failed/canceled within the last 7 days, + # and pending operations. Operations returned are ordered by + # `operation.metadata.value.start_time` in descending order starting from the + # most recently started operation. + # + # Authorization requires `spanner.instancePartitionOperations.list` + # permission on the resource + # [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent]. + rpc :ListInstancePartitionOperations, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse + # Moves an instance to the target instance configuration. You can use the + # returned long-running operation to track + # the progress of moving the instance. + # + # `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of + # the following criteria: + # + # * Is undergoing a move to a different instance configuration + # * Has backups + # * Has an ongoing update + # * Contains any CMEK-enabled databases + # * Is a free trial instance + # + # While the operation is pending: + # + # * All other attempts to modify the instance, including changes to its + # compute capacity, are rejected. + # * The following database and backup admin operations are rejected: + # + # * `DatabaseAdmin.CreateDatabase` + # * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is + # specified in the request.) + # * `DatabaseAdmin.RestoreDatabase` + # * `DatabaseAdmin.CreateBackup` + # * `DatabaseAdmin.CopyBackup` + # + # * Both the source and target instance configurations are subject to + # hourly compute and storage charges. + # * The instance might experience higher read-write latencies and a higher + # transaction abort rate. However, moving an instance doesn't cause any + # downtime. + # + # The returned long-running operation has + # a name of the format + # `/operations/` and can be used to track + # the move instance operation. The + # metadata field type is + # [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. + # The response field type is + # [Instance][google.spanner.admin.instance.v1.Instance], + # if successful. + # Cancelling the operation sets its metadata's + # [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time]. + # Cancellation is not immediate because it involves moving any data + # previously moved to the target instance configuration back to the original + # instance configuration. You can use this operation to track the progress of + # the cancellation. Upon successful completion of the cancellation, the + # operation terminates with `CANCELLED` status. + # + # If not cancelled, upon completion of the returned operation: + # + # * The instance successfully moves to the target instance + # configuration. + # * You are billed for compute and storage in target instance + # configuration. + # + # Authorization requires the `spanner.instances.update` permission on + # the resource [instance][google.spanner.admin.instance.v1.Instance]. + # + # For more details, see + # [Move an instance](https://cloud.google.com/spanner/docs/move-instance). + rpc :MoveInstance, ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/README.md new file mode 100644 index 000000000000..ff5b3befac4d --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Spanner Instance Admin V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.rb new file mode 100644 index 000000000000..12175e5866ba --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + # Encapsulates progress related information for a Cloud Spanner long + # running instance operations. + # @!attribute [rw] progress_percent + # @return [::Integer] + # Percent completion of the operation. + # Values are between 0 and 100 inclusive. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time the request was received. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # If set, the time at which this operation failed or was completed + # successfully. + class OperationProgress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ReplicaSelection identifies replicas with common properties. + # @!attribute [rw] location + # @return [::String] + # Required. Name of the location of the replicas (e.g., "us-central1"). + class ReplicaSelection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicates the expected fulfillment period of an operation. + module FulfillmentPeriod + # Not specified. + FULFILLMENT_PERIOD_UNSPECIFIED = 0 + + # Normal fulfillment period. The operation is expected to complete within + # minutes. + FULFILLMENT_PERIOD_NORMAL = 1 + + # Extended fulfillment period. It can take up to an hour for the operation + # to complete. + FULFILLMENT_PERIOD_EXTENDED = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb new file mode 100644 index 000000000000..d59b84381c11 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb @@ -0,0 +1,1561 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module Admin + module Instance + module V1 + # @!attribute [rw] location + # @return [::String] + # The location of the serving resources, e.g., "us-central1". + # @!attribute [rw] type + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaInfo::ReplicaType] + # The type of replica. + # @!attribute [rw] default_leader_location + # @return [::Boolean] + # If true, this location is designated as the default leader location where + # leader replicas are placed. See the [region types + # documentation](https://cloud.google.com/spanner/docs/instances#region_types) + # for more details. + class ReplicaInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates the type of replica. See the [replica types + # documentation](https://cloud.google.com/spanner/docs/replication#replica_types) + # for more details. + module ReplicaType + # Not specified. + TYPE_UNSPECIFIED = 0 + + # Read-write replicas support both reads and writes. These replicas: + # + # * Maintain a full copy of your data. + # * Serve reads. + # * Can vote whether to commit a write. + # * Participate in leadership election. + # * Are eligible to become a leader. + READ_WRITE = 1 + + # Read-only replicas only support reads (not writes). Read-only replicas: + # + # * Maintain a full copy of your data. + # * Serve reads. + # * Do not participate in voting to commit writes. + # * Are not eligible to become a leader. + READ_ONLY = 2 + + # Witness replicas don't support reads but do participate in voting to + # commit writes. Witness replicas: + # + # * Do not maintain a full copy of data. + # * Do not serve reads. + # * Vote whether to commit writes. + # * Participate in leader election but are not eligible to become leader. + WITNESS = 3 + end + end + + # A possible configuration for a Cloud Spanner instance. Configurations + # define the geographic placement of nodes and their replication. + # @!attribute [rw] name + # @return [::String] + # A unique identifier for the instance configuration. Values + # are of the form + # `projects//instanceConfigs/[a-z][-a-z0-9]*`. + # + # User instance configuration must start with `custom-`. + # @!attribute [rw] display_name + # @return [::String] + # The name of this instance configuration as it appears in UIs. + # @!attribute [r] config_type + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig::Type] + # Output only. Whether this instance configuration is a Google-managed or + # user-managed configuration. + # @!attribute [rw] replicas + # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaInfo>] + # The geographic placement of nodes in this instance configuration and their + # replication properties. + # + # To create user-managed configurations, input + # `replicas` must include all replicas in `replicas` of the `base_config` + # and include one or more replicas in the `optional_replicas` of the + # `base_config`. + # @!attribute [r] optional_replicas + # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaInfo>] + # Output only. The available optional replicas to choose from for + # user-managed configurations. Populated for Google-managed configurations. + # @!attribute [rw] base_config + # @return [::String] + # Base configuration name, e.g. projects//instanceConfigs/nam3, + # based on which this configuration is created. Only set for user-managed + # configurations. `base_config` must refer to a configuration of type + # `GOOGLE_MANAGED` in the same project as this configuration. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Cloud Labels are a flexible and lightweight mechanism for organizing cloud + # resources into groups that reflect a customer's organizational needs and + # deployment strategies. Cloud Labels can be used to filter collections of + # resources. They can be used to control how resource metrics are aggregated. + # And they can be used as arguments to policy management rules (e.g. route, + # firewall, load balancing, etc.). + # + # * Label keys must be between 1 and 63 characters long and must conform to + # the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + # * Label values must be between 0 and 63 characters long and must conform + # to the regular expression `[a-z0-9_-]{0,63}`. + # * No more than 64 labels can be associated with a given resource. + # + # See https://goo.gl/xmQnxf for more information on and examples of labels. + # + # If you plan to use labels in your own code, please note that additional + # characters may be allowed in the future. Therefore, you are advised to use + # an internal label representation, such as JSON, which doesn't rely upon + # specific characters being disallowed. For example, representing labels + # as the string: name + "_" + value would prove problematic if we were to + # allow "_" in a future release. + # @!attribute [rw] etag + # @return [::String] + # etag is used for optimistic concurrency control as a way + # to help prevent simultaneous updates of a instance configuration from + # overwriting each other. It is strongly suggested that systems make use of + # the etag in the read-modify-write cycle to perform instance configuration + # updates in order to avoid race conditions: An etag is returned in the + # response which contains instance configurations, and systems are expected + # to put that etag in the request to update instance configuration to ensure + # that their change is applied to the same version of the instance + # configuration. If no etag is provided in the call to update the instance + # configuration, then the existing instance configuration is overwritten + # blindly. + # @!attribute [rw] leader_options + # @return [::Array<::String>] + # Allowed values of the "default_leader" schema option for databases in + # instances that use this instance configuration. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. If true, the instance configuration is being created or + # updated. If false, there are no ongoing operations for the instance + # configuration. + # @!attribute [r] state + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig::State] + # Output only. The current instance configuration state. Applicable only for + # `USER_MANAGED` configurations. + # @!attribute [r] free_instance_availability + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig::FreeInstanceAvailability] + # Output only. Describes whether free instances are available to be created + # in this instance configuration. + # @!attribute [r] quorum_type + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig::QuorumType] + # Output only. The `QuorumType` of the instance configuration. + # @!attribute [r] storage_limit_per_processing_unit + # @return [::Integer] + # Output only. The storage limit in bytes per processing unit. + class InstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of this configuration. + module Type + # Unspecified. + TYPE_UNSPECIFIED = 0 + + # Google-managed configuration. + GOOGLE_MANAGED = 1 + + # User-managed configuration. + USER_MANAGED = 2 + end + + # Indicates the current state of the instance configuration. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # The instance configuration is still being created. + CREATING = 1 + + # The instance configuration is fully created and ready to be used to + # create instances. + READY = 2 + end + + # Describes the availability for free instances to be created in an instance + # configuration. + module FreeInstanceAvailability + # Not specified. + FREE_INSTANCE_AVAILABILITY_UNSPECIFIED = 0 + + # Indicates that free instances are available to be created in this + # instance configuration. + AVAILABLE = 1 + + # Indicates that free instances are not supported in this instance + # configuration. + UNSUPPORTED = 2 + + # Indicates that free instances are currently not available to be created + # in this instance configuration. + DISABLED = 3 + + # Indicates that additional free instances cannot be created in this + # instance configuration because the project has reached its limit of free + # instances. + QUOTA_EXCEEDED = 4 + end + + # Indicates the quorum type of this instance configuration. + module QuorumType + # Quorum type not specified. + QUORUM_TYPE_UNSPECIFIED = 0 + + # An instance configuration tagged with `REGION` quorum type forms a write + # quorum in a single region. + REGION = 1 + + # An instance configuration tagged with the `DUAL_REGION` quorum type forms + # a write quorum with exactly two read-write regions in a multi-region + # configuration. + # + # This instance configuration requires failover in the event of + # regional failures. + DUAL_REGION = 2 + + # An instance configuration tagged with the `MULTI_REGION` quorum type + # forms a write quorum from replicas that are spread across more than one + # region in a multi-region configuration. + MULTI_REGION = 3 + end + end + + # ReplicaComputeCapacity describes the amount of server resources that are + # allocated to each replica identified by the replica selection. + # @!attribute [rw] replica_selection + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaSelection] + # Required. Identifies replicas by specified properties. + # All replicas in the selection have the same amount of compute capacity. + # @!attribute [rw] node_count + # @return [::Integer] + # The number of nodes allocated to each replica. + # + # This may be zero in API responses for instances that are not yet in + # state `READY`. + # + # Note: The following fields are mutually exclusive: `node_count`, `processing_units`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] processing_units + # @return [::Integer] + # The number of processing units allocated to each replica. + # + # This may be zero in API responses for instances that are not yet in + # state `READY`. + # + # Note: The following fields are mutually exclusive: `processing_units`, `node_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ReplicaComputeCapacity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Autoscaling configuration for an instance. + # @!attribute [rw] autoscaling_limits + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingLimits] + # Required. Autoscaling limits for an instance. + # @!attribute [rw] autoscaling_targets + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingTargets] + # Required. The autoscaling targets for an instance. + # @!attribute [rw] asymmetric_autoscaling_options + # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption>] + # Optional. Optional asymmetric autoscaling options. + # Replicas matching the replica selection criteria will be autoscaled + # independently from other replicas. The autoscaler will scale the replicas + # based on the utilization of replicas identified by the replica selection. + # Replica selections should not overlap with each other. + # + # Other replicas (those do not match any replica selection) will be + # autoscaled together and will have the same compute capacity allocated to + # them. + class AutoscalingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The autoscaling limits for the instance. Users can define the minimum and + # maximum compute capacity allocated to the instance, and the autoscaler will + # only scale within that range. Users can either use nodes or processing + # units to specify the limits, but should use the same unit to set both the + # min_limit and max_limit. + # @!attribute [rw] min_nodes + # @return [::Integer] + # Minimum number of nodes allocated to the instance. If set, this number + # should be greater than or equal to 1. + # + # Note: The following fields are mutually exclusive: `min_nodes`, `min_processing_units`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] min_processing_units + # @return [::Integer] + # Minimum number of processing units allocated to the instance. If set, + # this number should be multiples of 1000. + # + # Note: The following fields are mutually exclusive: `min_processing_units`, `min_nodes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] max_nodes + # @return [::Integer] + # Maximum number of nodes allocated to the instance. If set, this number + # should be greater than or equal to min_nodes. + # + # Note: The following fields are mutually exclusive: `max_nodes`, `max_processing_units`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] max_processing_units + # @return [::Integer] + # Maximum number of processing units allocated to the instance. If set, + # this number should be multiples of 1000 and be greater than or equal to + # min_processing_units. + # + # Note: The following fields are mutually exclusive: `max_processing_units`, `max_nodes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AutoscalingLimits + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The autoscaling targets for an instance. + # @!attribute [rw] high_priority_cpu_utilization_percent + # @return [::Integer] + # Optional. The target high priority cpu utilization percentage that the + # autoscaler should be trying to achieve for the instance. This number is + # on a scale from 0 (no utilization) to 100 (full utilization). The valid + # range is [10, 90] inclusive. If not specified or set to 0, the autoscaler + # skips scaling based on high priority CPU utilization. + # @!attribute [rw] total_cpu_utilization_percent + # @return [::Integer] + # Optional. The target total CPU utilization percentage that the autoscaler + # should be trying to achieve for the instance. This number is on a scale + # from 0 (no utilization) to 100 (full utilization). The valid range is + # [10, 90] inclusive. If not specified or set to 0, the autoscaler skips + # scaling based on total CPU utilization. If both + # `high_priority_cpu_utilization_percent` and + # `total_cpu_utilization_percent` are specified, the autoscaler provisions + # the larger of the two required compute capacities to satisfy both + # targets. + # @!attribute [rw] storage_utilization_percent + # @return [::Integer] + # Required. The target storage utilization percentage that the autoscaler + # should be trying to achieve for the instance. This number is on a scale + # from 0 (no utilization) to 100 (full utilization). The valid range is + # [10, 99] inclusive. + class AutoscalingTargets + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # AsymmetricAutoscalingOption specifies the scaling of replicas identified by + # the given selection. + # @!attribute [rw] replica_selection + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaSelection] + # Required. Selects the replicas to which this AsymmetricAutoscalingOption + # applies. Only read-only replicas are supported. + # @!attribute [rw] overrides + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides] + # Optional. Overrides applied to the top-level autoscaling configuration + # for the selected replicas. + class AsymmetricAutoscalingOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Overrides the top-level autoscaling configuration for the replicas + # identified by `replica_selection`. All fields in this message are + # optional. Any unspecified fields will use the corresponding values from + # the top-level autoscaling configuration. + # @!attribute [rw] autoscaling_limits + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingLimits] + # Optional. If specified, overrides the min/max limit in the top-level + # autoscaling configuration for the selected replicas. + # @!attribute [rw] autoscaling_target_high_priority_cpu_utilization_percent + # @return [::Integer] + # Optional. If specified, overrides the autoscaling target + # high_priority_cpu_utilization_percent in the top-level autoscaling + # configuration for the selected replicas. + # @!attribute [rw] autoscaling_target_total_cpu_utilization_percent + # @return [::Integer] + # Optional. If specified, overrides the + # autoscaling target `total_cpu_utilization_percent` + # in the top-level autoscaling configuration for the selected replicas. + # @!attribute [rw] disable_high_priority_cpu_autoscaling + # @return [::Boolean] + # Optional. If true, disables high priority CPU autoscaling for the + # selected replicas and ignores + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingTargets#high_priority_cpu_utilization_percent high_priority_cpu_utilization_percent} + # in the top-level autoscaling configuration. + # + # When setting this field to true, setting + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#autoscaling_target_high_priority_cpu_utilization_percent autoscaling_target_high_priority_cpu_utilization_percent} + # field to a non-zero value for the same replica is not supported. + # + # If false, the + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#autoscaling_target_high_priority_cpu_utilization_percent autoscaling_target_high_priority_cpu_utilization_percent} + # field in the replica will be used if set to a non-zero value. + # Otherwise, the + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingTargets#high_priority_cpu_utilization_percent high_priority_cpu_utilization_percent} + # field in the top-level autoscaling configuration will be used. + # + # Setting both + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#disable_high_priority_cpu_autoscaling disable_high_priority_cpu_autoscaling} + # and + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#disable_total_cpu_autoscaling disable_total_cpu_autoscaling} + # to true for the same replica is not supported. + # @!attribute [rw] disable_total_cpu_autoscaling + # @return [::Boolean] + # Optional. If true, disables total CPU autoscaling for the selected + # replicas and ignores + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingTargets#total_cpu_utilization_percent total_cpu_utilization_percent} + # in the top-level autoscaling configuration. + # + # When setting this field to true, setting + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#autoscaling_target_total_cpu_utilization_percent autoscaling_target_total_cpu_utilization_percent} + # field to a non-zero value for the same replica is not supported. + # + # If false, the + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#autoscaling_target_total_cpu_utilization_percent autoscaling_target_total_cpu_utilization_percent} + # field in the replica will be used if set to a non-zero value. + # Otherwise, the + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingTargets#total_cpu_utilization_percent total_cpu_utilization_percent} + # field in the top-level autoscaling configuration will be used. + # + # Setting both + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#disable_high_priority_cpu_autoscaling disable_high_priority_cpu_autoscaling} + # and + # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#disable_total_cpu_autoscaling disable_total_cpu_autoscaling} + # to true for the same replica is not supported. + class AutoscalingConfigOverrides + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # An isolated set of Cloud Spanner resources on which databases can be hosted. + # @!attribute [rw] name + # @return [::String] + # Required. A unique identifier for the instance, which cannot be changed + # after the instance is created. Values are of the form + # `projects//instances/[a-z][-a-z0-9]*[a-z0-9]`. The final + # segment of the name must be between 2 and 64 characters in length. + # @!attribute [rw] config + # @return [::String] + # Required. The name of the instance's configuration. Values are of the form + # `projects//instanceConfigs/`. See + # also {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} and + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs ListInstanceConfigs}. + # @!attribute [rw] display_name + # @return [::String] + # Required. The descriptive name for this instance as it appears in UIs. + # Must be unique per project and between 4 and 30 characters in length. + # @!attribute [rw] node_count + # @return [::Integer] + # The number of nodes allocated to this instance. At most, one of either + # `node_count` or `processing_units` should be present in the message. + # + # Users can set the `node_count` field to specify the target number of nodes + # allocated to the instance. + # + # If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY` + # field and reflects the current number of nodes allocated to the instance. + # + # This might be zero in API responses for instances that are not yet in the + # `READY` state. + # + # + # For more information, see + # [Compute capacity, nodes, and processing + # units](https://cloud.google.com/spanner/docs/compute-capacity). + # @!attribute [rw] processing_units + # @return [::Integer] + # The number of processing units allocated to this instance. At most, one of + # either `processing_units` or `node_count` should be present in the message. + # + # Users can set the `processing_units` field to specify the target number of + # processing units allocated to the instance. + # + # If autoscaling is enabled, `processing_units` is treated as an + # `OUTPUT_ONLY` field and reflects the current number of processing units + # allocated to the instance. + # + # This might be zero in API responses for instances that are not yet in the + # `READY` state. + # + # + # For more information, see + # [Compute capacity, nodes and processing + # units](https://cloud.google.com/spanner/docs/compute-capacity). + # @!attribute [r] replica_compute_capacity + # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaComputeCapacity>] + # Output only. Lists the compute capacity per ReplicaSelection. A replica + # selection identifies a set of replicas with common properties. Replicas + # identified by a ReplicaSelection are scaled with the same compute capacity. + # @!attribute [rw] autoscaling_config + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig] + # Optional. The autoscaling configuration. Autoscaling is enabled if this + # field is set. When autoscaling is enabled, node_count and processing_units + # are treated as OUTPUT_ONLY fields and reflect the current compute capacity + # allocated to the instance. + # @!attribute [r] state + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance::State] + # Output only. The current instance state. For + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance CreateInstance}, + # the state must be either omitted or set to `CREATING`. For + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance UpdateInstance}, + # the state must be either omitted or set to `READY`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Cloud Labels are a flexible and lightweight mechanism for organizing cloud + # resources into groups that reflect a customer's organizational needs and + # deployment strategies. Cloud Labels can be used to filter collections of + # resources. They can be used to control how resource metrics are aggregated. + # And they can be used as arguments to policy management rules (e.g. route, + # firewall, load balancing, etc.). + # + # * Label keys must be between 1 and 63 characters long and must conform to + # the following regular expression: `[a-z][a-z0-9_-]{0,62}`. + # * Label values must be between 0 and 63 characters long and must conform + # to the regular expression `[a-z0-9_-]{0,63}`. + # * No more than 64 labels can be associated with a given resource. + # + # See https://goo.gl/xmQnxf for more information on and examples of labels. + # + # If you plan to use labels in your own code, please note that additional + # characters may be allowed in the future. And so you are advised to use an + # internal label representation, such as JSON, which doesn't rely upon + # specific characters being disallowed. For example, representing labels + # as the string: name + "_" + value would prove problematic if we were to + # allow "_" in a future release. + # @!attribute [rw] instance_type + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance::InstanceType] + # The `InstanceType` of the current instance. + # @!attribute [rw] endpoint_uris + # @return [::Array<::String>] + # Deprecated. This field is not populated. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the instance was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the instance was most recently updated. + # @!attribute [rw] free_instance_metadata + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::FreeInstanceMetadata] + # Free instance metadata. Only populated for free instances. + # @!attribute [rw] edition + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance::Edition] + # Optional. The `Edition` of the current instance. + # @!attribute [rw] default_backup_schedule_type + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance::DefaultBackupScheduleType] + # Optional. Controls the default backup schedule behavior for new databases + # within the instance. By default, a backup schedule is created automatically + # when a new database is created in a new instance. + # + # Note that the `AUTOMATIC` value isn't permitted for free instances, + # as backups and backup schedules aren't supported for free instances. + # + # In the `GetInstance` or `ListInstances` response, if the value of + # `default_backup_schedule_type` isn't set, or set to `NONE`, Spanner doesn't + # create a default backup schedule for new databases in the instance. + class Instance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicates the current state of the instance. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # The instance is still being created. Resources may not be + # available yet, and operations such as database creation may not + # work. + CREATING = 1 + + # The instance is fully created and ready to do work such as + # creating databases. + READY = 2 + end + + # The type of this instance. The type can be used to distinguish product + # variants, that can affect aspects like: usage restrictions, quotas and + # billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED + # instances. + module InstanceType + # Not specified. + INSTANCE_TYPE_UNSPECIFIED = 0 + + # Provisioned instances have dedicated resources, standard usage limits and + # support. + PROVISIONED = 1 + + # Free instances provide no guarantee for dedicated resources, + # [node_count, processing_units] should be 0. They come + # with stricter usage limits and limited support. + FREE_INSTANCE = 2 + end + + # The edition selected for this instance. Different editions provide + # different capabilities at different price points. + module Edition + # Edition not specified. + EDITION_UNSPECIFIED = 0 + + # Standard edition. + STANDARD = 1 + + # Enterprise edition. + ENTERPRISE = 2 + + # Enterprise Plus edition. + ENTERPRISE_PLUS = 3 + end + + # Indicates the + # [default backup + # schedule](https://cloud.google.com/spanner/docs/backup#default-backup-schedules) + # behavior for new databases within the instance. + module DefaultBackupScheduleType + # Not specified. + DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED = 0 + + # A default backup schedule isn't created automatically when a new database + # is created in the instance. + NONE = 1 + + # A default backup schedule is created automatically when a new database + # is created in the instance. The default backup schedule creates a full + # backup every 24 hours. These full backups are retained for 7 days. + # You can edit or delete the default backup schedule once it's created. + AUTOMATIC = 2 + end + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs ListInstanceConfigs}. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project for which a list of supported instance + # configurations is requested. Values are of the form + # `projects/`. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of instance configurations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse ListInstanceConfigsResponse}. + class ListInstanceConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs ListInstanceConfigs}. + # @!attribute [rw] instance_configs + # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig>] + # The list of requested instance configurations. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs ListInstanceConfigs} + # call to fetch more of the matching instance configurations. + class ListInstanceConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_config GetInstanceConfigRequest}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the requested instance configuration. Values are of + # the form `projects//instanceConfigs/`. + class GetInstanceConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config CreateInstanceConfig}. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project in which to create the instance + # configuration. Values are of the form `projects/`. + # @!attribute [rw] instance_config_id + # @return [::String] + # Required. The ID of the instance configuration to create. Valid identifiers + # are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 + # characters in length. The `custom-` prefix is required to avoid name + # conflicts with Google-managed configurations. + # @!attribute [rw] instance_config + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] + # Required. The `InstanceConfig` proto of the configuration to create. + # `instance_config.name` must be + # `/instanceConfigs/`. + # `instance_config.base_config` must be a Google-managed configuration name, + # e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3. + # @!attribute [rw] validate_only + # @return [::Boolean] + # An option to validate, but not actually execute, a request, + # and provide the same response. + class CreateInstanceConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config UpdateInstanceConfig}. + # @!attribute [rw] instance_config + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] + # Required. The user instance configuration to update, which must always + # include the instance configuration name. Otherwise, only fields mentioned + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest#update_mask update_mask} + # need be included. To prevent conflicts of concurrent updates, + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling etag} can + # be used. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A mask specifying which fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} should be + # updated. The field mask must always be specified; this prevents any future + # fields in {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} + # from being erased accidentally by clients that do not know about them. Only + # display_name and labels can be updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # An option to validate, but not actually execute, a request, + # and provide the same response. + class UpdateInstanceConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_config DeleteInstanceConfig}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the instance configuration to be deleted. + # Values are of the form + # `projects//instanceConfigs/` + # @!attribute [rw] etag + # @return [::String] + # Used for optimistic concurrency control as a way to help prevent + # simultaneous deletes of an instance configuration from overwriting each + # other. If not empty, the API + # only deletes the instance configuration when the etag provided matches the + # current status of the requested instance configuration. Otherwise, deletes + # the instance configuration without checking the current status of the + # requested instance configuration. + # @!attribute [rw] validate_only + # @return [::Boolean] + # An option to validate, but not actually execute, a request, + # and provide the same response. + class DeleteInstanceConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations ListInstanceConfigOperations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The project of the instance configuration operations. + # Values are of the form `projects/`. + # @!attribute [rw] filter + # @return [::String] + # An expression that filters the list of returned operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the Operation are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata} + # is + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first, if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic. However, + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=` \ + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) + # AND` \ + # `(metadata.instance_config.name:custom-config) AND` \ + # `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Return operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}. + # * The instance configuration name contains "custom-config". + # * The operation started before 2021-03-28T14:50:00Z. + # * The operation resulted in an error. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse ListInstanceConfigOperationsResponse} + # to the same `parent` and with the same `filter`. + class ListInstanceConfigOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations ListInstanceConfigOperations}. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # The list of matching instance configuration long-running operations. Each + # operation's name will be + # prefixed by the name of the instance configuration. The operation's + # metadata field type + # `metadata.type_url` describes the type of the metadata. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations ListInstanceConfigOperations} + # call to fetch more of the matching metadata. + class ListInstanceConfigOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance GetInstance}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the requested instance. Values are of the form + # `projects//instances/`. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # If field_mask is present, specifies the subset of + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields that should be + # returned. If absent, all + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields are returned. + class GetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance CreateInstance}. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project in which to create the instance. Values + # are of the form `projects/`. + # @!attribute [rw] instance_id + # @return [::String] + # Required. The ID of the instance to create. Valid identifiers are of the + # form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in + # length. + # @!attribute [rw] instance + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] + # Required. The instance to create. The name may be omitted, but if + # specified must be `/instances/`. + class CreateInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances ListInstances}. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project for which a list of instances is + # requested. Values are of the form `projects/`. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of instances to be returned in the response. If 0 or less, defaults + # to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `name` + # * `display_name` + # * `labels.key` where key is the name of a label + # + # Some examples of using filters are: + # + # * `name:*` --> The instance has a name. + # * `name:Howl` --> The instance's name contains the string "howl". + # * `name:HOWL` --> Equivalent to above. + # * `NAME:howl` --> Equivalent to above. + # * `labels.env:*` --> The instance has the label "env". + # * `labels.env:dev` --> The instance has the label "env" and the value of + # the label contains the string "dev". + # * `name:howl labels.env:dev` --> The instance's name contains "howl" and + # it has the label "env" with its value + # containing "dev". + # @!attribute [rw] instance_deadline + # @return [::Google::Protobuf::Timestamp] + # Deadline used while retrieving metadata for instances. + # Instances whose metadata cannot be retrieved within this deadline will be + # added to + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#unreachable unreachable} + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. + class ListInstancesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances ListInstances}. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::Instance>] + # The list of requested instances. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances ListInstances} + # call to fetch more of the matching instances. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # The list of unreachable instances. + # It includes the names of instances whose metadata could not be retrieved + # within + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest#instance_deadline instance_deadline}. + class ListInstancesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance UpdateInstance}. + # @!attribute [rw] instance + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] + # Required. The instance to update, which must always include the instance + # name. Otherwise, only fields mentioned in + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest#field_mask field_mask} + # need be included. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A mask specifying which fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} should be updated. + # The field mask must always be specified; this prevents any future fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} from being erased + # accidentally by clients that do not know about them. + class UpdateInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance DeleteInstance}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the instance to be deleted. Values are of the form + # `projects//instances/` + class DeleteInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance CreateInstance}. + # @!attribute [rw] instance + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] + # The instance being created. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance CreateInstance} + # request was received. + # @!attribute [rw] cancel_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation was cancelled. If set, this operation is + # in the process of undoing itself (which is guaranteed to succeed) and + # cannot be cancelled again. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation failed or was completed successfully. + # @!attribute [rw] expected_fulfillment_period + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::FulfillmentPeriod] + # The expected fulfillment period of this create operation. + class CreateInstanceMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance UpdateInstance}. + # @!attribute [rw] instance + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] + # The desired end state of the update. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time at which + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance UpdateInstance} + # request was received. + # @!attribute [rw] cancel_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation was cancelled. If set, this operation is + # in the process of undoing itself (which is guaranteed to succeed) and + # cannot be cancelled again. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation failed or was completed successfully. + # @!attribute [rw] expected_fulfillment_period + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::FulfillmentPeriod] + # The expected fulfillment period of this update operation. + class UpdateInstanceMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Free instance specific metadata that is kept even after an instance has been + # upgraded for tracking purposes. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp after which the instance will either be upgraded or + # scheduled for deletion after a grace period. ExpireBehavior is used to + # choose between upgrading or scheduling the free instance for deletion. This + # timestamp is set during the creation of a free instance. + # @!attribute [r] upgrade_time + # @return [::Google::Protobuf::Timestamp] + # Output only. If present, the timestamp at which the free instance was + # upgraded to a provisioned instance. + # @!attribute [rw] expire_behavior + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::FreeInstanceMetadata::ExpireBehavior] + # Specifies the expiration behavior of a free instance. The default of + # ExpireBehavior is `REMOVE_AFTER_GRACE_PERIOD`. This can be modified during + # or after creation, and before expiration. + class FreeInstanceMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Allows users to change behavior when a free instance expires. + module ExpireBehavior + # Not specified. + EXPIRE_BEHAVIOR_UNSPECIFIED = 0 + + # When the free instance expires, upgrade the instance to a provisioned + # instance. + FREE_TO_PROVISIONED = 1 + + # When the free instance expires, disable the instance, and delete it + # after the grace period passes if it has not been upgraded. + REMOVE_AFTER_GRACE_PERIOD = 2 + end + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config CreateInstanceConfig}. + # @!attribute [rw] instance_config + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] + # The target instance configuration end state. + # @!attribute [rw] progress + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::OperationProgress] + # The progress of the + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config CreateInstanceConfig} + # operation. + # @!attribute [rw] cancel_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation was cancelled. + class CreateInstanceConfigMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config UpdateInstanceConfig}. + # @!attribute [rw] instance_config + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] + # The desired instance configuration after updating. + # @!attribute [rw] progress + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::OperationProgress] + # The progress of the + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config UpdateInstanceConfig} + # operation. + # @!attribute [rw] cancel_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation was cancelled. + class UpdateInstanceConfigMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An isolated set of Cloud Spanner resources that databases can define + # placements on. + # @!attribute [rw] name + # @return [::String] + # Required. A unique identifier for the instance partition. Values are of the + # form + # `projects//instances//instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`. + # The final segment of the name must be between 2 and 64 characters in + # length. An instance partition's name cannot be changed after the instance + # partition is created. + # @!attribute [rw] config + # @return [::String] + # Required. The name of the instance partition's configuration. Values are of + # the form `projects//instanceConfigs/`. See also + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} and + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs ListInstanceConfigs}. + # @!attribute [rw] display_name + # @return [::String] + # Required. The descriptive name for this instance partition as it appears in + # UIs. Must be unique per project and between 4 and 30 characters in length. + # @!attribute [rw] node_count + # @return [::Integer] + # The number of nodes allocated to this instance partition. + # + # Users can set the `node_count` field to specify the target number of + # nodes allocated to the instance partition. + # + # This may be zero in API responses for instance partitions that are not + # yet in state `READY`. + # + # Note: The following fields are mutually exclusive: `node_count`, `processing_units`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] processing_units + # @return [::Integer] + # The number of processing units allocated to this instance partition. + # + # Users can set the `processing_units` field to specify the target number + # of processing units allocated to the instance partition. + # + # This might be zero in API responses for instance partitions that are not + # yet in the `READY` state. + # + # Note: The following fields are mutually exclusive: `processing_units`, `node_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] autoscaling_config + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig] + # Optional. The autoscaling configuration. Autoscaling is enabled if this + # field is set. When autoscaling is enabled, fields in compute_capacity are + # treated as OUTPUT_ONLY fields and reflect the current compute capacity + # allocated to the instance partition. + # @!attribute [r] state + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition::State] + # Output only. The current instance partition state. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the instance partition was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the instance partition was most recently + # updated. + # @!attribute [r] referencing_databases + # @return [::Array<::String>] + # Output only. The names of the databases that reference this + # instance partition. Referencing databases should share the parent instance. + # The existence of any referencing database prevents the instance partition + # from being deleted. + # @!attribute [r] referencing_backups + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::String>] + # Output only. Deprecated: This field is not populated. + # Output only. The names of the backups that reference this instance + # partition. Referencing backups should share the parent instance. The + # existence of any referencing backup prevents the instance partition from + # being deleted. + # @!attribute [rw] etag + # @return [::String] + # Used for optimistic concurrency control as a way + # to help prevent simultaneous updates of a instance partition from + # overwriting each other. It is strongly suggested that systems make use of + # the etag in the read-modify-write cycle to perform instance partition + # updates in order to avoid race conditions: An etag is returned in the + # response which contains instance partitions, and systems are expected to + # put that etag in the request to update instance partitions to ensure that + # their change will be applied to the same version of the instance partition. + # If no etag is provided in the call to update instance partition, then the + # existing instance partition is overwritten blindly. + class InstancePartition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates the current state of the instance partition. + module State + # Not specified. + STATE_UNSPECIFIED = 0 + + # The instance partition is still being created. Resources may not be + # available yet, and operations such as creating placements using this + # instance partition may not work. + CREATING = 1 + + # The instance partition is fully created and ready to do work such as + # creating placements and using in databases. + READY = 2 + end + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition CreateInstancePartition}. + # @!attribute [rw] instance_partition + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] + # The instance partition being created. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition CreateInstancePartition} + # request was received. + # @!attribute [rw] cancel_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation was cancelled. If set, this operation is + # in the process of undoing itself (which is guaranteed to succeed) and + # cannot be cancelled again. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation failed or was completed successfully. + class CreateInstancePartitionMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition CreateInstancePartition}. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the instance in which to create the instance + # partition. Values are of the form + # `projects//instances/`. + # @!attribute [rw] instance_partition_id + # @return [::String] + # Required. The ID of the instance partition to create. Valid identifiers are + # of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 + # characters in length. + # @!attribute [rw] instance_partition + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] + # Required. The instance partition to create. The instance_partition.name may + # be omitted, but if specified must be + # `/instancePartitions/`. + class CreateInstancePartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_partition DeleteInstancePartition}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the instance partition to be deleted. + # Values are of the form + # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` + # @!attribute [rw] etag + # @return [::String] + # Optional. If not empty, the API only deletes the instance partition when + # the etag provided matches the current status of the requested instance + # partition. Otherwise, deletes the instance partition without checking the + # current status of the requested instance partition. + class DeleteInstancePartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_partition GetInstancePartition}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the requested instance partition. Values are of + # the form + # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`. + class GetInstancePartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition UpdateInstancePartition}. + # @!attribute [rw] instance_partition + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] + # Required. The instance partition to update, which must always include the + # instance partition name. Otherwise, only fields mentioned in + # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest#field_mask field_mask} + # need be included. + # @!attribute [rw] field_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A mask specifying which fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} + # should be updated. The field mask must always be specified; this prevents + # any future fields in + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} + # from being erased accidentally by clients that do not know about them. + class UpdateInstancePartitionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition UpdateInstancePartition}. + # @!attribute [rw] instance_partition + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] + # The desired end state of the update. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time at which + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition UpdateInstancePartition} + # request was received. + # @!attribute [rw] cancel_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation was cancelled. If set, this operation is + # in the process of undoing itself (which is guaranteed to succeed) and + # cannot be cancelled again. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation failed or was completed successfully. + class UpdateInstancePartitionMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions ListInstancePartitions}. + # @!attribute [rw] parent + # @return [::String] + # Required. The instance whose instance partitions should be listed. Values + # are of the form `projects//instances/`. Use `{instance} + # = '-'` to list instance partitions for all Instances in a project, e.g., + # `projects/myproject/instances/-`. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of instance partitions to be returned in the response. If 0 or less, + # defaults to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. + # @!attribute [rw] instance_partition_deadline + # @return [::Google::Protobuf::Timestamp] + # Optional. Deadline used while retrieving metadata for instance partitions. + # Instance partitions whose metadata cannot be retrieved within this deadline + # will be added to + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#unreachable unreachable} + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. + class ListInstancePartitionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions ListInstancePartitions}. + # @!attribute [rw] instance_partitions + # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition>] + # The list of requested instancePartitions. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions ListInstancePartitions} + # call to fetch more of the matching instance partitions. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # The list of unreachable instances or instance partitions. + # It includes the names of instances or instance partitions whose metadata + # could not be retrieved within + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest#instance_partition_deadline instance_partition_deadline}. + class ListInstancePartitionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations ListInstancePartitionOperations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent instance of the instance partition operations. + # Values are of the form `projects//instances/`. + # @!attribute [rw] filter + # @return [::String] + # Optional. An expression that filters the list of returned operations. + # + # A filter expression consists of a field name, a + # comparison operator, and a value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the Operation are eligible for filtering: + # + # * `name` - The name of the long-running operation + # * `done` - False if the operation is in progress, else true. + # * `metadata.@type` - the type of metadata. For example, the type string + # for + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata} + # is + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. + # * `metadata.` - any field in metadata.value. + # `metadata.@type` must be specified first, if filtering on metadata + # fields. + # * `error` - Error associated with the long-running operation. + # * `response.@type` - the type of response. + # * `response.` - any field in response.value. + # + # You can combine multiple expressions by enclosing each expression in + # parentheses. By default, expressions are combined with AND logic. However, + # you can specify AND, OR, and NOT logic explicitly. + # + # Here are a few examples: + # + # * `done:true` - The operation is complete. + # * `(metadata.@type=` \ + # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) + # AND` \ + # `(metadata.instance_partition.name:custom-instance-partition) AND` \ + # `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ + # `(error:*)` - Return operations where: + # * The operation's metadata type is + # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}. + # * The instance partition name contains "custom-instance-partition". + # * The operation started before 2021-03-28T14:50:00Z. + # * The operation resulted in an error. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Number of operations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # Optional. If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse} + # to the same `parent` and with the same `filter`. + # @!attribute [rw] instance_partition_deadline + # @return [::Google::Protobuf::Timestamp] + # Optional. Deadline used while retrieving metadata for instance partition + # operations. Instance partitions whose operation metadata cannot be + # retrieved within this deadline will be added to + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#unreachable_instance_partitions unreachable_instance_partitions} + # in + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse}. + class ListInstancePartitionOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations ListInstancePartitionOperations}. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # The list of matching instance partition long-running operations. Each + # operation's name will be + # prefixed by the instance partition's name. The operation's + # metadata field type + # `metadata.type_url` describes the type of the metadata. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations ListInstancePartitionOperations} + # call to fetch more of the matching metadata. + # @!attribute [rw] unreachable_instance_partitions + # @return [::Array<::String>] + # The list of unreachable instance partitions. + # It includes the names of instance partitions whose operation metadata could + # not be retrieved within + # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest#instance_partition_deadline instance_partition_deadline}. + class ListInstancePartitionOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance MoveInstance}. + # @!attribute [rw] name + # @return [::String] + # Required. The instance to move. + # Values are of the form `projects//instances/`. + # @!attribute [rw] target_config + # @return [::String] + # Required. The target instance configuration where to move the instance. + # Values are of the form `projects//instanceConfigs/`. + class MoveInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance MoveInstance}. + class MoveInstanceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata type for the operation returned by + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance MoveInstance}. + # @!attribute [rw] target_config + # @return [::String] + # The target instance configuration where to move the instance. + # Values are of the form `projects//instanceConfigs/`. + # @!attribute [rw] progress + # @return [::Google::Cloud::Spanner::Admin::Instance::V1::OperationProgress] + # The progress of the + # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance MoveInstance} + # operation. + # {::Google::Cloud::Spanner::Admin::Instance::V1::OperationProgress#progress_percent progress_percent} + # is reset when cancellation is requested. + # @!attribute [rw] cancel_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this operation was cancelled. + class MoveInstanceMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/Gemfile new file mode 100644 index 000000000000..948960481f0c --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-spanner-admin-instance-v1", path: "../" +else + gem "google-cloud-spanner-admin-instance-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance.rb new file mode 100644 index 000000000000..2348ff40f605 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_CreateInstance_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the create_instance call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance. +# +def create_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new + + # Call the create_instance method. + result = client.create_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_InstanceAdmin_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.rb new file mode 100644 index 000000000000..c3a27669fdae --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_CreateInstanceConfig_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the create_instance_config call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config. +# +def create_instance_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new + + # Call the create_instance_config method. + result = client.create_instance_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_InstanceAdmin_CreateInstanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.rb new file mode 100644 index 000000000000..d21b55b5b196 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_CreateInstancePartition_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the create_instance_partition call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition. +# +def create_instance_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new + + # Call the create_instance_partition method. + result = client.create_instance_partition request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_InstanceAdmin_CreateInstancePartition_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.rb new file mode 100644 index 000000000000..69724c0b1606 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_DeleteInstance_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the delete_instance call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance. +# +def delete_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new + + # Call the delete_instance method. + result = client.delete_instance request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END spanner_v1_generated_InstanceAdmin_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.rb new file mode 100644 index 000000000000..4a1f618dbf0e --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_DeleteInstanceConfig_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the delete_instance_config call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_config. +# +def delete_instance_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new + + # Call the delete_instance_config method. + result = client.delete_instance_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END spanner_v1_generated_InstanceAdmin_DeleteInstanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.rb new file mode 100644 index 000000000000..e0a538237a72 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_DeleteInstancePartition_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the delete_instance_partition call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_partition. +# +def delete_instance_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new + + # Call the delete_instance_partition method. + result = client.delete_instance_partition request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END spanner_v1_generated_InstanceAdmin_DeleteInstancePartition_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.rb new file mode 100644 index 000000000000..87a8c0c3714a --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_GetIamPolicy_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the get_iam_policy call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END spanner_v1_generated_InstanceAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance.rb new file mode 100644 index 000000000000..a1cca2d1c9dc --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_GetInstance_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the get_instance call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::Instance. + p result +end +# [END spanner_v1_generated_InstanceAdmin_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.rb new file mode 100644 index 000000000000..ba21ffeef8ab --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_GetInstanceConfig_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the get_instance_config call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_config. +# +def get_instance_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new + + # Call the get_instance_config method. + result = client.get_instance_config request + + # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. + p result +end +# [END spanner_v1_generated_InstanceAdmin_GetInstanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.rb new file mode 100644 index 000000000000..9654b300ce3f --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_GetInstancePartition_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the get_instance_partition call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_partition. +# +def get_instance_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new + + # Call the get_instance_partition method. + result = client.get_instance_partition request + + # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. + p result +end +# [END spanner_v1_generated_InstanceAdmin_GetInstancePartition_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.rb new file mode 100644 index 000000000000..a43ab8906614 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_ListInstanceConfigOperations_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the list_instance_config_operations call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations. +# +def list_instance_config_operations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new + + # Call the list_instance_config_operations method. + result = client.list_instance_config_operations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Longrunning::Operation. + p item + end +end +# [END spanner_v1_generated_InstanceAdmin_ListInstanceConfigOperations_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.rb new file mode 100644 index 000000000000..ebe64e95ead6 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_ListInstanceConfigs_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the list_instance_configs call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs. +# +def list_instance_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new + + # Call the list_instance_configs method. + result = client.list_instance_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. + p item + end +end +# [END spanner_v1_generated_InstanceAdmin_ListInstanceConfigs_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.rb new file mode 100644 index 000000000000..a30b5cab92b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_ListInstancePartitionOperations_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the list_instance_partition_operations call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations. +# +def list_instance_partition_operations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new + + # Call the list_instance_partition_operations method. + result = client.list_instance_partition_operations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Longrunning::Operation. + p item + end +end +# [END spanner_v1_generated_InstanceAdmin_ListInstancePartitionOperations_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.rb new file mode 100644 index 000000000000..7a571906f7d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_ListInstancePartitions_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the list_instance_partitions call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions. +# +def list_instance_partitions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new + + # Call the list_instance_partitions method. + result = client.list_instance_partitions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. + p item + end +end +# [END spanner_v1_generated_InstanceAdmin_ListInstancePartitions_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instances.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instances.rb new file mode 100644 index 000000000000..07eef9c99042 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instances.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_ListInstances_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the list_instances call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances. +# +def list_instances + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new + + # Call the list_instances method. + result = client.list_instances request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::Instance. + p item + end +end +# [END spanner_v1_generated_InstanceAdmin_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/move_instance.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/move_instance.rb new file mode 100644 index 000000000000..d1260ae8c95f --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/move_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_MoveInstance_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the move_instance call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance. +# +def move_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new + + # Call the move_instance method. + result = client.move_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_InstanceAdmin_MoveInstance_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.rb new file mode 100644 index 000000000000..bf36a3b73464 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_SetIamPolicy_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the set_iam_policy call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END spanner_v1_generated_InstanceAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.rb new file mode 100644 index 000000000000..4f9cc75a5905 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_TestIamPermissions_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the test_iam_permissions call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END spanner_v1_generated_InstanceAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance.rb new file mode 100644 index 000000000000..16786ba2e441 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_UpdateInstance_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the update_instance call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance. +# +def update_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new + + # Call the update_instance method. + result = client.update_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_InstanceAdmin_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.rb new file mode 100644 index 000000000000..4dcaf1b12731 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_UpdateInstanceConfig_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the update_instance_config call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config. +# +def update_instance_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new + + # Call the update_instance_config method. + result = client.update_instance_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_InstanceAdmin_UpdateInstanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.rb new file mode 100644 index 000000000000..38c1442fe587 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_InstanceAdmin_UpdateInstancePartition_sync] +require "google/cloud/spanner/admin/instance/v1" + +## +# Snippet for the update_instance_partition call in the InstanceAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition. +# +def update_instance_partition + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new + + # Call the update_instance_partition method. + result = client.update_instance_partition request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END spanner_v1_generated_InstanceAdmin_UpdateInstancePartition_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/snippet_metadata_google.spanner.admin.instance.v1.json b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/snippet_metadata_google.spanner.admin.instance.v1.json new file mode 100644 index 000000000000..d91b8bef1312 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/snippet_metadata_google.spanner.admin.instance.v1.json @@ -0,0 +1,855 @@ +{ + "client_library": { + "name": "google-cloud-spanner-admin-instance-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.spanner.admin.instance.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "spanner_v1_generated_InstanceAdmin_ListInstanceConfigs_sync", + "title": "Snippet for the list_instance_configs call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs.", + "file": "instance_admin/list_instance_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instance_configs", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "ListInstanceConfigs", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_GetInstanceConfig_sync", + "title": "Snippet for the get_instance_config call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_config.", + "file": "instance_admin/get_instance_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance_config", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "GetInstanceConfig", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_CreateInstanceConfig_sync", + "title": "Snippet for the create_instance_config call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config.", + "file": "instance_admin/create_instance_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_instance_config", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "CreateInstanceConfig", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_UpdateInstanceConfig_sync", + "title": "Snippet for the update_instance_config call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config.", + "file": "instance_admin/update_instance_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_instance_config", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "UpdateInstanceConfig", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_DeleteInstanceConfig_sync", + "title": "Snippet for the delete_instance_config call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_config.", + "file": "instance_admin/delete_instance_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_instance_config", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "DeleteInstanceConfig", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstanceConfig", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_ListInstanceConfigOperations_sync", + "title": "Snippet for the list_instance_config_operations call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations.", + "file": "instance_admin/list_instance_config_operations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instance_config_operations", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "ListInstanceConfigOperations", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_ListInstances_sync", + "title": "Snippet for the list_instances call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances.", + "file": "instance_admin/list_instances.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instances", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "ListInstances", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstances", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_ListInstancePartitions_sync", + "title": "Snippet for the list_instance_partitions call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions.", + "file": "instance_admin/list_instance_partitions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instance_partitions", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "ListInstancePartitions", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_GetInstance_sync", + "title": "Snippet for the get_instance call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance.", + "file": "instance_admin/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::Instance", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.GetInstance", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_CreateInstance_sync", + "title": "Snippet for the create_instance call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance.", + "file": "instance_admin/create_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_instance", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "CreateInstance", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_UpdateInstance_sync", + "title": "Snippet for the update_instance call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance.", + "file": "instance_admin/update_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_instance", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "UpdateInstance", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_DeleteInstance_sync", + "title": "Snippet for the delete_instance call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance.", + "file": "instance_admin/delete_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_instance", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "DeleteInstance", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#set_iam_policy.", + "file": "instance_admin/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.SetIamPolicy", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_iam_policy.", + "file": "instance_admin/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.GetIamPolicy", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#test_iam_permissions.", + "file": "instance_admin/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.TestIamPermissions", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_GetInstancePartition_sync", + "title": "Snippet for the get_instance_partition call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_partition.", + "file": "instance_admin/get_instance_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance_partition", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "GetInstancePartition", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.GetInstancePartition", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_CreateInstancePartition_sync", + "title": "Snippet for the create_instance_partition call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition.", + "file": "instance_admin/create_instance_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_instance_partition", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "CreateInstancePartition", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_DeleteInstancePartition_sync", + "title": "Snippet for the delete_instance_partition call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_partition.", + "file": "instance_admin/delete_instance_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_instance_partition", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "DeleteInstancePartition", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstancePartition", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_UpdateInstancePartition_sync", + "title": "Snippet for the update_instance_partition call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition.", + "file": "instance_admin/update_instance_partition.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_instance_partition", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "UpdateInstancePartition", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_ListInstancePartitionOperations_sync", + "title": "Snippet for the list_instance_partition_operations call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations.", + "file": "instance_admin/list_instance_partition_operations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instance_partition_operations", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "ListInstancePartitionOperations", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_InstanceAdmin_MoveInstance_sync", + "title": "Snippet for the move_instance call in the InstanceAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance.", + "file": "instance_admin/move_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "move_instance", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "InstanceAdmin::Client", + "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" + }, + "method": { + "short_name": "MoveInstance", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance", + "service": { + "short_name": "InstanceAdmin", + "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_test.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_test.rb new file mode 100644 index 000000000000..78ddb3575d25 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" +require "google/spanner/admin/instance/v1/spanner_instance_admin_services_pb" +require "google/cloud/spanner/admin/instance/v1/instance_admin" + +class ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_test.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_test.rb new file mode 100644 index 000000000000..25bc1dce8a0a --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/spanner/admin/instance/v1/instance_admin" + +class ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", instance: "value1" + assert_equal "projects/value0/instances/value1", path + end + end + + def test_instance_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_config_path project: "value0", instance_config: "value1" + assert_equal "projects/value0/instanceConfigs/value1", path + end + end + + def test_instance_partition_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_partition_path project: "value0", instance: "value1", instance_partition: "value2" + assert_equal "projects/value0/instances/value1/instancePartitions/value2", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_test.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_test.rb new file mode 100644 index 000000000000..9965df42fc4e --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_test.rb @@ -0,0 +1,1269 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" +require "google/cloud/spanner/admin/instance/v1/instance_admin/rest" + + +class ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_instance_configs + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_instance_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_list_instance_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instance_configs_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_instance_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_instance_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_instance_configs ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_instance_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_instance_configs(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_instance_configs_client_stub.call_count + end + end + end + + def test_get_instance_config + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_get_instance_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_config_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_instance_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_instance_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_instance_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_config_client_stub.call_count + end + end + end + + def test_create_instance_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_config_id = "hello world" + instance_config = {} + validate_only = true + + create_instance_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_create_instance_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_instance_config_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_instance_config({ parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_instance_config parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new(parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_instance_config({ parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new(parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_instance_config_client_stub.call_count + end + end + end + + def test_update_instance_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + instance_config = {} + update_mask = {} + validate_only = true + + update_instance_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_update_instance_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_instance_config_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_instance_config({ instance_config: instance_config, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_instance_config instance_config: instance_config, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new(instance_config: instance_config, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_instance_config({ instance_config: instance_config, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new(instance_config: instance_config, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_instance_config_client_stub.call_count + end + end + end + + def test_delete_instance_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + + delete_instance_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_delete_instance_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_instance_config_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_instance_config({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_instance_config name: name, etag: etag, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_instance_config({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_instance_config_client_stub.call_count + end + end + end + + def test_list_instance_config_operations + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_instance_config_operations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_list_instance_config_operations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instance_config_operations_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_instance_config_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_instance_config_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_instance_config_operations ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_instance_config_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_instance_config_operations(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_instance_config_operations_client_stub.call_count + end + end + end + + def test_list_instances + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + instance_deadline = {} + + list_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_instances ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_instances(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_instances_client_stub.call_count + end + end + end + + def test_list_instance_partitions + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + instance_partition_deadline = {} + + list_instance_partitions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_list_instance_partitions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instance_partitions_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_instance_partitions({ parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_instance_partitions parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_instance_partitions ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_instance_partitions({ parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_instance_partitions(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_instance_partitions_client_stub.call_count + end + end + end + + def test_get_instance + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + field_mask = {} + + get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_instance({ name: name, field_mask: field_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_instance name: name, field_mask: field_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_instance ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new(name: name, field_mask: field_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_instance({ name: name, field_mask: field_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_instance(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new(name: name, field_mask: field_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_count + end + end + end + + def test_create_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_id = "hello world" + instance = {} + + create_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_instance parent: parent, instance_id: instance_id, instance: instance do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_instance ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_instance(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_instance_client_stub.call_count + end + end + end + + def test_update_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + instance = {} + field_mask = {} + + update_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_instance({ instance: instance, field_mask: field_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_instance instance: instance, field_mask: field_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_instance ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new(instance: instance, field_mask: field_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_instance({ instance: instance, field_mask: field_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_instance(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new(instance: instance, field_mask: field_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_instance_client_stub.call_count + end + end + end + + def test_delete_instance + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_instance ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_instance(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_instance_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_get_instance_partition + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_get_instance_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_partition_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_instance_partition({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_instance_partition name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_instance_partition({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_partition_client_stub.call_count + end + end + end + + def test_create_instance_partition + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_partition_id = "hello world" + instance_partition = {} + + create_instance_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_create_instance_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_instance_partition_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_instance_partition({ parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_instance_partition parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new(parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_instance_partition({ parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new(parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_instance_partition_client_stub.call_count + end + end + end + + def test_delete_instance_partition + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_instance_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_delete_instance_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_instance_partition_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_instance_partition({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_instance_partition name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_instance_partition({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_instance_partition_client_stub.call_count + end + end + end + + def test_update_instance_partition + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + instance_partition = {} + field_mask = {} + + update_instance_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_update_instance_partition_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_instance_partition_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_instance_partition({ instance_partition: instance_partition, field_mask: field_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_instance_partition instance_partition: instance_partition, field_mask: field_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new(instance_partition: instance_partition, field_mask: field_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_instance_partition({ instance_partition: instance_partition, field_mask: field_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new(instance_partition: instance_partition, field_mask: field_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_instance_partition_client_stub.call_count + end + end + end + + def test_list_instance_partition_operations + # Create test objects. + client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + instance_partition_deadline = {} + + list_instance_partition_operations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_list_instance_partition_operations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instance_partition_operations_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_instance_partition_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_instance_partition_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_instance_partition_operations ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_instance_partition_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_instance_partition_operations(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_instance_partition_operations_client_stub.call_count + end + end + end + + def test_move_instance + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + target_config = "hello world" + + move_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_move_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, move_instance_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.move_instance({ name: name, target_config: target_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.move_instance name: name, target_config: target_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.move_instance ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new(name: name, target_config: target_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.move_instance({ name: name, target_config: target_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.move_instance(::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new(name: name, target_config: target_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, move_instance_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_test.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_test.rb new file mode 100644 index 000000000000..e2faccbfe761 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_test.rb @@ -0,0 +1,1468 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" +require "google/cloud/spanner/admin/instance/v1/instance_admin" + +class ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_instance_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_instance_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_instance_configs, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_instance_configs_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_instance_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_instance_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_instance_configs ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_instance_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_instance_configs(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_instance_configs_client_stub.call_rpc_count + end + end + + def test_get_instance_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance_config, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_config_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_instance_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_instance_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_instance_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_instance_config_client_stub.call_rpc_count + end + end + + def test_create_instance_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_config_id = "hello world" + instance_config = {} + validate_only = true + + create_instance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_instance_config, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["instance_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig), request["instance_config"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_instance_config_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_instance_config({ parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_instance_config parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new(parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_instance_config({ parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new(parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_instance_config_client_stub.call_rpc_count + end + end + + def test_update_instance_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + instance_config = {} + update_mask = {} + validate_only = true + + update_instance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_instance_config, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig), request["instance_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_instance_config_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_instance_config({ instance_config: instance_config, update_mask: update_mask, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_instance_config instance_config: instance_config, update_mask: update_mask, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new(instance_config: instance_config, update_mask: update_mask, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_instance_config({ instance_config: instance_config, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new(instance_config: instance_config, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_instance_config_client_stub.call_rpc_count + end + end + + def test_delete_instance_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + validate_only = true + + delete_instance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_instance_config, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_instance_config_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_instance_config({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_instance_config name: name, etag: etag, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_instance_config({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_instance_config_client_stub.call_rpc_count + end + end + + def test_list_instance_config_operations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_instance_config_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_instance_config_operations, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_instance_config_operations_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_instance_config_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_instance_config_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_instance_config_operations ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_instance_config_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_instance_config_operations(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_instance_config_operations_client_stub.call_rpc_count + end + end + + def test_list_instances + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + instance_deadline = {} + + list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_instances, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["instance_deadline"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_instances_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_instances ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_instances(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_instances_client_stub.call_rpc_count + end + end + + def test_list_instance_partitions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + instance_partition_deadline = {} + + list_instance_partitions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_instance_partitions, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["instance_partition_deadline"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_instance_partitions_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_instance_partitions({ parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_instance_partitions parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_instance_partitions ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_instance_partitions({ parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_instance_partitions(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_instance_partitions_client_stub.call_rpc_count + end + end + + def test_get_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::Instance.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + field_mask = {} + + get_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_instance({ name: name, field_mask: field_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_instance name: name, field_mask: field_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_instance ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new(name: name, field_mask: field_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_instance({ name: name, field_mask: field_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_instance(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new(name: name, field_mask: field_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_rpc_count + end + end + + def test_create_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_id = "hello world" + instance = {} + + create_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_instance, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["instance_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::Instance), request["instance"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_instance_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_instance parent: parent, instance_id: instance_id, instance: instance do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_instance ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_instance(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_instance_client_stub.call_rpc_count + end + end + + def test_update_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + instance = {} + field_mask = {} + + update_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_instance, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::Instance), request["instance"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_instance_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_instance({ instance: instance, field_mask: field_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_instance instance: instance, field_mask: field_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_instance ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new(instance: instance, field_mask: field_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_instance({ instance: instance, field_mask: field_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_instance(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new(instance: instance, field_mask: field_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_instance_client_stub.call_rpc_count + end + end + + def test_delete_instance + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_instance, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_instance_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_instance({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_instance name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_instance ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_instance({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_instance(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_instance_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_get_instance_partition + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance_partition, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_partition_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_instance_partition({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_instance_partition name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_instance_partition({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_instance_partition_client_stub.call_rpc_count + end + end + + def test_create_instance_partition + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_partition_id = "hello world" + instance_partition = {} + + create_instance_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_instance_partition, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["instance_partition_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition), request["instance_partition"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_instance_partition_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_instance_partition({ parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_instance_partition parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new(parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_instance_partition({ parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new(parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_instance_partition_client_stub.call_rpc_count + end + end + + def test_delete_instance_partition + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_instance_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_instance_partition, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_instance_partition_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_instance_partition({ name: name, etag: etag }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_instance_partition name: name, etag: etag do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new(name: name, etag: etag) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_instance_partition({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_instance_partition_client_stub.call_rpc_count + end + end + + def test_update_instance_partition + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + instance_partition = {} + field_mask = {} + + update_instance_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_instance_partition, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition), request["instance_partition"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_instance_partition_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_instance_partition({ instance_partition: instance_partition, field_mask: field_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_instance_partition instance_partition: instance_partition, field_mask: field_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new(instance_partition: instance_partition, field_mask: field_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_instance_partition({ instance_partition: instance_partition, field_mask: field_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new(instance_partition: instance_partition, field_mask: field_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_instance_partition_client_stub.call_rpc_count + end + end + + def test_list_instance_partition_operations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + instance_partition_deadline = {} + + list_instance_partition_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_instance_partition_operations, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["instance_partition_deadline"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_instance_partition_operations_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_instance_partition_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_instance_partition_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_instance_partition_operations ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_instance_partition_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_instance_partition_operations(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_instance_partition_operations_client_stub.call_rpc_count + end + end + + def test_move_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + target_config = "hello world" + + move_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :move_instance, name + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["target_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, move_instance_client_stub do + # Create client + c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.move_instance({ name: name, target_config: target_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.move_instance name: name, target_config: target_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.move_instance ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new(name: name, target_config: target_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.move_instance({ name: name, target_config: target_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.move_instance(::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new(name: name, target_config: target_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, move_instance_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/helper.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/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-spanner-v1/.gitignore b/owl-bot-staging/google-cloud-spanner-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/.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-spanner-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-spanner-v1/.repo-metadata.json new file mode 100644 index 000000000000..97ae30d48f35 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "spanner.googleapis.com", + "api_shortname": "spanner", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-v1/latest", + "distribution_name": "google-cloud-spanner-v1", + "is_cloud": true, + "language": "ruby", + "name": "spanner", + "name_pretty": "Cloud Spanner V1 API", + "product_documentation": "https://cloud.google.com/spanner", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details.", + "ruby-cloud-env-prefix": "SPANNER", + "ruby-cloud-product-url": "https://cloud.google.com/spanner", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-spanner-v1/.rubocop.yml b/owl-bot-staging/google-cloud-spanner-v1/.rubocop.yml new file mode 100644 index 000000000000..c29064123444 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-spanner-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-spanner-v1.rb" diff --git a/owl-bot-staging/google-cloud-spanner-v1/.toys.rb b/owl-bot-staging/google-cloud-spanner-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/.yardopts b/owl-bot-staging/google-cloud-spanner-v1/.yardopts new file mode 100644 index 000000000000..62c084b2c082 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Spanner V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-spanner-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-spanner-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..a4d7b47836ad --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-spanner-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-spanner-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/spanner/v1" + +client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/spanner/v1" + +::Google::Cloud::Spanner::V1::Spanner::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Spanner::V1::Spanner::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-spanner-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/spanner/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Spanner::V1::Spanner::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-spanner-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-spanner-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-spanner-v1/Gemfile b/owl-bot-staging/google-cloud-spanner-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-spanner-v1/LICENSE.md b/owl-bot-staging/google-cloud-spanner-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-spanner-v1/README.md b/owl-bot-staging/google-cloud-spanner-v1/README.md new file mode 100644 index 000000000000..5b7691075d33 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Spanner V1 API + +Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Spanner V1 API. Most users should consider using +the main client gem, +[google-cloud-spanner](https://rubygems.org/gems/google-cloud-spanner). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-spanner-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/spanner.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/spanner/v1" + +client = ::Google::Cloud::Spanner::V1::Spanner::Client.new +request = ::Google::Cloud::Spanner::V1::CreateSessionRequest.new # (request fields as keyword arguments...) +response = client.create_session request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/spanner) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/spanner/v1" +require "logger" + +client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-spanner`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-spanner-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-spanner`. +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-spanner-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-spanner-v1/Rakefile b/owl-bot-staging/google-cloud-spanner-v1/Rakefile new file mode 100644 index 000000000000..b18de45c0a03 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-spanner-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SPANNER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SPANNER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SPANNER_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 SPANNER_TEST_PROJECT=test123 SPANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/spanner/v1/spanner/credentials" + ::Google::Cloud::Spanner::V1::Spanner::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SPANNER_PROJECT"] = project + ENV["SPANNER_TEST_PROJECT"] = project + ENV["SPANNER_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-spanner-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-spanner-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-spanner-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-spanner-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-spanner-v1" + header "google-cloud-spanner-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-spanner-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-spanner-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-spanner-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-spanner-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-spanner-v1/gapic_metadata.json new file mode 100644 index 000000000000..d200c79b9c14 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/gapic_metadata.json @@ -0,0 +1,103 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.spanner.v1", + "libraryPackage": "::Google::Cloud::Spanner::V1", + "services": { + "Spanner": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Spanner::V1::Spanner::Client", + "rpcs": { + "CreateSession": { + "methods": [ + "create_session" + ] + }, + "BatchCreateSessions": { + "methods": [ + "batch_create_sessions" + ] + }, + "GetSession": { + "methods": [ + "get_session" + ] + }, + "ListSessions": { + "methods": [ + "list_sessions" + ] + }, + "DeleteSession": { + "methods": [ + "delete_session" + ] + }, + "ExecuteSql": { + "methods": [ + "execute_sql" + ] + }, + "ExecuteStreamingSql": { + "methods": [ + "execute_streaming_sql" + ] + }, + "ExecuteBatchDml": { + "methods": [ + "execute_batch_dml" + ] + }, + "Read": { + "methods": [ + "read" + ] + }, + "StreamingRead": { + "methods": [ + "streaming_read" + ] + }, + "BeginTransaction": { + "methods": [ + "begin_transaction" + ] + }, + "Commit": { + "methods": [ + "commit" + ] + }, + "Rollback": { + "methods": [ + "rollback" + ] + }, + "PartitionQuery": { + "methods": [ + "partition_query" + ] + }, + "PartitionRead": { + "methods": [ + "partition_read" + ] + }, + "BatchWrite": { + "methods": [ + "batch_write" + ] + }, + "FetchCacheUpdate": { + "methods": [ + "fetch_cache_update" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-spanner-v1/google-cloud-spanner-v1.gemspec b/owl-bot-staging/google-cloud-spanner-v1/google-cloud-spanner-v1.gemspec new file mode 100644 index 000000000000..586657250c55 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/google-cloud-spanner-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/spanner/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-spanner-v1" + gem.version = Google::Cloud::Spanner::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details." + gem.summary = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google-cloud-spanner-v1.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google-cloud-spanner-v1.rb new file mode 100644 index 000000000000..2f3a79fec01f --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google-cloud-spanner-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/spanner/v1" diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1.rb new file mode 100644 index 000000000000..031d8a0b49f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/spanner/v1/spanner" +require "google/cloud/spanner/v1/version" + +module Google + module Cloud + module Spanner + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/spanner/v1" + # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/spanner/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner.rb new file mode 100644 index 000000000000..50df58fbcc65 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/spanner/v1/version" + +require "google/cloud/spanner/v1/spanner/credentials" +require "google/cloud/spanner/v1/spanner/paths" +require "google/cloud/spanner/v1/spanner/client" + +module Google + module Cloud + module Spanner + module V1 + ## + # Cloud Spanner API + # + # The Cloud Spanner API can be used to manage sessions and execute + # transactions on data stored in Cloud Spanner databases. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/spanner/v1/spanner" + # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new + # + module Spanner + end + end + end + end +end + +helper_path = ::File.join __dir__, "spanner", "helpers.rb" +require "google/cloud/spanner/v1/spanner/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb new file mode 100644 index 000000000000..7ef640279aff --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb @@ -0,0 +1,2747 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/spanner/v1/spanner_pb" + +module Google + module Cloud + module Spanner + module V1 + module Spanner + ## + # Client for the Spanner service. + # + # Cloud Spanner API + # + # The Cloud Spanner API can be used to manage sessions and execute + # transactions on data stored in Cloud Spanner databases. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :spanner_stub + + ## + # Configure the Spanner Client class. + # + # See {::Google::Cloud::Spanner::V1::Spanner::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Spanner clients + # ::Google::Cloud::Spanner::V1::Spanner::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Spanner", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_session.timeout = 30.0 + default_config.rpcs.create_session.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.batch_create_sessions.timeout = 60.0 + default_config.rpcs.batch_create_sessions.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.get_session.timeout = 30.0 + default_config.rpcs.get_session.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.list_sessions.timeout = 3600.0 + default_config.rpcs.list_sessions.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.delete_session.timeout = 30.0 + default_config.rpcs.delete_session.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.execute_sql.timeout = 30.0 + default_config.rpcs.execute_sql.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.execute_streaming_sql.timeout = 3600.0 + + default_config.rpcs.execute_batch_dml.timeout = 30.0 + default_config.rpcs.execute_batch_dml.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.read.timeout = 30.0 + default_config.rpcs.read.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.streaming_read.timeout = 3600.0 + + default_config.rpcs.begin_transaction.timeout = 30.0 + default_config.rpcs.begin_transaction.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.commit.timeout = 3600.0 + default_config.rpcs.commit.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.rollback.timeout = 30.0 + default_config.rpcs.rollback.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.partition_query.timeout = 30.0 + default_config.rpcs.partition_query.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.partition_read.timeout = 30.0 + default_config.rpcs.partition_read.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] + } + + default_config.rpcs.batch_write.timeout = 3600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Spanner Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Spanner::V1::Spanner::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @spanner_stub.universe_domain + end + + ## + # Create a new Spanner client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Spanner client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/spanner/v1/spanner_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @spanner_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Spanner::V1::Spanner::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @spanner_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @spanner_stub.logger + end + + # Service calls + + ## + # Creates a new session. A session can be used to perform + # transactions that read and/or modify data in a Cloud Spanner database. + # Sessions are meant to be reused for many consecutive + # transactions. + # + # Sessions can only execute one transaction at a time. To execute + # multiple concurrent read-write/write-only transactions, create + # multiple sessions. Note that standalone reads and queries use a + # transaction internally, and count toward the one transaction + # limit. + # + # Active sessions use additional server resources, so it's a good idea to + # delete idle and unneeded sessions. + # Aside from explicit deletes, Cloud Spanner can delete sessions when no + # operations are sent for more than an hour. If a session is deleted, + # requests to it return `NOT_FOUND`. + # + # Idle sessions can be kept alive by sending a trivial SQL query + # periodically, for example, `"SELECT 1"`. + # + # @overload create_session(request, options = nil) + # Pass arguments to `create_session` via a request object, either of type + # {::Google::Cloud::Spanner::V1::CreateSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::CreateSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_session(database: nil, session: nil) + # Pass arguments to `create_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database in which the new session is created. + # @param session [::Google::Cloud::Spanner::V1::Session, ::Hash] + # Required. The session to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::V1::Session] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::V1::Session] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::CreateSessionRequest.new + # + # # Call the create_session method. + # result = client.create_session request + # + # # The returned object is of type Google::Cloud::Spanner::V1::Session. + # p result + # + def create_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::CreateSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :create_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates multiple new sessions. + # + # This API can be used to initialize a session cache on the clients. + # See https://goo.gl/TgSFN2 for best practices on session cache management. + # + # @overload batch_create_sessions(request, options = nil) + # Pass arguments to `batch_create_sessions` via a request object, either of type + # {::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_create_sessions(database: nil, session_template: nil, session_count: nil) + # Pass arguments to `batch_create_sessions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database in which the new sessions are created. + # @param session_template [::Google::Cloud::Spanner::V1::Session, ::Hash] + # Parameters to apply to each created session. + # @param session_count [::Integer] + # Required. The number of sessions to be created in this batch call. At least + # one session is created. The API can return fewer than the requested number + # of sessions. If a specific number of sessions are desired, the client can + # make additional calls to `BatchCreateSessions` (adjusting + # {::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest#session_count session_count} + # as necessary). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::V1::BatchCreateSessionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::V1::BatchCreateSessionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::BatchCreateSessionsRequest.new + # + # # Call the batch_create_sessions method. + # result = client.batch_create_sessions request + # + # # The returned object is of type Google::Cloud::Spanner::V1::BatchCreateSessionsResponse. + # p result + # + def batch_create_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_create_sessions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_create_sessions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :batch_create_sessions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a session. Returns `NOT_FOUND` if the session doesn't exist. + # This is mainly useful for determining whether a session is still + # alive. + # + # @overload get_session(request, options = nil) + # Pass arguments to `get_session` via a request object, either of type + # {::Google::Cloud::Spanner::V1::GetSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::GetSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_session(name: nil) + # Pass arguments to `get_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the session to retrieve. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::V1::Session] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::V1::Session] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::GetSessionRequest.new + # + # # Call the get_session method. + # result = client.get_session request + # + # # The returned object is of type Google::Cloud::Spanner::V1::Session. + # p result + # + def get_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::GetSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :get_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all sessions in a given database. + # + # @overload list_sessions(request, options = nil) + # Pass arguments to `list_sessions` via a request object, either of type + # {::Google::Cloud::Spanner::V1::ListSessionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::ListSessionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sessions(database: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_sessions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database in which to list sessions. + # @param page_size [::Integer] + # Number of sessions to be returned in the response. If 0 or less, defaults + # to the server's maximum allowed page size. + # @param page_token [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::V1::ListSessionsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::V1::ListSessionsResponse ListSessionsResponse}. + # @param filter [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `labels.key` where key is the name of a label + # + # Some examples of using filters are: + # + # * `labels.env:*` --> The session has the label "env". + # * `labels.env:dev` --> The session has the label "env" and the value of + # the label contains the string "dev". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::V1::Session>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::V1::Session>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::ListSessionsRequest.new + # + # # Call the list_sessions method. + # result = client.list_sessions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Spanner::V1::Session. + # p item + # end + # + def list_sessions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ListSessionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sessions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sessions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :list_sessions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @spanner_stub, :list_sessions, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Ends a session, releasing server resources associated with it. This + # asynchronously triggers the cancellation of any operations that are running + # with this session. + # + # @overload delete_session(request, options = nil) + # Pass arguments to `delete_session` via a request object, either of type + # {::Google::Cloud::Spanner::V1::DeleteSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::DeleteSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_session(name: nil) + # Pass arguments to `delete_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the session to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::DeleteSessionRequest.new + # + # # Call the delete_session method. + # result = client.delete_session request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::DeleteSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :delete_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Executes an SQL statement, returning all results in a single reply. This + # method can't be used to return a result set larger than 10 MiB; + # if the query yields more data than that, the query fails with + # a `FAILED_PRECONDITION` error. + # + # Operations inside read-write transactions might return `ABORTED`. If + # this occurs, the application should restart the transaction from + # the beginning. See {::Google::Cloud::Spanner::V1::Transaction Transaction} for more + # details. + # + # Larger result sets can be fetched in streaming fashion by calling + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql} + # instead. + # + # The query string can be SQL or [Graph Query Language + # (GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro). + # + # @overload execute_sql(request, options = nil) + # Pass arguments to `execute_sql` via a request object, either of type + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::ExecuteSqlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload execute_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil, last_statement: nil, routing_hint: nil) + # Pass arguments to `execute_sql` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::String] + # Required. The session in which the SQL query should be performed. + # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] + # The transaction to use. + # + # For queries, if none is provided, the default is a temporary read-only + # transaction with strong concurrency. + # + # Standard DML statements require a read-write transaction. To protect + # against replays, single-use transactions are not supported. The caller + # must either supply an existing transaction ID or begin a new transaction. + # + # Partitioned DML requires an existing Partitioned DML transaction ID. + # @param sql [::String] + # Required. The SQL string. + # @param params [::Google::Protobuf::Struct, ::Hash] + # Parameter names and values that bind to placeholders in the SQL string. + # + # A parameter placeholder consists of the `@` character followed by the + # parameter name (for example, `@firstName`). Parameter names must conform + # to the naming requirements of identifiers as specified at + # https://cloud.google.com/spanner/docs/lexical#identifiers. + # + # Parameters can appear anywhere that a literal value is expected. The same + # parameter name can be used more than once, for example: + # + # `"WHERE id > @msg_id AND id < @msg_id + 100"` + # + # It's an error to execute a SQL statement with unbound parameters. + # @param param_types [::Hash{::String => ::Google::Cloud::Spanner::V1::Type, ::Hash}] + # It isn't always possible for Cloud Spanner to infer the right SQL type + # from a JSON value. For example, values of type `BYTES` and values + # of type `STRING` both appear in + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#params params} as JSON strings. + # + # In these cases, you can use `param_types` to specify the exact + # SQL type for some or all of the SQL statement parameters. See the + # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information + # about SQL types. + # @param resume_token [::String] + # If this request is resuming a previously interrupted SQL statement + # execution, `resume_token` should be copied from the last + # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the + # interruption. Doing this enables the new SQL statement execution to resume + # where the last one left off. The rest of the request parameters must + # exactly match the request that yielded this token. + # @param query_mode [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode] + # Used to control the amount of debugging information returned in + # {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#partition_token partition_token} is + # set, {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode query_mode} can only + # be set to + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::NORMAL QueryMode.NORMAL}. + # @param partition_token [::String] + # If present, results are restricted to the specified partition + # previously created using `PartitionQuery`. There must be an exact + # match for the values of fields common to this message and the + # `PartitionQueryRequest` message used to create this `partition_token`. + # @param seqno [::Integer] + # A per-transaction sequence number used to identify this request. This field + # makes each request idempotent such that if the request is received multiple + # times, at most one succeeds. + # + # The sequence number must be monotonically increasing within the + # transaction. If a request arrives for the first time with an out-of-order + # sequence number, the transaction can be aborted. Replays of previously + # handled requests yield the same response as the first execution. + # + # Required for DML statements. Ignored for queries. + # @param query_options [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions, ::Hash] + # Query optimizer configuration to use for the given query. + # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] + # Common options for this request. + # @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash] + # Directed read options for this request. + # @param data_boost_enabled [::Boolean] + # If this is for a partitioned query and this field is set to `true`, the + # request is executed with Spanner Data Boost independent compute resources. + # + # If the field is set to `true` but the request doesn't set + # `partition_token`, the API returns an `INVALID_ARGUMENT` error. + # @param last_statement [::Boolean] + # Optional. If set to `true`, this statement marks the end of the + # transaction. After this statement executes, you must commit or abort the + # transaction. Attempts to execute any other requests against this + # transaction (including reads and queries) are rejected. + # + # For DML statements, setting this option might cause some error reporting to + # be deferred until commit time (for example, validation of unique + # constraints). Given this, successful execution of a DML statement shouldn't + # be assumed until a subsequent `Commit` call completes successfully. + # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] + # Optional. Makes the Spanner requests location-aware if present. + # + # It gives the server hints that can be used to route the request + # to an appropriate server, potentially significantly decreasing latency and + # improving throughput. To achieve improved performance, most fields must be + # filled in with accurate values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::V1::ResultSet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::V1::ResultSet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::ExecuteSqlRequest.new + # + # # Call the execute_sql method. + # result = client.execute_sql request + # + # # The returned object is of type Google::Cloud::Spanner::V1::ResultSet. + # p result + # + def execute_sql request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ExecuteSqlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.execute_sql.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session + header_params["session"] = request.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.execute_sql.timeout, + metadata: metadata, + retry_policy: @config.rpcs.execute_sql.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :execute_sql, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Like {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}, except returns the + # result set as a stream. Unlike + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}, there is no limit on + # the size of the returned result set. However, no individual row in the + # result set can exceed 100 MiB, and no column value can exceed 10 MiB. + # + # The query string can be SQL or [Graph Query Language + # (GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro). + # + # @overload execute_streaming_sql(request, options = nil) + # Pass arguments to `execute_streaming_sql` via a request object, either of type + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::ExecuteSqlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload execute_streaming_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil, last_statement: nil, routing_hint: nil) + # Pass arguments to `execute_streaming_sql` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::String] + # Required. The session in which the SQL query should be performed. + # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] + # The transaction to use. + # + # For queries, if none is provided, the default is a temporary read-only + # transaction with strong concurrency. + # + # Standard DML statements require a read-write transaction. To protect + # against replays, single-use transactions are not supported. The caller + # must either supply an existing transaction ID or begin a new transaction. + # + # Partitioned DML requires an existing Partitioned DML transaction ID. + # @param sql [::String] + # Required. The SQL string. + # @param params [::Google::Protobuf::Struct, ::Hash] + # Parameter names and values that bind to placeholders in the SQL string. + # + # A parameter placeholder consists of the `@` character followed by the + # parameter name (for example, `@firstName`). Parameter names must conform + # to the naming requirements of identifiers as specified at + # https://cloud.google.com/spanner/docs/lexical#identifiers. + # + # Parameters can appear anywhere that a literal value is expected. The same + # parameter name can be used more than once, for example: + # + # `"WHERE id > @msg_id AND id < @msg_id + 100"` + # + # It's an error to execute a SQL statement with unbound parameters. + # @param param_types [::Hash{::String => ::Google::Cloud::Spanner::V1::Type, ::Hash}] + # It isn't always possible for Cloud Spanner to infer the right SQL type + # from a JSON value. For example, values of type `BYTES` and values + # of type `STRING` both appear in + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#params params} as JSON strings. + # + # In these cases, you can use `param_types` to specify the exact + # SQL type for some or all of the SQL statement parameters. See the + # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information + # about SQL types. + # @param resume_token [::String] + # If this request is resuming a previously interrupted SQL statement + # execution, `resume_token` should be copied from the last + # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the + # interruption. Doing this enables the new SQL statement execution to resume + # where the last one left off. The rest of the request parameters must + # exactly match the request that yielded this token. + # @param query_mode [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode] + # Used to control the amount of debugging information returned in + # {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#partition_token partition_token} is + # set, {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode query_mode} can only + # be set to + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::NORMAL QueryMode.NORMAL}. + # @param partition_token [::String] + # If present, results are restricted to the specified partition + # previously created using `PartitionQuery`. There must be an exact + # match for the values of fields common to this message and the + # `PartitionQueryRequest` message used to create this `partition_token`. + # @param seqno [::Integer] + # A per-transaction sequence number used to identify this request. This field + # makes each request idempotent such that if the request is received multiple + # times, at most one succeeds. + # + # The sequence number must be monotonically increasing within the + # transaction. If a request arrives for the first time with an out-of-order + # sequence number, the transaction can be aborted. Replays of previously + # handled requests yield the same response as the first execution. + # + # Required for DML statements. Ignored for queries. + # @param query_options [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions, ::Hash] + # Query optimizer configuration to use for the given query. + # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] + # Common options for this request. + # @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash] + # Directed read options for this request. + # @param data_boost_enabled [::Boolean] + # If this is for a partitioned query and this field is set to `true`, the + # request is executed with Spanner Data Boost independent compute resources. + # + # If the field is set to `true` but the request doesn't set + # `partition_token`, the API returns an `INVALID_ARGUMENT` error. + # @param last_statement [::Boolean] + # Optional. If set to `true`, this statement marks the end of the + # transaction. After this statement executes, you must commit or abort the + # transaction. Attempts to execute any other requests against this + # transaction (including reads and queries) are rejected. + # + # For DML statements, setting this option might cause some error reporting to + # be deferred until commit time (for example, validation of unique + # constraints). Given this, successful execution of a DML statement shouldn't + # be assumed until a subsequent `Commit` call completes successfully. + # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] + # Optional. Makes the Spanner requests location-aware if present. + # + # It gives the server hints that can be used to route the request + # to an appropriate server, potentially significantly decreasing latency and + # improving throughput. To achieve improved performance, most fields must be + # filled in with accurate values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::ExecuteSqlRequest.new + # + # # Call the execute_streaming_sql method to start streaming. + # output = client.execute_streaming_sql request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Spanner::V1::PartialResultSet + # output.each do |current_response| + # p current_response + # end + # + def execute_streaming_sql request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ExecuteSqlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.execute_streaming_sql.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session + header_params["session"] = request.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.execute_streaming_sql.timeout, + metadata: metadata, + retry_policy: @config.rpcs.execute_streaming_sql.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :execute_streaming_sql, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Executes a batch of SQL DML statements. This method allows many statements + # to be run with lower latency than submitting them sequentially with + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}. + # + # Statements are executed in sequential order. A request can succeed even if + # a statement fails. The + # {::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse#status ExecuteBatchDmlResponse.status} + # field in the response provides information about the statement that failed. + # Clients must inspect this field to determine whether an error occurred. + # + # Execution stops after the first failed statement; the remaining statements + # are not executed. + # + # @overload execute_batch_dml(request, options = nil) + # Pass arguments to `execute_batch_dml` via a request object, either of type + # {::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload execute_batch_dml(session: nil, transaction: nil, statements: nil, seqno: nil, request_options: nil, last_statements: nil) + # Pass arguments to `execute_batch_dml` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::String] + # Required. The session in which the DML statements should be performed. + # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] + # Required. The transaction to use. Must be a read-write transaction. + # + # To protect against replays, single-use transactions are not supported. The + # caller must either supply an existing transaction ID or begin a new + # transaction. + # @param statements [::Array<::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement, ::Hash>] + # Required. The list of statements to execute in this batch. Statements are + # executed serially, such that the effects of statement `i` are visible to + # statement `i+1`. Each statement must be a DML statement. Execution stops at + # the first failed statement; the remaining statements are not executed. + # + # Callers must provide at least one statement. + # @param seqno [::Integer] + # Required. A per-transaction sequence number used to identify this request. + # This field makes each request idempotent such that if the request is + # received multiple times, at most one succeeds. + # + # The sequence number must be monotonically increasing within the + # transaction. If a request arrives for the first time with an out-of-order + # sequence number, the transaction might be aborted. Replays of previously + # handled requests yield the same response as the first execution. + # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] + # Common options for this request. + # @param last_statements [::Boolean] + # Optional. If set to `true`, this request marks the end of the transaction. + # After these statements execute, you must commit or abort the transaction. + # Attempts to execute any other requests against this transaction + # (including reads and queries) are rejected. + # + # Setting this option might cause some error reporting to be deferred until + # commit time (for example, validation of unique constraints). Given this, + # successful execution of statements shouldn't be assumed until a subsequent + # `Commit` call completes successfully. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest.new + # + # # Call the execute_batch_dml method. + # result = client.execute_batch_dml request + # + # # The returned object is of type Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse. + # p result + # + def execute_batch_dml request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.execute_batch_dml.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session + header_params["session"] = request.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.execute_batch_dml.timeout, + metadata: metadata, + retry_policy: @config.rpcs.execute_batch_dml.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :execute_batch_dml, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Reads rows from the database using key lookups and scans, as a + # simple key/value style alternative to + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}. This method can't be + # used to return a result set larger than 10 MiB; if the read matches more + # data than that, the read fails with a `FAILED_PRECONDITION` + # error. + # + # Reads inside read-write transactions might return `ABORTED`. If + # this occurs, the application should restart the transaction from + # the beginning. See {::Google::Cloud::Spanner::V1::Transaction Transaction} for more + # details. + # + # Larger result sets can be yielded in streaming fashion by calling + # {::Google::Cloud::Spanner::V1::Spanner::Client#streaming_read StreamingRead} instead. + # + # @overload read(request, options = nil) + # Pass arguments to `read` via a request object, either of type + # {::Google::Cloud::Spanner::V1::ReadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::ReadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil, order_by: nil, lock_hint: nil, routing_hint: nil) + # Pass arguments to `read` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::String] + # Required. The session in which the read should be performed. + # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] + # The transaction to use. If none is provided, the default is a + # temporary read-only transaction with strong concurrency. + # @param table [::String] + # Required. The name of the table in the database to be read. + # @param index [::String] + # If non-empty, the name of an index on + # {::Google::Cloud::Spanner::V1::ReadRequest#table table}. This index is used instead of + # the table primary key when interpreting + # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} and sorting result rows. + # See {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} for further + # information. + # @param columns [::Array<::String>] + # Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be + # returned for each row matching this request. + # @param key_set [::Google::Cloud::Spanner::V1::KeySet, ::Hash] + # Required. `key_set` identifies the rows to be yielded. `key_set` names the + # primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to + # be yielded, unless {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present. + # If {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present, then + # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} instead names index keys + # in {::Google::Cloud::Spanner::V1::ReadRequest#index index}. + # + # If the {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} + # field is empty, rows are yielded in table primary key order (if + # {::Google::Cloud::Spanner::V1::ReadRequest#index index} is empty) or index key order + # (if {::Google::Cloud::Spanner::V1::ReadRequest#index index} is non-empty). If the + # {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} field + # isn't empty, rows are yielded in an unspecified order. + # + # It isn't an error for the `key_set` to name rows that don't + # exist in the database. Read yields nothing for nonexistent rows. + # @param limit [::Integer] + # If greater than zero, only the first `limit` rows are yielded. If `limit` + # is zero, the default is no limit. A limit can't be specified if + # `partition_token` is set. + # @param resume_token [::String] + # If this request is resuming a previously interrupted read, + # `resume_token` should be copied from the last + # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the + # interruption. Doing this enables the new read to resume where the last read + # left off. The rest of the request parameters must exactly match the request + # that yielded this token. + # @param partition_token [::String] + # If present, results are restricted to the specified partition + # previously created using `PartitionRead`. There must be an exact + # match for the values of fields common to this message and the + # PartitionReadRequest message used to create this partition_token. + # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] + # Common options for this request. + # @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash] + # Directed read options for this request. + # @param data_boost_enabled [::Boolean] + # If this is for a partitioned read and this field is set to `true`, the + # request is executed with Spanner Data Boost independent compute resources. + # + # If the field is set to `true` but the request doesn't set + # `partition_token`, the API returns an `INVALID_ARGUMENT` error. + # @param order_by [::Google::Cloud::Spanner::V1::ReadRequest::OrderBy] + # Optional. Order for the returned rows. + # + # By default, Spanner returns result rows in primary key order except for + # PartitionRead requests. For applications that don't require rows to be + # returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting + # `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval, + # resulting in lower latencies in certain cases (for example, bulk point + # lookups). + # @param lock_hint [::Google::Cloud::Spanner::V1::ReadRequest::LockHint] + # Optional. Lock Hint for the request, it can only be used with read-write + # transactions. + # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] + # Optional. Makes the Spanner requests location-aware if present. + # + # It gives the server hints that can be used to route the request + # to an appropriate server, potentially significantly decreasing latency and + # improving throughput. To achieve improved performance, most fields must be + # filled in with accurate values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::V1::ResultSet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::V1::ResultSet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::ReadRequest.new + # + # # Call the read method. + # result = client.read request + # + # # The returned object is of type Google::Cloud::Spanner::V1::ResultSet. + # p result + # + def read request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ReadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.read.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session + header_params["session"] = request.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.read.timeout, + metadata: metadata, + retry_policy: @config.rpcs.read.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :read, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Like {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, except returns the result set + # as a stream. Unlike {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, there is no + # limit on the size of the returned result set. However, no individual row in + # the result set can exceed 100 MiB, and no column value can exceed + # 10 MiB. + # + # @overload streaming_read(request, options = nil) + # Pass arguments to `streaming_read` via a request object, either of type + # {::Google::Cloud::Spanner::V1::ReadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::ReadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload streaming_read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil, order_by: nil, lock_hint: nil, routing_hint: nil) + # Pass arguments to `streaming_read` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::String] + # Required. The session in which the read should be performed. + # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] + # The transaction to use. If none is provided, the default is a + # temporary read-only transaction with strong concurrency. + # @param table [::String] + # Required. The name of the table in the database to be read. + # @param index [::String] + # If non-empty, the name of an index on + # {::Google::Cloud::Spanner::V1::ReadRequest#table table}. This index is used instead of + # the table primary key when interpreting + # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} and sorting result rows. + # See {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} for further + # information. + # @param columns [::Array<::String>] + # Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be + # returned for each row matching this request. + # @param key_set [::Google::Cloud::Spanner::V1::KeySet, ::Hash] + # Required. `key_set` identifies the rows to be yielded. `key_set` names the + # primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to + # be yielded, unless {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present. + # If {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present, then + # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} instead names index keys + # in {::Google::Cloud::Spanner::V1::ReadRequest#index index}. + # + # If the {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} + # field is empty, rows are yielded in table primary key order (if + # {::Google::Cloud::Spanner::V1::ReadRequest#index index} is empty) or index key order + # (if {::Google::Cloud::Spanner::V1::ReadRequest#index index} is non-empty). If the + # {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} field + # isn't empty, rows are yielded in an unspecified order. + # + # It isn't an error for the `key_set` to name rows that don't + # exist in the database. Read yields nothing for nonexistent rows. + # @param limit [::Integer] + # If greater than zero, only the first `limit` rows are yielded. If `limit` + # is zero, the default is no limit. A limit can't be specified if + # `partition_token` is set. + # @param resume_token [::String] + # If this request is resuming a previously interrupted read, + # `resume_token` should be copied from the last + # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the + # interruption. Doing this enables the new read to resume where the last read + # left off. The rest of the request parameters must exactly match the request + # that yielded this token. + # @param partition_token [::String] + # If present, results are restricted to the specified partition + # previously created using `PartitionRead`. There must be an exact + # match for the values of fields common to this message and the + # PartitionReadRequest message used to create this partition_token. + # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] + # Common options for this request. + # @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash] + # Directed read options for this request. + # @param data_boost_enabled [::Boolean] + # If this is for a partitioned read and this field is set to `true`, the + # request is executed with Spanner Data Boost independent compute resources. + # + # If the field is set to `true` but the request doesn't set + # `partition_token`, the API returns an `INVALID_ARGUMENT` error. + # @param order_by [::Google::Cloud::Spanner::V1::ReadRequest::OrderBy] + # Optional. Order for the returned rows. + # + # By default, Spanner returns result rows in primary key order except for + # PartitionRead requests. For applications that don't require rows to be + # returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting + # `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval, + # resulting in lower latencies in certain cases (for example, bulk point + # lookups). + # @param lock_hint [::Google::Cloud::Spanner::V1::ReadRequest::LockHint] + # Optional. Lock Hint for the request, it can only be used with read-write + # transactions. + # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] + # Optional. Makes the Spanner requests location-aware if present. + # + # It gives the server hints that can be used to route the request + # to an appropriate server, potentially significantly decreasing latency and + # improving throughput. To achieve improved performance, most fields must be + # filled in with accurate values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::ReadRequest.new + # + # # Call the streaming_read method to start streaming. + # output = client.streaming_read request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Spanner::V1::PartialResultSet + # output.each do |current_response| + # p current_response + # end + # + def streaming_read request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ReadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.streaming_read.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session + header_params["session"] = request.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.streaming_read.timeout, + metadata: metadata, + retry_policy: @config.rpcs.streaming_read.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :streaming_read, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Begins a new transaction. This step can often be skipped: + # {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} and + # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} can begin a new transaction as a + # side-effect. + # + # @overload begin_transaction(request, options = nil) + # Pass arguments to `begin_transaction` via a request object, either of type + # {::Google::Cloud::Spanner::V1::BeginTransactionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::BeginTransactionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload begin_transaction(session: nil, options: nil, request_options: nil, mutation_key: nil, routing_hint: nil) + # Pass arguments to `begin_transaction` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::String] + # Required. The session in which the transaction runs. + # @param options [::Google::Cloud::Spanner::V1::TransactionOptions, ::Hash] + # Required. Options for the new transaction. + # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] + # Common options for this request. + # Priority is ignored for this request. Setting the priority in this + # `request_options` struct doesn't do anything. To set the priority for a + # transaction, set it on the reads and writes that are part of this + # transaction instead. + # @param mutation_key [::Google::Cloud::Spanner::V1::Mutation, ::Hash] + # Optional. Required for read-write transactions on a multiplexed session + # that commit mutations but don't perform any reads or queries. You must + # randomly select one of the mutations from the mutation set and send it as a + # part of this request. + # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] + # Optional. Makes the Spanner requests location-aware if present. + # + # It gives the server hints that can be used to route the request + # to an appropriate server, potentially significantly decreasing latency and + # improving throughput. To achieve improved performance, most fields must be + # filled in with accurate values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::V1::Transaction] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::V1::Transaction] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::BeginTransactionRequest.new + # + # # Call the begin_transaction method. + # result = client.begin_transaction request + # + # # The returned object is of type Google::Cloud::Spanner::V1::Transaction. + # p result + # + def begin_transaction request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::BeginTransactionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.begin_transaction.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session + header_params["session"] = request.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.begin_transaction.timeout, + metadata: metadata, + retry_policy: @config.rpcs.begin_transaction.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :begin_transaction, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Commits a transaction. The request includes the mutations to be + # applied to rows in the database. + # + # `Commit` might return an `ABORTED` error. This can occur at any time; + # commonly, the cause is conflicts with concurrent + # transactions. However, it can also happen for a variety of other + # reasons. If `Commit` returns `ABORTED`, the caller should retry + # the transaction from the beginning, reusing the same session. + # + # On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, + # for example, if the client job experiences a 1+ hour networking failure. + # At that point, Cloud Spanner has lost track of the transaction outcome and + # we recommend that you perform another read from the database to see the + # state of things as they are now. + # + # @overload commit(request, options = nil) + # Pass arguments to `commit` via a request object, either of type + # {::Google::Cloud::Spanner::V1::CommitRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::CommitRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload commit(session: nil, transaction_id: nil, single_use_transaction: nil, mutations: nil, return_commit_stats: nil, max_commit_delay: nil, request_options: nil, precommit_token: nil, routing_hint: nil) + # Pass arguments to `commit` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::String] + # Required. The session in which the transaction to be committed is running. + # @param transaction_id [::String] + # Commit a previously-started transaction. + # + # Note: The following parameters are mutually exclusive: `transaction_id`, `single_use_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param single_use_transaction [::Google::Cloud::Spanner::V1::TransactionOptions, ::Hash] + # Execute mutations in a temporary transaction. Note that unlike + # commit of a previously-started transaction, commit with a + # temporary transaction is non-idempotent. That is, if the + # `CommitRequest` is sent to Cloud Spanner more than once (for + # instance, due to retries in the application, or in the + # transport library), it's possible that the mutations are + # executed more than once. If this is undesirable, use + # {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction} and + # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} instead. + # + # Note: The following parameters are mutually exclusive: `single_use_transaction`, `transaction_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param mutations [::Array<::Google::Cloud::Spanner::V1::Mutation, ::Hash>] + # The mutations to be executed when this transaction commits. All + # mutations are applied atomically, in the order they appear in + # this list. + # @param return_commit_stats [::Boolean] + # If `true`, then statistics related to the transaction is included in + # the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. + # Default value is `false`. + # @param max_commit_delay [::Google::Protobuf::Duration, ::Hash] + # Optional. The amount of latency this request is configured to incur in + # order to improve throughput. If this field isn't set, Spanner assumes + # requests are relatively latency sensitive and automatically determines an + # appropriate delay time. You can specify a commit delay value between 0 and + # 500 ms. + # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] + # Common options for this request. + # @param precommit_token [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken, ::Hash] + # Optional. If the read-write transaction was executed on a multiplexed + # session, then you must include the precommit token with the highest + # sequence number received in this transaction attempt. Failing to do so + # results in a `FailedPrecondition` error. + # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] + # Optional. Makes the Spanner requests location-aware if present. + # + # It gives the server hints that can be used to route the request + # to an appropriate server, potentially significantly decreasing latency and + # improving throughput. To achieve improved performance, most fields must be + # filled in with accurate values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::V1::CommitResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::V1::CommitResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::CommitRequest.new + # + # # Call the commit method. + # result = client.commit request + # + # # The returned object is of type Google::Cloud::Spanner::V1::CommitResponse. + # p result + # + def commit request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::CommitRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.commit.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session + header_params["session"] = request.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.commit.timeout, + metadata: metadata, + retry_policy: @config.rpcs.commit.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :commit, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Rolls back a transaction, releasing any locks it holds. It's a good + # idea to call this for any transaction that includes one or more + # {::Google::Cloud::Spanner::V1::Spanner::Client#read Read} or + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} requests and ultimately + # decides not to commit. + # + # `Rollback` returns `OK` if it successfully aborts the transaction, the + # transaction was already aborted, or the transaction isn't + # found. `Rollback` never returns `ABORTED`. + # + # @overload rollback(request, options = nil) + # Pass arguments to `rollback` via a request object, either of type + # {::Google::Cloud::Spanner::V1::RollbackRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::RollbackRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rollback(session: nil, transaction_id: nil) + # Pass arguments to `rollback` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::String] + # Required. The session in which the transaction to roll back is running. + # @param transaction_id [::String] + # Required. The transaction to roll back. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::RollbackRequest.new + # + # # Call the rollback method. + # result = client.rollback request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def rollback request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::RollbackRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rollback.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session + header_params["session"] = request.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.rollback.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rollback.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :rollback, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a set of partition tokens that can be used to execute a query + # operation in parallel. Each of the returned partition tokens can be used + # by {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql} to + # specify a subset of the query result to read. The same session and + # read-only transaction must be used by the `PartitionQueryRequest` used to + # create the partition tokens and the `ExecuteSqlRequests` that use the + # partition tokens. + # + # Partition tokens become invalid when the session used to create them + # is deleted, is idle for too long, begins a new transaction, or becomes too + # old. When any of these happen, it isn't possible to resume the query, and + # the whole operation must be restarted from the beginning. + # + # @overload partition_query(request, options = nil) + # Pass arguments to `partition_query` via a request object, either of type + # {::Google::Cloud::Spanner::V1::PartitionQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::PartitionQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload partition_query(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, partition_options: nil) + # Pass arguments to `partition_query` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::String] + # Required. The session used to create the partitions. + # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] + # Read-only snapshot transactions are supported, read and write and + # single-use transactions are not. + # @param sql [::String] + # Required. The query request to generate partitions for. The request fails + # if the query isn't root partitionable. For a query to be root + # partitionable, it needs to satisfy a few conditions. For example, if the + # query execution plan contains a distributed union operator, then it must be + # the first operator in the plan. For more information about other + # conditions, see [Read data in + # parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). + # + # The query request must not contain DML commands, such as `INSERT`, + # `UPDATE`, or `DELETE`. Use + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql `ExecuteStreamingSql`} with + # a `PartitionedDml` transaction for large, partition-friendly DML + # operations. + # @param params [::Google::Protobuf::Struct, ::Hash] + # Optional. Parameter names and values that bind to placeholders in the SQL + # string. + # + # A parameter placeholder consists of the `@` character followed by the + # parameter name (for example, `@firstName`). Parameter names can contain + # letters, numbers, and underscores. + # + # Parameters can appear anywhere that a literal value is expected. The same + # parameter name can be used more than once, for example: + # + # `"WHERE id > @msg_id AND id < @msg_id + 100"` + # + # It's an error to execute a SQL statement with unbound parameters. + # @param param_types [::Hash{::String => ::Google::Cloud::Spanner::V1::Type, ::Hash}] + # Optional. It isn't always possible for Cloud Spanner to infer the right SQL + # type from a JSON value. For example, values of type `BYTES` and values of + # type `STRING` both appear in + # {::Google::Cloud::Spanner::V1::PartitionQueryRequest#params params} as JSON strings. + # + # In these cases, `param_types` can be used to specify the exact + # SQL type for some or all of the SQL query parameters. See the + # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information + # about SQL types. + # @param partition_options [::Google::Cloud::Spanner::V1::PartitionOptions, ::Hash] + # Additional options that affect how many partitions are created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::V1::PartitionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::V1::PartitionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::PartitionQueryRequest.new + # + # # Call the partition_query method. + # result = client.partition_query request + # + # # The returned object is of type Google::Cloud::Spanner::V1::PartitionResponse. + # p result + # + def partition_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::PartitionQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.partition_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session + header_params["session"] = request.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.partition_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.partition_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :partition_query, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a set of partition tokens that can be used to execute a read + # operation in parallel. Each of the returned partition tokens can be used + # by {::Google::Cloud::Spanner::V1::Spanner::Client#streaming_read StreamingRead} to specify a + # subset of the read result to read. The same session and read-only + # transaction must be used by the `PartitionReadRequest` used to create the + # partition tokens and the `ReadRequests` that use the partition tokens. + # There are no ordering guarantees on rows returned among the returned + # partition tokens, or even within each individual `StreamingRead` call + # issued with a `partition_token`. + # + # Partition tokens become invalid when the session used to create them + # is deleted, is idle for too long, begins a new transaction, or becomes too + # old. When any of these happen, it isn't possible to resume the read, and + # the whole operation must be restarted from the beginning. + # + # @overload partition_read(request, options = nil) + # Pass arguments to `partition_read` via a request object, either of type + # {::Google::Cloud::Spanner::V1::PartitionReadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::PartitionReadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload partition_read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, partition_options: nil) + # Pass arguments to `partition_read` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::String] + # Required. The session used to create the partitions. + # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] + # Read only snapshot transactions are supported, read/write and single use + # transactions are not. + # @param table [::String] + # Required. The name of the table in the database to be read. + # @param index [::String] + # If non-empty, the name of an index on + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table}. This index is used + # instead of the table primary key when interpreting + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} and sorting + # result rows. See {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} + # for further information. + # @param columns [::Array<::String>] + # The columns of {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be + # returned for each row matching this request. + # @param key_set [::Google::Cloud::Spanner::V1::KeySet, ::Hash] + # Required. `key_set` identifies the rows to be yielded. `key_set` names the + # primary keys of the rows in + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be yielded, unless + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present. If + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present, then + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} instead names + # index keys in {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index}. + # + # It isn't an error for the `key_set` to name rows that don't + # exist in the database. Read yields nothing for nonexistent rows. + # @param partition_options [::Google::Cloud::Spanner::V1::PartitionOptions, ::Hash] + # Additional options that affect how many partitions are created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Spanner::V1::PartitionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Spanner::V1::PartitionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::PartitionReadRequest.new + # + # # Call the partition_read method. + # result = client.partition_read request + # + # # The returned object is of type Google::Cloud::Spanner::V1::PartitionResponse. + # p result + # + def partition_read request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::PartitionReadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.partition_read.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session + header_params["session"] = request.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.partition_read.timeout, + metadata: metadata, + retry_policy: @config.rpcs.partition_read.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :partition_read, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Batches the supplied mutation groups in a collection of efficient + # transactions. All mutations in a group are committed atomically. However, + # mutations across groups can be committed non-atomically in an unspecified + # order and thus, they must be independent of each other. Partial failure is + # possible, that is, some groups might have been committed successfully, + # while some might have failed. The results of individual batches are + # streamed into the response as the batches are applied. + # + # `BatchWrite` requests are not replay protected, meaning that each mutation + # group can be applied more than once. Replays of non-idempotent mutations + # can have undesirable effects. For example, replays of an insert mutation + # can produce an already exists error or if you use generated or commit + # timestamp-based keys, it can result in additional rows being added to the + # mutation's table. We recommend structuring your mutation groups to be + # idempotent to avoid this issue. + # + # @overload batch_write(request, options = nil) + # Pass arguments to `batch_write` via a request object, either of type + # {::Google::Cloud::Spanner::V1::BatchWriteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::BatchWriteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_write(session: nil, request_options: nil, mutation_groups: nil, exclude_txn_from_change_streams: nil) + # Pass arguments to `batch_write` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param session [::String] + # Required. The session in which the batch request is to be run. + # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] + # Common options for this request. + # @param mutation_groups [::Array<::Google::Cloud::Spanner::V1::BatchWriteRequest::MutationGroup, ::Hash>] + # Required. The groups of mutations to be applied. + # @param exclude_txn_from_change_streams [::Boolean] + # Optional. If you don't set the `exclude_txn_from_change_streams` option or + # if it's set to `false`, then any change streams monitoring columns modified + # by transactions will capture the updates made within that transaction. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::BatchWriteResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Spanner::V1::BatchWriteResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::BatchWriteRequest.new + # + # # Call the batch_write method to start streaming. + # output = client.batch_write request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Spanner::V1::BatchWriteResponse + # output.each do |current_response| + # p current_response + # end + # + def batch_write request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::BatchWriteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_write.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.session + header_params["session"] = request.session + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_write.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_write.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :batch_write, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves a cache update for a given database. + # + # This RPC can be used to warm up the client cache by fetching key recipes + # and server information for a given database. It is recommended to call + # this RPC at the beginning of the client's lifecycle, prior to any other + # data plane operations. + # + # The cache update is returned as a stream because the response can be too + # large to fit into a single `CacheUpdate` message. + # + # @overload fetch_cache_update(request, options = nil) + # Pass arguments to `fetch_cache_update` via a request object, either of type + # {::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_cache_update(database: nil, max_recipe_count: nil, max_range_count: nil) + # Pass arguments to `fetch_cache_update` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database for which to retrieve the cache update. + # @param max_recipe_count [::Integer] + # Optional. The maximum number of key recipes to return in the response. + # If not set, a default limit of 100 will be used. + # @param max_range_count [::Integer] + # Optional. The maximum number of ranges to return in the response. + # If not set, a default limit of 10000 will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::CacheUpdate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Spanner::V1::CacheUpdate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/spanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Spanner::V1::Spanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Spanner::V1::FetchCacheUpdateRequest.new + # + # # Call the fetch_cache_update method to start streaming. + # output = client.fetch_cache_update request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Spanner::V1::CacheUpdate + # output.each do |current_response| + # p current_response + # end + # + def fetch_cache_update request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_cache_update.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Spanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_cache_update.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_cache_update.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @spanner_stub.call_rpc :fetch_cache_update, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Spanner API. + # + # This class represents the configuration for Spanner, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Spanner::V1::Spanner::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_session to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Spanner::V1::Spanner::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_session.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_session.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "spanner.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Spanner API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_session` + # @return [::Gapic::Config::Method] + # + attr_reader :create_session + ## + # RPC-specific configuration for `batch_create_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_sessions + ## + # RPC-specific configuration for `get_session` + # @return [::Gapic::Config::Method] + # + attr_reader :get_session + ## + # RPC-specific configuration for `list_sessions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sessions + ## + # RPC-specific configuration for `delete_session` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_session + ## + # RPC-specific configuration for `execute_sql` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_sql + ## + # RPC-specific configuration for `execute_streaming_sql` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_streaming_sql + ## + # RPC-specific configuration for `execute_batch_dml` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_batch_dml + ## + # RPC-specific configuration for `read` + # @return [::Gapic::Config::Method] + # + attr_reader :read + ## + # RPC-specific configuration for `streaming_read` + # @return [::Gapic::Config::Method] + # + attr_reader :streaming_read + ## + # RPC-specific configuration for `begin_transaction` + # @return [::Gapic::Config::Method] + # + attr_reader :begin_transaction + ## + # RPC-specific configuration for `commit` + # @return [::Gapic::Config::Method] + # + attr_reader :commit + ## + # RPC-specific configuration for `rollback` + # @return [::Gapic::Config::Method] + # + attr_reader :rollback + ## + # RPC-specific configuration for `partition_query` + # @return [::Gapic::Config::Method] + # + attr_reader :partition_query + ## + # RPC-specific configuration for `partition_read` + # @return [::Gapic::Config::Method] + # + attr_reader :partition_read + ## + # RPC-specific configuration for `batch_write` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_write + ## + # RPC-specific configuration for `fetch_cache_update` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_cache_update + + # @private + def initialize parent_rpcs = nil + create_session_config = parent_rpcs.create_session if parent_rpcs.respond_to? :create_session + @create_session = ::Gapic::Config::Method.new create_session_config + batch_create_sessions_config = parent_rpcs.batch_create_sessions if parent_rpcs.respond_to? :batch_create_sessions + @batch_create_sessions = ::Gapic::Config::Method.new batch_create_sessions_config + get_session_config = parent_rpcs.get_session if parent_rpcs.respond_to? :get_session + @get_session = ::Gapic::Config::Method.new get_session_config + list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions + @list_sessions = ::Gapic::Config::Method.new list_sessions_config + delete_session_config = parent_rpcs.delete_session if parent_rpcs.respond_to? :delete_session + @delete_session = ::Gapic::Config::Method.new delete_session_config + execute_sql_config = parent_rpcs.execute_sql if parent_rpcs.respond_to? :execute_sql + @execute_sql = ::Gapic::Config::Method.new execute_sql_config + execute_streaming_sql_config = parent_rpcs.execute_streaming_sql if parent_rpcs.respond_to? :execute_streaming_sql + @execute_streaming_sql = ::Gapic::Config::Method.new execute_streaming_sql_config + execute_batch_dml_config = parent_rpcs.execute_batch_dml if parent_rpcs.respond_to? :execute_batch_dml + @execute_batch_dml = ::Gapic::Config::Method.new execute_batch_dml_config + read_config = parent_rpcs.read if parent_rpcs.respond_to? :read + @read = ::Gapic::Config::Method.new read_config + streaming_read_config = parent_rpcs.streaming_read if parent_rpcs.respond_to? :streaming_read + @streaming_read = ::Gapic::Config::Method.new streaming_read_config + begin_transaction_config = parent_rpcs.begin_transaction if parent_rpcs.respond_to? :begin_transaction + @begin_transaction = ::Gapic::Config::Method.new begin_transaction_config + commit_config = parent_rpcs.commit if parent_rpcs.respond_to? :commit + @commit = ::Gapic::Config::Method.new commit_config + rollback_config = parent_rpcs.rollback if parent_rpcs.respond_to? :rollback + @rollback = ::Gapic::Config::Method.new rollback_config + partition_query_config = parent_rpcs.partition_query if parent_rpcs.respond_to? :partition_query + @partition_query = ::Gapic::Config::Method.new partition_query_config + partition_read_config = parent_rpcs.partition_read if parent_rpcs.respond_to? :partition_read + @partition_read = ::Gapic::Config::Method.new partition_read_config + batch_write_config = parent_rpcs.batch_write if parent_rpcs.respond_to? :batch_write + @batch_write = ::Gapic::Config::Method.new batch_write_config + fetch_cache_update_config = parent_rpcs.fetch_cache_update if parent_rpcs.respond_to? :fetch_cache_update + @fetch_cache_update = ::Gapic::Config::Method.new fetch_cache_update_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.rb new file mode 100644 index 000000000000..1970ece8b929 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Spanner + module V1 + module Spanner + # Credentials for the Spanner API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ] + self.env_vars = [ + "SPANNER_CREDENTIALS", + "SPANNER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SPANNER_CREDENTIALS_JSON", + "SPANNER_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.rb new file mode 100644 index 000000000000..ef5cfd6c6bab --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + module Spanner + # Path helper methods for the Spanner API. + module Paths + ## + # Create a fully-qualified Database resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}/databases/{database}` + # + # @param project [String] + # @param instance [String] + # @param database [String] + # + # @return [::String] + def database_path project:, instance:, database: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/instances/#{instance}/databases/#{database}" + end + + ## + # Create a fully-qualified Session resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}/databases/{database}/sessions/{session}` + # + # @param project [String] + # @param instance [String] + # @param database [String] + # @param session [String] + # + # @return [::String] + def session_path project:, instance:, database:, session: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" + + "projects/#{project}/instances/#{instance}/databases/#{database}/sessions/#{session}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb new file mode 100644 index 000000000000..d42f1a645d00 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb new file mode 100644 index 000000000000..4d36ea2bd9bf --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/v1/change_stream.proto + +require 'google/protobuf' + +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/spanner/v1/type_pb' + + +descriptor_data = "\n%google/spanner/v1/change_stream.proto\x12\x11google.spanner.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/spanner/v1/type.proto\"\x96\x14\n\x12\x43hangeStreamRecord\x12T\n\x12\x64\x61ta_change_record\x18\x01 \x01(\x0b\x32\x36.google.spanner.v1.ChangeStreamRecord.DataChangeRecordH\x00\x12Q\n\x10heartbeat_record\x18\x02 \x01(\x0b\x32\x35.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordH\x00\x12\\\n\x16partition_start_record\x18\x03 \x01(\x0b\x32:.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordH\x00\x12X\n\x14partition_end_record\x18\x04 \x01(\x0b\x32\x38.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordH\x00\x12\\\n\x16partition_event_record\x18\x05 \x01(\x0b\x32:.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordH\x00\x1a\xd2\n\n\x10\x44\x61taChangeRecord\x12\x34\n\x10\x63ommit_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x1d\n\x15server_transaction_id\x18\x03 \x01(\t\x12\x32\n*is_last_record_in_transaction_in_partition\x18\x04 \x01(\x08\x12\r\n\x05table\x18\x05 \x01(\t\x12^\n\x0f\x63olumn_metadata\x18\x06 \x03(\x0b\x32\x45.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata\x12H\n\x04mods\x18\x07 \x03(\x0b\x32:.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod\x12P\n\x08mod_type\x18\x08 \x01(\x0e\x32>.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType\x12\x63\n\x12value_capture_type\x18\t \x01(\x0e\x32G.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType\x12(\n number_of_records_in_transaction\x18\n \x01(\x05\x12+\n#number_of_partitions_in_transaction\x18\x0b \x01(\x05\x12\x17\n\x0ftransaction_tag\x18\x0c \x01(\t\x12\x1d\n\x15is_system_transaction\x18\r \x01(\x08\x1aw\n\x0e\x43olumnMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12%\n\x04type\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type\x12\x16\n\x0eis_primary_key\x18\x03 \x01(\x08\x12\x18\n\x10ordinal_position\x18\x04 \x01(\x03\x1aP\n\x08ModValue\x12\x1d\n\x15\x63olumn_metadata_index\x18\x01 \x01(\x05\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\x1a\xfe\x01\n\x03Mod\x12M\n\x04keys\x18\x01 \x03(\x0b\x32?.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue\x12S\n\nold_values\x18\x02 \x03(\x0b\x32?.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue\x12S\n\nnew_values\x18\x03 \x03(\x0b\x32?.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue\"G\n\x07ModType\x12\x18\n\x14MOD_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06INSERT\x10\n\x12\n\n\x06UPDATE\x10\x14\x12\n\n\x06\x44\x45LETE\x10\x1e\"\x87\x01\n\x10ValueCaptureType\x12\"\n\x1eVALUE_CAPTURE_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12OLD_AND_NEW_VALUES\x10\n\x12\x0e\n\nNEW_VALUES\x10\x14\x12\x0b\n\x07NEW_ROW\x10\x1e\x12\x1a\n\x16NEW_ROW_AND_OLD_VALUES\x10(\x1a@\n\x0fHeartbeatRecord\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a~\n\x14PartitionStartRecord\x12\x33\n\x0fstart_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x18\n\x10partition_tokens\x18\x03 \x03(\t\x1ay\n\x12PartitionEndRecord\x12\x31\n\rend_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x17\n\x0fpartition_token\x18\x03 \x01(\t\x1a\xa4\x03\n\x14PartitionEventRecord\x12\x34\n\x10\x63ommit_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x17\n\x0fpartition_token\x18\x03 \x01(\t\x12^\n\x0emove_in_events\x18\x04 \x03(\x0b\x32\x46.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent\x12`\n\x0fmove_out_events\x18\x05 \x03(\x0b\x32G.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent\x1a-\n\x0bMoveInEvent\x12\x1e\n\x16source_partition_token\x18\x01 \x01(\t\x1a\x33\n\x0cMoveOutEvent\x12#\n\x1b\x64\x65stination_partition_token\x18\x01 \x01(\tB\x08\n\x06recordB\xb4\x01\n\x15\x63om.google.spanner.v1B\x11\x43hangeStreamProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module V1 + ChangeStreamRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord").msgclass + ChangeStreamRecord::DataChangeRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord").msgclass + ChangeStreamRecord::DataChangeRecord::ColumnMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata").msgclass + ChangeStreamRecord::DataChangeRecord::ModValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue").msgclass + ChangeStreamRecord::DataChangeRecord::Mod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod").msgclass + ChangeStreamRecord::DataChangeRecord::ModType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType").enummodule + ChangeStreamRecord::DataChangeRecord::ValueCaptureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType").enummodule + ChangeStreamRecord::HeartbeatRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.HeartbeatRecord").msgclass + ChangeStreamRecord::PartitionStartRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionStartRecord").msgclass + ChangeStreamRecord::PartitionEndRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEndRecord").msgclass + ChangeStreamRecord::PartitionEventRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEventRecord").msgclass + ChangeStreamRecord::PartitionEventRecord::MoveInEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent").msgclass + ChangeStreamRecord::PartitionEventRecord::MoveOutEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb new file mode 100644 index 000000000000..607a4aa4cabc --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/v1/commit_response.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' +require 'google/spanner/v1/location_pb' +require 'google/spanner/v1/transaction_pb' + + +descriptor_data = "\n\'google/spanner/v1/commit_response.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/spanner/v1/location.proto\x1a#google/spanner/v1/transaction.proto\"\xb5\x04\n\x0e\x43ommitResponse\x12\x34\n\x10\x63ommit_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x0c\x63ommit_stats\x18\x02 \x01(\x0b\x32-.google.spanner.v1.CommitResponse.CommitStats\x12N\n\x0fprecommit_token\x18\x04 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenH\x00\x12\x36\n\x12snapshot_timestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x0c\x63\x61\x63he_update\x18\x06 \x01(\x0b\x32\x1e.google.spanner.v1.CacheUpdateB\x03\xe0\x41\x01\x12M\n\x0fisolation_level\x18\x07 \x01(\x0e\x32\x34.google.spanner.v1.TransactionOptions.IsolationLevel\x12T\n\x0eread_lock_mode\x18\x08 \x01(\x0e\x32<.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode\x1a%\n\x0b\x43ommitStats\x12\x16\n\x0emutation_count\x18\x01 \x01(\x03\x42\x19\n\x17MultiplexedSessionRetryB\xb6\x01\n\x15\x63om.google.spanner.v1B\x13\x43ommitResponseProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module V1 + CommitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse").msgclass + CommitResponse::CommitStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse.CommitStats").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/keys_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/keys_pb.rb new file mode 100644 index 000000000000..8e8743e95c42 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/keys_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/v1/keys.proto + +require 'google/protobuf' + +require 'google/protobuf/struct_pb' + + +descriptor_data = "\n\x1cgoogle/spanner/v1/keys.proto\x12\x11google.spanner.v1\x1a\x1cgoogle/protobuf/struct.proto\"\xf4\x01\n\x08KeyRange\x12\x32\n\x0cstart_closed\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.ListValueH\x00\x12\x30\n\nstart_open\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.ListValueH\x00\x12\x30\n\nend_closed\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.ListValueH\x01\x12.\n\x08\x65nd_open\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.ListValueH\x01\x42\x10\n\x0estart_key_typeB\x0e\n\x0c\x65nd_key_type\"l\n\x06KeySet\x12(\n\x04keys\x18\x01 \x03(\x0b\x32\x1a.google.protobuf.ListValue\x12+\n\x06ranges\x18\x02 \x03(\x0b\x32\x1b.google.spanner.v1.KeyRange\x12\x0b\n\x03\x61ll\x18\x03 \x01(\x08\x42\xac\x01\n\x15\x63om.google.spanner.v1B\tKeysProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module V1 + KeyRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeyRange").msgclass + KeySet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeySet").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/location_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/location_pb.rb new file mode 100644 index 000000000000..911d7f698ff7 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/location_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/v1/location.proto + +require 'google/protobuf' + +require 'google/protobuf/struct_pb' +require 'google/spanner/v1/type_pb' + + +descriptor_data = "\n google/spanner/v1/location.proto\x12\x11google.spanner.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/spanner/v1/type.proto\"f\n\x05Range\x12\x11\n\tstart_key\x18\x01 \x01(\x0c\x12\x11\n\tlimit_key\x18\x02 \x01(\x0c\x12\x11\n\tgroup_uid\x18\x03 \x01(\x04\x12\x10\n\x08split_id\x18\x04 \x01(\x04\x12\x12\n\ngeneration\x18\x05 \x01(\x0c\"\xe6\x01\n\x06Tablet\x12\x12\n\ntablet_uid\x18\x01 \x01(\x04\x12\x16\n\x0eserver_address\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\x12,\n\x04role\x18\x04 \x01(\x0e\x32\x1e.google.spanner.v1.Tablet.Role\x12\x13\n\x0bincarnation\x18\x05 \x01(\x0c\x12\x10\n\x08\x64istance\x18\x06 \x01(\r\x12\x0c\n\x04skip\x18\x07 \x01(\x08\";\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\"p\n\x05Group\x12\x11\n\tgroup_uid\x18\x01 \x01(\x04\x12*\n\x07tablets\x18\x02 \x03(\x0b\x32\x19.google.spanner.v1.Tablet\x12\x14\n\x0cleader_index\x18\x03 \x01(\x05\x12\x12\n\ngeneration\x18\x04 \x01(\x0c\"\xd3\x04\n\tKeyRecipe\x12\x14\n\ntable_name\x18\x01 \x01(\tH\x00\x12\x14\n\nindex_name\x18\x02 \x01(\tH\x00\x12\x17\n\roperation_uid\x18\x03 \x01(\x04H\x00\x12/\n\x04part\x18\x04 \x03(\x0b\x32!.google.spanner.v1.KeyRecipe.Part\x1a\xc5\x03\n\x04Part\x12\x0b\n\x03tag\x18\x01 \x01(\r\x12\x36\n\x05order\x18\x02 \x01(\x0e\x32\'.google.spanner.v1.KeyRecipe.Part.Order\x12?\n\nnull_order\x18\x03 \x01(\x0e\x32+.google.spanner.v1.KeyRecipe.Part.NullOrder\x12%\n\x04type\x18\x04 \x01(\x0b\x32\x17.google.spanner.v1.Type\x12\x14\n\nidentifier\x18\x05 \x01(\tH\x00\x12\'\n\x05value\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueH\x00\x12\x10\n\x06random\x18\x08 \x01(\x08H\x00\x12\x1a\n\x12struct_identifiers\x18\x07 \x03(\x05\"=\n\x05Order\x12\x15\n\x11ORDER_UNSPECIFIED\x10\x00\x12\r\n\tASCENDING\x10\x01\x12\x0e\n\nDESCENDING\x10\x02\"V\n\tNullOrder\x12\x1a\n\x16NULL_ORDER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNULLS_FIRST\x10\x01\x12\x0e\n\nNULLS_LAST\x10\x02\x12\x0c\n\x08NOT_NULL\x10\x03\x42\x0c\n\nvalue_typeB\x08\n\x06target\"U\n\nRecipeList\x12\x19\n\x11schema_generation\x18\x01 \x01(\x0c\x12,\n\x06recipe\x18\x03 \x03(\x0b\x32\x1c.google.spanner.v1.KeyRecipe\"\xa8\x01\n\x0b\x43\x61\x63heUpdate\x12\x13\n\x0b\x64\x61tabase_id\x18\x01 \x01(\x04\x12\'\n\x05range\x18\x02 \x03(\x0b\x32\x18.google.spanner.v1.Range\x12\'\n\x05group\x18\x03 \x03(\x0b\x32\x18.google.spanner.v1.Group\x12\x32\n\x0bkey_recipes\x18\x05 \x01(\x0b\x32\x1d.google.spanner.v1.RecipeList\"\xca\x02\n\x0bRoutingHint\x12\x15\n\roperation_uid\x18\x01 \x01(\x04\x12\x13\n\x0b\x64\x61tabase_id\x18\x02 \x01(\x04\x12\x19\n\x11schema_generation\x18\x03 \x01(\x0c\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\x11\n\tlimit_key\x18\x05 \x01(\x0c\x12\x11\n\tgroup_uid\x18\x06 \x01(\x04\x12\x10\n\x08split_id\x18\x07 \x01(\x04\x12\x12\n\ntablet_uid\x18\x08 \x01(\x04\x12H\n\x12skipped_tablet_uid\x18\t \x03(\x0b\x32,.google.spanner.v1.RoutingHint.SkippedTablet\x12\x17\n\x0f\x63lient_location\x18\n \x01(\t\x1a\x38\n\rSkippedTablet\x12\x12\n\ntablet_uid\x18\x01 \x01(\x04\x12\x13\n\x0bincarnation\x18\x02 \x01(\x0c\x42\xb0\x01\n\x15\x63om.google.spanner.v1B\rLocationProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module V1 + Range = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Range").msgclass + Tablet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Tablet").msgclass + Tablet::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Tablet.Role").enummodule + Group = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Group").msgclass + KeyRecipe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeyRecipe").msgclass + KeyRecipe::Part = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeyRecipe.Part").msgclass + KeyRecipe::Part::Order = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeyRecipe.Part.Order").enummodule + KeyRecipe::Part::NullOrder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeyRecipe.Part.NullOrder").enummodule + RecipeList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RecipeList").msgclass + CacheUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CacheUpdate").msgclass + RoutingHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RoutingHint").msgclass + RoutingHint::SkippedTablet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RoutingHint.SkippedTablet").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/mutation_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/mutation_pb.rb new file mode 100644 index 000000000000..b84e466d4627 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/mutation_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/v1/mutation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/spanner/v1/keys_pb' + + +descriptor_data = "\n google/spanner/v1/mutation.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/spanner/v1/keys.proto\"\xc0\x06\n\x08Mutation\x12\x33\n\x06insert\x18\x01 \x01(\x0b\x32!.google.spanner.v1.Mutation.WriteH\x00\x12\x33\n\x06update\x18\x02 \x01(\x0b\x32!.google.spanner.v1.Mutation.WriteH\x00\x12=\n\x10insert_or_update\x18\x03 \x01(\x0b\x32!.google.spanner.v1.Mutation.WriteH\x00\x12\x34\n\x07replace\x18\x04 \x01(\x0b\x32!.google.spanner.v1.Mutation.WriteH\x00\x12\x34\n\x06\x64\x65lete\x18\x05 \x01(\x0b\x32\".google.spanner.v1.Mutation.DeleteH\x00\x12\x30\n\x04send\x18\x06 \x01(\x0b\x32 .google.spanner.v1.Mutation.SendH\x00\x12.\n\x03\x61\x63k\x18\x07 \x01(\x0b\x32\x1f.google.spanner.v1.Mutation.AckH\x00\x1aX\n\x05Write\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07\x63olumns\x18\x02 \x03(\t\x12*\n\x06values\x18\x03 \x03(\x0b\x32\x1a.google.protobuf.ListValue\x1aM\n\x06\x44\x65lete\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12/\n\x07key_set\x18\x02 \x01(\x0b\x32\x19.google.spanner.v1.KeySetB\x03\xe0\x41\x02\x1a\xa3\x01\n\x04Send\x12\x12\n\x05queue\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12,\n\x03key\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.ListValueB\x03\xe0\x41\x02\x12\x30\n\x0c\x64\x65liver_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x07payload\x18\x04 \x01(\x0b\x32\x16.google.protobuf.Value\x1a\x61\n\x03\x41\x63k\x12\x12\n\x05queue\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12,\n\x03key\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.ListValueB\x03\xe0\x41\x02\x12\x18\n\x10ignore_not_found\x18\x03 \x01(\x08\x42\x0b\n\toperationB\xb0\x01\n\x15\x63om.google.spanner.v1B\rMutationProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module V1 + Mutation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Mutation").msgclass + Mutation::Write = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Mutation.Write").msgclass + Mutation::Delete = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Mutation.Delete").msgclass + Mutation::Send = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Mutation.Send").msgclass + Mutation::Ack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Mutation.Ack").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/query_plan_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/query_plan_pb.rb new file mode 100644 index 000000000000..143949a764c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/query_plan_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/v1/query_plan.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/struct_pb' + + +descriptor_data = "\n\"google/spanner/v1/query_plan.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xf8\x04\n\x08PlanNode\x12\r\n\x05index\x18\x01 \x01(\x05\x12.\n\x04kind\x18\x02 \x01(\x0e\x32 .google.spanner.v1.PlanNode.Kind\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12:\n\x0b\x63hild_links\x18\x04 \x03(\x0b\x32%.google.spanner.v1.PlanNode.ChildLink\x12M\n\x14short_representation\x18\x05 \x01(\x0b\x32/.google.spanner.v1.PlanNode.ShortRepresentation\x12)\n\x08metadata\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x30\n\x0f\x65xecution_stats\x18\x07 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a@\n\tChildLink\x12\x13\n\x0b\x63hild_index\x18\x01 \x01(\x05\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x10\n\x08variable\x18\x03 \x01(\t\x1a\xb2\x01\n\x13ShortRepresentation\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12S\n\nsubqueries\x18\x02 \x03(\x0b\x32?.google.spanner.v1.PlanNode.ShortRepresentation.SubqueriesEntry\x1a\x31\n\x0fSubqueriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"8\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0e\n\nRELATIONAL\x10\x01\x12\n\n\x06SCALAR\x10\x02\"\xa4\x01\n\x12QueryAdvisorResult\x12L\n\x0cindex_advice\x18\x01 \x03(\x0b\x32\x31.google.spanner.v1.QueryAdvisorResult.IndexAdviceB\x03\xe0\x41\x01\x1a@\n\x0bIndexAdvice\x12\x10\n\x03\x64\x64l\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12improvement_factor\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\"~\n\tQueryPlan\x12/\n\nplan_nodes\x18\x01 \x03(\x0b\x32\x1b.google.spanner.v1.PlanNode\x12@\n\x0cquery_advice\x18\x02 \x01(\x0b\x32%.google.spanner.v1.QueryAdvisorResultB\x03\xe0\x41\x01\x42\xb1\x01\n\x15\x63om.google.spanner.v1B\x0eQueryPlanProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module V1 + PlanNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PlanNode").msgclass + PlanNode::ChildLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PlanNode.ChildLink").msgclass + PlanNode::ShortRepresentation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PlanNode.ShortRepresentation").msgclass + PlanNode::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PlanNode.Kind").enummodule + QueryAdvisorResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.QueryAdvisorResult").msgclass + QueryAdvisorResult::IndexAdvice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.QueryAdvisorResult.IndexAdvice").msgclass + QueryPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.QueryPlan").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/result_set_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/result_set_pb.rb new file mode 100644 index 000000000000..687b6efa6936 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/result_set_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/v1/result_set.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/struct_pb' +require 'google/spanner/v1/location_pb' +require 'google/spanner/v1/query_plan_pb' +require 'google/spanner/v1/transaction_pb' +require 'google/spanner/v1/type_pb' + + +descriptor_data = "\n\"google/spanner/v1/result_set.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a google/spanner/v1/location.proto\x1a\"google/spanner/v1/query_plan.proto\x1a#google/spanner/v1/transaction.proto\x1a\x1cgoogle/spanner/v1/type.proto\"\xad\x02\n\tResultSet\x12\x36\n\x08metadata\x18\x01 \x01(\x0b\x32$.google.spanner.v1.ResultSetMetadata\x12(\n\x04rows\x18\x02 \x03(\x0b\x32\x1a.google.protobuf.ListValue\x12\x30\n\x05stats\x18\x03 \x01(\x0b\x32!.google.spanner.v1.ResultSetStats\x12Q\n\x0fprecommit_token\x18\x05 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenB\x03\xe0\x41\x01\x12\x39\n\x0c\x63\x61\x63he_update\x18\x06 \x01(\x0b\x32\x1e.google.spanner.v1.CacheUpdateB\x03\xe0\x41\x01\"\xf2\x02\n\x10PartialResultSet\x12\x36\n\x08metadata\x18\x01 \x01(\x0b\x32$.google.spanner.v1.ResultSetMetadata\x12&\n\x06values\x18\x02 \x03(\x0b\x32\x16.google.protobuf.Value\x12\x15\n\rchunked_value\x18\x03 \x01(\x08\x12\x14\n\x0cresume_token\x18\x04 \x01(\x0c\x12\x30\n\x05stats\x18\x05 \x01(\x0b\x32!.google.spanner.v1.ResultSetStats\x12Q\n\x0fprecommit_token\x18\x08 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenB\x03\xe0\x41\x01\x12\x11\n\x04last\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x39\n\x0c\x63\x61\x63he_update\x18\n \x01(\x0b\x32\x1e.google.spanner.v1.CacheUpdateB\x03\xe0\x41\x01\"\xb7\x01\n\x11ResultSetMetadata\x12/\n\x08row_type\x18\x01 \x01(\x0b\x32\x1d.google.spanner.v1.StructType\x12\x33\n\x0btransaction\x18\x02 \x01(\x0b\x32\x1e.google.spanner.v1.Transaction\x12<\n\x15undeclared_parameters\x18\x03 \x01(\x0b\x32\x1d.google.spanner.v1.StructType\"\xb9\x01\n\x0eResultSetStats\x12\x30\n\nquery_plan\x18\x01 \x01(\x0b\x32\x1c.google.spanner.v1.QueryPlan\x12,\n\x0bquery_stats\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x19\n\x0frow_count_exact\x18\x03 \x01(\x03H\x00\x12\x1f\n\x15row_count_lower_bound\x18\x04 \x01(\x03H\x00\x42\x0b\n\trow_countB\xb1\x01\n\x15\x63om.google.spanner.v1B\x0eResultSetProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module V1 + ResultSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ResultSet").msgclass + PartialResultSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PartialResultSet").msgclass + ResultSetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ResultSetMetadata").msgclass + ResultSetStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ResultSetStats").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_pb.rb new file mode 100644 index 000000000000..e4c5330cfad2 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_pb.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/spanner/v1/spanner.proto + +require 'google/protobuf' + +require 'google/spanner/v1/commit_response_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' +require 'google/spanner/v1/keys_pb' +require 'google/spanner/v1/location_pb' +require 'google/spanner/v1/mutation_pb' +require 'google/spanner/v1/result_set_pb' +require 'google/spanner/v1/transaction_pb' +require 'google/spanner/v1/type_pb' + + +descriptor_data = "\n\x1fgoogle/spanner/v1/spanner.proto\x12\x11google.spanner.v1\x1a\'google/spanner/v1/commit_response.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/spanner/v1/keys.proto\x1a google/spanner/v1/location.proto\x1a google/spanner/v1/mutation.proto\x1a\"google/spanner/v1/result_set.proto\x1a#google/spanner/v1/transaction.proto\x1a\x1cgoogle/spanner/v1/type.proto\"\x83\x01\n\x14\x43reateSessionRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x30\n\x07session\x18\x02 \x01(\x0b\x32\x1a.google.spanner.v1.SessionB\x03\xe0\x41\x02\"\xa9\x01\n\x1a\x42\x61tchCreateSessionsRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x34\n\x10session_template\x18\x02 \x01(\x0b\x32\x1a.google.spanner.v1.Session\x12\x1a\n\rsession_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"J\n\x1b\x42\x61tchCreateSessionsResponse\x12+\n\x07session\x18\x01 \x03(\x0b\x32\x1a.google.spanner.v1.Session\"\xb8\x03\n\x07Session\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\x06labels\x18\x02 \x03(\x0b\x32&.google.spanner.v1.Session.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x19\x61pproximate_last_use_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x0c\x63reator_role\x18\x05 \x01(\t\x12\x18\n\x0bmultiplexed\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x88\x01\xea\x41\x84\x01\n\x1espanner.googleapis.com/Session\x12Oprojects/{project}/instances/{instance}/databases/{database}/sessions/{session}*\x08sessions2\x07session\"I\n\x11GetSessionRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\"\x87\x01\n\x13ListSessionsRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"]\n\x14ListSessionsResponse\x12,\n\x08sessions\x18\x01 \x03(\x0b\x32\x1a.google.spanner.v1.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x14\x44\x65leteSessionRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\"\xeb\x03\n\x0eRequestOptions\x12<\n\x08priority\x18\x01 \x01(\x0e\x32*.google.spanner.v1.RequestOptions.Priority\x12\x13\n\x0brequest_tag\x18\x02 \x01(\t\x12\x17\n\x0ftransaction_tag\x18\x03 \x01(\t\x12L\n\x0e\x63lient_context\x18\x04 \x01(\x0b\x32/.google.spanner.v1.RequestOptions.ClientContextB\x03\xe0\x41\x01\x1a\xbe\x01\n\rClientContext\x12_\n\x0esecure_context\x18\x01 \x03(\x0b\x32\x42.google.spanner.v1.RequestOptions.ClientContext.SecureContextEntryB\x03\xe0\x41\x01\x1aL\n\x12SecureContextEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"^\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cPRIORITY_LOW\x10\x01\x12\x13\n\x0fPRIORITY_MEDIUM\x10\x02\x12\x11\n\rPRIORITY_HIGH\x10\x03\"\xea\x04\n\x13\x44irectedReadOptions\x12R\n\x10include_replicas\x18\x01 \x01(\x0b\x32\x36.google.spanner.v1.DirectedReadOptions.IncludeReplicasH\x00\x12R\n\x10\x65xclude_replicas\x18\x02 \x01(\x0b\x32\x36.google.spanner.v1.DirectedReadOptions.ExcludeReplicasH\x00\x1a\xad\x01\n\x10ReplicaSelection\x12\x10\n\x08location\x18\x01 \x01(\t\x12J\n\x04type\x18\x02 \x01(\x0e\x32<.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Type\";\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x1a\x86\x01\n\x0fIncludeReplicas\x12S\n\x12replica_selections\x18\x01 \x03(\x0b\x32\x37.google.spanner.v1.DirectedReadOptions.ReplicaSelection\x12\x1e\n\x16\x61uto_failover_disabled\x18\x02 \x01(\x08\x1a\x66\n\x0f\x45xcludeReplicas\x12S\n\x12replica_selections\x18\x01 \x03(\x0b\x32\x37.google.spanner.v1.DirectedReadOptions.ReplicaSelectionB\n\n\x08replicas\"\xc8\x07\n\x11\x45xecuteSqlRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x10\n\x03sql\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x06params\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12I\n\x0bparam_types\x18\x05 \x03(\x0b\x32\x34.google.spanner.v1.ExecuteSqlRequest.ParamTypesEntry\x12\x14\n\x0cresume_token\x18\x06 \x01(\x0c\x12\x42\n\nquery_mode\x18\x07 \x01(\x0e\x32..google.spanner.v1.ExecuteSqlRequest.QueryMode\x12\x17\n\x0fpartition_token\x18\x08 \x01(\x0c\x12\r\n\x05seqno\x18\t \x01(\x03\x12H\n\rquery_options\x18\n \x01(\x0b\x32\x31.google.spanner.v1.ExecuteSqlRequest.QueryOptions\x12:\n\x0frequest_options\x18\x0b \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x45\n\x15\x64irected_read_options\x18\x0f \x01(\x0b\x32&.google.spanner.v1.DirectedReadOptions\x12\x1a\n\x12\x64\x61ta_boost_enabled\x18\x10 \x01(\x08\x12\x1b\n\x0elast_statement\x18\x11 \x01(\x08\x42\x03\xe0\x41\x01\x12\x39\n\x0crouting_hint\x18\x12 \x01(\x0b\x32\x1e.google.spanner.v1.RoutingHintB\x03\xe0\x41\x01\x1aO\n\x0cQueryOptions\x12\x19\n\x11optimizer_version\x18\x01 \x01(\t\x12$\n\x1coptimizer_statistics_package\x18\x02 \x01(\t\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\"W\n\tQueryMode\x12\n\n\x06NORMAL\x10\x00\x12\x08\n\x04PLAN\x10\x01\x12\x0b\n\x07PROFILE\x10\x02\x12\x0e\n\nWITH_STATS\x10\x03\x12\x17\n\x13WITH_PLAN_AND_STATS\x10\x04\"\xbe\x04\n\x16\x45xecuteBatchDmlRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12@\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelectorB\x03\xe0\x41\x02\x12L\n\nstatements\x18\x03 \x03(\x0b\x32\x33.google.spanner.v1.ExecuteBatchDmlRequest.StatementB\x03\xe0\x41\x02\x12\x12\n\x05seqno\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02\x12:\n\x0frequest_options\x18\x05 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x1c\n\x0flast_statements\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xec\x01\n\tStatement\x12\x10\n\x03sql\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x06params\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12X\n\x0bparam_types\x18\x03 \x03(\x0b\x32\x43.google.spanner.v1.ExecuteBatchDmlRequest.Statement.ParamTypesEntry\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\"\xc3\x01\n\x17\x45xecuteBatchDmlResponse\x12\x31\n\x0bresult_sets\x18\x01 \x03(\x0b\x32\x1c.google.spanner.v1.ResultSet\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x12Q\n\x0fprecommit_token\x18\x03 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenB\x03\xe0\x41\x01\"H\n\x10PartitionOptions\x12\x1c\n\x14partition_size_bytes\x18\x01 \x01(\x03\x12\x16\n\x0emax_partitions\x18\x02 \x01(\x03\"\xad\x03\n\x15PartitionQueryRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x10\n\x03sql\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12,\n\x06params\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12R\n\x0bparam_types\x18\x05 \x03(\x0b\x32\x38.google.spanner.v1.PartitionQueryRequest.ParamTypesEntryB\x03\xe0\x41\x01\x12>\n\x11partition_options\x18\x06 \x01(\x0b\x32#.google.spanner.v1.PartitionOptions\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\"\xb1\x02\n\x14PartitionReadRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x12\n\x05table\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05index\x18\x04 \x01(\t\x12\x0f\n\x07\x63olumns\x18\x05 \x03(\t\x12/\n\x07key_set\x18\x06 \x01(\x0b\x32\x19.google.spanner.v1.KeySetB\x03\xe0\x41\x02\x12>\n\x11partition_options\x18\t \x01(\x0b\x32#.google.spanner.v1.PartitionOptions\"$\n\tPartition\x12\x17\n\x0fpartition_token\x18\x01 \x01(\x0c\"z\n\x11PartitionResponse\x12\x30\n\npartitions\x18\x01 \x03(\x0b\x32\x1c.google.spanner.v1.Partition\x12\x33\n\x0btransaction\x18\x02 \x01(\x0b\x32\x1e.google.spanner.v1.Transaction\"\xb1\x06\n\x0bReadRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x12\n\x05table\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05index\x18\x04 \x01(\t\x12\x14\n\x07\x63olumns\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12/\n\x07key_set\x18\x06 \x01(\x0b\x32\x19.google.spanner.v1.KeySetB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x08 \x01(\x03\x12\x14\n\x0cresume_token\x18\t \x01(\x0c\x12\x17\n\x0fpartition_token\x18\n \x01(\x0c\x12:\n\x0frequest_options\x18\x0b \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x45\n\x15\x64irected_read_options\x18\x0e \x01(\x0b\x32&.google.spanner.v1.DirectedReadOptions\x12\x1a\n\x12\x64\x61ta_boost_enabled\x18\x0f \x01(\x08\x12=\n\x08order_by\x18\x10 \x01(\x0e\x32&.google.spanner.v1.ReadRequest.OrderByB\x03\xe0\x41\x01\x12?\n\tlock_hint\x18\x11 \x01(\x0e\x32\'.google.spanner.v1.ReadRequest.LockHintB\x03\xe0\x41\x01\x12\x39\n\x0crouting_hint\x18\x12 \x01(\x0b\x32\x1e.google.spanner.v1.RoutingHintB\x03\xe0\x41\x01\"T\n\x07OrderBy\x12\x18\n\x14ORDER_BY_UNSPECIFIED\x10\x00\x12\x18\n\x14ORDER_BY_PRIMARY_KEY\x10\x01\x12\x15\n\x11ORDER_BY_NO_ORDER\x10\x02\"T\n\x08LockHint\x12\x19\n\x15LOCK_HINT_UNSPECIFIED\x10\x00\x12\x14\n\x10LOCK_HINT_SHARED\x10\x01\x12\x17\n\x13LOCK_HINT_EXCLUSIVE\x10\x02\"\xbe\x02\n\x17\x42\x65ginTransactionRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x07options\x18\x02 \x01(\x0b\x32%.google.spanner.v1.TransactionOptionsB\x03\xe0\x41\x02\x12:\n\x0frequest_options\x18\x03 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x36\n\x0cmutation_key\x18\x04 \x01(\x0b\x32\x1b.google.spanner.v1.MutationB\x03\xe0\x41\x01\x12\x39\n\x0crouting_hint\x18\x05 \x01(\x0b\x32\x1e.google.spanner.v1.RoutingHintB\x03\xe0\x41\x01\"\x8b\x04\n\rCommitRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12\x18\n\x0etransaction_id\x18\x02 \x01(\x0cH\x00\x12G\n\x16single_use_transaction\x18\x03 \x01(\x0b\x32%.google.spanner.v1.TransactionOptionsH\x00\x12.\n\tmutations\x18\x04 \x03(\x0b\x32\x1b.google.spanner.v1.Mutation\x12\x1b\n\x13return_commit_stats\x18\x05 \x01(\x08\x12\x38\n\x10max_commit_delay\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12:\n\x0frequest_options\x18\x06 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12Q\n\x0fprecommit_token\x18\t \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenB\x03\xe0\x41\x01\x12\x39\n\x0crouting_hint\x18\n \x01(\x0b\x32\x1e.google.spanner.v1.RoutingHintB\x03\xe0\x41\x01\x42\r\n\x0btransaction\"g\n\x0fRollbackRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12\x1b\n\x0etransaction_id\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"\xce\x02\n\x11\x42\x61tchWriteRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12:\n\x0frequest_options\x18\x03 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12P\n\x0fmutation_groups\x18\x04 \x03(\x0b\x32\x32.google.spanner.v1.BatchWriteRequest.MutationGroupB\x03\xe0\x41\x02\x12,\n\x1f\x65xclude_txn_from_change_streams\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x44\n\rMutationGroup\x12\x33\n\tmutations\x18\x01 \x03(\x0b\x32\x1b.google.spanner.v1.MutationB\x03\xe0\x41\x02\"\x7f\n\x12\x42\x61tchWriteResponse\x12\x0f\n\x07indexes\x18\x01 \x03(\x05\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x12\x34\n\x10\x63ommit_timestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x91\x01\n\x17\x46\x65tchCacheUpdateRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x1d\n\x10max_recipe_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0fmax_range_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x32\xc3\x19\n\x07Spanner\x12\xa6\x01\n\rCreateSession\x12\'.google.spanner.v1.CreateSessionRequest\x1a\x1a.google.spanner.v1.Session\"P\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02?\":/v1/{database=projects/*/instances/*/databases/*}/sessions:\x01*\x12\xe0\x01\n\x13\x42\x61tchCreateSessions\x12-.google.spanner.v1.BatchCreateSessionsRequest\x1a..google.spanner.v1.BatchCreateSessionsResponse\"j\xda\x41\x16\x64\x61tabase,session_count\x82\xd3\xe4\x93\x02K\"F/v1/{database=projects/*/instances/*/databases/*}/sessions:batchCreate:\x01*\x12\x97\x01\n\nGetSession\x12$.google.spanner.v1.GetSessionRequest\x1a\x1a.google.spanner.v1.Session\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/instances/*/databases/*/sessions/*}\x12\xae\x01\n\x0cListSessions\x12&.google.spanner.v1.ListSessionsRequest\x1a\'.google.spanner.v1.ListSessionsResponse\"M\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02<\x12:/v1/{database=projects/*/instances/*/databases/*}/sessions\x12\x99\x01\n\rDeleteSession\x12\'.google.spanner.v1.DeleteSessionRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/instances/*/databases/*/sessions/*}\x12\xa3\x01\n\nExecuteSql\x12$.google.spanner.v1.ExecuteSqlRequest\x1a\x1c.google.spanner.v1.ResultSet\"Q\x82\xd3\xe4\x93\x02K\"F/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql:\x01*\x12\xbe\x01\n\x13\x45xecuteStreamingSql\x12$.google.spanner.v1.ExecuteSqlRequest\x1a#.google.spanner.v1.PartialResultSet\"Z\x82\xd3\xe4\x93\x02T\"O/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeStreamingSql:\x01*0\x01\x12\xc0\x01\n\x0f\x45xecuteBatchDml\x12).google.spanner.v1.ExecuteBatchDmlRequest\x1a*.google.spanner.v1.ExecuteBatchDmlResponse\"V\x82\xd3\xe4\x93\x02P\"K/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeBatchDml:\x01*\x12\x91\x01\n\x04Read\x12\x1e.google.spanner.v1.ReadRequest\x1a\x1c.google.spanner.v1.ResultSet\"K\x82\xd3\xe4\x93\x02\x45\"@/v1/{session=projects/*/instances/*/databases/*/sessions/*}:read:\x01*\x12\xac\x01\n\rStreamingRead\x12\x1e.google.spanner.v1.ReadRequest\x1a#.google.spanner.v1.PartialResultSet\"T\x82\xd3\xe4\x93\x02N\"I/v1/{session=projects/*/instances/*/databases/*/sessions/*}:streamingRead:\x01*0\x01\x12\xc9\x01\n\x10\x42\x65ginTransaction\x12*.google.spanner.v1.BeginTransactionRequest\x1a\x1e.google.spanner.v1.Transaction\"i\xda\x41\x0fsession,options\x82\xd3\xe4\x93\x02Q\"L/v1/{session=projects/*/instances/*/databases/*/sessions/*}:beginTransaction:\x01*\x12\xeb\x01\n\x06\x43ommit\x12 .google.spanner.v1.CommitRequest\x1a!.google.spanner.v1.CommitResponse\"\x9b\x01\xda\x41 session,transaction_id,mutations\xda\x41(session,single_use_transaction,mutations\x82\xd3\xe4\x93\x02G\"B/v1/{session=projects/*/instances/*/databases/*/sessions/*}:commit:\x01*\x12\xb0\x01\n\x08Rollback\x12\".google.spanner.v1.RollbackRequest\x1a\x16.google.protobuf.Empty\"h\xda\x41\x16session,transaction_id\x82\xd3\xe4\x93\x02I\"D/v1/{session=projects/*/instances/*/databases/*/sessions/*}:rollback:\x01*\x12\xb7\x01\n\x0ePartitionQuery\x12(.google.spanner.v1.PartitionQueryRequest\x1a$.google.spanner.v1.PartitionResponse\"U\x82\xd3\xe4\x93\x02O\"J/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionQuery:\x01*\x12\xb4\x01\n\rPartitionRead\x12\'.google.spanner.v1.PartitionReadRequest\x1a$.google.spanner.v1.PartitionResponse\"T\x82\xd3\xe4\x93\x02N\"I/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionRead:\x01*\x12\xc8\x01\n\nBatchWrite\x12$.google.spanner.v1.BatchWriteRequest\x1a%.google.spanner.v1.BatchWriteResponse\"k\xda\x41\x17session,mutation_groups\x82\xd3\xe4\x93\x02K\"F/v1/{session=projects/*/instances/*/databases/*/sessions/*}:batchWrite:\x01*0\x01\x12\xb5\x01\n\x10\x46\x65tchCacheUpdate\x12*.google.spanner.v1.FetchCacheUpdateRequest\x1a\x1e.google.spanner.v1.CacheUpdate\"S\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x42\"=/v1/{database=projects/*/instances/*/databases/*}:cacheUpdate:\x01*0\x01\x1aw\xca\x41\x16spanner.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.dataB\x91\x02\n\x15\x63om.google.spanner.v1B\x0cSpannerProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1\xea\x41_\n\x1fspanner.googleapis.com/Database\x12\n\x0ftype_annotation\x18\x04 \x01(\x0e\x32%.google.spanner.v1.TypeAnnotationCode\x12\x16\n\x0eproto_type_fqn\x18\x05 \x01(\t\"\x7f\n\nStructType\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32#.google.spanner.v1.StructType.Field\x1a<\n\x05\x46ield\x12\x0c\n\x04name\x18\x01 \x01(\t\x12%\n\x04type\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type*\xdf\x01\n\x08TypeCode\x12\x19\n\x15TYPE_CODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\t\n\x05INT64\x10\x02\x12\x0b\n\x07\x46LOAT64\x10\x03\x12\x0b\n\x07\x46LOAT32\x10\x0f\x12\r\n\tTIMESTAMP\x10\x04\x12\x08\n\x04\x44\x41TE\x10\x05\x12\n\n\x06STRING\x10\x06\x12\t\n\x05\x42YTES\x10\x07\x12\t\n\x05\x41RRAY\x10\x08\x12\n\n\x06STRUCT\x10\t\x12\x0b\n\x07NUMERIC\x10\n\x12\x08\n\x04JSON\x10\x0b\x12\t\n\x05PROTO\x10\r\x12\x08\n\x04\x45NUM\x10\x0e\x12\x0c\n\x08INTERVAL\x10\x10\x12\x08\n\x04UUID\x10\x11*d\n\x12TypeAnnotationCode\x12$\n TYPE_ANNOTATION_CODE_UNSPECIFIED\x10\x00\x12\x0e\n\nPG_NUMERIC\x10\x02\x12\x0c\n\x08PG_JSONB\x10\x03\x12\n\n\x06PG_OID\x10\x04\x42\xac\x01\n\x15\x63om.google.spanner.v1B\tTypeProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Spanner + module V1 + Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Type").msgclass + StructType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.StructType").msgclass + StructType::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.StructType.Field").msgclass + TypeCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TypeCode").enummodule + TypeAnnotationCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TypeAnnotationCode").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/README.md new file mode 100644 index 000000000000..9e764966d911 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Spanner V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb new file mode 100644 index 000000000000..977e81d500bc --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb @@ -0,0 +1,488 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + # Spanner Change Streams enable customers to capture and stream out changes to + # their Spanner databases in real-time. A change stream + # can be created with option partition_mode='IMMUTABLE_KEY_RANGE' or + # partition_mode='MUTABLE_KEY_RANGE'. + # + # This message is only used in Change Streams created with the option + # partition_mode='MUTABLE_KEY_RANGE'. Spanner automatically creates a special + # Table-Valued Function (TVF) along with each Change Streams. The function + # provides access to the change stream's records. The function is named + # READ_ (where is the + # name of the change stream), and it returns a table with only one column + # called ChangeRecord. + # @!attribute [rw] data_change_record + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord] + # Data change record describing a data change for a change stream + # partition. + # + # Note: The following fields are mutually exclusive: `data_change_record`, `heartbeat_record`, `partition_start_record`, `partition_end_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] heartbeat_record + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::HeartbeatRecord] + # Heartbeat record describing a heartbeat for a change stream partition. + # + # Note: The following fields are mutually exclusive: `heartbeat_record`, `data_change_record`, `partition_start_record`, `partition_end_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] partition_start_record + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionStartRecord] + # Partition start record describing a new change stream partition. + # + # Note: The following fields are mutually exclusive: `partition_start_record`, `data_change_record`, `heartbeat_record`, `partition_end_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] partition_end_record + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEndRecord] + # Partition end record describing a terminated change stream partition. + # + # Note: The following fields are mutually exclusive: `partition_end_record`, `data_change_record`, `heartbeat_record`, `partition_start_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] partition_event_record + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord] + # Partition event record describing key range changes for a change stream + # partition. + # + # Note: The following fields are mutually exclusive: `partition_event_record`, `data_change_record`, `heartbeat_record`, `partition_start_record`, `partition_end_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ChangeStreamRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A data change record contains a set of changes to a table with the same + # modification type (insert, update, or delete) committed at the same commit + # timestamp in one change stream partition for the same transaction. Multiple + # data change records can be returned for the same transaction across + # multiple change stream partitions. + # @!attribute [rw] commit_timestamp + # @return [::Google::Protobuf::Timestamp] + # Indicates the timestamp in which the change was committed. + # DataChangeRecord.commit_timestamps, + # PartitionStartRecord.start_timestamps, + # PartitionEventRecord.commit_timestamps, and + # PartitionEndRecord.end_timestamps can have the same value in the same + # partition. + # @!attribute [rw] record_sequence + # @return [::String] + # Record sequence numbers are unique and monotonically increasing (but not + # necessarily contiguous) for a specific timestamp across record + # types in the same partition. To guarantee ordered processing, the reader + # should process records (of potentially different types) in + # record_sequence order for a specific timestamp in the same partition. + # + # The record sequence number ordering across partitions is only meaningful + # in the context of a specific transaction. Record sequence numbers are + # unique across partitions for a specific transaction. Sort the + # DataChangeRecords for the same + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#server_transaction_id server_transaction_id} + # by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#record_sequence record_sequence} + # to reconstruct the ordering of the changes within the transaction. + # @!attribute [rw] server_transaction_id + # @return [::String] + # Provides a globally unique string that represents the transaction in + # which the change was committed. Multiple transactions can have the same + # commit timestamp, but each transaction has a unique + # server_transaction_id. + # @!attribute [rw] is_last_record_in_transaction_in_partition + # @return [::Boolean] + # Indicates whether this is the last record for a transaction in the + # current partition. Clients can use this field to determine when all + # records for a transaction in the current partition have been received. + # @!attribute [rw] table + # @return [::String] + # Name of the table affected by the change. + # @!attribute [rw] column_metadata + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ColumnMetadata>] + # Provides metadata describing the columns associated with the + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#mods mods} listed + # below. + # @!attribute [rw] mods + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod>] + # Describes the changes that were made. + # @!attribute [rw] mod_type + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType] + # Describes the type of change. + # @!attribute [rw] value_capture_type + # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType] + # Describes the value capture type that was specified in the change stream + # configuration when this change was captured. + # @!attribute [rw] number_of_records_in_transaction + # @return [::Integer] + # Indicates the number of data change records that are part of this + # transaction across all change stream partitions. This value can be used + # to assemble all the records associated with a particular transaction. + # @!attribute [rw] number_of_partitions_in_transaction + # @return [::Integer] + # Indicates the number of partitions that return data change records for + # this transaction. This value can be helpful in assembling all records + # associated with a particular transaction. + # @!attribute [rw] transaction_tag + # @return [::String] + # Indicates the transaction tag associated with this transaction. + # @!attribute [rw] is_system_transaction + # @return [::Boolean] + # Indicates whether the transaction is a system transaction. System + # transactions include those issued by time-to-live (TTL), column backfill, + # etc. + class DataChangeRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metadata for a column. + # @!attribute [rw] name + # @return [::String] + # Name of the column. + # @!attribute [rw] type + # @return [::Google::Cloud::Spanner::V1::Type] + # Type of the column. + # @!attribute [rw] is_primary_key + # @return [::Boolean] + # Indicates whether the column is a primary key column. + # @!attribute [rw] ordinal_position + # @return [::Integer] + # Ordinal position of the column based on the original table definition + # in the schema starting with a value of 1. + class ColumnMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Returns the value and associated metadata for a particular field of the + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. + # @!attribute [rw] column_metadata_index + # @return [::Integer] + # Index within the repeated + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} + # field, to obtain the column metadata for the column that was modified. + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + # The value of the column. + class ModValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A mod describes all data changes in a watched table row. + # @!attribute [rw] keys + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] + # Returns the value of the primary key of the modified row. + # @!attribute [rw] old_values + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] + # Returns the old values before the change for the modified columns. + # Always empty for + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, + # or if old values are not being captured specified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. + # @!attribute [rw] new_values + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] + # Returns the new values after the change for the modified columns. + # Always empty for + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. + class Mod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Mod type describes the type of change Spanner applied to the data. For + # example, if the client submits an INSERT_OR_UPDATE request, Spanner will + # perform an insert if there is no existing row and return ModType INSERT. + # Alternatively, if there is an existing row, Spanner will perform an + # update and return ModType UPDATE. + module ModType + # Not specified. + MOD_TYPE_UNSPECIFIED = 0 + + # Indicates data was inserted. + INSERT = 10 + + # Indicates existing data was updated. + UPDATE = 20 + + # Indicates existing data was deleted. + DELETE = 30 + end + + # Value capture type describes which values are recorded in the data + # change record. + module ValueCaptureType + # Not specified. + VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 + + # Records both old and new values of the modified watched columns. + OLD_AND_NEW_VALUES = 10 + + # Records only new values of the modified watched columns. + NEW_VALUES = 20 + + # Records new values of all watched columns, including modified and + # unmodified columns. + NEW_ROW = 30 + + # Records the new values of all watched columns, including modified and + # unmodified columns. Also records the old values of the modified + # columns. + NEW_ROW_AND_OLD_VALUES = 40 + end + end + + # A heartbeat record is returned as a progress indicator, when there are no + # data changes or any other partition record types in the change stream + # partition. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # Indicates the timestamp at which the query has returned all the records + # in the change stream partition with timestamp <= heartbeat timestamp. + # The heartbeat timestamp will not be the same as the timestamps of other + # record types in the same partition. + class HeartbeatRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A partition start record serves as a notification that the client should + # schedule the partitions to be queried. PartitionStartRecord returns + # information about one or more partitions. + # @!attribute [rw] start_timestamp + # @return [::Google::Protobuf::Timestamp] + # Start timestamp at which the partitions should be queried to return + # change stream records with timestamps >= start_timestamp. + # DataChangeRecord.commit_timestamps, + # PartitionStartRecord.start_timestamps, + # PartitionEventRecord.commit_timestamps, and + # PartitionEndRecord.end_timestamps can have the same value in the same + # partition. + # @!attribute [rw] record_sequence + # @return [::String] + # Record sequence numbers are unique and monotonically increasing (but not + # necessarily contiguous) for a specific timestamp across record + # types in the same partition. To guarantee ordered processing, the reader + # should process records (of potentially different types) in + # record_sequence order for a specific timestamp in the same partition. + # @!attribute [rw] partition_tokens + # @return [::Array<::String>] + # Unique partition identifiers to be used in queries. + class PartitionStartRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A partition end record serves as a notification that the client should stop + # reading the partition. No further records are expected to be retrieved on + # it. + # @!attribute [rw] end_timestamp + # @return [::Google::Protobuf::Timestamp] + # End timestamp at which the change stream partition is terminated. All + # changes generated by this partition will have timestamps <= + # end_timestamp. DataChangeRecord.commit_timestamps, + # PartitionStartRecord.start_timestamps, + # PartitionEventRecord.commit_timestamps, and + # PartitionEndRecord.end_timestamps can have the same value in the same + # partition. PartitionEndRecord is the last record returned for a + # partition. + # @!attribute [rw] record_sequence + # @return [::String] + # Record sequence numbers are unique and monotonically increasing (but not + # necessarily contiguous) for a specific timestamp across record + # types in the same partition. To guarantee ordered processing, the reader + # should process records (of potentially different types) in + # record_sequence order for a specific timestamp in the same partition. + # @!attribute [rw] partition_token + # @return [::String] + # Unique partition identifier describing the terminated change stream + # partition. + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEndRecord#partition_token partition_token} + # is equal to the partition token of the change stream partition currently + # queried to return this PartitionEndRecord. + class PartitionEndRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A partition event record describes key range changes for a change stream + # partition. The changes to a row defined by its primary key can be captured + # in one change stream partition for a specific time range, and then be + # captured in a different change stream partition for a different time range. + # This movement of key ranges across change stream partitions is a reflection + # of activities, such as Spanner's dynamic splitting and load balancing, etc. + # Processing this event is needed if users want to guarantee processing of + # the changes for any key in timestamp order. If time ordered processing of + # changes for a primary key is not needed, this event can be ignored. + # To guarantee time ordered processing for each primary key, if the event + # describes move-ins, the reader of this partition needs to wait until the + # readers of the source partitions have processed all records with timestamps + # <= this PartitionEventRecord.commit_timestamp, before advancing beyond this + # PartitionEventRecord. If the event describes move-outs, the reader can + # notify the readers of the destination partitions that they can continue + # processing. + # @!attribute [rw] commit_timestamp + # @return [::Google::Protobuf::Timestamp] + # Indicates the commit timestamp at which the key range change occurred. + # DataChangeRecord.commit_timestamps, + # PartitionStartRecord.start_timestamps, + # PartitionEventRecord.commit_timestamps, and + # PartitionEndRecord.end_timestamps can have the same value in the same + # partition. + # @!attribute [rw] record_sequence + # @return [::String] + # Record sequence numbers are unique and monotonically increasing (but not + # necessarily contiguous) for a specific timestamp across record + # types in the same partition. To guarantee ordered processing, the reader + # should process records (of potentially different types) in + # record_sequence order for a specific timestamp in the same partition. + # @!attribute [rw] partition_token + # @return [::String] + # Unique partition identifier describing the partition this event + # occurred on. + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token} + # is equal to the partition token of the change stream partition currently + # queried to return this PartitionEventRecord. + # @!attribute [rw] move_in_events + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord::MoveInEvent>] + # Set when one or more key ranges are moved into the change stream + # partition identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. + # + # Example: Two key ranges are moved into partition (P1) from partition (P2) + # and partition (P3) in a single transaction at timestamp T. + # + # The PartitionEventRecord returned in P1 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P1" + # move_in_events { + # source_partition_token: "P2" + # } + # move_in_events { + # source_partition_token: "P3" + # } + # } + # + # The PartitionEventRecord returned in P2 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P2" + # move_out_events { + # destination_partition_token: "P1" + # } + # } + # + # The PartitionEventRecord returned in P3 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P3" + # move_out_events { + # destination_partition_token: "P1" + # } + # } + # @!attribute [rw] move_out_events + # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord::MoveOutEvent>] + # Set when one or more key ranges are moved out of the change stream + # partition identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. + # + # Example: Two key ranges are moved out of partition (P1) to partition (P2) + # and partition (P3) in a single transaction at timestamp T. + # + # The PartitionEventRecord returned in P1 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P1" + # move_out_events { + # destination_partition_token: "P2" + # } + # move_out_events { + # destination_partition_token: "P3" + # } + # } + # + # The PartitionEventRecord returned in P2 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P2" + # move_in_events { + # source_partition_token: "P1" + # } + # } + # + # The PartitionEventRecord returned in P3 will reflect the move as: + # + # PartitionEventRecord { + # commit_timestamp: T + # partition_token: "P3" + # move_in_events { + # source_partition_token: "P1" + # } + # } + class PartitionEventRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes move-in of the key ranges into the change stream partition + # identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. + # + # To maintain processing the changes for a particular key in timestamp + # order, the query processing the change stream partition identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token} + # should not advance beyond the partition event record commit timestamp + # until the queries processing the source change stream partitions have + # processed all change stream records with timestamps <= the partition + # event record commit timestamp. + # @!attribute [rw] source_partition_token + # @return [::String] + # An unique partition identifier describing the source change stream + # partition that recorded changes for the key range that is moving + # into this partition. + class MoveInEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes move-out of the key ranges out of the change stream partition + # identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. + # + # To maintain processing the changes for a particular key in timestamp + # order, the query processing the + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord::MoveOutEvent MoveOutEvent} + # in the partition identified by + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token} + # should inform the queries processing the destination partitions that + # they can unblock and proceed processing records past the + # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#commit_timestamp commit_timestamp}. + # @!attribute [rw] destination_partition_token + # @return [::String] + # An unique partition identifier describing the destination change + # stream partition that will record changes for the key range that is + # moving out of this partition. + class MoveOutEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb new file mode 100644 index 000000000000..38ab0bf66244 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + # The response for {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit}. + # @!attribute [rw] commit_timestamp + # @return [::Google::Protobuf::Timestamp] + # The Cloud Spanner timestamp at which the transaction committed. + # @!attribute [rw] commit_stats + # @return [::Google::Cloud::Spanner::V1::CommitResponse::CommitStats] + # The statistics about this `Commit`. Not returned by default. + # For more information, see + # {::Google::Cloud::Spanner::V1::CommitRequest#return_commit_stats CommitRequest.return_commit_stats}. + # @!attribute [rw] precommit_token + # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] + # If specified, transaction has not committed yet. + # You must retry the commit with the new precommit token. + # @!attribute [rw] snapshot_timestamp + # @return [::Google::Protobuf::Timestamp] + # If `TransactionOptions.isolation_level` is set to + # `IsolationLevel.REPEATABLE_READ`, then the snapshot timestamp is the + # timestamp at which all reads in the transaction ran. This timestamp is + # never returned. + # @!attribute [rw] cache_update + # @return [::Google::Cloud::Spanner::V1::CacheUpdate] + # Optional. A cache update expresses a set of changes the client should + # incorporate into its location cache. The client should discard the changes + # if they are older than the data it already has. This data can be obtained + # in response to requests that included a `RoutingHint` field, but may also + # be obtained by explicit location-fetching RPCs which may be added in the + # future. + # @!attribute [rw] isolation_level + # @return [::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel] + # The isolation level used for the read-write transaction. + # @!attribute [rw] read_lock_mode + # @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite::ReadLockMode] + # The read lock mode used for the read-write transaction. + class CommitResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional statistics about a commit. + # @!attribute [rw] mutation_count + # @return [::Integer] + # The total number of mutations for the transaction. Knowing the + # `mutation_count` value can help you maximize the number of mutations + # in a transaction and minimize the number of API round trips. You can + # also monitor this value to prevent transactions from exceeding the system + # [limit](https://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data). + # If the number of mutations exceeds the limit, the server returns + # [INVALID_ARGUMENT](https://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT). + class CommitStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/keys.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/keys.rb new file mode 100644 index 000000000000..5faebc2232ef --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/keys.rb @@ -0,0 +1,170 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + # KeyRange represents a range of rows in a table or index. + # + # A range has a start key and an end key. These keys can be open or + # closed, indicating if the range includes rows with that key. + # + # Keys are represented by lists, where the ith value in the list + # corresponds to the ith component of the table or index primary key. + # Individual values are encoded as described + # {::Google::Cloud::Spanner::V1::TypeCode here}. + # + # For example, consider the following table definition: + # + # CREATE TABLE UserEvents ( + # UserName STRING(MAX), + # EventDate STRING(10) + # ) PRIMARY KEY(UserName, EventDate); + # + # The following keys name rows in this table: + # + # ["Bob", "2014-09-23"] + # ["Alfred", "2015-06-12"] + # + # Since the `UserEvents` table's `PRIMARY KEY` clause names two + # columns, each `UserEvents` key has two elements; the first is the + # `UserName`, and the second is the `EventDate`. + # + # Key ranges with multiple components are interpreted + # lexicographically by component using the table or index key's declared + # sort order. For example, the following range returns all events for + # user `"Bob"` that occurred in the year 2015: + # + # "start_closed": ["Bob", "2015-01-01"] + # "end_closed": ["Bob", "2015-12-31"] + # + # Start and end keys can omit trailing key components. This affects the + # inclusion and exclusion of rows that exactly match the provided key + # components: if the key is closed, then rows that exactly match the + # provided components are included; if the key is open, then rows + # that exactly match are not included. + # + # For example, the following range includes all events for `"Bob"` that + # occurred during and after the year 2000: + # + # "start_closed": ["Bob", "2000-01-01"] + # "end_closed": ["Bob"] + # + # The next example retrieves all events for `"Bob"`: + # + # "start_closed": ["Bob"] + # "end_closed": ["Bob"] + # + # To retrieve events before the year 2000: + # + # "start_closed": ["Bob"] + # "end_open": ["Bob", "2000-01-01"] + # + # The following range includes all rows in the table: + # + # "start_closed": [] + # "end_closed": [] + # + # This range returns all users whose `UserName` begins with any + # character from A to C: + # + # "start_closed": ["A"] + # "end_open": ["D"] + # + # This range returns all users whose `UserName` begins with B: + # + # "start_closed": ["B"] + # "end_open": ["C"] + # + # Key ranges honor column sort order. For example, suppose a table is + # defined as follows: + # + # CREATE TABLE DescendingSortedTable { + # Key INT64, + # ... + # ) PRIMARY KEY(Key DESC); + # + # The following range retrieves all rows with key values between 1 + # and 100 inclusive: + # + # "start_closed": ["100"] + # "end_closed": ["1"] + # + # Note that 100 is passed as the start, and 1 is passed as the end, + # because `Key` is a descending column in the schema. + # @!attribute [rw] start_closed + # @return [::Google::Protobuf::ListValue] + # If the start is closed, then the range includes all rows whose + # first `len(start_closed)` key columns exactly match `start_closed`. + # + # Note: The following fields are mutually exclusive: `start_closed`, `start_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] start_open + # @return [::Google::Protobuf::ListValue] + # If the start is open, then the range excludes rows whose first + # `len(start_open)` key columns exactly match `start_open`. + # + # Note: The following fields are mutually exclusive: `start_open`, `start_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] end_closed + # @return [::Google::Protobuf::ListValue] + # If the end is closed, then the range includes all rows whose + # first `len(end_closed)` key columns exactly match `end_closed`. + # + # Note: The following fields are mutually exclusive: `end_closed`, `end_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] end_open + # @return [::Google::Protobuf::ListValue] + # If the end is open, then the range excludes rows whose first + # `len(end_open)` key columns exactly match `end_open`. + # + # Note: The following fields are mutually exclusive: `end_open`, `end_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class KeyRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All + # the keys are expected to be in the same table or index. The keys need + # not be sorted in any particular way. + # + # If the same key is specified multiple times in the set (for example + # if two ranges, two keys, or a key and a range overlap), Cloud Spanner + # behaves as if the key were only specified once. + # @!attribute [rw] keys + # @return [::Array<::Google::Protobuf::ListValue>] + # A list of specific keys. Entries in `keys` should have exactly as + # many elements as there are columns in the primary or index key + # with which this `KeySet` is used. Individual key values are + # encoded as described {::Google::Cloud::Spanner::V1::TypeCode here}. + # @!attribute [rw] ranges + # @return [::Array<::Google::Cloud::Spanner::V1::KeyRange>] + # A list of key ranges. See {::Google::Cloud::Spanner::V1::KeyRange KeyRange} for more + # information about key range specifications. + # @!attribute [rw] all + # @return [::Boolean] + # For convenience `all` can be set to `true` to indicate that this + # `KeySet` matches all keys in the table or index. Note that any keys + # specified in `keys` or `ranges` are only yielded once. + class KeySet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/location.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/location.rb new file mode 100644 index 000000000000..d79971bad844 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/location.rb @@ -0,0 +1,417 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + # A `Range` represents a range of keys in a database. The keys themselves + # are encoded in "sortable string format", also known as ssformat. Consult + # Spanner's open source client libraries for details on the encoding. + # + # Each range represents a contiguous range of rows, possibly from multiple + # tables/indexes. Each range is associated with a single paxos group (known as + # a "group" throughout this API), a split (which names the exact range within + # the group), and a generation that can be used to determine whether a given + # `Range` represents a newer or older location for the key range. + # @!attribute [rw] start_key + # @return [::String] + # The start key of the range, inclusive. Encoded in "sortable string format" + # (ssformat). + # @!attribute [rw] limit_key + # @return [::String] + # The limit key of the range, exclusive. Encoded in "sortable string format" + # (ssformat). + # @!attribute [rw] group_uid + # @return [::Integer] + # The UID of the paxos group where this range is stored. UIDs are unique + # within the database. References `Group.group_uid`. + # @!attribute [rw] split_id + # @return [::Integer] + # A group can store multiple ranges of keys. Each key range is named by an + # ID (the split ID). Within a group, split IDs are unique. The `split_id` + # names the exact split in `group_uid` where this range is stored. + # @!attribute [rw] generation + # @return [::String] + # `generation` indicates the freshness of the range information contained + # in this proto. Generations can be compared lexicographically; if generation + # A is greater than generation B, then the `Range` corresponding to A is + # newer than the `Range` corresponding to B, and should be used + # preferentially. + class Range + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A `Tablet` represents a single replica of a `Group`. A tablet is served by a + # single server at a time, and can move between servers due to server death or + # simply load balancing. + # @!attribute [rw] tablet_uid + # @return [::Integer] + # The UID of the tablet, unique within the database. Matches the + # `tablet_uids` and `leader_tablet_uid` fields in `Group`. + # @!attribute [rw] server_address + # @return [::String] + # The address of the server that is serving this tablet -- either an IP + # address or DNS hostname and a port number. + # @!attribute [rw] location + # @return [::String] + # Where this tablet is located. This is the name of a Google Cloud region, + # such as "us-central1". + # @!attribute [rw] role + # @return [::Google::Cloud::Spanner::V1::Tablet::Role] + # The role of the tablet. + # @!attribute [rw] incarnation + # @return [::String] + # `incarnation` indicates the freshness of the tablet information contained + # in this proto. Incarnations can be compared lexicographically; if + # incarnation A is greater than incarnation B, then the `Tablet` + # corresponding to A is newer than the `Tablet` corresponding to B, and + # should be used preferentially. + # @!attribute [rw] distance + # @return [::Integer] + # Distances help the client pick the closest tablet out of the list of + # tablets for a given request. Tablets with lower distances should generally + # be preferred. Tablets with the same distance are approximately equally + # close; the client can choose arbitrarily. + # + # Distances do not correspond precisely to expected latency, geographical + # distance, or anything else. Distances should be compared only between + # tablets of the same group; they are not meaningful between different + # groups. + # + # A value of zero indicates that the tablet may be in the same zone as + # the client, and have minimum network latency. A value less than or equal to + # five indicates that the tablet is thought to be in the same region as the + # client, and may have a few milliseconds of network latency. Values greater + # than five are most likely in a different region, with non-trivial network + # latency. + # + # Clients should use the following algorithm: + # * If the request is using a directed read, eliminate any tablets that + # do not match the directed read's target zone and/or replica type. + # * (Read-write transactions only) Choose leader tablet if it has an + # distance <=5. + # * Group and sort tablets by distance. Choose a random + # tablet with the lowest distance. If the request + # is not a directed read, only consider replicas with distances <=5. + # * Send the request to the fallback endpoint. + # + # The tablet picked by this algorithm may be skipped, either because it is + # marked as `skip` by the server or because the corresponding server is + # unreachable, flow controlled, etc. Skipped tablets should be added to the + # `skipped_tablet_uid` field in `RoutingHint`; the algorithm above should + # then be re-run without including the skipped tablet(s) to pick the next + # best tablet. + # @!attribute [rw] skip + # @return [::Boolean] + # If true, the tablet should not be chosen by the client. Typically, this + # signals that the tablet is unhealthy in some way. Tablets with `skip` + # set to true should be reported back to the server in + # `RoutingHint.skipped_tablet_uid`; this cues the server to send updated + # information for this tablet should it become usable again. + class Tablet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates the role of the tablet. + module Role + # Not specified. + ROLE_UNSPECIFIED = 0 + + # The tablet can perform reads and (if elected leader) writes. + READ_WRITE = 1 + + # The tablet can only perform reads. + READ_ONLY = 2 + end + end + + # A `Group` represents a paxos group in a database. A group is a set of + # tablets that are replicated across multiple servers. Groups may have a leader + # tablet. Groups store one (or sometimes more) ranges of keys. + # @!attribute [rw] group_uid + # @return [::Integer] + # The UID of the paxos group, unique within the database. Matches the + # `group_uid` field in `Range`. + # @!attribute [rw] tablets + # @return [::Array<::Google::Cloud::Spanner::V1::Tablet>] + # A list of tablets that are part of the group. Note that this list may not + # be exhaustive; it will only include tablets the server considers useful + # to the client. The returned list is ordered ascending by distance. + # + # Tablet UIDs reference `Tablet.tablet_uid`. + # @!attribute [rw] leader_index + # @return [::Integer] + # The last known leader tablet of the group as an index into `tablets`. May + # be negative if the group has no known leader. + # @!attribute [rw] generation + # @return [::String] + # `generation` indicates the freshness of the group information (including + # leader information) contained in this proto. Generations can be compared + # lexicographically; if generation A is greater than generation B, then the + # `Group` corresponding to A is newer than the `Group` corresponding to B, + # and should be used preferentially. + class Group + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A `KeyRecipe` provides the metadata required to translate reads, mutations, + # and queries into a byte array in "sortable string format" (ssformat)that can + # be used with `Range`s to route requests. Note that the client *must* tolerate + # `KeyRecipe`s that appear to be invalid, since the `KeyRecipe` format may + # change over time. Requests with invalid `KeyRecipe`s should be routed to a + # default server. + # @!attribute [rw] table_name + # @return [::String] + # A table name, matching the name from the database schema. + # + # Note: The following fields are mutually exclusive: `table_name`, `index_name`, `operation_uid`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] index_name + # @return [::String] + # An index name, matching the name from the database schema. + # + # Note: The following fields are mutually exclusive: `index_name`, `table_name`, `operation_uid`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] operation_uid + # @return [::Integer] + # The UID of a query, matching the UID from `RoutingHint`. + # + # Note: The following fields are mutually exclusive: `operation_uid`, `table_name`, `index_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] part + # @return [::Array<::Google::Cloud::Spanner::V1::KeyRecipe::Part>] + # Parts are in the order they should appear in the encoded key. + class KeyRecipe + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An ssformat key is composed of a sequence of tag numbers and key column + # values. `Part` represents a single tag or key column value. + # @!attribute [rw] tag + # @return [::Integer] + # If non-zero, `tag` is the only field present in this `Part`. The part + # is encoded by appending `tag` to the ssformat key. + # @!attribute [rw] order + # @return [::Google::Cloud::Spanner::V1::KeyRecipe::Part::Order] + # Whether the key column is sorted ascending or descending. Only present + # if `tag` is zero. + # @!attribute [rw] null_order + # @return [::Google::Cloud::Spanner::V1::KeyRecipe::Part::NullOrder] + # How NULLs are represented in the encoded key part. Only present if `tag` + # is zero. + # @!attribute [rw] type + # @return [::Google::Cloud::Spanner::V1::Type] + # The type of the key part. Only present if `tag` is zero. + # @!attribute [rw] identifier + # @return [::String] + # `identifier` is the name of the column or query parameter. + # + # Note: The following fields are mutually exclusive: `identifier`, `value`, `random`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + # The constant value of the key part. + # It is present when query uses a constant as a part of the key. + # + # Note: The following fields are mutually exclusive: `value`, `identifier`, `random`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] random + # @return [::Boolean] + # If true, the client is responsible to fill in the value randomly. + # It's relevant only for the INT64 type. + # + # Note: The following fields are mutually exclusive: `random`, `identifier`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_identifiers + # @return [::Array<::Integer>] + # It is a repeated field to support fetching key columns from nested + # structs, such as `STRUCT` query parameters. + class Part + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The remaining fields encode column values. + module Order + # Default value, equivalent to `ASCENDING`. + ORDER_UNSPECIFIED = 0 + + # The key is ascending - corresponds to `ASC` in the schema definition. + ASCENDING = 1 + + # The key is descending - corresponds to `DESC` in the schema definition. + DESCENDING = 2 + end + + # The null order of the key column. This dictates where NULL values sort + # in the sorted order. Note that columns which are `NOT NULL` can have a + # special encoding. + module NullOrder + # Default value. This value is unused. + NULL_ORDER_UNSPECIFIED = 0 + + # NULL values sort before any non-NULL values. + NULLS_FIRST = 1 + + # NULL values sort after any non-NULL values. + NULLS_LAST = 2 + + # The column does not support NULL values. + NOT_NULL = 3 + end + end + end + + # A `RecipeList` contains a list of `KeyRecipe`s, which share the same + # schema generation. + # @!attribute [rw] schema_generation + # @return [::String] + # The schema generation of the recipes. To be sent to the server in + # `RoutingHint.schema_generation` whenever one of the recipes is used. + # `schema_generation` values are comparable with each other; if generation A + # compares greater than generation B, then A is a more recent schema than B. + # Clients should in general aim to cache only the latest schema generation, + # and discard more stale recipes. + # @!attribute [rw] recipe + # @return [::Array<::Google::Cloud::Spanner::V1::KeyRecipe>] + # A list of recipes to be cached. + class RecipeList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A `CacheUpdate` expresses a set of changes the client should incorporate into + # its location cache. These changes may or may not be newer than what the + # client has in its cache, and should be discarded if necessary. `CacheUpdate`s + # can be obtained in response to requests that included a `RoutingHint` + # field, but may also be obtained by explicit location-fetching RPCs which may + # be added in the future. + # @!attribute [rw] database_id + # @return [::Integer] + # An internal ID for the database. Database names can be reused if a database + # is deleted and re-created. Each time the database is re-created, it will + # get a new database ID, which will never be re-used for any other database. + # @!attribute [rw] range + # @return [::Array<::Google::Cloud::Spanner::V1::Range>] + # A list of ranges to be cached. + # @!attribute [rw] group + # @return [::Array<::Google::Cloud::Spanner::V1::Group>] + # A list of groups to be cached. + # @!attribute [rw] key_recipes + # @return [::Google::Cloud::Spanner::V1::RecipeList] + # A list of recipes to be cached. + class CacheUpdate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `RoutingHint` can be optionally added to location-aware Spanner + # requests. It gives the server hints that can be used to route the request to + # an appropriate server, potentially significantly decreasing latency and + # improving throughput. To achieve improved performance, most fields must be + # filled in with accurate values. + # + # The presence of a valid `RoutingHint` tells the server that the client + # is location-aware. + # + # `RoutingHint` does not change the semantics of the request; it is + # purely a performance hint; the request will perform the same actions on the + # database's data as if `RoutingHint` were not present. However, if + # the `RoutingHint` is incomplete or incorrect, the response may include + # a `CacheUpdate` the client can use to correct its location cache. + # @!attribute [rw] operation_uid + # @return [::Integer] + # A session-scoped unique ID for the operation, computed client-side. + # Requests with the same `operation_uid` should have a shared 'shape', + # meaning that some fields are expected to be the same, such as the SQL + # query, the target table/columns (for reads) etc. Requests with the same + # `operation_uid` are meant to differ only in fields like keys/key + # ranges/query parameters, transaction IDs, etc. + # + # `operation_uid` must be non-zero for `RoutingHint` to be valid. + # @!attribute [rw] database_id + # @return [::Integer] + # The database ID of the database being accessed, see + # `CacheUpdate.database_id`. Should match the cache entries that were used + # to generate the rest of the fields in this `RoutingHint`. + # @!attribute [rw] schema_generation + # @return [::String] + # The schema generation of the recipe that was used to generate `key` and + # `limit_key`. See also `RecipeList.schema_generation`. + # @!attribute [rw] key + # @return [::String] + # The key / key range that this request accesses. For operations that + # access a single key, `key` should be set and `limit_key` should be empty. + # For operations that access a key range, `key` and `limit_key` should both + # be set, to the inclusive start and exclusive end of the range respectively. + # + # The keys are encoded in "sortable string format" (ssformat), using a + # `KeyRecipe` that is appropriate for the request. See `KeyRecipe` for more + # details. + # @!attribute [rw] limit_key + # @return [::String] + # If this request targets a key range, this is the exclusive end of the + # range. See `key` for more details. + # @!attribute [rw] group_uid + # @return [::Integer] + # The group UID of the group that the client believes serves the range + # defined by `key` and `limit_key`. See `Range.group_uid` for more details. + # @!attribute [rw] split_id + # @return [::Integer] + # The split ID of the split that the client believes contains the range + # defined by `key` and `limit_key`. See `Range.split_id` for more details. + # @!attribute [rw] tablet_uid + # @return [::Integer] + # The tablet UID of the tablet from group `group_uid` that the client + # believes is best to serve this request. See `Group.local_tablet_uids` and + # `Group.leader_tablet_uid`. + # @!attribute [rw] skipped_tablet_uid + # @return [::Array<::Google::Cloud::Spanner::V1::RoutingHint::SkippedTablet>] + # If the client had multiple options for tablet selection, and some of its + # first choices were unhealthy (e.g., the server is unreachable, or + # `Tablet.skip` is true), this field will contain the tablet UIDs of those + # tablets, with their incarnations. The server may include a `CacheUpdate` + # with new locations for those tablets. + # @!attribute [rw] client_location + # @return [::String] + # If present, the client's current location. This should be the name of a + # Google Cloud zone or region, such as "us-central1". + # + # If absent, the client's location will be assumed to be the same as the + # location of the server the client ends up connected to. + # + # Locations are primarily valuable for clients that connect from regions + # other than the ones that contain the Spanner database. + class RoutingHint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A tablet that was skipped by the client. See `Tablet.tablet_uid` and + # `Tablet.incarnation`. + # @!attribute [rw] tablet_uid + # @return [::Integer] + # The tablet UID of the tablet that was skipped. See `Tablet.tablet_uid`. + # @!attribute [rw] incarnation + # @return [::String] + # The incarnation of the tablet that was skipped. See `Tablet.incarnation`. + class SkippedTablet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/mutation.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/mutation.rb new file mode 100644 index 000000000000..5c0d3caa5bb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/mutation.rb @@ -0,0 +1,178 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + # A modification to one or more Cloud Spanner rows. Mutations can be + # applied to a Cloud Spanner database by sending them in a + # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} call. + # @!attribute [rw] insert + # @return [::Google::Cloud::Spanner::V1::Mutation::Write] + # Insert new rows in a table. If any of the rows already exist, + # the write or transaction fails with error `ALREADY_EXISTS`. + # + # Note: The following fields are mutually exclusive: `insert`, `update`, `insert_or_update`, `replace`, `delete`, `send`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] update + # @return [::Google::Cloud::Spanner::V1::Mutation::Write] + # Update existing rows in a table. If any of the rows does not + # already exist, the transaction fails with error `NOT_FOUND`. + # + # Note: The following fields are mutually exclusive: `update`, `insert`, `insert_or_update`, `replace`, `delete`, `send`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] insert_or_update + # @return [::Google::Cloud::Spanner::V1::Mutation::Write] + # Like {::Google::Cloud::Spanner::V1::Mutation#insert insert}, except that if the row + # already exists, then its column values are overwritten with the ones + # provided. Any column values not explicitly written are preserved. + # + # When using + # {::Google::Cloud::Spanner::V1::Mutation#insert_or_update insert_or_update}, just as + # when using {::Google::Cloud::Spanner::V1::Mutation#insert insert}, all `NOT NULL` + # columns in the table must be given a value. This holds true even when the + # row already exists and will therefore actually be updated. + # + # Note: The following fields are mutually exclusive: `insert_or_update`, `insert`, `update`, `replace`, `delete`, `send`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] replace + # @return [::Google::Cloud::Spanner::V1::Mutation::Write] + # Like {::Google::Cloud::Spanner::V1::Mutation#insert insert}, except that if the row + # already exists, it is deleted, and the column values provided are + # inserted instead. Unlike + # {::Google::Cloud::Spanner::V1::Mutation#insert_or_update insert_or_update}, this + # means any values not explicitly written become `NULL`. + # + # In an interleaved table, if you create the child table with the + # `ON DELETE CASCADE` annotation, then replacing a parent row + # also deletes the child rows. Otherwise, you must delete the + # child rows before you replace the parent row. + # + # Note: The following fields are mutually exclusive: `replace`, `insert`, `update`, `insert_or_update`, `delete`, `send`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] delete + # @return [::Google::Cloud::Spanner::V1::Mutation::Delete] + # Delete rows from a table. Succeeds whether or not the named + # rows were present. + # + # Note: The following fields are mutually exclusive: `delete`, `insert`, `update`, `insert_or_update`, `replace`, `send`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] send + # @return [::Google::Cloud::Spanner::V1::Mutation::Send] + # Send a message to a queue. + # + # Note: The following fields are mutually exclusive: `send`, `insert`, `update`, `insert_or_update`, `replace`, `delete`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ack + # @return [::Google::Cloud::Spanner::V1::Mutation::Ack] + # Ack a message from a queue. + # + # Note: The following fields are mutually exclusive: `ack`, `insert`, `update`, `insert_or_update`, `replace`, `delete`, `send`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Mutation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Arguments to {::Google::Cloud::Spanner::V1::Mutation#insert insert}, + # {::Google::Cloud::Spanner::V1::Mutation#update update}, + # {::Google::Cloud::Spanner::V1::Mutation#insert_or_update insert_or_update}, and + # {::Google::Cloud::Spanner::V1::Mutation#replace replace} operations. + # @!attribute [rw] table + # @return [::String] + # Required. The table whose rows will be written. + # @!attribute [rw] columns + # @return [::Array<::String>] + # The names of the columns in + # {::Google::Cloud::Spanner::V1::Mutation::Write#table table} to be written. + # + # The list of columns must contain enough columns to allow + # Cloud Spanner to derive values for all primary key columns in the + # row(s) to be modified. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::ListValue>] + # The values to be written. `values` can contain more than one + # list of values. If it does, then multiple rows are written, one + # for each entry in `values`. Each list in `values` must have + # exactly as many entries as there are entries in + # {::Google::Cloud::Spanner::V1::Mutation::Write#columns columns} above. Sending + # multiple lists is equivalent to sending multiple `Mutation`s, each + # containing one `values` entry and repeating + # {::Google::Cloud::Spanner::V1::Mutation::Write#table table} and + # {::Google::Cloud::Spanner::V1::Mutation::Write#columns columns}. Individual values in + # each list are encoded as described {::Google::Cloud::Spanner::V1::TypeCode here}. + class Write + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Arguments to {::Google::Cloud::Spanner::V1::Mutation#delete delete} operations. + # @!attribute [rw] table + # @return [::String] + # Required. The table whose rows will be deleted. + # @!attribute [rw] key_set + # @return [::Google::Cloud::Spanner::V1::KeySet] + # Required. The primary keys of the rows within + # {::Google::Cloud::Spanner::V1::Mutation::Delete#table table} to delete. The primary + # keys must be specified in the order in which they appear in the `PRIMARY + # KEY()` clause of the table's equivalent DDL statement (the DDL statement + # used to create the table). Delete is idempotent. The transaction will + # succeed even if some or all rows do not exist. + class Delete + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Arguments to {::Google::Cloud::Spanner::V1::Mutation#send send} operations. + # @!attribute [rw] queue + # @return [::String] + # Required. The queue to which the message will be sent. + # @!attribute [rw] key + # @return [::Google::Protobuf::ListValue] + # Required. The primary key of the message to be sent. + # @!attribute [rw] deliver_time + # @return [::Google::Protobuf::Timestamp] + # The time at which Spanner will begin attempting to deliver the message. + # If `deliver_time` is not set, Spanner will deliver the message + # immediately. If `deliver_time` is in the past, Spanner will replace it + # with a value closer to the current time. + # @!attribute [rw] payload + # @return [::Google::Protobuf::Value] + # The payload of the message. + class Send + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Arguments to {::Google::Cloud::Spanner::V1::Mutation#ack ack} operations. + # @!attribute [rw] queue + # @return [::String] + # Required. The queue where the message to be acked is stored. + # @!attribute [rw] key + # @return [::Google::Protobuf::ListValue] + # Required. The primary key of the message to be acked. + # @!attribute [rw] ignore_not_found + # @return [::Boolean] + # By default, an attempt to ack a message that does not exist will fail + # with a `NOT_FOUND` error. With `ignore_not_found` set to true, the ack + # will succeed even if the message does not exist. This is useful for + # unconditionally acking a message, even if it is missing or has already + # been acked. + class Ack + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/query_plan.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/query_plan.rb new file mode 100644 index 000000000000..a213c6fbe1d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/query_plan.rb @@ -0,0 +1,180 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + # Node information for nodes appearing in a + # {::Google::Cloud::Spanner::V1::QueryPlan#plan_nodes QueryPlan.plan_nodes}. + # @!attribute [rw] index + # @return [::Integer] + # The `PlanNode`'s index in [node + # list][google.spanner.v1.QueryPlan.plan_nodes]. + # @!attribute [rw] kind + # @return [::Google::Cloud::Spanner::V1::PlanNode::Kind] + # Used to determine the type of node. May be needed for visualizing + # different kinds of nodes differently. For example, If the node is a + # {::Google::Cloud::Spanner::V1::PlanNode::Kind::SCALAR SCALAR} node, it will have a + # condensed representation which can be used to directly embed a description + # of the node in its parent. + # @!attribute [rw] display_name + # @return [::String] + # The display name for the node. + # @!attribute [rw] child_links + # @return [::Array<::Google::Cloud::Spanner::V1::PlanNode::ChildLink>] + # List of child node `index`es and their relationship to this parent. + # @!attribute [rw] short_representation + # @return [::Google::Cloud::Spanner::V1::PlanNode::ShortRepresentation] + # Condensed representation for + # {::Google::Cloud::Spanner::V1::PlanNode::Kind::SCALAR SCALAR} nodes. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Struct] + # Attributes relevant to the node contained in a group of key-value pairs. + # For example, a Parameter Reference node could have the following + # information in its metadata: + # + # { + # "parameter_reference": "param1", + # "parameter_type": "array" + # } + # @!attribute [rw] execution_stats + # @return [::Google::Protobuf::Struct] + # The execution statistics associated with the node, contained in a group of + # key-value pairs. Only present if the plan was returned as a result of a + # profile query. For example, number of executions, number of rows/time per + # execution etc. + class PlanNode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metadata associated with a parent-child relationship appearing in a + # {::Google::Cloud::Spanner::V1::PlanNode PlanNode}. + # @!attribute [rw] child_index + # @return [::Integer] + # The node to which the link points. + # @!attribute [rw] type + # @return [::String] + # The type of the link. For example, in Hash Joins this could be used to + # distinguish between the build child and the probe child, or in the case + # of the child being an output variable, to represent the tag associated + # with the output variable. + # @!attribute [rw] variable + # @return [::String] + # Only present if the child node is + # {::Google::Cloud::Spanner::V1::PlanNode::Kind::SCALAR SCALAR} and corresponds to an + # output variable of the parent node. The field carries the name of the + # output variable. For example, a `TableScan` operator that reads rows from + # a table will have child links to the `SCALAR` nodes representing the + # output variables created for each column that is read by the operator. + # The corresponding `variable` fields will be set to the variable names + # assigned to the columns. + class ChildLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Condensed representation of a node and its subtree. Only present for + # `SCALAR` [PlanNode(s)][google.spanner.v1.PlanNode]. + # @!attribute [rw] description + # @return [::String] + # A string representation of the expression subtree rooted at this node. + # @!attribute [rw] subqueries + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # A mapping of (subquery variable name) -> (subquery node id) for cases + # where the `description` string of this node references a `SCALAR` + # subquery contained in the expression subtree rooted at this node. The + # referenced `SCALAR` subquery may not necessarily be a direct child of + # this node. + class ShortRepresentation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class SubqueriesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The kind of {::Google::Cloud::Spanner::V1::PlanNode PlanNode}. Distinguishes between + # the two different kinds of nodes that can appear in a query plan. + module Kind + # Not specified. + KIND_UNSPECIFIED = 0 + + # Denotes a Relational operator node in the expression tree. Relational + # operators represent iterative processing of rows during query execution. + # For example, a `TableScan` operation that reads rows from a table. + RELATIONAL = 1 + + # Denotes a Scalar node in the expression tree. Scalar nodes represent + # non-iterable entities in the query plan. For example, constants or + # arithmetic operators appearing inside predicate expressions or references + # to column names. + SCALAR = 2 + end + end + + # Output of query advisor analysis. + # @!attribute [rw] index_advice + # @return [::Array<::Google::Cloud::Spanner::V1::QueryAdvisorResult::IndexAdvice>] + # Optional. Index Recommendation for a query. This is an optional field and + # the recommendation will only be available when the recommendation + # guarantees significant improvement in query performance. + class QueryAdvisorResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Recommendation to add new indexes to run queries more efficiently. + # @!attribute [rw] ddl + # @return [::Array<::String>] + # Optional. DDL statements to add new indexes that will improve the query. + # @!attribute [rw] improvement_factor + # @return [::Float] + # Optional. Estimated latency improvement factor. For example if the query + # currently takes 500 ms to run and the estimated latency with new indexes + # is 100 ms this field will be 5. + class IndexAdvice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Contains an ordered list of nodes appearing in the query plan. + # @!attribute [rw] plan_nodes + # @return [::Array<::Google::Cloud::Spanner::V1::PlanNode>] + # The nodes in the query plan. Plan nodes are returned in pre-order starting + # with the plan root. Each {::Google::Cloud::Spanner::V1::PlanNode PlanNode}'s `id` + # corresponds to its index in `plan_nodes`. + # @!attribute [rw] query_advice + # @return [::Google::Cloud::Spanner::V1::QueryAdvisorResult] + # Optional. The advise/recommendations for a query. Currently this field will + # be serving index recommendations for a query. + class QueryPlan + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/result_set.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/result_set.rb new file mode 100644 index 000000000000..965cab4685b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/result_set.rb @@ -0,0 +1,265 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + # Results from {::Google::Cloud::Spanner::V1::Spanner::Client#read Read} or + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Spanner::V1::ResultSetMetadata] + # Metadata about the result set, such as row type information. + # @!attribute [rw] rows + # @return [::Array<::Google::Protobuf::ListValue>] + # Each element in `rows` is a row whose format is defined by + # {::Google::Cloud::Spanner::V1::ResultSetMetadata#row_type metadata.row_type}. The ith + # element in each row matches the ith field in + # {::Google::Cloud::Spanner::V1::ResultSetMetadata#row_type metadata.row_type}. Elements + # are encoded based on type as described {::Google::Cloud::Spanner::V1::TypeCode here}. + # @!attribute [rw] stats + # @return [::Google::Cloud::Spanner::V1::ResultSetStats] + # Query plan and execution statistics for the SQL statement that + # produced this result set. These can be requested by setting + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode}. + # DML statements always produce stats containing the number of rows + # modified, unless executed using the + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::PLAN ExecuteSqlRequest.QueryMode.PLAN} + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode}. + # Other fields might or might not be populated, based on the + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode}. + # @!attribute [rw] precommit_token + # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] + # Optional. A precommit token is included if the read-write transaction is on + # a multiplexed session. Pass the precommit token with the highest sequence + # number from this transaction attempt to the + # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} request for this transaction. + # @!attribute [rw] cache_update + # @return [::Google::Cloud::Spanner::V1::CacheUpdate] + # Optional. A cache update expresses a set of changes the client should + # incorporate into its location cache. The client should discard the changes + # if they are older than the data it already has. This data can be obtained + # in response to requests that included a `RoutingHint` field, but may also + # be obtained by explicit location-fetching RPCs which may be added in the + # future. + class ResultSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Partial results from a streaming read or SQL query. Streaming reads and + # SQL queries better tolerate large result sets, large rows, and large + # values, but are a little trickier to consume. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Spanner::V1::ResultSetMetadata] + # Metadata about the result set, such as row type information. + # Only present in the first response. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # A streamed result set consists of a stream of values, which might + # be split into many `PartialResultSet` messages to accommodate + # large rows and/or large values. Every N complete values defines a + # row, where N is equal to the number of entries in + # {::Google::Cloud::Spanner::V1::StructType#fields metadata.row_type.fields}. + # + # Most values are encoded based on type as described + # {::Google::Cloud::Spanner::V1::TypeCode here}. + # + # It's possible that the last value in values is "chunked", + # meaning that the rest of the value is sent in subsequent + # `PartialResultSet`(s). This is denoted by the + # {::Google::Cloud::Spanner::V1::PartialResultSet#chunked_value chunked_value} field. + # Two or more chunked values can be merged to form a complete value as + # follows: + # + # * `bool/number/null`: can't be chunked + # * `string`: concatenate the strings + # * `list`: concatenate the lists. If the last element in a list is a + # `string`, `list`, or `object`, merge it with the first element in + # the next list by applying these rules recursively. + # * `object`: concatenate the (field name, field value) pairs. If a + # field name is duplicated, then apply these rules recursively + # to merge the field values. + # + # Some examples of merging: + # + # Strings are concatenated. + # "foo", "bar" => "foobar" + # + # Lists of non-strings are concatenated. + # [2, 3], [4] => [2, 3, 4] + # + # Lists are concatenated, but the last and first elements are merged + # because they are strings. + # ["a", "b"], ["c", "d"] => ["a", "bc", "d"] + # + # Lists are concatenated, but the last and first elements are merged + # because they are lists. Recursively, the last and first elements + # of the inner lists are merged because they are strings. + # ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] + # + # Non-overlapping object fields are combined. + # {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} + # + # Overlapping object fields are merged. + # {"a": "1"}, {"a": "2"} => {"a": "12"} + # + # Examples of merging objects containing lists of strings. + # {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} + # + # For a more complete example, suppose a streaming SQL query is + # yielding a result set whose rows contain a single string + # field. The following `PartialResultSet`s might be yielded: + # + # { + # "metadata": { ... } + # "values": ["Hello", "W"] + # "chunked_value": true + # "resume_token": "Af65..." + # } + # { + # "values": ["orl"] + # "chunked_value": true + # } + # { + # "values": ["d"] + # "resume_token": "Zx1B..." + # } + # + # This sequence of `PartialResultSet`s encodes two rows, one + # containing the field value `"Hello"`, and a second containing the + # field value `"World" = "W" + "orl" + "d"`. + # + # Not all `PartialResultSet`s contain a `resume_token`. Execution can only be + # resumed from a previously yielded `resume_token`. For the above sequence of + # `PartialResultSet`s, resuming the query with `"resume_token": "Af65..."` + # yields results from the `PartialResultSet` with value "orl". + # @!attribute [rw] chunked_value + # @return [::Boolean] + # If true, then the final value in + # {::Google::Cloud::Spanner::V1::PartialResultSet#values values} is chunked, and must be + # combined with more values from subsequent `PartialResultSet`s to obtain a + # complete field value. + # @!attribute [rw] resume_token + # @return [::String] + # Streaming calls might be interrupted for a variety of reasons, such + # as TCP connection loss. If this occurs, the stream of results can + # be resumed by re-sending the original request and including + # `resume_token`. Note that executing any other transaction in the + # same session invalidates the token. + # @!attribute [rw] stats + # @return [::Google::Cloud::Spanner::V1::ResultSetStats] + # Query plan and execution statistics for the statement that produced this + # streaming result set. These can be requested by setting + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode} + # and are sent only once with the last response in the stream. This field is + # also present in the last response for DML statements. + # @!attribute [rw] precommit_token + # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] + # Optional. A precommit token is included if the read-write transaction + # has multiplexed sessions enabled. Pass the precommit token with the highest + # sequence number from this transaction attempt to the + # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} request for this transaction. + # @!attribute [rw] last + # @return [::Boolean] + # Optional. Indicates whether this is the last `PartialResultSet` in the + # stream. The server might optionally set this field. Clients shouldn't rely + # on this field being set in all cases. + # @!attribute [rw] cache_update + # @return [::Google::Cloud::Spanner::V1::CacheUpdate] + # Optional. A cache update expresses a set of changes the client should + # incorporate into its location cache. The client should discard the changes + # if they are older than the data it already has. This data can be obtained + # in response to requests that included a `RoutingHint` field, but may also + # be obtained by explicit location-fetching RPCs which may be added in the + # future. + class PartialResultSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata about a {::Google::Cloud::Spanner::V1::ResultSet ResultSet} or + # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet}. + # @!attribute [rw] row_type + # @return [::Google::Cloud::Spanner::V1::StructType] + # Indicates the field names and types for the rows in the result + # set. For example, a SQL query like `"SELECT UserId, UserName FROM + # Users"` could return a `row_type` value like: + # + # "fields": [ + # { "name": "UserId", "type": { "code": "INT64" } }, + # { "name": "UserName", "type": { "code": "STRING" } }, + # ] + # @!attribute [rw] transaction + # @return [::Google::Cloud::Spanner::V1::Transaction] + # If the read or SQL query began a transaction as a side-effect, the + # information about the new transaction is yielded here. + # @!attribute [rw] undeclared_parameters + # @return [::Google::Cloud::Spanner::V1::StructType] + # A SQL query can be parameterized. In PLAN mode, these parameters can be + # undeclared. This indicates the field names and types for those undeclared + # parameters in the SQL query. For example, a SQL query like `"SELECT * FROM + # Users where UserId = @userId and UserName = @userName "` could return a + # `undeclared_parameters` value like: + # + # "fields": [ + # { "name": "UserId", "type": { "code": "INT64" } }, + # { "name": "UserName", "type": { "code": "STRING" } }, + # ] + class ResultSetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional statistics about a {::Google::Cloud::Spanner::V1::ResultSet ResultSet} or + # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet}. + # @!attribute [rw] query_plan + # @return [::Google::Cloud::Spanner::V1::QueryPlan] + # {::Google::Cloud::Spanner::V1::QueryPlan QueryPlan} for the query associated with this + # result. + # @!attribute [rw] query_stats + # @return [::Google::Protobuf::Struct] + # Aggregated statistics from the execution of the query. Only present when + # the query is profiled. For example, a query could return the statistics as + # follows: + # + # { + # "rows_returned": "3", + # "elapsed_time": "1.22 secs", + # "cpu_time": "1.19 secs" + # } + # @!attribute [rw] row_count_exact + # @return [::Integer] + # Standard DML returns an exact count of rows that were modified. + # + # Note: The following fields are mutually exclusive: `row_count_exact`, `row_count_lower_bound`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] row_count_lower_bound + # @return [::Integer] + # Partitioned DML doesn't offer exactly-once semantics, so it + # returns a lower bound of the rows modified. + # + # Note: The following fields are mutually exclusive: `row_count_lower_bound`, `row_count_exact`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ResultSetStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/spanner.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/spanner.rb new file mode 100644 index 000000000000..e2cb2f86f38a --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/spanner.rb @@ -0,0 +1,1221 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#create_session CreateSession}. + # @!attribute [rw] database + # @return [::String] + # Required. The database in which the new session is created. + # @!attribute [rw] session + # @return [::Google::Cloud::Spanner::V1::Session] + # Required. The session to create. + class CreateSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions BatchCreateSessions}. + # @!attribute [rw] database + # @return [::String] + # Required. The database in which the new sessions are created. + # @!attribute [rw] session_template + # @return [::Google::Cloud::Spanner::V1::Session] + # Parameters to apply to each created session. + # @!attribute [rw] session_count + # @return [::Integer] + # Required. The number of sessions to be created in this batch call. At least + # one session is created. The API can return fewer than the requested number + # of sessions. If a specific number of sessions are desired, the client can + # make additional calls to `BatchCreateSessions` (adjusting + # {::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest#session_count session_count} + # as necessary). + class BatchCreateSessionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions BatchCreateSessions}. + # @!attribute [rw] session + # @return [::Array<::Google::Cloud::Spanner::V1::Session>] + # The freshly created sessions. + class BatchCreateSessionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A session in the Cloud Spanner API. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the session. This is always system-assigned. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The labels for the session. + # + # * Label keys must be between 1 and 63 characters long and must conform to + # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + # * Label values must be between 0 and 63 characters long and must conform + # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + # * No more than 64 labels can be associated with a given session. + # + # See https://goo.gl/xmQnxf for more information on and examples of labels. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the session is created. + # @!attribute [r] approximate_last_use_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The approximate timestamp when the session is last used. It's + # typically earlier than the actual last use time. + # @!attribute [rw] creator_role + # @return [::String] + # The database role which created this session. + # @!attribute [rw] multiplexed + # @return [::Boolean] + # Optional. If `true`, specifies a multiplexed session. Use a multiplexed + # session for multiple, concurrent operations including any combination of + # read-only and read-write transactions. Use + # {::Google::Cloud::Spanner::V1::Spanner::Client#create_session `sessions.create`} to create + # multiplexed sessions. Don't use + # {::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions BatchCreateSessions} to + # create a multiplexed session. You can't delete or list multiplexed + # sessions. + class Session + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#get_session GetSession}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the session to retrieve. + class GetSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#list_sessions ListSessions}. + # @!attribute [rw] database + # @return [::String] + # Required. The database in which to list sessions. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of sessions to be returned in the response. If 0 or less, defaults + # to the server's maximum allowed page size. + # @!attribute [rw] page_token + # @return [::String] + # If non-empty, `page_token` should contain a + # {::Google::Cloud::Spanner::V1::ListSessionsResponse#next_page_token next_page_token} + # from a previous + # {::Google::Cloud::Spanner::V1::ListSessionsResponse ListSessionsResponse}. + # @!attribute [rw] filter + # @return [::String] + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + # * `labels.key` where key is the name of a label + # + # Some examples of using filters are: + # + # * `labels.env:*` --> The session has the label "env". + # * `labels.env:dev` --> The session has the label "env" and the value of + # the label contains the string "dev". + class ListSessionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for {::Google::Cloud::Spanner::V1::Spanner::Client#list_sessions ListSessions}. + # @!attribute [rw] sessions + # @return [::Array<::Google::Cloud::Spanner::V1::Session>] + # The list of requested sessions. + # @!attribute [rw] next_page_token + # @return [::String] + # `next_page_token` can be sent in a subsequent + # {::Google::Cloud::Spanner::V1::Spanner::Client#list_sessions ListSessions} call to fetch more + # of the matching sessions. + class ListSessionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#delete_session DeleteSession}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the session to delete. + class DeleteSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Common request options for various APIs. + # @!attribute [rw] priority + # @return [::Google::Cloud::Spanner::V1::RequestOptions::Priority] + # Priority for the request. + # @!attribute [rw] request_tag + # @return [::String] + # A per-request tag which can be applied to queries or reads, used for + # statistics collection. + # Both `request_tag` and `transaction_tag` can be specified for a read or + # query that belongs to a transaction. + # This field is ignored for requests where it's not applicable (for example, + # `CommitRequest`). + # Legal characters for `request_tag` values are all printable characters + # (ASCII 32 - 126) and the length of a request_tag is limited to 50 + # characters. Values that exceed this limit are truncated. + # Any leading underscore (_) characters are removed from the string. + # @!attribute [rw] transaction_tag + # @return [::String] + # A tag used for statistics collection about this transaction. + # Both `request_tag` and `transaction_tag` can be specified for a read or + # query that belongs to a transaction. + # To enable tagging on a transaction, `transaction_tag` must be set to the + # same value for all requests belonging to the same transaction, including + # {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction}. + # If this request doesn't belong to any transaction, `transaction_tag` is + # ignored. + # Legal characters for `transaction_tag` values are all printable characters + # (ASCII 32 - 126) and the length of a `transaction_tag` is limited to 50 + # characters. Values that exceed this limit are truncated. + # Any leading underscore (_) characters are removed from the string. + # @!attribute [rw] client_context + # @return [::Google::Cloud::Spanner::V1::RequestOptions::ClientContext] + # Optional. Optional context that may be needed for some requests. + class RequestOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Container for various pieces of client-owned context attached to a request. + # @!attribute [rw] secure_context + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Optional. Map of parameter name to value for this request. These values + # will be returned by any SECURE_CONTEXT() calls invoked by this request + # (e.g., by queries against Parameterized Secure Views). + class ClientContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class SecureContextEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The relative priority for requests. Note that priority isn't applicable + # for {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction}. + # + # The priority acts as a hint to the Cloud Spanner scheduler and doesn't + # guarantee priority or order of execution. For example: + # + # * Some parts of a write operation always execute at `PRIORITY_HIGH`, + # regardless of the specified priority. This can cause you to see an + # increase in high priority workload even when executing a low priority + # request. This can also potentially cause a priority inversion where a + # lower priority request is fulfilled ahead of a higher priority + # request. + # * If a transaction contains multiple operations with different priorities, + # Cloud Spanner doesn't guarantee to process the higher priority + # operations first. There might be other constraints to satisfy, such as + # the order of operations. + module Priority + # `PRIORITY_UNSPECIFIED` is equivalent to `PRIORITY_HIGH`. + PRIORITY_UNSPECIFIED = 0 + + # This specifies that the request is low priority. + PRIORITY_LOW = 1 + + # This specifies that the request is medium priority. + PRIORITY_MEDIUM = 2 + + # This specifies that the request is high priority. + PRIORITY_HIGH = 3 + end + end + + # The `DirectedReadOptions` can be used to indicate which replicas or regions + # should be used for non-transactional reads or queries. + # + # `DirectedReadOptions` can only be specified for a read-only transaction, + # otherwise the API returns an `INVALID_ARGUMENT` error. + # @!attribute [rw] include_replicas + # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions::IncludeReplicas] + # `Include_replicas` indicates the order of replicas (as they appear in + # this list) to process the request. If `auto_failover_disabled` is set to + # `true` and all replicas are exhausted without finding a healthy replica, + # Spanner waits for a replica in the list to become available, requests + # might fail due to `DEADLINE_EXCEEDED` errors. + # + # Note: The following fields are mutually exclusive: `include_replicas`, `exclude_replicas`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exclude_replicas + # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions::ExcludeReplicas] + # `Exclude_replicas` indicates that specified replicas should be excluded + # from serving requests. Spanner doesn't route requests to the replicas + # in this list. + # + # Note: The following fields are mutually exclusive: `exclude_replicas`, `include_replicas`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DirectedReadOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The directed read replica selector. + # Callers must provide one or more of the following fields for replica + # selection: + # + # * `location` - The location must be one of the regions within the + # multi-region configuration of your database. + # * `type` - The type of the replica. + # + # Some examples of using replica_selectors are: + # + # * `location:us-east1` --> The "us-east1" replica(s) of any available type + # is used to process the request. + # * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in the nearest + # available location are used to process the + # request. + # * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) + # in location "us-east1" is used to process + # the request. + # @!attribute [rw] location + # @return [::String] + # The location or region of the serving requests, for example, "us-east1". + # @!attribute [rw] type + # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions::ReplicaSelection::Type] + # The type of replica. + class ReplicaSelection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates the type of replica. + module Type + # Not specified. + TYPE_UNSPECIFIED = 0 + + # Read-write replicas support both reads and writes. + READ_WRITE = 1 + + # Read-only replicas only support reads (not writes). + READ_ONLY = 2 + end + end + + # An `IncludeReplicas` contains a repeated set of `ReplicaSelection` which + # indicates the order in which replicas should be considered. + # @!attribute [rw] replica_selections + # @return [::Array<::Google::Cloud::Spanner::V1::DirectedReadOptions::ReplicaSelection>] + # The directed read replica selector. + # @!attribute [rw] auto_failover_disabled + # @return [::Boolean] + # If `true`, Spanner doesn't route requests to a replica outside the + # <`include_replicas` list when all of the specified replicas are + # unavailable or unhealthy. Default value is `false`. + class IncludeReplicas + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An ExcludeReplicas contains a repeated set of ReplicaSelection that should + # be excluded from serving requests. + # @!attribute [rw] replica_selections + # @return [::Array<::Google::Cloud::Spanner::V1::DirectedReadOptions::ReplicaSelection>] + # The directed read replica selector. + class ExcludeReplicas + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} and + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql}. + # @!attribute [rw] session + # @return [::String] + # Required. The session in which the SQL query should be performed. + # @!attribute [rw] transaction + # @return [::Google::Cloud::Spanner::V1::TransactionSelector] + # The transaction to use. + # + # For queries, if none is provided, the default is a temporary read-only + # transaction with strong concurrency. + # + # Standard DML statements require a read-write transaction. To protect + # against replays, single-use transactions are not supported. The caller + # must either supply an existing transaction ID or begin a new transaction. + # + # Partitioned DML requires an existing Partitioned DML transaction ID. + # @!attribute [rw] sql + # @return [::String] + # Required. The SQL string. + # @!attribute [rw] params + # @return [::Google::Protobuf::Struct] + # Parameter names and values that bind to placeholders in the SQL string. + # + # A parameter placeholder consists of the `@` character followed by the + # parameter name (for example, `@firstName`). Parameter names must conform + # to the naming requirements of identifiers as specified at + # https://cloud.google.com/spanner/docs/lexical#identifiers. + # + # Parameters can appear anywhere that a literal value is expected. The same + # parameter name can be used more than once, for example: + # + # `"WHERE id > @msg_id AND id < @msg_id + 100"` + # + # It's an error to execute a SQL statement with unbound parameters. + # @!attribute [rw] param_types + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}] + # It isn't always possible for Cloud Spanner to infer the right SQL type + # from a JSON value. For example, values of type `BYTES` and values + # of type `STRING` both appear in + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#params params} as JSON strings. + # + # In these cases, you can use `param_types` to specify the exact + # SQL type for some or all of the SQL statement parameters. See the + # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information + # about SQL types. + # @!attribute [rw] resume_token + # @return [::String] + # If this request is resuming a previously interrupted SQL statement + # execution, `resume_token` should be copied from the last + # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the + # interruption. Doing this enables the new SQL statement execution to resume + # where the last one left off. The rest of the request parameters must + # exactly match the request that yielded this token. + # @!attribute [rw] query_mode + # @return [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode] + # Used to control the amount of debugging information returned in + # {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#partition_token partition_token} is + # set, {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode query_mode} can only + # be set to + # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::NORMAL QueryMode.NORMAL}. + # @!attribute [rw] partition_token + # @return [::String] + # If present, results are restricted to the specified partition + # previously created using `PartitionQuery`. There must be an exact + # match for the values of fields common to this message and the + # `PartitionQueryRequest` message used to create this `partition_token`. + # @!attribute [rw] seqno + # @return [::Integer] + # A per-transaction sequence number used to identify this request. This field + # makes each request idempotent such that if the request is received multiple + # times, at most one succeeds. + # + # The sequence number must be monotonically increasing within the + # transaction. If a request arrives for the first time with an out-of-order + # sequence number, the transaction can be aborted. Replays of previously + # handled requests yield the same response as the first execution. + # + # Required for DML statements. Ignored for queries. + # @!attribute [rw] query_options + # @return [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions] + # Query optimizer configuration to use for the given query. + # @!attribute [rw] request_options + # @return [::Google::Cloud::Spanner::V1::RequestOptions] + # Common options for this request. + # @!attribute [rw] directed_read_options + # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions] + # Directed read options for this request. + # @!attribute [rw] data_boost_enabled + # @return [::Boolean] + # If this is for a partitioned query and this field is set to `true`, the + # request is executed with Spanner Data Boost independent compute resources. + # + # If the field is set to `true` but the request doesn't set + # `partition_token`, the API returns an `INVALID_ARGUMENT` error. + # @!attribute [rw] last_statement + # @return [::Boolean] + # Optional. If set to `true`, this statement marks the end of the + # transaction. After this statement executes, you must commit or abort the + # transaction. Attempts to execute any other requests against this + # transaction (including reads and queries) are rejected. + # + # For DML statements, setting this option might cause some error reporting to + # be deferred until commit time (for example, validation of unique + # constraints). Given this, successful execution of a DML statement shouldn't + # be assumed until a subsequent `Commit` call completes successfully. + # @!attribute [rw] routing_hint + # @return [::Google::Cloud::Spanner::V1::RoutingHint] + # Optional. Makes the Spanner requests location-aware if present. + # + # It gives the server hints that can be used to route the request + # to an appropriate server, potentially significantly decreasing latency and + # improving throughput. To achieve improved performance, most fields must be + # filled in with accurate values. + class ExecuteSqlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Query optimizer configuration. + # @!attribute [rw] optimizer_version + # @return [::String] + # An option to control the selection of optimizer version. + # + # This parameter allows individual queries to pick different query + # optimizer versions. + # + # Specifying `latest` as a value instructs Cloud Spanner to use the + # latest supported query optimizer version. If not specified, Cloud Spanner + # uses the optimizer version set at the database level options. Any other + # positive integer (from the list of supported optimizer versions) + # overrides the default optimizer version for query execution. + # + # The list of supported optimizer versions can be queried from + # `SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS`. + # + # Executing a SQL statement with an invalid optimizer version fails with + # an `INVALID_ARGUMENT` error. + # + # See + # https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer + # for more information on managing the query optimizer. + # + # The `optimizer_version` statement hint has precedence over this setting. + # @!attribute [rw] optimizer_statistics_package + # @return [::String] + # An option to control the selection of optimizer statistics package. + # + # This parameter allows individual queries to use a different query + # optimizer statistics package. + # + # Specifying `latest` as a value instructs Cloud Spanner to use the latest + # generated statistics package. If not specified, Cloud Spanner uses + # the statistics package set at the database level options, or the latest + # package if the database option isn't set. + # + # The statistics package requested by the query has to be exempt from + # garbage collection. This can be achieved with the following DDL + # statement: + # + # ```sql + # ALTER STATISTICS SET OPTIONS (allow_gc=false) + # ``` + # + # The list of available statistics packages can be queried from + # `INFORMATION_SCHEMA.SPANNER_STATISTICS`. + # + # Executing a SQL statement with an invalid optimizer statistics package + # or with a statistics package that allows garbage collection fails with + # an `INVALID_ARGUMENT` error. + class QueryOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Spanner::V1::Type] + class ParamTypesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Mode in which the statement must be processed. + module QueryMode + # The default mode. Only the statement results are returned. + NORMAL = 0 + + # This mode returns only the query plan, without any results or + # execution statistics information. + PLAN = 1 + + # This mode returns the query plan, overall execution statistics, + # operator level execution statistics along with the results. This has a + # performance overhead compared to the other modes. It isn't recommended + # to use this mode for production traffic. + PROFILE = 2 + + # This mode returns the overall (but not operator-level) execution + # statistics along with the results. + WITH_STATS = 3 + + # This mode returns the query plan, overall (but not operator-level) + # execution statistics along with the results. + WITH_PLAN_AND_STATS = 4 + end + end + + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml ExecuteBatchDml}. + # @!attribute [rw] session + # @return [::String] + # Required. The session in which the DML statements should be performed. + # @!attribute [rw] transaction + # @return [::Google::Cloud::Spanner::V1::TransactionSelector] + # Required. The transaction to use. Must be a read-write transaction. + # + # To protect against replays, single-use transactions are not supported. The + # caller must either supply an existing transaction ID or begin a new + # transaction. + # @!attribute [rw] statements + # @return [::Array<::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement>] + # Required. The list of statements to execute in this batch. Statements are + # executed serially, such that the effects of statement `i` are visible to + # statement `i+1`. Each statement must be a DML statement. Execution stops at + # the first failed statement; the remaining statements are not executed. + # + # Callers must provide at least one statement. + # @!attribute [rw] seqno + # @return [::Integer] + # Required. A per-transaction sequence number used to identify this request. + # This field makes each request idempotent such that if the request is + # received multiple times, at most one succeeds. + # + # The sequence number must be monotonically increasing within the + # transaction. If a request arrives for the first time with an out-of-order + # sequence number, the transaction might be aborted. Replays of previously + # handled requests yield the same response as the first execution. + # @!attribute [rw] request_options + # @return [::Google::Cloud::Spanner::V1::RequestOptions] + # Common options for this request. + # @!attribute [rw] last_statements + # @return [::Boolean] + # Optional. If set to `true`, this request marks the end of the transaction. + # After these statements execute, you must commit or abort the transaction. + # Attempts to execute any other requests against this transaction + # (including reads and queries) are rejected. + # + # Setting this option might cause some error reporting to be deferred until + # commit time (for example, validation of unique constraints). Given this, + # successful execution of statements shouldn't be assumed until a subsequent + # `Commit` call completes successfully. + class ExecuteBatchDmlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A single DML statement. + # @!attribute [rw] sql + # @return [::String] + # Required. The DML string. + # @!attribute [rw] params + # @return [::Google::Protobuf::Struct] + # Parameter names and values that bind to placeholders in the DML string. + # + # A parameter placeholder consists of the `@` character followed by the + # parameter name (for example, `@firstName`). Parameter names can contain + # letters, numbers, and underscores. + # + # Parameters can appear anywhere that a literal value is expected. The + # same parameter name can be used more than once, for example: + # + # `"WHERE id > @msg_id AND id < @msg_id + 100"` + # + # It's an error to execute a SQL statement with unbound parameters. + # @!attribute [rw] param_types + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}] + # It isn't always possible for Cloud Spanner to infer the right SQL type + # from a JSON value. For example, values of type `BYTES` and values + # of type `STRING` both appear in + # {::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement#params params} as + # JSON strings. + # + # In these cases, `param_types` can be used to specify the exact + # SQL type for some or all of the SQL statement parameters. See the + # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information + # about SQL types. + class Statement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Spanner::V1::Type] + class ParamTypesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # The response for + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml ExecuteBatchDml}. Contains a list + # of {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, one for each DML + # statement that has successfully executed, in the same order as the statements + # in the request. If a statement fails, the status in the response body + # identifies the cause of the failure. + # + # To check for DML statements that failed, use the following approach: + # + # 1. Check the status in the response message. The + # [google.rpc.Code][google.rpc.Code] enum + # value `OK` indicates that all statements were executed successfully. + # 2. If the status was not `OK`, check the number of result sets in the + # response. If the response contains `N` + # {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, then statement `N+1` in + # the request failed. + # + # Example 1: + # + # * Request: 5 DML statements, all executed successfully. + # * Response: 5 {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, with the + # status `OK`. + # + # Example 2: + # + # * Request: 5 DML statements. The third statement has a syntax error. + # * Response: 2 {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, and a syntax + # error (`INVALID_ARGUMENT`) + # status. The number of {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages + # indicates that the third statement failed, and the fourth and fifth + # statements were not executed. + # @!attribute [rw] result_sets + # @return [::Array<::Google::Cloud::Spanner::V1::ResultSet>] + # One {::Google::Cloud::Spanner::V1::ResultSet ResultSet} for each statement in the + # request that ran successfully, in the same order as the statements in the + # request. Each {::Google::Cloud::Spanner::V1::ResultSet ResultSet} does not contain any + # rows. The {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats} in each + # {::Google::Cloud::Spanner::V1::ResultSet ResultSet} contain the number of rows + # modified by the statement. + # + # Only the first {::Google::Cloud::Spanner::V1::ResultSet ResultSet} in the response + # contains valid {::Google::Cloud::Spanner::V1::ResultSetMetadata ResultSetMetadata}. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # If all DML statements are executed successfully, the status is `OK`. + # Otherwise, the error status of the first failed statement. + # @!attribute [rw] precommit_token + # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] + # Optional. A precommit token is included if the read-write transaction + # is on a multiplexed session. Pass the precommit token with the highest + # sequence number from this transaction attempt should be passed to the + # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} request for this transaction. + class ExecuteBatchDmlResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options for a `PartitionQueryRequest` and `PartitionReadRequest`. + # @!attribute [rw] partition_size_bytes + # @return [::Integer] + # **Note:** This hint is currently ignored by `PartitionQuery` and + # `PartitionRead` requests. + # + # The desired data size for each partition generated. The default for this + # option is currently 1 GiB. This is only a hint. The actual size of each + # partition can be smaller or larger than this size request. + # @!attribute [rw] max_partitions + # @return [::Integer] + # **Note:** This hint is currently ignored by `PartitionQuery` and + # `PartitionRead` requests. + # + # The desired maximum number of partitions to return. For example, this + # might be set to the number of workers available. The default for this + # option is currently 10,000. The maximum value is currently 200,000. This + # is only a hint. The actual number of partitions returned can be smaller or + # larger than this maximum count request. + class PartitionOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#partition_query PartitionQuery} + # @!attribute [rw] session + # @return [::String] + # Required. The session used to create the partitions. + # @!attribute [rw] transaction + # @return [::Google::Cloud::Spanner::V1::TransactionSelector] + # Read-only snapshot transactions are supported, read and write and + # single-use transactions are not. + # @!attribute [rw] sql + # @return [::String] + # Required. The query request to generate partitions for. The request fails + # if the query isn't root partitionable. For a query to be root + # partitionable, it needs to satisfy a few conditions. For example, if the + # query execution plan contains a distributed union operator, then it must be + # the first operator in the plan. For more information about other + # conditions, see [Read data in + # parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). + # + # The query request must not contain DML commands, such as `INSERT`, + # `UPDATE`, or `DELETE`. Use + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql `ExecuteStreamingSql`} with + # a `PartitionedDml` transaction for large, partition-friendly DML + # operations. + # @!attribute [rw] params + # @return [::Google::Protobuf::Struct] + # Optional. Parameter names and values that bind to placeholders in the SQL + # string. + # + # A parameter placeholder consists of the `@` character followed by the + # parameter name (for example, `@firstName`). Parameter names can contain + # letters, numbers, and underscores. + # + # Parameters can appear anywhere that a literal value is expected. The same + # parameter name can be used more than once, for example: + # + # `"WHERE id > @msg_id AND id < @msg_id + 100"` + # + # It's an error to execute a SQL statement with unbound parameters. + # @!attribute [rw] param_types + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}] + # Optional. It isn't always possible for Cloud Spanner to infer the right SQL + # type from a JSON value. For example, values of type `BYTES` and values of + # type `STRING` both appear in + # {::Google::Cloud::Spanner::V1::PartitionQueryRequest#params params} as JSON strings. + # + # In these cases, `param_types` can be used to specify the exact + # SQL type for some or all of the SQL query parameters. See the + # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information + # about SQL types. + # @!attribute [rw] partition_options + # @return [::Google::Cloud::Spanner::V1::PartitionOptions] + # Additional options that affect how many partitions are created. + class PartitionQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Spanner::V1::Type] + class ParamTypesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#partition_read PartitionRead} + # @!attribute [rw] session + # @return [::String] + # Required. The session used to create the partitions. + # @!attribute [rw] transaction + # @return [::Google::Cloud::Spanner::V1::TransactionSelector] + # Read only snapshot transactions are supported, read/write and single use + # transactions are not. + # @!attribute [rw] table + # @return [::String] + # Required. The name of the table in the database to be read. + # @!attribute [rw] index + # @return [::String] + # If non-empty, the name of an index on + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table}. This index is used + # instead of the table primary key when interpreting + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} and sorting + # result rows. See {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} + # for further information. + # @!attribute [rw] columns + # @return [::Array<::String>] + # The columns of {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be + # returned for each row matching this request. + # @!attribute [rw] key_set + # @return [::Google::Cloud::Spanner::V1::KeySet] + # Required. `key_set` identifies the rows to be yielded. `key_set` names the + # primary keys of the rows in + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be yielded, unless + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present. If + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present, then + # {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} instead names + # index keys in {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index}. + # + # It isn't an error for the `key_set` to name rows that don't + # exist in the database. Read yields nothing for nonexistent rows. + # @!attribute [rw] partition_options + # @return [::Google::Cloud::Spanner::V1::PartitionOptions] + # Additional options that affect how many partitions are created. + class PartitionReadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information returned for each partition returned in a + # PartitionResponse. + # @!attribute [rw] partition_token + # @return [::String] + # This token can be passed to `Read`, `StreamingRead`, `ExecuteSql`, or + # `ExecuteStreamingSql` requests to restrict the results to those identified + # by this partition token. + class Partition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for {::Google::Cloud::Spanner::V1::Spanner::Client#partition_query PartitionQuery} + # or {::Google::Cloud::Spanner::V1::Spanner::Client#partition_read PartitionRead} + # @!attribute [rw] partitions + # @return [::Array<::Google::Cloud::Spanner::V1::Partition>] + # Partitions created by this request. + # @!attribute [rw] transaction + # @return [::Google::Cloud::Spanner::V1::Transaction] + # Transaction created by this request. + class PartitionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#read Read} and + # {::Google::Cloud::Spanner::V1::Spanner::Client#streaming_read StreamingRead}. + # @!attribute [rw] session + # @return [::String] + # Required. The session in which the read should be performed. + # @!attribute [rw] transaction + # @return [::Google::Cloud::Spanner::V1::TransactionSelector] + # The transaction to use. If none is provided, the default is a + # temporary read-only transaction with strong concurrency. + # @!attribute [rw] table + # @return [::String] + # Required. The name of the table in the database to be read. + # @!attribute [rw] index + # @return [::String] + # If non-empty, the name of an index on + # {::Google::Cloud::Spanner::V1::ReadRequest#table table}. This index is used instead of + # the table primary key when interpreting + # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} and sorting result rows. + # See {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} for further + # information. + # @!attribute [rw] columns + # @return [::Array<::String>] + # Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be + # returned for each row matching this request. + # @!attribute [rw] key_set + # @return [::Google::Cloud::Spanner::V1::KeySet] + # Required. `key_set` identifies the rows to be yielded. `key_set` names the + # primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to + # be yielded, unless {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present. + # If {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present, then + # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} instead names index keys + # in {::Google::Cloud::Spanner::V1::ReadRequest#index index}. + # + # If the {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} + # field is empty, rows are yielded in table primary key order (if + # {::Google::Cloud::Spanner::V1::ReadRequest#index index} is empty) or index key order + # (if {::Google::Cloud::Spanner::V1::ReadRequest#index index} is non-empty). If the + # {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} field + # isn't empty, rows are yielded in an unspecified order. + # + # It isn't an error for the `key_set` to name rows that don't + # exist in the database. Read yields nothing for nonexistent rows. + # @!attribute [rw] limit + # @return [::Integer] + # If greater than zero, only the first `limit` rows are yielded. If `limit` + # is zero, the default is no limit. A limit can't be specified if + # `partition_token` is set. + # @!attribute [rw] resume_token + # @return [::String] + # If this request is resuming a previously interrupted read, + # `resume_token` should be copied from the last + # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the + # interruption. Doing this enables the new read to resume where the last read + # left off. The rest of the request parameters must exactly match the request + # that yielded this token. + # @!attribute [rw] partition_token + # @return [::String] + # If present, results are restricted to the specified partition + # previously created using `PartitionRead`. There must be an exact + # match for the values of fields common to this message and the + # PartitionReadRequest message used to create this partition_token. + # @!attribute [rw] request_options + # @return [::Google::Cloud::Spanner::V1::RequestOptions] + # Common options for this request. + # @!attribute [rw] directed_read_options + # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions] + # Directed read options for this request. + # @!attribute [rw] data_boost_enabled + # @return [::Boolean] + # If this is for a partitioned read and this field is set to `true`, the + # request is executed with Spanner Data Boost independent compute resources. + # + # If the field is set to `true` but the request doesn't set + # `partition_token`, the API returns an `INVALID_ARGUMENT` error. + # @!attribute [rw] order_by + # @return [::Google::Cloud::Spanner::V1::ReadRequest::OrderBy] + # Optional. Order for the returned rows. + # + # By default, Spanner returns result rows in primary key order except for + # PartitionRead requests. For applications that don't require rows to be + # returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting + # `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval, + # resulting in lower latencies in certain cases (for example, bulk point + # lookups). + # @!attribute [rw] lock_hint + # @return [::Google::Cloud::Spanner::V1::ReadRequest::LockHint] + # Optional. Lock Hint for the request, it can only be used with read-write + # transactions. + # @!attribute [rw] routing_hint + # @return [::Google::Cloud::Spanner::V1::RoutingHint] + # Optional. Makes the Spanner requests location-aware if present. + # + # It gives the server hints that can be used to route the request + # to an appropriate server, potentially significantly decreasing latency and + # improving throughput. To achieve improved performance, most fields must be + # filled in with accurate values. + class ReadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An option to control the order in which rows are returned from a read. + module OrderBy + # Default value. + # + # `ORDER_BY_UNSPECIFIED` is equivalent to `ORDER_BY_PRIMARY_KEY`. + ORDER_BY_UNSPECIFIED = 0 + + # Read rows are returned in primary key order. + # + # In the event that this option is used in conjunction with the + # `partition_token` field, the API returns an `INVALID_ARGUMENT` error. + ORDER_BY_PRIMARY_KEY = 1 + + # Read rows are returned in any order. + ORDER_BY_NO_ORDER = 2 + end + + # A lock hint mechanism for reads done within a transaction. + module LockHint + # Default value. + # + # `LOCK_HINT_UNSPECIFIED` is equivalent to `LOCK_HINT_SHARED`. + LOCK_HINT_UNSPECIFIED = 0 + + # Acquire shared locks. + # + # By default when you perform a read as part of a read-write transaction, + # Spanner acquires shared read locks, which allows other reads to still + # access the data until your transaction is ready to commit. When your + # transaction is committing and writes are being applied, the transaction + # attempts to upgrade to an exclusive lock for any data you are writing. + # For more information about locks, see [Lock + # modes](https://cloud.google.com/spanner/docs/introspection/lock-statistics#explain-lock-modes). + LOCK_HINT_SHARED = 1 + + # Acquire exclusive locks. + # + # Requesting exclusive locks is beneficial if you observe high write + # contention, which means you notice that multiple transactions are + # concurrently trying to read and write to the same data, resulting in a + # large number of aborts. This problem occurs when two transactions + # initially acquire shared locks and then both try to upgrade to exclusive + # locks at the same time. In this situation both transactions are waiting + # for the other to give up their lock, resulting in a deadlocked situation. + # Spanner is able to detect this occurring and force one of the + # transactions to abort. However, this is a slow and expensive operation + # and results in lower performance. In this case it makes sense to acquire + # exclusive locks at the start of the transaction because then when + # multiple transactions try to act on the same data, they automatically get + # serialized. Each transaction waits its turn to acquire the lock and + # avoids getting into deadlock situations. + # + # Because the exclusive lock hint is just a hint, it shouldn't be + # considered equivalent to a mutex. In other words, you shouldn't use + # Spanner exclusive locks as a mutual exclusion mechanism for the execution + # of code outside of Spanner. + # + # **Note:** Request exclusive locks judiciously because they block others + # from reading that data for the entire transaction, rather than just when + # the writes are being performed. Unless you observe high write contention, + # you should use the default of shared read locks so you don't prematurely + # block other clients from reading the data that you're writing to. + LOCK_HINT_EXCLUSIVE = 2 + end + end + + # The request for + # {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction}. + # @!attribute [rw] session + # @return [::String] + # Required. The session in which the transaction runs. + # @!attribute [rw] options + # @return [::Google::Cloud::Spanner::V1::TransactionOptions] + # Required. Options for the new transaction. + # @!attribute [rw] request_options + # @return [::Google::Cloud::Spanner::V1::RequestOptions] + # Common options for this request. + # Priority is ignored for this request. Setting the priority in this + # `request_options` struct doesn't do anything. To set the priority for a + # transaction, set it on the reads and writes that are part of this + # transaction instead. + # @!attribute [rw] mutation_key + # @return [::Google::Cloud::Spanner::V1::Mutation] + # Optional. Required for read-write transactions on a multiplexed session + # that commit mutations but don't perform any reads or queries. You must + # randomly select one of the mutations from the mutation set and send it as a + # part of this request. + # @!attribute [rw] routing_hint + # @return [::Google::Cloud::Spanner::V1::RoutingHint] + # Optional. Makes the Spanner requests location-aware if present. + # + # It gives the server hints that can be used to route the request + # to an appropriate server, potentially significantly decreasing latency and + # improving throughput. To achieve improved performance, most fields must be + # filled in with accurate values. + class BeginTransactionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit}. + # @!attribute [rw] session + # @return [::String] + # Required. The session in which the transaction to be committed is running. + # @!attribute [rw] transaction_id + # @return [::String] + # Commit a previously-started transaction. + # + # Note: The following fields are mutually exclusive: `transaction_id`, `single_use_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] single_use_transaction + # @return [::Google::Cloud::Spanner::V1::TransactionOptions] + # Execute mutations in a temporary transaction. Note that unlike + # commit of a previously-started transaction, commit with a + # temporary transaction is non-idempotent. That is, if the + # `CommitRequest` is sent to Cloud Spanner more than once (for + # instance, due to retries in the application, or in the + # transport library), it's possible that the mutations are + # executed more than once. If this is undesirable, use + # {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction} and + # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} instead. + # + # Note: The following fields are mutually exclusive: `single_use_transaction`, `transaction_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mutations + # @return [::Array<::Google::Cloud::Spanner::V1::Mutation>] + # The mutations to be executed when this transaction commits. All + # mutations are applied atomically, in the order they appear in + # this list. + # @!attribute [rw] return_commit_stats + # @return [::Boolean] + # If `true`, then statistics related to the transaction is included in + # the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. + # Default value is `false`. + # @!attribute [rw] max_commit_delay + # @return [::Google::Protobuf::Duration] + # Optional. The amount of latency this request is configured to incur in + # order to improve throughput. If this field isn't set, Spanner assumes + # requests are relatively latency sensitive and automatically determines an + # appropriate delay time. You can specify a commit delay value between 0 and + # 500 ms. + # @!attribute [rw] request_options + # @return [::Google::Cloud::Spanner::V1::RequestOptions] + # Common options for this request. + # @!attribute [rw] precommit_token + # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] + # Optional. If the read-write transaction was executed on a multiplexed + # session, then you must include the precommit token with the highest + # sequence number received in this transaction attempt. Failing to do so + # results in a `FailedPrecondition` error. + # @!attribute [rw] routing_hint + # @return [::Google::Cloud::Spanner::V1::RoutingHint] + # Optional. Makes the Spanner requests location-aware if present. + # + # It gives the server hints that can be used to route the request + # to an appropriate server, potentially significantly decreasing latency and + # improving throughput. To achieve improved performance, most fields must be + # filled in with accurate values. + class CommitRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback}. + # @!attribute [rw] session + # @return [::String] + # Required. The session in which the transaction to roll back is running. + # @!attribute [rw] transaction_id + # @return [::String] + # Required. The transaction to roll back. + class RollbackRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#batch_write BatchWrite}. + # @!attribute [rw] session + # @return [::String] + # Required. The session in which the batch request is to be run. + # @!attribute [rw] request_options + # @return [::Google::Cloud::Spanner::V1::RequestOptions] + # Common options for this request. + # @!attribute [rw] mutation_groups + # @return [::Array<::Google::Cloud::Spanner::V1::BatchWriteRequest::MutationGroup>] + # Required. The groups of mutations to be applied. + # @!attribute [rw] exclude_txn_from_change_streams + # @return [::Boolean] + # Optional. If you don't set the `exclude_txn_from_change_streams` option or + # if it's set to `false`, then any change streams monitoring columns modified + # by transactions will capture the updates made within that transaction. + class BatchWriteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A group of mutations to be committed together. Related mutations should be + # placed in a group. For example, two mutations inserting rows with the same + # primary key prefix in both parent and child tables are related. + # @!attribute [rw] mutations + # @return [::Array<::Google::Cloud::Spanner::V1::Mutation>] + # Required. The mutations in this group. + class MutationGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The result of applying a batch of mutations. + # @!attribute [rw] indexes + # @return [::Array<::Integer>] + # The mutation groups applied in this batch. The values index into the + # `mutation_groups` field in the corresponding `BatchWriteRequest`. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # An `OK` status indicates success. Any other status indicates a failure. + # @!attribute [rw] commit_timestamp + # @return [::Google::Protobuf::Timestamp] + # The commit timestamp of the transaction that applied this batch. + # Present if status is OK and the mutation groups were applied, absent + # otherwise. + # + # For mutation groups with conditions, a status=OK and missing + # commit_timestamp means that the mutation groups were not applied due to the + # condition not being satisfied after evaluation. + class BatchWriteResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Spanner::V1::Spanner::Client#fetch_cache_update FetchCacheUpdate}. + # @!attribute [rw] database + # @return [::String] + # Required. The database for which to retrieve the cache update. + # @!attribute [rw] max_recipe_count + # @return [::Integer] + # Optional. The maximum number of key recipes to return in the response. + # If not set, a default limit of 100 will be used. + # @!attribute [rw] max_range_count + # @return [::Integer] + # Optional. The maximum number of ranges to return in the response. + # If not set, a default limit of 10000 will be used. + class FetchCacheUpdateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb new file mode 100644 index 000000000000..53ec83e49080 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb @@ -0,0 +1,357 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + # Options to use for transactions. + # @!attribute [rw] read_write + # @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite] + # Transaction may write. + # + # Authorization to begin a read-write transaction requires + # `spanner.databases.beginOrRollbackReadWriteTransaction` permission + # on the `session` resource. + # + # Note: The following fields are mutually exclusive: `read_write`, `partitioned_dml`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] partitioned_dml + # @return [::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml] + # Partitioned DML transaction. + # + # Authorization to begin a Partitioned DML transaction requires + # `spanner.databases.beginPartitionedDmlTransaction` permission + # on the `session` resource. + # + # Note: The following fields are mutually exclusive: `partitioned_dml`, `read_write`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] read_only + # @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly] + # Transaction does not write. + # + # Authorization to begin a read-only transaction requires + # `spanner.databases.beginReadOnlyTransaction` permission + # on the `session` resource. + # + # Note: The following fields are mutually exclusive: `read_only`, `read_write`, `partitioned_dml`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exclude_txn_from_change_streams + # @return [::Boolean] + # When `exclude_txn_from_change_streams` is set to `true`, it prevents read + # or write transactions from being tracked in change streams. + # + # * If the DDL option `allow_txn_exclusion` is set to `true`, then the + # updates + # made within this transaction aren't recorded in the change stream. + # + # * If you don't set the DDL option `allow_txn_exclusion` or if it's + # set to `false`, then the updates made within this transaction are + # recorded in the change stream. + # + # When `exclude_txn_from_change_streams` is set to `false` or not set, + # modifications from this transaction are recorded in all change streams + # that are tracking columns modified by these transactions. + # + # The `exclude_txn_from_change_streams` option can only be specified + # for read-write or partitioned DML transactions, otherwise the API returns + # an `INVALID_ARGUMENT` error. + # @!attribute [rw] isolation_level + # @return [::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel] + # Isolation level for the transaction. + class TransactionOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message type to initiate a read-write transaction. Currently this + # transaction type has no options. + # @!attribute [rw] read_lock_mode + # @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite::ReadLockMode] + # Read lock mode for the transaction. + # @!attribute [rw] multiplexed_session_previous_transaction_id + # @return [::String] + # Optional. Clients should pass the transaction ID of the previous + # transaction attempt that was aborted if this transaction is being + # executed on a multiplexed session. + class ReadWrite + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # `ReadLockMode` is used to set the read lock mode for read-write + # transactions. + module ReadLockMode + # Default value. + # + # * If isolation level is + # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::SERIALIZABLE SERIALIZABLE}, + # locking semantics default to `PESSIMISTIC`. + # * If isolation level is + # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::REPEATABLE_READ REPEATABLE_READ}, + # locking semantics default to `OPTIMISTIC`. + # * See + # [Concurrency + # control](https://cloud.google.com/spanner/docs/concurrency-control) + # for more details. + READ_LOCK_MODE_UNSPECIFIED = 0 + + # Pessimistic lock mode. + # + # Lock acquisition behavior depends on the isolation level in use. In + # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::SERIALIZABLE SERIALIZABLE} + # isolation, reads and writes acquire necessary locks during transaction + # statement execution. In + # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::REPEATABLE_READ REPEATABLE_READ} + # isolation, reads that explicitly request to be locked and writes + # acquire locks. + # See + # [Concurrency + # control](https://cloud.google.com/spanner/docs/concurrency-control) for + # details on the types of locks acquired at each transaction step. + PESSIMISTIC = 1 + + # Optimistic lock mode. + # + # Lock acquisition behavior depends on the isolation level in use. In + # both + # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::SERIALIZABLE SERIALIZABLE} + # and + # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::REPEATABLE_READ REPEATABLE_READ} + # isolation, reads and writes do not acquire locks during transaction + # statement execution. + # See + # [Concurrency + # control](https://cloud.google.com/spanner/docs/concurrency-control) for + # details on how the guarantees of each isolation level are provided at + # commit time. + OPTIMISTIC = 2 + end + end + + # Message type to initiate a Partitioned DML transaction. + class PartitionedDml + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message type to initiate a read-only transaction. + # @!attribute [rw] strong + # @return [::Boolean] + # Read at a timestamp where all previously committed transactions + # are visible. + # + # Note: The following fields are mutually exclusive: `strong`, `min_read_timestamp`, `max_staleness`, `read_timestamp`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] min_read_timestamp + # @return [::Google::Protobuf::Timestamp] + # Executes all reads at a timestamp >= `min_read_timestamp`. + # + # This is useful for requesting fresher data than some previous + # read, or data that is fresh enough to observe the effects of some + # previously committed transaction whose timestamp is known. + # + # Note that this option can only be used in single-use transactions. + # + # A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. + # Example: `"2014-10-02T15:01:23.045123456Z"`. + # + # Note: The following fields are mutually exclusive: `min_read_timestamp`, `strong`, `max_staleness`, `read_timestamp`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] max_staleness + # @return [::Google::Protobuf::Duration] + # Read data at a timestamp >= `NOW - max_staleness` + # seconds. Guarantees that all writes that have committed more + # than the specified number of seconds ago are visible. Because + # Cloud Spanner chooses the exact timestamp, this mode works even if + # the client's local clock is substantially skewed from Cloud Spanner + # commit timestamps. + # + # Useful for reading the freshest data available at a nearby + # replica, while bounding the possible staleness if the local + # replica has fallen behind. + # + # Note that this option can only be used in single-use + # transactions. + # + # Note: The following fields are mutually exclusive: `max_staleness`, `strong`, `min_read_timestamp`, `read_timestamp`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] read_timestamp + # @return [::Google::Protobuf::Timestamp] + # Executes all reads at the given timestamp. Unlike other modes, + # reads at a specific timestamp are repeatable; the same read at + # the same timestamp always returns the same data. If the + # timestamp is in the future, the read is blocked until the + # specified timestamp, modulo the read's deadline. + # + # Useful for large scale consistent reads such as mapreduces, or + # for coordinating many reads against a consistent snapshot of the + # data. + # + # A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. + # Example: `"2014-10-02T15:01:23.045123456Z"`. + # + # Note: The following fields are mutually exclusive: `read_timestamp`, `strong`, `min_read_timestamp`, `max_staleness`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exact_staleness + # @return [::Google::Protobuf::Duration] + # Executes all reads at a timestamp that is `exact_staleness` + # old. The timestamp is chosen soon after the read is started. + # + # Guarantees that all writes that have committed more than the + # specified number of seconds ago are visible. Because Cloud Spanner + # chooses the exact timestamp, this mode works even if the client's + # local clock is substantially skewed from Cloud Spanner commit + # timestamps. + # + # Useful for reading at nearby replicas without the distributed + # timestamp negotiation overhead of `max_staleness`. + # + # Note: The following fields are mutually exclusive: `exact_staleness`, `strong`, `min_read_timestamp`, `max_staleness`, `read_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] return_read_timestamp + # @return [::Boolean] + # If true, the Cloud Spanner-selected read timestamp is included in + # the {::Google::Cloud::Spanner::V1::Transaction Transaction} message that describes + # the transaction. + class ReadOnly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `IsolationLevel` is used when setting the [isolation + # level](https://cloud.google.com/spanner/docs/isolation-levels) for a + # transaction. + module IsolationLevel + # Default value. + # + # If the value is not specified, the `SERIALIZABLE` isolation level is + # used. + ISOLATION_LEVEL_UNSPECIFIED = 0 + + # All transactions appear as if they executed in a serial order, even if + # some of the reads, writes, and other operations of distinct transactions + # actually occurred in parallel. Spanner assigns commit timestamps that + # reflect the order of committed transactions to implement this property. + # Spanner offers a stronger guarantee than serializability called external + # consistency. For more information, see + # [TrueTime and external + # consistency](https://cloud.google.com/spanner/docs/true-time-external-consistency#serializability). + SERIALIZABLE = 1 + + # All reads performed during the transaction observe a consistent snapshot + # of the database, and the transaction is only successfully committed in + # the absence of conflicts between its updates and any concurrent updates + # that have occurred since that snapshot. Consequently, in contrast to + # `SERIALIZABLE` transactions, only write-write conflicts are detected in + # snapshot transactions. + # + # This isolation level does not support read-only and partitioned DML + # transactions. + # + # When `REPEATABLE_READ` is specified on a read-write transaction, the + # locking semantics default to `OPTIMISTIC`. + REPEATABLE_READ = 2 + end + end + + # A transaction. + # @!attribute [rw] id + # @return [::String] + # `id` may be used to identify the transaction in subsequent + # {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}, + # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit}, or + # {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback} calls. + # + # Single-use read-only transactions do not have IDs, because + # single-use transactions do not support multiple requests. + # @!attribute [rw] read_timestamp + # @return [::Google::Protobuf::Timestamp] + # For snapshot read-only transactions, the read timestamp chosen + # for the transaction. Not returned by default: see + # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#return_read_timestamp TransactionOptions.ReadOnly.return_read_timestamp}. + # + # A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. + # Example: `"2014-10-02T15:01:23.045123456Z"`. + # @!attribute [rw] precommit_token + # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] + # A precommit token is included in the response of a BeginTransaction + # request if the read-write transaction is on a multiplexed session and + # a mutation_key was specified in the + # {::Google::Cloud::Spanner::V1::BeginTransactionRequest BeginTransaction}. + # The precommit token with the highest sequence number from this transaction + # attempt should be passed to the {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} + # request for this transaction. + # @!attribute [rw] cache_update + # @return [::Google::Cloud::Spanner::V1::CacheUpdate] + # Optional. A cache update expresses a set of changes the client should + # incorporate into its location cache. The client should discard the changes + # if they are older than the data it already has. This data can be obtained + # in response to requests that included a `RoutingHint` field, but may also + # be obtained by explicit location-fetching RPCs which may be added in the + # future. + class Transaction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message is used to select the transaction in which a + # {::Google::Cloud::Spanner::V1::Spanner::Client#read Read} or + # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} call runs. + # + # See {::Google::Cloud::Spanner::V1::TransactionOptions TransactionOptions} for more + # information about transactions. + # @!attribute [rw] single_use + # @return [::Google::Cloud::Spanner::V1::TransactionOptions] + # Execute the read or SQL query in a temporary transaction. + # This is the most efficient way to execute a transaction that + # consists of a single SQL query. + # + # Note: The following fields are mutually exclusive: `single_use`, `id`, `begin`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id + # @return [::String] + # Execute the read or SQL query in a previously-started transaction. + # + # Note: The following fields are mutually exclusive: `id`, `single_use`, `begin`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] begin + # @return [::Google::Cloud::Spanner::V1::TransactionOptions] + # Begin a new transaction and execute this read or SQL query in + # it. The transaction ID of the new transaction is returned in + # {::Google::Cloud::Spanner::V1::ResultSetMetadata#transaction ResultSetMetadata.transaction}, + # which is a {::Google::Cloud::Spanner::V1::Transaction Transaction}. + # + # Note: The following fields are mutually exclusive: `begin`, `single_use`, `id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TransactionSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # When a read-write transaction is executed on a multiplexed session, + # this precommit token is sent back to the client + # as a part of the {::Google::Cloud::Spanner::V1::Transaction Transaction} message in the + # {::Google::Cloud::Spanner::V1::BeginTransactionRequest BeginTransaction} response and + # also as a part of the {::Google::Cloud::Spanner::V1::ResultSet ResultSet} and + # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} responses. + # @!attribute [rw] precommit_token + # @return [::String] + # Opaque precommit token. + # @!attribute [rw] seq_num + # @return [::Integer] + # An incrementing seq number is generated on every precommit token + # that is returned. Clients should remember the precommit token with the + # highest sequence number from the current transaction attempt. + class MultiplexedSessionPrecommitToken + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/type.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/type.rb new file mode 100644 index 000000000000..693060eddddf --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/type.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Spanner + module V1 + # `Type` indicates the type of a Cloud Spanner value, as might be stored in a + # table cell or returned from an SQL query. + # @!attribute [rw] code + # @return [::Google::Cloud::Spanner::V1::TypeCode] + # Required. The {::Google::Cloud::Spanner::V1::TypeCode TypeCode} for this type. + # @!attribute [rw] array_element_type + # @return [::Google::Cloud::Spanner::V1::Type] + # If {::Google::Cloud::Spanner::V1::Type#code code} == + # {::Google::Cloud::Spanner::V1::TypeCode::ARRAY ARRAY}, then `array_element_type` is the + # type of the array elements. + # @!attribute [rw] struct_type + # @return [::Google::Cloud::Spanner::V1::StructType] + # If {::Google::Cloud::Spanner::V1::Type#code code} == + # {::Google::Cloud::Spanner::V1::TypeCode::STRUCT STRUCT}, then `struct_type` provides + # type information for the struct's fields. + # @!attribute [rw] type_annotation + # @return [::Google::Cloud::Spanner::V1::TypeAnnotationCode] + # The {::Google::Cloud::Spanner::V1::TypeAnnotationCode TypeAnnotationCode} that + # disambiguates SQL type that Spanner will use to represent values of this + # type during query processing. This is necessary for some type codes because + # a single {::Google::Cloud::Spanner::V1::TypeCode TypeCode} can be mapped to different + # SQL types depending on the SQL dialect. + # {::Google::Cloud::Spanner::V1::Type#type_annotation type_annotation} typically is not + # needed to process the content of a value (it doesn't affect serialization) + # and clients can ignore it on the read path. + # @!attribute [rw] proto_type_fqn + # @return [::String] + # If {::Google::Cloud::Spanner::V1::Type#code code} == + # {::Google::Cloud::Spanner::V1::TypeCode::PROTO PROTO} or + # {::Google::Cloud::Spanner::V1::Type#code code} == + # {::Google::Cloud::Spanner::V1::TypeCode::ENUM ENUM}, then `proto_type_fqn` is the fully + # qualified name of the proto type representing the proto/enum definition. + class Type + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `StructType` defines the fields of a + # {::Google::Cloud::Spanner::V1::TypeCode::STRUCT STRUCT} type. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Spanner::V1::StructType::Field>] + # The list of fields that make up this struct. Order is + # significant, because values of this struct type are represented as + # lists, where the order of field values matches the order of + # fields in the {::Google::Cloud::Spanner::V1::StructType StructType}. In turn, the + # order of fields matches the order of columns in a read request, or the + # order of fields in the `SELECT` clause of a query. + class StructType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message representing a single field of a struct. + # @!attribute [rw] name + # @return [::String] + # The name of the field. For reads, this is the column name. For + # SQL queries, it is the column alias (e.g., `"Word"` in the + # query `"SELECT 'hello' AS Word"`), or the column name (e.g., + # `"ColName"` in the query `"SELECT ColName FROM Table"`). Some + # columns might have an empty name (e.g., `"SELECT + # UPPER(ColName)"`). Note that a query result can contain + # multiple fields with the same name. + # @!attribute [rw] type + # @return [::Google::Cloud::Spanner::V1::Type] + # The type of the field. + class Field + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `TypeCode` is used as part of {::Google::Cloud::Spanner::V1::Type Type} to + # indicate the type of a Cloud Spanner value. + # + # Each legal value of a type can be encoded to or decoded from a JSON + # value, using the encodings described below. All Cloud Spanner values can + # be `null`, regardless of type; `null`s are always encoded as a JSON + # `null`. + module TypeCode + # Not specified. + TYPE_CODE_UNSPECIFIED = 0 + + # Encoded as JSON `true` or `false`. + BOOL = 1 + + # Encoded as `string`, in decimal format. + INT64 = 2 + + # Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or + # `"-Infinity"`. + FLOAT64 = 3 + + # Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or + # `"-Infinity"`. + FLOAT32 = 15 + + # Encoded as `string` in RFC 3339 timestamp format. The time zone + # must be present, and must be `"Z"`. + # + # If the schema has the column option + # `allow_commit_timestamp=true`, the placeholder string + # `"spanner.commit_timestamp()"` can be used to instruct the system + # to insert the commit timestamp associated with the transaction + # commit. + TIMESTAMP = 4 + + # Encoded as `string` in RFC 3339 date format. + DATE = 5 + + # Encoded as `string`. + STRING = 6 + + # Encoded as a base64-encoded `string`, as described in RFC 4648, + # section 4. + BYTES = 7 + + # Encoded as `list`, where the list elements are represented + # according to + # {::Google::Cloud::Spanner::V1::Type#array_element_type array_element_type}. + ARRAY = 8 + + # Encoded as `list`, where list element `i` is represented according + # to [struct_type.fields[i]][google.spanner.v1.StructType.fields]. + STRUCT = 9 + + # Encoded as `string`, in decimal format or scientific notation format. + # Decimal format: + # `[+-]Digits[.[Digits]]` or + # `[+-][Digits].Digits` + # + # Scientific notation: + # `[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or + # `[+-][Digits].Digits[ExponentIndicator[+-]Digits]` + # (ExponentIndicator is `"e"` or `"E"`) + NUMERIC = 10 + + # Encoded as a JSON-formatted `string` as described in RFC 7159. The + # following rules are applied when parsing JSON input: + # + # - Whitespace characters are not preserved. + # - If a JSON object has duplicate keys, only the first key is preserved. + # - Members of a JSON object are not guaranteed to have their order + # preserved. + # - JSON array elements will have their order preserved. + JSON = 11 + + # Encoded as a base64-encoded `string`, as described in RFC 4648, + # section 4. + PROTO = 13 + + # Encoded as `string`, in decimal format. + ENUM = 14 + + # Encoded as `string`, in `ISO8601` duration format - + # `P[n]Y[n]M[n]DT[n]H[n]M[n[.fraction]]S` + # where `n` is an integer. + # For example, `P1Y2M3DT4H5M6.5S` represents time duration of 1 year, 2 + # months, 3 days, 4 hours, 5 minutes, and 6.5 seconds. + INTERVAL = 16 + + # Encoded as `string`, in lower-case hexa-decimal format, as described + # in RFC 9562, section 4. + UUID = 17 + end + + # `TypeAnnotationCode` is used as a part of {::Google::Cloud::Spanner::V1::Type Type} to + # disambiguate SQL types that should be used for a given Cloud Spanner value. + # Disambiguation is needed because the same Cloud Spanner type can be mapped to + # different SQL types depending on SQL dialect. TypeAnnotationCode doesn't + # affect the way value is serialized. + module TypeAnnotationCode + # Not specified. + TYPE_ANNOTATION_CODE_UNSPECIFIED = 0 + + # PostgreSQL compatible NUMERIC type. This annotation needs to be applied to + # {::Google::Cloud::Spanner::V1::Type Type} instances having + # {::Google::Cloud::Spanner::V1::TypeCode::NUMERIC NUMERIC} type code to specify that + # values of this type should be treated as PostgreSQL NUMERIC values. + # Currently this annotation is always needed for + # {::Google::Cloud::Spanner::V1::TypeCode::NUMERIC NUMERIC} when a client interacts with + # PostgreSQL-enabled Spanner databases. + PG_NUMERIC = 2 + + # PostgreSQL compatible JSONB type. This annotation needs to be applied to + # {::Google::Cloud::Spanner::V1::Type Type} instances having + # {::Google::Cloud::Spanner::V1::TypeCode::JSON JSON} type code to specify that values of + # this type should be treated as PostgreSQL JSONB values. Currently this + # annotation is always needed for {::Google::Cloud::Spanner::V1::TypeCode::JSON JSON} + # when a client interacts with PostgreSQL-enabled Spanner databases. + PG_JSONB = 3 + + # PostgreSQL compatible OID type. This annotation can be used by a client + # interacting with PostgreSQL-enabled Spanner database to specify that a + # value should be treated using the semantics of the OID type. + PG_OID = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-spanner-v1/snippets/Gemfile new file mode 100644 index 000000000000..77b0e1097706 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-spanner-v1", path: "../" +else + gem "google-cloud-spanner-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json b/owl-bot-staging/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json new file mode 100644 index 000000000000..8f892d90b39b --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json @@ -0,0 +1,695 @@ +{ + "client_library": { + "name": "google-cloud-spanner-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.spanner.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "spanner_v1_generated_Spanner_CreateSession_sync", + "title": "Snippet for the create_session call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#create_session.", + "file": "spanner/create_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_session", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#create_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::CreateSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::Session", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "CreateSession", + "full_name": "google.spanner.v1.Spanner.CreateSession", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_BatchCreateSessions_sync", + "title": "Snippet for the batch_create_sessions call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions.", + "file": "spanner/batch_create_sessions.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_sessions", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::BatchCreateSessionsResponse", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "BatchCreateSessions", + "full_name": "google.spanner.v1.Spanner.BatchCreateSessions", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_GetSession_sync", + "title": "Snippet for the get_session call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#get_session.", + "file": "spanner/get_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_session", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#get_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::GetSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::Session", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "GetSession", + "full_name": "google.spanner.v1.Spanner.GetSession", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_ListSessions_sync", + "title": "Snippet for the list_sessions call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#list_sessions.", + "file": "spanner/list_sessions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sessions", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#list_sessions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::ListSessionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::ListSessionsResponse", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "ListSessions", + "full_name": "google.spanner.v1.Spanner.ListSessions", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_DeleteSession_sync", + "title": "Snippet for the delete_session call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#delete_session.", + "file": "spanner/delete_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_session", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#delete_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::DeleteSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "DeleteSession", + "full_name": "google.spanner.v1.Spanner.DeleteSession", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_ExecuteSql_sync", + "title": "Snippet for the execute_sql call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#execute_sql.", + "file": "spanner/execute_sql.rb", + "language": "RUBY", + "client_method": { + "short_name": "execute_sql", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::ExecuteSqlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::ResultSet", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "ExecuteSql", + "full_name": "google.spanner.v1.Spanner.ExecuteSql", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_ExecuteStreamingSql_sync", + "title": "Snippet for the execute_streaming_sql call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql.", + "file": "spanner/execute_streaming_sql.rb", + "language": "RUBY", + "client_method": { + "short_name": "execute_streaming_sql", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::ExecuteSqlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::PartialResultSet", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "ExecuteStreamingSql", + "full_name": "google.spanner.v1.Spanner.ExecuteStreamingSql", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_ExecuteBatchDml_sync", + "title": "Snippet for the execute_batch_dml call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml.", + "file": "spanner/execute_batch_dml.rb", + "language": "RUBY", + "client_method": { + "short_name": "execute_batch_dml", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "ExecuteBatchDml", + "full_name": "google.spanner.v1.Spanner.ExecuteBatchDml", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_Read_sync", + "title": "Snippet for the read call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#read.", + "file": "spanner/read.rb", + "language": "RUBY", + "client_method": { + "short_name": "read", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#read", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::ReadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::ResultSet", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "Read", + "full_name": "google.spanner.v1.Spanner.Read", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_StreamingRead_sync", + "title": "Snippet for the streaming_read call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#streaming_read.", + "file": "spanner/streaming_read.rb", + "language": "RUBY", + "client_method": { + "short_name": "streaming_read", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#streaming_read", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::ReadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::PartialResultSet", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "StreamingRead", + "full_name": "google.spanner.v1.Spanner.StreamingRead", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_BeginTransaction_sync", + "title": "Snippet for the begin_transaction call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction.", + "file": "spanner/begin_transaction.rb", + "language": "RUBY", + "client_method": { + "short_name": "begin_transaction", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::BeginTransactionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::Transaction", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "BeginTransaction", + "full_name": "google.spanner.v1.Spanner.BeginTransaction", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_Commit_sync", + "title": "Snippet for the commit call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#commit.", + "file": "spanner/commit.rb", + "language": "RUBY", + "client_method": { + "short_name": "commit", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#commit", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::CommitRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::CommitResponse", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "Commit", + "full_name": "google.spanner.v1.Spanner.Commit", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_Rollback_sync", + "title": "Snippet for the rollback call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#rollback.", + "file": "spanner/rollback.rb", + "language": "RUBY", + "client_method": { + "short_name": "rollback", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#rollback", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::RollbackRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "Rollback", + "full_name": "google.spanner.v1.Spanner.Rollback", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_PartitionQuery_sync", + "title": "Snippet for the partition_query call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#partition_query.", + "file": "spanner/partition_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "partition_query", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#partition_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::PartitionQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::PartitionResponse", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "PartitionQuery", + "full_name": "google.spanner.v1.Spanner.PartitionQuery", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_PartitionRead_sync", + "title": "Snippet for the partition_read call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#partition_read.", + "file": "spanner/partition_read.rb", + "language": "RUBY", + "client_method": { + "short_name": "partition_read", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#partition_read", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::PartitionReadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::PartitionResponse", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "PartitionRead", + "full_name": "google.spanner.v1.Spanner.PartitionRead", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_BatchWrite_sync", + "title": "Snippet for the batch_write call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#batch_write.", + "file": "spanner/batch_write.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_write", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#batch_write", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::BatchWriteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::BatchWriteResponse", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "BatchWrite", + "full_name": "google.spanner.v1.Spanner.BatchWrite", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "spanner_v1_generated_Spanner_FetchCacheUpdate_sync", + "title": "Snippet for the fetch_cache_update call in the Spanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#fetch_cache_update.", + "file": "spanner/fetch_cache_update.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_cache_update", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#fetch_cache_update", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Spanner::V1::CacheUpdate", + "client": { + "short_name": "Spanner::Client", + "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" + }, + "method": { + "short_name": "FetchCacheUpdate", + "full_name": "google.spanner.v1.Spanner.FetchCacheUpdate", + "service": { + "short_name": "Spanner", + "full_name": "google.spanner.v1.Spanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_create_sessions.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_create_sessions.rb new file mode 100644 index 000000000000..0586ea617219 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_create_sessions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_BatchCreateSessions_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the batch_create_sessions call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions. +# +def batch_create_sessions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::BatchCreateSessionsRequest.new + + # Call the batch_create_sessions method. + result = client.batch_create_sessions request + + # The returned object is of type Google::Cloud::Spanner::V1::BatchCreateSessionsResponse. + p result +end +# [END spanner_v1_generated_Spanner_BatchCreateSessions_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_write.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_write.rb new file mode 100644 index 000000000000..b95914412706 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_write.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_BatchWrite_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the batch_write call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#batch_write. +# +def batch_write + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::BatchWriteRequest.new + + # Call the batch_write method to start streaming. + output = client.batch_write request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Spanner::V1::BatchWriteResponse + output.each do |current_response| + p current_response + end +end +# [END spanner_v1_generated_Spanner_BatchWrite_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/begin_transaction.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/begin_transaction.rb new file mode 100644 index 000000000000..491b1932c86d --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/begin_transaction.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_BeginTransaction_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the begin_transaction call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction. +# +def begin_transaction + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::BeginTransactionRequest.new + + # Call the begin_transaction method. + result = client.begin_transaction request + + # The returned object is of type Google::Cloud::Spanner::V1::Transaction. + p result +end +# [END spanner_v1_generated_Spanner_BeginTransaction_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/commit.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/commit.rb new file mode 100644 index 000000000000..bdef590c536b --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/commit.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_Commit_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the commit call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#commit. +# +def commit + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::CommitRequest.new + + # Call the commit method. + result = client.commit request + + # The returned object is of type Google::Cloud::Spanner::V1::CommitResponse. + p result +end +# [END spanner_v1_generated_Spanner_Commit_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/create_session.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/create_session.rb new file mode 100644 index 000000000000..2978e20b708d --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/create_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_CreateSession_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the create_session call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#create_session. +# +def create_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::CreateSessionRequest.new + + # Call the create_session method. + result = client.create_session request + + # The returned object is of type Google::Cloud::Spanner::V1::Session. + p result +end +# [END spanner_v1_generated_Spanner_CreateSession_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/delete_session.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/delete_session.rb new file mode 100644 index 000000000000..0fe6714eefc1 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/delete_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_DeleteSession_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the delete_session call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#delete_session. +# +def delete_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::DeleteSessionRequest.new + + # Call the delete_session method. + result = client.delete_session request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END spanner_v1_generated_Spanner_DeleteSession_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_batch_dml.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_batch_dml.rb new file mode 100644 index 000000000000..0dfff556a81d --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_batch_dml.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_ExecuteBatchDml_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the execute_batch_dml call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml. +# +def execute_batch_dml + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest.new + + # Call the execute_batch_dml method. + result = client.execute_batch_dml request + + # The returned object is of type Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse. + p result +end +# [END spanner_v1_generated_Spanner_ExecuteBatchDml_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_sql.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_sql.rb new file mode 100644 index 000000000000..25fda1b8ff3f --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_sql.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_ExecuteSql_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the execute_sql call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#execute_sql. +# +def execute_sql + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::ExecuteSqlRequest.new + + # Call the execute_sql method. + result = client.execute_sql request + + # The returned object is of type Google::Cloud::Spanner::V1::ResultSet. + p result +end +# [END spanner_v1_generated_Spanner_ExecuteSql_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_streaming_sql.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_streaming_sql.rb new file mode 100644 index 000000000000..e96077064cca --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_streaming_sql.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_ExecuteStreamingSql_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the execute_streaming_sql call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql. +# +def execute_streaming_sql + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::ExecuteSqlRequest.new + + # Call the execute_streaming_sql method to start streaming. + output = client.execute_streaming_sql request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Spanner::V1::PartialResultSet + output.each do |current_response| + p current_response + end +end +# [END spanner_v1_generated_Spanner_ExecuteStreamingSql_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/fetch_cache_update.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/fetch_cache_update.rb new file mode 100644 index 000000000000..b459fe3f05ad --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/fetch_cache_update.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_FetchCacheUpdate_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the fetch_cache_update call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#fetch_cache_update. +# +def fetch_cache_update + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::FetchCacheUpdateRequest.new + + # Call the fetch_cache_update method to start streaming. + output = client.fetch_cache_update request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Spanner::V1::CacheUpdate + output.each do |current_response| + p current_response + end +end +# [END spanner_v1_generated_Spanner_FetchCacheUpdate_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/get_session.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/get_session.rb new file mode 100644 index 000000000000..57e3f09069af --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/get_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_GetSession_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the get_session call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#get_session. +# +def get_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::GetSessionRequest.new + + # Call the get_session method. + result = client.get_session request + + # The returned object is of type Google::Cloud::Spanner::V1::Session. + p result +end +# [END spanner_v1_generated_Spanner_GetSession_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/list_sessions.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/list_sessions.rb new file mode 100644 index 000000000000..ad2e46e5db36 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/list_sessions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_ListSessions_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the list_sessions call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#list_sessions. +# +def list_sessions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::ListSessionsRequest.new + + # Call the list_sessions method. + result = client.list_sessions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Spanner::V1::Session. + p item + end +end +# [END spanner_v1_generated_Spanner_ListSessions_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_query.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_query.rb new file mode 100644 index 000000000000..fe7511916bee --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_query.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_PartitionQuery_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the partition_query call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#partition_query. +# +def partition_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::PartitionQueryRequest.new + + # Call the partition_query method. + result = client.partition_query request + + # The returned object is of type Google::Cloud::Spanner::V1::PartitionResponse. + p result +end +# [END spanner_v1_generated_Spanner_PartitionQuery_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_read.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_read.rb new file mode 100644 index 000000000000..548247d9a655 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_read.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_PartitionRead_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the partition_read call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#partition_read. +# +def partition_read + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::PartitionReadRequest.new + + # Call the partition_read method. + result = client.partition_read request + + # The returned object is of type Google::Cloud::Spanner::V1::PartitionResponse. + p result +end +# [END spanner_v1_generated_Spanner_PartitionRead_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/read.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/read.rb new file mode 100644 index 000000000000..e0ae8f6a89bd --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/read.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_Read_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the read call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#read. +# +def read + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::ReadRequest.new + + # Call the read method. + result = client.read request + + # The returned object is of type Google::Cloud::Spanner::V1::ResultSet. + p result +end +# [END spanner_v1_generated_Spanner_Read_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/rollback.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/rollback.rb new file mode 100644 index 000000000000..aa46e63322b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/rollback.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_Rollback_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the rollback call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#rollback. +# +def rollback + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::RollbackRequest.new + + # Call the rollback method. + result = client.rollback request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END spanner_v1_generated_Spanner_Rollback_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/streaming_read.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/streaming_read.rb new file mode 100644 index 000000000000..858dafcebeb7 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/streaming_read.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START spanner_v1_generated_Spanner_StreamingRead_sync] +require "google/cloud/spanner/v1" + +## +# Snippet for the streaming_read call in the Spanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Spanner::V1::Spanner::Client#streaming_read. +# +def streaming_read + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Spanner::V1::Spanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Spanner::V1::ReadRequest.new + + # Call the streaming_read method to start streaming. + output = client.streaming_read request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Spanner::V1::PartialResultSet + output.each do |current_response| + p current_response + end +end +# [END spanner_v1_generated_Spanner_StreamingRead_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_test.rb b/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_test.rb new file mode 100644 index 000000000000..f1898edbaf00 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/spanner/v1/spanner" + +class ::Google::Cloud::Spanner::V1::Spanner::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_database_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.database_path project: "value0", instance: "value1", database: "value2" + assert_equal "projects/value0/instances/value1/databases/value2", path + end + end + + def test_session_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.session_path project: "value0", instance: "value1", database: "value2", session: "value3" + assert_equal "projects/value0/instances/value1/databases/value2/sessions/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_test.rb b/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_test.rb new file mode 100644 index 000000000000..cb1799597ef6 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_test.rb @@ -0,0 +1,1346 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/spanner/v1/spanner_pb" +require "google/cloud/spanner/v1/spanner" + +class ::Google::Cloud::Spanner::V1::Spanner::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::Session.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = "hello world" + session = {} + + create_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_session, name + assert_kind_of ::Google::Cloud::Spanner::V1::CreateSessionRequest, request + assert_equal "hello world", request["database"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::Session), request["session"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_session_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_session({ database: database, session: session }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_session database: database, session: session do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_session ::Google::Cloud::Spanner::V1::CreateSessionRequest.new(database: database, session: session) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_session({ database: database, session: session }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_session(::Google::Cloud::Spanner::V1::CreateSessionRequest.new(database: database, session: session), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_session_client_stub.call_rpc_count + end + end + + def test_batch_create_sessions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::BatchCreateSessionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = "hello world" + session_template = {} + session_count = 42 + + batch_create_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_sessions, name + assert_kind_of ::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest, request + assert_equal "hello world", request["database"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::Session), request["session_template"] + assert_equal 42, request["session_count"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_sessions_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_create_sessions({ database: database, session_template: session_template, session_count: session_count }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_create_sessions database: database, session_template: session_template, session_count: session_count do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_create_sessions ::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest.new(database: database, session_template: session_template, session_count: session_count) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_create_sessions({ database: database, session_template: session_template, session_count: session_count }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_create_sessions(::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest.new(database: database, session_template: session_template, session_count: session_count), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_create_sessions_client_stub.call_rpc_count + end + end + + def test_get_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::Session.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_session, name + assert_kind_of ::Google::Cloud::Spanner::V1::GetSessionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_session_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_session({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_session name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_session ::Google::Cloud::Spanner::V1::GetSessionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_session({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_session(::Google::Cloud::Spanner::V1::GetSessionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_session_client_stub.call_rpc_count + end + end + + def test_list_sessions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::ListSessionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sessions, name + assert_kind_of ::Google::Cloud::Spanner::V1::ListSessionsRequest, request + assert_equal "hello world", request["database"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sessions_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_sessions({ database: database, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_sessions database: database, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_sessions ::Google::Cloud::Spanner::V1::ListSessionsRequest.new(database: database, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_sessions({ database: database, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_sessions(::Google::Cloud::Spanner::V1::ListSessionsRequest.new(database: database, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_sessions_client_stub.call_rpc_count + end + end + + def test_delete_session + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_session, name + assert_kind_of ::Google::Cloud::Spanner::V1::DeleteSessionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_session_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_session({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_session name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_session ::Google::Cloud::Spanner::V1::DeleteSessionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_session({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_session(::Google::Cloud::Spanner::V1::DeleteSessionRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_session_client_stub.call_rpc_count + end + end + + def test_execute_sql + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::ResultSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + session = "hello world" + transaction = {} + sql = "hello world" + params = {} + param_types = {} + resume_token = "hello world" + query_mode = :NORMAL + partition_token = "hello world" + seqno = 42 + query_options = {} + request_options = {} + directed_read_options = {} + data_boost_enabled = true + last_statement = true + routing_hint = {} + + execute_sql_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :execute_sql, name + assert_kind_of ::Google::Cloud::Spanner::V1::ExecuteSqlRequest, request + assert_equal "hello world", request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] + assert_equal "hello world", request["sql"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Struct), request["params"] + assert_equal({}, request["param_types"].to_h) + assert_equal "hello world", request["resume_token"] + assert_equal :NORMAL, request["query_mode"] + assert_equal "hello world", request["partition_token"] + assert_equal 42, request["seqno"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions), request["query_options"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::DirectedReadOptions), request["directed_read_options"] + assert_equal true, request["data_boost_enabled"] + assert_equal true, request["last_statement"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, execute_sql_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.execute_sql({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.execute_sql session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.execute_sql ::Google::Cloud::Spanner::V1::ExecuteSqlRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.execute_sql({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.execute_sql(::Google::Cloud::Spanner::V1::ExecuteSqlRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, execute_sql_client_stub.call_rpc_count + end + end + + def test_execute_streaming_sql + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::PartialResultSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a server streaming method. + session = "hello world" + transaction = {} + sql = "hello world" + params = {} + param_types = {} + resume_token = "hello world" + query_mode = :NORMAL + partition_token = "hello world" + seqno = 42 + query_options = {} + request_options = {} + directed_read_options = {} + data_boost_enabled = true + last_statement = true + routing_hint = {} + + execute_streaming_sql_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :execute_streaming_sql, name + assert_kind_of ::Google::Cloud::Spanner::V1::ExecuteSqlRequest, request + assert_equal "hello world", request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] + assert_equal "hello world", request["sql"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Struct), request["params"] + assert_equal({}, request["param_types"].to_h) + assert_equal "hello world", request["resume_token"] + assert_equal :NORMAL, request["query_mode"] + assert_equal "hello world", request["partition_token"] + assert_equal 42, request["seqno"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions), request["query_options"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::DirectedReadOptions), request["directed_read_options"] + assert_equal true, request["data_boost_enabled"] + assert_equal true, request["last_statement"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, execute_streaming_sql_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.execute_streaming_sql({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + c.execute_streaming_sql session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.execute_streaming_sql ::Google::Cloud::Spanner::V1::ExecuteSqlRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.execute_streaming_sql({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.execute_streaming_sql(::Google::Cloud::Spanner::V1::ExecuteSqlRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, execute_streaming_sql_client_stub.call_rpc_count + end + end + + def test_execute_batch_dml + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + session = "hello world" + transaction = {} + statements = [{}] + seqno = 42 + request_options = {} + last_statements = true + + execute_batch_dml_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :execute_batch_dml, name + assert_kind_of ::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest, request + assert_equal "hello world", request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] + assert_kind_of ::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement, request["statements"].first + assert_equal 42, request["seqno"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] + assert_equal true, request["last_statements"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, execute_batch_dml_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.execute_batch_dml({ session: session, transaction: transaction, statements: statements, seqno: seqno, request_options: request_options, last_statements: last_statements }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.execute_batch_dml session: session, transaction: transaction, statements: statements, seqno: seqno, request_options: request_options, last_statements: last_statements do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.execute_batch_dml ::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest.new(session: session, transaction: transaction, statements: statements, seqno: seqno, request_options: request_options, last_statements: last_statements) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.execute_batch_dml({ session: session, transaction: transaction, statements: statements, seqno: seqno, request_options: request_options, last_statements: last_statements }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.execute_batch_dml(::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest.new(session: session, transaction: transaction, statements: statements, seqno: seqno, request_options: request_options, last_statements: last_statements), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, execute_batch_dml_client_stub.call_rpc_count + end + end + + def test_read + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::ResultSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + session = "hello world" + transaction = {} + table = "hello world" + index = "hello world" + columns = ["hello world"] + key_set = {} + limit = 42 + resume_token = "hello world" + partition_token = "hello world" + request_options = {} + directed_read_options = {} + data_boost_enabled = true + order_by = :ORDER_BY_UNSPECIFIED + lock_hint = :LOCK_HINT_UNSPECIFIED + routing_hint = {} + + read_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :read, name + assert_kind_of ::Google::Cloud::Spanner::V1::ReadRequest, request + assert_equal "hello world", request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] + assert_equal "hello world", request["table"] + assert_equal "hello world", request["index"] + assert_equal ["hello world"], request["columns"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::KeySet), request["key_set"] + assert_equal 42, request["limit"] + assert_equal "hello world", request["resume_token"] + assert_equal "hello world", request["partition_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::DirectedReadOptions), request["directed_read_options"] + assert_equal true, request["data_boost_enabled"] + assert_equal :ORDER_BY_UNSPECIFIED, request["order_by"] + assert_equal :LOCK_HINT_UNSPECIFIED, request["lock_hint"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, read_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.read session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.read ::Google::Cloud::Spanner::V1::ReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.read(::Google::Cloud::Spanner::V1::ReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, read_client_stub.call_rpc_count + end + end + + def test_streaming_read + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::PartialResultSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a server streaming method. + session = "hello world" + transaction = {} + table = "hello world" + index = "hello world" + columns = ["hello world"] + key_set = {} + limit = 42 + resume_token = "hello world" + partition_token = "hello world" + request_options = {} + directed_read_options = {} + data_boost_enabled = true + order_by = :ORDER_BY_UNSPECIFIED + lock_hint = :LOCK_HINT_UNSPECIFIED + routing_hint = {} + + streaming_read_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :streaming_read, name + assert_kind_of ::Google::Cloud::Spanner::V1::ReadRequest, request + assert_equal "hello world", request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] + assert_equal "hello world", request["table"] + assert_equal "hello world", request["index"] + assert_equal ["hello world"], request["columns"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::KeySet), request["key_set"] + assert_equal 42, request["limit"] + assert_equal "hello world", request["resume_token"] + assert_equal "hello world", request["partition_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::DirectedReadOptions), request["directed_read_options"] + assert_equal true, request["data_boost_enabled"] + assert_equal :ORDER_BY_UNSPECIFIED, request["order_by"] + assert_equal :LOCK_HINT_UNSPECIFIED, request["lock_hint"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, streaming_read_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.streaming_read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + c.streaming_read session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.streaming_read ::Google::Cloud::Spanner::V1::ReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.streaming_read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.streaming_read(::Google::Cloud::Spanner::V1::ReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, streaming_read_client_stub.call_rpc_count + end + end + + def test_begin_transaction + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::Transaction.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + session = "hello world" + options = {} + request_options = {} + mutation_key = {} + routing_hint = {} + + begin_transaction_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :begin_transaction, name + assert_kind_of ::Google::Cloud::Spanner::V1::BeginTransactionRequest, request + assert_equal "hello world", request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionOptions), request["options"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::Mutation), request["mutation_key"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, begin_transaction_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.begin_transaction({ session: session, options: options, request_options: request_options, mutation_key: mutation_key, routing_hint: routing_hint }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.begin_transaction session: session, options: options, request_options: request_options, mutation_key: mutation_key, routing_hint: routing_hint do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.begin_transaction ::Google::Cloud::Spanner::V1::BeginTransactionRequest.new(session: session, options: options, request_options: request_options, mutation_key: mutation_key, routing_hint: routing_hint) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.begin_transaction({ session: session, options: options, request_options: request_options, mutation_key: mutation_key, routing_hint: routing_hint }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.begin_transaction(::Google::Cloud::Spanner::V1::BeginTransactionRequest.new(session: session, options: options, request_options: request_options, mutation_key: mutation_key, routing_hint: routing_hint), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, begin_transaction_client_stub.call_rpc_count + end + end + + def test_commit + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::CommitResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + session = "hello world" + transaction_id = "hello world" + mutations = [{}] + return_commit_stats = true + max_commit_delay = {} + request_options = {} + precommit_token = {} + routing_hint = {} + + commit_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :commit, name + assert_kind_of ::Google::Cloud::Spanner::V1::CommitRequest, request + assert_equal "hello world", request["session"] + assert_equal "hello world", request["transaction_id"] + assert_equal :transaction_id, request.transaction + assert_kind_of ::Google::Cloud::Spanner::V1::Mutation, request["mutations"].first + assert_equal true, request["return_commit_stats"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["max_commit_delay"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken), request["precommit_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, commit_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.commit({ session: session, transaction_id: transaction_id, mutations: mutations, return_commit_stats: return_commit_stats, max_commit_delay: max_commit_delay, request_options: request_options, precommit_token: precommit_token, routing_hint: routing_hint }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.commit session: session, transaction_id: transaction_id, mutations: mutations, return_commit_stats: return_commit_stats, max_commit_delay: max_commit_delay, request_options: request_options, precommit_token: precommit_token, routing_hint: routing_hint do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.commit ::Google::Cloud::Spanner::V1::CommitRequest.new(session: session, transaction_id: transaction_id, mutations: mutations, return_commit_stats: return_commit_stats, max_commit_delay: max_commit_delay, request_options: request_options, precommit_token: precommit_token, routing_hint: routing_hint) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.commit({ session: session, transaction_id: transaction_id, mutations: mutations, return_commit_stats: return_commit_stats, max_commit_delay: max_commit_delay, request_options: request_options, precommit_token: precommit_token, routing_hint: routing_hint }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.commit(::Google::Cloud::Spanner::V1::CommitRequest.new(session: session, transaction_id: transaction_id, mutations: mutations, return_commit_stats: return_commit_stats, max_commit_delay: max_commit_delay, request_options: request_options, precommit_token: precommit_token, routing_hint: routing_hint), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, commit_client_stub.call_rpc_count + end + end + + def test_rollback + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + session = "hello world" + transaction_id = "hello world" + + rollback_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rollback, name + assert_kind_of ::Google::Cloud::Spanner::V1::RollbackRequest, request + assert_equal "hello world", request["session"] + assert_equal "hello world", request["transaction_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rollback_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.rollback({ session: session, transaction_id: transaction_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.rollback session: session, transaction_id: transaction_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.rollback ::Google::Cloud::Spanner::V1::RollbackRequest.new(session: session, transaction_id: transaction_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.rollback({ session: session, transaction_id: transaction_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.rollback(::Google::Cloud::Spanner::V1::RollbackRequest.new(session: session, transaction_id: transaction_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rollback_client_stub.call_rpc_count + end + end + + def test_partition_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::PartitionResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + session = "hello world" + transaction = {} + sql = "hello world" + params = {} + param_types = {} + partition_options = {} + + partition_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :partition_query, name + assert_kind_of ::Google::Cloud::Spanner::V1::PartitionQueryRequest, request + assert_equal "hello world", request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] + assert_equal "hello world", request["sql"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Struct), request["params"] + assert_equal({}, request["param_types"].to_h) + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::PartitionOptions), request["partition_options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, partition_query_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.partition_query({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, partition_options: partition_options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.partition_query session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, partition_options: partition_options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.partition_query ::Google::Cloud::Spanner::V1::PartitionQueryRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, partition_options: partition_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.partition_query({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, partition_options: partition_options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.partition_query(::Google::Cloud::Spanner::V1::PartitionQueryRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, partition_options: partition_options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, partition_query_client_stub.call_rpc_count + end + end + + def test_partition_read + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::PartitionResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + session = "hello world" + transaction = {} + table = "hello world" + index = "hello world" + columns = ["hello world"] + key_set = {} + partition_options = {} + + partition_read_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :partition_read, name + assert_kind_of ::Google::Cloud::Spanner::V1::PartitionReadRequest, request + assert_equal "hello world", request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] + assert_equal "hello world", request["table"] + assert_equal "hello world", request["index"] + assert_equal ["hello world"], request["columns"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::KeySet), request["key_set"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::PartitionOptions), request["partition_options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, partition_read_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.partition_read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, partition_options: partition_options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.partition_read session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, partition_options: partition_options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.partition_read ::Google::Cloud::Spanner::V1::PartitionReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, partition_options: partition_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.partition_read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, partition_options: partition_options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.partition_read(::Google::Cloud::Spanner::V1::PartitionReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, partition_options: partition_options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, partition_read_client_stub.call_rpc_count + end + end + + def test_batch_write + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::BatchWriteResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a server streaming method. + session = "hello world" + request_options = {} + mutation_groups = [{}] + exclude_txn_from_change_streams = true + + batch_write_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :batch_write, name + assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteRequest, request + assert_equal "hello world", request["session"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] + assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteRequest::MutationGroup, request["mutation_groups"].first + assert_equal true, request["exclude_txn_from_change_streams"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_write_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_write({ session: session, request_options: request_options, mutation_groups: mutation_groups, exclude_txn_from_change_streams: exclude_txn_from_change_streams }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_write session: session, request_options: request_options, mutation_groups: mutation_groups, exclude_txn_from_change_streams: exclude_txn_from_change_streams do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_write ::Google::Cloud::Spanner::V1::BatchWriteRequest.new(session: session, request_options: request_options, mutation_groups: mutation_groups, exclude_txn_from_change_streams: exclude_txn_from_change_streams) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_write({ session: session, request_options: request_options, mutation_groups: mutation_groups, exclude_txn_from_change_streams: exclude_txn_from_change_streams }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_write(::Google::Cloud::Spanner::V1::BatchWriteRequest.new(session: session, request_options: request_options, mutation_groups: mutation_groups, exclude_txn_from_change_streams: exclude_txn_from_change_streams), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_write_client_stub.call_rpc_count + end + end + + def test_fetch_cache_update + # Create GRPC objects. + grpc_response = ::Google::Cloud::Spanner::V1::CacheUpdate.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a server streaming method. + database = "hello world" + max_recipe_count = 42 + max_range_count = 42 + + fetch_cache_update_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :fetch_cache_update, name + assert_kind_of ::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest, request + assert_equal "hello world", request["database"] + assert_equal 42, request["max_recipe_count"] + assert_equal 42, request["max_range_count"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_cache_update_client_stub do + # Create client + c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.fetch_cache_update({ database: database, max_recipe_count: max_recipe_count, max_range_count: max_range_count }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::CacheUpdate, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + c.fetch_cache_update database: database, max_recipe_count: max_recipe_count, max_range_count: max_range_count do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::CacheUpdate, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.fetch_cache_update ::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest.new(database: database, max_recipe_count: max_recipe_count, max_range_count: max_range_count) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::CacheUpdate, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.fetch_cache_update({ database: database, max_recipe_count: max_recipe_count, max_range_count: max_range_count }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::CacheUpdate, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.fetch_cache_update(::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest.new(database: database, max_recipe_count: max_recipe_count, max_range_count: max_range_count), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Spanner::V1::CacheUpdate, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_cache_update_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Spanner::V1::Spanner::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Spanner::V1::Spanner::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-spanner-v1/test/helper.rb b/owl-bot-staging/google-cloud-spanner-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-spanner-v1/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-speech-v1/.gitignore b/owl-bot-staging/google-cloud-speech-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/.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-speech-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-speech-v1/.repo-metadata.json new file mode 100644 index 000000000000..2c94c817be63 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "speech.googleapis.com", + "api_shortname": "speech", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-speech-v1/latest", + "distribution_name": "google-cloud-speech-v1", + "is_cloud": true, + "language": "ruby", + "name": "speech", + "name_pretty": "Cloud Speech-to-Text V1 API", + "product_documentation": "https://cloud.google.com/speech-to-text", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. Note that google-cloud-speech-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-speech instead. See the readme for more details.", + "ruby-cloud-env-prefix": "SPEECH", + "ruby-cloud-product-url": "https://cloud.google.com/speech-to-text", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-speech-v1/.rubocop.yml b/owl-bot-staging/google-cloud-speech-v1/.rubocop.yml new file mode 100644 index 000000000000..3c22305c5efd --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-speech-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-speech-v1.rb" diff --git a/owl-bot-staging/google-cloud-speech-v1/.toys.rb b/owl-bot-staging/google-cloud-speech-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-speech-v1/.yardopts b/owl-bot-staging/google-cloud-speech-v1/.yardopts new file mode 100644 index 000000000000..a7bd0f2eaed7 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Speech-to-Text V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-speech-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-speech-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..3c4dc7e2d2ce --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-speech-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-speech-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/speech/v1" + +client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/speech/v1" + +::Google::Cloud::Speech::V1::Speech::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Speech::V1::Speech::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-speech-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/speech/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Speech::V1::Speech::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-speech-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-speech-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-speech-v1/Gemfile b/owl-bot-staging/google-cloud-speech-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-speech-v1/LICENSE.md b/owl-bot-staging/google-cloud-speech-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-speech-v1/README.md b/owl-bot-staging/google-cloud-speech-v1/README.md new file mode 100644 index 000000000000..b6487d40b93b --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Speech-to-Text V1 API + +Converts audio to text by applying powerful neural network models. + +Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Speech-to-Text V1 API. Most users should consider using +the main client gem, +[google-cloud-speech](https://rubygems.org/gems/google-cloud-speech). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-speech-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/speech.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/speech/v1" + +client = ::Google::Cloud::Speech::V1::Speech::Client.new +request = ::Google::Cloud::Speech::V1::RecognizeRequest.new # (request fields as keyword arguments...) +response = client.recognize request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-speech-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/speech-to-text) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/speech/v1" +require "logger" + +client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-speech`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-speech-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-speech`. +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-speech-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-speech-v1/Rakefile b/owl-bot-staging/google-cloud-speech-v1/Rakefile new file mode 100644 index 000000000000..4e0a18b9fab2 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-speech-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SPEECH_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SPEECH_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SPEECH_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 SPEECH_TEST_PROJECT=test123 SPEECH_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/speech/v1/speech/credentials" + ::Google::Cloud::Speech::V1::Speech::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SPEECH_PROJECT"] = project + ENV["SPEECH_TEST_PROJECT"] = project + ENV["SPEECH_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-speech-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-speech-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-speech-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-speech-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-speech-v1" + header "google-cloud-speech-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-speech-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-speech-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-speech-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-speech-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-speech-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-speech-v1/gapic_metadata.json new file mode 100644 index 000000000000..b8215cef6ab6 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/gapic_metadata.json @@ -0,0 +1,92 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.speech.v1", + "libraryPackage": "::Google::Cloud::Speech::V1", + "services": { + "Speech": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Speech::V1::Speech::Client", + "rpcs": { + "Recognize": { + "methods": [ + "recognize" + ] + }, + "LongRunningRecognize": { + "methods": [ + "long_running_recognize" + ] + }, + "StreamingRecognize": { + "methods": [ + "streaming_recognize" + ] + } + } + } + } + }, + "Adaptation": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Speech::V1::Adaptation::Client", + "rpcs": { + "CreatePhraseSet": { + "methods": [ + "create_phrase_set" + ] + }, + "GetPhraseSet": { + "methods": [ + "get_phrase_set" + ] + }, + "ListPhraseSet": { + "methods": [ + "list_phrase_set" + ] + }, + "UpdatePhraseSet": { + "methods": [ + "update_phrase_set" + ] + }, + "DeletePhraseSet": { + "methods": [ + "delete_phrase_set" + ] + }, + "CreateCustomClass": { + "methods": [ + "create_custom_class" + ] + }, + "GetCustomClass": { + "methods": [ + "get_custom_class" + ] + }, + "ListCustomClasses": { + "methods": [ + "list_custom_classes" + ] + }, + "UpdateCustomClass": { + "methods": [ + "update_custom_class" + ] + }, + "DeleteCustomClass": { + "methods": [ + "delete_custom_class" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-speech-v1/google-cloud-speech-v1.gemspec b/owl-bot-staging/google-cloud-speech-v1/google-cloud-speech-v1.gemspec new file mode 100644 index 000000000000..9edc44b2885c --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/google-cloud-speech-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/speech/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-speech-v1" + gem.version = Google::Cloud::Speech::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. Note that google-cloud-speech-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-speech instead. See the readme for more details." + gem.summary = "Converts audio to text by applying powerful neural network models." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google-cloud-speech-v1.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google-cloud-speech-v1.rb new file mode 100644 index 000000000000..203644080a2e --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google-cloud-speech-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/speech/v1" diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1.rb new file mode 100644 index 000000000000..3a78a0bfcd8b --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/speech/v1/speech" +require "google/cloud/speech/v1/adaptation" +require "google/cloud/speech/v1/version" + +module Google + module Cloud + module Speech + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/speech/v1" + # client = ::Google::Cloud::Speech::V1::Speech::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/speech/v1" + # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/speech/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation.rb new file mode 100644 index 000000000000..13699cd76973 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/speech/v1/version" + +require "google/cloud/speech/v1/adaptation/credentials" +require "google/cloud/speech/v1/adaptation/paths" +require "google/cloud/speech/v1/adaptation/client" +require "google/cloud/speech/v1/adaptation/rest" + +module Google + module Cloud + module Speech + module V1 + ## + # Service that implements Google Cloud Speech Adaptation API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/speech/v1/adaptation" + # client = ::Google::Cloud::Speech::V1::Adaptation::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/speech/v1/adaptation/rest" + # client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + module Adaptation + end + end + end + end +end + +helper_path = ::File.join __dir__, "adaptation", "helpers.rb" +require "google/cloud/speech/v1/adaptation/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/client.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/client.rb new file mode 100644 index 000000000000..af6f3724ead2 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/client.rb @@ -0,0 +1,1436 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/speech/v1/cloud_speech_adaptation_pb" + +module Google + module Cloud + module Speech + module V1 + module Adaptation + ## + # Client for the Adaptation service. + # + # Service that implements Google Cloud Speech Adaptation API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :adaptation_stub + + ## + # Configure the Adaptation Client class. + # + # See {::Google::Cloud::Speech::V1::Adaptation::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Adaptation clients + # ::Google::Cloud::Speech::V1::Adaptation::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Speech", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Adaptation Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Speech::V1::Adaptation::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @adaptation_stub.universe_domain + end + + ## + # Create a new Adaptation client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Speech::V1::Adaptation::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Adaptation client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/speech/v1/cloud_speech_adaptation_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @adaptation_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Speech::V1::Adaptation::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @adaptation_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @adaptation_stub.logger + end + + # Service calls + + ## + # Create a set of phrase hints. Each item in the set can be a single word or + # a multi-word phrase. The items in the PhraseSet are favored by the + # recognition model when you send a call that includes the PhraseSet. + # + # @overload create_phrase_set(request, options = nil) + # Pass arguments to `create_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1::CreatePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::CreatePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_phrase_set(parent: nil, phrase_set_id: nil, phrase_set: nil) + # Pass arguments to `create_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this phrase set will be created. + # Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param phrase_set_id [::String] + # Required. The ID to use for the phrase set, which will become the final + # component of the phrase set's resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @param phrase_set [::Google::Cloud::Speech::V1::PhraseSet, ::Hash] + # Required. The phrase set to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1::PhraseSet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::CreatePhraseSetRequest.new + # + # # Call the create_phrase_set method. + # result = client.create_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. + # p result + # + def create_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::CreatePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_phrase_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :create_phrase_set, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a phrase set. + # + # @overload get_phrase_set(request, options = nil) + # Pass arguments to `get_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1::GetPhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::GetPhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_phrase_set(name: nil) + # Pass arguments to `get_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase set to retrieve. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1::PhraseSet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::GetPhraseSetRequest.new + # + # # Call the get_phrase_set method. + # result = client.get_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. + # p result + # + def get_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::GetPhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_phrase_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :get_phrase_set, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List phrase sets. + # + # @overload list_phrase_set(request, options = nil) + # Pass arguments to `list_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1::ListPhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::ListPhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_phrase_set(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of phrase set. Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param page_size [::Integer] + # The maximum number of phrase sets to return. The service may return + # fewer than this value. If unspecified, at most 50 phrase sets will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListPhraseSet` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPhraseSet` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1::PhraseSet>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1::PhraseSet>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::ListPhraseSetRequest.new + # + # # Call the list_phrase_set method. + # result = client.list_phrase_set request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Speech::V1::PhraseSet. + # p item + # end + # + def list_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::ListPhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_phrase_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :list_phrase_set, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @adaptation_stub, :list_phrase_set, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a phrase set. + # + # @overload update_phrase_set(request, options = nil) + # Pass arguments to `update_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1::UpdatePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::UpdatePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_phrase_set(phrase_set: nil, update_mask: nil) + # Pass arguments to `update_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param phrase_set [::Google::Cloud::Speech::V1::PhraseSet, ::Hash] + # Required. The phrase set to update. + # + # The phrase set's `name` field is used to identify the set to be + # updated. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1::PhraseSet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new + # + # # Call the update_phrase_set method. + # result = client.update_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. + # p result + # + def update_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.phrase_set&.name + header_params["phrase_set.name"] = request.phrase_set.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_phrase_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :update_phrase_set, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a phrase set. + # + # @overload delete_phrase_set(request, options = nil) + # Pass arguments to `delete_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1::DeletePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::DeletePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_phrase_set(name: nil) + # Pass arguments to `delete_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase set to delete. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::DeletePhraseSetRequest.new + # + # # Call the delete_phrase_set method. + # result = client.delete_phrase_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::DeletePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_phrase_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :delete_phrase_set, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a custom class. + # + # @overload create_custom_class(request, options = nil) + # Pass arguments to `create_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1::CreateCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::CreateCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_custom_class(parent: nil, custom_class_id: nil, custom_class: nil) + # Pass arguments to `create_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this custom class will be created. + # Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param custom_class_id [::String] + # Required. The ID to use for the custom class, which will become the final + # component of the custom class' resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @param custom_class [::Google::Cloud::Speech::V1::CustomClass, ::Hash] + # Required. The custom class to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1::CustomClass] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::CreateCustomClassRequest.new + # + # # Call the create_custom_class method. + # result = client.create_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. + # p result + # + def create_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::CreateCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_custom_class.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :create_custom_class, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a custom class. + # + # @overload get_custom_class(request, options = nil) + # Pass arguments to `get_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1::GetCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::GetCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_custom_class(name: nil) + # Pass arguments to `get_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the custom class to retrieve. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1::CustomClass] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::GetCustomClassRequest.new + # + # # Call the get_custom_class method. + # result = client.get_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. + # p result + # + def get_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::GetCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_custom_class.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :get_custom_class, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List custom classes. + # + # @overload list_custom_classes(request, options = nil) + # Pass arguments to `list_custom_classes` via a request object, either of type + # {::Google::Cloud::Speech::V1::ListCustomClassesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::ListCustomClassesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_custom_classes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_custom_classes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of custom classes. Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param page_size [::Integer] + # The maximum number of custom classes to return. The service may return + # fewer than this value. If unspecified, at most 50 custom classes will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListCustomClass` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCustomClass` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1::CustomClass>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1::CustomClass>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::ListCustomClassesRequest.new + # + # # Call the list_custom_classes method. + # result = client.list_custom_classes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Speech::V1::CustomClass. + # p item + # end + # + def list_custom_classes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::ListCustomClassesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_custom_classes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_custom_classes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_custom_classes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :list_custom_classes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @adaptation_stub, :list_custom_classes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a custom class. + # + # @overload update_custom_class(request, options = nil) + # Pass arguments to `update_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1::UpdateCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::UpdateCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_custom_class(custom_class: nil, update_mask: nil) + # Pass arguments to `update_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param custom_class [::Google::Cloud::Speech::V1::CustomClass, ::Hash] + # Required. The custom class to update. + # + # The custom class's `name` field is used to identify the custom class to be + # updated. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1::CustomClass] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::UpdateCustomClassRequest.new + # + # # Call the update_custom_class method. + # result = client.update_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. + # p result + # + def update_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::UpdateCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.custom_class&.name + header_params["custom_class.name"] = request.custom_class.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_custom_class.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :update_custom_class, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a custom class. + # + # @overload delete_custom_class(request, options = nil) + # Pass arguments to `delete_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1::DeleteCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::DeleteCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_custom_class(name: nil) + # Pass arguments to `delete_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the custom class to delete. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::DeleteCustomClassRequest.new + # + # # Call the delete_custom_class method. + # result = client.delete_custom_class request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::DeleteCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_custom_class.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :delete_custom_class, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Adaptation API. + # + # This class represents the configuration for Adaptation, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Speech::V1::Adaptation::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_phrase_set to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Speech::V1::Adaptation::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_phrase_set.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_phrase_set.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Adaptation API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :create_phrase_set + ## + # RPC-specific configuration for `get_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :get_phrase_set + ## + # RPC-specific configuration for `list_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :list_phrase_set + ## + # RPC-specific configuration for `update_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :update_phrase_set + ## + # RPC-specific configuration for `delete_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_phrase_set + ## + # RPC-specific configuration for `create_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :create_custom_class + ## + # RPC-specific configuration for `get_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :get_custom_class + ## + # RPC-specific configuration for `list_custom_classes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_custom_classes + ## + # RPC-specific configuration for `update_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :update_custom_class + ## + # RPC-specific configuration for `delete_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_custom_class + + # @private + def initialize parent_rpcs = nil + create_phrase_set_config = parent_rpcs.create_phrase_set if parent_rpcs.respond_to? :create_phrase_set + @create_phrase_set = ::Gapic::Config::Method.new create_phrase_set_config + get_phrase_set_config = parent_rpcs.get_phrase_set if parent_rpcs.respond_to? :get_phrase_set + @get_phrase_set = ::Gapic::Config::Method.new get_phrase_set_config + list_phrase_set_config = parent_rpcs.list_phrase_set if parent_rpcs.respond_to? :list_phrase_set + @list_phrase_set = ::Gapic::Config::Method.new list_phrase_set_config + update_phrase_set_config = parent_rpcs.update_phrase_set if parent_rpcs.respond_to? :update_phrase_set + @update_phrase_set = ::Gapic::Config::Method.new update_phrase_set_config + delete_phrase_set_config = parent_rpcs.delete_phrase_set if parent_rpcs.respond_to? :delete_phrase_set + @delete_phrase_set = ::Gapic::Config::Method.new delete_phrase_set_config + create_custom_class_config = parent_rpcs.create_custom_class if parent_rpcs.respond_to? :create_custom_class + @create_custom_class = ::Gapic::Config::Method.new create_custom_class_config + get_custom_class_config = parent_rpcs.get_custom_class if parent_rpcs.respond_to? :get_custom_class + @get_custom_class = ::Gapic::Config::Method.new get_custom_class_config + list_custom_classes_config = parent_rpcs.list_custom_classes if parent_rpcs.respond_to? :list_custom_classes + @list_custom_classes = ::Gapic::Config::Method.new list_custom_classes_config + update_custom_class_config = parent_rpcs.update_custom_class if parent_rpcs.respond_to? :update_custom_class + @update_custom_class = ::Gapic::Config::Method.new update_custom_class_config + delete_custom_class_config = parent_rpcs.delete_custom_class if parent_rpcs.respond_to? :delete_custom_class + @delete_custom_class = ::Gapic::Config::Method.new delete_custom_class_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.rb new file mode 100644 index 000000000000..3d08fc44b076 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Speech + module V1 + module Adaptation + # Credentials for the Adaptation API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SPEECH_CREDENTIALS", + "SPEECH_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SPEECH_CREDENTIALS_JSON", + "SPEECH_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.rb new file mode 100644 index 000000000000..57c97718dd9d --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Speech + module V1 + module Adaptation + # Path helper methods for the Adaptation API. + module Paths + ## + # Create a fully-qualified CustomClass resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # @param project [String] + # @param location [String] + # @param custom_class [String] + # + # @return [::String] + def custom_class_path project:, location:, custom_class: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/customClasses/#{custom_class}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified PhraseSet resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # @param project [String] + # @param location [String] + # @param phrase_set [String] + # + # @return [::String] + def phrase_set_path project:, location:, phrase_set: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/phraseSets/#{phrase_set}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.rb new file mode 100644 index 000000000000..3b9be5472f5a --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/speech/v1/version" + +require "google/cloud/speech/v1/adaptation/credentials" +require "google/cloud/speech/v1/adaptation/paths" +require "google/cloud/speech/v1/adaptation/rest/client" + +module Google + module Cloud + module Speech + module V1 + ## + # Service that implements Google Cloud Speech Adaptation API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/speech/v1/adaptation/rest" + # client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + module Adaptation + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/speech/v1/adaptation/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.rb new file mode 100644 index 000000000000..00bf27004afc --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.rb @@ -0,0 +1,1323 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/speech/v1/cloud_speech_adaptation_pb" +require "google/cloud/speech/v1/adaptation/rest/service_stub" + +module Google + module Cloud + module Speech + module V1 + module Adaptation + module Rest + ## + # REST client for the Adaptation service. + # + # Service that implements Google Cloud Speech Adaptation API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :adaptation_stub + + ## + # Configure the Adaptation Client class. + # + # See {::Google::Cloud::Speech::V1::Adaptation::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Adaptation clients + # ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Speech", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Adaptation Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Speech::V1::Adaptation::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @adaptation_stub.universe_domain + end + + ## + # Create a new Adaptation REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Adaptation client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @adaptation_stub = ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @adaptation_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @adaptation_stub.logger + end + + # Service calls + + ## + # Create a set of phrase hints. Each item in the set can be a single word or + # a multi-word phrase. The items in the PhraseSet are favored by the + # recognition model when you send a call that includes the PhraseSet. + # + # @overload create_phrase_set(request, options = nil) + # Pass arguments to `create_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1::CreatePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::CreatePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_phrase_set(parent: nil, phrase_set_id: nil, phrase_set: nil) + # Pass arguments to `create_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this phrase set will be created. + # Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param phrase_set_id [::String] + # Required. The ID to use for the phrase set, which will become the final + # component of the phrase set's resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @param phrase_set [::Google::Cloud::Speech::V1::PhraseSet, ::Hash] + # Required. The phrase set to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::CreatePhraseSetRequest.new + # + # # Call the create_phrase_set method. + # result = client.create_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. + # p result + # + def create_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::CreatePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_phrase_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.create_phrase_set request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a phrase set. + # + # @overload get_phrase_set(request, options = nil) + # Pass arguments to `get_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1::GetPhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::GetPhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_phrase_set(name: nil) + # Pass arguments to `get_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase set to retrieve. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::GetPhraseSetRequest.new + # + # # Call the get_phrase_set method. + # result = client.get_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. + # p result + # + def get_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::GetPhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_phrase_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.get_phrase_set request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List phrase sets. + # + # @overload list_phrase_set(request, options = nil) + # Pass arguments to `list_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1::ListPhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::ListPhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_phrase_set(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of phrase set. Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param page_size [::Integer] + # The maximum number of phrase sets to return. The service may return + # fewer than this value. If unspecified, at most 50 phrase sets will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListPhraseSet` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPhraseSet` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1::PhraseSet>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1::PhraseSet>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::ListPhraseSetRequest.new + # + # # Call the list_phrase_set method. + # result = client.list_phrase_set request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Speech::V1::PhraseSet. + # p item + # end + # + def list_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::ListPhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_phrase_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.list_phrase_set request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @adaptation_stub, :list_phrase_set, "phrase_sets", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a phrase set. + # + # @overload update_phrase_set(request, options = nil) + # Pass arguments to `update_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1::UpdatePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::UpdatePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_phrase_set(phrase_set: nil, update_mask: nil) + # Pass arguments to `update_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param phrase_set [::Google::Cloud::Speech::V1::PhraseSet, ::Hash] + # Required. The phrase set to update. + # + # The phrase set's `name` field is used to identify the set to be + # updated. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new + # + # # Call the update_phrase_set method. + # result = client.update_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. + # p result + # + def update_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_phrase_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.update_phrase_set request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a phrase set. + # + # @overload delete_phrase_set(request, options = nil) + # Pass arguments to `delete_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1::DeletePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::DeletePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_phrase_set(name: nil) + # Pass arguments to `delete_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase set to delete. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::DeletePhraseSetRequest.new + # + # # Call the delete_phrase_set method. + # result = client.delete_phrase_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::DeletePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_phrase_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.delete_phrase_set request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a custom class. + # + # @overload create_custom_class(request, options = nil) + # Pass arguments to `create_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1::CreateCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::CreateCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_custom_class(parent: nil, custom_class_id: nil, custom_class: nil) + # Pass arguments to `create_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this custom class will be created. + # Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param custom_class_id [::String] + # Required. The ID to use for the custom class, which will become the final + # component of the custom class' resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @param custom_class [::Google::Cloud::Speech::V1::CustomClass, ::Hash] + # Required. The custom class to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::CreateCustomClassRequest.new + # + # # Call the create_custom_class method. + # result = client.create_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. + # p result + # + def create_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::CreateCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_custom_class.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.create_custom_class request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a custom class. + # + # @overload get_custom_class(request, options = nil) + # Pass arguments to `get_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1::GetCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::GetCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_custom_class(name: nil) + # Pass arguments to `get_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the custom class to retrieve. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::GetCustomClassRequest.new + # + # # Call the get_custom_class method. + # result = client.get_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. + # p result + # + def get_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::GetCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_custom_class.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.get_custom_class request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List custom classes. + # + # @overload list_custom_classes(request, options = nil) + # Pass arguments to `list_custom_classes` via a request object, either of type + # {::Google::Cloud::Speech::V1::ListCustomClassesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::ListCustomClassesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_custom_classes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_custom_classes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of custom classes. Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param page_size [::Integer] + # The maximum number of custom classes to return. The service may return + # fewer than this value. If unspecified, at most 50 custom classes will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListCustomClass` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCustomClass` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1::CustomClass>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1::CustomClass>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::ListCustomClassesRequest.new + # + # # Call the list_custom_classes method. + # result = client.list_custom_classes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Speech::V1::CustomClass. + # p item + # end + # + def list_custom_classes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::ListCustomClassesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_custom_classes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_custom_classes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_custom_classes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.list_custom_classes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @adaptation_stub, :list_custom_classes, "custom_classes", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a custom class. + # + # @overload update_custom_class(request, options = nil) + # Pass arguments to `update_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1::UpdateCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::UpdateCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_custom_class(custom_class: nil, update_mask: nil) + # Pass arguments to `update_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param custom_class [::Google::Cloud::Speech::V1::CustomClass, ::Hash] + # Required. The custom class to update. + # + # The custom class's `name` field is used to identify the custom class to be + # updated. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::UpdateCustomClassRequest.new + # + # # Call the update_custom_class method. + # result = client.update_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. + # p result + # + def update_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::UpdateCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_custom_class.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.update_custom_class request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a custom class. + # + # @overload delete_custom_class(request, options = nil) + # Pass arguments to `delete_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1::DeleteCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::DeleteCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_custom_class(name: nil) + # Pass arguments to `delete_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the custom class to delete. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::DeleteCustomClassRequest.new + # + # # Call the delete_custom_class method. + # result = client.delete_custom_class request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::DeleteCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_custom_class.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.delete_custom_class request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Adaptation REST API. + # + # This class represents the configuration for Adaptation REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Speech::V1::Adaptation::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_phrase_set to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_phrase_set.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_phrase_set.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Adaptation API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :create_phrase_set + ## + # RPC-specific configuration for `get_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :get_phrase_set + ## + # RPC-specific configuration for `list_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :list_phrase_set + ## + # RPC-specific configuration for `update_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :update_phrase_set + ## + # RPC-specific configuration for `delete_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_phrase_set + ## + # RPC-specific configuration for `create_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :create_custom_class + ## + # RPC-specific configuration for `get_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :get_custom_class + ## + # RPC-specific configuration for `list_custom_classes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_custom_classes + ## + # RPC-specific configuration for `update_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :update_custom_class + ## + # RPC-specific configuration for `delete_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_custom_class + + # @private + def initialize parent_rpcs = nil + create_phrase_set_config = parent_rpcs.create_phrase_set if parent_rpcs.respond_to? :create_phrase_set + @create_phrase_set = ::Gapic::Config::Method.new create_phrase_set_config + get_phrase_set_config = parent_rpcs.get_phrase_set if parent_rpcs.respond_to? :get_phrase_set + @get_phrase_set = ::Gapic::Config::Method.new get_phrase_set_config + list_phrase_set_config = parent_rpcs.list_phrase_set if parent_rpcs.respond_to? :list_phrase_set + @list_phrase_set = ::Gapic::Config::Method.new list_phrase_set_config + update_phrase_set_config = parent_rpcs.update_phrase_set if parent_rpcs.respond_to? :update_phrase_set + @update_phrase_set = ::Gapic::Config::Method.new update_phrase_set_config + delete_phrase_set_config = parent_rpcs.delete_phrase_set if parent_rpcs.respond_to? :delete_phrase_set + @delete_phrase_set = ::Gapic::Config::Method.new delete_phrase_set_config + create_custom_class_config = parent_rpcs.create_custom_class if parent_rpcs.respond_to? :create_custom_class + @create_custom_class = ::Gapic::Config::Method.new create_custom_class_config + get_custom_class_config = parent_rpcs.get_custom_class if parent_rpcs.respond_to? :get_custom_class + @get_custom_class = ::Gapic::Config::Method.new get_custom_class_config + list_custom_classes_config = parent_rpcs.list_custom_classes if parent_rpcs.respond_to? :list_custom_classes + @list_custom_classes = ::Gapic::Config::Method.new list_custom_classes_config + update_custom_class_config = parent_rpcs.update_custom_class if parent_rpcs.respond_to? :update_custom_class + @update_custom_class = ::Gapic::Config::Method.new update_custom_class_config + delete_custom_class_config = parent_rpcs.delete_custom_class if parent_rpcs.respond_to? :delete_custom_class + @delete_custom_class = ::Gapic::Config::Method.new delete_custom_class_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb new file mode 100644 index 000000000000..3eb09c2b9827 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb @@ -0,0 +1,695 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/speech/v1/cloud_speech_adaptation_pb" + +module Google + module Cloud + module Speech + module V1 + module Adaptation + module Rest + ## + # REST service stub for the Adaptation service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::CreatePhraseSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::PhraseSet] + # A result object deserialized from the server's reply + def create_phrase_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_phrase_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_phrase_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1::PhraseSet.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::GetPhraseSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::PhraseSet] + # A result object deserialized from the server's reply + def get_phrase_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_phrase_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_phrase_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1::PhraseSet.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::ListPhraseSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::ListPhraseSetResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::ListPhraseSetResponse] + # A result object deserialized from the server's reply + def list_phrase_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_phrase_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_phrase_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1::ListPhraseSetResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::UpdatePhraseSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::PhraseSet] + # A result object deserialized from the server's reply + def update_phrase_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_phrase_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_phrase_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1::PhraseSet.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::DeletePhraseSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_phrase_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_phrase_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_phrase_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::CreateCustomClassRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::CustomClass] + # A result object deserialized from the server's reply + def create_custom_class request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_custom_class_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_custom_class", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1::CustomClass.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::GetCustomClassRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::CustomClass] + # A result object deserialized from the server's reply + def get_custom_class request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_custom_class_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_custom_class", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1::CustomClass.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_custom_classes REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::ListCustomClassesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::ListCustomClassesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::ListCustomClassesResponse] + # A result object deserialized from the server's reply + def list_custom_classes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_custom_classes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_custom_classes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1::ListCustomClassesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::UpdateCustomClassRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::CustomClass] + # A result object deserialized from the server's reply + def update_custom_class request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_custom_class_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_custom_class", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1::CustomClass.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::DeleteCustomClassRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_custom_class request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_custom_class_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_custom_class", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::CreatePhraseSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_phrase_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/phraseSets", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::GetPhraseSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_phrase_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::ListPhraseSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_phrase_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/phraseSets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::UpdatePhraseSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_phrase_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{phrase_set.name}", + body: "phrase_set", + matches: [ + ["phrase_set.name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::DeletePhraseSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_phrase_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::CreateCustomClassRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_custom_class_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customClasses", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::GetCustomClassRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_custom_class_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_custom_classes REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::ListCustomClassesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_custom_classes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customClasses", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::UpdateCustomClassRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_custom_class_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{custom_class.name}", + body: "custom_class", + matches: [ + ["custom_class.name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::DeleteCustomClassRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_custom_class_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_pb.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_pb.rb new file mode 100644 index 000000000000..602e53dc90e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/speech/v1/cloud_speech_adaptation.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/speech/v1/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n4google/cloud/speech/v1/cloud_speech_adaptation.proto\x12\x16google.cloud.speech.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a%google/cloud/speech/v1/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa9\x01\n\x16\x43reatePhraseSetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\x12\x1a\n\rphrase_set_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12:\n\nphrase_set\x18\x03 \x01(\x0b\x32!.google.cloud.speech.v1.PhraseSetB\x03\xe0\x41\x02\"\x85\x01\n\x16UpdatePhraseSetRequest\x12:\n\nphrase_set\x18\x01 \x01(\x0b\x32!.google.cloud.speech.v1.PhraseSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"L\n\x13GetPhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"v\n\x14ListPhraseSetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"h\n\x15ListPhraseSetResponse\x12\x36\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32!.google.cloud.speech.v1.PhraseSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x16\x44\x65letePhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"\xb3\x01\n\x18\x43reateCustomClassRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\x12\x1c\n\x0f\x63ustom_class_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0c\x63ustom_class\x18\x03 \x01(\x0b\x32#.google.cloud.speech.v1.CustomClassB\x03\xe0\x41\x02\"\x8b\x01\n\x18UpdateCustomClassRequest\x12>\n\x0c\x63ustom_class\x18\x01 \x01(\x0b\x32#.google.cloud.speech.v1.CustomClassB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"P\n\x15GetCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass\"|\n\x18ListCustomClassesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"q\n\x19ListCustomClassesResponse\x12;\n\x0e\x63ustom_classes\x18\x01 \x03(\x0b\x32#.google.cloud.speech.v1.CustomClass\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n\x18\x44\x65leteCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass2\x8e\x0f\n\nAdaptation\x12\xc1\x01\n\x0f\x43reatePhraseSet\x12..google.cloud.speech.v1.CreatePhraseSetRequest\x1a!.google.cloud.speech.v1.PhraseSet\"[\xda\x41\x1fparent,phrase_set,phrase_set_id\x82\xd3\xe4\x93\x02\x33\"./v1/{parent=projects/*/locations/*}/phraseSets:\x01*\x12\x9d\x01\n\x0cGetPhraseSet\x12+.google.cloud.speech.v1.GetPhraseSetRequest\x1a!.google.cloud.speech.v1.PhraseSet\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/phraseSets/*}\x12\xad\x01\n\rListPhraseSet\x12,.google.cloud.speech.v1.ListPhraseSetRequest\x1a-.google.cloud.speech.v1.ListPhraseSetResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/phraseSets\x12\xcc\x01\n\x0fUpdatePhraseSet\x12..google.cloud.speech.v1.UpdatePhraseSetRequest\x1a!.google.cloud.speech.v1.PhraseSet\"f\xda\x41\x16phrase_set,update_mask\x82\xd3\xe4\x93\x02G29/v1/{phrase_set.name=projects/*/locations/*/phraseSets/*}:\nphrase_set\x12\x98\x01\n\x0f\x44\x65letePhraseSet\x12..google.cloud.speech.v1.DeletePhraseSetRequest\x1a\x16.google.protobuf.Empty\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/phraseSets/*}\x12\xce\x01\n\x11\x43reateCustomClass\x12\x30.google.cloud.speech.v1.CreateCustomClassRequest\x1a#.google.cloud.speech.v1.CustomClass\"b\xda\x41#parent,custom_class,custom_class_id\x82\xd3\xe4\x93\x02\x36\"1/v1/{parent=projects/*/locations/*}/customClasses:\x01*\x12\xa6\x01\n\x0eGetCustomClass\x12-.google.cloud.speech.v1.GetCustomClassRequest\x1a#.google.cloud.speech.v1.CustomClass\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/customClasses/*}\x12\xbc\x01\n\x11ListCustomClasses\x12\x30.google.cloud.speech.v1.ListCustomClassesRequest\x1a\x31.google.cloud.speech.v1.ListCustomClassesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/customClasses\x12\xdb\x01\n\x11UpdateCustomClass\x12\x30.google.cloud.speech.v1.UpdateCustomClassRequest\x1a#.google.cloud.speech.v1.CustomClass\"o\xda\x41\x18\x63ustom_class,update_mask\x82\xd3\xe4\x93\x02N2>/v1/{custom_class.name=projects/*/locations/*/customClasses/*}:\x0c\x63ustom_class\x12\x9f\x01\n\x11\x44\x65leteCustomClass\x12\x30.google.cloud.speech.v1.DeleteCustomClassRequest\x1a\x16.google.protobuf.Empty\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/customClasses/*}\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBr\n\x1a\x63om.google.cloud.speech.v1B\x15SpeechAdaptationProtoP\x01Z2cloud.google.com/go/speech/apiv1/speechpb;speechpb\xf8\x01\x01\xa2\x02\x03GCSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Speech + module V1 + CreatePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CreatePhraseSetRequest").msgclass + UpdatePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.UpdatePhraseSetRequest").msgclass + GetPhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.GetPhraseSetRequest").msgclass + ListPhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListPhraseSetRequest").msgclass + ListPhraseSetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListPhraseSetResponse").msgclass + DeletePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.DeletePhraseSetRequest").msgclass + CreateCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CreateCustomClassRequest").msgclass + UpdateCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.UpdateCustomClassRequest").msgclass + GetCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.GetCustomClassRequest").msgclass + ListCustomClassesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListCustomClassesRequest").msgclass + ListCustomClassesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListCustomClassesResponse").msgclass + DeleteCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.DeleteCustomClassRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb new file mode 100644 index 000000000000..9cc7add34e77 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/speech/v1/cloud_speech_adaptation.proto for package 'google.cloud.speech.v1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/speech/v1/cloud_speech_adaptation_pb' + +module Google + module Cloud + module Speech + module V1 + module Adaptation + # Service that implements Google Cloud Speech Adaptation API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.speech.v1.Adaptation' + + # Create a set of phrase hints. Each item in the set can be a single word or + # a multi-word phrase. The items in the PhraseSet are favored by the + # recognition model when you send a call that includes the PhraseSet. + rpc :CreatePhraseSet, ::Google::Cloud::Speech::V1::CreatePhraseSetRequest, ::Google::Cloud::Speech::V1::PhraseSet + # Get a phrase set. + rpc :GetPhraseSet, ::Google::Cloud::Speech::V1::GetPhraseSetRequest, ::Google::Cloud::Speech::V1::PhraseSet + # List phrase sets. + rpc :ListPhraseSet, ::Google::Cloud::Speech::V1::ListPhraseSetRequest, ::Google::Cloud::Speech::V1::ListPhraseSetResponse + # Update a phrase set. + rpc :UpdatePhraseSet, ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest, ::Google::Cloud::Speech::V1::PhraseSet + # Delete a phrase set. + rpc :DeletePhraseSet, ::Google::Cloud::Speech::V1::DeletePhraseSetRequest, ::Google::Protobuf::Empty + # Create a custom class. + rpc :CreateCustomClass, ::Google::Cloud::Speech::V1::CreateCustomClassRequest, ::Google::Cloud::Speech::V1::CustomClass + # Get a custom class. + rpc :GetCustomClass, ::Google::Cloud::Speech::V1::GetCustomClassRequest, ::Google::Cloud::Speech::V1::CustomClass + # List custom classes. + rpc :ListCustomClasses, ::Google::Cloud::Speech::V1::ListCustomClassesRequest, ::Google::Cloud::Speech::V1::ListCustomClassesResponse + # Update a custom class. + rpc :UpdateCustomClass, ::Google::Cloud::Speech::V1::UpdateCustomClassRequest, ::Google::Cloud::Speech::V1::CustomClass + # Delete a custom class. + rpc :DeleteCustomClass, ::Google::Cloud::Speech::V1::DeleteCustomClassRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_pb.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_pb.rb new file mode 100644 index 000000000000..1870ee42f8a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/speech/v1/cloud_speech.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/cloud/speech/v1/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n)google/cloud/speech/v1/cloud_speech.proto\x12\x16google.cloud.speech.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a%google/cloud/speech/v1/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\x90\x01\n\x10RecognizeRequest\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v1.RecognitionConfigB\x03\xe0\x41\x02\x12<\n\x05\x61udio\x18\x02 \x01(\x0b\x32(.google.cloud.speech.v1.RecognitionAudioB\x03\xe0\x41\x02\"\xe7\x01\n\x1bLongRunningRecognizeRequest\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v1.RecognitionConfigB\x03\xe0\x41\x02\x12<\n\x05\x61udio\x18\x02 \x01(\x0b\x32(.google.cloud.speech.v1.RecognitionAudioB\x03\xe0\x41\x02\x12J\n\routput_config\x18\x04 \x01(\x0b\x32..google.cloud.speech.v1.TranscriptOutputConfigB\x03\xe0\x41\x01\":\n\x16TranscriptOutputConfig\x12\x11\n\x07gcs_uri\x18\x01 \x01(\tH\x00\x42\r\n\x0boutput_type\"\x99\x01\n\x19StreamingRecognizeRequest\x12N\n\x10streaming_config\x18\x01 \x01(\x0b\x32\x32.google.cloud.speech.v1.StreamingRecognitionConfigH\x00\x12\x17\n\raudio_content\x18\x02 \x01(\x0cH\x00\x42\x13\n\x11streaming_request\"\xa7\x03\n\x1aStreamingRecognitionConfig\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v1.RecognitionConfigB\x03\xe0\x41\x02\x12\x18\n\x10single_utterance\x18\x02 \x01(\x08\x12\x17\n\x0finterim_results\x18\x03 \x01(\x08\x12$\n\x1c\x65nable_voice_activity_events\x18\x05 \x01(\x08\x12g\n\x16voice_activity_timeout\x18\x06 \x01(\x0b\x32G.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout\x1a\x86\x01\n\x14VoiceActivityTimeout\x12\x37\n\x14speech_start_timeout\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12speech_end_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xca\x08\n\x11RecognitionConfig\x12I\n\x08\x65ncoding\x18\x01 \x01(\x0e\x32\x37.google.cloud.speech.v1.RecognitionConfig.AudioEncoding\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12\x1b\n\x13\x61udio_channel_count\x18\x07 \x01(\x05\x12/\n\'enable_separate_recognition_per_channel\x18\x0c \x01(\x08\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x1a\x61lternative_language_codes\x18\x12 \x03(\t\x12\x18\n\x10max_alternatives\x18\x04 \x01(\x05\x12\x18\n\x10profanity_filter\x18\x05 \x01(\x08\x12<\n\nadaptation\x18\x14 \x01(\x0b\x32(.google.cloud.speech.v1.SpeechAdaptation\x12V\n\x18transcript_normalization\x18\x18 \x01(\x0b\x32/.google.cloud.speech.v1.TranscriptNormalizationB\x03\xe0\x41\x01\x12>\n\x0fspeech_contexts\x18\x06 \x03(\x0b\x32%.google.cloud.speech.v1.SpeechContext\x12 \n\x18\x65nable_word_time_offsets\x18\x08 \x01(\x08\x12\x1e\n\x16\x65nable_word_confidence\x18\x0f \x01(\x08\x12$\n\x1c\x65nable_automatic_punctuation\x18\x0b \x01(\x08\x12=\n\x19\x65nable_spoken_punctuation\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x38\n\x14\x65nable_spoken_emojis\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12L\n\x12\x64iarization_config\x18\x13 \x01(\x0b\x32\x30.google.cloud.speech.v1.SpeakerDiarizationConfig\x12=\n\x08metadata\x18\t \x01(\x0b\x32+.google.cloud.speech.v1.RecognitionMetadata\x12\r\n\x05model\x18\r \x01(\t\x12\x14\n\x0cuse_enhanced\x18\x0e \x01(\x08\"\xa3\x01\n\rAudioEncoding\x12\x18\n\x14\x45NCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\x08\n\x04\x46LAC\x10\x02\x12\t\n\x05MULAW\x10\x03\x12\x07\n\x03\x41MR\x10\x04\x12\n\n\x06\x41MR_WB\x10\x05\x12\x0c\n\x08OGG_OPUS\x10\x06\x12\x1a\n\x16SPEEX_WITH_HEADER_BYTE\x10\x07\x12\x07\n\x03MP3\x10\x08\x12\r\n\tWEBM_OPUS\x10\t\"\x90\x01\n\x18SpeakerDiarizationConfig\x12\"\n\x1a\x65nable_speaker_diarization\x18\x01 \x01(\x08\x12\x19\n\x11min_speaker_count\x18\x02 \x01(\x05\x12\x19\n\x11max_speaker_count\x18\x03 \x01(\x05\x12\x1a\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\"\xa4\x08\n\x13RecognitionMetadata\x12U\n\x10interaction_type\x18\x01 \x01(\x0e\x32;.google.cloud.speech.v1.RecognitionMetadata.InteractionType\x12$\n\x1cindustry_naics_code_of_audio\x18\x03 \x01(\r\x12[\n\x13microphone_distance\x18\x04 \x01(\x0e\x32>.google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance\x12Z\n\x13original_media_type\x18\x05 \x01(\x0e\x32=.google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType\x12^\n\x15recording_device_type\x18\x06 \x01(\x0e\x32?.google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType\x12\x1d\n\x15recording_device_name\x18\x07 \x01(\t\x12\x1a\n\x12original_mime_type\x18\x08 \x01(\t\x12\x13\n\x0b\x61udio_topic\x18\n \x01(\t\"\xc5\x01\n\x0fInteractionType\x12 \n\x1cINTERACTION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nDISCUSSION\x10\x01\x12\x10\n\x0cPRESENTATION\x10\x02\x12\x0e\n\nPHONE_CALL\x10\x03\x12\r\n\tVOICEMAIL\x10\x04\x12\x1b\n\x17PROFESSIONALLY_PRODUCED\x10\x05\x12\x10\n\x0cVOICE_SEARCH\x10\x06\x12\x11\n\rVOICE_COMMAND\x10\x07\x12\r\n\tDICTATION\x10\x08\"d\n\x12MicrophoneDistance\x12#\n\x1fMICROPHONE_DISTANCE_UNSPECIFIED\x10\x00\x12\r\n\tNEARFIELD\x10\x01\x12\x0c\n\x08MIDFIELD\x10\x02\x12\x0c\n\x08\x46\x41RFIELD\x10\x03\"N\n\x11OriginalMediaType\x12#\n\x1fORIGINAL_MEDIA_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41UDIO\x10\x01\x12\t\n\x05VIDEO\x10\x02\"\xa4\x01\n\x13RecordingDeviceType\x12%\n!RECORDING_DEVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nSMARTPHONE\x10\x01\x12\x06\n\x02PC\x10\x02\x12\x0e\n\nPHONE_LINE\x10\x03\x12\x0b\n\x07VEHICLE\x10\x04\x12\x18\n\x14OTHER_OUTDOOR_DEVICE\x10\x05\x12\x17\n\x13OTHER_INDOOR_DEVICE\x10\x06:\x02\x18\x01\"/\n\rSpeechContext\x12\x0f\n\x07phrases\x18\x01 \x03(\t\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\"D\n\x10RecognitionAudio\x12\x11\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x12\r\n\x03uri\x18\x02 \x01(\tH\x00\x42\x0e\n\x0c\x61udio_source\"\xed\x01\n\x11RecognizeResponse\x12@\n\x07results\x18\x02 \x03(\x0b\x32/.google.cloud.speech.v1.SpeechRecognitionResult\x12\x34\n\x11total_billed_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x16speech_adaptation_info\x18\x07 \x01(\x0b\x32,.google.cloud.speech.v1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\x08 \x01(\x03\"\xe9\x02\n\x1cLongRunningRecognizeResponse\x12@\n\x07results\x18\x02 \x03(\x0b\x32/.google.cloud.speech.v1.SpeechRecognitionResult\x12\x34\n\x11total_billed_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32..google.cloud.speech.v1.TranscriptOutputConfig\x12(\n\x0coutput_error\x18\x07 \x01(\x0b\x32\x12.google.rpc.Status\x12L\n\x16speech_adaptation_info\x18\x08 \x01(\x0b\x32,.google.cloud.speech.v1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\t \x01(\x03\"\xb0\x01\n\x1cLongRunningRecognizeMetadata\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x03uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xd1\x04\n\x1aStreamingRecognizeResponse\x12!\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x43\n\x07results\x18\x02 \x03(\x0b\x32\x32.google.cloud.speech.v1.StreamingRecognitionResult\x12]\n\x11speech_event_type\x18\x04 \x01(\x0e\x32\x42.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType\x12\x34\n\x11speech_event_time\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11total_billed_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x16speech_adaptation_info\x18\t \x01(\x0b\x32,.google.cloud.speech.v1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\n \x01(\x03\"\x9d\x01\n\x0fSpeechEventType\x12\x1c\n\x18SPEECH_EVENT_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x01\x12\x19\n\x15SPEECH_ACTIVITY_BEGIN\x10\x02\x12\x17\n\x13SPEECH_ACTIVITY_END\x10\x03\x12\x1b\n\x17SPEECH_ACTIVITY_TIMEOUT\x10\x04\"\xf2\x01\n\x1aStreamingRecognitionResult\x12J\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x34.google.cloud.speech.v1.SpeechRecognitionAlternative\x12\x10\n\x08is_final\x18\x02 \x01(\x08\x12\x11\n\tstability\x18\x03 \x01(\x02\x12\x32\n\x0fresult_end_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x63hannel_tag\x18\x05 \x01(\x05\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x03\"\xca\x01\n\x17SpeechRecognitionResult\x12J\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x34.google.cloud.speech.v1.SpeechRecognitionAlternative\x12\x13\n\x0b\x63hannel_tag\x18\x02 \x01(\x05\x12\x32\n\x0fresult_end_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\"w\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12/\n\x05words\x18\x03 \x03(\x0b\x32 .google.cloud.speech.v1.WordInfo\"\xc0\x01\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x1a\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x1a\n\rspeaker_label\x18\x06 \x01(\tB\x03\xe0\x41\x03\"K\n\x14SpeechAdaptationInfo\x12\x1a\n\x12\x61\x64\x61ptation_timeout\x18\x01 \x01(\x08\x12\x17\n\x0ftimeout_message\x18\x04 \x01(\t2\xd1\x04\n\x06Speech\x12\x90\x01\n\tRecognize\x12(.google.cloud.speech.v1.RecognizeRequest\x1a).google.cloud.speech.v1.RecognizeResponse\".\xda\x41\x0c\x63onfig,audio\x82\xd3\xe4\x93\x02\x19\"\x14/v1/speech:recognize:\x01*\x12\xe4\x01\n\x14LongRunningRecognize\x12\x33.google.cloud.speech.v1.LongRunningRecognizeRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41<\n\x1cLongRunningRecognizeResponse\x12\x1cLongRunningRecognizeMetadata\xda\x41\x0c\x63onfig,audio\x82\xd3\xe4\x93\x02$\"\x1f/v1/speech:longrunningrecognize:\x01*\x12\x81\x01\n\x12StreamingRecognize\x12\x31.google.cloud.speech.v1.StreamingRecognizeRequest\x1a\x32.google.cloud.speech.v1.StreamingRecognizeResponse\"\x00(\x01\x30\x01\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBh\n\x1a\x63om.google.cloud.speech.v1B\x0bSpeechProtoP\x01Z2cloud.google.com/go/speech/apiv1/speechpb;speechpb\xf8\x01\x01\xa2\x02\x03GCSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Speech + module V1 + RecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognizeRequest").msgclass + LongRunningRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.LongRunningRecognizeRequest").msgclass + TranscriptOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.TranscriptOutputConfig").msgclass + StreamingRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognizeRequest").msgclass + StreamingRecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognitionConfig").msgclass + StreamingRecognitionConfig::VoiceActivityTimeout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout").msgclass + RecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionConfig").msgclass + RecognitionConfig::AudioEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionConfig.AudioEncoding").enummodule + SpeakerDiarizationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeakerDiarizationConfig").msgclass + RecognitionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionMetadata").msgclass + RecognitionMetadata::InteractionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionMetadata.InteractionType").enummodule + RecognitionMetadata::MicrophoneDistance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance").enummodule + RecognitionMetadata::OriginalMediaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType").enummodule + RecognitionMetadata::RecordingDeviceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType").enummodule + SpeechContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechContext").msgclass + RecognitionAudio = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionAudio").msgclass + RecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognizeResponse").msgclass + LongRunningRecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.LongRunningRecognizeResponse").msgclass + LongRunningRecognizeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.LongRunningRecognizeMetadata").msgclass + StreamingRecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognizeResponse").msgclass + StreamingRecognizeResponse::SpeechEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType").enummodule + StreamingRecognitionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognitionResult").msgclass + SpeechRecognitionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechRecognitionResult").msgclass + SpeechRecognitionAlternative = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechRecognitionAlternative").msgclass + WordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.WordInfo").msgclass + SpeechAdaptationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechAdaptationInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb new file mode 100644 index 000000000000..872e6df62f83 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/speech/v1/cloud_speech.proto for package 'google.cloud.speech.v1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/speech/v1/cloud_speech_pb' + +module Google + module Cloud + module Speech + module V1 + module Speech + # Service that implements Google Cloud Speech API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.speech.v1.Speech' + + # Performs synchronous speech recognition: receive results after all audio + # has been sent and processed. + rpc :Recognize, ::Google::Cloud::Speech::V1::RecognizeRequest, ::Google::Cloud::Speech::V1::RecognizeResponse + # Performs asynchronous speech recognition: receive results via the + # google.longrunning.Operations interface. Returns either an + # `Operation.error` or an `Operation.response` which contains + # a `LongRunningRecognizeResponse` message. + # For more information on asynchronous speech recognition, see the + # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). + rpc :LongRunningRecognize, ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest, ::Google::Longrunning::Operation + # Performs bidirectional streaming speech recognition: receive results while + # sending audio. This method is only available via the gRPC API (not REST). + rpc :StreamingRecognize, stream(::Google::Cloud::Speech::V1::StreamingRecognizeRequest), stream(::Google::Cloud::Speech::V1::StreamingRecognizeResponse) + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/resource_pb.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/resource_pb.rb new file mode 100644 index 000000000000..2b910a6cea8b --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/resource_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/speech/v1/resource.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n%google/cloud/speech/v1/resource.proto\x12\x16google.cloud.speech.v1\x1a\x19google/api/resource.proto\"\xfc\x01\n\x0b\x43ustomClass\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0f\x63ustom_class_id\x18\x02 \x01(\t\x12<\n\x05items\x18\x03 \x03(\x0b\x32-.google.cloud.speech.v1.CustomClass.ClassItem\x1a\x1a\n\tClassItem\x12\r\n\x05value\x18\x01 \x01(\t:l\xea\x41i\n!speech.googleapis.com/CustomClass\x12\x44projects/{project}/locations/{location}/customClasses/{custom_class}\"\xf2\x01\n\tPhraseSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x07phrases\x18\x02 \x03(\x0b\x32(.google.cloud.speech.v1.PhraseSet.Phrase\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\x1a&\n\x06Phrase\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02:e\xea\x41\x62\n\x1fspeech.googleapis.com/PhraseSet\x12?projects/{project}/locations/{location}/phraseSets/{phrase_set}\"\xbd\x02\n\x10SpeechAdaptation\x12\x36\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32!.google.cloud.speech.v1.PhraseSet\x12\x43\n\x15phrase_set_references\x18\x02 \x03(\tB$\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\x12;\n\x0e\x63ustom_classes\x18\x03 \x03(\x0b\x32#.google.cloud.speech.v1.CustomClass\x12J\n\x0c\x61\x62nf_grammar\x18\x04 \x01(\x0b\x32\x34.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar\x1a#\n\x0b\x41\x42NFGrammar\x12\x14\n\x0c\x61\x62nf_strings\x18\x01 \x03(\t\"\xa3\x01\n\x17TranscriptNormalization\x12\x46\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x35.google.cloud.speech.v1.TranscriptNormalization.Entry\x1a@\n\x05\x45ntry\x12\x0e\n\x06search\x18\x01 \x01(\t\x12\x0f\n\x07replace\x18\x02 \x01(\t\x12\x16\n\x0e\x63\x61se_sensitive\x18\x03 \x01(\x08\x42p\n\x1a\x63om.google.cloud.speech.v1B\x13SpeechResourceProtoP\x01Z2cloud.google.com/go/speech/apiv1/speechpb;speechpb\xf8\x01\x01\xa2\x02\x03GCSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Speech + module V1 + CustomClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CustomClass").msgclass + CustomClass::ClassItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CustomClass.ClassItem").msgclass + PhraseSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.PhraseSet").msgclass + PhraseSet::Phrase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.PhraseSet.Phrase").msgclass + SpeechAdaptation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechAdaptation").msgclass + SpeechAdaptation::ABNFGrammar = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar").msgclass + TranscriptNormalization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.TranscriptNormalization").msgclass + TranscriptNormalization::Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.TranscriptNormalization.Entry").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.rb new file mode 100644 index 000000000000..b039262b9bb0 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/speech/v1/speech/rest" +require "google/cloud/speech/v1/adaptation/rest" +require "google/cloud/speech/v1/version" + +module Google + module Cloud + module Speech + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/speech/v1/rest" + # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech.rb new file mode 100644 index 000000000000..b88111d1fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/speech/v1/version" + +require "google/cloud/speech/v1/speech/credentials" +require "google/cloud/speech/v1/speech/paths" +require "google/cloud/speech/v1/speech/operations" +require "google/cloud/speech/v1/speech/client" +require "google/cloud/speech/v1/speech/rest" + +module Google + module Cloud + module Speech + module V1 + ## + # Service that implements Google Cloud Speech API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/speech/v1/speech" + # client = ::Google::Cloud::Speech::V1::Speech::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/speech/v1/speech/rest" + # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new + # + module Speech + end + end + end + end +end + +helper_path = ::File.join __dir__, "speech", "helpers.rb" +require "google/cloud/speech/v1/speech/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/client.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/client.rb new file mode 100644 index 000000000000..78746525ea93 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/client.rb @@ -0,0 +1,687 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/speech/v1/cloud_speech_pb" + +module Google + module Cloud + module Speech + module V1 + module Speech + ## + # Client for the Speech service. + # + # Service that implements Google Cloud Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :speech_stub + + ## + # Configure the Speech Client class. + # + # See {::Google::Cloud::Speech::V1::Speech::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Speech clients + # ::Google::Cloud::Speech::V1::Speech::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Speech", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.recognize.timeout = 5000.0 + default_config.rpcs.recognize.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.long_running_recognize.timeout = 5000.0 + + default_config.rpcs.streaming_recognize.timeout = 5000.0 + default_config.rpcs.streaming_recognize.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Speech Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Speech::V1::Speech::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @speech_stub.universe_domain + end + + ## + # Create a new Speech client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Speech::V1::Speech::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Speech client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/speech/v1/cloud_speech_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @speech_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Speech::V1::Speech::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @speech_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Speech::V1::Speech::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @speech_stub.logger + end + + # Service calls + + ## + # Performs synchronous speech recognition: receive results after all audio + # has been sent and processed. + # + # @overload recognize(request, options = nil) + # Pass arguments to `recognize` via a request object, either of type + # {::Google::Cloud::Speech::V1::RecognizeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::RecognizeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload recognize(config: nil, audio: nil) + # Pass arguments to `recognize` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param config [::Google::Cloud::Speech::V1::RecognitionConfig, ::Hash] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @param audio [::Google::Cloud::Speech::V1::RecognitionAudio, ::Hash] + # Required. The audio data to be recognized. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1::RecognizeResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1::RecognizeResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Speech::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::RecognizeRequest.new + # + # # Call the recognize method. + # result = client.recognize request + # + # # The returned object is of type Google::Cloud::Speech::V1::RecognizeResponse. + # p result + # + def recognize request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::RecognizeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.recognize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.recognize.timeout, + metadata: metadata, + retry_policy: @config.rpcs.recognize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @speech_stub.call_rpc :recognize, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs asynchronous speech recognition: receive results via the + # google.longrunning.Operations interface. Returns either an + # `Operation.error` or an `Operation.response` which contains + # a `LongRunningRecognizeResponse` message. + # For more information on asynchronous speech recognition, see the + # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). + # + # @overload long_running_recognize(request, options = nil) + # Pass arguments to `long_running_recognize` via a request object, either of type + # {::Google::Cloud::Speech::V1::LongRunningRecognizeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::LongRunningRecognizeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload long_running_recognize(config: nil, audio: nil, output_config: nil) + # Pass arguments to `long_running_recognize` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param config [::Google::Cloud::Speech::V1::RecognitionConfig, ::Hash] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @param audio [::Google::Cloud::Speech::V1::RecognitionAudio, ::Hash] + # Required. The audio data to be recognized. + # @param output_config [::Google::Cloud::Speech::V1::TranscriptOutputConfig, ::Hash] + # Optional. Specifies an optional destination for the recognition results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Speech::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new + # + # # Call the long_running_recognize method. + # result = client.long_running_recognize request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def long_running_recognize request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.long_running_recognize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.long_running_recognize.timeout, + metadata: metadata, + retry_policy: @config.rpcs.long_running_recognize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @speech_stub.call_rpc :long_running_recognize, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs bidirectional streaming speech recognition: receive results while + # sending audio. This method is only available via the gRPC API (not REST). + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Speech::V1::StreamingRecognizeRequest, ::Hash>] + # An enumerable of {::Google::Cloud::Speech::V1::StreamingRecognizeRequest} instances. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Speech::V1::StreamingRecognizeResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Speech::V1::StreamingRecognizeResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Speech::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the streaming_recognize method to start streaming. + # output = client.streaming_recognize input + # + # # Send requests on the stream. For each request object, set fields by + # # passing keyword arguments. Be sure to close the stream when done. + # input << Google::Cloud::Speech::V1::StreamingRecognizeRequest.new + # input << Google::Cloud::Speech::V1::StreamingRecognizeRequest.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Speech::V1::StreamingRecognizeResponse + # output.each do |current_response| + # p current_response + # end + # + def streaming_recognize request, options = nil + unless request.is_a? ::Enumerable + raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum + request = request.to_enum + end + + request = request.lazy.map do |req| + ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Speech::V1::StreamingRecognizeRequest + end + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.streaming_recognize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.streaming_recognize.timeout, + metadata: metadata, + retry_policy: @config.rpcs.streaming_recognize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @speech_stub.call_rpc :streaming_recognize, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Speech API. + # + # This class represents the configuration for Speech, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Speech::V1::Speech::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # recognize to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Speech::V1::Speech::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.recognize.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.recognize.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Speech API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `recognize` + # @return [::Gapic::Config::Method] + # + attr_reader :recognize + ## + # RPC-specific configuration for `long_running_recognize` + # @return [::Gapic::Config::Method] + # + attr_reader :long_running_recognize + ## + # RPC-specific configuration for `streaming_recognize` + # @return [::Gapic::Config::Method] + # + attr_reader :streaming_recognize + + # @private + def initialize parent_rpcs = nil + recognize_config = parent_rpcs.recognize if parent_rpcs.respond_to? :recognize + @recognize = ::Gapic::Config::Method.new recognize_config + long_running_recognize_config = parent_rpcs.long_running_recognize if parent_rpcs.respond_to? :long_running_recognize + @long_running_recognize = ::Gapic::Config::Method.new long_running_recognize_config + streaming_recognize_config = parent_rpcs.streaming_recognize if parent_rpcs.respond_to? :streaming_recognize + @streaming_recognize = ::Gapic::Config::Method.new streaming_recognize_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/credentials.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/credentials.rb new file mode 100644 index 000000000000..b98a12db51ab --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Speech + module V1 + module Speech + # Credentials for the Speech API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SPEECH_CREDENTIALS", + "SPEECH_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SPEECH_CREDENTIALS_JSON", + "SPEECH_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/operations.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/operations.rb new file mode 100644 index 000000000000..153214386909 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/operations.rb @@ -0,0 +1,835 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Speech + module V1 + module Speech + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Speech Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Speech Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/paths.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/paths.rb new file mode 100644 index 000000000000..ae06954b3904 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Speech + module V1 + module Speech + # Path helper methods for the Speech API. + module Paths + ## + # Create a fully-qualified CustomClass resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # @param project [String] + # @param location [String] + # @param custom_class [String] + # + # @return [::String] + def custom_class_path project:, location:, custom_class: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/customClasses/#{custom_class}" + end + + ## + # Create a fully-qualified PhraseSet resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # @param project [String] + # @param location [String] + # @param phrase_set [String] + # + # @return [::String] + def phrase_set_path project:, location:, phrase_set: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/phraseSets/#{phrase_set}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest.rb new file mode 100644 index 000000000000..bf0e8c48b909 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/speech/v1/version" + +require "google/cloud/speech/v1/speech/credentials" +require "google/cloud/speech/v1/speech/paths" +require "google/cloud/speech/v1/speech/rest/operations" +require "google/cloud/speech/v1/speech/rest/client" + +module Google + module Cloud + module Speech + module V1 + ## + # Service that implements Google Cloud Speech API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/speech/v1/speech/rest" + # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new + # + module Speech + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/speech/v1/speech/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.rb new file mode 100644 index 000000000000..c0a221dac348 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.rb @@ -0,0 +1,555 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/speech/v1/cloud_speech_pb" +require "google/cloud/speech/v1/speech/rest/service_stub" + +module Google + module Cloud + module Speech + module V1 + module Speech + module Rest + ## + # REST client for the Speech service. + # + # Service that implements Google Cloud Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :speech_stub + + ## + # Configure the Speech Client class. + # + # See {::Google::Cloud::Speech::V1::Speech::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Speech clients + # ::Google::Cloud::Speech::V1::Speech::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Speech", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.recognize.timeout = 5000.0 + default_config.rpcs.recognize.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.long_running_recognize.timeout = 5000.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Speech Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Speech::V1::Speech::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @speech_stub.universe_domain + end + + ## + # Create a new Speech REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Speech client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Speech::V1::Speech::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @speech_stub = ::Google::Cloud::Speech::V1::Speech::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @speech_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Speech::V1::Speech::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @speech_stub.logger + end + + # Service calls + + ## + # Performs synchronous speech recognition: receive results after all audio + # has been sent and processed. + # + # @overload recognize(request, options = nil) + # Pass arguments to `recognize` via a request object, either of type + # {::Google::Cloud::Speech::V1::RecognizeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::RecognizeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload recognize(config: nil, audio: nil) + # Pass arguments to `recognize` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param config [::Google::Cloud::Speech::V1::RecognitionConfig, ::Hash] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @param audio [::Google::Cloud::Speech::V1::RecognitionAudio, ::Hash] + # Required. The audio data to be recognized. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::RecognizeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::RecognizeResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Speech::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::RecognizeRequest.new + # + # # Call the recognize method. + # result = client.recognize request + # + # # The returned object is of type Google::Cloud::Speech::V1::RecognizeResponse. + # p result + # + def recognize request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::RecognizeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.recognize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.recognize.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.recognize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @speech_stub.recognize request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs asynchronous speech recognition: receive results via the + # google.longrunning.Operations interface. Returns either an + # `Operation.error` or an `Operation.response` which contains + # a `LongRunningRecognizeResponse` message. + # For more information on asynchronous speech recognition, see the + # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). + # + # @overload long_running_recognize(request, options = nil) + # Pass arguments to `long_running_recognize` via a request object, either of type + # {::Google::Cloud::Speech::V1::LongRunningRecognizeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1::LongRunningRecognizeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload long_running_recognize(config: nil, audio: nil, output_config: nil) + # Pass arguments to `long_running_recognize` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param config [::Google::Cloud::Speech::V1::RecognitionConfig, ::Hash] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @param audio [::Google::Cloud::Speech::V1::RecognitionAudio, ::Hash] + # Required. The audio data to be recognized. + # @param output_config [::Google::Cloud::Speech::V1::TranscriptOutputConfig, ::Hash] + # Optional. Specifies an optional destination for the recognition results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1::Speech::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new + # + # # Call the long_running_recognize method. + # result = client.long_running_recognize request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def long_running_recognize request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.long_running_recognize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.long_running_recognize.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.long_running_recognize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @speech_stub.long_running_recognize request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Speech REST API. + # + # This class represents the configuration for Speech REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Speech::V1::Speech::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # recognize to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Speech::V1::Speech::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.recognize.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.recognize.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Speech API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `recognize` + # @return [::Gapic::Config::Method] + # + attr_reader :recognize + ## + # RPC-specific configuration for `long_running_recognize` + # @return [::Gapic::Config::Method] + # + attr_reader :long_running_recognize + + # @private + def initialize parent_rpcs = nil + recognize_config = parent_rpcs.recognize if parent_rpcs.respond_to? :recognize + @recognize = ::Gapic::Config::Method.new recognize_config + long_running_recognize_config = parent_rpcs.long_running_recognize if parent_rpcs.respond_to? :long_running_recognize + @long_running_recognize = ::Gapic::Config::Method.new long_running_recognize_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.rb new file mode 100644 index 000000000000..610575fe6b03 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Speech + module V1 + module Speech + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Speech Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Speech Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/operations", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/operations/{name}", + matches: [ + ["name", %r{^(?<__wildcard__>.*)$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.rb new file mode 100644 index 000000000000..6394ec823985 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.rb @@ -0,0 +1,201 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/speech/v1/cloud_speech_pb" + +module Google + module Cloud + module Speech + module V1 + module Speech + module Rest + ## + # REST service stub for the Speech service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the recognize REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::RecognizeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1::RecognizeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1::RecognizeResponse] + # A result object deserialized from the server's reply + def recognize request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_recognize_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "recognize", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1::RecognizeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the long_running_recognize REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::LongRunningRecognizeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def long_running_recognize request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_long_running_recognize_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "long_running_recognize", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the recognize REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::RecognizeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_recognize_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/speech:recognize", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the long_running_recognize REST call + # + # @param request_pb [::Google::Cloud::Speech::V1::LongRunningRecognizeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_long_running_recognize_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/speech:longrunningrecognize", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/version.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/version.rb new file mode 100644 index 000000000000..1a5ee1f9dace --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Speech + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-speech-v1/proto_docs/README.md new file mode 100644 index 000000000000..9ab7063008bf --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Speech-to-Text V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.rb new file mode 100644 index 000000000000..c7a315d42f57 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.rb @@ -0,0 +1,1003 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Speech + module V1 + # The top-level message sent by the client for the `Recognize` method. + # @!attribute [rw] config + # @return [::Google::Cloud::Speech::V1::RecognitionConfig] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @!attribute [rw] audio + # @return [::Google::Cloud::Speech::V1::RecognitionAudio] + # Required. The audio data to be recognized. + class RecognizeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The top-level message sent by the client for the `LongRunningRecognize` + # method. + # @!attribute [rw] config + # @return [::Google::Cloud::Speech::V1::RecognitionConfig] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @!attribute [rw] audio + # @return [::Google::Cloud::Speech::V1::RecognitionAudio] + # Required. The audio data to be recognized. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Speech::V1::TranscriptOutputConfig] + # Optional. Specifies an optional destination for the recognition results. + class LongRunningRecognizeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies an optional destination for the recognition results. + # @!attribute [rw] gcs_uri + # @return [::String] + # Specifies a Cloud Storage URI for the recognition results. Must be + # specified in the format: `gs://bucket_name/object_name`, and the bucket + # must already exist. + class TranscriptOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The top-level message sent by the client for the `StreamingRecognize` method. + # Multiple `StreamingRecognizeRequest` messages are sent. The first message + # must contain a `streaming_config` message and must not contain + # `audio_content`. All subsequent messages must contain `audio_content` and + # must not contain a `streaming_config` message. + # @!attribute [rw] streaming_config + # @return [::Google::Cloud::Speech::V1::StreamingRecognitionConfig] + # Provides information to the recognizer that specifies how to process the + # request. The first `StreamingRecognizeRequest` message must contain a + # `streaming_config` message. + # + # Note: The following fields are mutually exclusive: `streaming_config`, `audio_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] audio_content + # @return [::String] + # The audio data to be recognized. Sequential chunks of audio data are sent + # in sequential `StreamingRecognizeRequest` messages. The first + # `StreamingRecognizeRequest` message must not contain `audio_content` data + # and all subsequent `StreamingRecognizeRequest` messages must contain + # `audio_content` data. The audio bytes must be encoded as specified in + # `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a + # pure binary representation (not base64). See + # [content limits](https://cloud.google.com/speech-to-text/quotas#content). + # + # Note: The following fields are mutually exclusive: `audio_content`, `streaming_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class StreamingRecognizeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides information to the recognizer that specifies how to process the + # request. + # @!attribute [rw] config + # @return [::Google::Cloud::Speech::V1::RecognitionConfig] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @!attribute [rw] single_utterance + # @return [::Boolean] + # If `false` or omitted, the recognizer will perform continuous + # recognition (continuing to wait for and process audio even if the user + # pauses speaking) until the client closes the input stream (gRPC API) or + # until the maximum time limit has been reached. May return multiple + # `StreamingRecognitionResult`s with the `is_final` flag set to `true`. + # + # If `true`, the recognizer will detect a single spoken utterance. When it + # detects that the user has paused or stopped speaking, it will return an + # `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no + # more than one `StreamingRecognitionResult` with the `is_final` flag set to + # `true`. + # + # The `single_utterance` field can only be used with specified models, + # otherwise an error is thrown. The `model` field in [`RecognitionConfig`][] + # must be set to: + # + # * `command_and_search` + # * `phone_call` AND additional field `useEnhanced`=`true` + # * The `model` field is left undefined. In this case the API auto-selects + # a model based on any other parameters that you set in + # `RecognitionConfig`. + # @!attribute [rw] interim_results + # @return [::Boolean] + # If `true`, interim results (tentative hypotheses) may be + # returned as they become available (these interim results are indicated with + # the `is_final=false` flag). + # If `false` or omitted, only `is_final=true` result(s) are returned. + # @!attribute [rw] enable_voice_activity_events + # @return [::Boolean] + # If `true`, responses with voice activity speech events will be returned as + # they are detected. + # @!attribute [rw] voice_activity_timeout + # @return [::Google::Cloud::Speech::V1::StreamingRecognitionConfig::VoiceActivityTimeout] + # If set, the server will automatically close the stream after the specified + # duration has elapsed after the last VOICE_ACTIVITY speech event has been + # sent. The field `voice_activity_events` must also be set to true. + class StreamingRecognitionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Events that a timeout can be set on for voice activity. + # @!attribute [rw] speech_start_timeout + # @return [::Google::Protobuf::Duration] + # Duration to timeout the stream if no speech begins. + # @!attribute [rw] speech_end_timeout + # @return [::Google::Protobuf::Duration] + # Duration to timeout the stream after speech ends. + class VoiceActivityTimeout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Provides information to the recognizer that specifies how to process the + # request. + # @!attribute [rw] encoding + # @return [::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding] + # Encoding of audio data sent in all `RecognitionAudio` messages. + # This field is optional for `FLAC` and `WAV` audio files and required + # for all other audio formats. For details, see + # {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}. + # @!attribute [rw] sample_rate_hertz + # @return [::Integer] + # Sample rate in Hertz of the audio data sent in all + # `RecognitionAudio` messages. Valid values are: 8000-48000. + # 16000 is optimal. For best results, set the sampling rate of the audio + # source to 16000 Hz. If that's not possible, use the native sample rate of + # the audio source (instead of re-sampling). + # This field is optional for FLAC and WAV audio files, but is + # required for all other audio formats. For details, see + # {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}. + # @!attribute [rw] audio_channel_count + # @return [::Integer] + # The number of channels in the input audio data. + # ONLY set this for MULTI-CHANNEL recognition. + # Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. + # Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. + # If `0` or omitted, defaults to one channel (mono). + # Note: We only recognize the first channel by default. + # To perform independent recognition on each channel set + # `enable_separate_recognition_per_channel` to 'true'. + # @!attribute [rw] enable_separate_recognition_per_channel + # @return [::Boolean] + # This needs to be set to `true` explicitly and `audio_channel_count` > 1 + # to get each channel recognized separately. The recognition result will + # contain a `channel_tag` field to state which channel that result belongs + # to. If this is not true, we will only recognize the first channel. The + # request is billed cumulatively for all channels recognized: + # `audio_channel_count` multiplied by the length of the audio. + # @!attribute [rw] language_code + # @return [::String] + # Required. The language of the supplied audio as a + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # Example: "en-US". + # See [Language + # Support](https://cloud.google.com/speech-to-text/docs/languages) for a list + # of the currently supported language codes. + # @!attribute [rw] alternative_language_codes + # @return [::Array<::String>] + # A list of up to 3 additional + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags, + # listing possible alternative languages of the supplied audio. + # See [Language + # Support](https://cloud.google.com/speech-to-text/docs/languages) for a list + # of the currently supported language codes. If alternative languages are + # listed, recognition result will contain recognition in the most likely + # language detected including the main language_code. The recognition result + # will include the language tag of the language detected in the audio. Note: + # This feature is only supported for Voice Command and Voice Search use cases + # and performance may vary for other use cases (e.g., phone call + # transcription). + # @!attribute [rw] max_alternatives + # @return [::Integer] + # Maximum number of recognition hypotheses to be returned. + # Specifically, the maximum number of `SpeechRecognitionAlternative` messages + # within each `SpeechRecognitionResult`. + # The server may return fewer than `max_alternatives`. + # Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of + # one. If omitted, will return a maximum of one. + # @!attribute [rw] profanity_filter + # @return [::Boolean] + # If set to `true`, the server will attempt to filter out + # profanities, replacing all but the initial character in each filtered word + # with asterisks, e.g. "f***". If set to `false` or omitted, profanities + # won't be filtered out. + # @!attribute [rw] adaptation + # @return [::Google::Cloud::Speech::V1::SpeechAdaptation] + # Speech adaptation configuration improves the accuracy of speech + # recognition. For more information, see the [speech + # adaptation](https://cloud.google.com/speech-to-text/docs/adaptation) + # documentation. + # When speech adaptation is set it supersedes the `speech_contexts` field. + # @!attribute [rw] transcript_normalization + # @return [::Google::Cloud::Speech::V1::TranscriptNormalization] + # Optional. Use transcription normalization to automatically replace parts of + # the transcript with phrases of your choosing. For StreamingRecognize, this + # normalization only applies to stable partial transcripts (stability > 0.8) + # and final transcripts. + # @!attribute [rw] speech_contexts + # @return [::Array<::Google::Cloud::Speech::V1::SpeechContext>] + # Array of {::Google::Cloud::Speech::V1::SpeechContext SpeechContext}. + # A means to provide context to assist the speech recognition. For more + # information, see + # [speech + # adaptation](https://cloud.google.com/speech-to-text/docs/adaptation). + # @!attribute [rw] enable_word_time_offsets + # @return [::Boolean] + # If `true`, the top result includes a list of words and + # the start and end time offsets (timestamps) for those words. If + # `false`, no word-level time offset information is returned. The default is + # `false`. + # @!attribute [rw] enable_word_confidence + # @return [::Boolean] + # If `true`, the top result includes a list of words and the + # confidence for those words. If `false`, no word-level confidence + # information is returned. The default is `false`. + # @!attribute [rw] enable_automatic_punctuation + # @return [::Boolean] + # If 'true', adds punctuation to recognition result hypotheses. + # This feature is only available in select languages. Setting this for + # requests in other languages has no effect at all. + # The default 'false' value does not add punctuation to result hypotheses. + # @!attribute [rw] enable_spoken_punctuation + # @return [::Google::Protobuf::BoolValue] + # The spoken punctuation behavior for the call + # If not set, uses default behavior based on model of choice + # e.g. command_and_search will enable spoken punctuation by default + # If 'true', replaces spoken punctuation with the corresponding symbols in + # the request. For example, "how are you question mark" becomes "how are + # you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation + # for support. If 'false', spoken punctuation is not replaced. + # @!attribute [rw] enable_spoken_emojis + # @return [::Google::Protobuf::BoolValue] + # The spoken emoji behavior for the call + # If not set, uses default behavior based on model of choice + # If 'true', adds spoken emoji formatting for the request. This will replace + # spoken emojis with the corresponding Unicode symbols in the final + # transcript. If 'false', spoken emojis are not replaced. + # @!attribute [rw] diarization_config + # @return [::Google::Cloud::Speech::V1::SpeakerDiarizationConfig] + # Config to enable speaker diarization and set additional + # parameters to make diarization better suited for your application. + # Note: When this is enabled, we send all the words from the beginning of the + # audio for the top alternative in every consecutive STREAMING responses. + # This is done in order to improve our speaker tags as our models learn to + # identify the speakers in the conversation over time. + # For non-streaming requests, the diarization results will be provided only + # in the top alternative of the FINAL SpeechRecognitionResult. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Speech::V1::RecognitionMetadata] + # Metadata regarding this request. + # @!attribute [rw] model + # @return [::String] + # Which model to select for the given request. Select the model + # best suited to your domain to get best results. If a model is not + # explicitly specified, then we auto-select a model based on the parameters + # in the RecognitionConfig. + #
+ # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + #
ModelDescription
latest_longBest for long form content like media or conversation.
latest_shortBest for short form content like commands or single shot directed + # speech.
command_and_searchBest for short queries such as voice commands or voice search.
phone_callBest for audio that originated from a phone call (typically + # recorded at an 8khz sampling rate).
videoBest for audio that originated from video or includes multiple + # speakers. Ideally the audio is recorded at a 16khz or greater + # sampling rate. This is a premium model that costs more than the + # standard rate.
defaultBest for audio that is not one of the specific audio models. + # For example, long-form audio. Ideally the audio is high-fidelity, + # recorded at a 16khz or greater sampling rate.
medical_conversationBest for audio that originated from a conversation between a + # medical provider and patient.
medical_dictationBest for audio that originated from dictation notes by a medical + # provider.
+ # @!attribute [rw] use_enhanced + # @return [::Boolean] + # Set to true to use an enhanced model for speech recognition. + # If `use_enhanced` is set to true and the `model` field is not set, then + # an appropriate enhanced model is chosen if an enhanced model exists for + # the audio. + # + # If `use_enhanced` is true and an enhanced version of the specified model + # does not exist, then the speech is recognized using the standard version + # of the specified model. + class RecognitionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The encoding of the audio data sent in the request. + # + # All encodings support only 1 channel (mono) audio, unless the + # `audio_channel_count` and `enable_separate_recognition_per_channel` fields + # are set. + # + # For best results, the audio source should be captured and transmitted using + # a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech + # recognition can be reduced if lossy codecs are used to capture or transmit + # audio, particularly if background noise is present. Lossy codecs include + # `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`, + # and `WEBM_OPUS`. + # + # The `FLAC` and `WAV` audio file formats include a header that describes the + # included audio content. You can request recognition for `WAV` files that + # contain either `LINEAR16` or `MULAW` encoded audio. + # If you send `FLAC` or `WAV` audio file format in + # your request, you do not need to specify an `AudioEncoding`; the audio + # encoding format is determined from the file header. If you specify + # an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the + # encoding configuration must match the encoding described in the audio + # header; otherwise the request returns an + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error + # code. + module AudioEncoding + # Not specified. + ENCODING_UNSPECIFIED = 0 + + # Uncompressed 16-bit signed little-endian samples (Linear PCM). + LINEAR16 = 1 + + # `FLAC` (Free Lossless Audio + # Codec) is the recommended encoding because it is + # lossless--therefore recognition is not compromised--and + # requires only about half the bandwidth of `LINEAR16`. `FLAC` stream + # encoding supports 16-bit and 24-bit samples, however, not all fields in + # `STREAMINFO` are supported. + FLAC = 2 + + # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + MULAW = 3 + + # Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + AMR = 4 + + # Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + AMR_WB = 5 + + # Opus encoded audio frames in Ogg container + # ([OggOpus](https://wiki.xiph.org/OggOpus)). + # `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000. + OGG_OPUS = 6 + + # Although the use of lossy encodings is not recommended, if a very low + # bitrate encoding is required, `OGG_OPUS` is highly preferred over + # Speex encoding. The [Speex](https://speex.org/) encoding supported by + # Cloud Speech API has a header byte in each block, as in MIME type + # `audio/x-speex-with-header-byte`. + # It is a variant of the RTP Speex encoding defined in + # [RFC 5574](https://tools.ietf.org/html/rfc5574). + # The stream is a sequence of blocks, one block per RTP packet. Each block + # starts with a byte containing the length of the block, in bytes, followed + # by one or more frames of Speex data, padded to an integral number of + # bytes (octets) as specified in RFC 5574. In other words, each RTP header + # is replaced with a single byte containing the block length. Only Speex + # wideband is supported. `sample_rate_hertz` must be 16000. + SPEEX_WITH_HEADER_BYTE = 7 + + # MP3 audio. MP3 encoding is a Beta feature and only available in + # v1p1beta1. Support all standard MP3 bitrates (which range from 32-320 + # kbps). When using this encoding, `sample_rate_hertz` has to match the + # sample rate of the file being used. + MP3 = 8 + + # Opus encoded audio frames in WebM container + # ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be + # one of 8000, 12000, 16000, 24000, or 48000. + WEBM_OPUS = 9 + end + end + + # Config to enable speaker diarization. + # @!attribute [rw] enable_speaker_diarization + # @return [::Boolean] + # If 'true', enables speaker detection for each recognized word in + # the top alternative of the recognition result using a speaker_label + # provided in the WordInfo. + # @!attribute [rw] min_speaker_count + # @return [::Integer] + # Minimum number of speakers in the conversation. This range gives you more + # flexibility by allowing the system to automatically determine the correct + # number of speakers. If not set, the default value is 2. + # @!attribute [rw] max_speaker_count + # @return [::Integer] + # Maximum number of speakers in the conversation. This range gives you more + # flexibility by allowing the system to automatically determine the correct + # number of speakers. If not set, the default value is 6. + # @!attribute [r] speaker_tag + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Output only. Unused. + class SpeakerDiarizationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of audio data to be recognized. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] interaction_type + # @return [::Google::Cloud::Speech::V1::RecognitionMetadata::InteractionType] + # The use case most closely describing the audio content to be recognized. + # @!attribute [rw] industry_naics_code_of_audio + # @return [::Integer] + # The industry vertical to which this speech recognition request most + # closely applies. This is most indicative of the topics contained + # in the audio. Use the 6-digit NAICS code to identify the industry + # vertical - see https://www.naics.com/search/. + # @!attribute [rw] microphone_distance + # @return [::Google::Cloud::Speech::V1::RecognitionMetadata::MicrophoneDistance] + # The audio type that most closely describes the audio being recognized. + # @!attribute [rw] original_media_type + # @return [::Google::Cloud::Speech::V1::RecognitionMetadata::OriginalMediaType] + # The original media the speech was recorded on. + # @!attribute [rw] recording_device_type + # @return [::Google::Cloud::Speech::V1::RecognitionMetadata::RecordingDeviceType] + # The type of device the speech was recorded with. + # @!attribute [rw] recording_device_name + # @return [::String] + # The device used to make the recording. Examples 'Nexus 5X' or + # 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or + # 'Cardioid Microphone'. + # @!attribute [rw] original_mime_type + # @return [::String] + # Mime type of the original audio file. For example `audio/m4a`, + # `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`. + # A list of possible audio mime types is maintained at + # http://www.iana.org/assignments/media-types/media-types.xhtml#audio + # @!attribute [rw] audio_topic + # @return [::String] + # Description of the content. Eg. "Recordings of federal supreme court + # hearings from 2012". + class RecognitionMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Use case categories that the audio recognition request can be described + # by. + module InteractionType + # Use case is either unknown or is something other than one of the other + # values below. + INTERACTION_TYPE_UNSPECIFIED = 0 + + # Multiple people in a conversation or discussion. For example in a + # meeting with two or more people actively participating. Typically + # all the primary people speaking would be in the same room (if not, + # see PHONE_CALL) + DISCUSSION = 1 + + # One or more persons lecturing or presenting to others, mostly + # uninterrupted. + PRESENTATION = 2 + + # A phone-call or video-conference in which two or more people, who are + # not in the same room, are actively participating. + PHONE_CALL = 3 + + # A recorded message intended for another person to listen to. + VOICEMAIL = 4 + + # Professionally produced audio (eg. TV Show, Podcast). + PROFESSIONALLY_PRODUCED = 5 + + # Transcribe spoken questions and queries into text. + VOICE_SEARCH = 6 + + # Transcribe voice commands, such as for controlling a device. + VOICE_COMMAND = 7 + + # Transcribe speech to text to create a written document, such as a + # text-message, email or report. + DICTATION = 8 + end + + # Enumerates the types of capture settings describing an audio file. + module MicrophoneDistance + # Audio type is not known. + MICROPHONE_DISTANCE_UNSPECIFIED = 0 + + # The audio was captured from a closely placed microphone. Eg. phone, + # dictaphone, or handheld microphone. Generally if there speaker is within + # 1 meter of the microphone. + NEARFIELD = 1 + + # The speaker if within 3 meters of the microphone. + MIDFIELD = 2 + + # The speaker is more than 3 meters away from the microphone. + FARFIELD = 3 + end + + # The original media the speech was recorded on. + module OriginalMediaType + # Unknown original media type. + ORIGINAL_MEDIA_TYPE_UNSPECIFIED = 0 + + # The speech data is an audio recording. + AUDIO = 1 + + # The speech data originally recorded on a video. + VIDEO = 2 + end + + # The type of device the speech was recorded with. + module RecordingDeviceType + # The recording device is unknown. + RECORDING_DEVICE_TYPE_UNSPECIFIED = 0 + + # Speech was recorded on a smartphone. + SMARTPHONE = 1 + + # Speech was recorded using a personal computer or tablet. + PC = 2 + + # Speech was recorded over a phone line. + PHONE_LINE = 3 + + # Speech was recorded in a vehicle. + VEHICLE = 4 + + # Speech was recorded outdoors. + OTHER_OUTDOOR_DEVICE = 5 + + # Speech was recorded indoors. + OTHER_INDOOR_DEVICE = 6 + end + end + + # Provides "hints" to the speech recognizer to favor specific words and phrases + # in the results. + # @!attribute [rw] phrases + # @return [::Array<::String>] + # A list of strings containing words and phrases "hints" so that + # the speech recognition is more likely to recognize them. This can be used + # to improve the accuracy for specific words and phrases, for example, if + # specific commands are typically spoken by the user. This can also be used + # to add additional words to the vocabulary of the recognizer. See + # [usage limits](https://cloud.google.com/speech-to-text/quotas#content). + # + # List items can also be set to classes for groups of words that represent + # common concepts that occur in natural language. For example, rather than + # providing phrase hints for every month of the year, using the $MONTH class + # improves the likelihood of correctly transcribing audio that includes + # months. + # @!attribute [rw] boost + # @return [::Float] + # Hint Boost. Positive value will increase the probability that a specific + # phrase will be recognized over other similar sounding phrases. The higher + # the boost, the higher the chance of false positive recognition as well. + # Negative boost values would correspond to anti-biasing. Anti-biasing is not + # enabled, so negative boost will simply be ignored. Though `boost` can + # accept a wide range of positive values, most use cases are best served with + # values between 0 and 20. We recommend using a binary search approach to + # finding the optimal value for your use case. + class SpeechContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains audio data in the encoding specified in the `RecognitionConfig`. + # Either `content` or `uri` must be supplied. Supplying both or neither + # returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + # See [content limits](https://cloud.google.com/speech-to-text/quotas#content). + # @!attribute [rw] content + # @return [::String] + # The audio data bytes encoded as specified in + # `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a + # pure binary representation, whereas JSON representations use base64. + # + # Note: The following fields are mutually exclusive: `content`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] uri + # @return [::String] + # URI that points to a file that contains audio data bytes as specified in + # `RecognitionConfig`. The file must not be compressed (for example, gzip). + # Currently, only Google Cloud Storage URIs are + # supported, which must be specified in the following format: + # `gs://bucket_name/object_name` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + # For more information, see [Request + # URIs](https://cloud.google.com/storage/docs/reference-uris). + # + # Note: The following fields are mutually exclusive: `uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RecognitionAudio + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The only message returned to the client by the `Recognize` method. It + # contains the result as zero or more sequential `SpeechRecognitionResult` + # messages. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Speech::V1::SpeechRecognitionResult>] + # Sequential list of transcription results corresponding to + # sequential portions of audio. + # @!attribute [rw] total_billed_time + # @return [::Google::Protobuf::Duration] + # When available, billed audio seconds for the corresponding request. + # @!attribute [rw] speech_adaptation_info + # @return [::Google::Cloud::Speech::V1::SpeechAdaptationInfo] + # Provides information on adaptation behavior in response + # @!attribute [rw] request_id + # @return [::Integer] + # The ID associated with the request. This is a unique ID specific only to + # the given request. + class RecognizeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The only message returned to the client by the `LongRunningRecognize` method. + # It contains the result as zero or more sequential `SpeechRecognitionResult` + # messages. It is included in the `result.response` field of the `Operation` + # returned by the `GetOperation` call of the `google::longrunning::Operations` + # service. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Speech::V1::SpeechRecognitionResult>] + # Sequential list of transcription results corresponding to + # sequential portions of audio. + # @!attribute [rw] total_billed_time + # @return [::Google::Protobuf::Duration] + # When available, billed audio seconds for the corresponding request. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Speech::V1::TranscriptOutputConfig] + # Original output config if present in the request. + # @!attribute [rw] output_error + # @return [::Google::Rpc::Status] + # If the transcript output fails this field contains the relevant error. + # @!attribute [rw] speech_adaptation_info + # @return [::Google::Cloud::Speech::V1::SpeechAdaptationInfo] + # Provides information on speech adaptation behavior in response + # @!attribute [rw] request_id + # @return [::Integer] + # The ID associated with the request. This is a unique ID specific only to + # the given request. + class LongRunningRecognizeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the progress of a long-running `LongRunningRecognize` call. It is + # included in the `metadata` field of the `Operation` returned by the + # `GetOperation` call of the `google::longrunning::Operations` service. + # @!attribute [rw] progress_percent + # @return [::Integer] + # Approximate percentage of audio processed thus far. Guaranteed to be 100 + # when the audio is fully processed and the results are available. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time when the request was received. + # @!attribute [rw] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Time of the most recent processing update. + # @!attribute [r] uri + # @return [::String] + # Output only. The URI of the audio file being transcribed. Empty if the + # audio was sent as byte content. + class LongRunningRecognizeMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `StreamingRecognizeResponse` is the only message returned to the client by + # `StreamingRecognize`. A series of zero or more `StreamingRecognizeResponse` + # messages are streamed back to the client. If there is no recognizable + # audio, and `single_utterance` is set to false, then no messages are streamed + # back to the client. + # + # Here's an example of a series of `StreamingRecognizeResponse`s that might be + # returned while processing audio: + # + # 1. results { alternatives { transcript: "tube" } stability: 0.01 } + # + # 2. results { alternatives { transcript: "to be a" } stability: 0.01 } + # + # 3. results { alternatives { transcript: "to be" } stability: 0.9 } + # results { alternatives { transcript: " or not to be" } stability: 0.01 } + # + # 4. results { alternatives { transcript: "to be or not to be" + # confidence: 0.92 } + # alternatives { transcript: "to bee or not to bee" } + # is_final: true } + # + # 5. results { alternatives { transcript: " that's" } stability: 0.01 } + # + # 6. results { alternatives { transcript: " that is" } stability: 0.9 } + # results { alternatives { transcript: " the question" } stability: 0.01 } + # + # 7. results { alternatives { transcript: " that is the question" + # confidence: 0.98 } + # alternatives { transcript: " that was the question" } + # is_final: true } + # + # Notes: + # + # - Only two of the above responses #4 and #7 contain final results; they are + # indicated by `is_final: true`. Concatenating these together generates the + # full transcript: "to be or not to be that is the question". + # + # - The others contain interim `results`. #3 and #6 contain two interim + # `results`: the first portion has a high stability and is less likely to + # change; the second portion has a low stability and is very likely to + # change. A UI designer might choose to show only high stability `results`. + # + # - The specific `stability` and `confidence` values shown above are only for + # illustrative purposes. Actual values may vary. + # + # - In each response, only one of these fields will be set: + # `error`, + # `speech_event_type`, or + # one or more (repeated) `results`. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # If set, returns a {::Google::Rpc::Status google.rpc.Status} message that + # specifies the error for the operation. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Speech::V1::StreamingRecognitionResult>] + # This repeated list contains zero or more results that + # correspond to consecutive portions of the audio currently being processed. + # It contains zero or one `is_final=true` result (the newly settled portion), + # followed by zero or more `is_final=false` results (the interim results). + # @!attribute [rw] speech_event_type + # @return [::Google::Cloud::Speech::V1::StreamingRecognizeResponse::SpeechEventType] + # Indicates the type of speech event. + # @!attribute [rw] speech_event_time + # @return [::Google::Protobuf::Duration] + # Time offset between the beginning of the audio and event emission. + # @!attribute [rw] total_billed_time + # @return [::Google::Protobuf::Duration] + # When available, billed audio seconds for the stream. + # Set only if this is the last response in the stream. + # @!attribute [rw] speech_adaptation_info + # @return [::Google::Cloud::Speech::V1::SpeechAdaptationInfo] + # Provides information on adaptation behavior in response + # @!attribute [rw] request_id + # @return [::Integer] + # The ID associated with the request. This is a unique ID specific only to + # the given request. + class StreamingRecognizeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates the type of speech event. + module SpeechEventType + # No speech event specified. + SPEECH_EVENT_UNSPECIFIED = 0 + + # This event indicates that the server has detected the end of the user's + # speech utterance and expects no additional speech. Therefore, the server + # will not process additional audio (although it may subsequently return + # additional results). The client should stop sending additional audio + # data, half-close the gRPC connection, and wait for any additional results + # until the server closes the gRPC connection. This event is only sent if + # `single_utterance` was set to `true`, and is not used otherwise. + END_OF_SINGLE_UTTERANCE = 1 + + # This event indicates that the server has detected the beginning of human + # voice activity in the stream. This event can be returned multiple times + # if speech starts and stops repeatedly throughout the stream. This event + # is only sent if `voice_activity_events` is set to true. + SPEECH_ACTIVITY_BEGIN = 2 + + # This event indicates that the server has detected the end of human voice + # activity in the stream. This event can be returned multiple times if + # speech starts and stops repeatedly throughout the stream. This event is + # only sent if `voice_activity_events` is set to true. + SPEECH_ACTIVITY_END = 3 + + # This event indicates that the user-set timeout for speech activity begin + # or end has exceeded. Upon receiving this event, the client is expected to + # send a half close. Further audio will not be processed. + SPEECH_ACTIVITY_TIMEOUT = 4 + end + end + + # A streaming speech recognition result corresponding to a portion of the audio + # that is currently being processed. + # @!attribute [rw] alternatives + # @return [::Array<::Google::Cloud::Speech::V1::SpeechRecognitionAlternative>] + # May contain one or more recognition hypotheses (up to the + # maximum specified in `max_alternatives`). + # These alternatives are ordered in terms of accuracy, with the top (first) + # alternative being the most probable, as ranked by the recognizer. + # @!attribute [rw] is_final + # @return [::Boolean] + # If `false`, this `StreamingRecognitionResult` represents an + # interim result that may change. If `true`, this is the final time the + # speech service will return this particular `StreamingRecognitionResult`, + # the recognizer will not return any further hypotheses for this portion of + # the transcript and corresponding audio. + # @!attribute [rw] stability + # @return [::Float] + # An estimate of the likelihood that the recognizer will not + # change its guess about this interim result. Values range from 0.0 + # (completely unstable) to 1.0 (completely stable). + # This field is only provided for interim results (`is_final=false`). + # The default of 0.0 is a sentinel value indicating `stability` was not set. + # @!attribute [rw] result_end_time + # @return [::Google::Protobuf::Duration] + # Time offset of the end of this result relative to the + # beginning of the audio. + # @!attribute [rw] channel_tag + # @return [::Integer] + # For multi-channel audio, this is the channel number corresponding to the + # recognized result for the audio from that channel. + # For audio_channel_count = N, its output values can range from '1' to 'N'. + # @!attribute [r] language_code + # @return [::String] + # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + # language tag of the language in this result. This language code was + # detected to have the most likelihood of being spoken in the audio. + class StreamingRecognitionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A speech recognition result corresponding to a portion of the audio. + # @!attribute [rw] alternatives + # @return [::Array<::Google::Cloud::Speech::V1::SpeechRecognitionAlternative>] + # May contain one or more recognition hypotheses (up to the + # maximum specified in `max_alternatives`). + # These alternatives are ordered in terms of accuracy, with the top (first) + # alternative being the most probable, as ranked by the recognizer. + # @!attribute [rw] channel_tag + # @return [::Integer] + # For multi-channel audio, this is the channel number corresponding to the + # recognized result for the audio from that channel. + # For audio_channel_count = N, its output values can range from '1' to 'N'. + # @!attribute [rw] result_end_time + # @return [::Google::Protobuf::Duration] + # Time offset of the end of this result relative to the + # beginning of the audio. + # @!attribute [r] language_code + # @return [::String] + # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + # language tag of the language in this result. This language code was + # detected to have the most likelihood of being spoken in the audio. + class SpeechRecognitionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Alternative hypotheses (a.k.a. n-best list). + # @!attribute [rw] transcript + # @return [::String] + # Transcript text representing the words that the user spoke. + # In languages that use spaces to separate words, the transcript might have a + # leading space if it isn't the first result. You can concatenate each result + # to obtain the full transcript without using a separator. + # @!attribute [rw] confidence + # @return [::Float] + # The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is set only for the top alternative of a non-streaming + # result or, of a streaming result where `is_final=true`. + # This field is not guaranteed to be accurate and users should not rely on it + # to be always provided. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # @!attribute [rw] words + # @return [::Array<::Google::Cloud::Speech::V1::WordInfo>] + # A list of word-specific information for each recognized word. + # Note: When `enable_speaker_diarization` is true, you will see all the words + # from the beginning of the audio. + class SpeechRecognitionAlternative + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Word-specific information for recognized words. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Duration] + # Time offset relative to the beginning of the audio, + # and corresponding to the start of the spoken word. + # This field is only set if `enable_word_time_offsets=true` and only + # in the top hypothesis. + # This is an experimental feature and the accuracy of the time offset can + # vary. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Duration] + # Time offset relative to the beginning of the audio, + # and corresponding to the end of the spoken word. + # This field is only set if `enable_word_time_offsets=true` and only + # in the top hypothesis. + # This is an experimental feature and the accuracy of the time offset can + # vary. + # @!attribute [rw] word + # @return [::String] + # The word corresponding to this set of information. + # @!attribute [rw] confidence + # @return [::Float] + # The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is set only for the top alternative of a non-streaming + # result or, of a streaming result where `is_final=true`. + # This field is not guaranteed to be accurate and users should not rely on it + # to be always provided. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # @!attribute [r] speaker_tag + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Output only. A distinct integer value is assigned for every speaker within + # the audio. This field specifies which one of those speakers was detected to + # have spoken this word. Value ranges from '1' to diarization_speaker_count. + # speaker_tag is set if enable_speaker_diarization = 'true' and only for the + # top alternative. + # Note: Use speaker_label instead. + # @!attribute [r] speaker_label + # @return [::String] + # Output only. A label value assigned for every unique speaker within the + # audio. This field specifies which speaker was detected to have spoken this + # word. For some models, like medical_conversation this can be actual speaker + # role, for example "patient" or "provider", but generally this would be a + # number identifying a speaker. This field is only set if + # enable_speaker_diarization = 'true' and only for the top alternative. + class WordInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information on speech adaptation use in results + # @!attribute [rw] adaptation_timeout + # @return [::Boolean] + # Whether there was a timeout when applying speech adaptation. If true, + # adaptation had no effect in the response transcript. + # @!attribute [rw] timeout_message + # @return [::String] + # If set, returns a message specifying which part of the speech adaptation + # request timed out. + class SpeechAdaptationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb new file mode 100644 index 000000000000..73416b556c1c --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb @@ -0,0 +1,270 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Speech + module V1 + # Message sent by the client for the `CreatePhraseSet` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this phrase set will be created. + # Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] phrase_set_id + # @return [::String] + # Required. The ID to use for the phrase set, which will become the final + # component of the phrase set's resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @!attribute [rw] phrase_set + # @return [::Google::Cloud::Speech::V1::PhraseSet] + # Required. The phrase set to create. + class CreatePhraseSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `UpdatePhraseSet` method. + # @!attribute [rw] phrase_set + # @return [::Google::Cloud::Speech::V1::PhraseSet] + # Required. The phrase set to update. + # + # The phrase set's `name` field is used to identify the set to be + # updated. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + class UpdatePhraseSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `GetPhraseSet` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the phrase set to retrieve. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + class GetPhraseSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `ListPhraseSet` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of phrase set. Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of phrase sets to return. The service may return + # fewer than this value. If unspecified, at most 50 phrase sets will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListPhraseSet` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPhraseSet` must + # match the call that provided the page token. + class ListPhraseSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message returned to the client by the `ListPhraseSet` method. + # @!attribute [rw] phrase_sets + # @return [::Array<::Google::Cloud::Speech::V1::PhraseSet>] + # The phrase set. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListPhraseSetResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `DeletePhraseSet` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the phrase set to delete. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + class DeletePhraseSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `CreateCustomClass` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this custom class will be created. + # Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] custom_class_id + # @return [::String] + # Required. The ID to use for the custom class, which will become the final + # component of the custom class' resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @!attribute [rw] custom_class + # @return [::Google::Cloud::Speech::V1::CustomClass] + # Required. The custom class to create. + class CreateCustomClassRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `UpdateCustomClass` method. + # @!attribute [rw] custom_class + # @return [::Google::Cloud::Speech::V1::CustomClass] + # Required. The custom class to update. + # + # The custom class's `name` field is used to identify the custom class to be + # updated. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + class UpdateCustomClassRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `GetCustomClass` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the custom class to retrieve. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + class GetCustomClassRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `ListCustomClasses` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of custom classes. Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of custom classes to return. The service may return + # fewer than this value. If unspecified, at most 50 custom classes will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListCustomClass` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCustomClass` must + # match the call that provided the page token. + class ListCustomClassesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message returned to the client by the `ListCustomClasses` method. + # @!attribute [rw] custom_classes + # @return [::Array<::Google::Cloud::Speech::V1::CustomClass>] + # The custom classes. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListCustomClassesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `DeleteCustomClass` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the custom class to delete. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + class DeleteCustomClassRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/resource.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/resource.rb new file mode 100644 index 000000000000..91ddc97572db --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/resource.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Speech + module V1 + # A set of words or phrases that represents a common concept likely to appear + # in your audio, for example a list of passenger ship names. CustomClass items + # can be substituted into placeholders that you set in PhraseSet phrases. + # @!attribute [rw] name + # @return [::String] + # The resource name of the custom class. + # @!attribute [rw] custom_class_id + # @return [::String] + # If this custom class is a resource, the custom_class_id is the resource id + # of the CustomClass. Case sensitive. + # @!attribute [rw] items + # @return [::Array<::Google::Cloud::Speech::V1::CustomClass::ClassItem>] + # A collection of class items. + class CustomClass + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An item of the class. + # @!attribute [rw] value + # @return [::String] + # The class item's value. + class ClassItem + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Provides "hints" to the speech recognizer to favor specific words and phrases + # in the results. + # @!attribute [rw] name + # @return [::String] + # The resource name of the phrase set. + # @!attribute [rw] phrases + # @return [::Array<::Google::Cloud::Speech::V1::PhraseSet::Phrase>] + # A list of word and phrases. + # @!attribute [rw] boost + # @return [::Float] + # Hint Boost. Positive value will increase the probability that a specific + # phrase will be recognized over other similar sounding phrases. The higher + # the boost, the higher the chance of false positive recognition as well. + # Negative boost values would correspond to anti-biasing. Anti-biasing is not + # enabled, so negative boost will simply be ignored. Though `boost` can + # accept a wide range of positive values, most use cases are best served with + # values between 0 (exclusive) and 20. We recommend using a binary search + # approach to finding the optimal value for your use case as well as adding + # phrases both with and without boost to your requests. + class PhraseSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A phrases containing words and phrase "hints" so that + # the speech recognition is more likely to recognize them. This can be used + # to improve the accuracy for specific words and phrases, for example, if + # specific commands are typically spoken by the user. This can also be used + # to add additional words to the vocabulary of the recognizer. See + # [usage limits](https://cloud.google.com/speech-to-text/quotas#content). + # + # List items can also include pre-built or custom classes containing groups + # of words that represent common concepts that occur in natural language. For + # example, rather than providing a phrase hint for every month of the + # year (e.g. "i was born in january", "i was born in febuary", ...), use the + # pre-built `$MONTH` class improves the likelihood of correctly transcribing + # audio that includes months (e.g. "i was born in $month"). + # To refer to pre-built classes, use the class' symbol prepended with `$` + # e.g. `$MONTH`. To refer to custom classes that were defined inline in the + # request, set the class's `custom_class_id` to a string unique to all class + # resources and inline classes. Then use the class' id wrapped in $`{...}` + # e.g. "$\\{my-months}". To refer to custom classes resources, use the class' + # id wrapped in `${}` (e.g. `${my-months}`). + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] value + # @return [::String] + # The phrase itself. + # @!attribute [rw] boost + # @return [::Float] + # Hint Boost. Overrides the boost set at the phrase set level. + # Positive value will increase the probability that a specific phrase will + # be recognized over other similar sounding phrases. The higher the boost, + # the higher the chance of false positive recognition as well. Negative + # boost will simply be ignored. Though `boost` can accept a wide range of + # positive values, most use cases are best served + # with values between 0 and 20. We recommend using a binary search approach + # to finding the optimal value for your use case as well as adding + # phrases both with and without boost to your requests. + class Phrase + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Speech adaptation configuration. + # @!attribute [rw] phrase_sets + # @return [::Array<::Google::Cloud::Speech::V1::PhraseSet>] + # A collection of phrase sets. To specify the hints inline, leave the + # phrase set's `name` blank and fill in the rest of its fields. Any + # phrase set can use any custom class. + # @!attribute [rw] phrase_set_references + # @return [::Array<::String>] + # A collection of phrase set resource names to use. + # @!attribute [rw] custom_classes + # @return [::Array<::Google::Cloud::Speech::V1::CustomClass>] + # A collection of custom classes. To specify the classes inline, leave the + # class' `name` blank and fill in the rest of its fields, giving it a unique + # `custom_class_id`. Refer to the inline defined class in phrase hints by its + # `custom_class_id`. + # @!attribute [rw] abnf_grammar + # @return [::Google::Cloud::Speech::V1::SpeechAdaptation::ABNFGrammar] + # Augmented Backus-Naur form (ABNF) is a standardized grammar notation + # comprised by a set of derivation rules. + # See specifications: https://www.w3.org/TR/speech-grammar + class SpeechAdaptation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] abnf_strings + # @return [::Array<::String>] + # All declarations and rules of an ABNF grammar broken up into multiple + # strings that will end up concatenated. + class ABNFGrammar + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Transcription normalization configuration. Use transcription normalization + # to automatically replace parts of the transcript with phrases of your + # choosing. For StreamingRecognize, this normalization only applies to stable + # partial transcripts (stability > 0.8) and final transcripts. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Speech::V1::TranscriptNormalization::Entry>] + # A list of replacement entries. We will perform replacement with one entry + # at a time. For example, the second entry in ["cat" => "dog", "mountain cat" + # => "mountain dog"] will never be applied because we will always process the + # first entry before it. At most 100 entries. + class TranscriptNormalization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A single replacement configuration. + # @!attribute [rw] search + # @return [::String] + # What to replace. Max length is 100 characters. + # @!attribute [rw] replace + # @return [::String] + # What to replace with. Max length is 100 characters. + # @!attribute [rw] case_sensitive + # @return [::Boolean] + # Whether the search is case sensitive. + class Entry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-speech-v1/snippets/Gemfile new file mode 100644 index 000000000000..cbcc9d84c51b --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-speech-v1", path: "../" +else + gem "google-cloud-speech-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_custom_class.rb new file mode 100644 index 000000000000..fc51d3e2daca --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_custom_class.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Adaptation_CreateCustomClass_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the create_custom_class call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Adaptation::Client#create_custom_class. +# +def create_custom_class + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::CreateCustomClassRequest.new + + # Call the create_custom_class method. + result = client.create_custom_class request + + # The returned object is of type Google::Cloud::Speech::V1::CustomClass. + p result +end +# [END speech_v1_generated_Adaptation_CreateCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_phrase_set.rb new file mode 100644 index 000000000000..7240501837bc --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_phrase_set.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Adaptation_CreatePhraseSet_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the create_phrase_set call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Adaptation::Client#create_phrase_set. +# +def create_phrase_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::CreatePhraseSetRequest.new + + # Call the create_phrase_set method. + result = client.create_phrase_set request + + # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. + p result +end +# [END speech_v1_generated_Adaptation_CreatePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_custom_class.rb new file mode 100644 index 000000000000..29e6c8d7cfb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_custom_class.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Adaptation_DeleteCustomClass_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the delete_custom_class call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Adaptation::Client#delete_custom_class. +# +def delete_custom_class + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::DeleteCustomClassRequest.new + + # Call the delete_custom_class method. + result = client.delete_custom_class request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END speech_v1_generated_Adaptation_DeleteCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_phrase_set.rb new file mode 100644 index 000000000000..b2c8ad998b0b --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_phrase_set.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Adaptation_DeletePhraseSet_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the delete_phrase_set call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Adaptation::Client#delete_phrase_set. +# +def delete_phrase_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::DeletePhraseSetRequest.new + + # Call the delete_phrase_set method. + result = client.delete_phrase_set request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END speech_v1_generated_Adaptation_DeletePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_custom_class.rb new file mode 100644 index 000000000000..087735c5f1c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_custom_class.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Adaptation_GetCustomClass_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the get_custom_class call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Adaptation::Client#get_custom_class. +# +def get_custom_class + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::GetCustomClassRequest.new + + # Call the get_custom_class method. + result = client.get_custom_class request + + # The returned object is of type Google::Cloud::Speech::V1::CustomClass. + p result +end +# [END speech_v1_generated_Adaptation_GetCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_phrase_set.rb new file mode 100644 index 000000000000..25a23e7f955f --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_phrase_set.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Adaptation_GetPhraseSet_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the get_phrase_set call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Adaptation::Client#get_phrase_set. +# +def get_phrase_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::GetPhraseSetRequest.new + + # Call the get_phrase_set method. + result = client.get_phrase_set request + + # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. + p result +end +# [END speech_v1_generated_Adaptation_GetPhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_custom_classes.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_custom_classes.rb new file mode 100644 index 000000000000..dacfa57bd4ff --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_custom_classes.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Adaptation_ListCustomClasses_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the list_custom_classes call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Adaptation::Client#list_custom_classes. +# +def list_custom_classes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::ListCustomClassesRequest.new + + # Call the list_custom_classes method. + result = client.list_custom_classes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Speech::V1::CustomClass. + p item + end +end +# [END speech_v1_generated_Adaptation_ListCustomClasses_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_phrase_set.rb new file mode 100644 index 000000000000..44d69fb6efab --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_phrase_set.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Adaptation_ListPhraseSet_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the list_phrase_set call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Adaptation::Client#list_phrase_set. +# +def list_phrase_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::ListPhraseSetRequest.new + + # Call the list_phrase_set method. + result = client.list_phrase_set request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Speech::V1::PhraseSet. + p item + end +end +# [END speech_v1_generated_Adaptation_ListPhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_custom_class.rb new file mode 100644 index 000000000000..2d1b25dcb582 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_custom_class.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Adaptation_UpdateCustomClass_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the update_custom_class call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Adaptation::Client#update_custom_class. +# +def update_custom_class + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::UpdateCustomClassRequest.new + + # Call the update_custom_class method. + result = client.update_custom_class request + + # The returned object is of type Google::Cloud::Speech::V1::CustomClass. + p result +end +# [END speech_v1_generated_Adaptation_UpdateCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_phrase_set.rb new file mode 100644 index 000000000000..ff2decbbb48a --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_phrase_set.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Adaptation_UpdatePhraseSet_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the update_phrase_set call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Adaptation::Client#update_phrase_set. +# +def update_phrase_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new + + # Call the update_phrase_set method. + result = client.update_phrase_set request + + # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. + p result +end +# [END speech_v1_generated_Adaptation_UpdatePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/snippet_metadata_google.cloud.speech.v1.json b/owl-bot-staging/google-cloud-speech-v1/snippets/snippet_metadata_google.cloud.speech.v1.json new file mode 100644 index 000000000000..356aec9f11f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/snippet_metadata_google.cloud.speech.v1.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-cloud-speech-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.speech.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "speech_v1_generated_Speech_Recognize_sync", + "title": "Snippet for the recognize call in the Speech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Speech::Client#recognize.", + "file": "speech/recognize.rb", + "language": "RUBY", + "client_method": { + "short_name": "recognize", + "full_name": "::Google::Cloud::Speech::V1::Speech::Client#recognize", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::RecognizeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1::RecognizeResponse", + "client": { + "short_name": "Speech::Client", + "full_name": "::Google::Cloud::Speech::V1::Speech::Client" + }, + "method": { + "short_name": "Recognize", + "full_name": "google.cloud.speech.v1.Speech.Recognize", + "service": { + "short_name": "Speech", + "full_name": "google.cloud.speech.v1.Speech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Speech_LongRunningRecognize_sync", + "title": "Snippet for the long_running_recognize call in the Speech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Speech::Client#long_running_recognize.", + "file": "speech/long_running_recognize.rb", + "language": "RUBY", + "client_method": { + "short_name": "long_running_recognize", + "full_name": "::Google::Cloud::Speech::V1::Speech::Client#long_running_recognize", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::LongRunningRecognizeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Speech::Client", + "full_name": "::Google::Cloud::Speech::V1::Speech::Client" + }, + "method": { + "short_name": "LongRunningRecognize", + "full_name": "google.cloud.speech.v1.Speech.LongRunningRecognize", + "service": { + "short_name": "Speech", + "full_name": "google.cloud.speech.v1.Speech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Speech_StreamingRecognize_sync", + "title": "Snippet for the streaming_recognize call in the Speech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Speech::Client#streaming_recognize.", + "file": "speech/streaming_recognize.rb", + "language": "RUBY", + "client_method": { + "short_name": "streaming_recognize", + "full_name": "::Google::Cloud::Speech::V1::Speech::Client#streaming_recognize", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::StreamingRecognizeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1::StreamingRecognizeResponse", + "client": { + "short_name": "Speech::Client", + "full_name": "::Google::Cloud::Speech::V1::Speech::Client" + }, + "method": { + "short_name": "StreamingRecognize", + "full_name": "google.cloud.speech.v1.Speech.StreamingRecognize", + "service": { + "short_name": "Speech", + "full_name": "google.cloud.speech.v1.Speech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Adaptation_CreatePhraseSet_sync", + "title": "Snippet for the create_phrase_set call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#create_phrase_set.", + "file": "adaptation/create_phrase_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_phrase_set", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#create_phrase_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::CreatePhraseSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1::PhraseSet", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" + }, + "method": { + "short_name": "CreatePhraseSet", + "full_name": "google.cloud.speech.v1.Adaptation.CreatePhraseSet", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Adaptation_GetPhraseSet_sync", + "title": "Snippet for the get_phrase_set call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#get_phrase_set.", + "file": "adaptation/get_phrase_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_phrase_set", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#get_phrase_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::GetPhraseSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1::PhraseSet", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" + }, + "method": { + "short_name": "GetPhraseSet", + "full_name": "google.cloud.speech.v1.Adaptation.GetPhraseSet", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Adaptation_ListPhraseSet_sync", + "title": "Snippet for the list_phrase_set call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#list_phrase_set.", + "file": "adaptation/list_phrase_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_phrase_set", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#list_phrase_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::ListPhraseSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1::ListPhraseSetResponse", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" + }, + "method": { + "short_name": "ListPhraseSet", + "full_name": "google.cloud.speech.v1.Adaptation.ListPhraseSet", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Adaptation_UpdatePhraseSet_sync", + "title": "Snippet for the update_phrase_set call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#update_phrase_set.", + "file": "adaptation/update_phrase_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_phrase_set", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#update_phrase_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::UpdatePhraseSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1::PhraseSet", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" + }, + "method": { + "short_name": "UpdatePhraseSet", + "full_name": "google.cloud.speech.v1.Adaptation.UpdatePhraseSet", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Adaptation_DeletePhraseSet_sync", + "title": "Snippet for the delete_phrase_set call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#delete_phrase_set.", + "file": "adaptation/delete_phrase_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_phrase_set", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#delete_phrase_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::DeletePhraseSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" + }, + "method": { + "short_name": "DeletePhraseSet", + "full_name": "google.cloud.speech.v1.Adaptation.DeletePhraseSet", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Adaptation_CreateCustomClass_sync", + "title": "Snippet for the create_custom_class call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#create_custom_class.", + "file": "adaptation/create_custom_class.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_custom_class", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#create_custom_class", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::CreateCustomClassRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1::CustomClass", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" + }, + "method": { + "short_name": "CreateCustomClass", + "full_name": "google.cloud.speech.v1.Adaptation.CreateCustomClass", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Adaptation_GetCustomClass_sync", + "title": "Snippet for the get_custom_class call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#get_custom_class.", + "file": "adaptation/get_custom_class.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_custom_class", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#get_custom_class", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::GetCustomClassRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1::CustomClass", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" + }, + "method": { + "short_name": "GetCustomClass", + "full_name": "google.cloud.speech.v1.Adaptation.GetCustomClass", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Adaptation_ListCustomClasses_sync", + "title": "Snippet for the list_custom_classes call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#list_custom_classes.", + "file": "adaptation/list_custom_classes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_custom_classes", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#list_custom_classes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::ListCustomClassesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1::ListCustomClassesResponse", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" + }, + "method": { + "short_name": "ListCustomClasses", + "full_name": "google.cloud.speech.v1.Adaptation.ListCustomClasses", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Adaptation_UpdateCustomClass_sync", + "title": "Snippet for the update_custom_class call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#update_custom_class.", + "file": "adaptation/update_custom_class.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_custom_class", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#update_custom_class", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::UpdateCustomClassRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1::CustomClass", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" + }, + "method": { + "short_name": "UpdateCustomClass", + "full_name": "google.cloud.speech.v1.Adaptation.UpdateCustomClass", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1_generated_Adaptation_DeleteCustomClass_sync", + "title": "Snippet for the delete_custom_class call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#delete_custom_class.", + "file": "adaptation/delete_custom_class.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_custom_class", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#delete_custom_class", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1::DeleteCustomClassRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" + }, + "method": { + "short_name": "DeleteCustomClass", + "full_name": "google.cloud.speech.v1.Adaptation.DeleteCustomClass", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/speech/long_running_recognize.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/speech/long_running_recognize.rb new file mode 100644 index 000000000000..5b94dc5d192e --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/speech/long_running_recognize.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Speech_LongRunningRecognize_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the long_running_recognize call in the Speech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Speech::Client#long_running_recognize. +# +def long_running_recognize + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Speech::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new + + # Call the long_running_recognize method. + result = client.long_running_recognize request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END speech_v1_generated_Speech_LongRunningRecognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/speech/recognize.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/speech/recognize.rb new file mode 100644 index 000000000000..20864502c3ca --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/speech/recognize.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Speech_Recognize_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the recognize call in the Speech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Speech::Client#recognize. +# +def recognize + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Speech::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1::RecognizeRequest.new + + # Call the recognize method. + result = client.recognize request + + # The returned object is of type Google::Cloud::Speech::V1::RecognizeResponse. + p result +end +# [END speech_v1_generated_Speech_Recognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/speech/streaming_recognize.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/speech/streaming_recognize.rb new file mode 100644 index 000000000000..fa73922ac483 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/snippets/speech/streaming_recognize.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1_generated_Speech_StreamingRecognize_sync] +require "google/cloud/speech/v1" + +## +# Snippet for the streaming_recognize call in the Speech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1::Speech::Client#streaming_recognize. +# +def streaming_recognize + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1::Speech::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the streaming_recognize method to start streaming. + output = client.streaming_recognize input + + # Send requests on the stream. For each request object, set fields by + # passing keyword arguments. Be sure to close the stream when done. + input << Google::Cloud::Speech::V1::StreamingRecognizeRequest.new + input << Google::Cloud::Speech::V1::StreamingRecognizeRequest.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Speech::V1::StreamingRecognizeResponse + output.each do |current_response| + p current_response + end +end +# [END speech_v1_generated_Speech_StreamingRecognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_paths_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_paths_test.rb new file mode 100644 index 000000000000..952b7e04e59a --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/speech/v1/adaptation" + +class ::Google::Cloud::Speech::V1::Adaptation::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_custom_class_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.custom_class_path project: "value0", location: "value1", custom_class: "value2" + assert_equal "projects/value0/locations/value1/customClasses/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_phrase_set_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.phrase_set_path project: "value0", location: "value1", phrase_set: "value2" + assert_equal "projects/value0/locations/value1/phraseSets/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_rest_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_rest_test.rb new file mode 100644 index 000000000000..b424e2cedd56 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_rest_test.rb @@ -0,0 +1,649 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/speech/v1/cloud_speech_adaptation_pb" +require "google/cloud/speech/v1/adaptation/rest" + + +class ::Google::Cloud::Speech::V1::Adaptation::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_phrase_set + # Create test objects. + client_result = ::Google::Cloud::Speech::V1::PhraseSet.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + phrase_set_id = "hello world" + phrase_set = {} + + create_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_create_phrase_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_phrase_set parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_phrase_set ::Google::Cloud::Speech::V1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_phrase_set(::Google::Cloud::Speech::V1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_phrase_set_client_stub.call_count + end + end + end + + def test_get_phrase_set + # Create test objects. + client_result = ::Google::Cloud::Speech::V1::PhraseSet.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_get_phrase_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_phrase_set({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_phrase_set name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_phrase_set ::Google::Cloud::Speech::V1::GetPhraseSetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_phrase_set({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_phrase_set(::Google::Cloud::Speech::V1::GetPhraseSetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_phrase_set_client_stub.call_count + end + end + end + + def test_list_phrase_set + # Create test objects. + client_result = ::Google::Cloud::Speech::V1::ListPhraseSetResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_list_phrase_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_phrase_set parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_phrase_set ::Google::Cloud::Speech::V1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_phrase_set(::Google::Cloud::Speech::V1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_phrase_set_client_stub.call_count + end + end + end + + def test_update_phrase_set + # Create test objects. + client_result = ::Google::Cloud::Speech::V1::PhraseSet.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + phrase_set = {} + update_mask = {} + + update_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_update_phrase_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_phrase_set phrase_set: phrase_set, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_phrase_set ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_phrase_set(::Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_phrase_set_client_stub.call_count + end + end + end + + def test_delete_phrase_set + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_delete_phrase_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_phrase_set({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_phrase_set name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_phrase_set ::Google::Cloud::Speech::V1::DeletePhraseSetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_phrase_set({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_phrase_set(::Google::Cloud::Speech::V1::DeletePhraseSetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_phrase_set_client_stub.call_count + end + end + end + + def test_create_custom_class + # Create test objects. + client_result = ::Google::Cloud::Speech::V1::CustomClass.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + custom_class_id = "hello world" + custom_class = {} + + create_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_create_custom_class_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_custom_class parent: parent, custom_class_id: custom_class_id, custom_class: custom_class do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_custom_class ::Google::Cloud::Speech::V1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_custom_class(::Google::Cloud::Speech::V1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_custom_class_client_stub.call_count + end + end + end + + def test_get_custom_class + # Create test objects. + client_result = ::Google::Cloud::Speech::V1::CustomClass.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_get_custom_class_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_custom_class({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_custom_class name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_custom_class ::Google::Cloud::Speech::V1::GetCustomClassRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_custom_class({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_custom_class(::Google::Cloud::Speech::V1::GetCustomClassRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_custom_class_client_stub.call_count + end + end + end + + def test_list_custom_classes + # Create test objects. + client_result = ::Google::Cloud::Speech::V1::ListCustomClassesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_custom_classes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_list_custom_classes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_custom_classes_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_custom_classes parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_custom_classes ::Google::Cloud::Speech::V1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_custom_classes(::Google::Cloud::Speech::V1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_custom_classes_client_stub.call_count + end + end + end + + def test_update_custom_class + # Create test objects. + client_result = ::Google::Cloud::Speech::V1::CustomClass.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + custom_class = {} + update_mask = {} + + update_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_update_custom_class_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_custom_class custom_class: custom_class, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_custom_class ::Google::Cloud::Speech::V1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_custom_class(::Google::Cloud::Speech::V1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_custom_class_client_stub.call_count + end + end + end + + def test_delete_custom_class + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_delete_custom_class_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_custom_class({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_custom_class name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_custom_class ::Google::Cloud::Speech::V1::DeleteCustomClassRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_custom_class({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_custom_class(::Google::Cloud::Speech::V1::DeleteCustomClassRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_custom_class_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Speech::V1::Adaptation::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_test.rb new file mode 100644 index 000000000000..b47a0ba500cc --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_test.rb @@ -0,0 +1,714 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/speech/v1/cloud_speech_adaptation_pb" +require "google/cloud/speech/v1/adaptation" + +class ::Google::Cloud::Speech::V1::Adaptation::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_phrase_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1::PhraseSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + phrase_set_id = "hello world" + phrase_set = {} + + create_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_phrase_set, name + assert_kind_of ::Google::Cloud::Speech::V1::CreatePhraseSetRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["phrase_set_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::PhraseSet), request["phrase_set"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_phrase_set parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_phrase_set ::Google::Cloud::Speech::V1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_phrase_set(::Google::Cloud::Speech::V1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_phrase_set_client_stub.call_rpc_count + end + end + + def test_get_phrase_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1::PhraseSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_phrase_set, name + assert_kind_of ::Google::Cloud::Speech::V1::GetPhraseSetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_phrase_set({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_phrase_set name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_phrase_set ::Google::Cloud::Speech::V1::GetPhraseSetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_phrase_set({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_phrase_set(::Google::Cloud::Speech::V1::GetPhraseSetRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_phrase_set_client_stub.call_rpc_count + end + end + + def test_list_phrase_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1::ListPhraseSetResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_phrase_set, name + assert_kind_of ::Google::Cloud::Speech::V1::ListPhraseSetRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_phrase_set parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_phrase_set ::Google::Cloud::Speech::V1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_phrase_set(::Google::Cloud::Speech::V1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_phrase_set_client_stub.call_rpc_count + end + end + + def test_update_phrase_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1::PhraseSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + phrase_set = {} + update_mask = {} + + update_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_phrase_set, name + assert_kind_of ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::PhraseSet), request["phrase_set"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_phrase_set phrase_set: phrase_set, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_phrase_set ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_phrase_set(::Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_phrase_set_client_stub.call_rpc_count + end + end + + def test_delete_phrase_set + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_phrase_set, name + assert_kind_of ::Google::Cloud::Speech::V1::DeletePhraseSetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_phrase_set({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_phrase_set name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_phrase_set ::Google::Cloud::Speech::V1::DeletePhraseSetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_phrase_set({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_phrase_set(::Google::Cloud::Speech::V1::DeletePhraseSetRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_phrase_set_client_stub.call_rpc_count + end + end + + def test_create_custom_class + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1::CustomClass.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + custom_class_id = "hello world" + custom_class = {} + + create_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_custom_class, name + assert_kind_of ::Google::Cloud::Speech::V1::CreateCustomClassRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["custom_class_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::CustomClass), request["custom_class"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_custom_class parent: parent, custom_class_id: custom_class_id, custom_class: custom_class do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_custom_class ::Google::Cloud::Speech::V1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_custom_class(::Google::Cloud::Speech::V1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_custom_class_client_stub.call_rpc_count + end + end + + def test_get_custom_class + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1::CustomClass.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_custom_class, name + assert_kind_of ::Google::Cloud::Speech::V1::GetCustomClassRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_custom_class({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_custom_class name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_custom_class ::Google::Cloud::Speech::V1::GetCustomClassRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_custom_class({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_custom_class(::Google::Cloud::Speech::V1::GetCustomClassRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_custom_class_client_stub.call_rpc_count + end + end + + def test_list_custom_classes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1::ListCustomClassesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_custom_classes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_custom_classes, name + assert_kind_of ::Google::Cloud::Speech::V1::ListCustomClassesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_custom_classes_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_custom_classes parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_custom_classes ::Google::Cloud::Speech::V1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_custom_classes(::Google::Cloud::Speech::V1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_custom_classes_client_stub.call_rpc_count + end + end + + def test_update_custom_class + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1::CustomClass.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + custom_class = {} + update_mask = {} + + update_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_custom_class, name + assert_kind_of ::Google::Cloud::Speech::V1::UpdateCustomClassRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::CustomClass), request["custom_class"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_custom_class custom_class: custom_class, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_custom_class ::Google::Cloud::Speech::V1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_custom_class(::Google::Cloud::Speech::V1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_custom_class_client_stub.call_rpc_count + end + end + + def test_delete_custom_class + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_custom_class, name + assert_kind_of ::Google::Cloud::Speech::V1::DeleteCustomClassRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_custom_class({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_custom_class name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_custom_class ::Google::Cloud::Speech::V1::DeleteCustomClassRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_custom_class({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_custom_class(::Google::Cloud::Speech::V1::DeleteCustomClassRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_custom_class_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Speech::V1::Adaptation::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Speech::V1::Adaptation::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_operations_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_operations_test.rb new file mode 100644 index 000000000000..b2460b275c23 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/speech/v1/cloud_speech_pb" +require "google/cloud/speech/v1/cloud_speech_services_pb" +require "google/cloud/speech/v1/speech" + +class ::Google::Cloud::Speech::V1::Speech::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Speech::V1::Speech::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_paths_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_paths_test.rb new file mode 100644 index 000000000000..f90ecd2284cc --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/speech/v1/speech" + +class ::Google::Cloud::Speech::V1::Speech::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_custom_class_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.custom_class_path project: "value0", location: "value1", custom_class: "value2" + assert_equal "projects/value0/locations/value1/customClasses/value2", path + end + end + + def test_phrase_set_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.phrase_set_path project: "value0", location: "value1", phrase_set: "value2" + assert_equal "projects/value0/locations/value1/phraseSets/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_rest_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_rest_test.rb new file mode 100644 index 000000000000..cb1414e847b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_rest_test.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/speech/v1/cloud_speech_pb" +require "google/cloud/speech/v1/speech/rest" + + +class ::Google::Cloud::Speech::V1::Speech::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_recognize + # Create test objects. + client_result = ::Google::Cloud::Speech::V1::RecognizeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + config = {} + audio = {} + + recognize_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Speech::Rest::ServiceStub.stub :transcode_recognize_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, recognize_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.recognize({ config: config, audio: audio }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.recognize config: config, audio: audio do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.recognize ::Google::Cloud::Speech::V1::RecognizeRequest.new(config: config, audio: audio) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.recognize({ config: config, audio: audio }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.recognize(::Google::Cloud::Speech::V1::RecognizeRequest.new(config: config, audio: audio), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, recognize_client_stub.call_count + end + end + end + + def test_long_running_recognize + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + config = {} + audio = {} + output_config = {} + + long_running_recognize_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1::Speech::Rest::ServiceStub.stub :transcode_long_running_recognize_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, long_running_recognize_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.long_running_recognize({ config: config, audio: audio, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.long_running_recognize config: config, audio: audio, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.long_running_recognize ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.long_running_recognize({ config: config, audio: audio, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.long_running_recognize(::Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, long_running_recognize_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Speech::V1::Speech::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_test.rb new file mode 100644 index 000000000000..d978a343a0d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_test.rb @@ -0,0 +1,334 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/speech/v1/cloud_speech_pb" +require "google/cloud/speech/v1/speech" + +class ::Google::Cloud::Speech::V1::Speech::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_recognize + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1::RecognizeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + config = {} + audio = {} + + recognize_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :recognize, name + assert_kind_of ::Google::Cloud::Speech::V1::RecognizeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::RecognitionConfig), request["config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::RecognitionAudio), request["audio"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, recognize_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.recognize({ config: config, audio: audio }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.recognize config: config, audio: audio do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.recognize ::Google::Cloud::Speech::V1::RecognizeRequest.new(config: config, audio: audio) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.recognize({ config: config, audio: audio }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.recognize(::Google::Cloud::Speech::V1::RecognizeRequest.new(config: config, audio: audio), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, recognize_client_stub.call_rpc_count + end + end + + def test_long_running_recognize + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + config = {} + audio = {} + output_config = {} + + long_running_recognize_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :long_running_recognize, name + assert_kind_of ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::RecognitionConfig), request["config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::RecognitionAudio), request["audio"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::TranscriptOutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, long_running_recognize_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.long_running_recognize({ config: config, audio: audio, output_config: output_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.long_running_recognize config: config, audio: audio, output_config: output_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.long_running_recognize ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.long_running_recognize({ config: config, audio: audio, output_config: output_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.long_running_recognize(::Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, long_running_recognize_client_stub.call_rpc_count + end + end + + def test_streaming_recognize + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1::StreamingRecognizeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a bidi streaming method. + streaming_config = {} + + streaming_recognize_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :streaming_recognize, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, streaming_recognize_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::Speech::V1::StreamingRecognizeRequest.new streaming_config: streaming_config + enum_input = [request_hash, request_proto].to_enum + c.streaming_recognize enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Speech::V1::StreamingRecognizeResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::Speech::V1::StreamingRecognizeRequest.new streaming_config: streaming_config + stream_input = Gapic::StreamInput.new + c.streaming_recognize stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Speech::V1::StreamingRecognizeResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Use enumerable object with hash and protobuf object with options. + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::Speech::V1::StreamingRecognizeRequest.new streaming_config: streaming_config + enum_input = [request_hash, request_proto].to_enum + c.streaming_recognize enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Speech::V1::StreamingRecognizeResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::Speech::V1::StreamingRecognizeRequest.new streaming_config: streaming_config + stream_input = Gapic::StreamInput.new + c.streaming_recognize stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Speech::V1::StreamingRecognizeResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Verify method calls + assert_equal 4, streaming_recognize_client_stub.call_rpc_count + streaming_recognize_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::Speech::V1::StreamingRecognizeRequest, r + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::StreamingRecognitionConfig), r["streaming_config"] + assert_equal :streaming_config, r.streaming_request + end + end + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Speech::V1::Speech::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Speech::V1::Speech::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Speech::V1::Speech::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/helper.rb b/owl-bot-staging/google-cloud-speech-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1/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-speech-v1p1beta1/.gitignore b/owl-bot-staging/google-cloud-speech-v1p1beta1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/.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-speech-v1p1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-speech-v1p1beta1/.repo-metadata.json new file mode 100644 index 000000000000..0f33931b5a91 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "speech.googleapis.com", + "api_shortname": "speech", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-speech-v1p1beta1/latest", + "distribution_name": "google-cloud-speech-v1p1beta1", + "is_cloud": true, + "language": "ruby", + "name": "speech", + "name_pretty": "Cloud Speech-to-Text V1p1beta1 API", + "product_documentation": "https://cloud.google.com/speech-to-text", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. Note that google-cloud-speech-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-speech instead. See the readme for more details.", + "ruby-cloud-env-prefix": "SPEECH", + "ruby-cloud-product-url": "https://cloud.google.com/speech-to-text", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-speech-v1p1beta1/.rubocop.yml new file mode 100644 index 000000000000..6e64dd5a1ded --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-speech-v1p1beta1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-speech-v1p1beta1.rb" diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/.toys.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/.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-speech-v1p1beta1/.yardopts b/owl-bot-staging/google-cloud-speech-v1p1beta1/.yardopts new file mode 100644 index 000000000000..5265c1e63603 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Speech-to-Text V1p1beta1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-speech-v1p1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..234cd17b2900 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-speech-v1p1beta1 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-speech-v1p1beta1 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/speech/v1p1beta1" + +client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/speech/v1p1beta1" + +::Google::Cloud::Speech::V1p1beta1::Speech::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-speech-v1p1beta1 +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/speech/v1p1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-speech-v1p1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/Gemfile b/owl-bot-staging/google-cloud-speech-v1p1beta1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-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-speech-v1p1beta1/LICENSE.md b/owl-bot-staging/google-cloud-speech-v1p1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/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-speech-v1p1beta1/README.md b/owl-bot-staging/google-cloud-speech-v1p1beta1/README.md new file mode 100644 index 000000000000..4f5aa19e0af2 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Speech-to-Text V1p1beta1 API + +Converts audio to text by applying powerful neural network models. + +Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Speech-to-Text V1p1beta1 API. Most users should consider using +the main client gem, +[google-cloud-speech](https://rubygems.org/gems/google-cloud-speech). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-speech-v1p1beta1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/speech.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/speech/v1p1beta1" + +client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new +request = ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new # (request fields as keyword arguments...) +response = client.recognize request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-speech-v1p1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/speech-to-text) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/speech/v1p1beta1" +require "logger" + +client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-speech`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-speech-v1p1beta1`. +_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-speech`. +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-speech-v1p1beta1`. + +### 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-speech-v1p1beta1/Rakefile b/owl-bot-staging/google-cloud-speech-v1p1beta1/Rakefile new file mode 100644 index 000000000000..0e12b1140bcd --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-speech-v1p1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["SPEECH_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["SPEECH_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["SPEECH_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 SPEECH_TEST_PROJECT=test123 SPEECH_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/speech/v1p1beta1/speech/credentials" + ::Google::Cloud::Speech::V1p1beta1::Speech::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["SPEECH_PROJECT"] = project + ENV["SPEECH_TEST_PROJECT"] = project + ENV["SPEECH_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-speech-v1p1beta1 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-speech-v1p1beta1 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-speech-v1p1beta1 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-speech-v1p1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-speech-v1p1beta1" + header "google-cloud-speech-v1p1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-speech-v1p1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-speech-v1p1beta1 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-speech-v1p1beta1 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-speech-v1p1beta1 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-speech-v1p1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-speech-v1p1beta1/gapic_metadata.json new file mode 100644 index 000000000000..763b43de9241 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/gapic_metadata.json @@ -0,0 +1,92 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.speech.v1p1beta1", + "libraryPackage": "::Google::Cloud::Speech::V1p1beta1", + "services": { + "Speech": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Speech::V1p1beta1::Speech::Client", + "rpcs": { + "Recognize": { + "methods": [ + "recognize" + ] + }, + "LongRunningRecognize": { + "methods": [ + "long_running_recognize" + ] + }, + "StreamingRecognize": { + "methods": [ + "streaming_recognize" + ] + } + } + } + } + }, + "Adaptation": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client", + "rpcs": { + "CreatePhraseSet": { + "methods": [ + "create_phrase_set" + ] + }, + "GetPhraseSet": { + "methods": [ + "get_phrase_set" + ] + }, + "ListPhraseSet": { + "methods": [ + "list_phrase_set" + ] + }, + "UpdatePhraseSet": { + "methods": [ + "update_phrase_set" + ] + }, + "DeletePhraseSet": { + "methods": [ + "delete_phrase_set" + ] + }, + "CreateCustomClass": { + "methods": [ + "create_custom_class" + ] + }, + "GetCustomClass": { + "methods": [ + "get_custom_class" + ] + }, + "ListCustomClasses": { + "methods": [ + "list_custom_classes" + ] + }, + "UpdateCustomClass": { + "methods": [ + "update_custom_class" + ] + }, + "DeleteCustomClass": { + "methods": [ + "delete_custom_class" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/google-cloud-speech-v1p1beta1.gemspec b/owl-bot-staging/google-cloud-speech-v1p1beta1/google-cloud-speech-v1p1beta1.gemspec new file mode 100644 index 000000000000..209a842aba3a --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/google-cloud-speech-v1p1beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/speech/v1p1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-speech-v1p1beta1" + gem.version = Google::Cloud::Speech::V1p1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. Note that google-cloud-speech-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-speech instead. See the readme for more details." + gem.summary = "Converts audio to text by applying powerful neural network models." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.rb new file mode 100644 index 000000000000..f30b25947a2c --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/speech/v1p1beta1" diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.rb new file mode 100644 index 000000000000..29aac12bfb2a --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/speech/v1p1beta1/speech" +require "google/cloud/speech/v1p1beta1/adaptation" +require "google/cloud/speech/v1p1beta1/version" + +module Google + module Cloud + module Speech + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/speech/v1p1beta1" + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/speech/v1p1beta1" + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new + # + module V1p1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1p1beta1", "_helpers.rb" +require "google/cloud/speech/v1p1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.rb new file mode 100644 index 000000000000..304cdacc9735 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/speech/v1p1beta1/version" + +require "google/cloud/speech/v1p1beta1/adaptation/credentials" +require "google/cloud/speech/v1p1beta1/adaptation/paths" +require "google/cloud/speech/v1p1beta1/adaptation/client" +require "google/cloud/speech/v1p1beta1/adaptation/rest" + +module Google + module Cloud + module Speech + module V1p1beta1 + ## + # Service that implements Google Cloud Speech Adaptation API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/speech/v1p1beta1/adaptation" + # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/speech/v1p1beta1/adaptation/rest" + # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + module Adaptation + end + end + end + end +end + +helper_path = ::File.join __dir__, "adaptation", "helpers.rb" +require "google/cloud/speech/v1p1beta1/adaptation/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb new file mode 100644 index 000000000000..29510000f22d --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb @@ -0,0 +1,1436 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb" + +module Google + module Cloud + module Speech + module V1p1beta1 + module Adaptation + ## + # Client for the Adaptation service. + # + # Service that implements Google Cloud Speech Adaptation API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :adaptation_stub + + ## + # Configure the Adaptation Client class. + # + # See {::Google::Cloud::Speech::V1p1beta1::Adaptation::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Adaptation clients + # ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Speech", "V1p1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Adaptation Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Speech::V1p1beta1::Adaptation::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @adaptation_stub.universe_domain + end + + ## + # Create a new Adaptation client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Adaptation client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @adaptation_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Speech::V1p1beta1::Adaptation::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @adaptation_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @adaptation_stub.logger + end + + # Service calls + + ## + # Create a set of phrase hints. Each item in the set can be a single word or + # a multi-word phrase. The items in the PhraseSet are favored by the + # recognition model when you send a call that includes the PhraseSet. + # + # @overload create_phrase_set(request, options = nil) + # Pass arguments to `create_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_phrase_set(parent: nil, phrase_set_id: nil, phrase_set: nil) + # Pass arguments to `create_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this phrase set will be created. + # Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param phrase_set_id [::String] + # Required. The ID to use for the phrase set, which will become the final + # component of the phrase set's resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @param phrase_set [::Google::Cloud::Speech::V1p1beta1::PhraseSet, ::Hash] + # Required. The phrase set to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new + # + # # Call the create_phrase_set method. + # result = client.create_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. + # p result + # + def create_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_phrase_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :create_phrase_set, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a phrase set. + # + # @overload get_phrase_set(request, options = nil) + # Pass arguments to `get_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_phrase_set(name: nil) + # Pass arguments to `get_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase set to retrieve. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new + # + # # Call the get_phrase_set method. + # result = client.get_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. + # p result + # + def get_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_phrase_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :get_phrase_set, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List phrase sets. + # + # @overload list_phrase_set(request, options = nil) + # Pass arguments to `list_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_phrase_set(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of phrase set. Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param page_size [::Integer] + # The maximum number of phrase sets to return. The service may return + # fewer than this value. If unspecified, at most 50 phrase sets will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListPhraseSet` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPhraseSet` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new + # + # # Call the list_phrase_set method. + # result = client.list_phrase_set request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::PhraseSet. + # p item + # end + # + def list_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_phrase_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :list_phrase_set, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @adaptation_stub, :list_phrase_set, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a phrase set. + # + # @overload update_phrase_set(request, options = nil) + # Pass arguments to `update_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_phrase_set(phrase_set: nil, update_mask: nil) + # Pass arguments to `update_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param phrase_set [::Google::Cloud::Speech::V1p1beta1::PhraseSet, ::Hash] + # Required. The phrase set to update. + # + # The phrase set's `name` field is used to identify the set to be + # updated. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new + # + # # Call the update_phrase_set method. + # result = client.update_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. + # p result + # + def update_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.phrase_set&.name + header_params["phrase_set.name"] = request.phrase_set.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_phrase_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :update_phrase_set, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a phrase set. + # + # @overload delete_phrase_set(request, options = nil) + # Pass arguments to `delete_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_phrase_set(name: nil) + # Pass arguments to `delete_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase set to delete. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new + # + # # Call the delete_phrase_set method. + # result = client.delete_phrase_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_phrase_set.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :delete_phrase_set, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a custom class. + # + # @overload create_custom_class(request, options = nil) + # Pass arguments to `create_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_custom_class(parent: nil, custom_class_id: nil, custom_class: nil) + # Pass arguments to `create_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this custom class will be created. + # Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param custom_class_id [::String] + # Required. The ID to use for the custom class, which will become the final + # component of the custom class' resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @param custom_class [::Google::Cloud::Speech::V1p1beta1::CustomClass, ::Hash] + # Required. The custom class to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new + # + # # Call the create_custom_class method. + # result = client.create_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. + # p result + # + def create_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_custom_class.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :create_custom_class, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a custom class. + # + # @overload get_custom_class(request, options = nil) + # Pass arguments to `get_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_custom_class(name: nil) + # Pass arguments to `get_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the custom class to retrieve. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new + # + # # Call the get_custom_class method. + # result = client.get_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. + # p result + # + def get_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_custom_class.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :get_custom_class, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List custom classes. + # + # @overload list_custom_classes(request, options = nil) + # Pass arguments to `list_custom_classes` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_custom_classes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_custom_classes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of custom classes. Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param page_size [::Integer] + # The maximum number of custom classes to return. The service may return + # fewer than this value. If unspecified, at most 50 custom classes will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListCustomClass` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCustomClass` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::CustomClass>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::CustomClass>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new + # + # # Call the list_custom_classes method. + # result = client.list_custom_classes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::CustomClass. + # p item + # end + # + def list_custom_classes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_custom_classes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_custom_classes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_custom_classes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :list_custom_classes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @adaptation_stub, :list_custom_classes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a custom class. + # + # @overload update_custom_class(request, options = nil) + # Pass arguments to `update_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_custom_class(custom_class: nil, update_mask: nil) + # Pass arguments to `update_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param custom_class [::Google::Cloud::Speech::V1p1beta1::CustomClass, ::Hash] + # Required. The custom class to update. + # + # The custom class's `name` field is used to identify the custom class to be + # updated. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new + # + # # Call the update_custom_class method. + # result = client.update_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. + # p result + # + def update_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.custom_class&.name + header_params["custom_class.name"] = request.custom_class.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_custom_class.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :update_custom_class, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a custom class. + # + # @overload delete_custom_class(request, options = nil) + # Pass arguments to `delete_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_custom_class(name: nil) + # Pass arguments to `delete_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the custom class to delete. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new + # + # # Call the delete_custom_class method. + # result = client.delete_custom_class request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_custom_class.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.call_rpc :delete_custom_class, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Adaptation API. + # + # This class represents the configuration for Adaptation, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Speech::V1p1beta1::Adaptation::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_phrase_set to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_phrase_set.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_phrase_set.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Adaptation API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :create_phrase_set + ## + # RPC-specific configuration for `get_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :get_phrase_set + ## + # RPC-specific configuration for `list_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :list_phrase_set + ## + # RPC-specific configuration for `update_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :update_phrase_set + ## + # RPC-specific configuration for `delete_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_phrase_set + ## + # RPC-specific configuration for `create_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :create_custom_class + ## + # RPC-specific configuration for `get_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :get_custom_class + ## + # RPC-specific configuration for `list_custom_classes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_custom_classes + ## + # RPC-specific configuration for `update_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :update_custom_class + ## + # RPC-specific configuration for `delete_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_custom_class + + # @private + def initialize parent_rpcs = nil + create_phrase_set_config = parent_rpcs.create_phrase_set if parent_rpcs.respond_to? :create_phrase_set + @create_phrase_set = ::Gapic::Config::Method.new create_phrase_set_config + get_phrase_set_config = parent_rpcs.get_phrase_set if parent_rpcs.respond_to? :get_phrase_set + @get_phrase_set = ::Gapic::Config::Method.new get_phrase_set_config + list_phrase_set_config = parent_rpcs.list_phrase_set if parent_rpcs.respond_to? :list_phrase_set + @list_phrase_set = ::Gapic::Config::Method.new list_phrase_set_config + update_phrase_set_config = parent_rpcs.update_phrase_set if parent_rpcs.respond_to? :update_phrase_set + @update_phrase_set = ::Gapic::Config::Method.new update_phrase_set_config + delete_phrase_set_config = parent_rpcs.delete_phrase_set if parent_rpcs.respond_to? :delete_phrase_set + @delete_phrase_set = ::Gapic::Config::Method.new delete_phrase_set_config + create_custom_class_config = parent_rpcs.create_custom_class if parent_rpcs.respond_to? :create_custom_class + @create_custom_class = ::Gapic::Config::Method.new create_custom_class_config + get_custom_class_config = parent_rpcs.get_custom_class if parent_rpcs.respond_to? :get_custom_class + @get_custom_class = ::Gapic::Config::Method.new get_custom_class_config + list_custom_classes_config = parent_rpcs.list_custom_classes if parent_rpcs.respond_to? :list_custom_classes + @list_custom_classes = ::Gapic::Config::Method.new list_custom_classes_config + update_custom_class_config = parent_rpcs.update_custom_class if parent_rpcs.respond_to? :update_custom_class + @update_custom_class = ::Gapic::Config::Method.new update_custom_class_config + delete_custom_class_config = parent_rpcs.delete_custom_class if parent_rpcs.respond_to? :delete_custom_class + @delete_custom_class = ::Gapic::Config::Method.new delete_custom_class_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.rb new file mode 100644 index 000000000000..0752ca8a8cf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Speech + module V1p1beta1 + module Adaptation + # Credentials for the Adaptation API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SPEECH_CREDENTIALS", + "SPEECH_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SPEECH_CREDENTIALS_JSON", + "SPEECH_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.rb new file mode 100644 index 000000000000..e5086c847d19 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.rb @@ -0,0 +1,132 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Speech + module V1p1beta1 + module Adaptation + # Path helper methods for the Adaptation API. + module Paths + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # Create a fully-qualified CryptoKeyVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # @param crypto_key_version [String] + # + # @return [::String] + def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" + end + + ## + # Create a fully-qualified CustomClass resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # @param project [String] + # @param location [String] + # @param custom_class [String] + # + # @return [::String] + def custom_class_path project:, location:, custom_class: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/customClasses/#{custom_class}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified PhraseSet resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # @param project [String] + # @param location [String] + # @param phrase_set [String] + # + # @return [::String] + def phrase_set_path project:, location:, phrase_set: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/phraseSets/#{phrase_set}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.rb new file mode 100644 index 000000000000..06d9364c931d --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/speech/v1p1beta1/version" + +require "google/cloud/speech/v1p1beta1/adaptation/credentials" +require "google/cloud/speech/v1p1beta1/adaptation/paths" +require "google/cloud/speech/v1p1beta1/adaptation/rest/client" + +module Google + module Cloud + module Speech + module V1p1beta1 + ## + # Service that implements Google Cloud Speech Adaptation API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/speech/v1p1beta1/adaptation/rest" + # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + module Adaptation + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/speech/v1p1beta1/adaptation/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.rb new file mode 100644 index 000000000000..526ddaf0816c --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.rb @@ -0,0 +1,1323 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb" +require "google/cloud/speech/v1p1beta1/adaptation/rest/service_stub" + +module Google + module Cloud + module Speech + module V1p1beta1 + module Adaptation + module Rest + ## + # REST client for the Adaptation service. + # + # Service that implements Google Cloud Speech Adaptation API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :adaptation_stub + + ## + # Configure the Adaptation Client class. + # + # See {::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Adaptation clients + # ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Speech", "V1p1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Adaptation Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @adaptation_stub.universe_domain + end + + ## + # Create a new Adaptation REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Adaptation client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @adaptation_stub = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @adaptation_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @adaptation_stub.logger + end + + # Service calls + + ## + # Create a set of phrase hints. Each item in the set can be a single word or + # a multi-word phrase. The items in the PhraseSet are favored by the + # recognition model when you send a call that includes the PhraseSet. + # + # @overload create_phrase_set(request, options = nil) + # Pass arguments to `create_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_phrase_set(parent: nil, phrase_set_id: nil, phrase_set: nil) + # Pass arguments to `create_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this phrase set will be created. + # Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param phrase_set_id [::String] + # Required. The ID to use for the phrase set, which will become the final + # component of the phrase set's resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @param phrase_set [::Google::Cloud::Speech::V1p1beta1::PhraseSet, ::Hash] + # Required. The phrase set to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new + # + # # Call the create_phrase_set method. + # result = client.create_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. + # p result + # + def create_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_phrase_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.create_phrase_set request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a phrase set. + # + # @overload get_phrase_set(request, options = nil) + # Pass arguments to `get_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_phrase_set(name: nil) + # Pass arguments to `get_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase set to retrieve. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new + # + # # Call the get_phrase_set method. + # result = client.get_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. + # p result + # + def get_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_phrase_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.get_phrase_set request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List phrase sets. + # + # @overload list_phrase_set(request, options = nil) + # Pass arguments to `list_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_phrase_set(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of phrase set. Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param page_size [::Integer] + # The maximum number of phrase sets to return. The service may return + # fewer than this value. If unspecified, at most 50 phrase sets will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListPhraseSet` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPhraseSet` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new + # + # # Call the list_phrase_set method. + # result = client.list_phrase_set request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::PhraseSet. + # p item + # end + # + def list_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_phrase_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.list_phrase_set request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @adaptation_stub, :list_phrase_set, "phrase_sets", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a phrase set. + # + # @overload update_phrase_set(request, options = nil) + # Pass arguments to `update_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_phrase_set(phrase_set: nil, update_mask: nil) + # Pass arguments to `update_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param phrase_set [::Google::Cloud::Speech::V1p1beta1::PhraseSet, ::Hash] + # Required. The phrase set to update. + # + # The phrase set's `name` field is used to identify the set to be + # updated. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new + # + # # Call the update_phrase_set method. + # result = client.update_phrase_set request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. + # p result + # + def update_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_phrase_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.update_phrase_set request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a phrase set. + # + # @overload delete_phrase_set(request, options = nil) + # Pass arguments to `delete_phrase_set` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_phrase_set(name: nil) + # Pass arguments to `delete_phrase_set` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase set to delete. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new + # + # # Call the delete_phrase_set method. + # result = client.delete_phrase_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_phrase_set request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_phrase_set.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_phrase_set.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_phrase_set.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.delete_phrase_set request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a custom class. + # + # @overload create_custom_class(request, options = nil) + # Pass arguments to `create_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_custom_class(parent: nil, custom_class_id: nil, custom_class: nil) + # Pass arguments to `create_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this custom class will be created. + # Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param custom_class_id [::String] + # Required. The ID to use for the custom class, which will become the final + # component of the custom class' resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @param custom_class [::Google::Cloud::Speech::V1p1beta1::CustomClass, ::Hash] + # Required. The custom class to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new + # + # # Call the create_custom_class method. + # result = client.create_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. + # p result + # + def create_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_custom_class.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.create_custom_class request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get a custom class. + # + # @overload get_custom_class(request, options = nil) + # Pass arguments to `get_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_custom_class(name: nil) + # Pass arguments to `get_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the custom class to retrieve. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new + # + # # Call the get_custom_class method. + # result = client.get_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. + # p result + # + def get_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_custom_class.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.get_custom_class request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List custom classes. + # + # @overload list_custom_classes(request, options = nil) + # Pass arguments to `list_custom_classes` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_custom_classes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_custom_classes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent, which owns this collection of custom classes. Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param page_size [::Integer] + # The maximum number of custom classes to return. The service may return + # fewer than this value. If unspecified, at most 50 custom classes will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListCustomClass` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCustomClass` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::CustomClass>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::CustomClass>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new + # + # # Call the list_custom_classes method. + # result = client.list_custom_classes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::CustomClass. + # p item + # end + # + def list_custom_classes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_custom_classes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_custom_classes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_custom_classes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.list_custom_classes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @adaptation_stub, :list_custom_classes, "custom_classes", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a custom class. + # + # @overload update_custom_class(request, options = nil) + # Pass arguments to `update_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_custom_class(custom_class: nil, update_mask: nil) + # Pass arguments to `update_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param custom_class [::Google::Cloud::Speech::V1p1beta1::CustomClass, ::Hash] + # Required. The custom class to update. + # + # The custom class's `name` field is used to identify the custom class to be + # updated. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new + # + # # Call the update_custom_class method. + # result = client.update_custom_class request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. + # p result + # + def update_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_custom_class.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.update_custom_class request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a custom class. + # + # @overload delete_custom_class(request, options = nil) + # Pass arguments to `delete_custom_class` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_custom_class(name: nil) + # Pass arguments to `delete_custom_class` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the custom class to delete. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new + # + # # Call the delete_custom_class method. + # result = client.delete_custom_class request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_custom_class request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_custom_class.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_custom_class.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_custom_class.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @adaptation_stub.delete_custom_class request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Adaptation REST API. + # + # This class represents the configuration for Adaptation REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_phrase_set to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_phrase_set.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_phrase_set.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Adaptation API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :create_phrase_set + ## + # RPC-specific configuration for `get_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :get_phrase_set + ## + # RPC-specific configuration for `list_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :list_phrase_set + ## + # RPC-specific configuration for `update_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :update_phrase_set + ## + # RPC-specific configuration for `delete_phrase_set` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_phrase_set + ## + # RPC-specific configuration for `create_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :create_custom_class + ## + # RPC-specific configuration for `get_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :get_custom_class + ## + # RPC-specific configuration for `list_custom_classes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_custom_classes + ## + # RPC-specific configuration for `update_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :update_custom_class + ## + # RPC-specific configuration for `delete_custom_class` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_custom_class + + # @private + def initialize parent_rpcs = nil + create_phrase_set_config = parent_rpcs.create_phrase_set if parent_rpcs.respond_to? :create_phrase_set + @create_phrase_set = ::Gapic::Config::Method.new create_phrase_set_config + get_phrase_set_config = parent_rpcs.get_phrase_set if parent_rpcs.respond_to? :get_phrase_set + @get_phrase_set = ::Gapic::Config::Method.new get_phrase_set_config + list_phrase_set_config = parent_rpcs.list_phrase_set if parent_rpcs.respond_to? :list_phrase_set + @list_phrase_set = ::Gapic::Config::Method.new list_phrase_set_config + update_phrase_set_config = parent_rpcs.update_phrase_set if parent_rpcs.respond_to? :update_phrase_set + @update_phrase_set = ::Gapic::Config::Method.new update_phrase_set_config + delete_phrase_set_config = parent_rpcs.delete_phrase_set if parent_rpcs.respond_to? :delete_phrase_set + @delete_phrase_set = ::Gapic::Config::Method.new delete_phrase_set_config + create_custom_class_config = parent_rpcs.create_custom_class if parent_rpcs.respond_to? :create_custom_class + @create_custom_class = ::Gapic::Config::Method.new create_custom_class_config + get_custom_class_config = parent_rpcs.get_custom_class if parent_rpcs.respond_to? :get_custom_class + @get_custom_class = ::Gapic::Config::Method.new get_custom_class_config + list_custom_classes_config = parent_rpcs.list_custom_classes if parent_rpcs.respond_to? :list_custom_classes + @list_custom_classes = ::Gapic::Config::Method.new list_custom_classes_config + update_custom_class_config = parent_rpcs.update_custom_class if parent_rpcs.respond_to? :update_custom_class + @update_custom_class = ::Gapic::Config::Method.new update_custom_class_config + delete_custom_class_config = parent_rpcs.delete_custom_class if parent_rpcs.respond_to? :delete_custom_class + @delete_custom_class = ::Gapic::Config::Method.new delete_custom_class_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.rb new file mode 100644 index 000000000000..bd467300f761 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.rb @@ -0,0 +1,695 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb" + +module Google + module Cloud + module Speech + module V1p1beta1 + module Adaptation + module Rest + ## + # REST service stub for the Adaptation service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # A result object deserialized from the server's reply + def create_phrase_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_phrase_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_phrase_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # A result object deserialized from the server's reply + def get_phrase_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_phrase_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_phrase_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse] + # A result object deserialized from the server's reply + def list_phrase_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_phrase_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_phrase_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # A result object deserialized from the server's reply + def update_phrase_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_phrase_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_phrase_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_phrase_set request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_phrase_set_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_phrase_set", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # A result object deserialized from the server's reply + def create_custom_class request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_custom_class_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_custom_class", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # A result object deserialized from the server's reply + def get_custom_class request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_custom_class_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_custom_class", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_custom_classes REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse] + # A result object deserialized from the server's reply + def list_custom_classes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_custom_classes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_custom_classes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # A result object deserialized from the server's reply + def update_custom_class request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_custom_class_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_custom_class", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_custom_class request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_custom_class_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_custom_class", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_phrase_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/phraseSets", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_phrase_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_phrase_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/phraseSets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_phrase_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{phrase_set.name}", + body: "phrase_set", + matches: [ + ["phrase_set.name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_phrase_set REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_phrase_set_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_custom_class_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/{parent}/customClasses", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_custom_class_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_custom_classes REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_custom_classes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/{parent}/customClasses", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_custom_class_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1p1beta1/{custom_class.name}", + body: "custom_class", + matches: [ + ["custom_class.name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_custom_class REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_custom_class_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1p1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb.rb new file mode 100644 index 000000000000..5b0bc2fff55e --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/speech/v1p1beta1/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n;google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto\x12\x1dgoogle.cloud.speech.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/speech/v1p1beta1/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb0\x01\n\x16\x43reatePhraseSetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\x12\x1a\n\rphrase_set_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\nphrase_set\x18\x03 \x01(\x0b\x32(.google.cloud.speech.v1p1beta1.PhraseSetB\x03\xe0\x41\x02\"\x8c\x01\n\x16UpdatePhraseSetRequest\x12\x41\n\nphrase_set\x18\x01 \x01(\x0b\x32(.google.cloud.speech.v1p1beta1.PhraseSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"L\n\x13GetPhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"v\n\x14ListPhraseSetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"o\n\x15ListPhraseSetResponse\x12=\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32(.google.cloud.speech.v1p1beta1.PhraseSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x16\x44\x65letePhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"\xba\x01\n\x18\x43reateCustomClassRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\x12\x1c\n\x0f\x63ustom_class_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0c\x63ustom_class\x18\x03 \x01(\x0b\x32*.google.cloud.speech.v1p1beta1.CustomClassB\x03\xe0\x41\x02\"\x92\x01\n\x18UpdateCustomClassRequest\x12\x45\n\x0c\x63ustom_class\x18\x01 \x01(\x0b\x32*.google.cloud.speech.v1p1beta1.CustomClassB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"P\n\x15GetCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass\"|\n\x18ListCustomClassesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"x\n\x19ListCustomClassesResponse\x12\x42\n\x0e\x63ustom_classes\x18\x01 \x03(\x0b\x32*.google.cloud.speech.v1p1beta1.CustomClass\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n\x18\x44\x65leteCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass2\xd2\x10\n\nAdaptation\x12\xd6\x01\n\x0f\x43reatePhraseSet\x12\x35.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest\x1a(.google.cloud.speech.v1p1beta1.PhraseSet\"b\xda\x41\x1fparent,phrase_set,phrase_set_id\x82\xd3\xe4\x93\x02:\"5/v1p1beta1/{parent=projects/*/locations/*}/phraseSets:\x01*\x12\xb2\x01\n\x0cGetPhraseSet\x12\x32.google.cloud.speech.v1p1beta1.GetPhraseSetRequest\x1a(.google.cloud.speech.v1p1beta1.PhraseSet\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1p1beta1/{name=projects/*/locations/*/phraseSets/*}\x12\xc2\x01\n\rListPhraseSet\x12\x33.google.cloud.speech.v1p1beta1.ListPhraseSetRequest\x1a\x34.google.cloud.speech.v1p1beta1.ListPhraseSetResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1p1beta1/{parent=projects/*/locations/*}/phraseSets\x12\xe1\x01\n\x0fUpdatePhraseSet\x12\x35.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest\x1a(.google.cloud.speech.v1p1beta1.PhraseSet\"m\xda\x41\x16phrase_set,update_mask\x82\xd3\xe4\x93\x02N2@/v1p1beta1/{phrase_set.name=projects/*/locations/*/phraseSets/*}:\nphrase_set\x12\xa6\x01\n\x0f\x44\x65letePhraseSet\x12\x35.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1p1beta1/{name=projects/*/locations/*/phraseSets/*}\x12\xe3\x01\n\x11\x43reateCustomClass\x12\x37.google.cloud.speech.v1p1beta1.CreateCustomClassRequest\x1a*.google.cloud.speech.v1p1beta1.CustomClass\"i\xda\x41#parent,custom_class,custom_class_id\x82\xd3\xe4\x93\x02=\"8/v1p1beta1/{parent=projects/*/locations/*}/customClasses:\x01*\x12\xbb\x01\n\x0eGetCustomClass\x12\x34.google.cloud.speech.v1p1beta1.GetCustomClassRequest\x1a*.google.cloud.speech.v1p1beta1.CustomClass\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1p1beta1/{name=projects/*/locations/*/customClasses/*}\x12\xd1\x01\n\x11ListCustomClasses\x12\x37.google.cloud.speech.v1p1beta1.ListCustomClassesRequest\x1a\x38.google.cloud.speech.v1p1beta1.ListCustomClassesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1p1beta1/{parent=projects/*/locations/*}/customClasses\x12\xf0\x01\n\x11UpdateCustomClass\x12\x37.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest\x1a*.google.cloud.speech.v1p1beta1.CustomClass\"v\xda\x41\x18\x63ustom_class,update_mask\x82\xd3\xe4\x93\x02U2E/v1p1beta1/{custom_class.name=projects/*/locations/*/customClasses/*}:\x0c\x63ustom_class\x12\xad\x01\n\x11\x44\x65leteCustomClass\x12\x37.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1p1beta1/{name=projects/*/locations/*/customClasses/*}\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB}\n!com.google.cloud.speech.v1p1beta1B\x15SpeechAdaptationProtoP\x01Z9cloud.google.com/go/speech/apiv1p1beta1/speechpb;speechpb\xa2\x02\x03GCSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Speech + module V1p1beta1 + CreatePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CreatePhraseSetRequest").msgclass + UpdatePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest").msgclass + GetPhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.GetPhraseSetRequest").msgclass + ListPhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.ListPhraseSetRequest").msgclass + ListPhraseSetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.ListPhraseSetResponse").msgclass + DeletePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.DeletePhraseSetRequest").msgclass + CreateCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CreateCustomClassRequest").msgclass + UpdateCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.UpdateCustomClassRequest").msgclass + GetCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.GetCustomClassRequest").msgclass + ListCustomClassesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.ListCustomClassesRequest").msgclass + ListCustomClassesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.ListCustomClassesResponse").msgclass + DeleteCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.DeleteCustomClassRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb new file mode 100644 index 000000000000..e7fe2aa9bbdf --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto for package 'google.cloud.speech.v1p1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb' + +module Google + module Cloud + module Speech + module V1p1beta1 + module Adaptation + # Service that implements Google Cloud Speech Adaptation API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.speech.v1p1beta1.Adaptation' + + # Create a set of phrase hints. Each item in the set can be a single word or + # a multi-word phrase. The items in the PhraseSet are favored by the + # recognition model when you send a call that includes the PhraseSet. + rpc :CreatePhraseSet, ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest, ::Google::Cloud::Speech::V1p1beta1::PhraseSet + # Get a phrase set. + rpc :GetPhraseSet, ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest, ::Google::Cloud::Speech::V1p1beta1::PhraseSet + # List phrase sets. + rpc :ListPhraseSet, ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest, ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse + # Update a phrase set. + rpc :UpdatePhraseSet, ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest, ::Google::Cloud::Speech::V1p1beta1::PhraseSet + # Delete a phrase set. + rpc :DeletePhraseSet, ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest, ::Google::Protobuf::Empty + # Create a custom class. + rpc :CreateCustomClass, ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest, ::Google::Cloud::Speech::V1p1beta1::CustomClass + # Get a custom class. + rpc :GetCustomClass, ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest, ::Google::Cloud::Speech::V1p1beta1::CustomClass + # List custom classes. + rpc :ListCustomClasses, ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest, ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse + # Update a custom class. + rpc :UpdateCustomClass, ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest, ::Google::Cloud::Speech::V1p1beta1::CustomClass + # Delete a custom class. + rpc :DeleteCustomClass, ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb new file mode 100644 index 000000000000..b33181f5fa56 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/speech/v1p1beta1/cloud_speech.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/cloud/speech/v1p1beta1/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n0google/cloud/speech/v1p1beta1/cloud_speech.proto\x12\x1dgoogle.cloud.speech.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/cloud/speech/v1p1beta1/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\x9e\x01\n\x10RecognizeRequest\x12\x45\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x30.google.cloud.speech.v1p1beta1.RecognitionConfigB\x03\xe0\x41\x02\x12\x43\n\x05\x61udio\x18\x02 \x01(\x0b\x32/.google.cloud.speech.v1p1beta1.RecognitionAudioB\x03\xe0\x41\x02\"\xfc\x01\n\x1bLongRunningRecognizeRequest\x12\x45\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x30.google.cloud.speech.v1p1beta1.RecognitionConfigB\x03\xe0\x41\x02\x12\x43\n\x05\x61udio\x18\x02 \x01(\x0b\x32/.google.cloud.speech.v1p1beta1.RecognitionAudioB\x03\xe0\x41\x02\x12Q\n\routput_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.speech.v1p1beta1.TranscriptOutputConfigB\x03\xe0\x41\x01\":\n\x16TranscriptOutputConfig\x12\x11\n\x07gcs_uri\x18\x01 \x01(\tH\x00\x42\r\n\x0boutput_type\"\xa0\x01\n\x19StreamingRecognizeRequest\x12U\n\x10streaming_config\x18\x01 \x01(\x0b\x32\x39.google.cloud.speech.v1p1beta1.StreamingRecognitionConfigH\x00\x12\x17\n\raudio_content\x18\x02 \x01(\x0cH\x00\x42\x13\n\x11streaming_request\"\xb5\x03\n\x1aStreamingRecognitionConfig\x12\x45\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x30.google.cloud.speech.v1p1beta1.RecognitionConfigB\x03\xe0\x41\x02\x12\x18\n\x10single_utterance\x18\x02 \x01(\x08\x12\x17\n\x0finterim_results\x18\x03 \x01(\x08\x12$\n\x1c\x65nable_voice_activity_events\x18\x05 \x01(\x08\x12n\n\x16voice_activity_timeout\x18\x06 \x01(\x0b\x32N.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout\x1a\x86\x01\n\x14VoiceActivityTimeout\x12\x37\n\x14speech_start_timeout\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12speech_end_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xcd\t\n\x11RecognitionConfig\x12P\n\x08\x65ncoding\x18\x01 \x01(\x0e\x32>.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12\x1b\n\x13\x61udio_channel_count\x18\x07 \x01(\x05\x12/\n\'enable_separate_recognition_per_channel\x18\x0c \x01(\x08\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x1a\x61lternative_language_codes\x18\x12 \x03(\t\x12\x18\n\x10max_alternatives\x18\x04 \x01(\x05\x12\x18\n\x10profanity_filter\x18\x05 \x01(\x08\x12\x43\n\nadaptation\x18\x14 \x01(\x0b\x32/.google.cloud.speech.v1p1beta1.SpeechAdaptation\x12]\n\x18transcript_normalization\x18\x18 \x01(\x0b\x32\x36.google.cloud.speech.v1p1beta1.TranscriptNormalizationB\x03\xe0\x41\x01\x12\x45\n\x0fspeech_contexts\x18\x06 \x03(\x0b\x32,.google.cloud.speech.v1p1beta1.SpeechContext\x12 \n\x18\x65nable_word_time_offsets\x18\x08 \x01(\x08\x12\x1e\n\x16\x65nable_word_confidence\x18\x0f \x01(\x08\x12$\n\x1c\x65nable_automatic_punctuation\x18\x0b \x01(\x08\x12=\n\x19\x65nable_spoken_punctuation\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x38\n\x14\x65nable_spoken_emojis\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12&\n\x1a\x65nable_speaker_diarization\x18\x10 \x01(\x08\x42\x02\x18\x01\x12%\n\x19\x64iarization_speaker_count\x18\x11 \x01(\x05\x42\x02\x18\x01\x12S\n\x12\x64iarization_config\x18\x13 \x01(\x0b\x32\x37.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig\x12\x44\n\x08metadata\x18\t \x01(\x0b\x32\x32.google.cloud.speech.v1p1beta1.RecognitionMetadata\x12\r\n\x05model\x18\r \x01(\t\x12\x14\n\x0cuse_enhanced\x18\x0e \x01(\x08\"\xad\x01\n\rAudioEncoding\x12\x18\n\x14\x45NCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\x08\n\x04\x46LAC\x10\x02\x12\t\n\x05MULAW\x10\x03\x12\x07\n\x03\x41MR\x10\x04\x12\n\n\x06\x41MR_WB\x10\x05\x12\x0c\n\x08OGG_OPUS\x10\x06\x12\x1a\n\x16SPEEX_WITH_HEADER_BYTE\x10\x07\x12\x07\n\x03MP3\x10\x08\x12\r\n\tWEBM_OPUS\x10\t\x12\x08\n\x04\x41LAW\x10\n\"\x90\x01\n\x18SpeakerDiarizationConfig\x12\"\n\x1a\x65nable_speaker_diarization\x18\x01 \x01(\x08\x12\x19\n\x11min_speaker_count\x18\x02 \x01(\x05\x12\x19\n\x11max_speaker_count\x18\x03 \x01(\x05\x12\x1a\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\"\xdb\x08\n\x13RecognitionMetadata\x12\\\n\x10interaction_type\x18\x01 \x01(\x0e\x32\x42.google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType\x12$\n\x1cindustry_naics_code_of_audio\x18\x03 \x01(\r\x12\x62\n\x13microphone_distance\x18\x04 \x01(\x0e\x32\x45.google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance\x12\x61\n\x13original_media_type\x18\x05 \x01(\x0e\x32\x44.google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType\x12\x65\n\x15recording_device_type\x18\x06 \x01(\x0e\x32\x46.google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType\x12\x1d\n\x15recording_device_name\x18\x07 \x01(\t\x12\x1a\n\x12original_mime_type\x18\x08 \x01(\t\x12\x19\n\robfuscated_id\x18\t \x01(\x03\x42\x02\x18\x01\x12\x13\n\x0b\x61udio_topic\x18\n \x01(\t\"\xc5\x01\n\x0fInteractionType\x12 \n\x1cINTERACTION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nDISCUSSION\x10\x01\x12\x10\n\x0cPRESENTATION\x10\x02\x12\x0e\n\nPHONE_CALL\x10\x03\x12\r\n\tVOICEMAIL\x10\x04\x12\x1b\n\x17PROFESSIONALLY_PRODUCED\x10\x05\x12\x10\n\x0cVOICE_SEARCH\x10\x06\x12\x11\n\rVOICE_COMMAND\x10\x07\x12\r\n\tDICTATION\x10\x08\"d\n\x12MicrophoneDistance\x12#\n\x1fMICROPHONE_DISTANCE_UNSPECIFIED\x10\x00\x12\r\n\tNEARFIELD\x10\x01\x12\x0c\n\x08MIDFIELD\x10\x02\x12\x0c\n\x08\x46\x41RFIELD\x10\x03\"N\n\x11OriginalMediaType\x12#\n\x1fORIGINAL_MEDIA_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41UDIO\x10\x01\x12\t\n\x05VIDEO\x10\x02\"\xa4\x01\n\x13RecordingDeviceType\x12%\n!RECORDING_DEVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nSMARTPHONE\x10\x01\x12\x06\n\x02PC\x10\x02\x12\x0e\n\nPHONE_LINE\x10\x03\x12\x0b\n\x07VEHICLE\x10\x04\x12\x18\n\x14OTHER_OUTDOOR_DEVICE\x10\x05\x12\x17\n\x13OTHER_INDOOR_DEVICE\x10\x06:\x02\x18\x01\"/\n\rSpeechContext\x12\x0f\n\x07phrases\x18\x01 \x03(\t\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\"D\n\x10RecognitionAudio\x12\x11\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x12\r\n\x03uri\x18\x02 \x01(\tH\x00\x42\x0e\n\x0c\x61udio_source\"\x98\x02\n\x11RecognizeResponse\x12G\n\x07results\x18\x02 \x03(\x0b\x32\x36.google.cloud.speech.v1p1beta1.SpeechRecognitionResult\x12\x34\n\x11total_billed_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12S\n\x16speech_adaptation_info\x18\x07 \x01(\x0b\x32\x33.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\x08 \x01(\x03\x12\x1b\n\x13using_legacy_models\x18\t \x01(\x08\"\xfe\x02\n\x1cLongRunningRecognizeResponse\x12G\n\x07results\x18\x02 \x03(\x0b\x32\x36.google.cloud.speech.v1p1beta1.SpeechRecognitionResult\x12\x34\n\x11total_billed_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\routput_config\x18\x06 \x01(\x0b\x32\x35.google.cloud.speech.v1p1beta1.TranscriptOutputConfig\x12(\n\x0coutput_error\x18\x07 \x01(\x0b\x32\x12.google.rpc.Status\x12S\n\x16speech_adaptation_info\x18\x08 \x01(\x0b\x32\x33.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\t \x01(\x03\"\x83\x02\n\x1cLongRunningRecognizeMetadata\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x03uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12Q\n\routput_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.speech.v1p1beta1.TranscriptOutputConfigB\x03\xe0\x41\x03\"\xe6\x04\n\x1aStreamingRecognizeResponse\x12!\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12J\n\x07results\x18\x02 \x03(\x0b\x32\x39.google.cloud.speech.v1p1beta1.StreamingRecognitionResult\x12\x64\n\x11speech_event_type\x18\x04 \x01(\x0e\x32I.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType\x12\x34\n\x11speech_event_time\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11total_billed_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12S\n\x16speech_adaptation_info\x18\t \x01(\x0b\x32\x33.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\n \x01(\x03\"\x9d\x01\n\x0fSpeechEventType\x12\x1c\n\x18SPEECH_EVENT_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x01\x12\x19\n\x15SPEECH_ACTIVITY_BEGIN\x10\x02\x12\x17\n\x13SPEECH_ACTIVITY_END\x10\x03\x12\x1b\n\x17SPEECH_ACTIVITY_TIMEOUT\x10\x04\"\xf9\x01\n\x1aStreamingRecognitionResult\x12Q\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32;.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative\x12\x10\n\x08is_final\x18\x02 \x01(\x08\x12\x11\n\tstability\x18\x03 \x01(\x02\x12\x32\n\x0fresult_end_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x63hannel_tag\x18\x05 \x01(\x05\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x03\"\xd1\x01\n\x17SpeechRecognitionResult\x12Q\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32;.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative\x12\x13\n\x0b\x63hannel_tag\x18\x02 \x01(\x05\x12\x32\n\x0fresult_end_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\"~\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x36\n\x05words\x18\x03 \x03(\x0b\x32\'.google.cloud.speech.v1p1beta1.WordInfo\"\xc0\x01\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x1a\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x1a\n\rspeaker_label\x18\x06 \x01(\tB\x03\xe0\x41\x03\"K\n\x14SpeechAdaptationInfo\x12\x1a\n\x12\x61\x64\x61ptation_timeout\x18\x01 \x01(\x08\x12\x17\n\x0ftimeout_message\x18\x04 \x01(\t2\x82\x05\n\x06Speech\x12\xa5\x01\n\tRecognize\x12/.google.cloud.speech.v1p1beta1.RecognizeRequest\x1a\x30.google.cloud.speech.v1p1beta1.RecognizeResponse\"5\xda\x41\x0c\x63onfig,audio\x82\xd3\xe4\x93\x02 \"\x1b/v1p1beta1/speech:recognize:\x01*\x12\xf2\x01\n\x14LongRunningRecognize\x12:.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41<\n\x1cLongRunningRecognizeResponse\x12\x1cLongRunningRecognizeMetadata\xda\x41\x0c\x63onfig,audio\x82\xd3\xe4\x93\x02+\"&/v1p1beta1/speech:longrunningrecognize:\x01*\x12\x8f\x01\n\x12StreamingRecognize\x12\x38.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest\x1a\x39.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse\"\x00(\x01\x30\x01\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBs\n!com.google.cloud.speech.v1p1beta1B\x0bSpeechProtoP\x01Z9cloud.google.com/go/speech/apiv1p1beta1/speechpb;speechpb\xa2\x02\x03GCSb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Speech + module V1p1beta1 + RecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognizeRequest").msgclass + LongRunningRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest").msgclass + TranscriptOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.TranscriptOutputConfig").msgclass + StreamingRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognizeRequest").msgclass + StreamingRecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognitionConfig").msgclass + StreamingRecognitionConfig::VoiceActivityTimeout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout").msgclass + RecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionConfig").msgclass + RecognitionConfig::AudioEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding").enummodule + SpeakerDiarizationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig").msgclass + RecognitionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionMetadata").msgclass + RecognitionMetadata::InteractionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType").enummodule + RecognitionMetadata::MicrophoneDistance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance").enummodule + RecognitionMetadata::OriginalMediaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType").enummodule + RecognitionMetadata::RecordingDeviceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType").enummodule + SpeechContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechContext").msgclass + RecognitionAudio = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionAudio").msgclass + RecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognizeResponse").msgclass + LongRunningRecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse").msgclass + LongRunningRecognizeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata").msgclass + StreamingRecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognizeResponse").msgclass + StreamingRecognizeResponse::SpeechEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType").enummodule + StreamingRecognitionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognitionResult").msgclass + SpeechRecognitionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechRecognitionResult").msgclass + SpeechRecognitionAlternative = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative").msgclass + WordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.WordInfo").msgclass + SpeechAdaptationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechAdaptationInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb new file mode 100644 index 000000000000..7a757ba1b34b --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/speech/v1p1beta1/cloud_speech.proto for package 'google.cloud.speech.v1p1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/speech/v1p1beta1/cloud_speech_pb' + +module Google + module Cloud + module Speech + module V1p1beta1 + module Speech + # Service that implements Google Cloud Speech API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.speech.v1p1beta1.Speech' + + # Performs synchronous speech recognition: receive results after all audio + # has been sent and processed. + rpc :Recognize, ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest, ::Google::Cloud::Speech::V1p1beta1::RecognizeResponse + # Performs asynchronous speech recognition: receive results via the + # google.longrunning.Operations interface. Returns either an + # `Operation.error` or an `Operation.response` which contains + # a `LongRunningRecognizeResponse` message. + # For more information on asynchronous speech recognition, see the + # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). + rpc :LongRunningRecognize, ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest, ::Google::Longrunning::Operation + # Performs bidirectional streaming speech recognition: receive results while + # sending audio. This method is only available via the gRPC API (not REST). + rpc :StreamingRecognize, stream(::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest), stream(::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse) + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/resource_pb.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/resource_pb.rb new file mode 100644 index 000000000000..debdb5df1fa0 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/resource_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/speech/v1p1beta1/resource.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/speech/v1p1beta1/resource.proto\x12\x1dgoogle.cloud.speech.v1p1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe4\x06\n\x0b\x43ustomClass\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0f\x63ustom_class_id\x18\x02 \x01(\t\x12\x43\n\x05items\x18\x03 \x03(\x0b\x32\x34.google.cloud.speech.v1p1beta1.CustomClass.ClassItem\x12?\n\x0ckms_key_name\x18\x06 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x14kms_key_version_name\x18\x07 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12\x10\n\x03uid\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x05state\x18\n \x01(\x0e\x32\x30.google.cloud.speech.v1p1beta1.CustomClass.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12U\n\x0b\x61nnotations\x18\r \x03(\x0b\x32;.google.cloud.speech.v1p1beta1.CustomClass.AnnotationsEntryB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x1a\x1a\n\tClassItem\x12\r\n\x05value\x18\x01 \x01(\t\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x04:l\xea\x41i\n!speech.googleapis.com/CustomClass\x12\x44projects/{project}/locations/{location}/customClasses/{custom_class}\"\xd6\x06\n\tPhraseSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x07phrases\x18\x02 \x03(\x0b\x32/.google.cloud.speech.v1p1beta1.PhraseSet.Phrase\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\x12?\n\x0ckms_key_name\x18\x07 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x14kms_key_version_name\x18\x08 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12\x10\n\x03uid\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x0b \x01(\x0e\x32..google.cloud.speech.v1p1beta1.PhraseSet.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12S\n\x0b\x61nnotations\x18\x0e \x03(\x0b\x32\x39.google.cloud.speech.v1p1beta1.PhraseSet.AnnotationsEntryB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x1a&\n\x06Phrase\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x04:e\xea\x41\x62\n\x1fspeech.googleapis.com/PhraseSet\x12?projects/{project}/locations/{location}/phraseSets/{phrase_set}\"\xd2\x02\n\x10SpeechAdaptation\x12=\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32(.google.cloud.speech.v1p1beta1.PhraseSet\x12\x43\n\x15phrase_set_references\x18\x02 \x03(\tB$\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\x12\x42\n\x0e\x63ustom_classes\x18\x03 \x03(\x0b\x32*.google.cloud.speech.v1p1beta1.CustomClass\x12Q\n\x0c\x61\x62nf_grammar\x18\x04 \x01(\x0b\x32;.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar\x1a#\n\x0b\x41\x42NFGrammar\x12\x14\n\x0c\x61\x62nf_strings\x18\x01 \x03(\t\"\xaa\x01\n\x17TranscriptNormalization\x12M\n\x07\x65ntries\x18\x01 \x03(\x0b\x32<.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry\x1a@\n\x05\x45ntry\x12\x0e\n\x06search\x18\x01 \x01(\t\x12\x0f\n\x07replace\x18\x02 \x01(\t\x12\x16\n\x0e\x63\x61se_sensitive\x18\x03 \x01(\x08\x42\xa0\x03\n!com.google.cloud.speech.v1p1beta1B\x13SpeechResourceProtoP\x01Z9cloud.google.com/go/speech/apiv1p1beta1/speechpb;speechpb\xa2\x02\x03GCS\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Speech + module V1p1beta1 + CustomClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CustomClass").msgclass + CustomClass::ClassItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CustomClass.ClassItem").msgclass + CustomClass::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CustomClass.State").enummodule + PhraseSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.PhraseSet").msgclass + PhraseSet::Phrase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.PhraseSet.Phrase").msgclass + PhraseSet::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.PhraseSet.State").enummodule + SpeechAdaptation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechAdaptation").msgclass + SpeechAdaptation::ABNFGrammar = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar").msgclass + TranscriptNormalization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.TranscriptNormalization").msgclass + TranscriptNormalization::Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.rb new file mode 100644 index 000000000000..6c94920321b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/speech/v1p1beta1/speech/rest" +require "google/cloud/speech/v1p1beta1/adaptation/rest" +require "google/cloud/speech/v1p1beta1/version" + +module Google + module Cloud + module Speech + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/speech/v1p1beta1/rest" + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new + # + module V1p1beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.rb new file mode 100644 index 000000000000..bd0aec88faf2 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/speech/v1p1beta1/version" + +require "google/cloud/speech/v1p1beta1/speech/credentials" +require "google/cloud/speech/v1p1beta1/speech/paths" +require "google/cloud/speech/v1p1beta1/speech/operations" +require "google/cloud/speech/v1p1beta1/speech/client" +require "google/cloud/speech/v1p1beta1/speech/rest" + +module Google + module Cloud + module Speech + module V1p1beta1 + ## + # Service that implements Google Cloud Speech API. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/speech/v1p1beta1/speech" + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/speech/v1p1beta1/speech/rest" + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new + # + module Speech + end + end + end + end +end + +helper_path = ::File.join __dir__, "speech", "helpers.rb" +require "google/cloud/speech/v1p1beta1/speech/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.rb new file mode 100644 index 000000000000..f7dedf02534f --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.rb @@ -0,0 +1,687 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/speech/v1p1beta1/cloud_speech_pb" + +module Google + module Cloud + module Speech + module V1p1beta1 + module Speech + ## + # Client for the Speech service. + # + # Service that implements Google Cloud Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :speech_stub + + ## + # Configure the Speech Client class. + # + # See {::Google::Cloud::Speech::V1p1beta1::Speech::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Speech clients + # ::Google::Cloud::Speech::V1p1beta1::Speech::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Speech", "V1p1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.recognize.timeout = 5000.0 + default_config.rpcs.recognize.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.long_running_recognize.timeout = 5000.0 + + default_config.rpcs.streaming_recognize.timeout = 5000.0 + default_config.rpcs.streaming_recognize.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Speech Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Speech::V1p1beta1::Speech::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @speech_stub.universe_domain + end + + ## + # Create a new Speech client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Speech client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/speech/v1p1beta1/cloud_speech_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @speech_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Speech::V1p1beta1::Speech::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @speech_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Speech::V1p1beta1::Speech::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @speech_stub.logger + end + + # Service calls + + ## + # Performs synchronous speech recognition: receive results after all audio + # has been sent and processed. + # + # @overload recognize(request, options = nil) + # Pass arguments to `recognize` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::RecognizeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::RecognizeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload recognize(config: nil, audio: nil) + # Pass arguments to `recognize` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param config [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig, ::Hash] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @param audio [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio, ::Hash] + # Required. The audio data to be recognized. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new + # + # # Call the recognize method. + # result = client.recognize request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::RecognizeResponse. + # p result + # + def recognize request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.recognize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.recognize.timeout, + metadata: metadata, + retry_policy: @config.rpcs.recognize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @speech_stub.call_rpc :recognize, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs asynchronous speech recognition: receive results via the + # google.longrunning.Operations interface. Returns either an + # `Operation.error` or an `Operation.response` which contains + # a `LongRunningRecognizeResponse` message. + # For more information on asynchronous speech recognition, see the + # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). + # + # @overload long_running_recognize(request, options = nil) + # Pass arguments to `long_running_recognize` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload long_running_recognize(config: nil, audio: nil, output_config: nil) + # Pass arguments to `long_running_recognize` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param config [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig, ::Hash] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @param audio [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio, ::Hash] + # Required. The audio data to be recognized. + # @param output_config [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig, ::Hash] + # Optional. Specifies an optional destination for the recognition results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new + # + # # Call the long_running_recognize method. + # result = client.long_running_recognize request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def long_running_recognize request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.long_running_recognize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.long_running_recognize.timeout, + metadata: metadata, + retry_policy: @config.rpcs.long_running_recognize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @speech_stub.call_rpc :long_running_recognize, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs bidirectional streaming speech recognition: receive results while + # sending audio. This method is only available via the gRPC API (not REST). + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest, ::Hash>] + # An enumerable of {::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest} instances. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the streaming_recognize method to start streaming. + # output = client.streaming_recognize input + # + # # Send requests on the stream. For each request object, set fields by + # # passing keyword arguments. Be sure to close the stream when done. + # input << Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new + # input << Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse + # output.each do |current_response| + # p current_response + # end + # + def streaming_recognize request, options = nil + unless request.is_a? ::Enumerable + raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum + request = request.to_enum + end + + request = request.lazy.map do |req| + ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest + end + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.streaming_recognize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.streaming_recognize.timeout, + metadata: metadata, + retry_policy: @config.rpcs.streaming_recognize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @speech_stub.call_rpc :streaming_recognize, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Speech API. + # + # This class represents the configuration for Speech, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Speech::V1p1beta1::Speech::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # recognize to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Speech::V1p1beta1::Speech::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.recognize.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.recognize.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Speech API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `recognize` + # @return [::Gapic::Config::Method] + # + attr_reader :recognize + ## + # RPC-specific configuration for `long_running_recognize` + # @return [::Gapic::Config::Method] + # + attr_reader :long_running_recognize + ## + # RPC-specific configuration for `streaming_recognize` + # @return [::Gapic::Config::Method] + # + attr_reader :streaming_recognize + + # @private + def initialize parent_rpcs = nil + recognize_config = parent_rpcs.recognize if parent_rpcs.respond_to? :recognize + @recognize = ::Gapic::Config::Method.new recognize_config + long_running_recognize_config = parent_rpcs.long_running_recognize if parent_rpcs.respond_to? :long_running_recognize + @long_running_recognize = ::Gapic::Config::Method.new long_running_recognize_config + streaming_recognize_config = parent_rpcs.streaming_recognize if parent_rpcs.respond_to? :streaming_recognize + @streaming_recognize = ::Gapic::Config::Method.new streaming_recognize_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.rb new file mode 100644 index 000000000000..f83c21f0ed37 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Speech + module V1p1beta1 + module Speech + # Credentials for the Speech API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "SPEECH_CREDENTIALS", + "SPEECH_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "SPEECH_CREDENTIALS_JSON", + "SPEECH_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.rb new file mode 100644 index 000000000000..05f9fca7becb --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.rb @@ -0,0 +1,835 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Speech + module V1p1beta1 + module Speech + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Speech Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Speech Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.rb new file mode 100644 index 000000000000..9e690dc1410d --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Speech + module V1p1beta1 + module Speech + # Path helper methods for the Speech API. + module Paths + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # Create a fully-qualified CryptoKeyVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # @param crypto_key_version [String] + # + # @return [::String] + def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" + end + + ## + # Create a fully-qualified CustomClass resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # @param project [String] + # @param location [String] + # @param custom_class [String] + # + # @return [::String] + def custom_class_path project:, location:, custom_class: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/customClasses/#{custom_class}" + end + + ## + # Create a fully-qualified PhraseSet resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # @param project [String] + # @param location [String] + # @param phrase_set [String] + # + # @return [::String] + def phrase_set_path project:, location:, phrase_set: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/phraseSets/#{phrase_set}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.rb new file mode 100644 index 000000000000..cd4e47947364 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/speech/v1p1beta1/version" + +require "google/cloud/speech/v1p1beta1/speech/credentials" +require "google/cloud/speech/v1p1beta1/speech/paths" +require "google/cloud/speech/v1p1beta1/speech/rest/operations" +require "google/cloud/speech/v1p1beta1/speech/rest/client" + +module Google + module Cloud + module Speech + module V1p1beta1 + ## + # Service that implements Google Cloud Speech API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/speech/v1p1beta1/speech/rest" + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new + # + module Speech + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/speech/v1p1beta1/speech/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.rb new file mode 100644 index 000000000000..d364abfd7fa0 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.rb @@ -0,0 +1,555 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/speech/v1p1beta1/cloud_speech_pb" +require "google/cloud/speech/v1p1beta1/speech/rest/service_stub" + +module Google + module Cloud + module Speech + module V1p1beta1 + module Speech + module Rest + ## + # REST client for the Speech service. + # + # Service that implements Google Cloud Speech API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :speech_stub + + ## + # Configure the Speech Client class. + # + # See {::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Speech clients + # ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Speech", "V1p1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.recognize.timeout = 5000.0 + default_config.rpcs.recognize.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.long_running_recognize.timeout = 5000.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Speech Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @speech_stub.universe_domain + end + + ## + # Create a new Speech REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Speech client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @speech_stub = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @speech_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @speech_stub.logger + end + + # Service calls + + ## + # Performs synchronous speech recognition: receive results after all audio + # has been sent and processed. + # + # @overload recognize(request, options = nil) + # Pass arguments to `recognize` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::RecognizeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::RecognizeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload recognize(config: nil, audio: nil) + # Pass arguments to `recognize` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param config [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig, ::Hash] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @param audio [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio, ::Hash] + # Required. The audio data to be recognized. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new + # + # # Call the recognize method. + # result = client.recognize request + # + # # The returned object is of type Google::Cloud::Speech::V1p1beta1::RecognizeResponse. + # p result + # + def recognize request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.recognize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.recognize.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.recognize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @speech_stub.recognize request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Performs asynchronous speech recognition: receive results via the + # google.longrunning.Operations interface. Returns either an + # `Operation.error` or an `Operation.response` which contains + # a `LongRunningRecognizeResponse` message. + # For more information on asynchronous speech recognition, see the + # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). + # + # @overload long_running_recognize(request, options = nil) + # Pass arguments to `long_running_recognize` via a request object, either of type + # {::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload long_running_recognize(config: nil, audio: nil, output_config: nil) + # Pass arguments to `long_running_recognize` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param config [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig, ::Hash] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @param audio [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio, ::Hash] + # Required. The audio data to be recognized. + # @param output_config [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig, ::Hash] + # Optional. Specifies an optional destination for the recognition results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/speech/v1p1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new + # + # # Call the long_running_recognize method. + # result = client.long_running_recognize request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def long_running_recognize request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.long_running_recognize.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.long_running_recognize.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.long_running_recognize.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @speech_stub.long_running_recognize request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Speech REST API. + # + # This class represents the configuration for Speech REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # recognize to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.recognize.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.recognize.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Speech API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `recognize` + # @return [::Gapic::Config::Method] + # + attr_reader :recognize + ## + # RPC-specific configuration for `long_running_recognize` + # @return [::Gapic::Config::Method] + # + attr_reader :long_running_recognize + + # @private + def initialize parent_rpcs = nil + recognize_config = parent_rpcs.recognize if parent_rpcs.respond_to? :recognize + @recognize = ::Gapic::Config::Method.new recognize_config + long_running_recognize_config = parent_rpcs.long_running_recognize if parent_rpcs.respond_to? :long_running_recognize + @long_running_recognize = ::Gapic::Config::Method.new long_running_recognize_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.rb new file mode 100644 index 000000000000..6db77cbcb4d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Speech + module V1p1beta1 + module Speech + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Speech Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Speech Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "speech.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/operations", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1p1beta1/operations/{name}", + matches: [ + ["name", %r{^(?<__wildcard__>.*)$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.rb new file mode 100644 index 000000000000..5822dffd5c1b --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.rb @@ -0,0 +1,201 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/speech/v1p1beta1/cloud_speech_pb" + +module Google + module Cloud + module Speech + module V1p1beta1 + module Speech + module Rest + ## + # REST service stub for the Speech service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the recognize REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::RecognizeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] + # A result object deserialized from the server's reply + def recognize request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_recognize_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "recognize", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Speech::V1p1beta1::RecognizeResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the long_running_recognize REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def long_running_recognize request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_long_running_recognize_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "long_running_recognize", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the recognize REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::RecognizeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_recognize_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/speech:recognize", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the long_running_recognize REST call + # + # @param request_pb [::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_long_running_recognize_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1p1beta1/speech:longrunningrecognize", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/version.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/version.rb new file mode 100644 index 000000000000..44ab865d9484 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/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 Speech + module V1p1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/README.md new file mode 100644 index 000000000000..61d72528ac28 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Speech-to-Text V1p1beta1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb new file mode 100644 index 000000000000..00d8a38fa769 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb @@ -0,0 +1,1033 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Speech + module V1p1beta1 + # The top-level message sent by the client for the `Recognize` method. + # @!attribute [rw] config + # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @!attribute [rw] audio + # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio] + # Required. The audio data to be recognized. + class RecognizeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The top-level message sent by the client for the `LongRunningRecognize` + # method. + # @!attribute [rw] config + # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @!attribute [rw] audio + # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio] + # Required. The audio data to be recognized. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig] + # Optional. Specifies an optional destination for the recognition results. + class LongRunningRecognizeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies an optional destination for the recognition results. + # @!attribute [rw] gcs_uri + # @return [::String] + # Specifies a Cloud Storage URI for the recognition results. Must be + # specified in the format: `gs://bucket_name/object_name`, and the bucket + # must already exist. + class TranscriptOutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The top-level message sent by the client for the `StreamingRecognize` method. + # Multiple `StreamingRecognizeRequest` messages are sent. The first message + # must contain a `streaming_config` message and must not contain + # `audio_content`. All subsequent messages must contain `audio_content` and + # must not contain a `streaming_config` message. + # @!attribute [rw] streaming_config + # @return [::Google::Cloud::Speech::V1p1beta1::StreamingRecognitionConfig] + # Provides information to the recognizer that specifies how to process the + # request. The first `StreamingRecognizeRequest` message must contain a + # `streaming_config` message. + # + # Note: The following fields are mutually exclusive: `streaming_config`, `audio_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] audio_content + # @return [::String] + # The audio data to be recognized. Sequential chunks of audio data are sent + # in sequential `StreamingRecognizeRequest` messages. The first + # `StreamingRecognizeRequest` message must not contain `audio_content` data + # and all subsequent `StreamingRecognizeRequest` messages must contain + # `audio_content` data. The audio bytes must be encoded as specified in + # `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a + # pure binary representation (not base64). See + # [content limits](https://cloud.google.com/speech-to-text/quotas#content). + # + # Note: The following fields are mutually exclusive: `audio_content`, `streaming_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class StreamingRecognizeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides information to the recognizer that specifies how to process the + # request. + # @!attribute [rw] config + # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig] + # Required. Provides information to the recognizer that specifies how to + # process the request. + # @!attribute [rw] single_utterance + # @return [::Boolean] + # If `false` or omitted, the recognizer will perform continuous + # recognition (continuing to wait for and process audio even if the user + # pauses speaking) until the client closes the input stream (gRPC API) or + # until the maximum time limit has been reached. May return multiple + # `StreamingRecognitionResult`s with the `is_final` flag set to `true`. + # + # If `true`, the recognizer will detect a single spoken utterance. When it + # detects that the user has paused or stopped speaking, it will return an + # `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no + # more than one `StreamingRecognitionResult` with the `is_final` flag set to + # `true`. + # + # The `single_utterance` field can only be used with specified models, + # otherwise an error is thrown. The `model` field in + # {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig RecognitionConfig} must + # be set to: + # + # * `command_and_search` + # * `phone_call` AND additional field `useEnhanced`=`true` + # * The `model` field is left undefined. In this case the API auto-selects + # a model based on any other parameters that you set in + # `RecognitionConfig`. + # @!attribute [rw] interim_results + # @return [::Boolean] + # If `true`, interim results (tentative hypotheses) may be + # returned as they become available (these interim results are indicated with + # the `is_final=false` flag). + # If `false` or omitted, only `is_final=true` result(s) are returned. + # @!attribute [rw] enable_voice_activity_events + # @return [::Boolean] + # If `true`, responses with voice activity speech events will be returned as + # they are detected. + # @!attribute [rw] voice_activity_timeout + # @return [::Google::Cloud::Speech::V1p1beta1::StreamingRecognitionConfig::VoiceActivityTimeout] + # If set, the server will automatically close the stream after the specified + # duration has elapsed after the last VOICE_ACTIVITY speech event has been + # sent. The field `voice_activity_events` must also be set to true. + class StreamingRecognitionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Events that a timeout can be set on for voice activity. + # @!attribute [rw] speech_start_timeout + # @return [::Google::Protobuf::Duration] + # Duration to timeout the stream if no speech begins. + # @!attribute [rw] speech_end_timeout + # @return [::Google::Protobuf::Duration] + # Duration to timeout the stream after speech ends. + class VoiceActivityTimeout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Provides information to the recognizer that specifies how to process the + # request. + # @!attribute [rw] encoding + # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding] + # Encoding of audio data sent in all `RecognitionAudio` messages. + # This field is optional for `FLAC` and `WAV` audio files and required + # for all other audio formats. For details, see + # {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}. + # @!attribute [rw] sample_rate_hertz + # @return [::Integer] + # Sample rate in Hertz of the audio data sent in all + # `RecognitionAudio` messages. Valid values are: 8000-48000. + # 16000 is optimal. For best results, set the sampling rate of the audio + # source to 16000 Hz. If that's not possible, use the native sample rate of + # the audio source (instead of re-sampling). + # This field is optional for FLAC and WAV audio files, but is + # required for all other audio formats. For details, see + # {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}. + # @!attribute [rw] audio_channel_count + # @return [::Integer] + # The number of channels in the input audio data. + # ONLY set this for MULTI-CHANNEL recognition. + # Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. + # Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. + # If `0` or omitted, defaults to one channel (mono). + # Note: We only recognize the first channel by default. + # To perform independent recognition on each channel set + # `enable_separate_recognition_per_channel` to 'true'. + # @!attribute [rw] enable_separate_recognition_per_channel + # @return [::Boolean] + # This needs to be set to `true` explicitly and `audio_channel_count` > 1 + # to get each channel recognized separately. The recognition result will + # contain a `channel_tag` field to state which channel that result belongs + # to. If this is not true, we will only recognize the first channel. The + # request is billed cumulatively for all channels recognized: + # `audio_channel_count` multiplied by the length of the audio. + # @!attribute [rw] language_code + # @return [::String] + # Required. The language of the supplied audio as a + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # Example: "en-US". + # See [Language + # Support](https://cloud.google.com/speech-to-text/docs/languages) for a list + # of the currently supported language codes. + # @!attribute [rw] alternative_language_codes + # @return [::Array<::String>] + # A list of up to 3 additional + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags, + # listing possible alternative languages of the supplied audio. + # See [Language + # Support](https://cloud.google.com/speech-to-text/docs/languages) for a list + # of the currently supported language codes. If alternative languages are + # listed, recognition result will contain recognition in the most likely + # language detected including the main language_code. The recognition result + # will include the language tag of the language detected in the audio. Note: + # This feature is only supported for Voice Command and Voice Search use cases + # and performance may vary for other use cases (e.g., phone call + # transcription). + # @!attribute [rw] max_alternatives + # @return [::Integer] + # Maximum number of recognition hypotheses to be returned. + # Specifically, the maximum number of `SpeechRecognitionAlternative` messages + # within each `SpeechRecognitionResult`. + # The server may return fewer than `max_alternatives`. + # Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of + # one. If omitted, will return a maximum of one. + # @!attribute [rw] profanity_filter + # @return [::Boolean] + # If set to `true`, the server will attempt to filter out + # profanities, replacing all but the initial character in each filtered word + # with asterisks, e.g. "f***". If set to `false` or omitted, profanities + # won't be filtered out. + # @!attribute [rw] adaptation + # @return [::Google::Cloud::Speech::V1p1beta1::SpeechAdaptation] + # Speech adaptation configuration improves the accuracy of speech + # recognition. For more information, see the [speech + # adaptation](https://cloud.google.com/speech-to-text/docs/adaptation) + # documentation. + # When speech adaptation is set it supersedes the `speech_contexts` field. + # @!attribute [rw] transcript_normalization + # @return [::Google::Cloud::Speech::V1p1beta1::TranscriptNormalization] + # Optional. Use transcription normalization to automatically replace parts of + # the transcript with phrases of your choosing. For StreamingRecognize, this + # normalization only applies to stable partial transcripts (stability > 0.8) + # and final transcripts. + # @!attribute [rw] speech_contexts + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechContext>] + # Array of {::Google::Cloud::Speech::V1p1beta1::SpeechContext SpeechContext}. + # A means to provide context to assist the speech recognition. For more + # information, see + # [speech + # adaptation](https://cloud.google.com/speech-to-text/docs/adaptation). + # @!attribute [rw] enable_word_time_offsets + # @return [::Boolean] + # If `true`, the top result includes a list of words and + # the start and end time offsets (timestamps) for those words. If + # `false`, no word-level time offset information is returned. The default is + # `false`. + # @!attribute [rw] enable_word_confidence + # @return [::Boolean] + # If `true`, the top result includes a list of words and the + # confidence for those words. If `false`, no word-level confidence + # information is returned. The default is `false`. + # @!attribute [rw] enable_automatic_punctuation + # @return [::Boolean] + # If 'true', adds punctuation to recognition result hypotheses. + # This feature is only available in select languages. Setting this for + # requests in other languages has no effect at all. + # The default 'false' value does not add punctuation to result hypotheses. + # @!attribute [rw] enable_spoken_punctuation + # @return [::Google::Protobuf::BoolValue] + # The spoken punctuation behavior for the call + # If not set, uses default behavior based on model of choice + # e.g. command_and_search will enable spoken punctuation by default + # If 'true', replaces spoken punctuation with the corresponding symbols in + # the request. For example, "how are you question mark" becomes "how are + # you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation + # for support. If 'false', spoken punctuation is not replaced. + # @!attribute [rw] enable_spoken_emojis + # @return [::Google::Protobuf::BoolValue] + # The spoken emoji behavior for the call + # If not set, uses default behavior based on model of choice + # If 'true', adds spoken emoji formatting for the request. This will replace + # spoken emojis with the corresponding Unicode symbols in the final + # transcript. If 'false', spoken emojis are not replaced. + # @!attribute [rw] enable_speaker_diarization + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # If 'true', enables speaker detection for each recognized word in + # the top alternative of the recognition result using a speaker_label + # provided in the WordInfo. + # Note: Use diarization_config instead. + # @!attribute [rw] diarization_speaker_count + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # If set, specifies the estimated number of speakers in the conversation. + # Defaults to '2'. Ignored unless enable_speaker_diarization is set to true. + # Note: Use diarization_config instead. + # @!attribute [rw] diarization_config + # @return [::Google::Cloud::Speech::V1p1beta1::SpeakerDiarizationConfig] + # Config to enable speaker diarization and set additional + # parameters to make diarization better suited for your application. + # Note: When this is enabled, we send all the words from the beginning of the + # audio for the top alternative in every consecutive STREAMING responses. + # This is done in order to improve our speaker tags as our models learn to + # identify the speakers in the conversation over time. + # For non-streaming requests, the diarization results will be provided only + # in the top alternative of the FINAL SpeechRecognitionResult. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata] + # Metadata regarding this request. + # @!attribute [rw] model + # @return [::String] + # Which model to select for the given request. Select the model + # best suited to your domain to get best results. If a model is not + # explicitly specified, then we auto-select a model based on the parameters + # in the RecognitionConfig. + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + # + #
ModelDescription
latest_longBest for long form content like media or conversation.
latest_shortBest for short form content like commands or single shot directed + # speech.
command_and_searchBest for short queries such as voice commands or voice search.
phone_callBest for audio that originated from a phone call (typically + # recorded at an 8khz sampling rate).
videoBest for audio that originated from video or includes multiple + # speakers. Ideally the audio is recorded at a 16khz or greater + # sampling rate. This is a premium model that costs more than the + # standard rate.
defaultBest for audio that is not one of the specific audio models. + # For example, long-form audio. Ideally the audio is high-fidelity, + # recorded at a 16khz or greater sampling rate.
medical_conversationBest for audio that originated from a conversation between a + # medical provider and patient.
medical_dictationBest for audio that originated from dictation notes by a medical + # provider.
+ # @!attribute [rw] use_enhanced + # @return [::Boolean] + # Set to true to use an enhanced model for speech recognition. + # If `use_enhanced` is set to true and the `model` field is not set, then + # an appropriate enhanced model is chosen if an enhanced model exists for + # the audio. + # + # If `use_enhanced` is true and an enhanced version of the specified model + # does not exist, then the speech is recognized using the standard version + # of the specified model. + class RecognitionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The encoding of the audio data sent in the request. + # + # All encodings support only 1 channel (mono) audio, unless the + # `audio_channel_count` and `enable_separate_recognition_per_channel` fields + # are set. + # + # For best results, the audio source should be captured and transmitted using + # a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech + # recognition can be reduced if lossy codecs are used to capture or transmit + # audio, particularly if background noise is present. Lossy codecs include + # `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`, + # and `WEBM_OPUS`. + # + # The `FLAC` and `WAV` audio file formats include a header that describes the + # included audio content. You can request recognition for `WAV` files that + # contain either `LINEAR16` or `MULAW` encoded audio. + # If you send `FLAC` or `WAV` audio file format in + # your request, you do not need to specify an `AudioEncoding`; the audio + # encoding format is determined from the file header. If you specify + # an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the + # encoding configuration must match the encoding described in the audio + # header; otherwise the request returns an + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error + # code. + module AudioEncoding + # Not specified. + ENCODING_UNSPECIFIED = 0 + + # Uncompressed 16-bit signed little-endian samples (Linear PCM). + LINEAR16 = 1 + + # `FLAC` (Free Lossless Audio + # Codec) is the recommended encoding because it is + # lossless--therefore recognition is not compromised--and + # requires only about half the bandwidth of `LINEAR16`. `FLAC` stream + # encoding supports 16-bit and 24-bit samples, however, not all fields in + # `STREAMINFO` are supported. + FLAC = 2 + + # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + MULAW = 3 + + # Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + AMR = 4 + + # Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + AMR_WB = 5 + + # Opus encoded audio frames in Ogg container + # ([OggOpus](https://wiki.xiph.org/OggOpus)). + # `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000. + OGG_OPUS = 6 + + # Although the use of lossy encodings is not recommended, if a very low + # bitrate encoding is required, `OGG_OPUS` is highly preferred over + # Speex encoding. The [Speex](https://speex.org/) encoding supported by + # Cloud Speech API has a header byte in each block, as in MIME type + # `audio/x-speex-with-header-byte`. + # It is a variant of the RTP Speex encoding defined in + # [RFC 5574](https://tools.ietf.org/html/rfc5574). + # The stream is a sequence of blocks, one block per RTP packet. Each block + # starts with a byte containing the length of the block, in bytes, followed + # by one or more frames of Speex data, padded to an integral number of + # bytes (octets) as specified in RFC 5574. In other words, each RTP header + # is replaced with a single byte containing the block length. Only Speex + # wideband is supported. `sample_rate_hertz` must be 16000. + SPEEX_WITH_HEADER_BYTE = 7 + + # MP3 audio. MP3 encoding is a Beta feature and only available in + # v1p1beta1. Support all standard MP3 bitrates (which range from 32-320 + # kbps). When using this encoding, `sample_rate_hertz` has to match the + # sample rate of the file being used. + MP3 = 8 + + # Opus encoded audio frames in WebM container + # ([WebM](https://www.webmproject.org/docs/container/)). + # `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000. + WEBM_OPUS = 9 + + # 8-bit samples that compand 13-bit audio samples using G.711 PCMU/a-law. + ALAW = 10 + end + end + + # Config to enable speaker diarization. + # @!attribute [rw] enable_speaker_diarization + # @return [::Boolean] + # If 'true', enables speaker detection for each recognized word in + # the top alternative of the recognition result using a speaker_label + # provided in the WordInfo. + # @!attribute [rw] min_speaker_count + # @return [::Integer] + # Minimum number of speakers in the conversation. This range gives you more + # flexibility by allowing the system to automatically determine the correct + # number of speakers. If not set, the default value is 2. + # @!attribute [rw] max_speaker_count + # @return [::Integer] + # Maximum number of speakers in the conversation. This range gives you more + # flexibility by allowing the system to automatically determine the correct + # number of speakers. If not set, the default value is 6. + # @!attribute [r] speaker_tag + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Output only. Unused. + class SpeakerDiarizationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Description of audio data to be recognized. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] interaction_type + # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::InteractionType] + # The use case most closely describing the audio content to be recognized. + # @!attribute [rw] industry_naics_code_of_audio + # @return [::Integer] + # The industry vertical to which this speech recognition request most + # closely applies. This is most indicative of the topics contained + # in the audio. Use the 6-digit NAICS code to identify the industry + # vertical - see https://www.naics.com/search/. + # @!attribute [rw] microphone_distance + # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::MicrophoneDistance] + # The audio type that most closely describes the audio being recognized. + # @!attribute [rw] original_media_type + # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::OriginalMediaType] + # The original media the speech was recorded on. + # @!attribute [rw] recording_device_type + # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::RecordingDeviceType] + # The type of device the speech was recorded with. + # @!attribute [rw] recording_device_name + # @return [::String] + # The device used to make the recording. Examples 'Nexus 5X' or + # 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or + # 'Cardioid Microphone'. + # @!attribute [rw] original_mime_type + # @return [::String] + # Mime type of the original audio file. For example `audio/m4a`, + # `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`. + # A list of possible audio mime types is maintained at + # http://www.iana.org/assignments/media-types/media-types.xhtml#audio + # @!attribute [rw] obfuscated_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Obfuscated (privacy-protected) ID of the user, to identify number of + # unique users using the service. + # @!attribute [rw] audio_topic + # @return [::String] + # Description of the content. Eg. "Recordings of federal supreme court + # hearings from 2012". + class RecognitionMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Use case categories that the audio recognition request can be described + # by. + module InteractionType + # Use case is either unknown or is something other than one of the other + # values below. + INTERACTION_TYPE_UNSPECIFIED = 0 + + # Multiple people in a conversation or discussion. For example in a + # meeting with two or more people actively participating. Typically + # all the primary people speaking would be in the same room (if not, + # see PHONE_CALL) + DISCUSSION = 1 + + # One or more persons lecturing or presenting to others, mostly + # uninterrupted. + PRESENTATION = 2 + + # A phone-call or video-conference in which two or more people, who are + # not in the same room, are actively participating. + PHONE_CALL = 3 + + # A recorded message intended for another person to listen to. + VOICEMAIL = 4 + + # Professionally produced audio (eg. TV Show, Podcast). + PROFESSIONALLY_PRODUCED = 5 + + # Transcribe spoken questions and queries into text. + VOICE_SEARCH = 6 + + # Transcribe voice commands, such as for controlling a device. + VOICE_COMMAND = 7 + + # Transcribe speech to text to create a written document, such as a + # text-message, email or report. + DICTATION = 8 + end + + # Enumerates the types of capture settings describing an audio file. + module MicrophoneDistance + # Audio type is not known. + MICROPHONE_DISTANCE_UNSPECIFIED = 0 + + # The audio was captured from a closely placed microphone. Eg. phone, + # dictaphone, or handheld microphone. Generally if there speaker is within + # 1 meter of the microphone. + NEARFIELD = 1 + + # The speaker if within 3 meters of the microphone. + MIDFIELD = 2 + + # The speaker is more than 3 meters away from the microphone. + FARFIELD = 3 + end + + # The original media the speech was recorded on. + module OriginalMediaType + # Unknown original media type. + ORIGINAL_MEDIA_TYPE_UNSPECIFIED = 0 + + # The speech data is an audio recording. + AUDIO = 1 + + # The speech data originally recorded on a video. + VIDEO = 2 + end + + # The type of device the speech was recorded with. + module RecordingDeviceType + # The recording device is unknown. + RECORDING_DEVICE_TYPE_UNSPECIFIED = 0 + + # Speech was recorded on a smartphone. + SMARTPHONE = 1 + + # Speech was recorded using a personal computer or tablet. + PC = 2 + + # Speech was recorded over a phone line. + PHONE_LINE = 3 + + # Speech was recorded in a vehicle. + VEHICLE = 4 + + # Speech was recorded outdoors. + OTHER_OUTDOOR_DEVICE = 5 + + # Speech was recorded indoors. + OTHER_INDOOR_DEVICE = 6 + end + end + + # Provides "hints" to the speech recognizer to favor specific words and phrases + # in the results. + # @!attribute [rw] phrases + # @return [::Array<::String>] + # A list of strings containing words and phrases "hints" so that + # the speech recognition is more likely to recognize them. This can be used + # to improve the accuracy for specific words and phrases, for example, if + # specific commands are typically spoken by the user. This can also be used + # to add additional words to the vocabulary of the recognizer. See + # [usage limits](https://cloud.google.com/speech-to-text/quotas#content). + # + # List items can also be set to classes for groups of words that represent + # common concepts that occur in natural language. For example, rather than + # providing phrase hints for every month of the year, using the $MONTH class + # improves the likelihood of correctly transcribing audio that includes + # months. + # @!attribute [rw] boost + # @return [::Float] + # Hint Boost. Positive value will increase the probability that a specific + # phrase will be recognized over other similar sounding phrases. The higher + # the boost, the higher the chance of false positive recognition as well. + # Negative boost values would correspond to anti-biasing. Anti-biasing is not + # enabled, so negative boost will simply be ignored. Though `boost` can + # accept a wide range of positive values, most use cases are best served with + # values between 0 and 20. We recommend using a binary search approach to + # finding the optimal value for your use case. + class SpeechContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains audio data in the encoding specified in the `RecognitionConfig`. + # Either `content` or `uri` must be supplied. Supplying both or neither + # returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + # See [content limits](https://cloud.google.com/speech-to-text/quotas#content). + # @!attribute [rw] content + # @return [::String] + # The audio data bytes encoded as specified in + # `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a + # pure binary representation, whereas JSON representations use base64. + # + # Note: The following fields are mutually exclusive: `content`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] uri + # @return [::String] + # URI that points to a file that contains audio data bytes as specified in + # `RecognitionConfig`. The file must not be compressed (for example, gzip). + # Currently, only Google Cloud Storage URIs are + # supported, which must be specified in the following format: + # `gs://bucket_name/object_name` (other URI formats return + # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). + # For more information, see [Request + # URIs](https://cloud.google.com/storage/docs/reference-uris). + # + # Note: The following fields are mutually exclusive: `uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RecognitionAudio + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The only message returned to the client by the `Recognize` method. It + # contains the result as zero or more sequential `SpeechRecognitionResult` + # messages. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionResult>] + # Sequential list of transcription results corresponding to + # sequential portions of audio. + # @!attribute [rw] total_billed_time + # @return [::Google::Protobuf::Duration] + # When available, billed audio seconds for the corresponding request. + # @!attribute [rw] speech_adaptation_info + # @return [::Google::Cloud::Speech::V1p1beta1::SpeechAdaptationInfo] + # Provides information on adaptation behavior in response + # @!attribute [rw] request_id + # @return [::Integer] + # The ID associated with the request. This is a unique ID specific only to + # the given request. + # @!attribute [rw] using_legacy_models + # @return [::Boolean] + # Whether request used legacy asr models (was not automatically migrated to + # use conformer models). + class RecognizeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The only message returned to the client by the `LongRunningRecognize` method. + # It contains the result as zero or more sequential `SpeechRecognitionResult` + # messages. It is included in the `result.response` field of the `Operation` + # returned by the `GetOperation` call of the `google::longrunning::Operations` + # service. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionResult>] + # Sequential list of transcription results corresponding to + # sequential portions of audio. + # @!attribute [rw] total_billed_time + # @return [::Google::Protobuf::Duration] + # When available, billed audio seconds for the corresponding request. + # @!attribute [rw] output_config + # @return [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig] + # Original output config if present in the request. + # @!attribute [rw] output_error + # @return [::Google::Rpc::Status] + # If the transcript output fails this field contains the relevant error. + # @!attribute [rw] speech_adaptation_info + # @return [::Google::Cloud::Speech::V1p1beta1::SpeechAdaptationInfo] + # Provides information on speech adaptation behavior in response + # @!attribute [rw] request_id + # @return [::Integer] + # The ID associated with the request. This is a unique ID specific only to + # the given request. + class LongRunningRecognizeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the progress of a long-running `LongRunningRecognize` call. It is + # included in the `metadata` field of the `Operation` returned by the + # `GetOperation` call of the `google::longrunning::Operations` service. + # @!attribute [rw] progress_percent + # @return [::Integer] + # Approximate percentage of audio processed thus far. Guaranteed to be 100 + # when the audio is fully processed and the results are available. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Time when the request was received. + # @!attribute [rw] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Time of the most recent processing update. + # @!attribute [r] uri + # @return [::String] + # Output only. The URI of the audio file being transcribed. Empty if the + # audio was sent as byte content. + # @!attribute [r] output_config + # @return [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig] + # Output only. A copy of the TranscriptOutputConfig if it was set in the + # request. + class LongRunningRecognizeMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `StreamingRecognizeResponse` is the only message returned to the client by + # `StreamingRecognize`. A series of zero or more `StreamingRecognizeResponse` + # messages are streamed back to the client. If there is no recognizable + # audio, and `single_utterance` is set to false, then no messages are streamed + # back to the client. + # + # Here's an example of a series of `StreamingRecognizeResponse`s that might be + # returned while processing audio: + # + # 1. results { alternatives { transcript: "tube" } stability: 0.01 } + # + # 2. results { alternatives { transcript: "to be a" } stability: 0.01 } + # + # 3. results { alternatives { transcript: "to be" } stability: 0.9 } + # results { alternatives { transcript: " or not to be" } stability: 0.01 } + # + # 4. results { alternatives { transcript: "to be or not to be" + # confidence: 0.92 } + # alternatives { transcript: "to bee or not to bee" } + # is_final: true } + # + # 5. results { alternatives { transcript: " that's" } stability: 0.01 } + # + # 6. results { alternatives { transcript: " that is" } stability: 0.9 } + # results { alternatives { transcript: " the question" } stability: 0.01 } + # + # 7. results { alternatives { transcript: " that is the question" + # confidence: 0.98 } + # alternatives { transcript: " that was the question" } + # is_final: true } + # + # Notes: + # + # - Only two of the above responses #4 and #7 contain final results; they are + # indicated by `is_final: true`. Concatenating these together generates the + # full transcript: "to be or not to be that is the question". + # + # - The others contain interim `results`. #3 and #6 contain two interim + # `results`: the first portion has a high stability and is less likely to + # change; the second portion has a low stability and is very likely to + # change. A UI designer might choose to show only high stability `results`. + # + # - The specific `stability` and `confidence` values shown above are only for + # illustrative purposes. Actual values may vary. + # + # - In each response, only one of these fields will be set: + # `error`, + # `speech_event_type`, or + # one or more (repeated) `results`. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # If set, returns a {::Google::Rpc::Status google.rpc.Status} message that + # specifies the error for the operation. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::StreamingRecognitionResult>] + # This repeated list contains zero or more results that + # correspond to consecutive portions of the audio currently being processed. + # It contains zero or one `is_final=true` result (the newly settled portion), + # followed by zero or more `is_final=false` results (the interim results). + # @!attribute [rw] speech_event_type + # @return [::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse::SpeechEventType] + # Indicates the type of speech event. + # @!attribute [rw] speech_event_time + # @return [::Google::Protobuf::Duration] + # Time offset between the beginning of the audio and event emission. + # @!attribute [rw] total_billed_time + # @return [::Google::Protobuf::Duration] + # When available, billed audio seconds for the stream. + # Set only if this is the last response in the stream. + # @!attribute [rw] speech_adaptation_info + # @return [::Google::Cloud::Speech::V1p1beta1::SpeechAdaptationInfo] + # Provides information on adaptation behavior in response + # @!attribute [rw] request_id + # @return [::Integer] + # The ID associated with the request. This is a unique ID specific only to + # the given request. + class StreamingRecognizeResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates the type of speech event. + module SpeechEventType + # No speech event specified. + SPEECH_EVENT_UNSPECIFIED = 0 + + # This event indicates that the server has detected the end of the user's + # speech utterance and expects no additional speech. Therefore, the server + # will not process additional audio (although it may subsequently return + # additional results). The client should stop sending additional audio + # data, half-close the gRPC connection, and wait for any additional results + # until the server closes the gRPC connection. This event is only sent if + # `single_utterance` was set to `true`, and is not used otherwise. + END_OF_SINGLE_UTTERANCE = 1 + + # This event indicates that the server has detected the beginning of human + # voice activity in the stream. This event can be returned multiple times + # if speech starts and stops repeatedly throughout the stream. This event + # is only sent if `voice_activity_events` is set to true. + SPEECH_ACTIVITY_BEGIN = 2 + + # This event indicates that the server has detected the end of human voice + # activity in the stream. This event can be returned multiple times if + # speech starts and stops repeatedly throughout the stream. This event is + # only sent if `voice_activity_events` is set to true. + SPEECH_ACTIVITY_END = 3 + + # This event indicates that the user-set timeout for speech activity begin + # or end has exceeded. Upon receiving this event, the client is expected to + # send a half close. Further audio will not be processed. + SPEECH_ACTIVITY_TIMEOUT = 4 + end + end + + # A streaming speech recognition result corresponding to a portion of the audio + # that is currently being processed. + # @!attribute [rw] alternatives + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionAlternative>] + # May contain one or more recognition hypotheses (up to the + # maximum specified in `max_alternatives`). + # These alternatives are ordered in terms of accuracy, with the top (first) + # alternative being the most probable, as ranked by the recognizer. + # @!attribute [rw] is_final + # @return [::Boolean] + # If `false`, this `StreamingRecognitionResult` represents an + # interim result that may change. If `true`, this is the final time the + # speech service will return this particular `StreamingRecognitionResult`, + # the recognizer will not return any further hypotheses for this portion of + # the transcript and corresponding audio. + # @!attribute [rw] stability + # @return [::Float] + # An estimate of the likelihood that the recognizer will not + # change its guess about this interim result. Values range from 0.0 + # (completely unstable) to 1.0 (completely stable). + # This field is only provided for interim results (`is_final=false`). + # The default of 0.0 is a sentinel value indicating `stability` was not set. + # @!attribute [rw] result_end_time + # @return [::Google::Protobuf::Duration] + # Time offset of the end of this result relative to the + # beginning of the audio. + # @!attribute [rw] channel_tag + # @return [::Integer] + # For multi-channel audio, this is the channel number corresponding to the + # recognized result for the audio from that channel. + # For audio_channel_count = N, its output values can range from '1' to 'N'. + # @!attribute [r] language_code + # @return [::String] + # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + # language tag of the language in this result. This language code was + # detected to have the most likelihood of being spoken in the audio. + class StreamingRecognitionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A speech recognition result corresponding to a portion of the audio. + # @!attribute [rw] alternatives + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionAlternative>] + # May contain one or more recognition hypotheses (up to the + # maximum specified in `max_alternatives`). + # These alternatives are ordered in terms of accuracy, with the top (first) + # alternative being the most probable, as ranked by the recognizer. + # @!attribute [rw] channel_tag + # @return [::Integer] + # For multi-channel audio, this is the channel number corresponding to the + # recognized result for the audio from that channel. + # For audio_channel_count = N, its output values can range from '1' to 'N'. + # @!attribute [rw] result_end_time + # @return [::Google::Protobuf::Duration] + # Time offset of the end of this result relative to the + # beginning of the audio. + # @!attribute [r] language_code + # @return [::String] + # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + # language tag of the language in this result. This language code was + # detected to have the most likelihood of being spoken in the audio. + class SpeechRecognitionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Alternative hypotheses (a.k.a. n-best list). + # @!attribute [rw] transcript + # @return [::String] + # Transcript text representing the words that the user spoke. + # In languages that use spaces to separate words, the transcript might have a + # leading space if it isn't the first result. You can concatenate each result + # to obtain the full transcript without using a separator. + # @!attribute [rw] confidence + # @return [::Float] + # The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is set only for the top alternative of a non-streaming + # result or, of a streaming result where `is_final=true`. + # This field is not guaranteed to be accurate and users should not rely on it + # to be always provided. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # @!attribute [rw] words + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::WordInfo>] + # A list of word-specific information for each recognized word. + # Note: When `enable_speaker_diarization` is true, you will see all the words + # from the beginning of the audio. + class SpeechRecognitionAlternative + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Word-specific information for recognized words. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Duration] + # Time offset relative to the beginning of the audio, + # and corresponding to the start of the spoken word. + # This field is only set if `enable_word_time_offsets=true` and only + # in the top hypothesis. + # This is an experimental feature and the accuracy of the time offset can + # vary. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Duration] + # Time offset relative to the beginning of the audio, + # and corresponding to the end of the spoken word. + # This field is only set if `enable_word_time_offsets=true` and only + # in the top hypothesis. + # This is an experimental feature and the accuracy of the time offset can + # vary. + # @!attribute [rw] word + # @return [::String] + # The word corresponding to this set of information. + # @!attribute [rw] confidence + # @return [::Float] + # The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is set only for the top alternative of a non-streaming + # result or, of a streaming result where `is_final=true`. + # This field is not guaranteed to be accurate and users should not rely on it + # to be always provided. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # @!attribute [r] speaker_tag + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Output only. A distinct integer value is assigned for every speaker within + # the audio. This field specifies which one of those speakers was detected to + # have spoken this word. Value ranges from '1' to diarization_speaker_count. + # speaker_tag is set if enable_speaker_diarization = 'true' and only for the + # top alternative. + # Note: Use speaker_label instead. + # @!attribute [r] speaker_label + # @return [::String] + # Output only. A label value assigned for every unique speaker within the + # audio. This field specifies which speaker was detected to have spoken this + # word. For some models, like medical_conversation this can be actual speaker + # role, for example "patient" or "provider", but generally this would be a + # number identifying a speaker. This field is only set if + # enable_speaker_diarization = 'true' and only for the top alternative. + class WordInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information on speech adaptation use in results + # @!attribute [rw] adaptation_timeout + # @return [::Boolean] + # Whether there was a timeout when applying speech adaptation. If true, + # adaptation had no effect in the response transcript. + # @!attribute [rw] timeout_message + # @return [::String] + # If set, returns a message specifying which part of the speech adaptation + # request timed out. + class SpeechAdaptationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb new file mode 100644 index 000000000000..9d33bec8a1dd --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb @@ -0,0 +1,270 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Speech + module V1p1beta1 + # Message sent by the client for the `CreatePhraseSet` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this phrase set will be created. + # Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] phrase_set_id + # @return [::String] + # Required. The ID to use for the phrase set, which will become the final + # component of the phrase set's resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @!attribute [rw] phrase_set + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # Required. The phrase set to create. + class CreatePhraseSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `UpdatePhraseSet` method. + # @!attribute [rw] phrase_set + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] + # Required. The phrase set to update. + # + # The phrase set's `name` field is used to identify the set to be + # updated. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + class UpdatePhraseSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `GetPhraseSet` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the phrase set to retrieve. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + class GetPhraseSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `ListPhraseSet` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of phrase set. Format: + # + # `projects/{project}/locations/{location}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of phrase sets to return. The service may return + # fewer than this value. If unspecified, at most 50 phrase sets will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListPhraseSet` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListPhraseSet` must + # match the call that provided the page token. + class ListPhraseSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message returned to the client by the `ListPhraseSet` method. + # @!attribute [rw] phrase_sets + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] + # The phrase set. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListPhraseSetResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `DeletePhraseSet` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the phrase set to delete. Format: + # + # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` + class DeletePhraseSetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `CreateCustomClass` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this custom class will be created. + # Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] custom_class_id + # @return [::String] + # Required. The ID to use for the custom class, which will become the final + # component of the custom class' resource name. + # + # This value should restrict to letters, numbers, and hyphens, with the first + # character a letter, the last a letter or a number, and be 4-63 characters. + # @!attribute [rw] custom_class + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # Required. The custom class to create. + class CreateCustomClassRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `UpdateCustomClass` method. + # @!attribute [rw] custom_class + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] + # Required. The custom class to update. + # + # The custom class's `name` field is used to identify the custom class to be + # updated. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + class UpdateCustomClassRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `GetCustomClass` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the custom class to retrieve. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + class GetCustomClassRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `ListCustomClasses` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of custom classes. Format: + # + # `projects/{project}/locations/{location}/customClasses` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of custom classes to return. The service may return + # fewer than this value. If unspecified, at most 50 custom classes will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListCustomClass` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListCustomClass` must + # match the call that provided the page token. + class ListCustomClassesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message returned to the client by the `ListCustomClasses` method. + # @!attribute [rw] custom_classes + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::CustomClass>] + # The custom classes. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListCustomClassesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message sent by the client for the `DeleteCustomClass` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the custom class to delete. Format: + # + # `projects/{project}/locations/{location}/customClasses/{custom_class}` + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + class DeleteCustomClassRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.rb new file mode 100644 index 000000000000..09887768ca8a --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.rb @@ -0,0 +1,325 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Speech + module V1p1beta1 + # A set of words or phrases that represents a common concept likely to appear + # in your audio, for example a list of passenger ship names. CustomClass items + # can be substituted into placeholders that you set in PhraseSet phrases. + # @!attribute [rw] name + # @return [::String] + # The resource name of the custom class. + # @!attribute [rw] custom_class_id + # @return [::String] + # If this custom class is a resource, the custom_class_id is the resource id + # of the CustomClass. Case sensitive. + # @!attribute [rw] items + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::CustomClass::ClassItem>] + # A collection of class items. + # @!attribute [r] kms_key_name + # @return [::String] + # Output only. The [KMS key + # name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which + # the content of the ClassItem is encrypted. The expected format is + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + # @!attribute [r] kms_key_version_name + # @return [::String] + # Output only. The [KMS key version + # name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) + # with which content of the ClassItem is encrypted. The expected format is + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`. + # @!attribute [r] uid + # @return [::String] + # Output only. System-assigned unique identifier for the CustomClass. + # This field is not used. + # @!attribute [r] display_name + # @return [::String] + # Output only. User-settable, human-readable name for the CustomClass. Must + # be 63 characters or less. This field is not used. + # @!attribute [r] state + # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass::State] + # Output only. The CustomClass lifecycle state. + # This field is not used. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this resource was requested for deletion. + # This field is not used. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this resource will be purged. + # This field is not used. + # @!attribute [r] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. Allows users to store small amounts of arbitrary data. + # Both the key and the value must be 63 characters or less each. + # At most 100 annotations. + # This field is not used. + # @!attribute [r] etag + # @return [::String] + # Output only. This checksum is computed by the server based on the value of + # other fields. This may be sent on update, undelete, and delete requests to + # ensure the client has an up-to-date value before proceeding. This field is + # not used. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Whether or not this CustomClass is in the process of being + # updated. This field is not used. + class CustomClass + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An item of the class. + # @!attribute [rw] value + # @return [::String] + # The class item's value. + class ClassItem + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Set of states that define the lifecycle of a CustomClass. + module State + # Unspecified state. This is only used/useful for distinguishing + # unset values. + STATE_UNSPECIFIED = 0 + + # The normal and active state. + ACTIVE = 2 + + # This CustomClass has been deleted. + DELETED = 4 + end + end + + # Provides "hints" to the speech recognizer to favor specific words and phrases + # in the results. + # @!attribute [rw] name + # @return [::String] + # The resource name of the phrase set. + # @!attribute [rw] phrases + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::PhraseSet::Phrase>] + # A list of word and phrases. + # @!attribute [rw] boost + # @return [::Float] + # Hint Boost. Positive value will increase the probability that a specific + # phrase will be recognized over other similar sounding phrases. The higher + # the boost, the higher the chance of false positive recognition as well. + # Negative boost values would correspond to anti-biasing. Anti-biasing is not + # enabled, so negative boost will simply be ignored. Though `boost` can + # accept a wide range of positive values, most use cases are best served with + # values between 0 (exclusive) and 20. We recommend using a binary search + # approach to finding the optimal value for your use case as well as adding + # phrases both with and without boost to your requests. + # @!attribute [r] kms_key_name + # @return [::String] + # Output only. The [KMS key + # name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which + # the content of the PhraseSet is encrypted. The expected format is + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + # @!attribute [r] kms_key_version_name + # @return [::String] + # Output only. The [KMS key version + # name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) + # with which content of the PhraseSet is encrypted. The expected format is + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`. + # @!attribute [r] uid + # @return [::String] + # Output only. System-assigned unique identifier for the PhraseSet. + # This field is not used. + # @!attribute [r] display_name + # @return [::String] + # Output only. User-settable, human-readable name for the PhraseSet. Must be + # 63 characters or less. This field is not used. + # @!attribute [r] state + # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet::State] + # Output only. The CustomClass lifecycle state. + # This field is not used. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this resource was requested for deletion. + # This field is not used. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this resource will be purged. + # This field is not used. + # @!attribute [r] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. Allows users to store small amounts of arbitrary data. + # Both the key and the value must be 63 characters or less each. + # At most 100 annotations. + # This field is not used. + # @!attribute [r] etag + # @return [::String] + # Output only. This checksum is computed by the server based on the value of + # other fields. This may be sent on update, undelete, and delete requests to + # ensure the client has an up-to-date value before proceeding. This field is + # not used. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Whether or not this PhraseSet is in the process of being + # updated. This field is not used. + class PhraseSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A phrases containing words and phrase "hints" so that + # the speech recognition is more likely to recognize them. This can be used + # to improve the accuracy for specific words and phrases, for example, if + # specific commands are typically spoken by the user. This can also be used + # to add additional words to the vocabulary of the recognizer. See + # [usage limits](https://cloud.google.com/speech-to-text/quotas#content). + # + # List items can also include pre-built or custom classes containing groups + # of words that represent common concepts that occur in natural language. For + # example, rather than providing a phrase hint for every month of the + # year (e.g. "i was born in january", "i was born in febuary", ...), use the + # pre-built `$MONTH` class improves the likelihood of correctly transcribing + # audio that includes months (e.g. "i was born in $month"). + # To refer to pre-built classes, use the class' symbol prepended with `$` + # e.g. `$MONTH`. To refer to custom classes that were defined inline in the + # request, set the class's `custom_class_id` to a string unique to all class + # resources and inline classes. Then use the class' id wrapped in $`{...}` + # e.g. "$\\{my-months}". To refer to custom classes resources, use the class' + # id wrapped in `${}` (e.g. `${my-months}`). + # + # Speech-to-Text supports three locations: `global`, `us` (US North America), + # and `eu` (Europe). If you are calling the `speech.googleapis.com` + # endpoint, use the `global` location. To specify a region, use a + # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) + # with matching `us` or `eu` location value. + # @!attribute [rw] value + # @return [::String] + # The phrase itself. + # @!attribute [rw] boost + # @return [::Float] + # Hint Boost. Overrides the boost set at the phrase set level. + # Positive value will increase the probability that a specific phrase will + # be recognized over other similar sounding phrases. The higher the boost, + # the higher the chance of false positive recognition as well. Negative + # boost will simply be ignored. Though `boost` can accept a wide range of + # positive values, most use cases are best served + # with values between 0 and 20. We recommend using a binary search approach + # to finding the optimal value for your use case as well as adding + # phrases both with and without boost to your requests. + class Phrase + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Set of states that define the lifecycle of a CustomClass. + module State + # Unspecified state. This is only used/useful for distinguishing + # unset values. + STATE_UNSPECIFIED = 0 + + # The normal and active state. + ACTIVE = 2 + + # This CustomClass has been deleted. + DELETED = 4 + end + end + + # Speech adaptation configuration. + # @!attribute [rw] phrase_sets + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] + # A collection of phrase sets. To specify the hints inline, leave the + # phrase set's `name` blank and fill in the rest of its fields. Any + # phrase set can use any custom class. + # @!attribute [rw] phrase_set_references + # @return [::Array<::String>] + # A collection of phrase set resource names to use. + # @!attribute [rw] custom_classes + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::CustomClass>] + # A collection of custom classes. To specify the classes inline, leave the + # class' `name` blank and fill in the rest of its fields, giving it a unique + # `custom_class_id`. Refer to the inline defined class in phrase hints by its + # `custom_class_id`. + # @!attribute [rw] abnf_grammar + # @return [::Google::Cloud::Speech::V1p1beta1::SpeechAdaptation::ABNFGrammar] + # Augmented Backus-Naur form (ABNF) is a standardized grammar notation + # comprised by a set of derivation rules. + # See specifications: https://www.w3.org/TR/speech-grammar + class SpeechAdaptation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] abnf_strings + # @return [::Array<::String>] + # All declarations and rules of an ABNF grammar broken up into multiple + # strings that will end up concatenated. + class ABNFGrammar + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Transcription normalization configuration. Use transcription normalization + # to automatically replace parts of the transcript with phrases of your + # choosing. For StreamingRecognize, this normalization only applies to stable + # partial transcripts (stability > 0.8) and final transcripts. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Speech::V1p1beta1::TranscriptNormalization::Entry>] + # A list of replacement entries. We will perform replacement with one entry + # at a time. For example, the second entry in ["cat" => "dog", "mountain cat" + # => "mountain dog"] will never be applied because we will always process the + # first entry before it. At most 100 entries. + class TranscriptNormalization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A single replacement configuration. + # @!attribute [rw] search + # @return [::String] + # What to replace. Max length is 100 characters. + # @!attribute [rw] replace + # @return [::String] + # What to replace with. Max length is 100 characters. + # @!attribute [rw] case_sensitive + # @return [::Boolean] + # Whether the search is case sensitive. + class Entry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/Gemfile new file mode 100644 index 000000000000..4acec445659b --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-speech-v1p1beta1", path: "../" +else + gem "google-cloud-speech-v1p1beta1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_custom_class.rb new file mode 100644 index 000000000000..5c73bb5dd521 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_custom_class.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Adaptation_CreateCustomClass_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the create_custom_class call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_custom_class. +# +def create_custom_class + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new + + # Call the create_custom_class method. + result = client.create_custom_class request + + # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. + p result +end +# [END speech_v1p1beta1_generated_Adaptation_CreateCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_phrase_set.rb new file mode 100644 index 000000000000..7d85b9d76fde --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_phrase_set.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Adaptation_CreatePhraseSet_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the create_phrase_set call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_phrase_set. +# +def create_phrase_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new + + # Call the create_phrase_set method. + result = client.create_phrase_set request + + # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. + p result +end +# [END speech_v1p1beta1_generated_Adaptation_CreatePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_custom_class.rb new file mode 100644 index 000000000000..4093e3e479b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_custom_class.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Adaptation_DeleteCustomClass_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the delete_custom_class call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_custom_class. +# +def delete_custom_class + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new + + # Call the delete_custom_class method. + result = client.delete_custom_class request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END speech_v1p1beta1_generated_Adaptation_DeleteCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.rb new file mode 100644 index 000000000000..742847acd058 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Adaptation_DeletePhraseSet_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the delete_phrase_set call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_phrase_set. +# +def delete_phrase_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new + + # Call the delete_phrase_set method. + result = client.delete_phrase_set request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END speech_v1p1beta1_generated_Adaptation_DeletePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_custom_class.rb new file mode 100644 index 000000000000..67374d53dcb0 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_custom_class.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Adaptation_GetCustomClass_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the get_custom_class call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_custom_class. +# +def get_custom_class + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new + + # Call the get_custom_class method. + result = client.get_custom_class request + + # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. + p result +end +# [END speech_v1p1beta1_generated_Adaptation_GetCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_phrase_set.rb new file mode 100644 index 000000000000..292ba87e414c --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_phrase_set.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Adaptation_GetPhraseSet_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the get_phrase_set call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_phrase_set. +# +def get_phrase_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new + + # Call the get_phrase_set method. + result = client.get_phrase_set request + + # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. + p result +end +# [END speech_v1p1beta1_generated_Adaptation_GetPhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_custom_classes.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_custom_classes.rb new file mode 100644 index 000000000000..0bc4f30f6be8 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_custom_classes.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Adaptation_ListCustomClasses_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the list_custom_classes call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_custom_classes. +# +def list_custom_classes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new + + # Call the list_custom_classes method. + result = client.list_custom_classes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Speech::V1p1beta1::CustomClass. + p item + end +end +# [END speech_v1p1beta1_generated_Adaptation_ListCustomClasses_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_phrase_set.rb new file mode 100644 index 000000000000..6ad4f5cc6487 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_phrase_set.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Adaptation_ListPhraseSet_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the list_phrase_set call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_phrase_set. +# +def list_phrase_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new + + # Call the list_phrase_set method. + result = client.list_phrase_set request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Speech::V1p1beta1::PhraseSet. + p item + end +end +# [END speech_v1p1beta1_generated_Adaptation_ListPhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_custom_class.rb new file mode 100644 index 000000000000..6cf5ff2deb0c --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_custom_class.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Adaptation_UpdateCustomClass_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the update_custom_class call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_custom_class. +# +def update_custom_class + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new + + # Call the update_custom_class method. + result = client.update_custom_class request + + # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. + p result +end +# [END speech_v1p1beta1_generated_Adaptation_UpdateCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_phrase_set.rb new file mode 100644 index 000000000000..4b35a1ba1fff --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_phrase_set.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Adaptation_UpdatePhraseSet_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the update_phrase_set call in the Adaptation service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_phrase_set. +# +def update_phrase_set + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new + + # Call the update_phrase_set method. + result = client.update_phrase_set request + + # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. + p result +end +# [END speech_v1p1beta1_generated_Adaptation_UpdatePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/snippet_metadata_google.cloud.speech.v1p1beta1.json b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/snippet_metadata_google.cloud.speech.v1p1beta1.json new file mode 100644 index 000000000000..ab7bf03ae9a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/snippet_metadata_google.cloud.speech.v1p1beta1.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-cloud-speech-v1p1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.speech.v1p1beta1", + "version": "v1p1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "speech_v1p1beta1_generated_Speech_Recognize_sync", + "title": "Snippet for the recognize call in the Speech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Speech::Client#recognize.", + "file": "speech/recognize.rb", + "language": "RUBY", + "client_method": { + "short_name": "recognize", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client#recognize", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::RecognizeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1p1beta1::RecognizeResponse", + "client": { + "short_name": "Speech::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client" + }, + "method": { + "short_name": "Recognize", + "full_name": "google.cloud.speech.v1p1beta1.Speech.Recognize", + "service": { + "short_name": "Speech", + "full_name": "google.cloud.speech.v1p1beta1.Speech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Speech_LongRunningRecognize_sync", + "title": "Snippet for the long_running_recognize call in the Speech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Speech::Client#long_running_recognize.", + "file": "speech/long_running_recognize.rb", + "language": "RUBY", + "client_method": { + "short_name": "long_running_recognize", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client#long_running_recognize", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Speech::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client" + }, + "method": { + "short_name": "LongRunningRecognize", + "full_name": "google.cloud.speech.v1p1beta1.Speech.LongRunningRecognize", + "service": { + "short_name": "Speech", + "full_name": "google.cloud.speech.v1p1beta1.Speech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Speech_StreamingRecognize_sync", + "title": "Snippet for the streaming_recognize call in the Speech service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Speech::Client#streaming_recognize.", + "file": "speech/streaming_recognize.rb", + "language": "RUBY", + "client_method": { + "short_name": "streaming_recognize", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client#streaming_recognize", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse", + "client": { + "short_name": "Speech::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client" + }, + "method": { + "short_name": "StreamingRecognize", + "full_name": "google.cloud.speech.v1p1beta1.Speech.StreamingRecognize", + "service": { + "short_name": "Speech", + "full_name": "google.cloud.speech.v1p1beta1.Speech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Adaptation_CreatePhraseSet_sync", + "title": "Snippet for the create_phrase_set call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_phrase_set.", + "file": "adaptation/create_phrase_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_phrase_set", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_phrase_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1p1beta1::PhraseSet", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" + }, + "method": { + "short_name": "CreatePhraseSet", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation.CreatePhraseSet", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Adaptation_GetPhraseSet_sync", + "title": "Snippet for the get_phrase_set call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_phrase_set.", + "file": "adaptation/get_phrase_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_phrase_set", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_phrase_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1p1beta1::PhraseSet", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" + }, + "method": { + "short_name": "GetPhraseSet", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation.GetPhraseSet", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Adaptation_ListPhraseSet_sync", + "title": "Snippet for the list_phrase_set call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_phrase_set.", + "file": "adaptation/list_phrase_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_phrase_set", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_phrase_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" + }, + "method": { + "short_name": "ListPhraseSet", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation.ListPhraseSet", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Adaptation_UpdatePhraseSet_sync", + "title": "Snippet for the update_phrase_set call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_phrase_set.", + "file": "adaptation/update_phrase_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_phrase_set", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_phrase_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1p1beta1::PhraseSet", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" + }, + "method": { + "short_name": "UpdatePhraseSet", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation.UpdatePhraseSet", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Adaptation_DeletePhraseSet_sync", + "title": "Snippet for the delete_phrase_set call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_phrase_set.", + "file": "adaptation/delete_phrase_set.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_phrase_set", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_phrase_set", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" + }, + "method": { + "short_name": "DeletePhraseSet", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation.DeletePhraseSet", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Adaptation_CreateCustomClass_sync", + "title": "Snippet for the create_custom_class call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_custom_class.", + "file": "adaptation/create_custom_class.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_custom_class", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_custom_class", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1p1beta1::CustomClass", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" + }, + "method": { + "short_name": "CreateCustomClass", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation.CreateCustomClass", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Adaptation_GetCustomClass_sync", + "title": "Snippet for the get_custom_class call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_custom_class.", + "file": "adaptation/get_custom_class.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_custom_class", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_custom_class", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1p1beta1::CustomClass", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" + }, + "method": { + "short_name": "GetCustomClass", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation.GetCustomClass", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Adaptation_ListCustomClasses_sync", + "title": "Snippet for the list_custom_classes call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_custom_classes.", + "file": "adaptation/list_custom_classes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_custom_classes", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_custom_classes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" + }, + "method": { + "short_name": "ListCustomClasses", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation.ListCustomClasses", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Adaptation_UpdateCustomClass_sync", + "title": "Snippet for the update_custom_class call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_custom_class.", + "file": "adaptation/update_custom_class.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_custom_class", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_custom_class", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Speech::V1p1beta1::CustomClass", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" + }, + "method": { + "short_name": "UpdateCustomClass", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation.UpdateCustomClass", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "speech_v1p1beta1_generated_Adaptation_DeleteCustomClass_sync", + "title": "Snippet for the delete_custom_class call in the Adaptation service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_custom_class.", + "file": "adaptation/delete_custom_class.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_custom_class", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_custom_class", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Adaptation::Client", + "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" + }, + "method": { + "short_name": "DeleteCustomClass", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation.DeleteCustomClass", + "service": { + "short_name": "Adaptation", + "full_name": "google.cloud.speech.v1p1beta1.Adaptation" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/long_running_recognize.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/long_running_recognize.rb new file mode 100644 index 000000000000..eb1d313092dd --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/long_running_recognize.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Speech_LongRunningRecognize_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the long_running_recognize call in the Speech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Speech::Client#long_running_recognize. +# +def long_running_recognize + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new + + # Call the long_running_recognize method. + result = client.long_running_recognize request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END speech_v1p1beta1_generated_Speech_LongRunningRecognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/recognize.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/recognize.rb new file mode 100644 index 000000000000..cd26986de973 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/recognize.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Speech_Recognize_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the recognize call in the Speech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Speech::Client#recognize. +# +def recognize + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new + + # Call the recognize method. + result = client.recognize request + + # The returned object is of type Google::Cloud::Speech::V1p1beta1::RecognizeResponse. + p result +end +# [END speech_v1p1beta1_generated_Speech_Recognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/streaming_recognize.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/streaming_recognize.rb new file mode 100644 index 000000000000..719413e3c9a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/streaming_recognize.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START speech_v1p1beta1_generated_Speech_StreamingRecognize_sync] +require "google/cloud/speech/v1p1beta1" + +## +# Snippet for the streaming_recognize call in the Speech service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Speech::V1p1beta1::Speech::Client#streaming_recognize. +# +def streaming_recognize + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the streaming_recognize method to start streaming. + output = client.streaming_recognize input + + # Send requests on the stream. For each request object, set fields by + # passing keyword arguments. Be sure to close the stream when done. + input << Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new + input << Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse + output.each do |current_response| + p current_response + end +end +# [END speech_v1p1beta1_generated_Speech_StreamingRecognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_test.rb new file mode 100644 index 000000000000..5b544b26135c --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_test.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/speech/v1p1beta1/adaptation" + +class ::Google::Cloud::Speech::V1p1beta1::Adaptation::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_crypto_key_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_version_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path + end + end + + def test_custom_class_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.custom_class_path project: "value0", location: "value1", custom_class: "value2" + assert_equal "projects/value0/locations/value1/customClasses/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_phrase_set_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.phrase_set_path project: "value0", location: "value1", phrase_set: "value2" + assert_equal "projects/value0/locations/value1/phraseSets/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_test.rb new file mode 100644 index 000000000000..edcb942810ca --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_test.rb @@ -0,0 +1,649 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb" +require "google/cloud/speech/v1p1beta1/adaptation/rest" + + +class ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_phrase_set + # Create test objects. + client_result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + phrase_set_id = "hello world" + phrase_set = {} + + create_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_create_phrase_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_phrase_set parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_phrase_set ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_phrase_set(::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_phrase_set_client_stub.call_count + end + end + end + + def test_get_phrase_set + # Create test objects. + client_result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_get_phrase_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_phrase_set({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_phrase_set name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_phrase_set ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_phrase_set({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_phrase_set(::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_phrase_set_client_stub.call_count + end + end + end + + def test_list_phrase_set + # Create test objects. + client_result = ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_list_phrase_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_phrase_set parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_phrase_set ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_phrase_set(::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_phrase_set_client_stub.call_count + end + end + end + + def test_update_phrase_set + # Create test objects. + client_result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + phrase_set = {} + update_mask = {} + + update_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_update_phrase_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_phrase_set phrase_set: phrase_set, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_phrase_set ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_phrase_set(::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_phrase_set_client_stub.call_count + end + end + end + + def test_delete_phrase_set + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_delete_phrase_set_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_phrase_set({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_phrase_set name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_phrase_set ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_phrase_set({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_phrase_set(::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_phrase_set_client_stub.call_count + end + end + end + + def test_create_custom_class + # Create test objects. + client_result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + custom_class_id = "hello world" + custom_class = {} + + create_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_create_custom_class_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_custom_class parent: parent, custom_class_id: custom_class_id, custom_class: custom_class do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_custom_class ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_custom_class(::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_custom_class_client_stub.call_count + end + end + end + + def test_get_custom_class + # Create test objects. + client_result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_get_custom_class_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_custom_class({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_custom_class name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_custom_class ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_custom_class({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_custom_class(::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_custom_class_client_stub.call_count + end + end + end + + def test_list_custom_classes + # Create test objects. + client_result = ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_custom_classes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_list_custom_classes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_custom_classes_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_custom_classes parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_custom_classes ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_custom_classes(::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_custom_classes_client_stub.call_count + end + end + end + + def test_update_custom_class + # Create test objects. + client_result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + custom_class = {} + update_mask = {} + + update_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_update_custom_class_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_custom_class custom_class: custom_class, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_custom_class ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_custom_class(::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_custom_class_client_stub.call_count + end + end + end + + def test_delete_custom_class + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_delete_custom_class_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_custom_class({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_custom_class name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_custom_class ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_custom_class({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_custom_class(::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_custom_class_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_test.rb new file mode 100644 index 000000000000..45d5c248278e --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_test.rb @@ -0,0 +1,714 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb" +require "google/cloud/speech/v1p1beta1/adaptation" + +class ::Google::Cloud::Speech::V1p1beta1::Adaptation::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_phrase_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + phrase_set_id = "hello world" + phrase_set = {} + + create_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_phrase_set, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["phrase_set_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::PhraseSet), request["phrase_set"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_phrase_set parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_phrase_set ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_phrase_set(::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_phrase_set_client_stub.call_rpc_count + end + end + + def test_get_phrase_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_phrase_set, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_phrase_set({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_phrase_set name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_phrase_set ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_phrase_set({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_phrase_set(::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_phrase_set_client_stub.call_rpc_count + end + end + + def test_list_phrase_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_phrase_set, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_phrase_set parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_phrase_set ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_phrase_set(::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_phrase_set_client_stub.call_rpc_count + end + end + + def test_update_phrase_set + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + phrase_set = {} + update_mask = {} + + update_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_phrase_set, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::PhraseSet), request["phrase_set"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_phrase_set phrase_set: phrase_set, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_phrase_set ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_phrase_set(::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_phrase_set_client_stub.call_rpc_count + end + end + + def test_delete_phrase_set + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_phrase_set, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_phrase_set_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_phrase_set({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_phrase_set name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_phrase_set ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_phrase_set({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_phrase_set(::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_phrase_set_client_stub.call_rpc_count + end + end + + def test_create_custom_class + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + custom_class_id = "hello world" + custom_class = {} + + create_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_custom_class, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["custom_class_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::CustomClass), request["custom_class"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_custom_class parent: parent, custom_class_id: custom_class_id, custom_class: custom_class do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_custom_class ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_custom_class(::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_custom_class_client_stub.call_rpc_count + end + end + + def test_get_custom_class + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_custom_class, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_custom_class({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_custom_class name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_custom_class ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_custom_class({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_custom_class(::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_custom_class_client_stub.call_rpc_count + end + end + + def test_list_custom_classes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_custom_classes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_custom_classes, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_custom_classes_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_custom_classes parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_custom_classes ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_custom_classes(::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_custom_classes_client_stub.call_rpc_count + end + end + + def test_update_custom_class + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + custom_class = {} + update_mask = {} + + update_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_custom_class, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::CustomClass), request["custom_class"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_custom_class custom_class: custom_class, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_custom_class ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_custom_class(::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_custom_class_client_stub.call_rpc_count + end + end + + def test_delete_custom_class + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_custom_class, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_custom_class_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_custom_class({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_custom_class name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_custom_class ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_custom_class({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_custom_class(::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_custom_class_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_test.rb new file mode 100644 index 000000000000..9b7d530e92fd --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/speech/v1p1beta1/cloud_speech_pb" +require "google/cloud/speech/v1p1beta1/cloud_speech_services_pb" +require "google/cloud/speech/v1p1beta1/speech" + +class ::Google::Cloud::Speech::V1p1beta1::Speech::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Speech::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_test.rb new file mode 100644 index 000000000000..9572a99afe91 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/speech/v1p1beta1/speech" + +class ::Google::Cloud::Speech::V1p1beta1::Speech::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_crypto_key_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_version_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path + end + end + + def test_custom_class_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.custom_class_path project: "value0", location: "value1", custom_class: "value2" + assert_equal "projects/value0/locations/value1/customClasses/value2", path + end + end + + def test_phrase_set_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.phrase_set_path project: "value0", location: "value1", phrase_set: "value2" + assert_equal "projects/value0/locations/value1/phraseSets/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_test.rb new file mode 100644 index 000000000000..64c9cc539b53 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_test.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/speech/v1p1beta1/cloud_speech_pb" +require "google/cloud/speech/v1p1beta1/speech/rest" + + +class ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_recognize + # Create test objects. + client_result = ::Google::Cloud::Speech::V1p1beta1::RecognizeResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + config = {} + audio = {} + + recognize_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::ServiceStub.stub :transcode_recognize_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, recognize_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.recognize({ config: config, audio: audio }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.recognize config: config, audio: audio do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.recognize ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new(config: config, audio: audio) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.recognize({ config: config, audio: audio }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.recognize(::Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new(config: config, audio: audio), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, recognize_client_stub.call_count + end + end + end + + def test_long_running_recognize + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + config = {} + audio = {} + output_config = {} + + long_running_recognize_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::ServiceStub.stub :transcode_long_running_recognize_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, long_running_recognize_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.long_running_recognize({ config: config, audio: audio, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.long_running_recognize config: config, audio: audio, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.long_running_recognize ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.long_running_recognize({ config: config, audio: audio, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.long_running_recognize(::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, long_running_recognize_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_test.rb new file mode 100644 index 000000000000..a6e3e98d8da1 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_test.rb @@ -0,0 +1,334 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/speech/v1p1beta1/cloud_speech_pb" +require "google/cloud/speech/v1p1beta1/speech" + +class ::Google::Cloud::Speech::V1p1beta1::Speech::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_recognize + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1p1beta1::RecognizeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + config = {} + audio = {} + + recognize_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :recognize, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::RecognitionConfig), request["config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::RecognitionAudio), request["audio"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, recognize_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.recognize({ config: config, audio: audio }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.recognize config: config, audio: audio do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.recognize ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new(config: config, audio: audio) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.recognize({ config: config, audio: audio }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.recognize(::Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new(config: config, audio: audio), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, recognize_client_stub.call_rpc_count + end + end + + def test_long_running_recognize + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + config = {} + audio = {} + output_config = {} + + long_running_recognize_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :long_running_recognize, name + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::RecognitionConfig), request["config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::RecognitionAudio), request["audio"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, long_running_recognize_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.long_running_recognize({ config: config, audio: audio, output_config: output_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + c.long_running_recognize config: config, audio: audio, output_config: output_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.long_running_recognize ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.long_running_recognize({ config: config, audio: audio, output_config: output_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.long_running_recognize(::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, long_running_recognize_client_stub.call_rpc_count + end + end + + def test_streaming_recognize + # Create GRPC objects. + grpc_response = ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a bidi streaming method. + streaming_config = {} + + streaming_recognize_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :streaming_recognize, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, streaming_recognize_client_stub do + # Create client + c = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new streaming_config: streaming_config + enum_input = [request_hash, request_proto].to_enum + c.streaming_recognize enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new streaming_config: streaming_config + stream_input = Gapic::StreamInput.new + c.streaming_recognize stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Use enumerable object with hash and protobuf object with options. + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new streaming_config: streaming_config + enum_input = [request_hash, request_proto].to_enum + c.streaming_recognize enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { streaming_config: streaming_config } + request_proto = ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new streaming_config: streaming_config + stream_input = Gapic::StreamInput.new + c.streaming_recognize stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Verify method calls + assert_equal 4, streaming_recognize_client_stub.call_rpc_count + streaming_recognize_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest, r + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::StreamingRecognitionConfig), r["streaming_config"] + assert_equal :streaming_config, r.streaming_request + end + end + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Speech::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Speech::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Speech::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/helper.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-speech-v1p1beta1/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 c2ded9ce6c80551ed76309588776e918e6e285c7 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 6 Aug 2026 21:08:42 +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-secret_manager-v1beta1/.toys.rb | 2 +- google-cloud-secret_manager-v1beta1/Rakefile | 2 +- .../google-cloud-secret_manager-v1beta1.rb | 2 +- .../google/cloud/secret_manager/v1beta1.rb | 2 +- .../v1beta1/bindings_override.rb | 2 +- .../cloud/secret_manager/v1beta1/rest.rb | 2 +- .../v1beta1/secret_manager_service.rb | 2 +- .../v1beta1/secret_manager_service/client.rb | 2 +- .../secret_manager_service/credentials.rb | 2 +- .../v1beta1/secret_manager_service/paths.rb | 2 +- .../v1beta1/secret_manager_service/rest.rb | 2 +- .../secret_manager_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../secrets/v1beta1/service_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/cloud/secrets/v1beta1/resources.rb | 2 +- .../google/cloud/secrets/v1beta1/service.rb | 2 +- .../proto_docs/google/iam/v1/iam_policy.rb | 2 +- .../proto_docs/google/iam/v1/options.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../access_secret_version.rb | 2 +- .../add_secret_version.rb | 2 +- .../secret_manager_service/create_secret.rb | 2 +- .../secret_manager_service/delete_secret.rb | 2 +- .../destroy_secret_version.rb | 2 +- .../disable_secret_version.rb | 2 +- .../enable_secret_version.rb | 2 +- .../secret_manager_service/get_iam_policy.rb | 2 +- .../secret_manager_service/get_secret.rb | 2 +- .../get_secret_version.rb | 2 +- .../list_secret_versions.rb | 2 +- .../secret_manager_service/list_secrets.rb | 2 +- .../secret_manager_service/set_iam_policy.rb | 2 +- .../test_iam_permissions.rb | 2 +- .../secret_manager_service/update_secret.rb | 2 +- .../secret_manager_service_paths_test.rb | 2 +- .../secret_manager_service_rest_test.rb | 2 +- .../v1beta1/secret_manager_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-secret_manager-v1beta2/.toys.rb | 2 +- google-cloud-secret_manager-v1beta2/Rakefile | 2 +- .../google-cloud-secret_manager-v1beta2.rb | 2 +- .../google/cloud/secret_manager/v1beta2.rb | 2 +- .../v1beta2/bindings_override.rb | 2 +- .../cloud/secret_manager/v1beta2/rest.rb | 2 +- .../v1beta2/secret_manager_service.rb | 2 +- .../v1beta2/secret_manager_service/client.rb | 2 +- .../secret_manager_service/credentials.rb | 2 +- .../v1beta2/secret_manager_service/paths.rb | 2 +- .../v1beta2/secret_manager_service/rest.rb | 2 +- .../secret_manager_service/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1beta2/service_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/secretmanager/v1beta2/resources.rb | 2 +- .../cloud/secretmanager/v1beta2/service.rb | 2 +- .../proto_docs/google/iam/v1/iam_policy.rb | 2 +- .../proto_docs/google/iam/v1/options.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../access_secret_version.rb | 2 +- .../add_secret_version.rb | 2 +- .../secret_manager_service/create_secret.rb | 2 +- .../secret_manager_service/delete_secret.rb | 2 +- .../destroy_secret_version.rb | 2 +- .../disable_secret_version.rb | 2 +- .../enable_secret_version.rb | 2 +- .../secret_manager_service/get_iam_policy.rb | 2 +- .../secret_manager_service/get_secret.rb | 2 +- .../get_secret_version.rb | 2 +- .../list_secret_versions.rb | 2 +- .../secret_manager_service/list_secrets.rb | 2 +- .../secret_manager_service/set_iam_policy.rb | 2 +- .../test_iam_permissions.rb | 2 +- .../secret_manager_service/update_secret.rb | 2 +- .../secret_manager_service_paths_test.rb | 2 +- .../secret_manager_service_rest_test.rb | 2 +- .../v1beta2/secret_manager_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- .../google-cloud-secure_source_manager-v1.rb | 2 +- .../google/cloud/secure_source_manager/v1.rb | 2 +- .../v1/bindings_override.rb | 2 +- .../cloud/secure_source_manager/v1/rest.rb | 2 +- .../v1/secure_source_manager.rb | 2 +- .../v1/secure_source_manager/client.rb | 2 +- .../v1/secure_source_manager/credentials.rb | 2 +- .../v1/secure_source_manager/operations.rb | 2 +- .../v1/secure_source_manager/paths.rb | 2 +- .../v1/secure_source_manager/rest.rb | 2 +- .../v1/secure_source_manager/rest/client.rb | 2 +- .../secure_source_manager/rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- .../v1/secure_source_manager_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../v1/secure_source_manager.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../batch_create_pull_request_comments.rb | 2 +- .../secure_source_manager/close_issue.rb | 2 +- .../close_pull_request.rb | 2 +- .../create_branch_rule.rb | 2 +- .../secure_source_manager/create_hook.rb | 2 +- .../secure_source_manager/create_instance.rb | 2 +- .../secure_source_manager/create_issue.rb | 2 +- .../create_issue_comment.rb | 2 +- .../create_pull_request.rb | 2 +- .../create_pull_request_comment.rb | 2 +- .../create_repository.rb | 2 +- .../delete_branch_rule.rb | 2 +- .../secure_source_manager/delete_hook.rb | 2 +- .../secure_source_manager/delete_instance.rb | 2 +- .../secure_source_manager/delete_issue.rb | 2 +- .../delete_issue_comment.rb | 2 +- .../delete_pull_request_comment.rb | 2 +- .../delete_repository.rb | 2 +- .../secure_source_manager/fetch_blob.rb | 2 +- .../secure_source_manager/fetch_tree.rb | 2 +- .../secure_source_manager/get_branch_rule.rb | 2 +- .../secure_source_manager/get_hook.rb | 2 +- .../get_iam_policy_repo.rb | 2 +- .../secure_source_manager/get_instance.rb | 2 +- .../secure_source_manager/get_issue.rb | 2 +- .../get_issue_comment.rb | 2 +- .../secure_source_manager/get_pull_request.rb | 2 +- .../get_pull_request_comment.rb | 2 +- .../secure_source_manager/get_repository.rb | 2 +- .../list_branch_rules.rb | 2 +- .../secure_source_manager/list_hooks.rb | 2 +- .../secure_source_manager/list_instances.rb | 2 +- .../list_issue_comments.rb | 2 +- .../secure_source_manager/list_issues.rb | 2 +- .../list_pull_request_comments.rb | 2 +- .../list_pull_request_file_diffs.rb | 2 +- .../list_pull_requests.rb | 2 +- .../list_repositories.rb | 2 +- .../merge_pull_request.rb | 2 +- .../secure_source_manager/open_issue.rb | 2 +- .../open_pull_request.rb | 2 +- .../resolve_pull_request_comments.rb | 2 +- .../set_iam_policy_repo.rb | 2 +- .../test_iam_permissions_repo.rb | 2 +- .../unresolve_pull_request_comments.rb | 2 +- .../update_branch_rule.rb | 2 +- .../secure_source_manager/update_hook.rb | 2 +- .../secure_source_manager/update_issue.rb | 2 +- .../update_issue_comment.rb | 2 +- .../update_pull_request.rb | 2 +- .../update_pull_request_comment.rb | 2 +- .../update_repository.rb | 2 +- .../secure_source_manager_operations_test.rb | 2 +- .../v1/secure_source_manager_paths_test.rb | 2 +- .../v1/secure_source_manager_rest_test.rb | 2 +- .../v1/secure_source_manager_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-security-private_ca-v1/.toys.rb | 2 +- google-cloud-security-private_ca-v1/Rakefile | 2 +- .../google-cloud-security-private_ca-v1.rb | 2 +- .../google/cloud/security/private_ca/v1.rb | 2 +- .../private_ca/v1/bindings_override.rb | 2 +- .../v1/certificate_authority_service.rb | 2 +- .../certificate_authority_service/client.rb | 2 +- .../credentials.rb | 2 +- .../operations.rb | 2 +- .../v1/certificate_authority_service/paths.rb | 2 +- .../v1/certificate_authority_service/rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- .../cloud/security/private_ca/v1/rest.rb | 2 +- .../privateca/v1/service_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/field_info.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/security/privateca/v1/resources.rb | 2 +- .../cloud/security/privateca/v1/service.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../activate_certificate_authority.rb | 2 +- .../create_ca_pool.rb | 2 +- .../create_certificate.rb | 2 +- .../create_certificate_authority.rb | 2 +- .../create_certificate_template.rb | 2 +- .../delete_ca_pool.rb | 2 +- .../delete_certificate_authority.rb | 2 +- .../delete_certificate_template.rb | 2 +- .../disable_certificate_authority.rb | 2 +- .../enable_certificate_authority.rb | 2 +- .../fetch_ca_certs.rb | 2 +- .../fetch_certificate_authority_csr.rb | 2 +- .../get_ca_pool.rb | 2 +- .../get_certificate.rb | 2 +- .../get_certificate_authority.rb | 2 +- .../get_certificate_revocation_list.rb | 2 +- .../get_certificate_template.rb | 2 +- .../list_ca_pools.rb | 2 +- .../list_certificate_authorities.rb | 2 +- .../list_certificate_revocation_lists.rb | 2 +- .../list_certificate_templates.rb | 2 +- .../list_certificates.rb | 2 +- .../revoke_certificate.rb | 2 +- .../undelete_certificate_authority.rb | 2 +- .../update_ca_pool.rb | 2 +- .../update_certificate.rb | 2 +- .../update_certificate_authority.rb | 2 +- .../update_certificate_revocation_list.rb | 2 +- .../update_certificate_template.rb | 2 +- ...icate_authority_service_operations_test.rb | 2 +- ...ertificate_authority_service_paths_test.rb | 2 +- ...certificate_authority_service_rest_test.rb | 2 +- .../v1/certificate_authority_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...oogle-cloud-security-private_ca-v1beta1.rb | 2 +- .../cloud/security/private_ca/v1beta1.rb | 2 +- .../v1beta1/certificate_authority_service.rb | 2 +- .../certificate_authority_service/client.rb | 2 +- .../credentials.rb | 2 +- .../operations.rb | 2 +- .../certificate_authority_service/paths.rb | 2 +- .../certificate_authority_service/rest.rb | 2 +- .../rest/client.rb | 2 +- .../rest/operations.rb | 2 +- .../rest/service_stub.rb | 2 +- .../cloud/security/private_ca/v1beta1/rest.rb | 2 +- .../privateca/v1beta1/service_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../security/privateca/v1beta1/resources.rb | 2 +- .../security/privateca/v1beta1/service.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/protobuf/wrappers.rb | 2 +- .../proto_docs/google/rpc/status.rb | 2 +- .../snippets/Gemfile | 2 +- .../activate_certificate_authority.rb | 2 +- .../create_certificate.rb | 2 +- .../create_certificate_authority.rb | 2 +- .../disable_certificate_authority.rb | 2 +- .../enable_certificate_authority.rb | 2 +- .../fetch_certificate_authority_csr.rb | 2 +- .../get_certificate.rb | 2 +- .../get_certificate_authority.rb | 2 +- .../get_certificate_revocation_list.rb | 2 +- .../get_reusable_config.rb | 2 +- .../list_certificate_authorities.rb | 2 +- .../list_certificate_revocation_lists.rb | 2 +- .../list_certificates.rb | 2 +- .../list_reusable_configs.rb | 2 +- .../restore_certificate_authority.rb | 2 +- .../revoke_certificate.rb | 2 +- .../schedule_delete_certificate_authority.rb | 2 +- .../update_certificate.rb | 2 +- .../update_certificate_authority.rb | 2 +- .../update_certificate_revocation_list.rb | 2 +- ...icate_authority_service_operations_test.rb | 2 +- ...ertificate_authority_service_paths_test.rb | 2 +- ...certificate_authority_service_rest_test.rb | 2 +- .../certificate_authority_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-security_center-v1/.toys.rb | 2 +- google-cloud-security_center-v1/Rakefile | 2 +- .../lib/google-cloud-security_center-v1.rb | 2 +- .../lib/google/cloud/security_center/v1.rb | 2 +- .../google/cloud/security_center/v1/rest.rb | 2 +- .../security_center/v1/security_center.rb | 2 +- .../v1/security_center/client.rb | 2 +- .../v1/security_center/credentials.rb | 2 +- .../v1/security_center/operations.rb | 2 +- .../v1/security_center/paths.rb | 2 +- .../v1/security_center/rest.rb | 2 +- .../v1/security_center/rest/client.rb | 2 +- .../v1/security_center/rest/operations.rb | 2 +- .../v1/security_center/rest/service_stub.rb | 2 +- .../v1/securitycenter_service_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/cloud/securitycenter/v1/access.rb | 2 +- .../cloud/securitycenter/v1/application.rb | 2 +- .../google/cloud/securitycenter/v1/asset.rb | 2 +- .../securitycenter/v1/attack_exposure.rb | 2 +- .../cloud/securitycenter/v1/attack_path.rb | 2 +- .../v1/backup_disaster_recovery.rb | 2 +- .../securitycenter/v1/bigquery_export.rb | 2 +- .../cloud/securitycenter/v1/cloud_armor.rb | 2 +- .../v1/cloud_dlp_data_profile.rb | 2 +- .../securitycenter/v1/cloud_dlp_inspection.rb | 2 +- .../cloud/securitycenter/v1/compliance.rb | 2 +- .../cloud/securitycenter/v1/connection.rb | 2 +- .../securitycenter/v1/contact_details.rb | 2 +- .../cloud/securitycenter/v1/container.rb | 2 +- .../cloud/securitycenter/v1/database.rb | 2 +- ...ve_event_threat_detection_custom_module.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- .../event_threat_detection_custom_module.rb | 2 +- ...tection_custom_module_validation_errors.rb | 2 +- .../cloud/securitycenter/v1/exfiltration.rb | 2 +- .../securitycenter/v1/external_system.rb | 2 +- .../google/cloud/securitycenter/v1/file.rb | 2 +- .../google/cloud/securitycenter/v1/finding.rb | 2 +- .../google/cloud/securitycenter/v1/folder.rb | 2 +- .../securitycenter/v1/group_membership.rb | 2 +- .../cloud/securitycenter/v1/iam_binding.rb | 2 +- .../cloud/securitycenter/v1/indicator.rb | 2 +- .../cloud/securitycenter/v1/kernel_rootkit.rb | 2 +- .../cloud/securitycenter/v1/kubernetes.rb | 2 +- .../google/cloud/securitycenter/v1/label.rb | 2 +- .../cloud/securitycenter/v1/load_balancer.rb | 2 +- .../cloud/securitycenter/v1/log_entry.rb | 2 +- .../cloud/securitycenter/v1/mitre_attack.rb | 2 +- .../cloud/securitycenter/v1/mute_config.rb | 2 +- .../cloud/securitycenter/v1/notebook.rb | 2 +- .../securitycenter/v1/notification_config.rb | 2 +- .../securitycenter/v1/notification_message.rb | 2 +- .../cloud/securitycenter/v1/org_policy.rb | 2 +- .../v1/organization_settings.rb | 2 +- .../google/cloud/securitycenter/v1/process.rb | 2 +- .../cloud/securitycenter/v1/resource.rb | 2 +- .../v1/resource_value_config.rb | 2 +- .../v1/run_asset_discovery_response.rb | 2 +- ...security_health_analytics_custom_config.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- .../cloud/securitycenter/v1/security_marks.rb | 2 +- .../securitycenter/v1/security_posture.rb | 2 +- .../v1/securitycenter_service.rb | 2 +- .../cloud/securitycenter/v1/simulation.rb | 2 +- .../google/cloud/securitycenter/v1/source.rb | 2 +- .../securitycenter/v1/toxic_combination.rb | 2 +- .../securitycenter/v1/valued_resource.rb | 2 +- .../cloud/securitycenter/v1/vulnerability.rb | 2 +- .../proto_docs/google/iam/v1/iam_policy.rb | 2 +- .../proto_docs/google/iam/v1/options.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/struct.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../batch_create_resource_value_configs.rb | 2 +- .../security_center/bulk_mute_findings.rb | 2 +- .../create_big_query_export.rb | 2 +- ...te_event_threat_detection_custom_module.rb | 2 +- .../security_center/create_finding.rb | 2 +- .../security_center/create_mute_config.rb | 2 +- .../create_notification_config.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- .../snippets/security_center/create_source.rb | 2 +- .../delete_big_query_export.rb | 2 +- ...te_event_threat_detection_custom_module.rb | 2 +- .../security_center/delete_mute_config.rb | 2 +- .../delete_notification_config.rb | 2 +- .../delete_resource_value_config.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- .../security_center/get_big_query_export.rb | 2 +- ...ve_event_threat_detection_custom_module.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- ...et_event_threat_detection_custom_module.rb | 2 +- .../security_center/get_iam_policy.rb | 2 +- .../security_center/get_mute_config.rb | 2 +- .../get_notification_config.rb | 2 +- .../get_organization_settings.rb | 2 +- .../get_resource_value_config.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- .../security_center/get_simulation.rb | 2 +- .../snippets/security_center/get_source.rb | 2 +- .../security_center/get_valued_resource.rb | 2 +- .../snippets/security_center/group_assets.rb | 2 +- .../security_center/group_findings.rb | 2 +- .../snippets/security_center/list_assets.rb | 2 +- .../security_center/list_attack_paths.rb | 2 +- .../security_center/list_big_query_exports.rb | 2 +- ...t_event_threat_detection_custom_modules.rb | 2 +- ...ecurity_health_analytics_custom_modules.rb | 2 +- ...e_event_threat_detection_custom_modules.rb | 2 +- ...ecurity_health_analytics_custom_modules.rb | 2 +- ...t_event_threat_detection_custom_modules.rb | 2 +- .../snippets/security_center/list_findings.rb | 2 +- .../security_center/list_mute_configs.rb | 2 +- .../list_notification_configs.rb | 2 +- .../list_resource_value_configs.rb | 2 +- ...ecurity_health_analytics_custom_modules.rb | 2 +- .../snippets/security_center/list_sources.rb | 2 +- .../security_center/list_valued_resources.rb | 2 +- .../security_center/run_asset_discovery.rb | 2 +- .../security_center/set_finding_state.rb | 2 +- .../security_center/set_iam_policy.rb | 2 +- .../snippets/security_center/set_mute.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- .../security_center/test_iam_permissions.rb | 2 +- .../update_big_query_export.rb | 2 +- ...te_event_threat_detection_custom_module.rb | 2 +- .../security_center/update_external_system.rb | 2 +- .../security_center/update_finding.rb | 2 +- .../security_center/update_mute_config.rb | 2 +- .../update_notification_config.rb | 2 +- .../update_organization_settings.rb | 2 +- .../update_resource_value_config.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- .../security_center/update_security_marks.rb | 2 +- .../snippets/security_center/update_source.rb | 2 +- ...te_event_threat_detection_custom_module.rb | 2 +- .../v1/security_center_operations_test.rb | 2 +- .../v1/security_center_paths_test.rb | 2 +- .../v1/security_center_rest_test.rb | 2 +- .../v1/security_center_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- .../google-cloud-security_center-v1p1beta1.rb | 2 +- .../google/cloud/security_center/v1p1beta1.rb | 2 +- .../cloud/security_center/v1p1beta1/rest.rb | 2 +- .../v1p1beta1/security_center.rb | 2 +- .../v1p1beta1/security_center/client.rb | 2 +- .../v1p1beta1/security_center/credentials.rb | 2 +- .../v1p1beta1/security_center/operations.rb | 2 +- .../v1p1beta1/security_center/paths.rb | 2 +- .../v1p1beta1/security_center/rest.rb | 2 +- .../v1p1beta1/security_center/rest/client.rb | 2 +- .../security_center/rest/operations.rb | 2 +- .../security_center/rest/service_stub.rb | 2 +- .../securitycenter_service_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/securitycenter/v1p1beta1/asset.rb | 2 +- .../cloud/securitycenter/v1p1beta1/finding.rb | 2 +- .../cloud/securitycenter/v1p1beta1/folder.rb | 2 +- .../v1p1beta1/notification_config.rb | 2 +- .../v1p1beta1/notification_message.rb | 2 +- .../v1p1beta1/organization_settings.rb | 2 +- .../securitycenter/v1p1beta1/resource.rb | 2 +- .../v1p1beta1/run_asset_discovery_response.rb | 2 +- .../v1p1beta1/security_marks.rb | 2 +- .../v1p1beta1/securitycenter_service.rb | 2 +- .../cloud/securitycenter/v1p1beta1/source.rb | 2 +- .../proto_docs/google/iam/v1/iam_policy.rb | 2 +- .../proto_docs/google/iam/v1/options.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/struct.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../security_center/create_finding.rb | 2 +- .../create_notification_config.rb | 2 +- .../snippets/security_center/create_source.rb | 2 +- .../delete_notification_config.rb | 2 +- .../security_center/get_iam_policy.rb | 2 +- .../get_notification_config.rb | 2 +- .../get_organization_settings.rb | 2 +- .../snippets/security_center/get_source.rb | 2 +- .../snippets/security_center/group_assets.rb | 2 +- .../security_center/group_findings.rb | 2 +- .../snippets/security_center/list_assets.rb | 2 +- .../snippets/security_center/list_findings.rb | 2 +- .../list_notification_configs.rb | 2 +- .../snippets/security_center/list_sources.rb | 2 +- .../security_center/run_asset_discovery.rb | 2 +- .../security_center/set_finding_state.rb | 2 +- .../security_center/set_iam_policy.rb | 2 +- .../security_center/test_iam_permissions.rb | 2 +- .../security_center/update_finding.rb | 2 +- .../update_notification_config.rb | 2 +- .../update_organization_settings.rb | 2 +- .../security_center/update_security_marks.rb | 2 +- .../snippets/security_center/update_source.rb | 2 +- .../security_center_operations_test.rb | 2 +- .../v1p1beta1/security_center_paths_test.rb | 2 +- .../v1p1beta1/security_center_rest_test.rb | 2 +- .../v1p1beta1/security_center_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-security_center-v2/.toys.rb | 2 +- google-cloud-security_center-v2/Rakefile | 2 +- .../lib/google-cloud-security_center-v2.rb | 2 +- .../lib/google/cloud/security_center/v2.rb | 2 +- .../google/cloud/security_center/v2/rest.rb | 2 +- .../security_center/v2/security_center.rb | 2 +- .../v2/security_center/client.rb | 2 +- .../v2/security_center/credentials.rb | 2 +- .../v2/security_center/operations.rb | 2 +- .../v2/security_center/paths.rb | 2 +- .../v2/security_center/rest.rb | 2 +- .../v2/security_center/rest/client.rb | 2 +- .../v2/security_center/rest/operations.rb | 2 +- .../v2/security_center/rest/service_stub.rb | 2 +- .../v2/securitycenter_service_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/api/routing.rb | 2 +- .../google/cloud/securitycenter/v2/access.rb | 2 +- .../securitycenter/v2/affected_resources.rb | 2 +- .../cloud/securitycenter/v2/ai_model.rb | 2 +- .../cloud/securitycenter/v2/application.rb | 2 +- .../securitycenter/v2/attack_exposure.rb | 2 +- .../cloud/securitycenter/v2/attack_path.rb | 2 +- .../v2/backup_disaster_recovery.rb | 2 +- .../securitycenter/v2/bigquery_export.rb | 2 +- .../cloud/securitycenter/v2/chokepoint.rb | 2 +- .../cloud/securitycenter/v2/cloud_armor.rb | 2 +- .../v2/cloud_dlp_data_profile.rb | 2 +- .../securitycenter/v2/cloud_dlp_inspection.rb | 2 +- .../cloud/securitycenter/v2/compliance.rb | 2 +- .../cloud/securitycenter/v2/connection.rb | 2 +- .../securitycenter/v2/contact_details.rb | 2 +- .../cloud/securitycenter/v2/container.rb | 2 +- .../securitycenter/v2/data_access_event.rb | 2 +- .../securitycenter/v2/data_flow_event.rb | 2 +- .../v2/data_retention_deletion_event.rb | 2 +- .../cloud/securitycenter/v2/database.rb | 2 +- .../google/cloud/securitycenter/v2/disk.rb | 2 +- .../cloud/securitycenter/v2/exfiltration.rb | 2 +- .../securitycenter/v2/external_system.rb | 2 +- .../google/cloud/securitycenter/v2/file.rb | 2 +- .../google/cloud/securitycenter/v2/finding.rb | 2 +- .../google/cloud/securitycenter/v2/folder.rb | 2 +- .../securitycenter/v2/group_membership.rb | 2 +- .../cloud/securitycenter/v2/iam_binding.rb | 2 +- .../cloud/securitycenter/v2/indicator.rb | 2 +- .../cloud/securitycenter/v2/ip_rules.rb | 2 +- .../google/cloud/securitycenter/v2/job.rb | 2 +- .../cloud/securitycenter/v2/kernel_rootkit.rb | 2 +- .../cloud/securitycenter/v2/kubernetes.rb | 2 +- .../google/cloud/securitycenter/v2/label.rb | 2 +- .../cloud/securitycenter/v2/load_balancer.rb | 2 +- .../cloud/securitycenter/v2/log_entry.rb | 2 +- .../cloud/securitycenter/v2/mitre_attack.rb | 2 +- .../cloud/securitycenter/v2/mute_config.rb | 2 +- .../google/cloud/securitycenter/v2/network.rb | 2 +- .../cloud/securitycenter/v2/notebook.rb | 2 +- .../securitycenter/v2/notification_config.rb | 2 +- .../securitycenter/v2/notification_message.rb | 2 +- .../cloud/securitycenter/v2/org_policy.rb | 2 +- .../google/cloud/securitycenter/v2/process.rb | 2 +- .../cloud/securitycenter/v2/resource.rb | 2 +- .../v2/resource_value_config.rb | 2 +- .../cloud/securitycenter/v2/security_marks.rb | 2 +- .../securitycenter/v2/security_posture.rb | 2 +- .../v2/securitycenter_service.rb | 2 +- .../cloud/securitycenter/v2/simulation.rb | 2 +- .../google/cloud/securitycenter/v2/source.rb | 2 +- .../securitycenter/v2/toxic_combination.rb | 2 +- .../securitycenter/v2/valued_resource.rb | 2 +- .../cloud/securitycenter/v2/vertex_ai.rb | 2 +- .../cloud/securitycenter/v2/vulnerability.rb | 2 +- .../proto_docs/google/iam/v1/iam_policy.rb | 2 +- .../proto_docs/google/iam/v1/options.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/struct.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../batch_create_resource_value_configs.rb | 2 +- .../security_center/bulk_mute_findings.rb | 2 +- .../create_big_query_export.rb | 2 +- .../security_center/create_finding.rb | 2 +- .../security_center/create_mute_config.rb | 2 +- .../create_notification_config.rb | 2 +- .../snippets/security_center/create_source.rb | 2 +- .../delete_big_query_export.rb | 2 +- .../security_center/delete_mute_config.rb | 2 +- .../delete_notification_config.rb | 2 +- .../delete_resource_value_config.rb | 2 +- .../security_center/get_big_query_export.rb | 2 +- .../security_center/get_iam_policy.rb | 2 +- .../security_center/get_mute_config.rb | 2 +- .../get_notification_config.rb | 2 +- .../get_resource_value_config.rb | 2 +- .../security_center/get_simulation.rb | 2 +- .../snippets/security_center/get_source.rb | 2 +- .../security_center/get_valued_resource.rb | 2 +- .../security_center/group_findings.rb | 2 +- .../security_center/list_attack_paths.rb | 2 +- .../security_center/list_big_query_exports.rb | 2 +- .../snippets/security_center/list_findings.rb | 2 +- .../security_center/list_mute_configs.rb | 2 +- .../list_notification_configs.rb | 2 +- .../list_resource_value_configs.rb | 2 +- .../snippets/security_center/list_sources.rb | 2 +- .../security_center/list_valued_resources.rb | 2 +- .../security_center/set_finding_state.rb | 2 +- .../security_center/set_iam_policy.rb | 2 +- .../snippets/security_center/set_mute.rb | 2 +- .../security_center/test_iam_permissions.rb | 2 +- .../update_big_query_export.rb | 2 +- .../security_center/update_external_system.rb | 2 +- .../security_center/update_finding.rb | 2 +- .../security_center/update_mute_config.rb | 2 +- .../update_notification_config.rb | 2 +- .../update_resource_value_config.rb | 2 +- .../security_center/update_security_marks.rb | 2 +- .../snippets/security_center/update_source.rb | 2 +- .../v2/security_center_operations_test.rb | 2 +- .../v2/security_center_paths_test.rb | 2 +- .../v2/security_center_rest_test.rb | 2 +- .../v2/security_center_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- ...gle-cloud-security_center_management-v1.rb | 2 +- .../cloud/security_center_management/v1.rb | 2 +- .../v1/bindings_override.rb | 2 +- .../security_center_management/v1/rest.rb | 2 +- .../v1/security_center_management.rb | 2 +- .../v1/security_center_management/client.rb | 2 +- .../security_center_management/credentials.rb | 2 +- .../v1/security_center_management/paths.rb | 2 +- .../v1/security_center_management/rest.rb | 2 +- .../security_center_management/rest/client.rb | 2 +- .../rest/service_stub.rb | 2 +- .../security_center_management_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../v1/security_center_management.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/struct.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- ...te_event_threat_detection_custom_module.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- ...te_event_threat_detection_custom_module.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- ...ve_event_threat_detection_custom_module.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- ...et_event_threat_detection_custom_module.rb | 2 +- .../get_security_center_service.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- ...t_event_threat_detection_custom_modules.rb | 2 +- ...ecurity_health_analytics_custom_modules.rb | 2 +- ...e_event_threat_detection_custom_modules.rb | 2 +- ...ecurity_health_analytics_custom_modules.rb | 2 +- ...t_event_threat_detection_custom_modules.rb | 2 +- .../list_security_center_services.rb | 2 +- ...ecurity_health_analytics_custom_modules.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- ...te_event_threat_detection_custom_module.rb | 2 +- .../update_security_center_service.rb | 2 +- ...security_health_analytics_custom_module.rb | 2 +- ...te_event_threat_detection_custom_module.rb | 2 +- .../security_center_management_paths_test.rb | 2 +- .../security_center_management_rest_test.rb | 2 +- .../v1/security_center_management_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-service_control-v1/.toys.rb | 2 +- google-cloud-service_control-v1/Rakefile | 2 +- .../lib/google-cloud-service_control-v1.rb | 2 +- .../v1/quota_controller_services_pb.rb | 2 +- .../v1/service_controller_services_pb.rb | 2 +- .../lib/google/cloud/service_control/v1.rb | 2 +- .../service_control/v1/quota_controller.rb | 2 +- .../v1/quota_controller/client.rb | 2 +- .../v1/quota_controller/credentials.rb | 2 +- .../v1/quota_controller/rest.rb | 2 +- .../v1/quota_controller/rest/client.rb | 2 +- .../v1/quota_controller/rest/service_stub.rb | 2 +- .../google/cloud/service_control/v1/rest.rb | 2 +- .../service_control/v1/service_controller.rb | 2 +- .../v1/service_controller/client.rb | 2 +- .../v1/service_controller/credentials.rb | 2 +- .../v1/service_controller/rest.rb | 2 +- .../v1/service_controller/rest/client.rb | 2 +- .../service_controller/rest/service_stub.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/distribution.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../api/servicecontrol/v1/check_error.rb | 2 +- .../api/servicecontrol/v1/distribution.rb | 2 +- .../api/servicecontrol/v1/http_request.rb | 2 +- .../google/api/servicecontrol/v1/log_entry.rb | 2 +- .../api/servicecontrol/v1/metric_value.rb | 2 +- .../google/api/servicecontrol/v1/operation.rb | 2 +- .../api/servicecontrol/v1/quota_controller.rb | 2 +- .../servicecontrol/v1/service_controller.rb | 2 +- .../google/logging/type/log_severity.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/struct.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../snippets/Gemfile | 2 +- .../quota_controller/allocate_quota.rb | 2 +- .../snippets/service_controller/check.rb | 2 +- .../snippets/service_controller/report.rb | 2 +- .../v1/quota_controller_rest_test.rb | 2 +- .../v1/quota_controller_test.rb | 2 +- .../v1/service_controller_rest_test.rb | 2 +- .../v1/service_controller_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- .../google-cloud-service_directory-v1beta1.rb | 2 +- .../google/cloud/service_directory/v1beta1.rb | 2 +- .../v1beta1/bindings_override.rb | 2 +- .../v1beta1/lookup_service.rb | 2 +- .../v1beta1/lookup_service/client.rb | 2 +- .../v1beta1/lookup_service/credentials.rb | 2 +- .../v1beta1/lookup_service/paths.rb | 2 +- .../v1beta1/lookup_service/rest.rb | 2 +- .../v1beta1/lookup_service/rest/client.rb | 2 +- .../lookup_service/rest/service_stub.rb | 2 +- .../v1beta1/registration_service.rb | 2 +- .../v1beta1/registration_service/client.rb | 2 +- .../registration_service/credentials.rb | 2 +- .../v1beta1/registration_service/paths.rb | 2 +- .../v1beta1/registration_service/rest.rb | 2 +- .../registration_service/rest/client.rb | 2 +- .../registration_service/rest/service_stub.rb | 2 +- .../cloud/service_directory/v1beta1/rest.rb | 2 +- .../v1beta1/lookup_service_services_pb.rb | 2 +- .../registration_service_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../servicedirectory/v1beta1/endpoint.rb | 2 +- .../v1beta1/lookup_service.rb | 2 +- .../servicedirectory/v1beta1/namespace.rb | 2 +- .../v1beta1/registration_service.rb | 2 +- .../cloud/servicedirectory/v1beta1/service.rb | 2 +- .../proto_docs/google/iam/v1/iam_policy.rb | 2 +- .../proto_docs/google/iam/v1/options.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../lookup_service/resolve_service.rb | 2 +- .../registration_service/create_endpoint.rb | 2 +- .../registration_service/create_namespace.rb | 2 +- .../registration_service/create_service.rb | 2 +- .../registration_service/delete_endpoint.rb | 2 +- .../registration_service/delete_namespace.rb | 2 +- .../registration_service/delete_service.rb | 2 +- .../registration_service/get_endpoint.rb | 2 +- .../registration_service/get_iam_policy.rb | 2 +- .../registration_service/get_namespace.rb | 2 +- .../registration_service/get_service.rb | 2 +- .../registration_service/list_endpoints.rb | 2 +- .../registration_service/list_namespaces.rb | 2 +- .../registration_service/list_services.rb | 2 +- .../registration_service/set_iam_policy.rb | 2 +- .../test_iam_permissions.rb | 2 +- .../registration_service/update_endpoint.rb | 2 +- .../registration_service/update_namespace.rb | 2 +- .../registration_service/update_service.rb | 2 +- .../v1beta1/lookup_service_paths_test.rb | 2 +- .../v1beta1/lookup_service_rest_test.rb | 2 +- .../v1beta1/lookup_service_test.rb | 2 +- .../registration_service_paths_test.rb | 2 +- .../v1beta1/registration_service_rest_test.rb | 2 +- .../v1beta1/registration_service_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-service_health-v1/.toys.rb | 2 +- google-cloud-service_health-v1/Rakefile | 2 +- .../lib/google-cloud-service_health-v1.rb | 2 +- .../lib/google/cloud/service_health/v1.rb | 2 +- .../service_health/v1/bindings_override.rb | 2 +- .../google/cloud/service_health/v1/rest.rb | 2 +- .../cloud/service_health/v1/service_health.rb | 2 +- .../v1/service_health/client.rb | 2 +- .../v1/service_health/credentials.rb | 2 +- .../service_health/v1/service_health/paths.rb | 2 +- .../service_health/v1/service_health/rest.rb | 2 +- .../v1/service_health/rest/client.rb | 2 +- .../v1/service_health/rest/service_stub.rb | 2 +- .../v1/event_service_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/servicehealth/v1/event_resources.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../snippets/Gemfile | 2 +- .../snippets/service_health/get_event.rb | 2 +- .../service_health/get_organization_event.rb | 2 +- .../service_health/get_organization_impact.rb | 2 +- .../snippets/service_health/list_events.rb | 2 +- .../list_organization_events.rb | 2 +- .../list_organization_impacts.rb | 2 +- .../v1/service_health_paths_test.rb | 2 +- .../v1/service_health_rest_test.rb | 2 +- .../service_health/v1/service_health_test.rb | 2 +- google-cloud-service_health-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-service_management-v1/.toys.rb | 2 +- google-cloud-service_management-v1/Rakefile | 2 +- .../lib/google-cloud-service_management-v1.rb | 2 +- .../v1/servicemanager_services_pb.rb | 2 +- .../lib/google/cloud/service_management/v1.rb | 2 +- .../v1/bindings_override.rb | 2 +- .../cloud/service_management/v1/rest.rb | 2 +- .../service_management/v1/service_manager.rb | 2 +- .../v1/service_manager/client.rb | 2 +- .../v1/service_manager/credentials.rb | 2 +- .../v1/service_manager/operations.rb | 2 +- .../v1/service_manager/rest.rb | 2 +- .../v1/service_manager/rest/client.rb | 2 +- .../v1/service_manager/rest/operations.rb | 2 +- .../v1/service_manager/rest/service_stub.rb | 2 +- .../proto_docs/google/api/auth.rb | 2 +- .../proto_docs/google/api/backend.rb | 2 +- .../proto_docs/google/api/billing.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/config_change.rb | 2 +- .../proto_docs/google/api/context.rb | 2 +- .../proto_docs/google/api/control.rb | 2 +- .../proto_docs/google/api/documentation.rb | 2 +- .../proto_docs/google/api/endpoint.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/label.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/log.rb | 2 +- .../proto_docs/google/api/logging.rb | 2 +- .../proto_docs/google/api/metric.rb | 2 +- .../google/api/monitored_resource.rb | 2 +- .../proto_docs/google/api/monitoring.rb | 2 +- .../proto_docs/google/api/policy.rb | 2 +- .../proto_docs/google/api/quota.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/api/service.rb | 2 +- .../api/servicemanagement/v1/resources.rb | 2 +- .../servicemanagement/v1/servicemanager.rb | 2 +- .../proto_docs/google/api/source_info.rb | 2 +- .../proto_docs/google/api/system_parameter.rb | 2 +- .../proto_docs/google/api/usage.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/api.rb | 26 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../google/protobuf/source_context.rb | 2 +- .../proto_docs/google/protobuf/struct.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/protobuf/type.rb | 26 +- .../proto_docs/google/protobuf/wrappers.rb | 2 +- .../proto_docs/google/rpc/status.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../service_manager/create_service.rb | 2 +- .../service_manager/create_service_config.rb | 2 +- .../service_manager/create_service_rollout.rb | 2 +- .../service_manager/delete_service.rb | 2 +- .../service_manager/generate_config_report.rb | 2 +- .../snippets/service_manager/get_service.rb | 2 +- .../service_manager/get_service_config.rb | 2 +- .../service_manager/get_service_rollout.rb | 2 +- .../service_manager/list_service_configs.rb | 2 +- .../service_manager/list_service_rollouts.rb | 2 +- .../snippets/service_manager/list_services.rb | 2 +- .../service_manager/submit_config_source.rb | 2 +- .../service_manager/undelete_service.rb | 2 +- .../v1/service_manager_operations_test.rb | 2 +- .../v1/service_manager_rest_test.rb | 2 +- .../v1/service_manager_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- google-cloud-service_usage-v1/.toys.rb | 2 +- google-cloud-service_usage-v1/Rakefile | 2 +- .../lib/google-cloud-service_usage-v1.rb | 2 +- .../v1/serviceusage_services_pb.rb | 2 +- .../lib/google/cloud/service_usage/v1.rb | 2 +- .../lib/google/cloud/service_usage/v1/rest.rb | 2 +- .../cloud/service_usage/v1/service_usage.rb | 2 +- .../service_usage/v1/service_usage/client.rb | 2 +- .../v1/service_usage/credentials.rb | 2 +- .../v1/service_usage/operations.rb | 2 +- .../service_usage/v1/service_usage/rest.rb | 2 +- .../v1/service_usage/rest/client.rb | 2 +- .../v1/service_usage/rest/operations.rb | 2 +- .../v1/service_usage/rest/service_stub.rb | 2 +- .../proto_docs/google/api/auth.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/documentation.rb | 2 +- .../proto_docs/google/api/endpoint.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/label.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../google/api/monitored_resource.rb | 2 +- .../proto_docs/google/api/monitoring.rb | 2 +- .../proto_docs/google/api/quota.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/api/serviceusage/v1/resources.rb | 2 +- .../api/serviceusage/v1/serviceusage.rb | 2 +- .../proto_docs/google/api/usage.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/api.rb | 26 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../google/protobuf/source_context.rb | 2 +- .../proto_docs/google/protobuf/struct.rb | 2 +- .../proto_docs/google/protobuf/type.rb | 26 +- .../proto_docs/google/rpc/status.rb | 2 +- .../snippets/Gemfile | 2 +- .../service_usage/batch_enable_services.rb | 2 +- .../service_usage/batch_get_services.rb | 2 +- .../snippets/service_usage/disable_service.rb | 2 +- .../snippets/service_usage/enable_service.rb | 2 +- .../snippets/service_usage/get_service.rb | 2 +- .../snippets/service_usage/list_services.rb | 2 +- .../v1/service_usage_operations_test.rb | 2 +- .../v1/service_usage_rest_test.rb | 2 +- .../service_usage/v1/service_usage_test.rb | 2 +- google-cloud-service_usage-v1/test/helper.rb | 2 +- google-cloud-shell-v1/.owlbot-manifest.json | 3 +- google-cloud-shell-v1/.toys.rb | 2 +- google-cloud-shell-v1/Rakefile | 2 +- .../lib/google-cloud-shell-v1.rb | 2 +- .../lib/google/cloud/shell/v1.rb | 2 +- .../cloud/shell/v1/cloud_shell_service.rb | 2 +- .../shell/v1/cloud_shell_service/client.rb | 2 +- .../v1/cloud_shell_service/credentials.rb | 2 +- .../v1/cloud_shell_service/operations.rb | 2 +- .../shell/v1/cloud_shell_service/paths.rb | 2 +- .../shell/v1/cloud_shell_service/rest.rb | 2 +- .../v1/cloud_shell_service/rest/client.rb | 2 +- .../v1/cloud_shell_service/rest/operations.rb | 2 +- .../cloud_shell_service/rest/service_stub.rb | 2 +- .../cloud/shell/v1/cloudshell_services_pb.rb | 2 +- .../lib/google/cloud/shell/v1/rest.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/cloud/shell/v1/cloudshell.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- google-cloud-shell-v1/snippets/Gemfile | 2 +- .../cloud_shell_service/add_public_key.rb | 2 +- .../authorize_environment.rb | 2 +- .../cloud_shell_service/get_environment.rb | 2 +- .../cloud_shell_service/remove_public_key.rb | 2 +- .../cloud_shell_service/start_environment.rb | 2 +- .../v1/cloud_shell_service_operations_test.rb | 2 +- .../v1/cloud_shell_service_paths_test.rb | 2 +- .../shell/v1/cloud_shell_service_rest_test.rb | 2 +- .../shell/v1/cloud_shell_service_test.rb | 2 +- google-cloud-shell-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- .../google-cloud-spanner-admin-database-v1.rb | 2 +- .../google/cloud/spanner/admin/database/v1.rb | 2 +- .../admin/database/v1/database_admin.rb | 2 +- .../database/v1/database_admin/client.rb | 2 +- .../database/v1/database_admin/credentials.rb | 2 +- .../database/v1/database_admin/operations.rb | 2 +- .../admin/database/v1/database_admin/paths.rb | 2 +- .../admin/database/v1/database_admin/rest.rb | 2 +- .../database/v1/database_admin/rest/client.rb | 2 +- .../v1/database_admin/rest/operations.rb | 2 +- .../v1/database_admin/rest/service_stub.rb | 2 +- .../cloud/spanner/admin/database/v1/rest.rb | 2 +- .../v1/spanner_database_admin_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/iam/v1/iam_policy.rb | 2 +- .../proto_docs/google/iam/v1/options.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/struct.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../spanner/admin/database/v1/backup.rb | 2 +- .../admin/database/v1/backup_schedule.rb | 2 +- .../spanner/admin/database/v1/common.rb | 2 +- .../database/v1/spanner_database_admin.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../database_admin/add_split_points.rb | 2 +- .../snippets/database_admin/copy_backup.rb | 2 +- .../snippets/database_admin/create_backup.rb | 2 +- .../database_admin/create_backup_schedule.rb | 2 +- .../database_admin/create_database.rb | 2 +- .../snippets/database_admin/delete_backup.rb | 2 +- .../database_admin/delete_backup_schedule.rb | 2 +- .../snippets/database_admin/drop_database.rb | 2 +- .../snippets/database_admin/get_backup.rb | 2 +- .../database_admin/get_backup_schedule.rb | 2 +- .../snippets/database_admin/get_database.rb | 2 +- .../database_admin/get_database_ddl.rb | 2 +- .../snippets/database_admin/get_iam_policy.rb | 2 +- .../internal_update_graph_operation.rb | 2 +- .../database_admin/list_backup_operations.rb | 2 +- .../database_admin/list_backup_schedules.rb | 2 +- .../snippets/database_admin/list_backups.rb | 2 +- .../list_database_operations.rb | 2 +- .../database_admin/list_database_roles.rb | 2 +- .../snippets/database_admin/list_databases.rb | 2 +- .../database_admin/restore_database.rb | 2 +- .../snippets/database_admin/set_iam_policy.rb | 2 +- .../database_admin/test_iam_permissions.rb | 2 +- .../snippets/database_admin/update_backup.rb | 2 +- .../database_admin/update_backup_schedule.rb | 2 +- .../database_admin/update_database.rb | 2 +- .../database_admin/update_database_ddl.rb | 2 +- .../v1/database_admin_operations_test.rb | 2 +- .../database/v1/database_admin_paths_test.rb | 2 +- .../database/v1/database_admin_rest_test.rb | 2 +- .../admin/database/v1/database_admin_test.rb | 2 +- .../test/helper.rb | 2 +- .../.owlbot-manifest.json | 3 +- .../.toys.rb | 2 +- .../Rakefile | 2 +- .../google-cloud-spanner-admin-instance-v1.rb | 2 +- .../google/cloud/spanner/admin/instance/v1.rb | 2 +- .../admin/instance/v1/instance_admin.rb | 2 +- .../instance/v1/instance_admin/client.rb | 2 +- .../instance/v1/instance_admin/credentials.rb | 2 +- .../instance/v1/instance_admin/operations.rb | 2 +- .../admin/instance/v1/instance_admin/paths.rb | 2 +- .../admin/instance/v1/instance_admin/rest.rb | 2 +- .../instance/v1/instance_admin/rest/client.rb | 2 +- .../v1/instance_admin/rest/operations.rb | 2 +- .../v1/instance_admin/rest/service_stub.rb | 2 +- .../cloud/spanner/admin/instance/v1/rest.rb | 2 +- .../v1/spanner_instance_admin_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/iam/v1/iam_policy.rb | 2 +- .../proto_docs/google/iam/v1/options.rb | 2 +- .../proto_docs/google/iam/v1/policy.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../spanner/admin/instance/v1/common.rb | 2 +- .../instance/v1/spanner_instance_admin.rb | 2 +- .../proto_docs/google/type/expr.rb | 2 +- .../snippets/Gemfile | 2 +- .../instance_admin/create_instance.rb | 2 +- .../instance_admin/create_instance_config.rb | 2 +- .../create_instance_partition.rb | 2 +- .../instance_admin/delete_instance.rb | 2 +- .../instance_admin/delete_instance_config.rb | 2 +- .../delete_instance_partition.rb | 2 +- .../snippets/instance_admin/get_iam_policy.rb | 2 +- .../snippets/instance_admin/get_instance.rb | 2 +- .../instance_admin/get_instance_config.rb | 2 +- .../instance_admin/get_instance_partition.rb | 2 +- .../list_instance_config_operations.rb | 2 +- .../instance_admin/list_instance_configs.rb | 2 +- .../list_instance_partition_operations.rb | 2 +- .../list_instance_partitions.rb | 2 +- .../snippets/instance_admin/list_instances.rb | 2 +- .../snippets/instance_admin/move_instance.rb | 2 +- .../snippets/instance_admin/set_iam_policy.rb | 2 +- .../instance_admin/test_iam_permissions.rb | 2 +- .../instance_admin/update_instance.rb | 2 +- .../instance_admin/update_instance_config.rb | 2 +- .../update_instance_partition.rb | 2 +- .../v1/instance_admin_operations_test.rb | 2 +- .../instance/v1/instance_admin_paths_test.rb | 2 +- .../instance/v1/instance_admin_rest_test.rb | 2 +- .../admin/instance/v1/instance_admin_test.rb | 2 +- .../test/helper.rb | 2 +- google-cloud-spanner-v1/.owlbot-manifest.json | 3 +- google-cloud-spanner-v1/.toys.rb | 2 +- google-cloud-spanner-v1/Rakefile | 2 +- .../lib/google-cloud-spanner-v1.rb | 2 +- .../lib/google/cloud/spanner/v1.rb | 2 +- .../lib/google/cloud/spanner/v1/spanner.rb | 2 +- .../google/cloud/spanner/v1/spanner/client.rb | 2 +- .../cloud/spanner/v1/spanner/credentials.rb | 2 +- .../google/cloud/spanner/v1/spanner/paths.rb | 2 +- .../google/spanner/v1/spanner_services_pb.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/struct.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/rpc/status.rb | 2 +- .../google/spanner/v1/change_stream.rb | 2 +- .../google/spanner/v1/commit_response.rb | 2 +- .../proto_docs/google/spanner/v1/keys.rb | 2 +- .../proto_docs/google/spanner/v1/location.rb | 2 +- .../proto_docs/google/spanner/v1/mutation.rb | 2 +- .../google/spanner/v1/query_plan.rb | 2 +- .../google/spanner/v1/result_set.rb | 2 +- .../proto_docs/google/spanner/v1/spanner.rb | 2 +- .../google/spanner/v1/transaction.rb | 2 +- .../proto_docs/google/spanner/v1/type.rb | 2 +- google-cloud-spanner-v1/snippets/Gemfile | 2 +- .../snippets/spanner/batch_create_sessions.rb | 2 +- .../snippets/spanner/batch_write.rb | 2 +- .../snippets/spanner/begin_transaction.rb | 2 +- .../snippets/spanner/commit.rb | 2 +- .../snippets/spanner/create_session.rb | 2 +- .../snippets/spanner/delete_session.rb | 2 +- .../snippets/spanner/execute_batch_dml.rb | 2 +- .../snippets/spanner/execute_sql.rb | 2 +- .../snippets/spanner/execute_streaming_sql.rb | 2 +- .../snippets/spanner/get_session.rb | 2 +- .../snippets/spanner/list_sessions.rb | 2 +- .../snippets/spanner/partition_query.rb | 2 +- .../snippets/spanner/partition_read.rb | 2 +- .../snippets/spanner/read.rb | 2 +- .../snippets/spanner/rollback.rb | 2 +- .../snippets/spanner/streaming_read.rb | 2 +- .../cloud/spanner/v1/spanner_paths_test.rb | 2 +- .../google/cloud/spanner/v1/spanner_test.rb | 2 +- google-cloud-spanner-v1/test/helper.rb | 2 +- google-cloud-speech-v1/.owlbot-manifest.json | 1 + google-cloud-speech-v1/.toys.rb | 2 +- google-cloud-speech-v1/Rakefile | 2 +- .../lib/google-cloud-speech-v1.rb | 2 +- .../lib/google/cloud/speech/v1.rb | 2 +- .../lib/google/cloud/speech/v1/adaptation.rb | 2 +- .../cloud/speech/v1/adaptation/client.rb | 2 +- .../cloud/speech/v1/adaptation/credentials.rb | 2 +- .../cloud/speech/v1/adaptation/paths.rb | 2 +- .../google/cloud/speech/v1/adaptation/rest.rb | 2 +- .../cloud/speech/v1/adaptation/rest/client.rb | 2 +- .../speech/v1/adaptation/rest/service_stub.rb | 2 +- .../v1/cloud_speech_adaptation_services_pb.rb | 2 +- .../speech/v1/cloud_speech_services_pb.rb | 2 +- .../lib/google/cloud/speech/v1/rest.rb | 2 +- .../lib/google/cloud/speech/v1/speech.rb | 2 +- .../google/cloud/speech/v1/speech/client.rb | 2 +- .../cloud/speech/v1/speech/credentials.rb | 2 +- .../cloud/speech/v1/speech/operations.rb | 2 +- .../google/cloud/speech/v1/speech/paths.rb | 2 +- .../lib/google/cloud/speech/v1/speech/rest.rb | 2 +- .../cloud/speech/v1/speech/rest/client.rb | 2 +- .../cloud/speech/v1/speech/rest/operations.rb | 2 +- .../speech/v1/speech/rest/service_stub.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../google/cloud/speech/v1/cloud_speech.rb | 2 +- .../speech/v1/cloud_speech_adaptation.rb | 2 +- .../google/cloud/speech/v1/resource.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/protobuf/wrappers.rb | 2 +- .../proto_docs/google/rpc/status.rb | 2 +- google-cloud-speech-v1/snippets/Gemfile | 2 +- .../adaptation/create_custom_class.rb | 2 +- .../snippets/adaptation/create_phrase_set.rb | 2 +- .../adaptation/delete_custom_class.rb | 2 +- .../snippets/adaptation/delete_phrase_set.rb | 2 +- .../snippets/adaptation/get_custom_class.rb | 2 +- .../snippets/adaptation/get_phrase_set.rb | 2 +- .../adaptation/list_custom_classes.rb | 2 +- .../snippets/adaptation/list_phrase_set.rb | 2 +- .../adaptation/update_custom_class.rb | 2 +- .../snippets/adaptation/update_phrase_set.rb | 2 +- .../snippets/speech/long_running_recognize.rb | 2 +- .../snippets/speech/recognize.rb | 2 +- .../snippets/speech/streaming_recognize.rb | 2 +- .../cloud/speech/v1/adaptation_paths_test.rb | 2 +- .../cloud/speech/v1/adaptation_rest_test.rb | 2 +- .../google/cloud/speech/v1/adaptation_test.rb | 2 +- .../cloud/speech/v1/speech_operations_test.rb | 2 +- .../cloud/speech/v1/speech_paths_test.rb | 2 +- .../cloud/speech/v1/speech_rest_test.rb | 2 +- .../google/cloud/speech/v1/speech_test.rb | 2 +- google-cloud-speech-v1/test/helper.rb | 2 +- .../.owlbot-manifest.json | 1 + google-cloud-speech-v1p1beta1/.toys.rb | 2 +- google-cloud-speech-v1p1beta1/Rakefile | 2 +- .../lib/google-cloud-speech-v1p1beta1.rb | 2 +- .../lib/google/cloud/speech/v1p1beta1.rb | 2 +- .../cloud/speech/v1p1beta1/adaptation.rb | 2 +- .../speech/v1p1beta1/adaptation/client.rb | 2 +- .../v1p1beta1/adaptation/credentials.rb | 2 +- .../speech/v1p1beta1/adaptation/paths.rb | 2 +- .../cloud/speech/v1p1beta1/adaptation/rest.rb | 2 +- .../v1p1beta1/adaptation/rest/client.rb | 2 +- .../v1p1beta1/adaptation/rest/service_stub.rb | 2 +- .../cloud_speech_adaptation_services_pb.rb | 2 +- .../v1p1beta1/cloud_speech_services_pb.rb | 2 +- .../lib/google/cloud/speech/v1p1beta1/rest.rb | 2 +- .../google/cloud/speech/v1p1beta1/speech.rb | 2 +- .../cloud/speech/v1p1beta1/speech/client.rb | 2 +- .../speech/v1p1beta1/speech/credentials.rb | 2 +- .../speech/v1p1beta1/speech/operations.rb | 2 +- .../cloud/speech/v1p1beta1/speech/paths.rb | 2 +- .../cloud/speech/v1p1beta1/speech/rest.rb | 2 +- .../speech/v1p1beta1/speech/rest/client.rb | 2 +- .../v1p1beta1/speech/rest/operations.rb | 2 +- .../v1p1beta1/speech/rest/service_stub.rb | 2 +- .../proto_docs/google/api/client.rb | 2 +- .../proto_docs/google/api/field_behavior.rb | 2 +- .../proto_docs/google/api/launch_stage.rb | 2 +- .../proto_docs/google/api/resource.rb | 2 +- .../cloud/speech/v1p1beta1/cloud_speech.rb | 2 +- .../v1p1beta1/cloud_speech_adaptation.rb | 2 +- .../google/cloud/speech/v1p1beta1/resource.rb | 2 +- .../google/longrunning/operations.rb | 2 +- .../proto_docs/google/protobuf/any.rb | 2 +- .../proto_docs/google/protobuf/duration.rb | 2 +- .../proto_docs/google/protobuf/empty.rb | 2 +- .../proto_docs/google/protobuf/field_mask.rb | 2 +- .../proto_docs/google/protobuf/timestamp.rb | 15 +- .../proto_docs/google/protobuf/wrappers.rb | 2 +- .../proto_docs/google/rpc/status.rb | 2 +- .../snippets/Gemfile | 2 +- .../adaptation/create_custom_class.rb | 2 +- .../snippets/adaptation/create_phrase_set.rb | 2 +- .../adaptation/delete_custom_class.rb | 2 +- .../snippets/adaptation/delete_phrase_set.rb | 2 +- .../snippets/adaptation/get_custom_class.rb | 2 +- .../snippets/adaptation/get_phrase_set.rb | 2 +- .../adaptation/list_custom_classes.rb | 2 +- .../snippets/adaptation/list_phrase_set.rb | 2 +- .../adaptation/update_custom_class.rb | 2 +- .../snippets/adaptation/update_phrase_set.rb | 2 +- .../snippets/speech/long_running_recognize.rb | 2 +- .../snippets/speech/recognize.rb | 2 +- .../snippets/speech/streaming_recognize.rb | 2 +- .../speech/v1p1beta1/adaptation_paths_test.rb | 2 +- .../speech/v1p1beta1/adaptation_rest_test.rb | 2 +- .../cloud/speech/v1p1beta1/adaptation_test.rb | 2 +- .../v1p1beta1/speech_operations_test.rb | 2 +- .../speech/v1p1beta1/speech_paths_test.rb | 2 +- .../speech/v1p1beta1/speech_rest_test.rb | 2 +- .../cloud/speech/v1p1beta1/speech_test.rb | 2 +- google-cloud-speech-v1p1beta1/test/helper.rb | 2 +- .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 93 - ...oogle-cloud-secret_manager-v1beta1.gemspec | 30 - .../google-cloud-secret_manager-v1beta1.rb | 21 - .../google/cloud/secret_manager/v1beta1.rb | 45 - .../v1beta1/bindings_override.rb | 75 - .../cloud/secret_manager/v1beta1/rest.rb | 38 - .../v1beta1/secret_manager_service.rb | 61 - .../v1beta1/secret_manager_service/client.rb | 1944 ----- .../secret_manager_service/credentials.rb | 51 - .../v1beta1/secret_manager_service/paths.rb | 83 - .../v1beta1/secret_manager_service/rest.rb | 59 - .../secret_manager_service/rest/client.rb | 1804 ---- .../rest/service_stub.rb | 1004 --- .../cloud/secret_manager/v1beta1/version.rb | 28 - .../cloud/secrets/v1beta1/resources_pb.rb | 32 - .../cloud/secrets/v1beta1/service_pb.rb | 45 - .../secrets/v1beta1/service_services_pb.rb | 117 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/secrets/v1beta1/resources.rb | 189 - .../google/cloud/secrets/v1beta1/service.rb | 261 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../access_secret_version.rb | 47 - .../add_secret_version.rb | 47 - .../secret_manager_service/create_secret.rb | 47 - .../secret_manager_service/delete_secret.rb | 47 - .../destroy_secret_version.rb | 47 - .../disable_secret_version.rb | 47 - .../enable_secret_version.rb | 47 - .../secret_manager_service/get_iam_policy.rb | 47 - .../secret_manager_service/get_secret.rb | 47 - .../get_secret_version.rb | 47 - .../list_secret_versions.rb | 51 - .../secret_manager_service/list_secrets.rb | 51 - .../secret_manager_service/set_iam_policy.rb | 47 - .../test_iam_permissions.rb | 47 - .../secret_manager_service/update_secret.rb | 47 - ...metadata_google.cloud.secrets.v1beta1.json | 615 -- .../secret_manager_service_paths_test.rb | 79 - .../secret_manager_service_rest_test.rb | 921 -- .../v1beta1/secret_manager_service_test.rb | 1008 --- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 93 - ...oogle-cloud-secret_manager-v1beta2.gemspec | 30 - .../google-cloud-secret_manager-v1beta2.rb | 21 - .../google/cloud/secret_manager/v1beta2.rb | 45 - .../v1beta2/bindings_override.rb | 75 - .../cloud/secret_manager/v1beta2/rest.rb | 38 - .../v1beta2/secret_manager_service.rb | 61 - .../v1beta2/secret_manager_service/client.rb | 1998 ----- .../secret_manager_service/credentials.rb | 51 - .../v1beta2/secret_manager_service/paths.rb | 167 - .../v1beta2/secret_manager_service/rest.rb | 59 - .../secret_manager_service/rest/client.rb | 1858 ---- .../rest/service_stub.rb | 1117 --- .../cloud/secret_manager/v1beta2/version.rb | 28 - .../secretmanager/v1beta2/resources_pb.rb | 41 - .../cloud/secretmanager/v1beta2/service_pb.rb | 45 - .../v1beta2/service_services_pb.rb | 125 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../cloud/secretmanager/v1beta2/resources.rb | 512 -- .../cloud/secretmanager/v1beta2/service.rb | 321 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../access_secret_version.rb | 47 - .../add_secret_version.rb | 47 - .../secret_manager_service/create_secret.rb | 47 - .../secret_manager_service/delete_secret.rb | 47 - .../destroy_secret_version.rb | 47 - .../disable_secret_version.rb | 47 - .../enable_secret_version.rb | 47 - .../secret_manager_service/get_iam_policy.rb | 47 - .../secret_manager_service/get_secret.rb | 47 - .../get_secret_version.rb | 47 - .../list_secret_versions.rb | 51 - .../secret_manager_service/list_secrets.rb | 51 - .../secret_manager_service/set_iam_policy.rb | 47 - .../test_iam_permissions.rb | 47 - .../secret_manager_service/update_secret.rb | 47 - ...ta_google.cloud.secretmanager.v1beta2.json | 615 -- .../secret_manager_service_paths_test.rb | 109 - .../secret_manager_service_rest_test.rb | 927 -- .../v1beta2/secret_manager_service_test.rb | 1020 --- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 278 - ...gle-cloud-secure_source_manager-v1.gemspec | 30 - .../google-cloud-secure_source_manager-v1.rb | 21 - .../google/cloud/secure_source_manager/v1.rb | 45 - .../v1/bindings_override.rb | 108 - .../cloud/secure_source_manager/v1/rest.rb | 38 - .../v1/secure_source_manager.rb | 58 - .../v1/secure_source_manager/client.rb | 5883 ------------- .../v1/secure_source_manager/credentials.rb | 47 - .../v1/secure_source_manager/operations.rb | 843 -- .../v1/secure_source_manager/paths.rb | 313 - .../v1/secure_source_manager/rest.rb | 56 - .../v1/secure_source_manager/rest/client.rb | 5485 ------------ .../secure_source_manager/rest/operations.rb | 927 -- .../rest/service_stub.rb | 3278 -------- .../cloud/secure_source_manager/v1/version.rb | 28 - .../v1/secure_source_manager_pb.rb | 129 - .../v1/secure_source_manager_services_pb.rb | 170 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1/secure_source_manager.rb | 1857 ---- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../batch_create_pull_request_comments.rb | 54 - .../secure_source_manager/close_issue.rb | 54 - .../close_pull_request.rb | 54 - .../create_branch_rule.rb | 54 - .../secure_source_manager/create_hook.rb | 54 - .../secure_source_manager/create_instance.rb | 54 - .../secure_source_manager/create_issue.rb | 54 - .../create_issue_comment.rb | 54 - .../create_pull_request.rb | 54 - .../create_pull_request_comment.rb | 54 - .../create_repository.rb | 54 - .../delete_branch_rule.rb | 54 - .../secure_source_manager/delete_hook.rb | 54 - .../secure_source_manager/delete_instance.rb | 54 - .../secure_source_manager/delete_issue.rb | 54 - .../delete_issue_comment.rb | 54 - .../delete_pull_request_comment.rb | 54 - .../delete_repository.rb | 54 - .../secure_source_manager/fetch_blob.rb | 47 - .../secure_source_manager/fetch_tree.rb | 51 - .../secure_source_manager/get_branch_rule.rb | 47 - .../secure_source_manager/get_hook.rb | 47 - .../get_iam_policy_repo.rb | 47 - .../secure_source_manager/get_instance.rb | 47 - .../secure_source_manager/get_issue.rb | 47 - .../get_issue_comment.rb | 47 - .../secure_source_manager/get_pull_request.rb | 47 - .../get_pull_request_comment.rb | 47 - .../secure_source_manager/get_repository.rb | 47 - .../list_branch_rules.rb | 51 - .../secure_source_manager/list_hooks.rb | 51 - .../secure_source_manager/list_instances.rb | 51 - .../list_issue_comments.rb | 51 - .../secure_source_manager/list_issues.rb | 51 - .../list_pull_request_comments.rb | 51 - .../list_pull_request_file_diffs.rb | 51 - .../list_pull_requests.rb | 51 - .../list_repositories.rb | 51 - .../merge_pull_request.rb | 54 - .../secure_source_manager/open_issue.rb | 54 - .../open_pull_request.rb | 54 - .../resolve_pull_request_comments.rb | 54 - .../set_iam_policy_repo.rb | 47 - .../test_iam_permissions_repo.rb | 47 - .../unresolve_pull_request_comments.rb | 54 - .../update_branch_rule.rb | 54 - .../secure_source_manager/update_hook.rb | 54 - .../secure_source_manager/update_issue.rb | 54 - .../update_issue_comment.rb | 54 - .../update_pull_request.rb | 54 - .../update_pull_request_comment.rb | 54 - .../update_repository.rb | 54 - ...a_google.cloud.securesourcemanager.v1.json | 2095 ----- .../secure_source_manager_operations_test.rb | 400 - .../v1/secure_source_manager_paths_test.rb | 211 - .../v1/secure_source_manager_rest_test.rb | 2973 ------- .../v1/secure_source_manager_test.rb | 3466 -------- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 163 - ...oogle-cloud-security-private_ca-v1.gemspec | 30 - .../google-cloud-security-private_ca-v1.rb | 21 - .../google/cloud/security/private_ca/v1.rb | 47 - .../private_ca/v1/bindings_override.rb | 158 - .../v1/certificate_authority_service.rb | 60 - .../certificate_authority_service/client.rb | 3815 --------- .../credentials.rb | 53 - .../operations.rb | 845 -- .../v1/certificate_authority_service/paths.rb | 155 - .../v1/certificate_authority_service/rest.rb | 58 - .../rest/client.rb | 3578 -------- .../rest/operations.rb | 929 -- .../rest/service_stub.rb | 1867 ----- .../cloud/security/private_ca/v1/rest.rb | 40 - .../cloud/security/private_ca/v1/version.rb | 30 - .../security/privateca/v1/resources_pb.rb | 81 - .../cloud/security/privateca/v1/service_pb.rb | 71 - .../privateca/v1/service_services_pb.rb | 150 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../cloud/security/privateca/v1/resources.rb | 1725 ---- .../cloud/security/privateca/v1/service.rb | 1041 --- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../activate_certificate_authority.rb | 54 - .../create_ca_pool.rb | 54 - .../create_certificate.rb | 47 - .../create_certificate_authority.rb | 54 - .../create_certificate_template.rb | 54 - .../delete_ca_pool.rb | 54 - .../delete_certificate_authority.rb | 54 - .../delete_certificate_template.rb | 54 - .../disable_certificate_authority.rb | 54 - .../enable_certificate_authority.rb | 54 - .../fetch_ca_certs.rb | 47 - .../fetch_certificate_authority_csr.rb | 47 - .../get_ca_pool.rb | 47 - .../get_certificate.rb | 47 - .../get_certificate_authority.rb | 47 - .../get_certificate_revocation_list.rb | 47 - .../get_certificate_template.rb | 47 - .../list_ca_pools.rb | 51 - .../list_certificate_authorities.rb | 51 - .../list_certificate_revocation_lists.rb | 51 - .../list_certificate_templates.rb | 51 - .../list_certificates.rb | 51 - .../revoke_certificate.rb | 47 - .../undelete_certificate_authority.rb | 54 - .../update_ca_pool.rb | 54 - .../update_certificate.rb | 47 - .../update_certificate_authority.rb | 54 - .../update_certificate_revocation_list.rb | 54 - .../update_certificate_template.rb | 54 - ...ta_google.cloud.security.privateca.v1.json | 1175 --- ...icate_authority_service_operations_test.rb | 400 - ...ertificate_authority_service_paths_test.rb | 115 - ...certificate_authority_service_rest_test.rb | 1726 ---- .../v1/certificate_authority_service_test.rb | 2017 ----- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 118 - ...-cloud-security-private_ca-v1beta1.gemspec | 28 - ...oogle-cloud-security-private_ca-v1beta1.rb | 21 - .../cloud/security/private_ca/v1beta1.rb | 47 - .../v1beta1/certificate_authority_service.rb | 59 - .../certificate_authority_service/client.rb | 2616 ------ .../credentials.rb | 53 - .../operations.rb | 845 -- .../certificate_authority_service/paths.rb | 132 - .../certificate_authority_service/rest.rb | 56 - .../rest/client.rb | 2433 ------ .../rest/operations.rb | 929 -- .../rest/service_stub.rb | 1314 --- .../cloud/security/private_ca/v1beta1/rest.rb | 39 - .../security/private_ca/v1beta1/version.rb | 30 - .../privateca/v1beta1/resources_pb.rb | 67 - .../security/privateca/v1beta1/service_pb.rb | 57 - .../privateca/v1beta1/service_services_pb.rb | 99 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../security/privateca/v1beta1/resources.rb | 1001 --- .../security/privateca/v1beta1/service.rb | 633 -- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../activate_certificate_authority.rb | 54 - .../create_certificate.rb | 47 - .../create_certificate_authority.rb | 54 - .../disable_certificate_authority.rb | 54 - .../enable_certificate_authority.rb | 54 - .../fetch_certificate_authority_csr.rb | 47 - .../get_certificate.rb | 47 - .../get_certificate_authority.rb | 47 - .../get_certificate_revocation_list.rb | 47 - .../get_reusable_config.rb | 47 - .../list_certificate_authorities.rb | 51 - .../list_certificate_revocation_lists.rb | 51 - .../list_certificates.rb | 51 - .../list_reusable_configs.rb | 51 - .../restore_certificate_authority.rb | 54 - .../revoke_certificate.rb | 47 - .../schedule_delete_certificate_authority.rb | 54 - .../update_certificate.rb | 47 - .../update_certificate_authority.rb | 54 - .../update_certificate_revocation_list.rb | 54 - ...ogle.cloud.security.privateca.v1beta1.json | 815 -- ...icate_authority_service_operations_test.rb | 400 - ...ertificate_authority_service_paths_test.rb | 103 - ...certificate_authority_service_rest_test.rb | 1216 --- .../certificate_authority_service_test.rb | 1412 ---- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-security_center-v1/.toys.rb | 28 - .../google-cloud-security_center-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-security_center-v1/Gemfile | 15 - .../LICENSE.md | 201 - .../google-cloud-security_center-v1/README.md | 153 - .../google-cloud-security_center-v1/Rakefile | 169 - .../gapic_metadata.json | 333 - .../google-cloud-security_center-v1.gemspec | 29 - .../lib/google-cloud-security_center-v1.rb | 21 - .../lib/google/cloud/security_center/v1.rb | 45 - .../google/cloud/security_center/v1/rest.rb | 37 - .../security_center/v1/security_center.rb | 56 - .../v1/security_center/client.rb | 7460 ----------------- .../v1/security_center/credentials.rb | 51 - .../v1/security_center/operations.rb | 843 -- .../v1/security_center/paths.rb | 1127 --- .../v1/security_center/rest.rb | 53 - .../v1/security_center/rest/client.rb | 6970 --------------- .../v1/security_center/rest/operations.rb | 926 -- .../v1/security_center/rest/service_stub.rb | 4766 ----------- .../cloud/security_center/v1/version.rb | 28 - .../cloud/securitycenter/v1/access_pb.rb | 23 - .../securitycenter/v1/agent_anomaly_pb.rb | 24 - .../cloud/securitycenter/v1/agent_pb.rb | 21 - .../securitycenter/v1/agent_session_pb.rb | 21 - .../cloud/securitycenter/v1/application_pb.rb | 21 - .../cloud/securitycenter/v1/asset_pb.rb | 29 - .../securitycenter/v1/attack_exposure_pb.rb | 24 - .../cloud/securitycenter/v1/attack_path_pb.rb | 28 - .../v1/backup_disaster_recovery_pb.rb | 23 - .../securitycenter/v1/bigquery_export_pb.rb | 25 - .../cloud/securitycenter/v1/chokepoint_pb.rb | 21 - .../cloud/securitycenter/v1/cloud_armor_pb.rb | 27 - .../v1/cloud_dlp_data_profile_pb.rb | 27 - .../v1/cloud_dlp_inspection_pb.rb | 23 - .../cloud/securitycenter/v1/compliance_pb.rb | 21 - .../cloud/securitycenter/v1/connection_pb.rb | 22 - .../securitycenter/v1/contact_details_pb.rb | 22 - .../cloud/securitycenter/v1/container_pb.rb | 24 - .../cloud/securitycenter/v1/database_pb.rb | 21 - ...event_threat_detection_custom_module_pb.rb | 26 - ...urity_health_analytics_custom_module_pb.rb | 26 - ...event_threat_detection_custom_module_pb.rb | 27 - ...tion_custom_module_validation_errors_pb.rb | 23 - .../securitycenter/v1/exfiltration_pb.rb | 22 - .../securitycenter/v1/external_exposure_pb.rb | 23 - .../securitycenter/v1/external_system_pb.rb | 25 - .../google/cloud/securitycenter/v1/file_pb.rb | 22 - .../cloud/securitycenter/v1/finding_pb.rb | 68 - .../cloud/securitycenter/v1/folder_pb.rb | 21 - .../securitycenter/v1/group_membership_pb.rb | 22 - .../cloud/securitycenter/v1/iam_binding_pb.rb | 22 - .../cloud/securitycenter/v1/indicator_pb.rb | 26 - .../securitycenter/v1/kernel_rootkit_pb.rb | 21 - .../cloud/securitycenter/v1/kubernetes_pb.rb | 34 - .../cloud/securitycenter/v1/label_pb.rb | 21 - .../securitycenter/v1/load_balancer_pb.rb | 21 - .../cloud/securitycenter/v1/log_entry_pb.rb | 24 - .../securitycenter/v1/mitre_attack_pb.rb | 23 - .../cloud/securitycenter/v1/mute_config_pb.rb | 26 - .../cloud/securitycenter/v1/notebook_pb.rb | 23 - .../v1/notification_config_pb.rb | 25 - .../v1/notification_message_pb.rb | 24 - .../cloud/securitycenter/v1/org_policy_pb.rb | 23 - .../v1/organization_settings_pb.rb | 25 - .../cloud/securitycenter/v1/process_pb.rb | 24 - .../cloud/securitycenter/v1/resource_pb.rb | 36 - .../v1/resource_value_config_pb.rb | 28 - .../v1/run_asset_discovery_response_pb.rb | 24 - ...urity_health_analytics_custom_config_pb.rb | 27 - ...urity_health_analytics_custom_module_pb.rb | 27 - .../securitycenter/v1/security_marks_pb.rb | 23 - .../securitycenter/v1/security_posture_pb.rb | 22 - .../v1/securitycenter_service_pb.rb | 147 - .../v1/securitycenter_service_services_pb.rb | 226 - .../cloud/securitycenter/v1/simulation_pb.rb | 27 - .../cloud/securitycenter/v1/source_pb.rb | 23 - .../securitycenter/v1/toxic_combination_pb.rb | 21 - .../securitycenter/v1/valued_resource_pb.rb | 25 - .../securitycenter/v1/vulnerability_pb.rb | 36 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/securitycenter/v1/access.rb | 120 - .../google/cloud/securitycenter/v1/agent.rb | 39 - .../cloud/securitycenter/v1/agent_anomaly.rb | 98 - .../cloud/securitycenter/v1/agent_session.rb | 35 - .../cloud/securitycenter/v1/application.rb | 40 - .../google/cloud/securitycenter/v1/asset.rb | 141 - .../securitycenter/v1/attack_exposure.rb | 73 - .../cloud/securitycenter/v1/attack_path.rb | 147 - .../v1/backup_disaster_recovery.rb | 90 - .../securitycenter/v1/bigquery_export.rb | 92 - .../cloud/securitycenter/v1/chokepoint.rb | 39 - .../cloud/securitycenter/v1/cloud_armor.rb | 128 - .../v1/cloud_dlp_data_profile.rb | 114 - .../securitycenter/v1/cloud_dlp_inspection.rb | 50 - .../cloud/securitycenter/v1/compliance.rb | 43 - .../cloud/securitycenter/v1/connection.rb | 70 - .../securitycenter/v1/contact_details.rb | 44 - .../cloud/securitycenter/v1/container.rb | 49 - .../cloud/securitycenter/v1/database.rb | 67 - ...ve_event_threat_detection_custom_module.rb | 77 - ...security_health_analytics_custom_module.rb | 73 - .../event_threat_detection_custom_module.rb | 88 - ...tection_custom_module_validation_errors.rb | 69 - .../cloud/securitycenter/v1/exfiltration.rb | 64 - .../securitycenter/v1/external_exposure.rb | 77 - .../securitycenter/v1/external_system.rb | 98 - .../google/cloud/securitycenter/v1/file.rb | 72 - .../google/cloud/securitycenter/v1/finding.rb | 486 -- .../google/cloud/securitycenter/v1/folder.rb | 40 - .../securitycenter/v1/group_membership.rb | 51 - .../cloud/securitycenter/v1/iam_binding.rb | 56 - .../cloud/securitycenter/v1/indicator.rb | 116 - .../cloud/securitycenter/v1/kernel_rootkit.rb | 66 - .../cloud/securitycenter/v1/kubernetes.rb | 241 - .../google/cloud/securitycenter/v1/label.rb | 41 - .../cloud/securitycenter/v1/load_balancer.rb | 36 - .../cloud/securitycenter/v1/log_entry.rb | 58 - .../cloud/securitycenter/v1/mitre_attack.rb | 303 - .../cloud/securitycenter/v1/mute_config.rb | 116 - .../cloud/securitycenter/v1/notebook.rb | 46 - .../securitycenter/v1/notification_config.rb | 87 - .../securitycenter/v1/notification_message.rb | 42 - .../cloud/securitycenter/v1/org_policy.rb | 37 - .../v1/organization_settings.rb | 86 - .../google/cloud/securitycenter/v1/process.rb | 79 - .../cloud/securitycenter/v1/resource.rb | 286 - .../v1/resource_value_config.rb | 125 - .../v1/run_asset_discovery_response.rb | 54 - ...security_health_analytics_custom_config.rb | 112 - ...security_health_analytics_custom_module.rb | 90 - .../cloud/securitycenter/v1/security_marks.rb | 71 - .../securitycenter/v1/security_posture.rb | 83 - .../v1/securitycenter_service.rb | 2146 ----- .../cloud/securitycenter/v1/simulation.rb | 46 - .../google/cloud/securitycenter/v1/source.rb | 65 - .../securitycenter/v1/toxic_combination.rb | 45 - .../securitycenter/v1/valued_resource.rb | 86 - .../cloud/securitycenter/v1/vulnerability.rb | 336 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../batch_create_resource_value_configs.rb | 47 - .../security_center/bulk_mute_findings.rb | 54 - .../create_big_query_export.rb | 47 - ...te_event_threat_detection_custom_module.rb | 47 - .../security_center/create_finding.rb | 47 - .../security_center/create_mute_config.rb | 47 - .../create_notification_config.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - .../snippets/security_center/create_source.rb | 47 - .../delete_big_query_export.rb | 47 - ...te_event_threat_detection_custom_module.rb | 47 - .../security_center/delete_mute_config.rb | 47 - .../delete_notification_config.rb | 47 - .../delete_resource_value_config.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - .../security_center/get_big_query_export.rb | 47 - ...ve_event_threat_detection_custom_module.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - ...et_event_threat_detection_custom_module.rb | 47 - .../security_center/get_iam_policy.rb | 47 - .../security_center/get_mute_config.rb | 47 - .../get_notification_config.rb | 47 - .../get_organization_settings.rb | 47 - .../get_resource_value_config.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - .../security_center/get_simulation.rb | 47 - .../snippets/security_center/get_source.rb | 47 - .../security_center/get_valued_resource.rb | 47 - .../snippets/security_center/group_assets.rb | 51 - .../security_center/group_findings.rb | 51 - .../snippets/security_center/list_assets.rb | 51 - .../security_center/list_attack_paths.rb | 51 - .../security_center/list_big_query_exports.rb | 51 - ...t_event_threat_detection_custom_modules.rb | 51 - ...ecurity_health_analytics_custom_modules.rb | 51 - ...e_event_threat_detection_custom_modules.rb | 51 - ...ecurity_health_analytics_custom_modules.rb | 51 - ...t_event_threat_detection_custom_modules.rb | 51 - .../snippets/security_center/list_findings.rb | 51 - .../security_center/list_mute_configs.rb | 51 - .../list_notification_configs.rb | 51 - .../list_resource_value_configs.rb | 51 - ...ecurity_health_analytics_custom_modules.rb | 51 - .../snippets/security_center/list_sources.rb | 51 - .../security_center/list_valued_resources.rb | 51 - .../security_center/run_asset_discovery.rb | 54 - .../security_center/set_finding_state.rb | 47 - .../security_center/set_iam_policy.rb | 47 - .../snippets/security_center/set_mute.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - .../security_center/test_iam_permissions.rb | 47 - .../update_big_query_export.rb | 47 - ...te_event_threat_detection_custom_module.rb | 47 - .../security_center/update_external_system.rb | 47 - .../security_center/update_finding.rb | 47 - .../security_center/update_mute_config.rb | 47 - .../update_notification_config.rb | 47 - .../update_organization_settings.rb | 47 - .../update_resource_value_config.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - .../security_center/update_security_marks.rb | 47 - .../snippets/security_center/update_source.rb | 47 - ...te_event_threat_detection_custom_module.rb | 47 - ...tadata_google.cloud.securitycenter.v1.json | 2535 ------ .../v1/security_center_operations_test.rb | 400 - .../v1/security_center_paths_test.rb | 487 -- .../v1/security_center_rest_test.rb | 3594 -------- .../v1/security_center_test.rb | 4053 --------- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 133 - ...le-cloud-security_center-v1p1beta1.gemspec | 29 - .../google-cloud-security_center-v1p1beta1.rb | 21 - .../google/cloud/security_center/v1p1beta1.rb | 45 - .../cloud/security_center/v1p1beta1/rest.rb | 37 - .../v1p1beta1/security_center.rb | 56 - .../v1p1beta1/security_center/client.rb | 3252 ------- .../v1p1beta1/security_center/credentials.rb | 51 - .../v1p1beta1/security_center/operations.rb | 843 -- .../v1p1beta1/security_center/paths.rb | 330 - .../v1p1beta1/security_center/rest.rb | 53 - .../v1p1beta1/security_center/rest/client.rb | 3048 ------- .../security_center/rest/operations.rb | 927 -- .../security_center/rest/service_stub.rb | 1645 ---- .../security_center/v1p1beta1/version.rb | 28 - .../securitycenter/v1p1beta1/asset_pb.rb | 29 - .../securitycenter/v1p1beta1/finding_pb.rb | 29 - .../securitycenter/v1p1beta1/folder_pb.rb | 21 - .../v1p1beta1/notification_config_pb.rb | 26 - .../v1p1beta1/notification_message_pb.rb | 24 - .../v1p1beta1/organization_settings_pb.rb | 25 - .../securitycenter/v1p1beta1/resource_pb.rb | 24 - .../run_asset_discovery_response_pb.rb | 24 - .../v1p1beta1/security_marks_pb.rb | 23 - .../v1p1beta1/securitycenter_service_pb.rb | 74 - .../securitycenter_service_services_pb.rb | 107 - .../securitycenter/v1p1beta1/source_pb.rb | 23 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../cloud/securitycenter/v1p1beta1/asset.rb | 141 - .../cloud/securitycenter/v1p1beta1/finding.rb | 146 - .../cloud/securitycenter/v1p1beta1/folder.rb | 40 - .../v1p1beta1/notification_config.rb | 98 - .../v1p1beta1/notification_message.rb | 42 - .../v1p1beta1/organization_settings.rb | 86 - .../securitycenter/v1p1beta1/resource.rb | 53 - .../v1p1beta1/run_asset_discovery_response.rb | 54 - .../v1p1beta1/security_marks.rb | 71 - .../v1p1beta1/securitycenter_service.rb | 1053 --- .../cloud/securitycenter/v1p1beta1/source.rb | 64 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../security_center/create_finding.rb | 47 - .../create_notification_config.rb | 47 - .../snippets/security_center/create_source.rb | 47 - .../delete_notification_config.rb | 47 - .../security_center/get_iam_policy.rb | 47 - .../get_notification_config.rb | 47 - .../get_organization_settings.rb | 47 - .../snippets/security_center/get_source.rb | 47 - .../snippets/security_center/group_assets.rb | 51 - .../security_center/group_findings.rb | 51 - .../snippets/security_center/list_assets.rb | 51 - .../snippets/security_center/list_findings.rb | 51 - .../list_notification_configs.rb | 51 - .../snippets/security_center/list_sources.rb | 51 - .../security_center/run_asset_discovery.rb | 54 - .../security_center/set_finding_state.rb | 47 - .../security_center/set_iam_policy.rb | 47 - .../security_center/test_iam_permissions.rb | 47 - .../security_center/update_finding.rb | 47 - .../update_notification_config.rb | 47 - .../update_organization_settings.rb | 47 - .../security_center/update_security_marks.rb | 47 - .../snippets/security_center/update_source.rb | 47 - ...google.cloud.securitycenter.v1p1beta1.json | 935 --- .../security_center_operations_test.rb | 400 - .../v1p1beta1/security_center_paths_test.rb | 178 - .../v1p1beta1/security_center_rest_test.rb | 1388 --- .../v1p1beta1/security_center_test.rb | 1581 ---- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-security_center-v2/.toys.rb | 28 - .../google-cloud-security_center-v2/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-security_center-v2/Gemfile | 15 - .../LICENSE.md | 201 - .../google-cloud-security_center-v2/README.md | 154 - .../google-cloud-security_center-v2/Rakefile | 169 - .../gapic_metadata.json | 218 - .../google-cloud-security_center-v2.gemspec | 29 - .../lib/google-cloud-security_center-v2.rb | 21 - .../lib/google/cloud/security_center/v2.rb | 45 - .../google/cloud/security_center/v2/rest.rb | 37 - .../security_center/v2/security_center.rb | 56 - .../v2/security_center/client.rb | 4793 ----------- .../v2/security_center/credentials.rb | 51 - .../v2/security_center/operations.rb | 843 -- .../v2/security_center/paths.rb | 1068 --- .../v2/security_center/rest.rb | 53 - .../v2/security_center/rest/client.rb | 4395 ---------- .../v2/security_center/rest/operations.rb | 926 -- .../v2/security_center/rest/service_stub.rb | 3336 -------- .../cloud/security_center/v2/version.rb | 28 - .../cloud/securitycenter/v2/access_pb.rb | 23 - .../v2/affected_resources_pb.rb | 21 - .../securitycenter/v2/agent_anomaly_pb.rb | 24 - .../cloud/securitycenter/v2/agent_pb.rb | 21 - .../securitycenter/v2/agent_session_pb.rb | 21 - .../cloud/securitycenter/v2/ai_model_pb.rb | 22 - .../cloud/securitycenter/v2/application_pb.rb | 21 - .../securitycenter/v2/attack_exposure_pb.rb | 25 - .../cloud/securitycenter/v2/attack_path_pb.rb | 28 - .../v2/backup_disaster_recovery_pb.rb | 23 - .../securitycenter/v2/bigquery_export_pb.rb | 25 - .../cloud/securitycenter/v2/chokepoint_pb.rb | 21 - .../cloud/securitycenter/v2/cloud_armor_pb.rb | 27 - .../v2/cloud_dlp_data_profile_pb.rb | 24 - .../v2/cloud_dlp_inspection_pb.rb | 23 - .../cloud/securitycenter/v2/compliance_pb.rb | 21 - .../cloud/securitycenter/v2/connection_pb.rb | 22 - .../securitycenter/v2/contact_details_pb.rb | 22 - .../cloud/securitycenter/v2/container_pb.rb | 24 - .../securitycenter/v2/data_access_event_pb.rb | 24 - .../securitycenter/v2/data_flow_event_pb.rb | 24 - .../v2/data_retention_deletion_event_pb.rb | 25 - .../cloud/securitycenter/v2/database_pb.rb | 21 - .../google/cloud/securitycenter/v2/disk_pb.rb | 21 - .../securitycenter/v2/exfiltration_pb.rb | 22 - .../securitycenter/v2/external_system_pb.rb | 25 - .../google/cloud/securitycenter/v2/file_pb.rb | 24 - .../cloud/securitycenter/v2/finding_pb.rb | 77 - .../cloud/securitycenter/v2/folder_pb.rb | 21 - .../securitycenter/v2/group_membership_pb.rb | 22 - .../cloud/securitycenter/v2/iam_binding_pb.rb | 22 - .../cloud/securitycenter/v2/indicator_pb.rb | 26 - .../cloud/securitycenter/v2/ip_rules_pb.rb | 28 - .../google/cloud/securitycenter/v2/job_pb.rb | 24 - .../securitycenter/v2/kernel_rootkit_pb.rb | 21 - .../cloud/securitycenter/v2/kubernetes_pb.rb | 34 - .../cloud/securitycenter/v2/label_pb.rb | 21 - .../securitycenter/v2/load_balancer_pb.rb | 21 - .../cloud/securitycenter/v2/log_entry_pb.rb | 24 - .../securitycenter/v2/mitre_attack_pb.rb | 23 - .../cloud/securitycenter/v2/mute_config_pb.rb | 26 - .../cloud/securitycenter/v2/network_pb.rb | 21 - .../cloud/securitycenter/v2/notebook_pb.rb | 23 - .../v2/notification_config_pb.rb | 26 - .../v2/notification_message_pb.rb | 24 - .../cloud/securitycenter/v2/org_policy_pb.rb | 24 - .../cloud/securitycenter/v2/process_pb.rb | 24 - .../cloud/securitycenter/v2/resource_pb.rb | 39 - .../v2/resource_value_config_pb.rb | 28 - .../securitycenter/v2/security_marks_pb.rb | 23 - .../securitycenter/v2/security_posture_pb.rb | 22 - .../v2/securitycenter_service_pb.rb | 101 - .../v2/securitycenter_service_services_pb.rb | 167 - .../cloud/securitycenter/v2/simulation_pb.rb | 27 - .../cloud/securitycenter/v2/source_pb.rb | 23 - .../securitycenter/v2/toxic_combination_pb.rb | 21 - .../securitycenter/v2/valued_resource_pb.rb | 25 - .../cloud/securitycenter/v2/vertex_ai_pb.rb | 23 - .../securitycenter/v2/vulnerability_pb.rb | 37 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../proto_docs/google/api/routing.rb | 463 - .../google/cloud/securitycenter/v2/access.rb | 120 - .../securitycenter/v2/affected_resources.rb | 35 - .../google/cloud/securitycenter/v2/agent.rb | 39 - .../cloud/securitycenter/v2/agent_anomaly.rb | 98 - .../cloud/securitycenter/v2/agent_session.rb | 35 - .../cloud/securitycenter/v2/ai_model.rb | 71 - .../cloud/securitycenter/v2/application.rb | 40 - .../securitycenter/v2/attack_exposure.rb | 73 - .../cloud/securitycenter/v2/attack_path.rb | 147 - .../v2/backup_disaster_recovery.rb | 90 - .../securitycenter/v2/bigquery_export.rb | 96 - .../cloud/securitycenter/v2/chokepoint.rb | 39 - .../cloud/securitycenter/v2/cloud_armor.rb | 138 - .../v2/cloud_dlp_data_profile.rb | 52 - .../securitycenter/v2/cloud_dlp_inspection.rb | 50 - .../cloud/securitycenter/v2/compliance.rb | 43 - .../cloud/securitycenter/v2/connection.rb | 70 - .../securitycenter/v2/contact_details.rb | 44 - .../cloud/securitycenter/v2/container.rb | 49 - .../securitycenter/v2/data_access_event.rb | 61 - .../securitycenter/v2/data_flow_event.rb | 65 - .../v2/data_retention_deletion_event.rb | 69 - .../cloud/securitycenter/v2/database.rb | 67 - .../google/cloud/securitycenter/v2/disk.rb | 36 - .../cloud/securitycenter/v2/exfiltration.rb | 64 - .../securitycenter/v2/external_system.rb | 106 - .../google/cloud/securitycenter/v2/file.rb | 105 - .../google/cloud/securitycenter/v2/finding.rb | 533 -- .../google/cloud/securitycenter/v2/folder.rb | 40 - .../securitycenter/v2/group_membership.rb | 51 - .../cloud/securitycenter/v2/iam_binding.rb | 56 - .../cloud/securitycenter/v2/indicator.rb | 116 - .../cloud/securitycenter/v2/ip_rules.rb | 122 - .../google/cloud/securitycenter/v2/job.rb | 65 - .../cloud/securitycenter/v2/kernel_rootkit.rb | 66 - .../cloud/securitycenter/v2/kubernetes.rb | 241 - .../google/cloud/securitycenter/v2/label.rb | 41 - .../cloud/securitycenter/v2/load_balancer.rb | 36 - .../cloud/securitycenter/v2/log_entry.rb | 58 - .../cloud/securitycenter/v2/mitre_attack.rb | 521 -- .../cloud/securitycenter/v2/mute_config.rb | 113 - .../google/cloud/securitycenter/v2/network.rb | 36 - .../cloud/securitycenter/v2/notebook.rb | 46 - .../securitycenter/v2/notification_config.rb | 94 - .../securitycenter/v2/notification_message.rb | 42 - .../cloud/securitycenter/v2/org_policy.rb | 37 - .../google/cloud/securitycenter/v2/process.rb | 83 - .../cloud/securitycenter/v2/resource.rb | 314 - .../v2/resource_value_config.rb | 127 - .../cloud/securitycenter/v2/security_marks.rb | 84 - .../securitycenter/v2/security_posture.rb | 83 - .../v2/securitycenter_service.rb | 1216 --- .../cloud/securitycenter/v2/simulation.rb | 46 - .../google/cloud/securitycenter/v2/source.rb | 65 - .../securitycenter/v2/toxic_combination.rb | 46 - .../securitycenter/v2/valued_resource.rb | 86 - .../cloud/securitycenter/v2/vertex_ai.rb | 68 - .../cloud/securitycenter/v2/vulnerability.rb | 365 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../batch_create_resource_value_configs.rb | 47 - .../security_center/bulk_mute_findings.rb | 54 - .../create_big_query_export.rb | 47 - .../security_center/create_finding.rb | 47 - .../security_center/create_mute_config.rb | 47 - .../create_notification_config.rb | 47 - .../snippets/security_center/create_source.rb | 47 - .../delete_big_query_export.rb | 47 - .../security_center/delete_mute_config.rb | 47 - .../delete_notification_config.rb | 47 - .../delete_resource_value_config.rb | 47 - .../security_center/get_big_query_export.rb | 47 - .../security_center/get_iam_policy.rb | 47 - .../security_center/get_mute_config.rb | 47 - .../get_notification_config.rb | 47 - .../get_resource_value_config.rb | 47 - .../security_center/get_simulation.rb | 47 - .../snippets/security_center/get_source.rb | 47 - .../security_center/get_valued_resource.rb | 47 - .../security_center/group_findings.rb | 51 - .../security_center/list_attack_paths.rb | 51 - .../security_center/list_big_query_exports.rb | 51 - .../snippets/security_center/list_findings.rb | 51 - .../security_center/list_mute_configs.rb | 51 - .../list_notification_configs.rb | 51 - .../list_resource_value_configs.rb | 51 - .../snippets/security_center/list_sources.rb | 51 - .../security_center/list_valued_resources.rb | 51 - .../security_center/set_finding_state.rb | 47 - .../security_center/set_iam_policy.rb | 47 - .../snippets/security_center/set_mute.rb | 47 - .../security_center/test_iam_permissions.rb | 47 - .../update_big_query_export.rb | 47 - .../security_center/update_external_system.rb | 47 - .../security_center/update_finding.rb | 47 - .../security_center/update_mute_config.rb | 47 - .../update_notification_config.rb | 47 - .../update_resource_value_config.rb | 47 - .../security_center/update_security_marks.rb | 47 - .../snippets/security_center/update_source.rb | 47 - ...tadata_google.cloud.securitycenter.v2.json | 1615 ---- .../v2/security_center_operations_test.rb | 400 - .../v2/security_center_paths_test.rb | 403 - .../v2/security_center_rest_test.rb | 2311 ----- .../v2/security_center_test.rb | 2592 ------ .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 123 - ...loud-security_center_management-v1.gemspec | 30 - ...gle-cloud-security_center_management-v1.rb | 21 - .../cloud/security_center_management/v1.rb | 45 - .../v1/bindings_override.rb | 75 - .../security_center_management/v1/rest.rb | 38 - .../v1/security_center_management.rb | 55 - .../v1/security_center_management/client.rb | 2792 ------ .../security_center_management/credentials.rb | 47 - .../v1/security_center_management/paths.rb | 374 - .../v1/security_center_management/rest.rb | 53 - .../security_center_management/rest/client.rb | 2610 ------ .../rest/service_stub.rb | 1677 ---- .../security_center_management/v1/version.rb | 28 - .../v1/security_center_management_pb.rb | 86 - .../security_center_management_services_pb.rb | 141 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1/security_center_management.rb | 1334 --- .../proto_docs/google/iam/v1/policy.rb | 426 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - ...te_event_threat_detection_custom_module.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - ...te_event_threat_detection_custom_module.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - ...ve_event_threat_detection_custom_module.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - ...et_event_threat_detection_custom_module.rb | 47 - .../get_security_center_service.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - ...t_event_threat_detection_custom_modules.rb | 51 - ...ecurity_health_analytics_custom_modules.rb | 51 - ...e_event_threat_detection_custom_modules.rb | 51 - ...ecurity_health_analytics_custom_modules.rb | 51 - ...t_event_threat_detection_custom_modules.rb | 51 - .../list_security_center_services.rb | 51 - ...ecurity_health_analytics_custom_modules.rb | 51 - ...security_health_analytics_custom_module.rb | 47 - ...te_event_threat_detection_custom_module.rb | 47 - .../update_security_center_service.rb | 47 - ...security_health_analytics_custom_module.rb | 47 - ...te_event_threat_detection_custom_module.rb | 47 - ...gle.cloud.securitycentermanagement.v1.json | 855 -- .../security_center_management_paths_test.rb | 169 - .../security_center_management_rest_test.rb | 1265 --- .../v1/security_center_management_test.rb | 1421 ---- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-service_control-v1/.toys.rb | 28 - .../google-cloud-service_control-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-service_control-v1/Gemfile | 15 - .../LICENSE.md | 201 - .../google-cloud-service_control-v1/README.md | 154 - .../google-cloud-service_control-v1/Rakefile | 169 - .../gapic_metadata.json | 42 - .../google-cloud-service_control-v1.gemspec | 28 - .../lib/google-cloud-service_control-v1.rb | 21 - .../api/servicecontrol/v1/check_error_pb.rb | 24 - .../api/servicecontrol/v1/distribution_pb.rb | 26 - .../api/servicecontrol/v1/http_request_pb.rb | 23 - .../api/servicecontrol/v1/log_entry_pb.rb | 29 - .../api/servicecontrol/v1/metric_value_pb.rb | 25 - .../api/servicecontrol/v1/operation_pb.rb | 27 - .../servicecontrol/v1/quota_controller_pb.rb | 31 - .../v1/quota_controller_services_pb.rb | 58 - .../v1/service_controller_pb.rb | 34 - .../v1/service_controller_services_pb.rb | 81 - .../lib/google/cloud/service_control/v1.rb | 46 - .../service_control/v1/quota_controller.rb | 57 - .../v1/quota_controller/client.rb | 497 -- .../v1/quota_controller/credentials.rb | 52 - .../v1/quota_controller/rest.rb | 54 - .../v1/quota_controller/rest/client.rb | 447 - .../v1/quota_controller/rest/service_stub.rb | 143 - .../google/cloud/service_control/v1/rest.rb | 38 - .../service_control/v1/service_controller.rb | 58 - .../v1/service_controller/client.rb | 643 -- .../v1/service_controller/credentials.rb | 52 - .../v1/service_controller/rest.rb | 55 - .../v1/service_controller/rest/client.rb | 586 -- .../service_controller/rest/service_stub.rb | 205 - .../cloud/service_control/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/distribution.rb | 233 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../api/servicecontrol/v1/check_error.rb | 129 - .../api/servicecontrol/v1/distribution.rb | 157 - .../api/servicecontrol/v1/http_request.rb | 95 - .../google/api/servicecontrol/v1/log_entry.rb | 142 - .../api/servicecontrol/v1/metric_value.rb | 101 - .../google/api/servicecontrol/v1/operation.rb | 146 - .../api/servicecontrol/v1/quota_controller.rb | 235 - .../servicecontrol/v1/service_controller.rb | 217 - .../google/logging/type/log_severity.rb | 71 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../quota_controller/allocate_quota.rb | 47 - .../snippets/service_controller/check.rb | 47 - .../snippets/service_controller/report.rb | 47 - ...metadata_google.api.servicecontrol.v1.json | 135 - .../v1/quota_controller_rest_test.rb | 155 - .../v1/quota_controller_test.rb | 166 - .../v1/service_controller_rest_test.rb | 211 - .../v1/service_controller_test.rb | 228 - .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 122 - ...le-cloud-service_directory-v1beta1.gemspec | 30 - .../google-cloud-service_directory-v1beta1.rb | 21 - .../google/cloud/service_directory/v1beta1.rb | 46 - .../v1beta1/bindings_override.rb | 75 - .../v1beta1/lookup_service.rb | 55 - .../v1beta1/lookup_service/client.rb | 540 -- .../v1beta1/lookup_service/credentials.rb | 51 - .../v1beta1/lookup_service/paths.rb | 54 - .../v1beta1/lookup_service/rest.rb | 53 - .../v1beta1/lookup_service/rest/client.rb | 498 -- .../lookup_service/rest/service_stub.rb | 143 - .../v1beta1/registration_service.rb | 69 - .../v1beta1/registration_service/client.rb | 2307 ----- .../registration_service/credentials.rb | 51 - .../v1beta1/registration_service/paths.rb | 130 - .../v1beta1/registration_service/rest.rb | 67 - .../registration_service/rest/client.rb | 2146 ----- .../registration_service/rest/service_stub.rb | 1236 --- .../cloud/service_directory/v1beta1/rest.rb | 39 - .../service_directory/v1beta1/version.rb | 28 - .../servicedirectory/v1beta1/endpoint_pb.rb | 25 - .../v1beta1/lookup_service_pb.rb | 28 - .../v1beta1/lookup_service_services_pb.rb | 47 - .../servicedirectory/v1beta1/namespace_pb.rb | 25 - .../v1beta1/registration_service_pb.rb | 50 - .../registration_service_services_pb.rb | 96 - .../servicedirectory/v1beta1/service_pb.rb | 26 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../servicedirectory/v1beta1/endpoint.rb | 103 - .../v1beta1/lookup_service.rb | 89 - .../servicedirectory/v1beta1/namespace.rb | 62 - .../v1beta1/registration_service.rb | 432 - .../cloud/servicedirectory/v1beta1/service.rb | 88 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../lookup_service/resolve_service.rb | 47 - .../registration_service/create_endpoint.rb | 47 - .../registration_service/create_namespace.rb | 47 - .../registration_service/create_service.rb | 47 - .../registration_service/delete_endpoint.rb | 47 - .../registration_service/delete_namespace.rb | 47 - .../registration_service/delete_service.rb | 47 - .../registration_service/get_endpoint.rb | 47 - .../registration_service/get_iam_policy.rb | 47 - .../registration_service/get_namespace.rb | 47 - .../registration_service/get_service.rb | 47 - .../registration_service/list_endpoints.rb | 51 - .../registration_service/list_namespaces.rb | 51 - .../registration_service/list_services.rb | 51 - .../registration_service/set_iam_policy.rb | 47 - .../test_iam_permissions.rb | 47 - .../registration_service/update_endpoint.rb | 47 - .../registration_service/update_namespace.rb | 47 - .../registration_service/update_service.rb | 47 - ...google.cloud.servicedirectory.v1beta1.json | 775 -- .../v1beta1/lookup_service_paths_test.rb | 55 - .../v1beta1/lookup_service_rest_test.rb | 155 - .../v1beta1/lookup_service_test.rb | 166 - .../registration_service_paths_test.rb | 103 - .../v1beta1/registration_service_rest_test.rb | 1096 --- .../v1beta1/registration_service_test.rb | 1213 --- .../test/helper.rb | 35 - .../google-cloud-service_health-v1/.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-service_health-v1/.toys.rb | 28 - .../google-cloud-service_health-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-service_health-v1/Gemfile | 15 - .../google-cloud-service_health-v1/LICENSE.md | 201 - .../google-cloud-service_health-v1/README.md | 154 - .../google-cloud-service_health-v1/Rakefile | 169 - .../gapic_metadata.json | 48 - .../google-cloud-service_health-v1.gemspec | 29 - .../lib/google-cloud-service_health-v1.rb | 21 - .../lib/google/cloud/service_health/v1.rb | 45 - .../service_health/v1/bindings_override.rb | 75 - .../google/cloud/service_health/v1/rest.rb | 38 - .../cloud/service_health/v1/service_health.rb | 55 - .../v1/service_health/client.rb | 1144 --- .../v1/service_health/credentials.rb | 47 - .../service_health/v1/service_health/paths.rb | 124 - .../service_health/v1/service_health/rest.rb | 53 - .../v1/service_health/rest/client.rb | 1067 --- .../v1/service_health/rest/service_stub.rb | 447 - .../google/cloud/service_health/v1/version.rb | 28 - .../servicehealth/v1/event_resources_pb.rb | 52 - .../servicehealth/v1/event_service_pb.rb | 24 - .../v1/event_service_services_pb.rb | 58 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../cloud/servicehealth/v1/event_resources.rb | 718 -- .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../snippets/Gemfile | 32 - .../snippets/service_health/get_event.rb | 47 - .../service_health/get_organization_event.rb | 47 - .../service_health/get_organization_impact.rb | 47 - .../snippets/service_health/list_events.rb | 51 - .../list_organization_events.rb | 51 - .../list_organization_impacts.rb | 51 - ...etadata_google.cloud.servicehealth.v1.json | 255 - .../v1/service_health_paths_test.rb | 103 - .../v1/service_health_rest_test.rb | 434 - .../service_health/v1/service_health_test.rb | 489 -- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 83 - ...google-cloud-service_management-v1.gemspec | 29 - .../lib/google-cloud-service_management-v1.rb | 21 - .../api/servicemanagement/v1/resources_pb.rb | 39 - .../servicemanagement/v1/servicemanager_pb.rb | 50 - .../v1/servicemanager_services_pb.rb | 143 - .../lib/google/cloud/service_management/v1.rb | 45 - .../v1/bindings_override.rb | 110 - .../cloud/service_management/v1/rest.rb | 38 - .../service_management/v1/service_manager.rb | 56 - .../v1/service_manager/client.rb | 1811 ---- .../v1/service_manager/credentials.rb | 54 - .../v1/service_manager/operations.rb | 835 -- .../v1/service_manager/rest.rb | 54 - .../v1/service_manager/rest/client.rb | 1703 ---- .../v1/service_manager/rest/operations.rb | 925 -- .../v1/service_manager/rest/service_stub.rb | 882 -- .../cloud/service_management/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/auth.rb | 259 - .../proto_docs/google/api/backend.rb | 199 - .../proto_docs/google/api/billing.rb | 82 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/config_change.rb | 89 - .../proto_docs/google/api/context.rb | 97 - .../proto_docs/google/api/control.rb | 41 - .../proto_docs/google/api/documentation.rb | 176 - .../proto_docs/google/api/endpoint.rb | 71 - .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/label.rb | 49 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/log.rb | 54 - .../proto_docs/google/api/logging.rb | 86 - .../proto_docs/google/api/metric.rb | 299 - .../google/api/monitored_resource.rb | 150 - .../proto_docs/google/api/monitoring.rb | 112 - .../proto_docs/google/api/policy.rb | 75 - .../proto_docs/google/api/quota.rb | 208 - .../proto_docs/google/api/resource.rb | 227 - .../proto_docs/google/api/service.rb | 170 - .../api/servicemanagement/v1/resources.rb | 332 - .../servicemanagement/v1/servicemanager.rb | 334 - .../proto_docs/google/api/source_info.rb | 31 - .../proto_docs/google/api/system_parameter.rb | 104 - .../proto_docs/google/api/usage.rb | 81 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/api.rb | 218 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../google/protobuf/source_context.rb | 33 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/protobuf/type.rb | 256 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../service_manager/create_service.rb | 54 - .../service_manager/create_service_config.rb | 47 - .../service_manager/create_service_rollout.rb | 54 - .../service_manager/delete_service.rb | 54 - .../service_manager/generate_config_report.rb | 47 - .../snippets/service_manager/get_service.rb | 47 - .../service_manager/get_service_config.rb | 47 - .../service_manager/get_service_rollout.rb | 47 - .../service_manager/list_service_configs.rb | 51 - .../service_manager/list_service_rollouts.rb | 51 - .../snippets/service_manager/list_services.rb | 51 - .../service_manager/submit_config_source.rb | 54 - .../service_manager/undelete_service.rb | 54 - ...adata_google.api.servicemanagement.v1.json | 535 -- .../v1/service_manager_operations_test.rb | 400 - .../v1/service_manager_rest_test.rb | 817 -- .../v1/service_manager_test.rb | 944 --- .../test/helper.rb | 35 - .../google-cloud-service_usage-v1/.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-service_usage-v1/.toys.rb | 28 - .../google-cloud-service_usage-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-service_usage-v1/Gemfile | 15 - .../google-cloud-service_usage-v1/LICENSE.md | 201 - .../google-cloud-service_usage-v1/README.md | 154 - .../google-cloud-service_usage-v1/Rakefile | 169 - .../gapic_metadata.json | 48 - .../google-cloud-service_usage-v1.gemspec | 28 - .../lib/google-cloud-service_usage-v1.rb | 21 - .../api/serviceusage/v1/resources_pb.rb | 34 - .../api/serviceusage/v1/serviceusage_pb.rb | 38 - .../v1/serviceusage_services_pb.rb | 80 - .../lib/google/cloud/service_usage/v1.rb | 45 - .../lib/google/cloud/service_usage/v1/rest.rb | 37 - .../cloud/service_usage/v1/service_usage.rb | 59 - .../service_usage/v1/service_usage/client.rb | 1077 --- .../v1/service_usage/credentials.rb | 53 - .../v1/service_usage/operations.rb | 835 -- .../service_usage/v1/service_usage/rest.rb | 56 - .../v1/service_usage/rest/client.rb | 992 --- .../v1/service_usage/rest/operations.rb | 925 -- .../v1/service_usage/rest/service_stub.rb | 450 - .../google/cloud/service_usage/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/auth.rb | 259 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/documentation.rb | 176 - .../proto_docs/google/api/endpoint.rb | 71 - .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/label.rb | 49 - .../proto_docs/google/api/launch_stage.rb | 71 - .../google/api/monitored_resource.rb | 150 - .../proto_docs/google/api/monitoring.rb | 112 - .../proto_docs/google/api/quota.rb | 208 - .../proto_docs/google/api/resource.rb | 227 - .../google/api/serviceusage/v1/resources.rb | 123 - .../api/serviceusage/v1/serviceusage.rb | 242 - .../proto_docs/google/api/usage.rb | 81 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/api.rb | 218 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../google/protobuf/source_context.rb | 33 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/type.rb | 256 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../service_usage/batch_enable_services.rb | 54 - .../service_usage/batch_get_services.rb | 47 - .../snippets/service_usage/disable_service.rb | 54 - .../snippets/service_usage/enable_service.rb | 54 - .../snippets/service_usage/get_service.rb | 47 - .../snippets/service_usage/list_services.rb | 51 - ...t_metadata_google.api.serviceusage.v1.json | 255 - .../v1/service_usage_operations_test.rb | 400 - .../v1/service_usage_rest_test.rb | 430 - .../service_usage/v1/service_usage_test.rb | 500 -- .../test/helper.rb | 35 - .../google-cloud-shell-v1/.gitignore | 20 - .../google-cloud-shell-v1/.repo-metadata.json | 18 - .../google-cloud-shell-v1/.rubocop.yml | 33 - .../google-cloud-shell-v1/.toys.rb | 28 - .../google-cloud-shell-v1/.yardopts | 12 - .../google-cloud-shell-v1/AUTHENTICATION.md | 122 - .../google-cloud-shell-v1/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-shell-v1/Gemfile | 15 - .../google-cloud-shell-v1/LICENSE.md | 201 - .../google-cloud-shell-v1/README.md | 154 - .../google-cloud-shell-v1/Rakefile | 169 - .../google-cloud-shell-v1/gapic_metadata.json | 43 - .../google-cloud-shell-v1.gemspec | 28 - .../lib/google-cloud-shell-v1.rb | 21 - .../lib/google/cloud/shell/v1.rb | 45 - .../cloud/shell/v1/cloud_shell_service.rb | 62 - .../shell/v1/cloud_shell_service/client.rb | 956 --- .../v1/cloud_shell_service/credentials.rb | 51 - .../v1/cloud_shell_service/operations.rb | 843 -- .../shell/v1/cloud_shell_service/paths.rb | 50 - .../shell/v1/cloud_shell_service/rest.rb | 59 - .../v1/cloud_shell_service/rest/client.rb | 878 -- .../v1/cloud_shell_service/rest/operations.rb | 927 -- .../cloud_shell_service/rest/service_stub.rb | 390 - .../google/cloud/shell/v1/cloudshell_pb.rb | 47 - .../cloud/shell/v1/cloudshell_services_pb.rb | 72 - .../lib/google/cloud/shell/v1/rest.rb | 37 - .../lib/google/cloud/shell/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/shell/v1/cloudshell.rb | 331 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../google-cloud-shell-v1/snippets/Gemfile | 32 - .../cloud_shell_service/add_public_key.rb | 54 - .../authorize_environment.rb | 54 - .../cloud_shell_service/get_environment.rb | 47 - .../cloud_shell_service/remove_public_key.rb | 54 - .../cloud_shell_service/start_environment.rb | 54 - ...nippet_metadata_google.cloud.shell.v1.json | 215 - .../v1/cloud_shell_service_operations_test.rb | 400 - .../v1/cloud_shell_service_paths_test.rb | 55 - .../shell/v1/cloud_shell_service_rest_test.rb | 376 - .../shell/v1/cloud_shell_service_test.rb | 442 - .../google-cloud-shell-v1/test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 153 - ...le-cloud-spanner-admin-database-v1.gemspec | 29 - .../google-cloud-spanner-admin-database-v1.rb | 21 - .../google/cloud/spanner/admin/database/v1.rb | 49 - .../admin/database/v1/database_admin.rb | 66 - .../database/v1/database_admin/client.rb | 3660 -------- .../database/v1/database_admin/credentials.rb | 56 - .../database/v1/database_admin/operations.rb | 847 -- .../admin/database/v1/database_admin/paths.rb | 176 - .../admin/database/v1/database_admin/rest.rb | 63 - .../database/v1/database_admin/rest/client.rb | 3340 -------- .../v1/database_admin/rest/operations.rb | 1014 --- .../v1/database_admin/rest/service_stub.rb | 1740 ---- .../cloud/spanner/admin/database/v1/rest.rb | 41 - .../spanner/admin/database/v1/version.rb | 32 - .../spanner/admin/database/v1/backup_pb.rb | 52 - .../admin/database/v1/backup_schedule_pb.rb | 40 - .../spanner/admin/database/v1/common_pb.rb | 34 - .../database/v1/spanner_database_admin_pb.rb | 73 - .../v1/spanner_database_admin_services_pb.rb | 245 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../spanner/admin/database/v1/backup.rb | 730 -- .../admin/database/v1/backup_schedule.rb | 220 - .../spanner/admin/database/v1/common.rb | 123 - .../database/v1/spanner_database_admin.rb | 834 -- .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../database_admin/add_split_points.rb | 47 - .../snippets/database_admin/copy_backup.rb | 54 - .../snippets/database_admin/create_backup.rb | 54 - .../database_admin/create_backup_schedule.rb | 47 - .../database_admin/create_database.rb | 54 - .../snippets/database_admin/delete_backup.rb | 47 - .../database_admin/delete_backup_schedule.rb | 47 - .../snippets/database_admin/drop_database.rb | 47 - .../snippets/database_admin/get_backup.rb | 47 - .../database_admin/get_backup_schedule.rb | 47 - .../snippets/database_admin/get_database.rb | 47 - .../database_admin/get_database_ddl.rb | 47 - .../snippets/database_admin/get_iam_policy.rb | 47 - .../internal_update_graph_operation.rb | 47 - .../database_admin/list_backup_operations.rb | 51 - .../database_admin/list_backup_schedules.rb | 51 - .../snippets/database_admin/list_backups.rb | 51 - .../list_database_operations.rb | 51 - .../database_admin/list_database_roles.rb | 51 - .../snippets/database_admin/list_databases.rb | 51 - .../database_admin/restore_database.rb | 54 - .../snippets/database_admin/set_iam_policy.rb | 47 - .../database_admin/test_iam_permissions.rb | 47 - .../snippets/database_admin/update_backup.rb | 47 - .../database_admin/update_backup_schedule.rb | 47 - .../database_admin/update_database.rb | 54 - .../database_admin/update_database_ddl.rb | 54 - ...data_google.spanner.admin.database.v1.json | 1095 --- .../v1/database_admin_operations_test.rb | 400 - .../database/v1/database_admin_paths_test.rb | 127 - .../database/v1/database_admin_rest_test.rb | 1548 ---- .../admin/database/v1/database_admin_test.rb | 1843 ---- .../test/helper.rb | 35 - .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 123 - ...le-cloud-spanner-admin-instance-v1.gemspec | 29 - .../google-cloud-spanner-admin-instance-v1.rb | 21 - .../google/cloud/spanner/admin/instance/v1.rb | 49 - .../admin/instance/v1/instance_admin.rb | 80 - .../instance/v1/instance_admin/client.rb | 3142 ------- .../instance/v1/instance_admin/credentials.rb | 56 - .../instance/v1/instance_admin/operations.rb | 847 -- .../admin/instance/v1/instance_admin/paths.rb | 104 - .../admin/instance/v1/instance_admin/rest.rb | 77 - .../instance/v1/instance_admin/rest/client.rb | 2950 ------- .../v1/instance_admin/rest/operations.rb | 1070 --- .../v1/instance_admin/rest/service_stub.rb | 1376 --- .../cloud/spanner/admin/instance/v1/rest.rb | 41 - .../spanner/admin/instance/v1/version.rb | 32 - .../spanner/admin/instance/v1/common_pb.rb | 31 - .../instance/v1/spanner_instance_admin_pb.rb | 89 - .../v1/spanner_instance_admin_services_pb.rb | 463 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../spanner/admin/instance/v1/common.rb | 71 - .../instance/v1/spanner_instance_admin.rb | 1561 ---- .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../instance_admin/create_instance.rb | 54 - .../instance_admin/create_instance_config.rb | 54 - .../create_instance_partition.rb | 54 - .../instance_admin/delete_instance.rb | 47 - .../instance_admin/delete_instance_config.rb | 47 - .../delete_instance_partition.rb | 47 - .../snippets/instance_admin/get_iam_policy.rb | 47 - .../snippets/instance_admin/get_instance.rb | 47 - .../instance_admin/get_instance_config.rb | 47 - .../instance_admin/get_instance_partition.rb | 47 - .../list_instance_config_operations.rb | 51 - .../instance_admin/list_instance_configs.rb | 51 - .../list_instance_partition_operations.rb | 51 - .../list_instance_partitions.rb | 51 - .../snippets/instance_admin/list_instances.rb | 51 - .../snippets/instance_admin/move_instance.rb | 54 - .../snippets/instance_admin/set_iam_policy.rb | 47 - .../instance_admin/test_iam_permissions.rb | 47 - .../instance_admin/update_instance.rb | 54 - .../instance_admin/update_instance_config.rb | 54 - .../update_instance_partition.rb | 54 - ...data_google.spanner.admin.instance.v1.json | 855 -- .../v1/instance_admin_operations_test.rb | 400 - .../instance/v1/instance_admin_paths_test.rb | 91 - .../instance/v1/instance_admin_rest_test.rb | 1269 --- .../admin/instance/v1/instance_admin_test.rb | 1468 ---- .../test/helper.rb | 35 - .../google-cloud-spanner-v1/.gitignore | 20 - .../.repo-metadata.json | 18 - .../google-cloud-spanner-v1/.rubocop.yml | 33 - .../google-cloud-spanner-v1/.toys.rb | 28 - .../google-cloud-spanner-v1/.yardopts | 12 - .../google-cloud-spanner-v1/AUTHENTICATION.md | 122 - .../google-cloud-spanner-v1/CHANGELOG.md | 2 - .../google-cloud-spanner-v1/Gemfile | 15 - .../google-cloud-spanner-v1/LICENSE.md | 201 - .../google-cloud-spanner-v1/README.md | 153 - .../google-cloud-spanner-v1/Rakefile | 169 - .../gapic_metadata.json | 103 - .../google-cloud-spanner-v1.gemspec | 28 - .../lib/google-cloud-spanner-v1.rb | 21 - .../lib/google/cloud/spanner/v1.rb | 40 - .../lib/google/cloud/spanner/v1/spanner.rb | 52 - .../google/cloud/spanner/v1/spanner/client.rb | 2747 ------ .../cloud/spanner/v1/spanner/credentials.rb | 52 - .../google/cloud/spanner/v1/spanner/paths.rb | 73 - .../lib/google/cloud/spanner/v1/version.rb | 28 - .../lib/google/spanner/v1/change_stream_pb.rb | 37 - .../google/spanner/v1/commit_response_pb.rb | 27 - .../lib/google/spanner/v1/keys_pb.rb | 24 - .../lib/google/spanner/v1/location_pb.rb | 35 - .../lib/google/spanner/v1/mutation_pb.rb | 30 - .../lib/google/spanner/v1/query_plan_pb.rb | 30 - .../lib/google/spanner/v1/result_set_pb.rb | 31 - .../lib/google/spanner/v1/spanner_pb.rb | 74 - .../google/spanner/v1/spanner_services_pb.rb | 226 - .../lib/google/spanner/v1/transaction_pb.rb | 34 - .../lib/google/spanner/v1/type_pb.rb | 27 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - .../google/spanner/v1/change_stream.rb | 488 -- .../google/spanner/v1/commit_response.rb | 79 - .../proto_docs/google/spanner/v1/keys.rb | 170 - .../proto_docs/google/spanner/v1/location.rb | 417 - .../proto_docs/google/spanner/v1/mutation.rb | 178 - .../google/spanner/v1/query_plan.rb | 180 - .../google/spanner/v1/result_set.rb | 265 - .../proto_docs/google/spanner/v1/spanner.rb | 1221 --- .../google/spanner/v1/transaction.rb | 357 - .../proto_docs/google/spanner/v1/type.rb | 222 - .../google-cloud-spanner-v1/snippets/Gemfile | 32 - .../snippet_metadata_google.spanner.v1.json | 695 -- .../snippets/spanner/batch_create_sessions.rb | 47 - .../snippets/spanner/batch_write.rb | 50 - .../snippets/spanner/begin_transaction.rb | 47 - .../snippets/spanner/commit.rb | 47 - .../snippets/spanner/create_session.rb | 47 - .../snippets/spanner/delete_session.rb | 47 - .../snippets/spanner/execute_batch_dml.rb | 47 - .../snippets/spanner/execute_sql.rb | 47 - .../snippets/spanner/execute_streaming_sql.rb | 50 - .../snippets/spanner/fetch_cache_update.rb | 50 - .../snippets/spanner/get_session.rb | 47 - .../snippets/spanner/list_sessions.rb | 51 - .../snippets/spanner/partition_query.rb | 47 - .../snippets/spanner/partition_read.rb | 47 - .../snippets/spanner/read.rb | 47 - .../snippets/spanner/rollback.rb | 47 - .../snippets/spanner/streaming_read.rb | 50 - .../cloud/spanner/v1/spanner_paths_test.rb | 67 - .../google/cloud/spanner/v1/spanner_test.rb | 1346 --- .../google-cloud-spanner-v1/test/helper.rb | 35 - .../google-cloud-speech-v1/.gitignore | 20 - .../.repo-metadata.json | 18 - .../google-cloud-speech-v1/.rubocop.yml | 33 - .../google-cloud-speech-v1/.toys.rb | 28 - .../google-cloud-speech-v1/.yardopts | 12 - .../google-cloud-speech-v1/AUTHENTICATION.md | 122 - .../google-cloud-speech-v1/CHANGELOG.md | 2 - .../google-cloud-speech-v1/Gemfile | 15 - .../google-cloud-speech-v1/LICENSE.md | 201 - .../google-cloud-speech-v1/README.md | 154 - .../google-cloud-speech-v1/Rakefile | 169 - .../gapic_metadata.json | 92 - .../google-cloud-speech-v1.gemspec | 28 - .../lib/google-cloud-speech-v1.rb | 21 - .../lib/google/cloud/speech/v1.rb | 46 - .../lib/google/cloud/speech/v1/adaptation.rb | 55 - .../cloud/speech/v1/adaptation/client.rb | 1436 ---- .../cloud/speech/v1/adaptation/credentials.rb | 51 - .../cloud/speech/v1/adaptation/paths.rb | 88 - .../google/cloud/speech/v1/adaptation/rest.rb | 52 - .../cloud/speech/v1/adaptation/rest/client.rb | 1323 --- .../speech/v1/adaptation/rest/service_stub.rb | 695 -- .../speech/v1/cloud_speech_adaptation_pb.rb | 40 - .../v1/cloud_speech_adaptation_services_pb.rb | 65 - .../google/cloud/speech/v1/cloud_speech_pb.rb | 56 - .../speech/v1/cloud_speech_services_pb.rb | 56 - .../lib/google/cloud/speech/v1/resource_pb.rb | 30 - .../lib/google/cloud/speech/v1/rest.rb | 38 - .../lib/google/cloud/speech/v1/speech.rb | 56 - .../google/cloud/speech/v1/speech/client.rb | 687 -- .../cloud/speech/v1/speech/credentials.rb | 51 - .../cloud/speech/v1/speech/operations.rb | 835 -- .../google/cloud/speech/v1/speech/paths.rb | 71 - .../lib/google/cloud/speech/v1/speech/rest.rb | 53 - .../cloud/speech/v1/speech/rest/client.rb | 555 -- .../cloud/speech/v1/speech/rest/operations.rb | 925 -- .../speech/v1/speech/rest/service_stub.rb | 201 - .../lib/google/cloud/speech/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/speech/v1/cloud_speech.rb | 1003 --- .../speech/v1/cloud_speech_adaptation.rb | 270 - .../google/cloud/speech/v1/resource.rb | 185 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../google-cloud-speech-v1/snippets/Gemfile | 32 - .../adaptation/create_custom_class.rb | 47 - .../snippets/adaptation/create_phrase_set.rb | 47 - .../adaptation/delete_custom_class.rb | 47 - .../snippets/adaptation/delete_phrase_set.rb | 47 - .../snippets/adaptation/get_custom_class.rb | 47 - .../snippets/adaptation/get_phrase_set.rb | 47 - .../adaptation/list_custom_classes.rb | 51 - .../snippets/adaptation/list_phrase_set.rb | 51 - .../adaptation/update_custom_class.rb | 47 - .../snippets/adaptation/update_phrase_set.rb | 47 - ...ippet_metadata_google.cloud.speech.v1.json | 535 -- .../snippets/speech/long_running_recognize.rb | 54 - .../snippets/speech/recognize.rb | 47 - .../snippets/speech/streaming_recognize.rb | 56 - .../cloud/speech/v1/adaptation_paths_test.rb | 79 - .../cloud/speech/v1/adaptation_rest_test.rb | 649 -- .../google/cloud/speech/v1/adaptation_test.rb | 714 -- .../cloud/speech/v1/speech_operations_test.rb | 400 - .../cloud/speech/v1/speech_paths_test.rb | 67 - .../cloud/speech/v1/speech_rest_test.rb | 210 - .../google/cloud/speech/v1/speech_test.rb | 334 - .../google-cloud-speech-v1/test/helper.rb | 35 - .../google-cloud-speech-v1p1beta1/.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-speech-v1p1beta1/.toys.rb | 28 - .../google-cloud-speech-v1p1beta1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-speech-v1p1beta1/Gemfile | 15 - .../google-cloud-speech-v1p1beta1/LICENSE.md | 201 - .../google-cloud-speech-v1p1beta1/README.md | 154 - .../google-cloud-speech-v1p1beta1/Rakefile | 169 - .../gapic_metadata.json | 92 - .../google-cloud-speech-v1p1beta1.gemspec | 28 - .../lib/google-cloud-speech-v1p1beta1.rb | 21 - .../lib/google/cloud/speech/v1p1beta1.rb | 46 - .../cloud/speech/v1p1beta1/adaptation.rb | 55 - .../speech/v1p1beta1/adaptation/client.rb | 1436 ---- .../v1p1beta1/adaptation/credentials.rb | 51 - .../speech/v1p1beta1/adaptation/paths.rb | 132 - .../cloud/speech/v1p1beta1/adaptation/rest.rb | 52 - .../v1p1beta1/adaptation/rest/client.rb | 1323 --- .../v1p1beta1/adaptation/rest/service_stub.rb | 695 -- .../v1p1beta1/cloud_speech_adaptation_pb.rb | 40 - .../cloud_speech_adaptation_services_pb.rb | 65 - .../cloud/speech/v1p1beta1/cloud_speech_pb.rb | 56 - .../v1p1beta1/cloud_speech_services_pb.rb | 56 - .../cloud/speech/v1p1beta1/resource_pb.rb | 34 - .../lib/google/cloud/speech/v1p1beta1/rest.rb | 38 - .../google/cloud/speech/v1p1beta1/speech.rb | 56 - .../cloud/speech/v1p1beta1/speech/client.rb | 687 -- .../speech/v1p1beta1/speech/credentials.rb | 51 - .../speech/v1p1beta1/speech/operations.rb | 835 -- .../cloud/speech/v1p1beta1/speech/paths.rb | 115 - .../cloud/speech/v1p1beta1/speech/rest.rb | 53 - .../speech/v1p1beta1/speech/rest/client.rb | 555 -- .../v1p1beta1/speech/rest/operations.rb | 925 -- .../v1p1beta1/speech/rest/service_stub.rb | 201 - .../google/cloud/speech/v1p1beta1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../cloud/speech/v1p1beta1/cloud_speech.rb | 1033 --- .../v1p1beta1/cloud_speech_adaptation.rb | 270 - .../google/cloud/speech/v1p1beta1/resource.rb | 325 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../adaptation/create_custom_class.rb | 47 - .../snippets/adaptation/create_phrase_set.rb | 47 - .../adaptation/delete_custom_class.rb | 47 - .../snippets/adaptation/delete_phrase_set.rb | 47 - .../snippets/adaptation/get_custom_class.rb | 47 - .../snippets/adaptation/get_phrase_set.rb | 47 - .../adaptation/list_custom_classes.rb | 51 - .../snippets/adaptation/list_phrase_set.rb | 51 - .../adaptation/update_custom_class.rb | 47 - .../snippets/adaptation/update_phrase_set.rb | 47 - ...etadata_google.cloud.speech.v1p1beta1.json | 535 -- .../snippets/speech/long_running_recognize.rb | 54 - .../snippets/speech/recognize.rb | 47 - .../snippets/speech/streaming_recognize.rb | 56 - .../speech/v1p1beta1/adaptation_paths_test.rb | 103 - .../speech/v1p1beta1/adaptation_rest_test.rb | 649 -- .../cloud/speech/v1p1beta1/adaptation_test.rb | 714 -- .../v1p1beta1/speech_operations_test.rb | 400 - .../speech/v1p1beta1/speech_paths_test.rb | 91 - .../speech/v1p1beta1/speech_rest_test.rb | 210 - .../cloud/speech/v1p1beta1/speech_test.rb | 334 - .../test/helper.rb | 35 - 3122 files changed, 1583 insertions(+), 388595 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/google-cloud-secret_manager-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google-cloud-secret_manager-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/snippet_metadata_google.cloud.secrets.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/README.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/google-cloud-secret_manager-v1beta2.gemspec delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/access_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/add_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/create_secret.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/delete_secret.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/destroy_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/disable_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/enable_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret_version.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secret_versions.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secrets.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/update_secret.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/snippet_metadata_google.cloud.secretmanager.v1beta2.json delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-secret_manager-v1beta2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/google-cloud-secure_source_manager-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google-cloud-secure_source_manager-v1.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_instance.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_repository.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_branch_rule.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_repository.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_branch_rules.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_instances.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/test_iam_permissions_repo.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb delete mode 100644 owl-bot-staging/google-cloud-secure_source_manager-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/google-cloud-security-private_ca-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/google-cloud-security-private_ca-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google-cloud-security-private_ca-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/snippet_metadata_google.cloud.security.privateca.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_message_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/org_policy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/organization_settings_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/process_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/resource_value_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/run_asset_discovery_response_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_health_analytics_custom_module_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_marks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/security_posture_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/google-cloud-security_center-v1p1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/asset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/finding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/folder_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_message_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/organization_settings_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/security_marks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/source_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/delete_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_organization_settings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_assets.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_assets.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_notification_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_sources.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_finding_state.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_organization_settings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_security_marks.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v1p1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/google-cloud-security_center_management-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google-cloud-security_center_management-v1.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_center_service.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_center_services.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_center_service.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_health_analytics_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/snippets/snippet_metadata_google.cloud.securitycentermanagement.v1.json delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center_management-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/google-cloud-service_control-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google-cloud-service_control-v1.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/check_error_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/distribution_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/http_request_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/log_entry_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/metric_value_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/operation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/distribution.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/check_error.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/distribution.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/http_request.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/log_entry.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/metric_value.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/operation.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/service_controller.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/logging/type/log_severity.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/snippets/quota_controller/allocate_quota.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/check.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/report.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/snippets/snippet_metadata_google.api.servicecontrol.v1.json delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_control-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/google-cloud-service_directory-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/endpoint_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/namespace_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/lookup_service/resolve_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_endpoint.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_namespace.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_endpoint.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_namespace.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_endpoint.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_namespace.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_endpoints.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_namespaces.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_services.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_endpoint.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_namespace.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/snippet_metadata_google.cloud.servicedirectory.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_directory-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/google-cloud-service_health-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google-cloud-service_health-v1.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/paths.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_event.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_event.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_impact.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_events.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_events.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_impacts.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/snippets/snippet_metadata_google.cloud.servicehealth.v1.json delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_health-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/google-cloud-service_management-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google-cloud-service_management-v1.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/auth.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/backend.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/billing.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/config_change.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/context.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/control.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/documentation.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/endpoint.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/label.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/log.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/logging.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/metric.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitored_resource.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitoring.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/policy.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/quota.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/service.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/source_info.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/system_parameter.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/usage.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/api.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/source_context.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/type.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_config.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_rollout.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/delete_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/generate_config_report.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_config.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_rollout.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_configs.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_rollouts.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_services.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/submit_config_source.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/undelete_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/snippets/snippet_metadata_google.api.servicemanagement.v1.json delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_management-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/google-cloud-service_usage-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google-cloud-service_usage-v1.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/auth.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/documentation.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/endpoint.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/label.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitored_resource.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitoring.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/quota.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/usage.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/api.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/source_context.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/type.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_enable_services.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_get_services.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/disable_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/enable_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/get_service.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/list_services.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/snippets/snippet_metadata_google.api.serviceusage.v1.json delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_test.rb delete mode 100644 owl-bot-staging/google-cloud-service_usage-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-shell-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-shell-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-shell-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-shell-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-shell-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-shell-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-shell-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-shell-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-shell-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-shell-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-shell-v1/google-cloud-shell-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google-cloud-shell-v1.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_pb.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/add_public_key.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/authorize_environment.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/get_environment.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/remove_public_key.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/start_environment.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/snippets/snippet_metadata_google.cloud.shell.v1.json delete mode 100644 owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-shell-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/google-cloud-spanner-admin-database-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_schedule_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/add_split_points.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/copy_backup.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_database.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/drop_database.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backups.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_operations.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_roles.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_databases.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/restore_database.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-database-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instances.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/move_instance.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/snippet_metadata_google.spanner.admin.instance.v1.json delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_test.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/google-cloud-spanner-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google-cloud-spanner-v1.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/keys_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/location_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/mutation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/query_plan_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/result_set_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/transaction_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/type_pb.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/keys.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/location.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/mutation.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/query_plan.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/result_set.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/spanner.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/type.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_create_sessions.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_write.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/begin_transaction.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/commit.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/create_session.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/delete_session.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_batch_dml.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_sql.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_streaming_sql.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/fetch_cache_update.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/get_session.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/list_sessions.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_query.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_read.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/read.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/rollback.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/streaming_read.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_test.rb delete mode 100644 owl-bot-staging/google-cloud-spanner-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-speech-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-speech-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-speech-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-speech-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-speech-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-speech-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-speech-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-speech-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-speech-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-speech-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-speech-v1/google-cloud-speech-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google-cloud-speech-v1.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/client.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_pb.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/client.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/operations.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/paths.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/resource.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_custom_class.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_phrase_set.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_custom_class.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_phrase_set.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_custom_class.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_phrase_set.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_custom_classes.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_phrase_set.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_custom_class.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_phrase_set.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/snippet_metadata_google.cloud.speech.v1.json delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/speech/long_running_recognize.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/speech/recognize.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/snippets/speech/streaming_recognize.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/google-cloud-speech-v1p1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_custom_class.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_phrase_set.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_custom_class.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_custom_class.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_phrase_set.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_custom_classes.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_phrase_set.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_custom_class.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_phrase_set.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/snippet_metadata_google.cloud.speech.v1p1beta1.json delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/long_running_recognize.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/recognize.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/streaming_recognize.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_test.rb delete mode 100644 owl-bot-staging/google-cloud-speech-v1p1beta1/test/helper.rb diff --git a/google-cloud-secret_manager-v1beta1/.owlbot-manifest.json b/google-cloud-secret_manager-v1beta1/.owlbot-manifest.json index fba3f0849c37..36825f546b2e 100644 --- a/google-cloud-secret_manager-v1beta1/.owlbot-manifest.json +++ b/google-cloud-secret_manager-v1beta1/.owlbot-manifest.json @@ -67,6 +67,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-secret_manager-v1beta1/.toys.rb b/google-cloud-secret_manager-v1beta1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-secret_manager-v1beta1/.toys.rb +++ b/google-cloud-secret_manager-v1beta1/.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-v1beta1/Rakefile b/google-cloud-secret_manager-v1beta1/Rakefile index 889fed31d06e..48d5c1256eec 100644 --- a/google-cloud-secret_manager-v1beta1/Rakefile +++ b/google-cloud-secret_manager-v1beta1/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-v1beta1/lib/google-cloud-secret_manager-v1beta1.rb b/google-cloud-secret_manager-v1beta1/lib/google-cloud-secret_manager-v1beta1.rb index 124939f07a99..5e930f08a7d9 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google-cloud-secret_manager-v1beta1.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google-cloud-secret_manager-v1beta1.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-v1beta1/lib/google/cloud/secret_manager/v1beta1.rb b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1.rb index 2764b7941389..c73914ce8c82 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1.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-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.rb b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.rb index a1a1b944bba7..0fadf3d51c06 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.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-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.rb b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.rb index 7c4a70a4d2f2..c97fa6acb0d9 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.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-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.rb b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.rb index 254893119968..7973da8d921f 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.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-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb index 1ca429232fa0..9d84a4a7f262 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.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-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.rb b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.rb index 56f4c4552036..3fe96f0aee79 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.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-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.rb b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.rb index 05270593ac85..504b57a7a147 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.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-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.rb b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.rb index b2506b716d32..06dc1cced025 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.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-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb index c70a8e73f22e..8f9b19c07538 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.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-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb index 01630f41823a..968f6c2a4fd6 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.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-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb index 82667e213474..3ffb62db71bb 100644 --- a/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb +++ b/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/secrets/v1beta1/service.proto for package 'Google.Cloud.SecretManager.V1beta1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secret_manager-v1beta1/proto_docs/google/api/client.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/api/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-secret_manager-v1beta1/proto_docs/google/api/field_behavior.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/api/field_behavior.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-v1beta1/proto_docs/google/api/launch_stage.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/api/launch_stage.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-secret_manager-v1beta1/proto_docs/google/api/resource.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/api/resource.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/api/resource.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-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.rb index 59e860aaa198..ad2f4fa25e44 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.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-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.rb index e7144455c642..dc304a41b777 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.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-v1beta1/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/iam_policy.rb index 3999076cd8c2..5445c77f8258 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/iam_policy.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-v1beta1/proto_docs/google/iam/v1/options.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/options.rb index e8720a105bca..60713d995b86 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/options.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-v1beta1/proto_docs/google/iam/v1/policy.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/policy.rb index 3e6a8d5d47d9..999575b797df 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/policy.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-v1beta1/proto_docs/google/protobuf/any.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/any.rb index 9e9bdbb09ea4..58691995f02e 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/any.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-secret_manager-v1beta1/proto_docs/google/protobuf/duration.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/duration.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-secret_manager-v1beta1/proto_docs/google/protobuf/empty.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/empty.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-v1beta1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/field_mask.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-v1beta1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.rb b/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.rb index 066f228c22f0..53e7733b6592 100644 --- a/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.rb +++ b/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.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-v1beta1/snippets/Gemfile b/google-cloud-secret_manager-v1beta1/snippets/Gemfile index b73972233266..7d0b3f462848 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/Gemfile +++ b/google-cloud-secret_manager-v1beta1/snippets/Gemfile @@ -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-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.rb index 099ab2d0dcc5..ac6df7b6e662 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.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-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.rb index 3fad90867b82..2a913b556c14 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.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-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.rb index 2194a802c996..b0fd1bcbba4a 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.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-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.rb index d3b3e991b404..7148292e6d60 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.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-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.rb index 06583463e1c8..a2ce12dcbae7 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.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-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.rb index 1afe2e92634b..c578b0471ea7 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.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-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.rb index 5f659b0a3d25..728070e800a2 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.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-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.rb index 281fa0f223e2..2fcae7265e71 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.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-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.rb index b48fa7b9b55c..75619ce72ae8 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.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-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.rb index e2707c35e0c8..5c6734cf2a67 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.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-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.rb index 2e98c9c9327b..3beb998ea346 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.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-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.rb index d285d3e07190..d29981383e36 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.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-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.rb index 9627f6a0dc00..0d96d5ef3a67 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.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-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.rb index c9f07d5851ce..855968413f63 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.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-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.rb b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.rb index 4b66065af7b4..7979fa334732 100755 --- a/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.rb +++ b/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.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-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_test.rb b/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_test.rb index 7acd7dcdc061..8b03d0133770 100644 --- a/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_test.rb +++ b/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_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-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_test.rb b/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_test.rb index 0a1f1360cb57..654e46b19b8a 100644 --- a/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_test.rb +++ b/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_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-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_test.rb b/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_test.rb index a2192eadacf4..dae1d80c90fc 100644 --- a/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_test.rb +++ b/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_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-v1beta1/test/helper.rb b/google-cloud-secret_manager-v1beta1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-secret_manager-v1beta1/test/helper.rb +++ b/google-cloud-secret_manager-v1beta1/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-v1beta2/.owlbot-manifest.json b/google-cloud-secret_manager-v1beta2/.owlbot-manifest.json index 13bfdf2aa588..235e000590e6 100644 --- a/google-cloud-secret_manager-v1beta2/.owlbot-manifest.json +++ b/google-cloud-secret_manager-v1beta2/.owlbot-manifest.json @@ -67,6 +67,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-secret_manager-v1beta2/.toys.rb b/google-cloud-secret_manager-v1beta2/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-secret_manager-v1beta2/.toys.rb +++ b/google-cloud-secret_manager-v1beta2/.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-v1beta2/Rakefile b/google-cloud-secret_manager-v1beta2/Rakefile index 94f9517d5ef3..b1cfc54cac77 100644 --- a/google-cloud-secret_manager-v1beta2/Rakefile +++ b/google-cloud-secret_manager-v1beta2/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-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.rb b/google-cloud-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.rb index 938c0aca92d2..4fa698942ce3 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.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-v1beta2/lib/google/cloud/secret_manager/v1beta2.rb b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2.rb index c30c96856b13..094bfb8e6d20 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2.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-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb index ec405a779eaa..2cb21f372d4d 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.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-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.rb b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.rb index 6f145f8f1179..4581b5c14be0 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.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-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb index d73c4f748f9f..5200a70afe3b 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.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-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb index 81164683c032..dc83842b33eb 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.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-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb index f46ebc968cf4..42d6ada8e23f 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.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-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb index 8e2b655c6d7b..a3810d469c8f 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.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-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb index 7b06ae723e5e..0f60f9b3fd09 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.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-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb index 43954e4808f7..e674d89468e2 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.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-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb index ae16df6cf199..6975b7911fd6 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.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-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb index 04f3605ea64a..86d8147e919d 100644 --- a/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb +++ b/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/secretmanager/v1beta2/service.proto for package 'Google.Cloud.SecretManager.V1beta2' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.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-v1beta2/proto_docs/google/api/field_behavior.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/api/field_behavior.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-v1beta2/proto_docs/google/api/launch_stage.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/api/launch_stage.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-v1beta2/proto_docs/google/api/resource.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/api/resource.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/api/resource.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-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb index 3040eb803ddb..67caed18595b 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.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-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.rb index ba351228121f..9df94e60b5d9 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.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-v1beta2/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/iam_policy.rb index 3729ce6dfaa5..5445c77f8258 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/iam_policy.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-v1beta2/proto_docs/google/iam/v1/options.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/options.rb index d762967fa7ec..60713d995b86 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/options.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-v1beta2/proto_docs/google/iam/v1/policy.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/policy.rb index 38e7116f6688..999575b797df 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/policy.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-v1beta2/proto_docs/google/protobuf/any.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/any.rb index fb4d6862eac9..58691995f02e 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/any.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/any.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-v1beta2/proto_docs/google/protobuf/duration.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/duration.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-v1beta2/proto_docs/google/protobuf/empty.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/empty.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-v1beta2/proto_docs/google/protobuf/field_mask.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/field_mask.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-v1beta2/proto_docs/google/protobuf/timestamp.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.rb b/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.rb index 41c8c3a565cc..53e7733b6592 100644 --- a/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.rb +++ b/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.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-v1beta2/snippets/Gemfile b/google-cloud-secret_manager-v1beta2/snippets/Gemfile index 6000796a3b7d..dbb02f1e7509 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/Gemfile +++ b/google-cloud-secret_manager-v1beta2/snippets/Gemfile @@ -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-v1beta2/snippets/secret_manager_service/access_secret_version.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/access_secret_version.rb index b39c80a1e6fe..d0d080ffd38d 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/access_secret_version.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/access_secret_version.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-v1beta2/snippets/secret_manager_service/add_secret_version.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/add_secret_version.rb index f7de5cf3c585..e80ead1cc007 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/add_secret_version.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/add_secret_version.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-v1beta2/snippets/secret_manager_service/create_secret.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/create_secret.rb index 928aca82dd8e..e3bad58b58f1 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/create_secret.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/create_secret.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-v1beta2/snippets/secret_manager_service/delete_secret.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/delete_secret.rb index 99f2f410e846..13e175a049e9 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/delete_secret.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/delete_secret.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-v1beta2/snippets/secret_manager_service/destroy_secret_version.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/destroy_secret_version.rb index 35176173d047..d806c328f332 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/destroy_secret_version.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/destroy_secret_version.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-v1beta2/snippets/secret_manager_service/disable_secret_version.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/disable_secret_version.rb index be7c1a67fc2a..b5c83f8366d2 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/disable_secret_version.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/disable_secret_version.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-v1beta2/snippets/secret_manager_service/enable_secret_version.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/enable_secret_version.rb index 29d2d1aaca15..25e18d630f29 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/enable_secret_version.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/enable_secret_version.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-v1beta2/snippets/secret_manager_service/get_iam_policy.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_iam_policy.rb index 4cf7c867d22e..27c9a36d2f37 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_iam_policy.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_iam_policy.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-v1beta2/snippets/secret_manager_service/get_secret.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret.rb index 9d84cfc8ed18..85d7b4256e33 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret.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-v1beta2/snippets/secret_manager_service/get_secret_version.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret_version.rb index ec2f5174c6af..20072c84fd22 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret_version.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret_version.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-v1beta2/snippets/secret_manager_service/list_secret_versions.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secret_versions.rb index 31cf060d06d9..7742f1a55a7d 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secret_versions.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secret_versions.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-v1beta2/snippets/secret_manager_service/list_secrets.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secrets.rb index c3ca6c739edd..fd2e425d30c3 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secrets.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secrets.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-v1beta2/snippets/secret_manager_service/set_iam_policy.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/set_iam_policy.rb index d575c7e39b99..30030038e28f 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/set_iam_policy.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/set_iam_policy.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-v1beta2/snippets/secret_manager_service/test_iam_permissions.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/test_iam_permissions.rb index de1ef05bf39b..52ad7f6d8e08 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/test_iam_permissions.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/test_iam_permissions.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-v1beta2/snippets/secret_manager_service/update_secret.rb b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/update_secret.rb index 5e8313b46508..74eec379aa18 100644 --- a/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/update_secret.rb +++ b/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/update_secret.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-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_test.rb b/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_test.rb index 6c99d68c9d0b..f28501a34bc5 100644 --- a/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_test.rb +++ b/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_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-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_test.rb b/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_test.rb index 51e4ca076a5d..498bb30fc0c7 100644 --- a/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_test.rb +++ b/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_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-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_test.rb b/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_test.rb index 1eaf84c3fe33..f8e5a58d175f 100644 --- a/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_test.rb +++ b/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_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-secret_manager-v1beta2/test/helper.rb b/google-cloud-secret_manager-v1beta2/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-secret_manager-v1beta2/test/helper.rb +++ b/google-cloud-secret_manager-v1beta2/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-secure_source_manager-v1/.owlbot-manifest.json b/google-cloud-secure_source_manager-v1/.owlbot-manifest.json index 155323cc8542..bf574cfdce74 100644 --- a/google-cloud-secure_source_manager-v1/.owlbot-manifest.json +++ b/google-cloud-secure_source_manager-v1/.owlbot-manifest.json @@ -105,6 +105,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-secure_source_manager-v1/.toys.rb b/google-cloud-secure_source_manager-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-secure_source_manager-v1/.toys.rb +++ b/google-cloud-secure_source_manager-v1/.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-v1/Rakefile b/google-cloud-secure_source_manager-v1/Rakefile index c51fda801817..9fd2e0c76cc0 100644 --- a/google-cloud-secure_source_manager-v1/Rakefile +++ b/google-cloud-secure_source_manager-v1/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-v1/lib/google-cloud-secure_source_manager-v1.rb b/google-cloud-secure_source_manager-v1/lib/google-cloud-secure_source_manager-v1.rb index 1d5240e4912c..0de64e27e2a1 100644 --- a/google-cloud-secure_source_manager-v1/lib/google-cloud-secure_source_manager-v1.rb +++ b/google-cloud-secure_source_manager-v1/lib/google-cloud-secure_source_manager-v1.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-v1/lib/google/cloud/secure_source_manager/v1.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1.rb index e3b70046c3b5..34a35e7b08eb 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1.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-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.rb index 284f18015cd6..31599cbdad14 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.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-v1/lib/google/cloud/secure_source_manager/v1/rest.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/rest.rb index 652d4b525ea8..8696eba4fdff 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/rest.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/rest.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-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb index f56f049be934..b4982af54739 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/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-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb index 849b0e22533e..5320e8dfbdfa 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.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-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.rb index 82c9d4b6c1f5..514b539ee5fe 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.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-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb index 16f4616513a8..47e65cdbc636 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.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-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb index 7606e614cfc7..da9c90ca3b1d 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.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-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb index 3cffe16871f6..1d049bd8ad6d 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.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-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb index bffa3143dbc4..5256c3f91046 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.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-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb index 4af617766f5a..b4d307413f79 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.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-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb index 40a886cc49d3..f85cddd65669 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.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-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb b/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb index aa3545ede628..cea486da7706 100644 --- a/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb +++ b/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/securesourcemanager/v1/secure_source_manager.proto for package 'Google.Cloud.SecureSourceManager.V1' # Original file comments: -# 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-secure_source_manager-v1/proto_docs/google/api/client.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/api/client.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/api/client.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-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_behavior.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-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/api/launch_stage.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-v1/proto_docs/google/api/resource.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/api/resource.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-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb index 8285f7072a50..b120f62bbaae 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/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-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/longrunning/operations.rb index f6e867136403..7a757f512165 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/longrunning/operations.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-v1/proto_docs/google/protobuf/any.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/any.rb index fb4d6862eac9..58691995f02e 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/any.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-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/duration.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-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/empty.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-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/field_mask.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-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.rb index 09acc69b6125..c1a1c07eb2db 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.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-v1/proto_docs/google/type/expr.rb b/google-cloud-secure_source_manager-v1/proto_docs/google/type/expr.rb index 41c8c3a565cc..53e7733b6592 100644 --- a/google-cloud-secure_source_manager-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-secure_source_manager-v1/proto_docs/google/type/expr.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-v1/snippets/Gemfile b/google-cloud-secure_source_manager-v1/snippets/Gemfile index 3dc88a8e7cd6..c02a8c6ffa97 100644 --- a/google-cloud-secure_source_manager-v1/snippets/Gemfile +++ b/google-cloud-secure_source_manager-v1/snippets/Gemfile @@ -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-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb index 3d27add3b407..6aeca4d125fe 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.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-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb index e24883234599..b2ba82ae6d45 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.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-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb index a54a1b94cf6e..38c1ced837e0 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.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-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.rb index 88f044f50d93..81740887a0f5 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.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-v1/snippets/secure_source_manager/create_hook.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb index c1ab5431e915..9ebf7f19e4b0 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.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-secure_source_manager-v1/snippets/secure_source_manager/create_instance.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_instance.rb index 8a13eaa8f144..d7e6ebc48aea 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_instance.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_instance.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-v1/snippets/secure_source_manager/create_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb index 61c3da1b86a9..c7ecf6b65771 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.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-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb index 01f891a45785..9a392c0b40e5 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.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-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb index b6d6c1b3ca24..96f9276bb3ad 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.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-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb index 7fb5f36effa4..42a6943f1657 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.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-secure_source_manager-v1/snippets/secure_source_manager/create_repository.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_repository.rb index 06cb4ceb21eb..8a5c6b9f1c9c 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_repository.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_repository.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-v1/snippets/secure_source_manager/delete_branch_rule.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_branch_rule.rb index b783f3413d35..7be487c5cd28 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_branch_rule.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_branch_rule.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-v1/snippets/secure_source_manager/delete_hook.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb index 17337a21e4b6..bb832a22960e 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.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-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.rb index c281a5f4ae52..3846d75b48de 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.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-v1/snippets/secure_source_manager/delete_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb index 8201185bbacd..97ae38f29b45 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.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-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb index 8dd3f8d59f3c..7d4cf8df2226 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.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-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb index 9c9e4bee54c6..9b109842de87 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.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-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.rb index 5312e4d3b8c5..5ac51c078de8 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.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-v1/snippets/secure_source_manager/fetch_blob.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb index 453280676ee9..cf6d2c9e3b39 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.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-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb index b5c3b8bf2091..f44b00813d69 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.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-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.rb index ae501543d277..f34587a87d48 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.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-v1/snippets/secure_source_manager/get_hook.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb index c0a3c53e3187..7e6782e5a4ad 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.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-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.rb index b6229c0f611a..e9ce8413832f 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.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-v1/snippets/secure_source_manager/get_instance.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_instance.rb index 41990e1cd739..36213b70cd2b 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_instance.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_instance.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-v1/snippets/secure_source_manager/get_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb index dcdf2c672e9c..a00d369904cc 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.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-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb index 090eed282d3c..d72bb362175a 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.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-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb index 3a712a930693..99294fe78a70 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.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-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb index c6493cdda1a0..b353146f2611 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.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-secure_source_manager-v1/snippets/secure_source_manager/get_repository.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_repository.rb index 2296a6250cea..c061ef825149 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_repository.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_repository.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-v1/snippets/secure_source_manager/list_branch_rules.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_branch_rules.rb index 84c3d29dacc5..00499c4f7fe8 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_branch_rules.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_branch_rules.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-v1/snippets/secure_source_manager/list_hooks.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb index 8a171810610b..bdd7fcb4c869 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.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-secure_source_manager-v1/snippets/secure_source_manager/list_instances.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_instances.rb index 8fe6e0c8968a..a0635c75ef14 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_instances.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_instances.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-v1/snippets/secure_source_manager/list_issue_comments.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb index 5fe91a537cdf..c67d4b141f75 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.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-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb index 680e3b304327..1d06ffba7fd6 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.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-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb index 014f2de5c4ee..e27942c2285c 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.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-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb index 2b33c239028c..ee7f1fb85eee 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.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-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb index 5f0cf6e44b60..7d7b6c3956a6 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.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-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.rb index 21612b405d28..bed32be0efe7 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.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-v1/snippets/secure_source_manager/merge_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb index fa2e24c0f52a..a561bbc1483f 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.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-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb index df5eebcca650..aac118b714ec 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.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-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb index a5815a5abc63..e144b045570d 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.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-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb index 8d553fe1bc99..7a9e2ed11b6c 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.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-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.rb index 1cd7f90d76ba..9eaf3ef13717 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.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-v1/snippets/secure_source_manager/test_iam_permissions_repo.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/test_iam_permissions_repo.rb index d83fd2d1bef4..73012017a1b3 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/test_iam_permissions_repo.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/test_iam_permissions_repo.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-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb index 9d4b8798420d..d8c323b516f2 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.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-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.rb index 4bd6475a87e5..bd2c0fd99ca4 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.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-v1/snippets/secure_source_manager/update_hook.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb index 3c8bf32057c4..724f047f2413 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.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-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb index ce8e1609cfe0..4de76feb6560 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.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-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb index f660c1c8c72b..f19c0a363e5b 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.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-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb index 4d831958edb2..caea95463f77 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.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-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb index 19ac42f2303a..902089aa57c5 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.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-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb index 079eeb6e1871..fa3df85ca997 100644 --- a/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb +++ b/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.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-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb index c845128dd5f7..f4daf3d553b9 100644 --- a/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb +++ b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_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-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb index fbab8ad71667..5320203b8443 100644 --- a/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb +++ b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_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-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb index 42f09abe8d6b..32cf40c3585f 100644 --- a/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb +++ b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_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-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb index 0454cc739dcc..e03409ec4ac5 100644 --- a/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb +++ b/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_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-v1/test/helper.rb b/google-cloud-secure_source_manager-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-secure_source_manager-v1/test/helper.rb +++ b/google-cloud-secure_source_manager-v1/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-v1/.owlbot-manifest.json b/google-cloud-security-private_ca-v1/.owlbot-manifest.json index 803faf5a0081..3774290d6bd0 100644 --- a/google-cloud-security-private_ca-v1/.owlbot-manifest.json +++ b/google-cloud-security-private_ca-v1/.owlbot-manifest.json @@ -84,6 +84,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-security-private_ca-v1/.toys.rb b/google-cloud-security-private_ca-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-security-private_ca-v1/.toys.rb +++ b/google-cloud-security-private_ca-v1/.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-v1/Rakefile b/google-cloud-security-private_ca-v1/Rakefile index ade8c2a9998c..bb7b3d9c8032 100644 --- a/google-cloud-security-private_ca-v1/Rakefile +++ b/google-cloud-security-private_ca-v1/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-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.rb b/google-cloud-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.rb index eb0e250faac8..ec80d7546971 100644 --- a/google-cloud-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.rb +++ b/google-cloud-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.rb index 26f9c8d8da24..2dcf3038bbe3 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.rb index 60bde05ea9c9..f9fc3eab4e89 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb index b9add1b10c2a..780346978920 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb index 0927ece0aab6..29c542d7d4b1 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.rb index a410b896ff2b..47ad11aa913e 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb index e462d723b79b..23f248bdc84e 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb index 96995e1cde9b..57c61d556fb1 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb index c5cffeab433f..04c2876adc55 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb index 1666c2b95152..840608d90785 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb index cb2ee55acbd9..02a7da47b22c 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb index da0d87720f06..1665c56a8de6 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.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-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.rb index 4bc523a246ac..32ff1bdaacad 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.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-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb b/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb index f917a29f38e6..a9cc50318222 100644 --- a/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb +++ b/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/security/privateca/v1/service.proto for package 'Google.Cloud.Security.PrivateCA.V1' # Original file comments: -# 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-security-private_ca-v1/proto_docs/google/api/client.rb b/google-cloud-security-private_ca-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/api/client.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/api/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-security-private_ca-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-security-private_ca-v1/proto_docs/google/api/field_behavior.rb index 6be3cb0ed6c3..582be187d115 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/api/field_behavior.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-security-private_ca-v1/proto_docs/google/api/field_info.rb b/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb index cea53f02d1a8..0f5acf0a5538 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.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-security-private_ca-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-security-private_ca-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/api/launch_stage.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-private_ca-v1/proto_docs/google/api/resource.rb b/google-cloud-security-private_ca-v1/proto_docs/google/api/resource.rb index 85d0a8f50bba..25dec4847ac1 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/api/resource.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-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb b/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb index fde259f79ccc..a49d13fd66e4 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.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-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb b/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb index 520a81780728..6a4a087b61da 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.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-security-private_ca-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-security-private_ca-v1/proto_docs/google/longrunning/operations.rb index 50f11f9f36d6..7a757f512165 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/longrunning/operations.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-security-private_ca-v1/proto_docs/google/protobuf/any.rb b/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/any.rb index 4fde75cec2aa..58691995f02e 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/any.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-security-private_ca-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/duration.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-security-private_ca-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/empty.rb index e63eb943257a..83e4481834a6 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/empty.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-security-private_ca-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/field_mask.rb index 3db2d8f80bab..7f3ffc78601a 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/field_mask.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-security-private_ca-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/timestamp.rb index 626cd5e0bf3a..e58202461f88 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.rb b/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.rb index 1db3524e2da2..c1a1c07eb2db 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.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-security-private_ca-v1/proto_docs/google/type/expr.rb b/google-cloud-security-private_ca-v1/proto_docs/google/type/expr.rb index 650a5ad04e68..53e7733b6592 100644 --- a/google-cloud-security-private_ca-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-security-private_ca-v1/proto_docs/google/type/expr.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-security-private_ca-v1/snippets/Gemfile b/google-cloud-security-private_ca-v1/snippets/Gemfile index 6af5f874c548..15d0144fd102 100755 --- a/google-cloud-security-private_ca-v1/snippets/Gemfile +++ b/google-cloud-security-private_ca-v1/snippets/Gemfile @@ -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-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.rb index 27ea9840c0a1..2ca2884e3cdb 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.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-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.rb index 384819262b93..2086f329dd24 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.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-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.rb index 52b486e28570..02ba1cd69a00 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.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-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.rb index 54209f8ac300..837bf4f5e52b 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.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-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.rb index dc03f59646b6..04864381efcf 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.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-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.rb index 60654f03168e..d83ae4819dc9 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.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-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.rb index 176977267545..25db9c72707e 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.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-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.rb index 82589da57fa0..ffd2b9603f86 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.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-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.rb index cddaf22b419b..cf6fffe863ae 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.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-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.rb index b5a657cc2208..66ab672c075a 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.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-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.rb index 5fd1df22da45..939e386615d0 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.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-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb index 0cac31a579a2..f51e0bff99ab 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.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-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.rb index f47b826d9006..c82b3ce69063 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.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-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.rb index 88099e3b9c86..ce87f3b91296 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.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-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.rb index cc7c30747fcc..0fb13b1d62ac 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.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-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.rb index ce0723303017..e840b4be9acc 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.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-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.rb index e4b6f913998e..d084f7fa5d49 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.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-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.rb index 34d180a936d8..0de634246136 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.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-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.rb index be8b5af183fd..c2e06a669891 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.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-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb index 283eaab4e847..32d72bf58c5c 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.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-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.rb index 89324b00db36..269ed16695f8 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.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-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.rb index 293047059bd8..dfdcae76c14f 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.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-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.rb index 022c539b4eff..85e6363d58ac 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.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-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.rb index 9e6a35124abb..0aaba870e26d 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.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-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.rb index 8fac6f6ea98d..ff687e1efbc2 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.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-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.rb index 0ce8e0ab0dcb..82e041db102b 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.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-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.rb index b3f01d87cc8c..4f4aacbc82f0 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.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-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.rb index ae635be304c4..3f573ab17f29 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.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-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.rb b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.rb index e01b563ba29d..037307454cb4 100755 --- a/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.rb +++ b/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.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-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_test.rb b/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_test.rb index f970a89a8bb8..6e457af60f99 100644 --- a/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_test.rb +++ b/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_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-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_test.rb b/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_test.rb index 1519d1eac8b7..b5b52911b307 100644 --- a/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_test.rb +++ b/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_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-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_test.rb b/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_test.rb index faf0e1ce064a..7f1dd7fc1670 100644 --- a/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_test.rb +++ b/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_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-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_test.rb b/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_test.rb index 7b59e4908c3a..30f45ca1fa7c 100644 --- a/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_test.rb +++ b/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_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-security-private_ca-v1/test/helper.rb b/google-cloud-security-private_ca-v1/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-cloud-security-private_ca-v1/test/helper.rb +++ b/google-cloud-security-private_ca-v1/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-security-private_ca-v1beta1/.owlbot-manifest.json b/google-cloud-security-private_ca-v1beta1/.owlbot-manifest.json index 026cf36bbaac..6b989ccfafab 100644 --- a/google-cloud-security-private_ca-v1beta1/.owlbot-manifest.json +++ b/google-cloud-security-private_ca-v1beta1/.owlbot-manifest.json @@ -73,6 +73,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-security-private_ca-v1beta1/.toys.rb b/google-cloud-security-private_ca-v1beta1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-security-private_ca-v1beta1/.toys.rb +++ b/google-cloud-security-private_ca-v1beta1/.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-v1beta1/Rakefile b/google-cloud-security-private_ca-v1beta1/Rakefile index cc8538907e39..26402e7d932d 100644 --- a/google-cloud-security-private_ca-v1beta1/Rakefile +++ b/google-cloud-security-private_ca-v1beta1/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-v1beta1/lib/google-cloud-security-private_ca-v1beta1.rb b/google-cloud-security-private_ca-v1beta1/lib/google-cloud-security-private_ca-v1beta1.rb index 7767dfbfeaa8..472d24065727 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google-cloud-security-private_ca-v1beta1.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google-cloud-security-private_ca-v1beta1.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-v1beta1/lib/google/cloud/security/private_ca/v1beta1.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1.rb index 51c05c5c5b80..d311a3538d33 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1.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-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.rb index 4bf883ee4fda..e8e34962137a 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.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-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.rb index e49e8150af26..732510db8176 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.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-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.rb index 69faa175632f..4790c8bbb309 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.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-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.rb index c1d39ed1efb6..10eabef020dc 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.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-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb index b44f9c1e2dea..ba157f7e9c6d 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.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-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.rb index d11c70fde33a..8e50943b6059 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.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-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.rb index 67a00f1df48f..8338b5e6ab6d 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.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-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.rb index b4c98601c4f4..aa973e7c95cb 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.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-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.rb index 6eefe09468a3..0dd294029796 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.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-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.rb index 48b528940dcf..0edf85a556a2 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.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-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb index 94ce6a87d562..5d3942b0c029 100644 --- a/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb +++ b/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/security/privateca/v1beta1/service.proto for package 'Google.Cloud.Security.PrivateCA.V1beta1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/client.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/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-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.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-v1beta1/proto_docs/google/api/launch_stage.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/launch_stage.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-private_ca-v1beta1/proto_docs/google/api/resource.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/resource.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/resource.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-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.rb index bf9df9d5f04f..195a33eff695 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.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-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.rb index a893f6ea677f..6a9041ea2415 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.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-v1beta1/proto_docs/google/longrunning/operations.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/longrunning/operations.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-v1beta1/proto_docs/google/protobuf/any.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/any.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-v1beta1/proto_docs/google/protobuf/duration.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/duration.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-v1beta1/proto_docs/google/protobuf/empty.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/empty.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-v1beta1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/field_mask.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-v1beta1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.rb index 4f428b97acd5..9a7c0269fa42 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.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-v1beta1/proto_docs/google/rpc/status.rb b/google-cloud-security-private_ca-v1beta1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-security-private_ca-v1beta1/proto_docs/google/rpc/status.rb +++ b/google-cloud-security-private_ca-v1beta1/proto_docs/google/rpc/status.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-v1beta1/snippets/Gemfile b/google-cloud-security-private_ca-v1beta1/snippets/Gemfile index ba622338f7f9..adf37d01f04f 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/Gemfile +++ b/google-cloud-security-private_ca-v1beta1/snippets/Gemfile @@ -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-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.rb index 7c94e6595c03..ab8a12841445 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.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-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.rb index d4977eda88e4..f6c5d439434c 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.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-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.rb index ade05a17d9c2..b2fe7f84db0b 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.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-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.rb index 35322fa019d6..6613651f079c 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.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-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.rb index 524edd51b62c..156ab4130e0f 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.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-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb index d3d87ba1a474..bce7583a24ab 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.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-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.rb index a764555c0cec..962f824a4495 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.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-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.rb index a707f6afefd6..b9a58c2a9ff6 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.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-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.rb index 9af9deeed316..a380979a1c64 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.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-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.rb index f4c3f3725fc7..6a7a96769e22 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.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-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.rb index 2a9b70c79402..fdb7607043c0 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.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-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb index 03c42f8489de..158024198454 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.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-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.rb index 7897c71da029..2b396f505408 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.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-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.rb index 4fc4dd2b05d4..d437b3c44dc1 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.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-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.rb index 3ec6f3af078a..e19de799588b 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.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-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.rb index 294943ab7ab1..08d0bd7161b6 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.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-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.rb index 932693d4517a..2b22da6654c9 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.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-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.rb index 3a3cbd565362..eb82a46e2dc6 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.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-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.rb index 2b8f3e8ec430..62a552d0ae19 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.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-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.rb b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.rb index ca41bb45892f..2755200a457d 100755 --- a/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.rb +++ b/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.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-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_test.rb b/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_test.rb index 55a954001cd4..6654ab235241 100644 --- a/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_test.rb +++ b/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_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-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_test.rb b/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_test.rb index 2ec678b7ea7c..7c0d1c542ef3 100644 --- a/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_test.rb +++ b/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_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-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_test.rb b/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_test.rb index b05e92c07c0b..b0a4a632973e 100644 --- a/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_test.rb +++ b/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_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-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_test.rb b/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_test.rb index 54505463acf5..e36ce9642f13 100644 --- a/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_test.rb +++ b/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_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-v1beta1/test/helper.rb b/google-cloud-security-private_ca-v1beta1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-security-private_ca-v1beta1/test/helper.rb +++ b/google-cloud-security-private_ca-v1beta1/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-v1/.owlbot-manifest.json b/google-cloud-security_center-v1/.owlbot-manifest.json index 0bbeb6d8da13..5e7e13402ce5 100644 --- a/google-cloud-security_center-v1/.owlbot-manifest.json +++ b/google-cloud-security_center-v1/.owlbot-manifest.json @@ -233,6 +233,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-security_center-v1/.toys.rb b/google-cloud-security_center-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-security_center-v1/.toys.rb +++ b/google-cloud-security_center-v1/.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-v1/Rakefile b/google-cloud-security_center-v1/Rakefile index 49f72dfc59a5..11860dec5013 100644 --- a/google-cloud-security_center-v1/Rakefile +++ b/google-cloud-security_center-v1/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-v1/lib/google-cloud-security_center-v1.rb b/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb index ac2e0b15db07..b1f8c90a70d9 100644 --- a/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb +++ b/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.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-v1/lib/google/cloud/security_center/v1.rb b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb index 532f6e025f1a..64e25fbd3ded 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.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-v1/lib/google/cloud/security_center/v1/rest.rb b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb index 800c7a1d6b6a..c11148195761 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.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-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb index f31eff8d07d0..20883d6fbc43 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/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-v1/lib/google/cloud/security_center/v1/security_center/client.rb b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb index eed7bcdb7693..23fb68a1046e 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.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-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb index b59176385c4b..4bb0187caca1 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.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-v1/lib/google/cloud/security_center/v1/security_center/operations.rb b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb index afa02fabbb3e..178841746c30 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.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-v1/lib/google/cloud/security_center/v1/security_center/paths.rb b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb index fc320ca1c4f5..74f6066a7b65 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.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-v1/lib/google/cloud/security_center/v1/security_center/rest.rb b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb index 53c11583399c..9148bffe706d 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.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-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb index 30980123e386..f6a0a8b930bb 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.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-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb index 2325680b93e7..dd74065d2724 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.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-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb index 24022e5b5955..6b84754bb951 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.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-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb b/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb index e0d84302b11d..0d62cc122298 100644 --- a/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb +++ b/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/securitycenter/v1/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center-v1/proto_docs/google/api/client.rb b/google-cloud-security_center-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-security_center-v1/proto_docs/google/api/client.rb +++ b/google-cloud-security_center-v1/proto_docs/google/api/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-security_center-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.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-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.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-v1/proto_docs/google/api/resource.rb b/google-cloud-security_center-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-security_center-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-security_center-v1/proto_docs/google/api/resource.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-v1/proto_docs/google/cloud/securitycenter/v1/access.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb index 75e5950e854e..31e390d3f8a1 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.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-v1/proto_docs/google/cloud/securitycenter/v1/application.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb index 55adec631124..219bf34fde42 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.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-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb index 55fe54f80dfc..d04b5a46cc91 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.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-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb index 4239a4633f0d..51bd94f1fd18 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.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-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb index 534297db9fa9..9a78a90341b5 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.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-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb index ba108bd9ac35..8f4297aa756e 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.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-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb index 2f909f6ef1ce..f558699d1218 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.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-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb index 4b718d05f03e..589ad76bf248 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.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-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb index d35e2d9fdc2e..83d9ad22a479 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.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-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb index 10499a52a8ea..9faad618c6f4 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.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-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb index 62b3b2c7ae90..158ef2e388fe 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.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-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb index e86b3ec5ee15..b44d3c237ea7 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.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-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb index 9e5971d923fc..de91713678d6 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.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-v1/proto_docs/google/cloud/securitycenter/v1/container.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb index 9b28c809b288..acc0a1015fa9 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.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-v1/proto_docs/google/cloud/securitycenter/v1/database.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb index 121dfe0eb244..2294178aef6c 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.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-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb index 6c41b1422779..06a03cf035f5 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.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-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb index 86be42d04e97..83aab7af710b 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.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-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb index 1d035df14947..e5b28d560c27 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.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-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb index 99779eb83b4b..0751dbe51e9a 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.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-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb index 8fdd0bd99954..718388b29179 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.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-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb index 70888de085d0..9a0f33c8a79a 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.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-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb index d767241bf136..7e7468407e6a 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.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-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb index 0c3d564b323b..d4cb1b117d7c 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.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-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb index b2eb82827205..18f745ec7791 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.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-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb index 79b69a6a1fdc..78f19b012cf5 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.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-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb index 54d650787bb4..0444b9de78dc 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.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-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb index 90684317d561..518ba2e5451a 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.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-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb index 4f99cf18d00a..9fc2809838c2 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.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-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb index 48066f0f982a..6286084901a9 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.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-v1/proto_docs/google/cloud/securitycenter/v1/label.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb index e200efd85a09..d3887e4fc185 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.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-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb index 9d8688dcc17c..be5ec1bb5606 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.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-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb index 74ee1cea1e78..6f028cba55b8 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.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-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb index 7ddb03ad0158..6e17500226e7 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.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-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb index 10513fc3d3d7..ef639857ed11 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.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-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb index 4239e7dbe5d7..c1a520b911b6 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.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-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb index 3ab435ca330e..76042f526f38 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.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-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb index 477cecf9f77a..117cc8daf4cc 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.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-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb index 7300b172320d..dd2663301322 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.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-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb index cf12f452b5c6..d75d60b378de 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.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-v1/proto_docs/google/cloud/securitycenter/v1/process.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb index 1db07969d4ef..7c14c9d1baf2 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.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-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb index 47f1d349ca91..5783203927c7 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.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-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb index 05925e935433..f231fe97ed46 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.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-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb index 199fe4316bdf..c00c755d2726 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.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-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb index 8339bac58406..042d8ac3a7b6 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.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-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb index f5786a7d3f44..0b327125cfc6 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.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-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb index 047d6f6eeaf0..0fd162583773 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.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-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb index 5b32fd0e13bb..fb8f89c609e0 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.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-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb index 33e1c17d92e7..6b9045050b73 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.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-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb index e2a106782261..63924f12b411 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.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-v1/proto_docs/google/cloud/securitycenter/v1/source.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb index 1847c9522a14..4ccbdd08fd29 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.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-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb index 4c62a92e7eea..4ad02b3ce5f0 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.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-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb index 52846f26a0a5..1cd95d5b43f1 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.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-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb index 8b537f960bfe..aadd507c0a50 100644 --- a/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb +++ b/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.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-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb index 3999076cd8c2..5445c77f8258 100644 --- a/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.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-v1/proto_docs/google/iam/v1/options.rb b/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb index e8720a105bca..60713d995b86 100644 --- a/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.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-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb index 3e6a8d5d47d9..999575b797df 100644 --- a/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.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-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.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-v1/proto_docs/google/protobuf/any.rb b/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-security_center-v1/proto_docs/google/protobuf/any.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-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.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-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.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-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.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-v1/proto_docs/google/protobuf/struct.rb b/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb index 6fd3d60d108d..39e1aca868d2 100644 --- a/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.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-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb b/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-security_center-v1/proto_docs/google/rpc/status.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-v1/proto_docs/google/type/expr.rb b/google-cloud-security_center-v1/proto_docs/google/type/expr.rb index 066f228c22f0..53e7733b6592 100644 --- a/google-cloud-security_center-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-security_center-v1/proto_docs/google/type/expr.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-v1/snippets/Gemfile b/google-cloud-security_center-v1/snippets/Gemfile index 3ed5b027a461..f16288a177ba 100755 --- a/google-cloud-security_center-v1/snippets/Gemfile +++ b/google-cloud-security_center-v1/snippets/Gemfile @@ -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-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb b/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb index 0b622480b563..62423aec31af 100644 --- a/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb +++ b/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.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-v1/snippets/security_center/bulk_mute_findings.rb b/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb index 57fa7e10422c..93db8d1e0876 100644 --- a/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb +++ b/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.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-security_center-v1/snippets/security_center/create_big_query_export.rb b/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb index e68d6ced833c..be92178bf7b4 100644 --- a/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb +++ b/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.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-v1/snippets/security_center/create_event_threat_detection_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb index 67e39296a53e..08036d256638 100644 --- a/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.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-v1/snippets/security_center/create_finding.rb b/google-cloud-security_center-v1/snippets/security_center/create_finding.rb index 1dfb6cc4b172..0b195fb59e80 100755 --- a/google-cloud-security_center-v1/snippets/security_center/create_finding.rb +++ b/google-cloud-security_center-v1/snippets/security_center/create_finding.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-security_center-v1/snippets/security_center/create_mute_config.rb b/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb index 46ab00eca4fe..7c91c84d013c 100644 --- a/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb +++ b/google-cloud-security_center-v1/snippets/security_center/create_mute_config.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-security_center-v1/snippets/security_center/create_notification_config.rb b/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb index 71ea6b6f04c7..9d25cf280532 100755 --- a/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb +++ b/google-cloud-security_center-v1/snippets/security_center/create_notification_config.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-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb index 313ec3d9dc51..5de06ad0e47b 100644 --- a/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.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-security_center-v1/snippets/security_center/create_source.rb b/google-cloud-security_center-v1/snippets/security_center/create_source.rb index 3cf8ce6a36d3..426ebeba8ec5 100755 --- a/google-cloud-security_center-v1/snippets/security_center/create_source.rb +++ b/google-cloud-security_center-v1/snippets/security_center/create_source.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-security_center-v1/snippets/security_center/delete_big_query_export.rb b/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb index 2daae395d8c6..e549c6d67597 100644 --- a/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb +++ b/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.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-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb index f907ffc90786..9da872ba42f6 100644 --- a/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.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-v1/snippets/security_center/delete_mute_config.rb b/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb index c39ffbf5db38..ea8a60533934 100644 --- a/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb +++ b/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.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-security_center-v1/snippets/security_center/delete_notification_config.rb b/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb index e4d733907c06..6bc88e7ff81e 100755 --- a/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb +++ b/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.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-security_center-v1/snippets/security_center/delete_resource_value_config.rb b/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb index a8324ba71be0..a39d9a23c8fd 100644 --- a/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb +++ b/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.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-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb index 3b3ad0d8d0a0..946a821c16e2 100644 --- a/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.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-security_center-v1/snippets/security_center/get_big_query_export.rb b/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb index 63e32e9fe569..1c58bd5b0d78 100644 --- a/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.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-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb index 63adb84740d7..be112113b672 100644 --- a/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.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-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb index eca5ed900f10..7db2ddb3ecfc 100644 --- a/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.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-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb index 2105fe3f2817..ec5742081391 100644 --- a/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.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-v1/snippets/security_center/get_iam_policy.rb b/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb index 30735262e0f0..2b9a6db77e1e 100755 --- a/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.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-security_center-v1/snippets/security_center/get_mute_config.rb b/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb index 6069e3fc7e4f..48df3fdf3201 100644 --- a/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_mute_config.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-security_center-v1/snippets/security_center/get_notification_config.rb b/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb index 3449b8d2f4dc..6b5a3b4c0d68 100755 --- a/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_notification_config.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-security_center-v1/snippets/security_center/get_organization_settings.rb b/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb index 9d8d2587600f..b4b9f24ba65c 100755 --- a/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.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-security_center-v1/snippets/security_center/get_resource_value_config.rb b/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb index 26c6d4c32ffa..d40c67a9eba0 100644 --- a/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.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-v1/snippets/security_center/get_security_health_analytics_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb index 1c6091ceea8d..a4f9f8ef3f19 100644 --- a/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.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-security_center-v1/snippets/security_center/get_simulation.rb b/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb index 75e16b96782d..c0a1d22fa00d 100644 --- a/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_simulation.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-v1/snippets/security_center/get_source.rb b/google-cloud-security_center-v1/snippets/security_center/get_source.rb index da5c03b606ad..bd7c16821102 100755 --- a/google-cloud-security_center-v1/snippets/security_center/get_source.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_source.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-security_center-v1/snippets/security_center/get_valued_resource.rb b/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb index f7697b69f435..8c1d07bdc6de 100644 --- a/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb +++ b/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.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-v1/snippets/security_center/group_assets.rb b/google-cloud-security_center-v1/snippets/security_center/group_assets.rb index b88b7cf50778..ae956d56813e 100755 --- a/google-cloud-security_center-v1/snippets/security_center/group_assets.rb +++ b/google-cloud-security_center-v1/snippets/security_center/group_assets.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-security_center-v1/snippets/security_center/group_findings.rb b/google-cloud-security_center-v1/snippets/security_center/group_findings.rb index 15e3e18e77b2..c4786c15f09b 100755 --- a/google-cloud-security_center-v1/snippets/security_center/group_findings.rb +++ b/google-cloud-security_center-v1/snippets/security_center/group_findings.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-security_center-v1/snippets/security_center/list_assets.rb b/google-cloud-security_center-v1/snippets/security_center/list_assets.rb index 4e8c167f3069..ceeaebf8d86d 100755 --- a/google-cloud-security_center-v1/snippets/security_center/list_assets.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_assets.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-security_center-v1/snippets/security_center/list_attack_paths.rb b/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb index 5aff0baa6eea..5862a15cff4a 100644 --- a/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.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-v1/snippets/security_center/list_big_query_exports.rb b/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb index f3b1d65ff736..3746c178ec2f 100644 --- a/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.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-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb b/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb index c95e3f2cf0ab..5dacc91c28be 100644 --- a/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.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-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb b/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb index 0784b17c66c7..5f821c75b303 100644 --- a/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.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-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb b/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb index 7f799023856d..39414a8834dd 100644 --- a/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.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-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb b/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb index 8ead0a3d59ff..964e57448ce6 100644 --- a/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.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-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb b/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb index 91b800b37673..41b6dd7a76c0 100644 --- a/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.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-v1/snippets/security_center/list_findings.rb b/google-cloud-security_center-v1/snippets/security_center/list_findings.rb index 501b2efd1f96..57fb4cae4392 100755 --- a/google-cloud-security_center-v1/snippets/security_center/list_findings.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_findings.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-security_center-v1/snippets/security_center/list_mute_configs.rb b/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb index 7078363389bf..eb1fdb03d97d 100644 --- a/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.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-security_center-v1/snippets/security_center/list_notification_configs.rb b/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb index c0e413dba190..b7b5eee3314f 100755 --- a/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.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-security_center-v1/snippets/security_center/list_resource_value_configs.rb b/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb index c18b5196322c..251454a75ea0 100644 --- a/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.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-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb b/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb index 755ff9292935..1c67c25b10d3 100644 --- a/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.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-security_center-v1/snippets/security_center/list_sources.rb b/google-cloud-security_center-v1/snippets/security_center/list_sources.rb index c820a03459c2..c97a5da2a253 100755 --- a/google-cloud-security_center-v1/snippets/security_center/list_sources.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_sources.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-security_center-v1/snippets/security_center/list_valued_resources.rb b/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb index 3b0aa99c0dbe..2dfc8bf0281c 100644 --- a/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb +++ b/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.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-v1/snippets/security_center/run_asset_discovery.rb b/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb index e73233b4a150..b4992daa0dfc 100755 --- a/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb +++ b/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.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-security_center-v1/snippets/security_center/set_finding_state.rb b/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb index f7adc9a03c7c..46ec0d32e12b 100755 --- a/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb +++ b/google-cloud-security_center-v1/snippets/security_center/set_finding_state.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-security_center-v1/snippets/security_center/set_iam_policy.rb b/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb index a84e7daba7fc..61c6f0c2658c 100755 --- a/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb +++ b/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.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-security_center-v1/snippets/security_center/set_mute.rb b/google-cloud-security_center-v1/snippets/security_center/set_mute.rb index 55fad0df484b..0d8d48794099 100644 --- a/google-cloud-security_center-v1/snippets/security_center/set_mute.rb +++ b/google-cloud-security_center-v1/snippets/security_center/set_mute.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-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb index 3877e99f1d48..6573cca21b08 100644 --- a/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.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-security_center-v1/snippets/security_center/test_iam_permissions.rb b/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb index 34546e01dd03..2beb6f525829 100755 --- a/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb +++ b/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.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-security_center-v1/snippets/security_center/update_big_query_export.rb b/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb index 902dd1bb7f37..64a07908fd64 100644 --- a/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb +++ b/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.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-v1/snippets/security_center/update_event_threat_detection_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb index d5aa6194db93..20ba7f0b690c 100644 --- a/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.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-v1/snippets/security_center/update_external_system.rb b/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb index 587744448715..4ec047a6fb39 100644 --- a/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb +++ b/google-cloud-security_center-v1/snippets/security_center/update_external_system.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-security_center-v1/snippets/security_center/update_finding.rb b/google-cloud-security_center-v1/snippets/security_center/update_finding.rb index 472515c7f035..39355b256e0d 100755 --- a/google-cloud-security_center-v1/snippets/security_center/update_finding.rb +++ b/google-cloud-security_center-v1/snippets/security_center/update_finding.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-security_center-v1/snippets/security_center/update_mute_config.rb b/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb index 7aee206bcd3f..aa233b884d74 100644 --- a/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb +++ b/google-cloud-security_center-v1/snippets/security_center/update_mute_config.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-security_center-v1/snippets/security_center/update_notification_config.rb b/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb index 4b4b51a5367b..f976002b3515 100755 --- a/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb +++ b/google-cloud-security_center-v1/snippets/security_center/update_notification_config.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-security_center-v1/snippets/security_center/update_organization_settings.rb b/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb index 238b0bf0bf67..a4f402013e90 100755 --- a/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb +++ b/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.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-security_center-v1/snippets/security_center/update_resource_value_config.rb b/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb index 66735b8876db..40a21d5efc16 100644 --- a/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb +++ b/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.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-v1/snippets/security_center/update_security_health_analytics_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb index a10b90a57a86..8e83edf227ea 100644 --- a/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.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-security_center-v1/snippets/security_center/update_security_marks.rb b/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb index 7d465de90ea5..04da82c1a94b 100755 --- a/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb +++ b/google-cloud-security_center-v1/snippets/security_center/update_security_marks.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-security_center-v1/snippets/security_center/update_source.rb b/google-cloud-security_center-v1/snippets/security_center/update_source.rb index 85d8f94c0f4f..6f0ba52cd6f1 100755 --- a/google-cloud-security_center-v1/snippets/security_center/update_source.rb +++ b/google-cloud-security_center-v1/snippets/security_center/update_source.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-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb b/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb index cef2ff748597..31919bb29465 100644 --- a/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.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-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb b/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb index d1d484fbba85..650ae5647c63 100644 --- a/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb +++ b/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_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-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb b/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb index a692053092ce..25ac2a34d4cc 100644 --- a/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb +++ b/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_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-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb b/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb index c8052abeab4c..d85963f8c45d 100644 --- a/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb +++ b/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_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-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb b/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb index e2cce73c2d48..f949190ff600 100644 --- a/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb +++ b/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_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-v1/test/helper.rb b/google-cloud-security_center-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-security_center-v1/test/helper.rb +++ b/google-cloud-security_center-v1/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-v1p1beta1/.owlbot-manifest.json b/google-cloud-security_center-v1p1beta1/.owlbot-manifest.json index bd1fe7d69b4d..74cbc1834200 100644 --- a/google-cloud-security_center-v1p1beta1/.owlbot-manifest.json +++ b/google-cloud-security_center-v1p1beta1/.owlbot-manifest.json @@ -98,6 +98,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-security_center-v1p1beta1/.toys.rb b/google-cloud-security_center-v1p1beta1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-security_center-v1p1beta1/.toys.rb +++ b/google-cloud-security_center-v1p1beta1/.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-v1p1beta1/Rakefile b/google-cloud-security_center-v1p1beta1/Rakefile index cda7c21938ba..4edac3b83170 100644 --- a/google-cloud-security_center-v1p1beta1/Rakefile +++ b/google-cloud-security_center-v1p1beta1/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-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.rb b/google-cloud-security_center-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.rb index a54f0b509b5d..1e7ec4c542f6 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.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-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.rb index bd98c1c31e33..60f6b23b8bbb 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.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-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.rb index 2ff60ed38993..33c18366ecf2 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.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-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center.rb index 8d155e66e87a..77d09feb2118 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/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-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb index 5b0eabfd09b4..3a6e0cf3a6fb 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.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-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.rb index 37b2904e99c7..cff88a0ffb4f 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.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-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb index cc24ca9af8da..3e582dfdb7f9 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.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-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.rb index e075a883d993..7551d4c8776c 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.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-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.rb index acbbc9117f20..942518e93e2c 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.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-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.rb index 9c4dd751e829..4856205779aa 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.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-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.rb index 925235cfe5eb..6de3f7437ac2 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.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-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.rb index d167dff17cb6..8b4fcab1731e 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.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-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb b/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb index dea9c7577bce..76c57914966b 100644 --- a/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb +++ b/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V1p1beta1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center-v1p1beta1/proto_docs/google/api/client.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/api/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-security_center-v1p1beta1/proto_docs/google/api/field_behavior.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/api/field_behavior.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-v1p1beta1/proto_docs/google/api/launch_stage.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/api/launch_stage.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-v1p1beta1/proto_docs/google/api/resource.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/api/resource.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/api/resource.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-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.rb index d6adc3e64121..84c95aa10132 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.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-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.rb index 4a1f4960c6cf..9308757027de 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.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-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.rb index 505ed2c5e840..f816affff89c 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.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-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.rb index c49130819316..5062c0b8e520 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.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-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.rb index df267c9df61e..6948b659b221 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.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-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.rb index 8256e82beded..c69cb73d05e1 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.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-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.rb index 7853090ec25b..0fe81011a51b 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.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-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.rb index b5301a335eef..ed38b84c1d65 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.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-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.rb index 691e03ac59c5..db78ba561912 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.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-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb index ca327fab4a4f..a2252480add8 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.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-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.rb index 42cf7e3be3d9..72b49b0fe90a 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.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-v1p1beta1/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/iam_policy.rb index 3999076cd8c2..5445c77f8258 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/iam_policy.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-v1p1beta1/proto_docs/google/iam/v1/options.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/options.rb index e8720a105bca..60713d995b86 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/options.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-v1p1beta1/proto_docs/google/iam/v1/policy.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/policy.rb index 3e6a8d5d47d9..999575b797df 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/policy.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-v1p1beta1/proto_docs/google/longrunning/operations.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/longrunning/operations.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-v1p1beta1/proto_docs/google/protobuf/any.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/any.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-v1p1beta1/proto_docs/google/protobuf/duration.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/duration.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-v1p1beta1/proto_docs/google/protobuf/empty.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/empty.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-v1p1beta1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/field_mask.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-v1p1beta1/proto_docs/google/protobuf/struct.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/struct.rb index 6fd3d60d108d..39e1aca868d2 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/struct.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-v1p1beta1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.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-v1p1beta1/proto_docs/google/type/expr.rb b/google-cloud-security_center-v1p1beta1/proto_docs/google/type/expr.rb index 066f228c22f0..53e7733b6592 100644 --- a/google-cloud-security_center-v1p1beta1/proto_docs/google/type/expr.rb +++ b/google-cloud-security_center-v1p1beta1/proto_docs/google/type/expr.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-v1p1beta1/snippets/Gemfile b/google-cloud-security_center-v1p1beta1/snippets/Gemfile index efc9baa41fab..a24351ce9260 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/Gemfile +++ b/google-cloud-security_center-v1p1beta1/snippets/Gemfile @@ -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-security_center-v1p1beta1/snippets/security_center/create_finding.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/create_finding.rb index cb214b91be4a..c000d93ed341 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/create_finding.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/create_finding.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-security_center-v1p1beta1/snippets/security_center/create_notification_config.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/create_notification_config.rb index 096bc139c2de..acdc0989906e 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/create_notification_config.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/create_notification_config.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-security_center-v1p1beta1/snippets/security_center/create_source.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/create_source.rb index 21fe8075e110..9bcf68679623 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/create_source.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/create_source.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-security_center-v1p1beta1/snippets/security_center/delete_notification_config.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/delete_notification_config.rb index 24c61c3640d0..442fcdf71d1b 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/delete_notification_config.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/delete_notification_config.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-security_center-v1p1beta1/snippets/security_center/get_iam_policy.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/get_iam_policy.rb index 309e9d306145..88f1888b1521 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/get_iam_policy.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/get_iam_policy.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-security_center-v1p1beta1/snippets/security_center/get_notification_config.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/get_notification_config.rb index 4a24c692b0b9..feaf9ce7665a 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/get_notification_config.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/get_notification_config.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-security_center-v1p1beta1/snippets/security_center/get_organization_settings.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/get_organization_settings.rb index a3f0a0eee74f..7bed3a6a574a 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/get_organization_settings.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/get_organization_settings.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-security_center-v1p1beta1/snippets/security_center/get_source.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/get_source.rb index abd037aaff87..9616dc30e5e4 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/get_source.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/get_source.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-security_center-v1p1beta1/snippets/security_center/group_assets.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/group_assets.rb index 8cada9dcb21a..fba016390793 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/group_assets.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/group_assets.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-security_center-v1p1beta1/snippets/security_center/group_findings.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/group_findings.rb index 24921d71ccd8..6357692d3a5b 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/group_findings.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/group_findings.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-security_center-v1p1beta1/snippets/security_center/list_assets.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/list_assets.rb index 43b285541fdc..9b4cfc34f62b 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/list_assets.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/list_assets.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-security_center-v1p1beta1/snippets/security_center/list_findings.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/list_findings.rb index ed34c511a2ce..9c8bc97942e4 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/list_findings.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/list_findings.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-security_center-v1p1beta1/snippets/security_center/list_notification_configs.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/list_notification_configs.rb index cd36c3da4934..ea961a24d957 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/list_notification_configs.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/list_notification_configs.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-security_center-v1p1beta1/snippets/security_center/list_sources.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/list_sources.rb index 96172ce62ac9..d87dee47b0ed 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/list_sources.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/list_sources.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-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.rb index 6966c70db245..2065af062b64 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.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-security_center-v1p1beta1/snippets/security_center/set_finding_state.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/set_finding_state.rb index 5634103a757f..915284737f2e 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/set_finding_state.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/set_finding_state.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-security_center-v1p1beta1/snippets/security_center/set_iam_policy.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/set_iam_policy.rb index aaba2345a902..984368e397b1 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/set_iam_policy.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/set_iam_policy.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-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.rb index 845d4908f67a..279ca1f58995 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.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-security_center-v1p1beta1/snippets/security_center/update_finding.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/update_finding.rb index e7a9061a1a7c..7a803d222ecc 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/update_finding.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/update_finding.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-security_center-v1p1beta1/snippets/security_center/update_notification_config.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/update_notification_config.rb index 5418bb47e537..6b814475d958 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/update_notification_config.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/update_notification_config.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-security_center-v1p1beta1/snippets/security_center/update_organization_settings.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/update_organization_settings.rb index c852cb0f9b21..e16bd81a9532 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/update_organization_settings.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/update_organization_settings.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-security_center-v1p1beta1/snippets/security_center/update_security_marks.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/update_security_marks.rb index 3e7db1f47fed..1eb75d7733ee 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/update_security_marks.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/update_security_marks.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-security_center-v1p1beta1/snippets/security_center/update_source.rb b/google-cloud-security_center-v1p1beta1/snippets/security_center/update_source.rb index 08b98bbbdc15..7bc0b249e94c 100755 --- a/google-cloud-security_center-v1p1beta1/snippets/security_center/update_source.rb +++ b/google-cloud-security_center-v1p1beta1/snippets/security_center/update_source.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-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_test.rb b/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_test.rb index a8063b3eac66..9a2eeefc4022 100644 --- a/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_test.rb +++ b/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_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-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_test.rb b/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_test.rb index 2e82060d4273..346d4e4ee6d3 100644 --- a/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_test.rb +++ b/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_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-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_test.rb b/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_test.rb index 5ef386c43bfd..b12585f440f8 100644 --- a/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_test.rb +++ b/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_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-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_test.rb b/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_test.rb index 35053166f8c1..6ea47e6b8453 100644 --- a/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_test.rb +++ b/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_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-v1p1beta1/test/helper.rb b/google-cloud-security_center-v1p1beta1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-security_center-v1p1beta1/test/helper.rb +++ b/google-cloud-security_center-v1p1beta1/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-v2/.owlbot-manifest.json b/google-cloud-security_center-v2/.owlbot-manifest.json index 15840199575b..3d4ffb9278ce 100644 --- a/google-cloud-security_center-v2/.owlbot-manifest.json +++ b/google-cloud-security_center-v2/.owlbot-manifest.json @@ -210,6 +210,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-security_center-v2/.toys.rb b/google-cloud-security_center-v2/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-security_center-v2/.toys.rb +++ b/google-cloud-security_center-v2/.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-v2/Rakefile b/google-cloud-security_center-v2/Rakefile index df538e6bc7bf..3f3dda612226 100644 --- a/google-cloud-security_center-v2/Rakefile +++ b/google-cloud-security_center-v2/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-v2/lib/google-cloud-security_center-v2.rb b/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb index 6d845538fe30..fbfebf50a08d 100644 --- a/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb +++ b/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.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-v2/lib/google/cloud/security_center/v2.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb index d0c009e1def8..cb448baa8c34 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.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-v2/lib/google/cloud/security_center/v2/rest.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb index 717c3d7ae133..25ca637b14ef 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.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-v2/lib/google/cloud/security_center/v2/security_center.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb index 17da8098b687..b2e61e4933b2 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.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-v2/lib/google/cloud/security_center/v2/security_center/client.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb index 710500f25b3a..e1de0b6ba7ae 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.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-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb index 35b211353604..a53a263683eb 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.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-v2/lib/google/cloud/security_center/v2/security_center/operations.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb index aaca3eb7c653..2b55ca838dc8 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.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-v2/lib/google/cloud/security_center/v2/security_center/paths.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb index c24319ac179a..680b1675791d 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.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-v2/lib/google/cloud/security_center/v2/security_center/rest.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb index 635ffc32e7df..f11c34c53b84 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.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-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb index 661b12c86012..6109ce4de572 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.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-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb index 06e5c0fad473..76b36a0a23ac 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.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-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb index 3df9e1912a18..49be184914d1 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.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-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb index 1636e7348965..36c3f5bae249 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/securitycenter/v2/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V2' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center-v2/proto_docs/google/api/client.rb b/google-cloud-security_center-v2/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-cloud-security_center-v2/proto_docs/google/api/client.rb +++ b/google-cloud-security_center-v2/proto_docs/google/api/client.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-v2/proto_docs/google/api/field_behavior.rb b/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.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-v2/proto_docs/google/api/launch_stage.rb b/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.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-v2/proto_docs/google/api/resource.rb b/google-cloud-security_center-v2/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-cloud-security_center-v2/proto_docs/google/api/resource.rb +++ b/google-cloud-security_center-v2/proto_docs/google/api/resource.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-v2/proto_docs/google/api/routing.rb b/google-cloud-security_center-v2/proto_docs/google/api/routing.rb index 497560392276..6d71a9430253 100644 --- a/google-cloud-security_center-v2/proto_docs/google/api/routing.rb +++ b/google-cloud-security_center-v2/proto_docs/google/api/routing.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-v2/proto_docs/google/cloud/securitycenter/v2/access.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb index 77e2c3bfc137..4b452fd07cb2 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.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-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb index 6beceac83a6a..22a4e9fe9934 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.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-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb index d0f01679f0b5..fe0106b68b6d 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.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-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb index 049031c142cf..4c1fa3fef09b 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.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-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb index d64fe58c3fee..d3543aea2fa0 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.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-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb index feb45d409918..395034b6cbf5 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.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-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb index 2951527cc01d..b49d6ad06453 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.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-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb index e6bae75b31d2..09155c2a96e1 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.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-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb index 7742dde50d4e..4ac87a98cfbd 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.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-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb index 7d45bff89d45..de5568f900ac 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.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-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb index 8f86d65e9702..346e66b5e35d 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.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-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb index e1ccbf5ed81b..123bea548585 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.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-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb index 3466e2cc9df8..01a4fe458c2d 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.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-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb index 17bc60054dbe..6e6ae87bd5c1 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.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-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb index ee9a47e8994c..70a23d045d97 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.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-v2/proto_docs/google/cloud/securitycenter/v2/container.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb index 2b560a02d423..5fd4972d8657 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.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-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb index d812c4f0615b..35c543064430 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.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-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb index e2d229ea9228..ae25f8a2cff3 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.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-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb index ce1a45fd351a..978743068cc9 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.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-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb index e3490cc626f3..39782b12e5ae 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.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-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb index 47eace959645..0f63d09304ea 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.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-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb index 4e1d6b6f1de0..e982b02dfc10 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.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-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb index 3196b12988d8..d13da6e40e27 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.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-v2/proto_docs/google/cloud/securitycenter/v2/file.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb index 95e09df36778..fcea377226df 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.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-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb index 809bb2a2dace..80e00cbf53ed 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.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-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb index ececf3c326f2..a56cbebc0318 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.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-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb index e71cf434fd8d..4b2f90a8e17c 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.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-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb index 9dd298b271d8..879809624b27 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.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-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb index da07345d9239..85acfa00a4c5 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.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-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb index 1ce736b29e64..ce71b3883188 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.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-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb index d8f214f491a2..e8f38e48dc1b 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.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-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb index 4e50420a512c..0e324f832355 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.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-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb index dc6ef971baa9..444ecd5eec70 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.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-v2/proto_docs/google/cloud/securitycenter/v2/label.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb index e74161426eff..609c1859cbe1 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.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-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb index 577130027aff..a9d466c92655 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.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-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb index e7a33333bfb4..f3ea1bf4b29d 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.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-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb index ab02cb3782b0..a1f6f5b169c8 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.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-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb index b90ef70ccec6..db9977d397e7 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.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-v2/proto_docs/google/cloud/securitycenter/v2/network.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb index e35be06d43a5..7fb133f55dc2 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.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-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb index a46efdf70fc9..0d1e37a099ef 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.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-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb index f9f97acf94f0..b5de722177ff 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.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-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb index 39c884141875..bd3046afd7de 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.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-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb index dde620b0fcaf..b90cb7b8d034 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.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-v2/proto_docs/google/cloud/securitycenter/v2/process.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb index 4ccd1e9010c3..e127710a40a5 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.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-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb index ee0f501893b7..aaa75073c739 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.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-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb index 5d3bc4ebeb22..450e83f704b5 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.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-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb index 42238f453ae0..1e3bcc93a58a 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.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-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb index 57de8fa52c5a..3c2c9899fac1 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.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-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb index d0865f88d3a3..5aa1b2607e39 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.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-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb index 292725587ef5..05bb5af8f001 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.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-v2/proto_docs/google/cloud/securitycenter/v2/source.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb index 4cdfcbc838c4..27dd5626b0cf 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.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-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb index 334960e9d661..dff76d98c704 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.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-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb index 69a720696cb1..e97a21960308 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.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-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb index ade8ec246fd1..f11b0348de0a 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.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-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb index ddba25ddc8b5..41c3a3589f1d 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.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-v2/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb index 3729ce6dfaa5..5445c77f8258 100644 --- a/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.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-v2/proto_docs/google/iam/v1/options.rb b/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb index d762967fa7ec..60713d995b86 100644 --- a/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.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-v2/proto_docs/google/iam/v1/policy.rb b/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb index 38e7116f6688..999575b797df 100644 --- a/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.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-v2/proto_docs/google/longrunning/operations.rb b/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb index f6e867136403..7a757f512165 100644 --- a/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.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-v2/proto_docs/google/protobuf/any.rb b/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb index fb4d6862eac9..58691995f02e 100644 --- a/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb +++ b/google-cloud-security_center-v2/proto_docs/google/protobuf/any.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-v2/proto_docs/google/protobuf/duration.rb b/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.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-v2/proto_docs/google/protobuf/empty.rb b/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.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-v2/proto_docs/google/protobuf/field_mask.rb b/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.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-v2/proto_docs/google/protobuf/struct.rb b/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb index b6803313eb41..39e1aca868d2 100644 --- a/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.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-v2/proto_docs/google/protobuf/timestamp.rb b/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb b/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb index 09acc69b6125..c1a1c07eb2db 100644 --- a/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb +++ b/google-cloud-security_center-v2/proto_docs/google/rpc/status.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-v2/proto_docs/google/type/expr.rb b/google-cloud-security_center-v2/proto_docs/google/type/expr.rb index 41c8c3a565cc..53e7733b6592 100644 --- a/google-cloud-security_center-v2/proto_docs/google/type/expr.rb +++ b/google-cloud-security_center-v2/proto_docs/google/type/expr.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-v2/snippets/Gemfile b/google-cloud-security_center-v2/snippets/Gemfile index ae8472d14687..99432c66bb92 100644 --- a/google-cloud-security_center-v2/snippets/Gemfile +++ b/google-cloud-security_center-v2/snippets/Gemfile @@ -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-v2/snippets/security_center/batch_create_resource_value_configs.rb b/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb index e18b0f701d1b..35868ebf184f 100644 --- a/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb +++ b/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.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-v2/snippets/security_center/bulk_mute_findings.rb b/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb index 0a25b6952eaf..937f173f1687 100644 --- a/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb +++ b/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.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-v2/snippets/security_center/create_big_query_export.rb b/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb index a4b2192f8ac0..34909f562782 100644 --- a/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb +++ b/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.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-v2/snippets/security_center/create_finding.rb b/google-cloud-security_center-v2/snippets/security_center/create_finding.rb index 140e69731fe7..b2dbeb349717 100644 --- a/google-cloud-security_center-v2/snippets/security_center/create_finding.rb +++ b/google-cloud-security_center-v2/snippets/security_center/create_finding.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-v2/snippets/security_center/create_mute_config.rb b/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb index d410f3fe9ba4..5ac853e23ca6 100644 --- a/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb +++ b/google-cloud-security_center-v2/snippets/security_center/create_mute_config.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-v2/snippets/security_center/create_notification_config.rb b/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb index a0285ee479ef..8d63ccdb2cc6 100644 --- a/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb +++ b/google-cloud-security_center-v2/snippets/security_center/create_notification_config.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-v2/snippets/security_center/create_source.rb b/google-cloud-security_center-v2/snippets/security_center/create_source.rb index 7686460da2e2..042a0de0ff05 100644 --- a/google-cloud-security_center-v2/snippets/security_center/create_source.rb +++ b/google-cloud-security_center-v2/snippets/security_center/create_source.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-v2/snippets/security_center/delete_big_query_export.rb b/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb index 68f06278fd16..c5b9ec740f3f 100644 --- a/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb +++ b/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.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-v2/snippets/security_center/delete_mute_config.rb b/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb index 364d889f4c87..f6d9fe6232b5 100644 --- a/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb +++ b/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.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-v2/snippets/security_center/delete_notification_config.rb b/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb index 82c6a65558d2..e7084636df2d 100644 --- a/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb +++ b/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.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-v2/snippets/security_center/delete_resource_value_config.rb b/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb index 18e9accf9c06..f369d1ca9754 100644 --- a/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb +++ b/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.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-v2/snippets/security_center/get_big_query_export.rb b/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb index c01f5cf35268..167844fa3f97 100644 --- a/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb +++ b/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.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-v2/snippets/security_center/get_iam_policy.rb b/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb index c04fba3610ff..e260df274f67 100644 --- a/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb +++ b/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.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-v2/snippets/security_center/get_mute_config.rb b/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb index de63b6f82934..737f0b9b778a 100644 --- a/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb +++ b/google-cloud-security_center-v2/snippets/security_center/get_mute_config.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-v2/snippets/security_center/get_notification_config.rb b/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb index ee8c9e35e24c..a6e6fe0bf43d 100644 --- a/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb +++ b/google-cloud-security_center-v2/snippets/security_center/get_notification_config.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-v2/snippets/security_center/get_resource_value_config.rb b/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb index 959d905eb799..dca8397631b9 100644 --- a/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb +++ b/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.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-v2/snippets/security_center/get_simulation.rb b/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb index a5222726156b..97887b9c87b5 100644 --- a/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb +++ b/google-cloud-security_center-v2/snippets/security_center/get_simulation.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-v2/snippets/security_center/get_source.rb b/google-cloud-security_center-v2/snippets/security_center/get_source.rb index 9c1bd80d2f43..9e23b772526e 100644 --- a/google-cloud-security_center-v2/snippets/security_center/get_source.rb +++ b/google-cloud-security_center-v2/snippets/security_center/get_source.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-v2/snippets/security_center/get_valued_resource.rb b/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb index 399f03005790..1d27e0e2a2bd 100644 --- a/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb +++ b/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.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-v2/snippets/security_center/group_findings.rb b/google-cloud-security_center-v2/snippets/security_center/group_findings.rb index 5cfac915038b..1c83d2e734fb 100644 --- a/google-cloud-security_center-v2/snippets/security_center/group_findings.rb +++ b/google-cloud-security_center-v2/snippets/security_center/group_findings.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-v2/snippets/security_center/list_attack_paths.rb b/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb index 81311c3430a2..efd9cc9a111e 100644 --- a/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb +++ b/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.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-v2/snippets/security_center/list_big_query_exports.rb b/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb index ee4337e69cc0..b499ded4d8b6 100644 --- a/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb +++ b/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.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-v2/snippets/security_center/list_findings.rb b/google-cloud-security_center-v2/snippets/security_center/list_findings.rb index 912030002b18..f8f726312d73 100644 --- a/google-cloud-security_center-v2/snippets/security_center/list_findings.rb +++ b/google-cloud-security_center-v2/snippets/security_center/list_findings.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-v2/snippets/security_center/list_mute_configs.rb b/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb index a2964e361d46..aa028407968b 100644 --- a/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb +++ b/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.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-v2/snippets/security_center/list_notification_configs.rb b/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb index 6a15d038e61e..421f44da22ce 100644 --- a/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb +++ b/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.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-v2/snippets/security_center/list_resource_value_configs.rb b/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb index e9cb393adb04..ebd23f97037d 100644 --- a/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb +++ b/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.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-v2/snippets/security_center/list_sources.rb b/google-cloud-security_center-v2/snippets/security_center/list_sources.rb index 5b4fc0c0c577..0d014e61ce97 100644 --- a/google-cloud-security_center-v2/snippets/security_center/list_sources.rb +++ b/google-cloud-security_center-v2/snippets/security_center/list_sources.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-v2/snippets/security_center/list_valued_resources.rb b/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb index 1b2f536ab028..ff34383c5836 100644 --- a/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb +++ b/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.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-v2/snippets/security_center/set_finding_state.rb b/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb index af50ab0f262b..948f27b578d9 100644 --- a/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb +++ b/google-cloud-security_center-v2/snippets/security_center/set_finding_state.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-v2/snippets/security_center/set_iam_policy.rb b/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb index 7421354d8815..357443d72dfc 100644 --- a/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb +++ b/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.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-v2/snippets/security_center/set_mute.rb b/google-cloud-security_center-v2/snippets/security_center/set_mute.rb index e7385126419f..7928a7e3a85b 100644 --- a/google-cloud-security_center-v2/snippets/security_center/set_mute.rb +++ b/google-cloud-security_center-v2/snippets/security_center/set_mute.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-v2/snippets/security_center/test_iam_permissions.rb b/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb index 60025a626f98..7a22e129a409 100644 --- a/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb +++ b/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.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-v2/snippets/security_center/update_big_query_export.rb b/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb index 2803d0b22547..c3357e841268 100644 --- a/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb +++ b/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.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-v2/snippets/security_center/update_external_system.rb b/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb index 11675a311f28..58bb7f1196d7 100644 --- a/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb +++ b/google-cloud-security_center-v2/snippets/security_center/update_external_system.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-v2/snippets/security_center/update_finding.rb b/google-cloud-security_center-v2/snippets/security_center/update_finding.rb index e7f08c1f27ca..3d8d7bc0e599 100644 --- a/google-cloud-security_center-v2/snippets/security_center/update_finding.rb +++ b/google-cloud-security_center-v2/snippets/security_center/update_finding.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-v2/snippets/security_center/update_mute_config.rb b/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb index 404ffd0709c6..efa2c28e01be 100644 --- a/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb +++ b/google-cloud-security_center-v2/snippets/security_center/update_mute_config.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-v2/snippets/security_center/update_notification_config.rb b/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb index 22f0a6b3e5ea..50e827404937 100644 --- a/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb +++ b/google-cloud-security_center-v2/snippets/security_center/update_notification_config.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-v2/snippets/security_center/update_resource_value_config.rb b/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb index 6afdbb5fcce9..fb28fc12506d 100644 --- a/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb +++ b/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.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-v2/snippets/security_center/update_security_marks.rb b/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb index 5dcaaa35da49..828f608dee92 100644 --- a/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb +++ b/google-cloud-security_center-v2/snippets/security_center/update_security_marks.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-v2/snippets/security_center/update_source.rb b/google-cloud-security_center-v2/snippets/security_center/update_source.rb index e5c97d1d2060..7dad0281409d 100644 --- a/google-cloud-security_center-v2/snippets/security_center/update_source.rb +++ b/google-cloud-security_center-v2/snippets/security_center/update_source.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-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb b/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb index a220d4fdbea6..f30feef48b99 100644 --- a/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb +++ b/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_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-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb b/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb index bd11f2ddec9b..88ac82de925a 100644 --- a/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb +++ b/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_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-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb b/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb index e543d4c7abff..f48ffed9375a 100644 --- a/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb +++ b/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_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-v2/test/google/cloud/security_center/v2/security_center_test.rb b/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb index c4649b1e578c..b3295b2bd5b5 100644 --- a/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb +++ b/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_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-v2/test/helper.rb b/google-cloud-security_center-v2/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-security_center-v2/test/helper.rb +++ b/google-cloud-security_center-v2/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_center_management-v1/.owlbot-manifest.json b/google-cloud-security_center_management-v1/.owlbot-manifest.json index 5af24f50aa18..6df9f807f0c9 100644 --- a/google-cloud-security_center_management-v1/.owlbot-manifest.json +++ b/google-cloud-security_center_management-v1/.owlbot-manifest.json @@ -71,6 +71,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-security_center_management-v1/.toys.rb b/google-cloud-security_center_management-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-security_center_management-v1/.toys.rb +++ b/google-cloud-security_center_management-v1/.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-v1/Rakefile b/google-cloud-security_center_management-v1/Rakefile index 3fe28b274aa2..48a25ec27530 100644 --- a/google-cloud-security_center_management-v1/Rakefile +++ b/google-cloud-security_center_management-v1/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-v1/lib/google-cloud-security_center_management-v1.rb b/google-cloud-security_center_management-v1/lib/google-cloud-security_center_management-v1.rb index d098f4d52945..64c9d0aec5c2 100644 --- a/google-cloud-security_center_management-v1/lib/google-cloud-security_center_management-v1.rb +++ b/google-cloud-security_center_management-v1/lib/google-cloud-security_center_management-v1.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-v1/lib/google/cloud/security_center_management/v1.rb b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1.rb index 802dc4c3af6f..a6774f1f6c46 100644 --- a/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1.rb +++ b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1.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-v1/lib/google/cloud/security_center_management/v1/bindings_override.rb b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/bindings_override.rb index 1ee23a8bc6d6..a6a097cc314f 100644 --- a/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/bindings_override.rb +++ b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/bindings_override.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-v1/lib/google/cloud/security_center_management/v1/rest.rb b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/rest.rb index b02347501e5f..26d917a7bf92 100644 --- a/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/rest.rb +++ b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/rest.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-v1/lib/google/cloud/security_center_management/v1/security_center_management.rb b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management.rb index 9f14e9e86851..f906e0bc11fd 100644 --- a/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management.rb +++ b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/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-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.rb b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.rb index d089b7c1a465..ddcb9e67922d 100644 --- a/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.rb +++ b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.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-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb index f607f987bff9..d03792871b08 100644 --- a/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb +++ b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.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-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb index 13fe86032a21..614cfad55b62 100644 --- a/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb +++ b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.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-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb index 4c922f2e2098..2451529ae88b 100644 --- a/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb +++ b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.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-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb index cba54cd4f3f7..6274bfaaa822 100644 --- a/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb +++ b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.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-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb index 39424e38746e..4bd0edd3626c 100644 --- a/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb +++ b/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.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-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_services_pb.rb b/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_services_pb.rb index 4cfe2e7f5103..f995544bb7f8 100644 --- a/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_services_pb.rb +++ b/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/securitycentermanagement/v1/security_center_management.proto for package 'Google.Cloud.SecurityCenterManagement.V1' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-security_center_management-v1/proto_docs/google/api/client.rb b/google-cloud-security_center_management-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/api/client.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/api/client.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-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-security_center_management-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/api/field_behavior.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-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-security_center_management-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/api/launch_stage.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-v1/proto_docs/google/api/resource.rb b/google-cloud-security_center_management-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/api/resource.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-v1/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb b/google-cloud-security_center_management-v1/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb index 3daf701cf61c..b9f8a419f0dc 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/cloud/securitycentermanagement/v1/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-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-security_center_management-v1/proto_docs/google/iam/v1/policy.rb index 38e7116f6688..999575b797df 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/iam/v1/policy.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-v1/proto_docs/google/protobuf/any.rb b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/any.rb index fb4d6862eac9..58691995f02e 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/any.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-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/duration.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-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/empty.rb index 8c6b19d52e3d..83e4481834a6 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/empty.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-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/field_mask.rb index 8e7abcf8f052..7f3ffc78601a 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/field_mask.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-v1/proto_docs/google/protobuf/struct.rb b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/struct.rb index b6803313eb41..39e1aca868d2 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/struct.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-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.rb b/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.rb index 09acc69b6125..c1a1c07eb2db 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.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-v1/proto_docs/google/type/expr.rb b/google-cloud-security_center_management-v1/proto_docs/google/type/expr.rb index 41c8c3a565cc..53e7733b6592 100644 --- a/google-cloud-security_center_management-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-security_center_management-v1/proto_docs/google/type/expr.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-v1/snippets/Gemfile b/google-cloud-security_center_management-v1/snippets/Gemfile index 00a5077838f3..48ea53e31c30 100644 --- a/google-cloud-security_center_management-v1/snippets/Gemfile +++ b/google-cloud-security_center_management-v1/snippets/Gemfile @@ -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-v1/snippets/security_center_management/create_event_threat_detection_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/create_event_threat_detection_custom_module.rb index 20c055cf7a98..1af62ea87528 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/create_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/create_event_threat_detection_custom_module.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-v1/snippets/security_center_management/create_security_health_analytics_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/create_security_health_analytics_custom_module.rb index c834860ccab9..345362f5da41 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/create_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/create_security_health_analytics_custom_module.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-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.rb index 3fdfc9438935..1a1782aec5de 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.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-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.rb index a48828ad05f8..7c265ee8e5ba 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.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-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.rb index bff8207de496..9dfd40d071fc 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.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-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.rb index 418e136d7c6f..6fe48aa1f67b 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.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-v1/snippets/security_center_management/get_event_threat_detection_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/get_event_threat_detection_custom_module.rb index 3b2ab9a69df4..e772e63bd4e2 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/get_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/get_event_threat_detection_custom_module.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-v1/snippets/security_center_management/get_security_center_service.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_center_service.rb index 57d170604100..6034fcfea4db 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_center_service.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_center_service.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-v1/snippets/security_center_management/get_security_health_analytics_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_health_analytics_custom_module.rb index a6109ba9e817..bb916a20de63 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_health_analytics_custom_module.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-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.rb index df45b6ed60bd..f36375df2816 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.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-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.rb index 1267046f7af5..7cfa0c972603 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.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-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.rb index 8f3c3c72b37c..4c7f69640d8a 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.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-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.rb index 03bdfaf13ed5..28d70b7bc51f 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.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-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.rb index 0b630fae0a12..fc62f7c99e51 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.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-v1/snippets/security_center_management/list_security_center_services.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_center_services.rb index dd5c13fb0a1f..3c2cc1f945c6 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_center_services.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_center_services.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-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.rb index b1edd65ecd74..38701f9cc760 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.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-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.rb index f02db91f0188..a87f00cd27b9 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.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-v1/snippets/security_center_management/update_event_threat_detection_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/update_event_threat_detection_custom_module.rb index 3a717ea9f95d..3551bb287965 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/update_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/update_event_threat_detection_custom_module.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-v1/snippets/security_center_management/update_security_center_service.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_center_service.rb index cad1e50b3264..4abb4dcae4a3 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_center_service.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_center_service.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-v1/snippets/security_center_management/update_security_health_analytics_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_health_analytics_custom_module.rb index 2c5b18417633..7aef0a715144 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_health_analytics_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_health_analytics_custom_module.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-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.rb b/google-cloud-security_center_management-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.rb index 40354b4f911e..4fd089b6c7d4 100644 --- a/google-cloud-security_center_management-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.rb +++ b/google-cloud-security_center_management-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.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-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_test.rb b/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_test.rb index 07208e937c65..57be2bde861c 100644 --- a/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_test.rb +++ b/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_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-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_test.rb b/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_test.rb index 65e32c16947e..a14923da003c 100644 --- a/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_test.rb +++ b/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_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-v1/test/google/cloud/security_center_management/v1/security_center_management_test.rb b/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_test.rb index 45b0608e67f5..a8b7fce652a9 100644 --- a/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_test.rb +++ b/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_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-v1/test/helper.rb b/google-cloud-security_center_management-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-security_center_management-v1/test/helper.rb +++ b/google-cloud-security_center_management-v1/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-v1/.owlbot-manifest.json b/google-cloud-service_control-v1/.owlbot-manifest.json index e2955de0d123..6b059a737af6 100644 --- a/google-cloud-service_control-v1/.owlbot-manifest.json +++ b/google-cloud-service_control-v1/.owlbot-manifest.json @@ -70,6 +70,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-service_control-v1/.toys.rb b/google-cloud-service_control-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-service_control-v1/.toys.rb +++ b/google-cloud-service_control-v1/.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-v1/Rakefile b/google-cloud-service_control-v1/Rakefile index f9b21765c07a..1cadd92fcbaf 100644 --- a/google-cloud-service_control-v1/Rakefile +++ b/google-cloud-service_control-v1/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-v1/lib/google-cloud-service_control-v1.rb b/google-cloud-service_control-v1/lib/google-cloud-service_control-v1.rb index 7fab0cf5d739..bfde08f78cb8 100644 --- a/google-cloud-service_control-v1/lib/google-cloud-service_control-v1.rb +++ b/google-cloud-service_control-v1/lib/google-cloud-service_control-v1.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-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb b/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb index 3fd991e27bea..d4f30c296b0d 100644 --- a/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb +++ b/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/api/servicecontrol/v1/quota_controller.proto for package 'Google.Cloud.ServiceControl.V1' # Original file comments: -# 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-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb b/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb index 657f86911b84..2278fccc29d4 100644 --- a/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb +++ b/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/api/servicecontrol/v1/service_controller.proto for package 'Google.Cloud.ServiceControl.V1' # Original file comments: -# 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-v1/lib/google/cloud/service_control/v1.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1.rb index 76f4307c9252..dcc95829cf0e 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1.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-v1/lib/google/cloud/service_control/v1/quota_controller.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller.rb index 4a55eee70346..e963c97e2520 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller.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-v1/lib/google/cloud/service_control/v1/quota_controller/client.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/client.rb index a434d10bc5b2..1482ccfab979 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/client.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/client.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-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.rb index 74b9e65cf570..e06bb9ba406a 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.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-v1/lib/google/cloud/service_control/v1/quota_controller/rest.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest.rb index df4c463bbd71..50b91d2a35b3 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest.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-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.rb index 1edc8917bde7..e595839f0e14 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.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-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.rb index 959c0e6539cc..f4dcafdb9c1a 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.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-service_control-v1/lib/google/cloud/service_control/v1/rest.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/rest.rb index 8c0c60b206ca..b1390881305c 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/rest.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/rest.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-service_control-v1/lib/google/cloud/service_control/v1/service_controller.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller.rb index f5b657c8d8a0..7d39f2a58c49 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller.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-v1/lib/google/cloud/service_control/v1/service_controller/client.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/client.rb index bfddb62a4410..b9e740577397 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/client.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/client.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-v1/lib/google/cloud/service_control/v1/service_controller/credentials.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/credentials.rb index abaa3c448939..ae04179c3e7e 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/credentials.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/credentials.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-v1/lib/google/cloud/service_control/v1/service_controller/rest.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest.rb index 339744120089..7ae6dee6ef4c 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest.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-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.rb index 832f262f2a0b..e0be9acd1d0c 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.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-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.rb b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.rb index 018801d74380..3203240fae04 100644 --- a/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.rb +++ b/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.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-service_control-v1/proto_docs/google/api/client.rb b/google-cloud-service_control-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/client.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/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-service_control-v1/proto_docs/google/api/distribution.rb b/google-cloud-service_control-v1/proto_docs/google/api/distribution.rb index 88c5b7263a97..e4f870d5ad0d 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/distribution.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/distribution.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-service_control-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-service_control-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/launch_stage.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-service_control-v1/proto_docs/google/api/resource.rb b/google-cloud-service_control-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/resource.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-v1/proto_docs/google/api/servicecontrol/v1/check_error.rb b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/check_error.rb index 241bb827afca..68d445510c11 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/check_error.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/check_error.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-v1/proto_docs/google/api/servicecontrol/v1/distribution.rb b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/distribution.rb index ea8370c502fe..f25125b9bf74 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/distribution.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/distribution.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-v1/proto_docs/google/api/servicecontrol/v1/http_request.rb b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/http_request.rb index 2f715eb14aec..64635c2a2991 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/http_request.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/http_request.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-v1/proto_docs/google/api/servicecontrol/v1/log_entry.rb b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/log_entry.rb index 1957790a0a7c..bb1679135a7f 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/log_entry.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/log_entry.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-v1/proto_docs/google/api/servicecontrol/v1/metric_value.rb b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/metric_value.rb index fecf788fd133..a5736d442c2a 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/metric_value.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/metric_value.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-v1/proto_docs/google/api/servicecontrol/v1/operation.rb b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/operation.rb index cc1fae4cc569..4104f50bea0e 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/operation.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/operation.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-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.rb b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.rb index c9391d174633..8d919881597e 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.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-v1/proto_docs/google/api/servicecontrol/v1/service_controller.rb b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/service_controller.rb index 799c50e445dd..c63f78cb240d 100644 --- a/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/service_controller.rb +++ b/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/service_controller.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-v1/proto_docs/google/logging/type/log_severity.rb b/google-cloud-service_control-v1/proto_docs/google/logging/type/log_severity.rb index d6956d464f8f..63f6b0689a92 100644 --- a/google-cloud-service_control-v1/proto_docs/google/logging/type/log_severity.rb +++ b/google-cloud-service_control-v1/proto_docs/google/logging/type/log_severity.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-v1/proto_docs/google/protobuf/any.rb b/google-cloud-service_control-v1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-service_control-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-service_control-v1/proto_docs/google/protobuf/any.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-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-service_control-v1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-cloud-service_control-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-service_control-v1/proto_docs/google/protobuf/duration.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-v1/proto_docs/google/protobuf/struct.rb b/google-cloud-service_control-v1/proto_docs/google/protobuf/struct.rb index 6fd3d60d108d..39e1aca868d2 100644 --- a/google-cloud-service_control-v1/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-service_control-v1/proto_docs/google/protobuf/struct.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-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-service_control-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-service_control-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-service_control-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-service_control-v1/proto_docs/google/rpc/status.rb b/google-cloud-service_control-v1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-service_control-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-service_control-v1/proto_docs/google/rpc/status.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-v1/snippets/Gemfile b/google-cloud-service_control-v1/snippets/Gemfile index 1511b258c81a..2860c5bace9a 100755 --- a/google-cloud-service_control-v1/snippets/Gemfile +++ b/google-cloud-service_control-v1/snippets/Gemfile @@ -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-service_control-v1/snippets/quota_controller/allocate_quota.rb b/google-cloud-service_control-v1/snippets/quota_controller/allocate_quota.rb index 18534c0a3f79..6b1f93d4a4b8 100755 --- a/google-cloud-service_control-v1/snippets/quota_controller/allocate_quota.rb +++ b/google-cloud-service_control-v1/snippets/quota_controller/allocate_quota.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-service_control-v1/snippets/service_controller/check.rb b/google-cloud-service_control-v1/snippets/service_controller/check.rb index 151d5c38bc7a..2f26d0a78028 100755 --- a/google-cloud-service_control-v1/snippets/service_controller/check.rb +++ b/google-cloud-service_control-v1/snippets/service_controller/check.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-service_control-v1/snippets/service_controller/report.rb b/google-cloud-service_control-v1/snippets/service_controller/report.rb index 8a6fd1b9746e..cc7c77bb4409 100755 --- a/google-cloud-service_control-v1/snippets/service_controller/report.rb +++ b/google-cloud-service_control-v1/snippets/service_controller/report.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-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_test.rb b/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_test.rb index 7880bfba9009..c1138f0bb2b2 100644 --- a/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_test.rb +++ b/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_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-service_control-v1/test/google/cloud/service_control/v1/quota_controller_test.rb b/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_test.rb index 2db6d393c6f3..cdb7686f7d49 100644 --- a/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_test.rb +++ b/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_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-v1/test/google/cloud/service_control/v1/service_controller_rest_test.rb b/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_rest_test.rb index d18616a6b490..5136f3a08c4a 100644 --- a/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_rest_test.rb +++ b/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_rest_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-service_control-v1/test/google/cloud/service_control/v1/service_controller_test.rb b/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_test.rb index 9e43b6ee3a64..1c029c06965e 100644 --- a/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_test.rb +++ b/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_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-v1/test/helper.rb b/google-cloud-service_control-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-service_control-v1/test/helper.rb +++ b/google-cloud-service_control-v1/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-service_directory-v1beta1/.owlbot-manifest.json b/google-cloud-service_directory-v1beta1/.owlbot-manifest.json index 76d78612c309..cb4d2aca087f 100644 --- a/google-cloud-service_directory-v1beta1/.owlbot-manifest.json +++ b/google-cloud-service_directory-v1beta1/.owlbot-manifest.json @@ -88,6 +88,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-service_directory-v1beta1/.toys.rb b/google-cloud-service_directory-v1beta1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-service_directory-v1beta1/.toys.rb +++ b/google-cloud-service_directory-v1beta1/.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_directory-v1beta1/Rakefile b/google-cloud-service_directory-v1beta1/Rakefile index 9e398130e101..02b546ed1792 100644 --- a/google-cloud-service_directory-v1beta1/Rakefile +++ b/google-cloud-service_directory-v1beta1/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_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.rb b/google-cloud-service_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.rb index 6bc0bf81621b..c08367906250 100644 --- a/google-cloud-service_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.rb +++ b/google-cloud-service_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.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_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.rb index 20148999011d..6bcb343006c1 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.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_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.rb index 981d58a5cf04..59fc75fb480d 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.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-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.rb index 9f7566337199..79639aca3a89 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.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_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb index 7f7af19b769e..323fb64985c0 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.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_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.rb index 977dea7f3fa8..53cdf629fbe5 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.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_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.rb index 5f1326e37796..50d7bedddd03 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.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_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb index 3d56110b3556..8555356e42e7 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.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-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb index c0c351e29a86..f3e781d064b6 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.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-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb index 7ef78a5ceb79..b7c4ba7a4500 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.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-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.rb index 3b155882fa0d..7acfe52f8b07 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.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_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb index 7764c0e0e9ba..85c0fcefd890 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.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_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.rb index 3db703aa0a7e..d90bb79b2ad3 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.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_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb index 4fc518a8113d..7d67a139666f 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.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_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb index bd9255184d8d..3cf7fab4eda2 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.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-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb index 84f71e2247bd..6e0e19fc93b3 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.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-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb index c2b7e20870ce..c4fcd4b792c1 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.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-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.rb index 14fc248c3d60..134b4ad50df3 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.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-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb index a12ae9a30d16..dd25c43fecfb 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/servicedirectory/v1beta1/lookup_service.proto for package 'Google.Cloud.ServiceDirectory.V1beta1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb b/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb index fb8085192c9f..062c769d7350 100644 --- a/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb +++ b/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/servicedirectory/v1beta1/registration_service.proto for package 'Google.Cloud.ServiceDirectory.V1beta1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_directory-v1beta1/proto_docs/google/api/client.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/api/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-service_directory-v1beta1/proto_docs/google/api/field_behavior.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/api/field_behavior.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_directory-v1beta1/proto_docs/google/api/launch_stage.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/api/launch_stage.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-service_directory-v1beta1/proto_docs/google/api/resource.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/api/resource.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/api/resource.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_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb index 4e8dddcfd0dc..711458f230d1 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.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_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb index 72454dc30130..14fcc99f8faa 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.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_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb index f5c45b246020..ccb58df1f634 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.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_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb index 9fcdb57610ca..6db231e8d14a 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.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_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb index a5a7824c2d72..0f5ce424212a 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.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_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.rb index 3999076cd8c2..5445c77f8258 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.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_directory-v1beta1/proto_docs/google/iam/v1/options.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/options.rb index e8720a105bca..60713d995b86 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/options.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_directory-v1beta1/proto_docs/google/iam/v1/policy.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/policy.rb index 3e6a8d5d47d9..999575b797df 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/policy.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_directory-v1beta1/proto_docs/google/protobuf/any.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/any.rb index 39ec3bcf883f..58691995f02e 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/any.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-service_directory-v1beta1/proto_docs/google/protobuf/duration.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/duration.rb index ca97d06a00ef..ea59f1f91daf 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/duration.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-service_directory-v1beta1/proto_docs/google/protobuf/empty.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/empty.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_directory-v1beta1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/field_mask.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_directory-v1beta1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/timestamp.rb index 626cd5e0bf3a..e58202461f88 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.rb b/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.rb index 066f228c22f0..53e7733b6592 100644 --- a/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.rb +++ b/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.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_directory-v1beta1/snippets/Gemfile b/google-cloud-service_directory-v1beta1/snippets/Gemfile index afa0c4f2165f..97414f0ec896 100755 --- a/google-cloud-service_directory-v1beta1/snippets/Gemfile +++ b/google-cloud-service_directory-v1beta1/snippets/Gemfile @@ -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-service_directory-v1beta1/snippets/lookup_service/resolve_service.rb b/google-cloud-service_directory-v1beta1/snippets/lookup_service/resolve_service.rb index c716e989a342..d71eb3c1791d 100755 --- a/google-cloud-service_directory-v1beta1/snippets/lookup_service/resolve_service.rb +++ b/google-cloud-service_directory-v1beta1/snippets/lookup_service/resolve_service.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-service_directory-v1beta1/snippets/registration_service/create_endpoint.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/create_endpoint.rb index 5b87884a6f06..3e2ad8dfb2e1 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/create_endpoint.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/create_endpoint.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-service_directory-v1beta1/snippets/registration_service/create_namespace.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/create_namespace.rb index 2faea06e25b7..ec054cee82d0 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/create_namespace.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/create_namespace.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-service_directory-v1beta1/snippets/registration_service/create_service.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/create_service.rb index ffe96fa665e1..25d40b538366 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/create_service.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/create_service.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-service_directory-v1beta1/snippets/registration_service/delete_endpoint.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_endpoint.rb index 57a3655dc592..a0f9e22f857a 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_endpoint.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_endpoint.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-service_directory-v1beta1/snippets/registration_service/delete_namespace.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_namespace.rb index 0e27cd5aff9f..6571a245cbe3 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_namespace.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_namespace.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-service_directory-v1beta1/snippets/registration_service/delete_service.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_service.rb index 45e3fb61920a..d078459a4702 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_service.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_service.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-service_directory-v1beta1/snippets/registration_service/get_endpoint.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/get_endpoint.rb index 1b15feedfc98..54ec62254a8f 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/get_endpoint.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/get_endpoint.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-service_directory-v1beta1/snippets/registration_service/get_iam_policy.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/get_iam_policy.rb index d5fbbe657c3b..6c93e204b20f 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/get_iam_policy.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/get_iam_policy.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-service_directory-v1beta1/snippets/registration_service/get_namespace.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/get_namespace.rb index 522154d90761..5050a16a6530 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/get_namespace.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/get_namespace.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-service_directory-v1beta1/snippets/registration_service/get_service.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/get_service.rb index b427b2ad8f42..275196ffb4e1 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/get_service.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/get_service.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-service_directory-v1beta1/snippets/registration_service/list_endpoints.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/list_endpoints.rb index 92a48c149945..4793441f9ebf 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/list_endpoints.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/list_endpoints.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-service_directory-v1beta1/snippets/registration_service/list_namespaces.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/list_namespaces.rb index f271413b0538..28f67143a5f7 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/list_namespaces.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/list_namespaces.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-service_directory-v1beta1/snippets/registration_service/list_services.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/list_services.rb index e2ed5abdb38a..feec94510bd4 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/list_services.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/list_services.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-service_directory-v1beta1/snippets/registration_service/set_iam_policy.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/set_iam_policy.rb index 19122717dbbd..fa2aa1005639 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/set_iam_policy.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/set_iam_policy.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-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.rb index 2e1723b3a98a..acb3050b1c96 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.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-service_directory-v1beta1/snippets/registration_service/update_endpoint.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/update_endpoint.rb index ec41d097a5e5..43c96f11aaef 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/update_endpoint.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/update_endpoint.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-service_directory-v1beta1/snippets/registration_service/update_namespace.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/update_namespace.rb index f7029cd8ac79..6e2d2ebcd57f 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/update_namespace.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/update_namespace.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-service_directory-v1beta1/snippets/registration_service/update_service.rb b/google-cloud-service_directory-v1beta1/snippets/registration_service/update_service.rb index 3f727fb354cd..bd7b63693a51 100755 --- a/google-cloud-service_directory-v1beta1/snippets/registration_service/update_service.rb +++ b/google-cloud-service_directory-v1beta1/snippets/registration_service/update_service.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-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_test.rb b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_test.rb index 3f80be30e425..6353a46aff02 100644 --- a/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_test.rb +++ b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_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_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_test.rb b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_test.rb index b651dfe8c46d..cf67bf538ccd 100644 --- a/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_test.rb +++ b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_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-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_test.rb b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_test.rb index e976c6c65ac4..09d6d0129b7b 100644 --- a/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_test.rb +++ b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_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_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_test.rb b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_test.rb index 1926cb58ed51..37f95cd118d4 100644 --- a/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_test.rb +++ b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_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_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_test.rb b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_test.rb index a64923320788..eeecb1033ab3 100644 --- a/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_test.rb +++ b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_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-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_test.rb b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_test.rb index c0a12f397c07..2a649b61c8da 100644 --- a/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_test.rb +++ b/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_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_directory-v1beta1/test/helper.rb b/google-cloud-service_directory-v1beta1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-service_directory-v1beta1/test/helper.rb +++ b/google-cloud-service_directory-v1beta1/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-service_health-v1/.owlbot-manifest.json b/google-cloud-service_health-v1/.owlbot-manifest.json index e275fcb7d60a..91e53d1c76e3 100644 --- a/google-cloud-service_health-v1/.owlbot-manifest.json +++ b/google-cloud-service_health-v1/.owlbot-manifest.json @@ -51,6 +51,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-service_health-v1/.toys.rb b/google-cloud-service_health-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-service_health-v1/.toys.rb +++ b/google-cloud-service_health-v1/.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_health-v1/Rakefile b/google-cloud-service_health-v1/Rakefile index 676d0deeb172..516ae4796426 100644 --- a/google-cloud-service_health-v1/Rakefile +++ b/google-cloud-service_health-v1/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-service_health-v1/lib/google-cloud-service_health-v1.rb b/google-cloud-service_health-v1/lib/google-cloud-service_health-v1.rb index 937b9b8410b2..1fd09f220a8c 100644 --- a/google-cloud-service_health-v1/lib/google-cloud-service_health-v1.rb +++ b/google-cloud-service_health-v1/lib/google-cloud-service_health-v1.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_health-v1/lib/google/cloud/service_health/v1.rb b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1.rb index 46ea8db46490..0450d1bde309 100644 --- a/google-cloud-service_health-v1/lib/google/cloud/service_health/v1.rb +++ b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1.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_health-v1/lib/google/cloud/service_health/v1/bindings_override.rb b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/bindings_override.rb index 36ae486e77fe..1d734180955c 100644 --- a/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/bindings_override.rb +++ b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/bindings_override.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_health-v1/lib/google/cloud/service_health/v1/rest.rb b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/rest.rb index cfb639b7f4a7..7c4fab8806ab 100644 --- a/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/rest.rb +++ b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/rest.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_health-v1/lib/google/cloud/service_health/v1/service_health.rb b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health.rb index f385cf8bc4bd..e2ae0bacf94a 100644 --- a/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health.rb +++ b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health.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_health-v1/lib/google/cloud/service_health/v1/service_health/client.rb b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/client.rb index fbed5d0c877e..92dab2cd58d0 100644 --- a/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/client.rb +++ b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/client.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_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.rb b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.rb index 737fd6a4296d..76ceb72eed21 100644 --- a/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.rb +++ b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.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_health-v1/lib/google/cloud/service_health/v1/service_health/paths.rb b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/paths.rb index 09cb2310b685..faffaa39fdf7 100644 --- a/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/paths.rb +++ b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/paths.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_health-v1/lib/google/cloud/service_health/v1/service_health/rest.rb b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest.rb index 8e50dddd0ec0..205266530be8 100644 --- a/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest.rb +++ b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest.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_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.rb b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.rb index cdce8ec94a76..d7232b43bd7f 100644 --- a/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.rb +++ b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.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_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.rb b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.rb index e98b9aea22ca..334b7953ff5e 100644 --- a/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.rb +++ b/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.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_health-v1/lib/google/cloud/servicehealth/v1/event_service_services_pb.rb b/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_services_pb.rb index c50067b72a02..6b1bd6ae359c 100644 --- a/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_services_pb.rb +++ b/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/servicehealth/v1/event_service.proto for package 'Google.Cloud.ServiceHealth.V1' # Original file comments: -# Copyright 2023 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_health-v1/proto_docs/google/api/client.rb b/google-cloud-service_health-v1/proto_docs/google/api/client.rb index c58739e32368..3ab0b096d445 100644 --- a/google-cloud-service_health-v1/proto_docs/google/api/client.rb +++ b/google-cloud-service_health-v1/proto_docs/google/api/client.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_health-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-service_health-v1/proto_docs/google/api/field_behavior.rb index b03587481349..582be187d115 100644 --- a/google-cloud-service_health-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-service_health-v1/proto_docs/google/api/field_behavior.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_health-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-service_health-v1/proto_docs/google/api/launch_stage.rb index 38b4b61e6061..9392a413fb1b 100644 --- a/google-cloud-service_health-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-service_health-v1/proto_docs/google/api/launch_stage.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_health-v1/proto_docs/google/api/resource.rb b/google-cloud-service_health-v1/proto_docs/google/api/resource.rb index 935946d52792..25dec4847ac1 100644 --- a/google-cloud-service_health-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-service_health-v1/proto_docs/google/api/resource.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_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.rb b/google-cloud-service_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.rb index ec83d573011e..60b89ba52554 100644 --- a/google-cloud-service_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.rb +++ b/google-cloud-service_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.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_health-v1/proto_docs/google/protobuf/any.rb b/google-cloud-service_health-v1/proto_docs/google/protobuf/any.rb index fb4d6862eac9..58691995f02e 100644 --- a/google-cloud-service_health-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-service_health-v1/proto_docs/google/protobuf/any.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_health-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-service_health-v1/proto_docs/google/protobuf/duration.rb index b5731a824060..ea59f1f91daf 100644 --- a/google-cloud-service_health-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-service_health-v1/proto_docs/google/protobuf/duration.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_health-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-service_health-v1/proto_docs/google/protobuf/timestamp.rb index 4ac9c4801a3f..e58202461f88 100644 --- a/google-cloud-service_health-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-service_health-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-service_health-v1/snippets/Gemfile b/google-cloud-service_health-v1/snippets/Gemfile index cd10c0d90a08..299f6cda7aba 100644 --- a/google-cloud-service_health-v1/snippets/Gemfile +++ b/google-cloud-service_health-v1/snippets/Gemfile @@ -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_health-v1/snippets/service_health/get_event.rb b/google-cloud-service_health-v1/snippets/service_health/get_event.rb index 005467f41f1c..23479740a8e0 100644 --- a/google-cloud-service_health-v1/snippets/service_health/get_event.rb +++ b/google-cloud-service_health-v1/snippets/service_health/get_event.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_health-v1/snippets/service_health/get_organization_event.rb b/google-cloud-service_health-v1/snippets/service_health/get_organization_event.rb index ef49f718289d..df9646decbc0 100644 --- a/google-cloud-service_health-v1/snippets/service_health/get_organization_event.rb +++ b/google-cloud-service_health-v1/snippets/service_health/get_organization_event.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_health-v1/snippets/service_health/get_organization_impact.rb b/google-cloud-service_health-v1/snippets/service_health/get_organization_impact.rb index f353d9eb4c58..f0a376741737 100644 --- a/google-cloud-service_health-v1/snippets/service_health/get_organization_impact.rb +++ b/google-cloud-service_health-v1/snippets/service_health/get_organization_impact.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_health-v1/snippets/service_health/list_events.rb b/google-cloud-service_health-v1/snippets/service_health/list_events.rb index 3f07101b40cc..53e9fc3e5458 100644 --- a/google-cloud-service_health-v1/snippets/service_health/list_events.rb +++ b/google-cloud-service_health-v1/snippets/service_health/list_events.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_health-v1/snippets/service_health/list_organization_events.rb b/google-cloud-service_health-v1/snippets/service_health/list_organization_events.rb index 21c9e06c0f7f..9d25933b9164 100644 --- a/google-cloud-service_health-v1/snippets/service_health/list_organization_events.rb +++ b/google-cloud-service_health-v1/snippets/service_health/list_organization_events.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_health-v1/snippets/service_health/list_organization_impacts.rb b/google-cloud-service_health-v1/snippets/service_health/list_organization_impacts.rb index aed083ae8e88..2fdbd490e47d 100644 --- a/google-cloud-service_health-v1/snippets/service_health/list_organization_impacts.rb +++ b/google-cloud-service_health-v1/snippets/service_health/list_organization_impacts.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_health-v1/test/google/cloud/service_health/v1/service_health_paths_test.rb b/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_paths_test.rb index 95a15aefd671..230902f0df17 100644 --- a/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_paths_test.rb +++ b/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_paths_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-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_test.rb b/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_test.rb index f9361438924c..d7fb92ff8f2d 100644 --- a/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_test.rb +++ b/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_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-service_health-v1/test/google/cloud/service_health/v1/service_health_test.rb b/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_test.rb index af9fa2d81309..3112ba40ae62 100644 --- a/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_test.rb +++ b/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_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-service_health-v1/test/helper.rb b/google-cloud-service_health-v1/test/helper.rb index 5838f6bd94e7..4fb6756ac7e2 100644 --- a/google-cloud-service_health-v1/test/helper.rb +++ b/google-cloud-service_health-v1/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_management-v1/.owlbot-manifest.json b/google-cloud-service_management-v1/.owlbot-manifest.json index 8b416016e505..9eaa5ed4c7f9 100644 --- a/google-cloud-service_management-v1/.owlbot-manifest.json +++ b/google-cloud-service_management-v1/.owlbot-manifest.json @@ -90,6 +90,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-service_management-v1/.toys.rb b/google-cloud-service_management-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-service_management-v1/.toys.rb +++ b/google-cloud-service_management-v1/.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_management-v1/Rakefile b/google-cloud-service_management-v1/Rakefile index 7934f19406ea..2de06523c37d 100644 --- a/google-cloud-service_management-v1/Rakefile +++ b/google-cloud-service_management-v1/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_management-v1/lib/google-cloud-service_management-v1.rb b/google-cloud-service_management-v1/lib/google-cloud-service_management-v1.rb index fe11adaac76b..49cad33ce88e 100644 --- a/google-cloud-service_management-v1/lib/google-cloud-service_management-v1.rb +++ b/google-cloud-service_management-v1/lib/google-cloud-service_management-v1.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_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb b/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb index fe823f4f60f3..12d089c4f77e 100644 --- a/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb +++ b/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/api/servicemanagement/v1/servicemanager.proto for package 'Google.Cloud.ServiceManagement.V1' # Original file comments: -# Copyright 2022 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.rb b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.rb index 67054318864a..741429ff6b3d 100644 --- a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.rb +++ b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.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_management-v1/lib/google/cloud/service_management/v1/bindings_override.rb b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/bindings_override.rb index 3d3df12382d7..8f225f8662b6 100644 --- a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/bindings_override.rb +++ b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/bindings_override.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-service_management-v1/lib/google/cloud/service_management/v1/rest.rb b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/rest.rb index 1599da14e10c..76294f210607 100644 --- a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/rest.rb +++ b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/rest.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-service_management-v1/lib/google/cloud/service_management/v1/service_manager.rb b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager.rb index ddeb66fb3976..675475e70222 100644 --- a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager.rb +++ b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_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-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.rb b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.rb index fcb1ad25b1a4..c370b0cbaa39 100644 --- a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.rb +++ b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.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_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.rb b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.rb index 0d36ce56b0f7..a4c9815cf939 100644 --- a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.rb +++ b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.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_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.rb b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.rb index 73209b47fb9f..21aa897cfe85 100644 --- a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.rb +++ b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.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_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.rb b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.rb index 973f0ff329a3..7c6d55e49768 100644 --- a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.rb +++ b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.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-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.rb b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.rb index 6677807b61ab..1a1ac451fa89 100644 --- a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.rb +++ b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.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-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb index 5fc836ad3ec4..c8a9916924a4 100644 --- a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb +++ b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.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-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb index c55995adc473..7f7177af359f 100644 --- a/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb +++ b/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.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-service_management-v1/proto_docs/google/api/auth.rb b/google-cloud-service_management-v1/proto_docs/google/api/auth.rb index 6d0e08e83fc1..2f1afd9a7f19 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/auth.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/auth.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_management-v1/proto_docs/google/api/backend.rb b/google-cloud-service_management-v1/proto_docs/google/api/backend.rb index 1bf881715f1e..7d69596fe349 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/backend.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/backend.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_management-v1/proto_docs/google/api/billing.rb b/google-cloud-service_management-v1/proto_docs/google/api/billing.rb index 5e43300edfd6..75d55089e3a3 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/billing.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/billing.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_management-v1/proto_docs/google/api/client.rb b/google-cloud-service_management-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/client.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/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-service_management-v1/proto_docs/google/api/config_change.rb b/google-cloud-service_management-v1/proto_docs/google/api/config_change.rb index 7e1e39c7ed21..ca20a231d6b4 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/config_change.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/config_change.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_management-v1/proto_docs/google/api/context.rb b/google-cloud-service_management-v1/proto_docs/google/api/context.rb index a95f48ba5e1f..871ef9830982 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/context.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/context.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_management-v1/proto_docs/google/api/control.rb b/google-cloud-service_management-v1/proto_docs/google/api/control.rb index b0734e515ed8..ad857f7a1157 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/control.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/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_management-v1/proto_docs/google/api/documentation.rb b/google-cloud-service_management-v1/proto_docs/google/api/documentation.rb index 3074fd11efad..ccefcdf22809 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/documentation.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/documentation.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_management-v1/proto_docs/google/api/endpoint.rb b/google-cloud-service_management-v1/proto_docs/google/api/endpoint.rb index 5a5612ae787f..57d040a793ab 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/endpoint.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/endpoint.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_management-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-service_management-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/field_behavior.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_management-v1/proto_docs/google/api/label.rb b/google-cloud-service_management-v1/proto_docs/google/api/label.rb index b0d78b2b3f35..02d2f8d451f9 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/label.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/label.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_management-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-service_management-v1/proto_docs/google/api/launch_stage.rb index 3de0fb4e6b40..9392a413fb1b 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/launch_stage.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-service_management-v1/proto_docs/google/api/log.rb b/google-cloud-service_management-v1/proto_docs/google/api/log.rb index 373ce5fdca09..e977a6844da3 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/log.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/log.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_management-v1/proto_docs/google/api/logging.rb b/google-cloud-service_management-v1/proto_docs/google/api/logging.rb index 97010ae1caa5..7a784dd32332 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/logging.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/logging.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_management-v1/proto_docs/google/api/metric.rb b/google-cloud-service_management-v1/proto_docs/google/api/metric.rb index 56757f1f5193..329058c374d6 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/metric.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/metric.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_management-v1/proto_docs/google/api/monitored_resource.rb b/google-cloud-service_management-v1/proto_docs/google/api/monitored_resource.rb index e7db6a45d9dc..4d1ec410ddac 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/monitored_resource.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/monitored_resource.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_management-v1/proto_docs/google/api/monitoring.rb b/google-cloud-service_management-v1/proto_docs/google/api/monitoring.rb index a8de518cf6db..09aaf1885816 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/monitoring.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/monitoring.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_management-v1/proto_docs/google/api/policy.rb b/google-cloud-service_management-v1/proto_docs/google/api/policy.rb index 11569cf71369..eb5db26fc933 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/policy.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/policy.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-service_management-v1/proto_docs/google/api/quota.rb b/google-cloud-service_management-v1/proto_docs/google/api/quota.rb index 6db1acae5a4f..606c3036c888 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/quota.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/quota.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_management-v1/proto_docs/google/api/resource.rb b/google-cloud-service_management-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/resource.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_management-v1/proto_docs/google/api/service.rb b/google-cloud-service_management-v1/proto_docs/google/api/service.rb index 816babddeac4..49f36f188207 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/service.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/service.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_management-v1/proto_docs/google/api/servicemanagement/v1/resources.rb b/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/resources.rb index 1c75e2a8c576..a314ecbf57fa 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/resources.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/resources.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_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.rb b/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.rb index 4007c8c09c16..8d0f61c93e76 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.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_management-v1/proto_docs/google/api/source_info.rb b/google-cloud-service_management-v1/proto_docs/google/api/source_info.rb index 2a38294961bd..c7bfc8db0769 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/source_info.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/source_info.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_management-v1/proto_docs/google/api/system_parameter.rb b/google-cloud-service_management-v1/proto_docs/google/api/system_parameter.rb index e4ff8f8d4501..4bb72da7b22c 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/system_parameter.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/system_parameter.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_management-v1/proto_docs/google/api/usage.rb b/google-cloud-service_management-v1/proto_docs/google/api/usage.rb index a52b799afeac..42ed23536d71 100644 --- a/google-cloud-service_management-v1/proto_docs/google/api/usage.rb +++ b/google-cloud-service_management-v1/proto_docs/google/api/usage.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_management-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-service_management-v1/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-service_management-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-service_management-v1/proto_docs/google/longrunning/operations.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_management-v1/proto_docs/google/protobuf/any.rb b/google-cloud-service_management-v1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-service_management-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-service_management-v1/proto_docs/google/protobuf/any.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_management-v1/proto_docs/google/protobuf/api.rb b/google-cloud-service_management-v1/proto_docs/google/protobuf/api.rb index 532720a67e77..e6e576b4cf8a 100644 --- a/google-cloud-service_management-v1/proto_docs/google/protobuf/api.rb +++ b/google-cloud-service_management-v1/proto_docs/google/protobuf/api.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. @@ -28,6 +28,11 @@ module Protobuf # sometimes simply referred to as "APIs" in other contexts, such as the name of # this message itself. See https://cloud.google.com/apis/design/glossary for # detailed terminology. + # + # New usages of this message as an alternative to ServiceDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. # @!attribute [rw] name # @return [::String] # The fully qualified name of this interface, including package name @@ -69,12 +74,20 @@ module Protobuf # @!attribute [rw] syntax # @return [::Google::Protobuf::Syntax] # The source syntax of the service. + # @!attribute [rw] edition + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. class Api include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Method represents a method of an API interface. + # + # New usages of this message as an alternative to MethodDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. # @!attribute [rw] name # @return [::String] # The simple name of this method. @@ -94,8 +107,19 @@ class Api # @return [::Array<::Google::Protobuf::Option>] # Any metadata attached to the method. # @!attribute [rw] syntax + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Protobuf::Syntax] # The source syntax of this method. + # + # This field should be ignored, instead the syntax should be inherited from + # Api. This is similar to Field and EnumValue. + # @!attribute [rw] edition + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. + # + # This field should be ignored, instead the edition should be inherited from + # Api. This is similar to Field and EnumValue. class Method include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.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-service_management-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-service_management-v1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-service_management-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-service_management-v1/proto_docs/google/protobuf/empty.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_management-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-service_management-v1/proto_docs/google/protobuf/field_mask.rb index c437e42a7581..7f3ffc78601a 100644 --- a/google-cloud-service_management-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-service_management-v1/proto_docs/google/protobuf/field_mask.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-service_management-v1/proto_docs/google/protobuf/source_context.rb b/google-cloud-service_management-v1/proto_docs/google/protobuf/source_context.rb index 6de576bfcc41..1bc7c0900aec 100644 --- a/google-cloud-service_management-v1/proto_docs/google/protobuf/source_context.rb +++ b/google-cloud-service_management-v1/proto_docs/google/protobuf/source_context.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_management-v1/proto_docs/google/protobuf/struct.rb b/google-cloud-service_management-v1/proto_docs/google/protobuf/struct.rb index 6fd3d60d108d..39e1aca868d2 100644 --- a/google-cloud-service_management-v1/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-service_management-v1/proto_docs/google/protobuf/struct.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_management-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-service_management-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-service_management-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-service_management-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-service_management-v1/proto_docs/google/protobuf/type.rb b/google-cloud-service_management-v1/proto_docs/google/protobuf/type.rb index 70af5e252442..c9c8ea649289 100644 --- a/google-cloud-service_management-v1/proto_docs/google/protobuf/type.rb +++ b/google-cloud-service_management-v1/proto_docs/google/protobuf/type.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. @@ -20,6 +20,11 @@ module Google module Protobuf # A protocol buffer message type. + # + # New usages of this message as an alternative to DescriptorProto are strongly + # discouraged. This message does not reliability preserve all information + # necessary to model the schema and preserve semantics. Instead make use of + # FileDescriptorSet which preserves the necessary information. # @!attribute [rw] name # @return [::String] # The fully qualified message name. @@ -47,6 +52,11 @@ class Type end # A single field of a message type. + # + # New usages of this message as an alternative to FieldDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. # @!attribute [rw] kind # @return [::Google::Protobuf::Field::Kind] # The field type. @@ -160,6 +170,11 @@ module Cardinality end # Enum type definition. + # + # New usages of this message as an alternative to EnumDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. # @!attribute [rw] name # @return [::String] # Enum type name. @@ -184,6 +199,11 @@ class Enum end # Enum value definition. + # + # New usages of this message as an alternative to EnumValueDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. # @!attribute [rw] name # @return [::String] # Enum value name. @@ -200,6 +220,10 @@ class EnumValue # A protocol buffer option, which can be attached to a message, field, # enumeration, etc. + # + # New usages of this message as an alternative to FileOptions, MessageOptions, + # FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions + # are strongly discouraged. # @!attribute [rw] name # @return [::String] # The option's name. For protobuf built-in options (options defined in diff --git a/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.rb b/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.rb index 4f428b97acd5..9a7c0269fa42 100644 --- a/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.rb +++ b/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.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_management-v1/proto_docs/google/rpc/status.rb b/google-cloud-service_management-v1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-service_management-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-service_management-v1/proto_docs/google/rpc/status.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_management-v1/proto_docs/google/type/expr.rb b/google-cloud-service_management-v1/proto_docs/google/type/expr.rb index a9f8fd727691..53e7733b6592 100644 --- a/google-cloud-service_management-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-service_management-v1/proto_docs/google/type/expr.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-service_management-v1/snippets/Gemfile b/google-cloud-service_management-v1/snippets/Gemfile index 0d73afd4f831..c216e7e1548e 100755 --- a/google-cloud-service_management-v1/snippets/Gemfile +++ b/google-cloud-service_management-v1/snippets/Gemfile @@ -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-service_management-v1/snippets/service_manager/create_service.rb b/google-cloud-service_management-v1/snippets/service_manager/create_service.rb index 6499681bd96e..1c68ff74701c 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/create_service.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/create_service.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-service_management-v1/snippets/service_manager/create_service_config.rb b/google-cloud-service_management-v1/snippets/service_manager/create_service_config.rb index 9db63043e0dd..11c36e9ef1af 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/create_service_config.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/create_service_config.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-service_management-v1/snippets/service_manager/create_service_rollout.rb b/google-cloud-service_management-v1/snippets/service_manager/create_service_rollout.rb index 14c7bef73a34..3676dfc62845 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/create_service_rollout.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/create_service_rollout.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-service_management-v1/snippets/service_manager/delete_service.rb b/google-cloud-service_management-v1/snippets/service_manager/delete_service.rb index 171fec2db629..510fb8a4ad39 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/delete_service.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/delete_service.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-service_management-v1/snippets/service_manager/generate_config_report.rb b/google-cloud-service_management-v1/snippets/service_manager/generate_config_report.rb index a75ec13d5118..842fe0c160e1 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/generate_config_report.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/generate_config_report.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-service_management-v1/snippets/service_manager/get_service.rb b/google-cloud-service_management-v1/snippets/service_manager/get_service.rb index 9f1d9fc4eb06..467349ad1ee9 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/get_service.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/get_service.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-service_management-v1/snippets/service_manager/get_service_config.rb b/google-cloud-service_management-v1/snippets/service_manager/get_service_config.rb index 0e3c67d061c4..610df5b47573 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/get_service_config.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/get_service_config.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-service_management-v1/snippets/service_manager/get_service_rollout.rb b/google-cloud-service_management-v1/snippets/service_manager/get_service_rollout.rb index 52dd6e9371d8..3dda230e49fb 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/get_service_rollout.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/get_service_rollout.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-service_management-v1/snippets/service_manager/list_service_configs.rb b/google-cloud-service_management-v1/snippets/service_manager/list_service_configs.rb index 63d7340063ee..eeb38ca2aff8 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/list_service_configs.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/list_service_configs.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-service_management-v1/snippets/service_manager/list_service_rollouts.rb b/google-cloud-service_management-v1/snippets/service_manager/list_service_rollouts.rb index 036c05f9fe13..589785deffe7 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/list_service_rollouts.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/list_service_rollouts.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-service_management-v1/snippets/service_manager/list_services.rb b/google-cloud-service_management-v1/snippets/service_manager/list_services.rb index f779477814f1..eb978eb8fc46 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/list_services.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/list_services.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-service_management-v1/snippets/service_manager/submit_config_source.rb b/google-cloud-service_management-v1/snippets/service_manager/submit_config_source.rb index d49626c77b4e..329b0d68e2f1 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/submit_config_source.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/submit_config_source.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-service_management-v1/snippets/service_manager/undelete_service.rb b/google-cloud-service_management-v1/snippets/service_manager/undelete_service.rb index bec7c1729aac..e6831d656f74 100755 --- a/google-cloud-service_management-v1/snippets/service_manager/undelete_service.rb +++ b/google-cloud-service_management-v1/snippets/service_manager/undelete_service.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-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_test.rb b/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_test.rb index e7825ca6c6fa..a7e637722b9c 100644 --- a/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_test.rb +++ b/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_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_management-v1/test/google/cloud/service_management/v1/service_manager_rest_test.rb b/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_rest_test.rb index 8074fbe8cceb..6ca859efecf7 100644 --- a/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_rest_test.rb +++ b/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_rest_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-service_management-v1/test/google/cloud/service_management/v1/service_manager_test.rb b/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_test.rb index cb89a3e89b73..97e3b6131b65 100644 --- a/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_test.rb +++ b/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_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_management-v1/test/helper.rb b/google-cloud-service_management-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-service_management-v1/test/helper.rb +++ b/google-cloud-service_management-v1/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-service_usage-v1/.owlbot-manifest.json b/google-cloud-service_usage-v1/.owlbot-manifest.json index 42fd4c6ca49e..b0e428f66eeb 100644 --- a/google-cloud-service_usage-v1/.owlbot-manifest.json +++ b/google-cloud-service_usage-v1/.owlbot-manifest.json @@ -66,6 +66,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-service_usage-v1/.toys.rb b/google-cloud-service_usage-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-service_usage-v1/.toys.rb +++ b/google-cloud-service_usage-v1/.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_usage-v1/Rakefile b/google-cloud-service_usage-v1/Rakefile index 3734342ae29c..aa26e213bd12 100644 --- a/google-cloud-service_usage-v1/Rakefile +++ b/google-cloud-service_usage-v1/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-service_usage-v1/lib/google-cloud-service_usage-v1.rb b/google-cloud-service_usage-v1/lib/google-cloud-service_usage-v1.rb index d3b89d917177..024e67974bb5 100644 --- a/google-cloud-service_usage-v1/lib/google-cloud-service_usage-v1.rb +++ b/google-cloud-service_usage-v1/lib/google-cloud-service_usage-v1.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-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb b/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb index 1e9a4c99497f..77a57299004d 100644 --- a/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb +++ b/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/api/serviceusage/v1/serviceusage.proto for package 'Google.Cloud.ServiceUsage.V1' # Original file comments: -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.rb b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.rb index 14a4c4440db1..6574d05185b2 100644 --- a/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.rb +++ b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.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-service_usage-v1/lib/google/cloud/service_usage/v1/rest.rb b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/rest.rb index 4c8dfae9efcf..30771378b1cd 100644 --- a/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/rest.rb +++ b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/rest.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-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.rb b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.rb index 8c56b02b003b..47ad7fc9b613 100644 --- a/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.rb +++ b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.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-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.rb b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.rb index 1697e2e2d3d5..4230f5ca16e7 100644 --- a/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.rb +++ b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.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-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.rb b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.rb index 4f22cf297018..d29b072c389d 100644 --- a/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.rb +++ b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.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-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.rb b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.rb index fb707bc9d518..3dddbf825634 100644 --- a/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.rb +++ b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.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-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.rb b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.rb index edfc98fd1a0c..33ff36f88f2c 100644 --- a/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.rb +++ b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.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-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.rb b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.rb index f7ad0ab8bede..c6bf1ad93ac0 100644 --- a/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.rb +++ b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.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-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.rb b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.rb index 2b37d32285a8..e634e343da18 100644 --- a/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.rb +++ b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.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-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.rb b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.rb index 868a6abf14d6..c4a05bd4b705 100644 --- a/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.rb +++ b/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.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-service_usage-v1/proto_docs/google/api/auth.rb b/google-cloud-service_usage-v1/proto_docs/google/api/auth.rb index 2c028c644f75..c71d3c7421d7 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/auth.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/auth.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-service_usage-v1/proto_docs/google/api/client.rb b/google-cloud-service_usage-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/client.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/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-service_usage-v1/proto_docs/google/api/documentation.rb b/google-cloud-service_usage-v1/proto_docs/google/api/documentation.rb index cccb2b1432b8..ccefcdf22809 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/documentation.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/documentation.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-service_usage-v1/proto_docs/google/api/endpoint.rb b/google-cloud-service_usage-v1/proto_docs/google/api/endpoint.rb index 54d6da13cd50..57d040a793ab 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/endpoint.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/endpoint.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-service_usage-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-service_usage-v1/proto_docs/google/api/field_behavior.rb index fb9115c630af..582be187d115 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/field_behavior.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-service_usage-v1/proto_docs/google/api/label.rb b/google-cloud-service_usage-v1/proto_docs/google/api/label.rb index 0889bb799450..02d2f8d451f9 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/label.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/label.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-service_usage-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-service_usage-v1/proto_docs/google/api/launch_stage.rb index 3de0fb4e6b40..9392a413fb1b 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/launch_stage.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-service_usage-v1/proto_docs/google/api/monitored_resource.rb b/google-cloud-service_usage-v1/proto_docs/google/api/monitored_resource.rb index 77511e5a97fb..4d1ec410ddac 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/monitored_resource.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/monitored_resource.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-service_usage-v1/proto_docs/google/api/monitoring.rb b/google-cloud-service_usage-v1/proto_docs/google/api/monitoring.rb index b0ddd0e4aa56..666ca63971d3 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/monitoring.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/monitoring.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-service_usage-v1/proto_docs/google/api/quota.rb b/google-cloud-service_usage-v1/proto_docs/google/api/quota.rb index 5f078b7b4b6e..410251c03d80 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/quota.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/quota.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-service_usage-v1/proto_docs/google/api/resource.rb b/google-cloud-service_usage-v1/proto_docs/google/api/resource.rb index 85d0a8f50bba..25dec4847ac1 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/resource.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-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.rb b/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.rb index 1346f80b65ca..7895c440ea25 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.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-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.rb b/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.rb index 765f8ceea30d..ac900c98b599 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.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-service_usage-v1/proto_docs/google/api/usage.rb b/google-cloud-service_usage-v1/proto_docs/google/api/usage.rb index 31b7892b2729..42ed23536d71 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/api/usage.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/api/usage.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-service_usage-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-service_usage-v1/proto_docs/google/longrunning/operations.rb index 50f11f9f36d6..7a757f512165 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/longrunning/operations.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-service_usage-v1/proto_docs/google/protobuf/any.rb b/google-cloud-service_usage-v1/proto_docs/google/protobuf/any.rb index 4fde75cec2aa..58691995f02e 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/protobuf/any.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-service_usage-v1/proto_docs/google/protobuf/api.rb b/google-cloud-service_usage-v1/proto_docs/google/protobuf/api.rb index b3a9019e2f54..e6e576b4cf8a 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/protobuf/api.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/protobuf/api.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. @@ -28,6 +28,11 @@ module Protobuf # sometimes simply referred to as "APIs" in other contexts, such as the name of # this message itself. See https://cloud.google.com/apis/design/glossary for # detailed terminology. + # + # New usages of this message as an alternative to ServiceDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. # @!attribute [rw] name # @return [::String] # The fully qualified name of this interface, including package name @@ -69,12 +74,20 @@ module Protobuf # @!attribute [rw] syntax # @return [::Google::Protobuf::Syntax] # The source syntax of the service. + # @!attribute [rw] edition + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. class Api include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Method represents a method of an API interface. + # + # New usages of this message as an alternative to MethodDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. # @!attribute [rw] name # @return [::String] # The simple name of this method. @@ -94,8 +107,19 @@ class Api # @return [::Array<::Google::Protobuf::Option>] # Any metadata attached to the method. # @!attribute [rw] syntax + # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Google::Protobuf::Syntax] # The source syntax of this method. + # + # This field should be ignored, instead the syntax should be inherited from + # Api. This is similar to Field and EnumValue. + # @!attribute [rw] edition + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # The source edition string, only valid when syntax is SYNTAX_EDITIONS. + # + # This field should be ignored, instead the edition should be inherited from + # Api. This is similar to Field and EnumValue. class Method include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.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-service_usage-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-service_usage-v1/proto_docs/google/protobuf/empty.rb index e63eb943257a..83e4481834a6 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/protobuf/empty.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-service_usage-v1/proto_docs/google/protobuf/source_context.rb b/google-cloud-service_usage-v1/proto_docs/google/protobuf/source_context.rb index 969dd39af67d..1bc7c0900aec 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/protobuf/source_context.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/protobuf/source_context.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-service_usage-v1/proto_docs/google/protobuf/struct.rb b/google-cloud-service_usage-v1/proto_docs/google/protobuf/struct.rb index e652d90148c0..39e1aca868d2 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/protobuf/struct.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-service_usage-v1/proto_docs/google/protobuf/type.rb b/google-cloud-service_usage-v1/proto_docs/google/protobuf/type.rb index 4ed8acf7d6a4..c9c8ea649289 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/protobuf/type.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/protobuf/type.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. @@ -20,6 +20,11 @@ module Google module Protobuf # A protocol buffer message type. + # + # New usages of this message as an alternative to DescriptorProto are strongly + # discouraged. This message does not reliability preserve all information + # necessary to model the schema and preserve semantics. Instead make use of + # FileDescriptorSet which preserves the necessary information. # @!attribute [rw] name # @return [::String] # The fully qualified message name. @@ -47,6 +52,11 @@ class Type end # A single field of a message type. + # + # New usages of this message as an alternative to FieldDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. # @!attribute [rw] kind # @return [::Google::Protobuf::Field::Kind] # The field type. @@ -160,6 +170,11 @@ module Cardinality end # Enum type definition. + # + # New usages of this message as an alternative to EnumDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. # @!attribute [rw] name # @return [::String] # Enum type name. @@ -184,6 +199,11 @@ class Enum end # Enum value definition. + # + # New usages of this message as an alternative to EnumValueDescriptorProto are + # strongly discouraged. This message does not reliability preserve all + # information necessary to model the schema and preserve semantics. Instead + # make use of FileDescriptorSet which preserves the necessary information. # @!attribute [rw] name # @return [::String] # Enum value name. @@ -200,6 +220,10 @@ class EnumValue # A protocol buffer option, which can be attached to a message, field, # enumeration, etc. + # + # New usages of this message as an alternative to FileOptions, MessageOptions, + # FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions + # are strongly discouraged. # @!attribute [rw] name # @return [::String] # The option's name. For protobuf built-in options (options defined in diff --git a/google-cloud-service_usage-v1/proto_docs/google/rpc/status.rb b/google-cloud-service_usage-v1/proto_docs/google/rpc/status.rb index 1db3524e2da2..c1a1c07eb2db 100644 --- a/google-cloud-service_usage-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-service_usage-v1/proto_docs/google/rpc/status.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-service_usage-v1/snippets/Gemfile b/google-cloud-service_usage-v1/snippets/Gemfile index 3d09996abe23..d5e54b2240b0 100755 --- a/google-cloud-service_usage-v1/snippets/Gemfile +++ b/google-cloud-service_usage-v1/snippets/Gemfile @@ -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-service_usage-v1/snippets/service_usage/batch_enable_services.rb b/google-cloud-service_usage-v1/snippets/service_usage/batch_enable_services.rb index 35919141be2d..3dca1ec69065 100755 --- a/google-cloud-service_usage-v1/snippets/service_usage/batch_enable_services.rb +++ b/google-cloud-service_usage-v1/snippets/service_usage/batch_enable_services.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-service_usage-v1/snippets/service_usage/batch_get_services.rb b/google-cloud-service_usage-v1/snippets/service_usage/batch_get_services.rb index 3350c1f9717b..86456494e1ce 100755 --- a/google-cloud-service_usage-v1/snippets/service_usage/batch_get_services.rb +++ b/google-cloud-service_usage-v1/snippets/service_usage/batch_get_services.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-service_usage-v1/snippets/service_usage/disable_service.rb b/google-cloud-service_usage-v1/snippets/service_usage/disable_service.rb index a00c89e5a749..5bc9366a51e6 100755 --- a/google-cloud-service_usage-v1/snippets/service_usage/disable_service.rb +++ b/google-cloud-service_usage-v1/snippets/service_usage/disable_service.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-service_usage-v1/snippets/service_usage/enable_service.rb b/google-cloud-service_usage-v1/snippets/service_usage/enable_service.rb index 25af02bd8f33..9d41562dd5d0 100755 --- a/google-cloud-service_usage-v1/snippets/service_usage/enable_service.rb +++ b/google-cloud-service_usage-v1/snippets/service_usage/enable_service.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-service_usage-v1/snippets/service_usage/get_service.rb b/google-cloud-service_usage-v1/snippets/service_usage/get_service.rb index d2821c2fcf14..81f2e0dc7fb9 100755 --- a/google-cloud-service_usage-v1/snippets/service_usage/get_service.rb +++ b/google-cloud-service_usage-v1/snippets/service_usage/get_service.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-service_usage-v1/snippets/service_usage/list_services.rb b/google-cloud-service_usage-v1/snippets/service_usage/list_services.rb index 3b977c651615..13e90b729e12 100755 --- a/google-cloud-service_usage-v1/snippets/service_usage/list_services.rb +++ b/google-cloud-service_usage-v1/snippets/service_usage/list_services.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-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_test.rb b/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_test.rb index 63b68277969f..a553f01fc551 100644 --- a/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_test.rb +++ b/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_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-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_test.rb b/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_test.rb index 71bbe94129e9..adc9b2fb6a9b 100644 --- a/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_test.rb +++ b/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_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-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_test.rb b/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_test.rb index bd9517a25f72..450e6e083a28 100644 --- a/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_test.rb +++ b/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_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-service_usage-v1/test/helper.rb b/google-cloud-service_usage-v1/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-cloud-service_usage-v1/test/helper.rb +++ b/google-cloud-service_usage-v1/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-shell-v1/.owlbot-manifest.json b/google-cloud-shell-v1/.owlbot-manifest.json index 34ba53777b6e..2a8c1f3e2af8 100644 --- a/google-cloud-shell-v1/.owlbot-manifest.json +++ b/google-cloud-shell-v1/.owlbot-manifest.json @@ -54,6 +54,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-shell-v1/.toys.rb b/google-cloud-shell-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-shell-v1/.toys.rb +++ b/google-cloud-shell-v1/.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-shell-v1/Rakefile b/google-cloud-shell-v1/Rakefile index a0e6f4c66784..fec628dc4e26 100644 --- a/google-cloud-shell-v1/Rakefile +++ b/google-cloud-shell-v1/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-shell-v1/lib/google-cloud-shell-v1.rb b/google-cloud-shell-v1/lib/google-cloud-shell-v1.rb index 2dab1514b595..4f94ddb87d3e 100644 --- a/google-cloud-shell-v1/lib/google-cloud-shell-v1.rb +++ b/google-cloud-shell-v1/lib/google-cloud-shell-v1.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-shell-v1/lib/google/cloud/shell/v1.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1.rb index 3929e3d5e011..c94c21ed2929 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1.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-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.rb index 10b547429c18..7e5d994d8637 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.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-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.rb index eb4645b2786b..4051e0f1f3fb 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.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-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.rb index 8527dedf61b4..c19294dbdf8e 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.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-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.rb index 566e99f90f65..e11349338763 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.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-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.rb index b93bb67bf499..f03f93ba390f 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.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-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.rb index 0a7d64b713a7..478c24d2218a 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.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-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.rb index 281d97d258fd..3e117501069f 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.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-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.rb index 8afb259de2e0..3187ad80f71c 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.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-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.rb index 767240e9d334..6b15a0548b64 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.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-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb index 230178342c43..a9cf73ced654 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/shell/v1/cloudshell.proto for package 'google.cloud.shell.v1' # Original file comments: -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.rb b/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.rb index 8e681dd5f3f6..a29fd5893233 100644 --- a/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.rb +++ b/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.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-shell-v1/proto_docs/google/api/client.rb b/google-cloud-shell-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-shell-v1/proto_docs/google/api/client.rb +++ b/google-cloud-shell-v1/proto_docs/google/api/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-shell-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-shell-v1/proto_docs/google/api/field_behavior.rb index 6be3cb0ed6c3..582be187d115 100644 --- a/google-cloud-shell-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-shell-v1/proto_docs/google/api/field_behavior.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-shell-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-shell-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-shell-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-shell-v1/proto_docs/google/api/launch_stage.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-shell-v1/proto_docs/google/api/resource.rb b/google-cloud-shell-v1/proto_docs/google/api/resource.rb index 85d0a8f50bba..25dec4847ac1 100644 --- a/google-cloud-shell-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-shell-v1/proto_docs/google/api/resource.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-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.rb b/google-cloud-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.rb index a8a8fa6fa78d..56848a1f0233 100644 --- a/google-cloud-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.rb +++ b/google-cloud-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.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-shell-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-shell-v1/proto_docs/google/longrunning/operations.rb index 50f11f9f36d6..7a757f512165 100644 --- a/google-cloud-shell-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-shell-v1/proto_docs/google/longrunning/operations.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-shell-v1/proto_docs/google/protobuf/any.rb b/google-cloud-shell-v1/proto_docs/google/protobuf/any.rb index 4fde75cec2aa..58691995f02e 100644 --- a/google-cloud-shell-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-shell-v1/proto_docs/google/protobuf/any.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-shell-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-shell-v1/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-shell-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-shell-v1/proto_docs/google/protobuf/duration.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-shell-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-shell-v1/proto_docs/google/protobuf/empty.rb index e63eb943257a..83e4481834a6 100644 --- a/google-cloud-shell-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-shell-v1/proto_docs/google/protobuf/empty.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-shell-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-shell-v1/proto_docs/google/protobuf/timestamp.rb index 626cd5e0bf3a..e58202461f88 100644 --- a/google-cloud-shell-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-shell-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-shell-v1/proto_docs/google/rpc/status.rb b/google-cloud-shell-v1/proto_docs/google/rpc/status.rb index 1db3524e2da2..c1a1c07eb2db 100644 --- a/google-cloud-shell-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-shell-v1/proto_docs/google/rpc/status.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-shell-v1/snippets/Gemfile b/google-cloud-shell-v1/snippets/Gemfile index abe47da68fef..bf1674af9c6d 100755 --- a/google-cloud-shell-v1/snippets/Gemfile +++ b/google-cloud-shell-v1/snippets/Gemfile @@ -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-shell-v1/snippets/cloud_shell_service/add_public_key.rb b/google-cloud-shell-v1/snippets/cloud_shell_service/add_public_key.rb index c27b27ed6f13..da6e75c81361 100755 --- a/google-cloud-shell-v1/snippets/cloud_shell_service/add_public_key.rb +++ b/google-cloud-shell-v1/snippets/cloud_shell_service/add_public_key.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-shell-v1/snippets/cloud_shell_service/authorize_environment.rb b/google-cloud-shell-v1/snippets/cloud_shell_service/authorize_environment.rb index 963ac8869a31..b16bf5d9babc 100755 --- a/google-cloud-shell-v1/snippets/cloud_shell_service/authorize_environment.rb +++ b/google-cloud-shell-v1/snippets/cloud_shell_service/authorize_environment.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-shell-v1/snippets/cloud_shell_service/get_environment.rb b/google-cloud-shell-v1/snippets/cloud_shell_service/get_environment.rb index 9f9820243bdb..c36b2f501286 100755 --- a/google-cloud-shell-v1/snippets/cloud_shell_service/get_environment.rb +++ b/google-cloud-shell-v1/snippets/cloud_shell_service/get_environment.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-shell-v1/snippets/cloud_shell_service/remove_public_key.rb b/google-cloud-shell-v1/snippets/cloud_shell_service/remove_public_key.rb index 9dd1cf0f23a4..aefbd90a0735 100755 --- a/google-cloud-shell-v1/snippets/cloud_shell_service/remove_public_key.rb +++ b/google-cloud-shell-v1/snippets/cloud_shell_service/remove_public_key.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-shell-v1/snippets/cloud_shell_service/start_environment.rb b/google-cloud-shell-v1/snippets/cloud_shell_service/start_environment.rb index 93e280ae0c24..4f91952a7a8c 100755 --- a/google-cloud-shell-v1/snippets/cloud_shell_service/start_environment.rb +++ b/google-cloud-shell-v1/snippets/cloud_shell_service/start_environment.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-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_test.rb b/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_test.rb index 9e486bf5d0bc..5749a70f2d54 100644 --- a/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_test.rb +++ b/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_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-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_test.rb b/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_test.rb index ed928e5d904b..04962e8b8cea 100644 --- a/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_test.rb +++ b/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_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-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_test.rb b/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_test.rb index 98269b19503b..bf9df56a12a7 100644 --- a/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_test.rb +++ b/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_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-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_test.rb b/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_test.rb index ea36292ca43c..a2ff907f6c85 100644 --- a/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_test.rb +++ b/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_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-shell-v1/test/helper.rb b/google-cloud-shell-v1/test/helper.rb index 9ead73a4e10a..4fb6756ac7e2 100644 --- a/google-cloud-shell-v1/test/helper.rb +++ b/google-cloud-shell-v1/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-spanner-admin-database-v1/.owlbot-manifest.json b/google-cloud-spanner-admin-database-v1/.owlbot-manifest.json index 383b5620c5be..06e23f29072b 100644 --- a/google-cloud-spanner-admin-database-v1/.owlbot-manifest.json +++ b/google-cloud-spanner-admin-database-v1/.owlbot-manifest.json @@ -88,6 +88,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-spanner-admin-database-v1/.toys.rb b/google-cloud-spanner-admin-database-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-spanner-admin-database-v1/.toys.rb +++ b/google-cloud-spanner-admin-database-v1/.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-spanner-admin-database-v1/Rakefile b/google-cloud-spanner-admin-database-v1/Rakefile index bdddc8854d7a..49214abd44ec 100644 --- a/google-cloud-spanner-admin-database-v1/Rakefile +++ b/google-cloud-spanner-admin-database-v1/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-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.rb b/google-cloud-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.rb index 47e50925e4af..4a1420305d7f 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.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-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.rb index f8b06c77ca24..ab4f375dca61 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.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-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.rb index 9237f738a52b..31d5189b1b85 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.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-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb index d4dd81495cb9..8ce5e1e179bd 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.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-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb index e7a1d9cd8109..b3c941a3dbff 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.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-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb index b52099214072..1ab3e2d17a2c 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.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-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb index fe08c43a6f10..ca3d3e310737 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.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-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb index c8e356fca93e..1d9a8d24707b 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.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-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb index e9148a9a7415..d691caea026c 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.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-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb index f4a6ba368634..59a81545701e 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.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-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb index 247157074876..1322d594b811 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.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-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.rb b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.rb index 2a122c5fd5cf..d33ad82d059e 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.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-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb b/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb index 194ab7b96ab8..84dcc83177fd 100644 --- a/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +++ b/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/spanner/admin/database/v1/spanner_database_admin.proto for package 'Google.Cloud.Spanner.Admin.Database.V1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner-admin-database-v1/proto_docs/google/api/client.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/api/client.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/api/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-spanner-admin-database-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/api/field_behavior.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-spanner-admin-database-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/api/launch_stage.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-spanner-admin-database-v1/proto_docs/google/api/resource.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/api/resource.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-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.rb index 3999076cd8c2..5445c77f8258 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.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-spanner-admin-database-v1/proto_docs/google/iam/v1/options.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/options.rb index e8720a105bca..60713d995b86 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/options.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-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.rb index 3e6a8d5d47d9..999575b797df 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.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-spanner-admin-database-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/longrunning/operations.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-spanner-admin-database-v1/proto_docs/google/protobuf/any.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/any.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-spanner-admin-database-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/duration.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-spanner-admin-database-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/empty.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-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.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-spanner-admin-database-v1/proto_docs/google/protobuf/struct.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/struct.rb index b8b33e5c8cec..39e1aca868d2 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/struct.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-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.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-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.rb index 251f089aaa45..e94d6cbaa8e3 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.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-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb index 1da7f96c0ce2..99370211c6c5 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.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-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.rb index 6836efc9da78..7deaa30f1933 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.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-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb index ac524090f132..4c996f50b61f 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.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-spanner-admin-database-v1/proto_docs/google/type/expr.rb b/google-cloud-spanner-admin-database-v1/proto_docs/google/type/expr.rb index 066f228c22f0..53e7733b6592 100644 --- a/google-cloud-spanner-admin-database-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-spanner-admin-database-v1/proto_docs/google/type/expr.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-spanner-admin-database-v1/snippets/Gemfile b/google-cloud-spanner-admin-database-v1/snippets/Gemfile index ec399a67f590..9f880b7cd501 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/Gemfile +++ b/google-cloud-spanner-admin-database-v1/snippets/Gemfile @@ -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-spanner-admin-database-v1/snippets/database_admin/add_split_points.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/add_split_points.rb index 13127a2c201c..b40f9ed68996 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/add_split_points.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/add_split_points.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-spanner-admin-database-v1/snippets/database_admin/copy_backup.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/copy_backup.rb index 0fff37d3819d..4f5d4e196698 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/copy_backup.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/copy_backup.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-spanner-admin-database-v1/snippets/database_admin/create_backup.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup.rb index 0c1dc2feb3b9..7bdb66daafbb 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup.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-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.rb index 097fae377396..0e52ad4acecc 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.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-spanner-admin-database-v1/snippets/database_admin/create_database.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_database.rb index 607835e12c63..7071ecb8f557 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_database.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_database.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-spanner-admin-database-v1/snippets/database_admin/delete_backup.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup.rb index cc7dbe1419b0..4193a0014644 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup.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-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.rb index e813a4665ed1..60427f4241f3 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.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-spanner-admin-database-v1/snippets/database_admin/drop_database.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/drop_database.rb index db9d1b3cf7b2..7d960d68517c 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/drop_database.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/drop_database.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-spanner-admin-database-v1/snippets/database_admin/get_backup.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup.rb index e00a9420a409..45401693ebdb 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup.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-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.rb index 48a15424b17e..29edea9a86fa 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.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-spanner-admin-database-v1/snippets/database_admin/get_database.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database.rb index c3a4b094d6d3..cee9d27e148b 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database.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-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.rb index e44473c12181..0bcdf7f40932 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.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-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.rb index 1ccadc19ad0f..ec196400f896 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.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-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb index 464b146a0625..d28d071db2e0 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.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-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.rb index eb2098ec6b84..aa01ffea3aca 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.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-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.rb index 2a8d7b1683e3..bbb680f5318f 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.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-spanner-admin-database-v1/snippets/database_admin/list_backups.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backups.rb index df1ba1072a88..db27cb097f7c 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backups.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backups.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-spanner-admin-database-v1/snippets/database_admin/list_database_operations.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_operations.rb index 2eccea062e68..2bc09405f027 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_operations.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_operations.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-spanner-admin-database-v1/snippets/database_admin/list_database_roles.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_roles.rb index a7288f549417..0c3f79067aae 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_roles.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_roles.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-spanner-admin-database-v1/snippets/database_admin/list_databases.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_databases.rb index 45216b01d0e1..6fc0fc085df9 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_databases.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_databases.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-spanner-admin-database-v1/snippets/database_admin/restore_database.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/restore_database.rb index 8b5f8c6a3efb..29fba6511896 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/restore_database.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/restore_database.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-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.rb index c046e29db333..c009dea6b085 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.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-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.rb index f2f824a966fa..0758fe97ccf3 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.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-spanner-admin-database-v1/snippets/database_admin/update_backup.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup.rb index c84d6afb02ba..0d378479ff72 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup.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-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.rb index 3978328e01a6..25c121a40b2e 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.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-spanner-admin-database-v1/snippets/database_admin/update_database.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database.rb index da7027a4ae48..7e8b003939c4 100644 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database.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-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.rb b/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.rb index 79b28b37ab96..16bc289eab58 100755 --- a/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.rb +++ b/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.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-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_test.rb b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_test.rb index c8a8595bd284..4761219864bf 100644 --- a/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_test.rb +++ b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_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-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_test.rb b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_test.rb index cbf4f48ed176..5c96b14460f0 100644 --- a/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_test.rb +++ b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_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-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb index dd00e962736e..143ae5b632e5 100644 --- a/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb +++ b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_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-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb index 0fc86236ed69..c684ea03954b 100644 --- a/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb +++ b/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_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-spanner-admin-database-v1/test/helper.rb b/google-cloud-spanner-admin-database-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-spanner-admin-database-v1/test/helper.rb +++ b/google-cloud-spanner-admin-database-v1/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-spanner-admin-instance-v1/.owlbot-manifest.json b/google-cloud-spanner-admin-instance-v1/.owlbot-manifest.json index 7dfb61303c41..b59e8f2ef06c 100644 --- a/google-cloud-spanner-admin-instance-v1/.owlbot-manifest.json +++ b/google-cloud-spanner-admin-instance-v1/.owlbot-manifest.json @@ -77,6 +77,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-spanner-admin-instance-v1/.toys.rb b/google-cloud-spanner-admin-instance-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-spanner-admin-instance-v1/.toys.rb +++ b/google-cloud-spanner-admin-instance-v1/.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-spanner-admin-instance-v1/Rakefile b/google-cloud-spanner-admin-instance-v1/Rakefile index d150be98d14a..ec4f0e71b11c 100644 --- a/google-cloud-spanner-admin-instance-v1/Rakefile +++ b/google-cloud-spanner-admin-instance-v1/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-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.rb b/google-cloud-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.rb index fe41494c0952..31e76b3589b3 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.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-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.rb index dbd80a5c9f24..36a77f21a4d3 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.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-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb index 806c6537ee20..80c300501ca9 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.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-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb index 5857c9f843b5..0d6216cdec1f 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.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-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb index 76d704851fed..f1cfbb949203 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.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-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb index 86a2946e8b03..400c0ee971d4 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.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-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb index cd8f13a0ebec..58eb65bcfcfe 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.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-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.rb index 4cb3a0326e07..17c9131daf5d 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.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-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.rb index 51f4a5ff9129..2b3a9223a425 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.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-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb index 6394b8678095..e2943c53c438 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.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-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.rb index ddcb324adbaa..7f927a943f3e 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.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-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.rb b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.rb index ace6cbdf5724..bc6ad4b7dcf4 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.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-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb b/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb index 7e1893b74317..d5b8848f47b8 100644 --- a/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb +++ b/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/spanner/admin/instance/v1/spanner_instance_admin.proto for package 'Google.Cloud.Spanner.Admin.Instance.V1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/client.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/client.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/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-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.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-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.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-spanner-admin-instance-v1/proto_docs/google/api/resource.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/resource.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-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.rb index 3999076cd8c2..5445c77f8258 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.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-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.rb index e8720a105bca..60713d995b86 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.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-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.rb index 3e6a8d5d47d9..999575b797df 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.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-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.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-spanner-admin-instance-v1/proto_docs/google/protobuf/any.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/any.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-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.rb index dcc4a8a3c05b..ea59f1f91daf 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.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-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.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-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.rb index ebb9a5299d1c..7f3ffc78601a 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.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-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.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-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.rb index 7e44d89b6bfb..12175e5866ba 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.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-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb index 5e0ba915a36d..d59b84381c11 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.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-spanner-admin-instance-v1/proto_docs/google/type/expr.rb b/google-cloud-spanner-admin-instance-v1/proto_docs/google/type/expr.rb index 066f228c22f0..53e7733b6592 100644 --- a/google-cloud-spanner-admin-instance-v1/proto_docs/google/type/expr.rb +++ b/google-cloud-spanner-admin-instance-v1/proto_docs/google/type/expr.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-spanner-admin-instance-v1/snippets/Gemfile b/google-cloud-spanner-admin-instance-v1/snippets/Gemfile index 591dbb8ac5b0..948960481f0c 100755 --- a/google-cloud-spanner-admin-instance-v1/snippets/Gemfile +++ b/google-cloud-spanner-admin-instance-v1/snippets/Gemfile @@ -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-spanner-admin-instance-v1/snippets/instance_admin/create_instance.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance.rb index f0a72426922b..2348ff40f605 100755 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance.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-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.rb index 84b651c857f5..c3a27669fdae 100644 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.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-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.rb index c1e42d855880..d21b55b5b196 100644 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.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-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.rb index 9a6040f098f5..69724c0b1606 100755 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.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-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.rb index 9daeb036abd2..4a1f618dbf0e 100644 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.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-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.rb index 2b31cce30530..e0a538237a72 100644 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.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-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.rb index b9aa4d01fea5..87a8c0c3714a 100755 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.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-spanner-admin-instance-v1/snippets/instance_admin/get_instance.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance.rb index 455479849d77..a1cca2d1c9dc 100755 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance.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-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.rb index c98b603341e7..ba21ffeef8ab 100755 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.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-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.rb index 691d2c17703c..9654b300ce3f 100644 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.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-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.rb index 7d3fd0ad22b7..a43ab8906614 100644 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.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-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.rb index e300c15d68dd..ebe64e95ead6 100755 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.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-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.rb index ee6a97dc3e89..a30b5cab92b1 100644 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.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-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.rb index c249fb37e364..7a571906f7d2 100644 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.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-spanner-admin-instance-v1/snippets/instance_admin/list_instances.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instances.rb index acb74927bc62..07eef9c99042 100755 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instances.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instances.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-spanner-admin-instance-v1/snippets/instance_admin/move_instance.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/move_instance.rb index 548594539275..d1260ae8c95f 100644 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/move_instance.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/move_instance.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-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.rb index 660952eadcf7..bf36a3b73464 100755 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.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-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.rb index a4eff565fb6e..4f9cc75a5905 100755 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.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-spanner-admin-instance-v1/snippets/instance_admin/update_instance.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance.rb index dbee1cad17a6..16786ba2e441 100755 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance.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-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.rb index 83dc94d91504..4dcaf1b12731 100644 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.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-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.rb b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.rb index 6fe2df1a4d44..38c1442fe587 100644 --- a/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.rb +++ b/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.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-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_test.rb b/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_test.rb index c96c6d7600b0..78ddb3575d25 100644 --- a/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_test.rb +++ b/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_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-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_test.rb b/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_test.rb index d3cfda991db9..25bc1dce8a0a 100644 --- a/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_test.rb +++ b/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_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-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_test.rb b/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_test.rb index 865f34e6b5aa..9965df42fc4e 100644 --- a/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_test.rb +++ b/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_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-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_test.rb b/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_test.rb index 2157ad6a8341..e2faccbfe761 100644 --- a/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_test.rb +++ b/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_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-spanner-admin-instance-v1/test/helper.rb b/google-cloud-spanner-admin-instance-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-spanner-admin-instance-v1/test/helper.rb +++ b/google-cloud-spanner-admin-instance-v1/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-spanner-v1/.owlbot-manifest.json b/google-cloud-spanner-v1/.owlbot-manifest.json index 8419c8a0eae7..44325c94a53e 100644 --- a/google-cloud-spanner-v1/.owlbot-manifest.json +++ b/google-cloud-spanner-v1/.owlbot-manifest.json @@ -76,6 +76,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-spanner-v1/.toys.rb b/google-cloud-spanner-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-spanner-v1/.toys.rb +++ b/google-cloud-spanner-v1/.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-spanner-v1/Rakefile b/google-cloud-spanner-v1/Rakefile index ee88fde3cac9..b18de45c0a03 100644 --- a/google-cloud-spanner-v1/Rakefile +++ b/google-cloud-spanner-v1/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-spanner-v1/lib/google-cloud-spanner-v1.rb b/google-cloud-spanner-v1/lib/google-cloud-spanner-v1.rb index 704f4c9863f6..2f3a79fec01f 100644 --- a/google-cloud-spanner-v1/lib/google-cloud-spanner-v1.rb +++ b/google-cloud-spanner-v1/lib/google-cloud-spanner-v1.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-spanner-v1/lib/google/cloud/spanner/v1.rb b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1.rb index dac24a33ac72..031d8a0b49f6 100644 --- a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1.rb +++ b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1.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-spanner-v1/lib/google/cloud/spanner/v1/spanner.rb b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner.rb index 70103177383d..50df58fbcc65 100644 --- a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner.rb +++ b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner.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-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb index 5401588b23d7..7ef640279aff 100644 --- a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb +++ b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.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-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.rb b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.rb index d2623844d8d8..1970ece8b929 100644 --- a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.rb +++ b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.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-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.rb b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.rb index 9288fed6b5fe..ef5cfd6c6bab 100644 --- a/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.rb +++ b/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.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-spanner-v1/lib/google/spanner/v1/spanner_services_pb.rb b/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_services_pb.rb index 8ed19b215635..d3e1adce404b 100644 --- a/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_services_pb.rb +++ b/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/spanner/v1/spanner.proto for package 'Google.Cloud.Spanner.V1' # Original file comments: -# 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-spanner-v1/proto_docs/google/api/client.rb b/google-cloud-spanner-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-spanner-v1/proto_docs/google/api/client.rb +++ b/google-cloud-spanner-v1/proto_docs/google/api/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-spanner-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-spanner-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-spanner-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-spanner-v1/proto_docs/google/api/field_behavior.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-spanner-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-spanner-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-spanner-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-spanner-v1/proto_docs/google/api/launch_stage.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-spanner-v1/proto_docs/google/api/resource.rb b/google-cloud-spanner-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-spanner-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-spanner-v1/proto_docs/google/api/resource.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-spanner-v1/proto_docs/google/protobuf/any.rb b/google-cloud-spanner-v1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-spanner-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-spanner-v1/proto_docs/google/protobuf/any.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-spanner-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-spanner-v1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-cloud-spanner-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-spanner-v1/proto_docs/google/protobuf/duration.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-spanner-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-spanner-v1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-spanner-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-spanner-v1/proto_docs/google/protobuf/empty.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-spanner-v1/proto_docs/google/protobuf/struct.rb b/google-cloud-spanner-v1/proto_docs/google/protobuf/struct.rb index 6fd3d60d108d..39e1aca868d2 100644 --- a/google-cloud-spanner-v1/proto_docs/google/protobuf/struct.rb +++ b/google-cloud-spanner-v1/proto_docs/google/protobuf/struct.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-spanner-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-spanner-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-spanner-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-spanner-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-spanner-v1/proto_docs/google/rpc/status.rb b/google-cloud-spanner-v1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-spanner-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-spanner-v1/proto_docs/google/rpc/status.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-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb index 811c1f8a886f..977e81d500bc 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.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-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb index 29c0a6add755..38ab0bf66244 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.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-spanner-v1/proto_docs/google/spanner/v1/keys.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/keys.rb index 909f2030d98e..5faebc2232ef 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/keys.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/keys.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-spanner-v1/proto_docs/google/spanner/v1/location.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/location.rb index 69bb3f736508..d79971bad844 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/location.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/location.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-spanner-v1/proto_docs/google/spanner/v1/mutation.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/mutation.rb index 0fb16f0fab57..5c0d3caa5bb8 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/mutation.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/mutation.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-spanner-v1/proto_docs/google/spanner/v1/query_plan.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/query_plan.rb index 41c4d0697e9b..a213c6fbe1d4 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/query_plan.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/query_plan.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-spanner-v1/proto_docs/google/spanner/v1/result_set.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/result_set.rb index 64eb6e7810d7..965cab4685b9 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/result_set.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/result_set.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-spanner-v1/proto_docs/google/spanner/v1/spanner.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/spanner.rb index a05d0c18fd1c..e2cb2f86f38a 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/spanner.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/spanner.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-spanner-v1/proto_docs/google/spanner/v1/transaction.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb index 1a4954b5b105..53ec83e49080 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.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-spanner-v1/proto_docs/google/spanner/v1/type.rb b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/type.rb index 26ab8850e923..693060eddddf 100644 --- a/google-cloud-spanner-v1/proto_docs/google/spanner/v1/type.rb +++ b/google-cloud-spanner-v1/proto_docs/google/spanner/v1/type.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-spanner-v1/snippets/Gemfile b/google-cloud-spanner-v1/snippets/Gemfile index 187619c2d446..77b0e1097706 100755 --- a/google-cloud-spanner-v1/snippets/Gemfile +++ b/google-cloud-spanner-v1/snippets/Gemfile @@ -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-spanner-v1/snippets/spanner/batch_create_sessions.rb b/google-cloud-spanner-v1/snippets/spanner/batch_create_sessions.rb index 22e991ddcf72..0586ea617219 100755 --- a/google-cloud-spanner-v1/snippets/spanner/batch_create_sessions.rb +++ b/google-cloud-spanner-v1/snippets/spanner/batch_create_sessions.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-spanner-v1/snippets/spanner/batch_write.rb b/google-cloud-spanner-v1/snippets/spanner/batch_write.rb index 68d71e9a4e51..b95914412706 100644 --- a/google-cloud-spanner-v1/snippets/spanner/batch_write.rb +++ b/google-cloud-spanner-v1/snippets/spanner/batch_write.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-spanner-v1/snippets/spanner/begin_transaction.rb b/google-cloud-spanner-v1/snippets/spanner/begin_transaction.rb index 78d5ac6f14bf..491b1932c86d 100755 --- a/google-cloud-spanner-v1/snippets/spanner/begin_transaction.rb +++ b/google-cloud-spanner-v1/snippets/spanner/begin_transaction.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-spanner-v1/snippets/spanner/commit.rb b/google-cloud-spanner-v1/snippets/spanner/commit.rb index 36dab0b6353b..bdef590c536b 100755 --- a/google-cloud-spanner-v1/snippets/spanner/commit.rb +++ b/google-cloud-spanner-v1/snippets/spanner/commit.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-spanner-v1/snippets/spanner/create_session.rb b/google-cloud-spanner-v1/snippets/spanner/create_session.rb index 972f9d889745..2978e20b708d 100755 --- a/google-cloud-spanner-v1/snippets/spanner/create_session.rb +++ b/google-cloud-spanner-v1/snippets/spanner/create_session.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-spanner-v1/snippets/spanner/delete_session.rb b/google-cloud-spanner-v1/snippets/spanner/delete_session.rb index 3ca0fa4d19a4..0fe6714eefc1 100755 --- a/google-cloud-spanner-v1/snippets/spanner/delete_session.rb +++ b/google-cloud-spanner-v1/snippets/spanner/delete_session.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-spanner-v1/snippets/spanner/execute_batch_dml.rb b/google-cloud-spanner-v1/snippets/spanner/execute_batch_dml.rb index 4eb9593d9c78..0dfff556a81d 100755 --- a/google-cloud-spanner-v1/snippets/spanner/execute_batch_dml.rb +++ b/google-cloud-spanner-v1/snippets/spanner/execute_batch_dml.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-spanner-v1/snippets/spanner/execute_sql.rb b/google-cloud-spanner-v1/snippets/spanner/execute_sql.rb index dc6d800a8454..25fda1b8ff3f 100755 --- a/google-cloud-spanner-v1/snippets/spanner/execute_sql.rb +++ b/google-cloud-spanner-v1/snippets/spanner/execute_sql.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-spanner-v1/snippets/spanner/execute_streaming_sql.rb b/google-cloud-spanner-v1/snippets/spanner/execute_streaming_sql.rb index d90c547056e6..e96077064cca 100755 --- a/google-cloud-spanner-v1/snippets/spanner/execute_streaming_sql.rb +++ b/google-cloud-spanner-v1/snippets/spanner/execute_streaming_sql.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-spanner-v1/snippets/spanner/get_session.rb b/google-cloud-spanner-v1/snippets/spanner/get_session.rb index a4a60a3edd90..57e3f09069af 100755 --- a/google-cloud-spanner-v1/snippets/spanner/get_session.rb +++ b/google-cloud-spanner-v1/snippets/spanner/get_session.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-spanner-v1/snippets/spanner/list_sessions.rb b/google-cloud-spanner-v1/snippets/spanner/list_sessions.rb index 3106c266060f..ad2e46e5db36 100755 --- a/google-cloud-spanner-v1/snippets/spanner/list_sessions.rb +++ b/google-cloud-spanner-v1/snippets/spanner/list_sessions.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-spanner-v1/snippets/spanner/partition_query.rb b/google-cloud-spanner-v1/snippets/spanner/partition_query.rb index b590859f3864..fe7511916bee 100755 --- a/google-cloud-spanner-v1/snippets/spanner/partition_query.rb +++ b/google-cloud-spanner-v1/snippets/spanner/partition_query.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-spanner-v1/snippets/spanner/partition_read.rb b/google-cloud-spanner-v1/snippets/spanner/partition_read.rb index 4394086aa988..548247d9a655 100755 --- a/google-cloud-spanner-v1/snippets/spanner/partition_read.rb +++ b/google-cloud-spanner-v1/snippets/spanner/partition_read.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-spanner-v1/snippets/spanner/read.rb b/google-cloud-spanner-v1/snippets/spanner/read.rb index 5e04bb9cdb09..e0ae8f6a89bd 100755 --- a/google-cloud-spanner-v1/snippets/spanner/read.rb +++ b/google-cloud-spanner-v1/snippets/spanner/read.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-spanner-v1/snippets/spanner/rollback.rb b/google-cloud-spanner-v1/snippets/spanner/rollback.rb index b4f340afc180..aa46e63322b9 100755 --- a/google-cloud-spanner-v1/snippets/spanner/rollback.rb +++ b/google-cloud-spanner-v1/snippets/spanner/rollback.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-spanner-v1/snippets/spanner/streaming_read.rb b/google-cloud-spanner-v1/snippets/spanner/streaming_read.rb index 1cf732283941..858dafcebeb7 100755 --- a/google-cloud-spanner-v1/snippets/spanner/streaming_read.rb +++ b/google-cloud-spanner-v1/snippets/spanner/streaming_read.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-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_test.rb b/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_test.rb index 5eafc889b679..f1898edbaf00 100644 --- a/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_test.rb +++ b/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_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-spanner-v1/test/google/cloud/spanner/v1/spanner_test.rb b/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_test.rb index f2e3c6e8b6f9..cb1799597ef6 100644 --- a/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_test.rb +++ b/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_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-spanner-v1/test/helper.rb b/google-cloud-spanner-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-spanner-v1/test/helper.rb +++ b/google-cloud-spanner-v1/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-speech-v1/.owlbot-manifest.json b/google-cloud-speech-v1/.owlbot-manifest.json index f5d31327cf23..8c6a438bff8c 100644 --- a/google-cloud-speech-v1/.owlbot-manifest.json +++ b/google-cloud-speech-v1/.owlbot-manifest.json @@ -80,6 +80,7 @@ ], "static": [ ".OwlBot.yaml", + "Gemfile.lock", "acceptance/data", "acceptance/google/cloud/speech/v1/speech_smoke_test.rb" ] diff --git a/google-cloud-speech-v1/.toys.rb b/google-cloud-speech-v1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-speech-v1/.toys.rb +++ b/google-cloud-speech-v1/.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-speech-v1/Rakefile b/google-cloud-speech-v1/Rakefile index ddd608a43993..4e0a18b9fab2 100644 --- a/google-cloud-speech-v1/Rakefile +++ b/google-cloud-speech-v1/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-speech-v1/lib/google-cloud-speech-v1.rb b/google-cloud-speech-v1/lib/google-cloud-speech-v1.rb index 11c5e95103af..203644080a2e 100644 --- a/google-cloud-speech-v1/lib/google-cloud-speech-v1.rb +++ b/google-cloud-speech-v1/lib/google-cloud-speech-v1.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-speech-v1/lib/google/cloud/speech/v1.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1.rb index f9f17907ee38..3a78a0bfcd8b 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1.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-speech-v1/lib/google/cloud/speech/v1/adaptation.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation.rb index ff1417a78fc0..13699cd76973 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation.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-speech-v1/lib/google/cloud/speech/v1/adaptation/client.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/client.rb index 8c055cce49b9..af6f3724ead2 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/client.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/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-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.rb index 2520993f2880..3d08fc44b076 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.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-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.rb index a7a74ac3e012..57c97718dd9d 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.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-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.rb index ef16285c05c4..3b9be5472f5a 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.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-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.rb index 8e9abc4d59a3..00bf27004afc 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.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-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb index a544c70f53ff..3eb09c2b9827 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.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-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb index 5484cd032960..9cc7add34e77 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/speech/v1/cloud_speech_adaptation.proto for package 'google.cloud.speech.v1' # Original file comments: -# Copyright 2022 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb index 5bcf2d64dd66..872e6df62f83 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/speech/v1/cloud_speech.proto for package 'google.cloud.speech.v1' # Original file comments: -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.rb index 37ee623469e8..b039262b9bb0 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.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-speech-v1/lib/google/cloud/speech/v1/speech.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech.rb index 6b3914c12c48..b88111d1fa2f 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech.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-speech-v1/lib/google/cloud/speech/v1/speech/client.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/client.rb index 955febe24268..78746525ea93 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/client.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/client.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-speech-v1/lib/google/cloud/speech/v1/speech/credentials.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/credentials.rb index ceec78cd1e00..b98a12db51ab 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/credentials.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/credentials.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-speech-v1/lib/google/cloud/speech/v1/speech/operations.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/operations.rb index 2ceac78bb4cc..153214386909 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/operations.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/operations.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-speech-v1/lib/google/cloud/speech/v1/speech/paths.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/paths.rb index 47cb74a7aa06..ae06954b3904 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/paths.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/paths.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-speech-v1/lib/google/cloud/speech/v1/speech/rest.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest.rb index e65f11379ff3..bf0e8c48b909 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest.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-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.rb index 0b014a64c519..c0a221dac348 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.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-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.rb index d02d596cb41d..610575fe6b03 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.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-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.rb b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.rb index 14ec4b4e0793..6394ec823985 100644 --- a/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.rb +++ b/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.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-speech-v1/proto_docs/google/api/client.rb b/google-cloud-speech-v1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-speech-v1/proto_docs/google/api/client.rb +++ b/google-cloud-speech-v1/proto_docs/google/api/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-speech-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-speech-v1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-speech-v1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-speech-v1/proto_docs/google/api/field_behavior.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-speech-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-speech-v1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-speech-v1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-speech-v1/proto_docs/google/api/launch_stage.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-speech-v1/proto_docs/google/api/resource.rb b/google-cloud-speech-v1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-speech-v1/proto_docs/google/api/resource.rb +++ b/google-cloud-speech-v1/proto_docs/google/api/resource.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-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.rb b/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.rb index f8bf3568841b..c7a315d42f57 100644 --- a/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.rb +++ b/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.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-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb b/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb index 1f8931f0a623..73416b556c1c 100644 --- a/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb +++ b/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.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-speech-v1/proto_docs/google/cloud/speech/v1/resource.rb b/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/resource.rb index 965b7fd868d1..91ddc97572db 100644 --- a/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/resource.rb +++ b/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/resource.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-speech-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-speech-v1/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-speech-v1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-speech-v1/proto_docs/google/longrunning/operations.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-speech-v1/proto_docs/google/protobuf/any.rb b/google-cloud-speech-v1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-speech-v1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-speech-v1/proto_docs/google/protobuf/any.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-speech-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-speech-v1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-cloud-speech-v1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-speech-v1/proto_docs/google/protobuf/duration.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-speech-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-speech-v1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-speech-v1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-speech-v1/proto_docs/google/protobuf/empty.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-speech-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-speech-v1/proto_docs/google/protobuf/field_mask.rb index 5f816f4a2702..7f3ffc78601a 100644 --- a/google-cloud-speech-v1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-speech-v1/proto_docs/google/protobuf/field_mask.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-speech-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-speech-v1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-speech-v1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-speech-v1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.rb b/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.rb index fe47f66f016f..9a7c0269fa42 100644 --- a/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.rb +++ b/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.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-speech-v1/proto_docs/google/rpc/status.rb b/google-cloud-speech-v1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-speech-v1/proto_docs/google/rpc/status.rb +++ b/google-cloud-speech-v1/proto_docs/google/rpc/status.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-speech-v1/snippets/Gemfile b/google-cloud-speech-v1/snippets/Gemfile index 172dcb0dd3c3..cbcc9d84c51b 100755 --- a/google-cloud-speech-v1/snippets/Gemfile +++ b/google-cloud-speech-v1/snippets/Gemfile @@ -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-speech-v1/snippets/adaptation/create_custom_class.rb b/google-cloud-speech-v1/snippets/adaptation/create_custom_class.rb index 6882d09c8709..fc51d3e2daca 100644 --- a/google-cloud-speech-v1/snippets/adaptation/create_custom_class.rb +++ b/google-cloud-speech-v1/snippets/adaptation/create_custom_class.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-speech-v1/snippets/adaptation/create_phrase_set.rb b/google-cloud-speech-v1/snippets/adaptation/create_phrase_set.rb index ab694ba4f9a1..7240501837bc 100644 --- a/google-cloud-speech-v1/snippets/adaptation/create_phrase_set.rb +++ b/google-cloud-speech-v1/snippets/adaptation/create_phrase_set.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-speech-v1/snippets/adaptation/delete_custom_class.rb b/google-cloud-speech-v1/snippets/adaptation/delete_custom_class.rb index 092a0fbda023..29e6c8d7cfb2 100644 --- a/google-cloud-speech-v1/snippets/adaptation/delete_custom_class.rb +++ b/google-cloud-speech-v1/snippets/adaptation/delete_custom_class.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-speech-v1/snippets/adaptation/delete_phrase_set.rb b/google-cloud-speech-v1/snippets/adaptation/delete_phrase_set.rb index c558ee564780..b2c8ad998b0b 100644 --- a/google-cloud-speech-v1/snippets/adaptation/delete_phrase_set.rb +++ b/google-cloud-speech-v1/snippets/adaptation/delete_phrase_set.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-speech-v1/snippets/adaptation/get_custom_class.rb b/google-cloud-speech-v1/snippets/adaptation/get_custom_class.rb index 6d059b9c0575..087735c5f1c5 100644 --- a/google-cloud-speech-v1/snippets/adaptation/get_custom_class.rb +++ b/google-cloud-speech-v1/snippets/adaptation/get_custom_class.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-speech-v1/snippets/adaptation/get_phrase_set.rb b/google-cloud-speech-v1/snippets/adaptation/get_phrase_set.rb index d5ffc1484e2a..25a23e7f955f 100644 --- a/google-cloud-speech-v1/snippets/adaptation/get_phrase_set.rb +++ b/google-cloud-speech-v1/snippets/adaptation/get_phrase_set.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-speech-v1/snippets/adaptation/list_custom_classes.rb b/google-cloud-speech-v1/snippets/adaptation/list_custom_classes.rb index 39b5d1f3b33e..dacfa57bd4ff 100644 --- a/google-cloud-speech-v1/snippets/adaptation/list_custom_classes.rb +++ b/google-cloud-speech-v1/snippets/adaptation/list_custom_classes.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-speech-v1/snippets/adaptation/list_phrase_set.rb b/google-cloud-speech-v1/snippets/adaptation/list_phrase_set.rb index 82078a46bfcd..44d69fb6efab 100644 --- a/google-cloud-speech-v1/snippets/adaptation/list_phrase_set.rb +++ b/google-cloud-speech-v1/snippets/adaptation/list_phrase_set.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-speech-v1/snippets/adaptation/update_custom_class.rb b/google-cloud-speech-v1/snippets/adaptation/update_custom_class.rb index 16e2ddadb035..2d1b25dcb582 100644 --- a/google-cloud-speech-v1/snippets/adaptation/update_custom_class.rb +++ b/google-cloud-speech-v1/snippets/adaptation/update_custom_class.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-speech-v1/snippets/adaptation/update_phrase_set.rb b/google-cloud-speech-v1/snippets/adaptation/update_phrase_set.rb index 4caec6ddb62f..ff2decbbb48a 100644 --- a/google-cloud-speech-v1/snippets/adaptation/update_phrase_set.rb +++ b/google-cloud-speech-v1/snippets/adaptation/update_phrase_set.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-speech-v1/snippets/speech/long_running_recognize.rb b/google-cloud-speech-v1/snippets/speech/long_running_recognize.rb index c1d7dc2bc0e6..5b94dc5d192e 100755 --- a/google-cloud-speech-v1/snippets/speech/long_running_recognize.rb +++ b/google-cloud-speech-v1/snippets/speech/long_running_recognize.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-speech-v1/snippets/speech/recognize.rb b/google-cloud-speech-v1/snippets/speech/recognize.rb index 7b520559dbce..20864502c3ca 100755 --- a/google-cloud-speech-v1/snippets/speech/recognize.rb +++ b/google-cloud-speech-v1/snippets/speech/recognize.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-speech-v1/snippets/speech/streaming_recognize.rb b/google-cloud-speech-v1/snippets/speech/streaming_recognize.rb index f14a6f69fbec..fa73922ac483 100755 --- a/google-cloud-speech-v1/snippets/speech/streaming_recognize.rb +++ b/google-cloud-speech-v1/snippets/speech/streaming_recognize.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-speech-v1/test/google/cloud/speech/v1/adaptation_paths_test.rb b/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_paths_test.rb index 972265445e07..952b7e04e59a 100644 --- a/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_paths_test.rb +++ b/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_paths_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-speech-v1/test/google/cloud/speech/v1/adaptation_rest_test.rb b/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_rest_test.rb index 467bd326b465..b424e2cedd56 100644 --- a/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_rest_test.rb +++ b/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_rest_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-speech-v1/test/google/cloud/speech/v1/adaptation_test.rb b/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_test.rb index 8e96493ec34e..b47a0ba500cc 100644 --- a/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_test.rb +++ b/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_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-speech-v1/test/google/cloud/speech/v1/speech_operations_test.rb b/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_operations_test.rb index e947d821cf27..b2460b275c23 100644 --- a/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_operations_test.rb +++ b/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_operations_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-speech-v1/test/google/cloud/speech/v1/speech_paths_test.rb b/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_paths_test.rb index 2ca4e8f61327..f90ecd2284cc 100644 --- a/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_paths_test.rb +++ b/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_paths_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-speech-v1/test/google/cloud/speech/v1/speech_rest_test.rb b/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_rest_test.rb index 89a147aa88d9..cb1414e847b8 100644 --- a/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_rest_test.rb +++ b/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_rest_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-speech-v1/test/google/cloud/speech/v1/speech_test.rb b/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_test.rb index bcddbd61f979..d978a343a0d6 100644 --- a/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_test.rb +++ b/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_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-speech-v1/test/helper.rb b/google-cloud-speech-v1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-speech-v1/test/helper.rb +++ b/google-cloud-speech-v1/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-speech-v1p1beta1/.owlbot-manifest.json b/google-cloud-speech-v1p1beta1/.owlbot-manifest.json index 25d9c5ffe6d1..766aa1822d48 100644 --- a/google-cloud-speech-v1p1beta1/.owlbot-manifest.json +++ b/google-cloud-speech-v1p1beta1/.owlbot-manifest.json @@ -80,6 +80,7 @@ ], "static": [ ".OwlBot.yaml", + "Gemfile.lock", "acceptance/data", "acceptance/google/cloud/speech/v1p1beta1/speech_smoke_test.rb" ] diff --git a/google-cloud-speech-v1p1beta1/.toys.rb b/google-cloud-speech-v1p1beta1/.toys.rb index 23434bdd5d5b..177e22456e8a 100644 --- a/google-cloud-speech-v1p1beta1/.toys.rb +++ b/google-cloud-speech-v1p1beta1/.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-speech-v1p1beta1/Rakefile b/google-cloud-speech-v1p1beta1/Rakefile index 073a0dde2824..0e12b1140bcd 100644 --- a/google-cloud-speech-v1p1beta1/Rakefile +++ b/google-cloud-speech-v1p1beta1/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-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.rb b/google-cloud-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.rb index a173e2b021c7..f30b25947a2c 100644 --- a/google-cloud-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.rb +++ b/google-cloud-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.rb index 61e0b71a7565..29aac12bfb2a 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.rb index 26759433c880..304cdacc9735 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb index 82904a922fb5..29510000f22d 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.rb index 2fbe77b3a493..0752ca8a8cf1 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.rb index 0470b11d464d..e5086c847d19 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.rb index 4dd8746a7686..06d9364c931d 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.rb index 89584c441c9c..526ddaf0816c 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.rb index da0d27802374..bd467300f761 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb index 4b0ba72adcd4..e7fe2aa9bbdf 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto for package 'google.cloud.speech.v1p1beta1' # Original file comments: -# Copyright 2021 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb index a2ecf8ee09fd..7a757ba1b34b 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/speech/v1p1beta1/cloud_speech.proto for package 'google.cloud.speech.v1p1beta1' # Original file comments: -# Copyright 2020 Google LLC +# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.rb index 6493046567b4..6c94920321b1 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.rb index db68e1f31d03..bd0aec88faf2 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.rb index a8688dee9ec5..f7dedf02534f 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.rb index 250ce0d3675f..f83c21f0ed37 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.rb index 2f8a8862a099..05f9fca7becb 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.rb index 1e07944dc4dc..9e690dc1410d 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.rb index 492da80425e2..cd4e47947364 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.rb index 0df02dca1e79..d364abfd7fa0 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.rb index e0ff47edf51e..6db77cbcb4d0 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.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-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.rb b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.rb index 84d800572b73..5822dffd5c1b 100644 --- a/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.rb +++ b/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.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-speech-v1p1beta1/proto_docs/google/api/client.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/api/client.rb index e62ceba4577a..3ab0b096d445 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/api/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-speech-v1p1beta1/proto_docs/google/api/field_behavior.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/api/field_behavior.rb index 3cd276eede47..582be187d115 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/api/field_behavior.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/api/field_behavior.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-speech-v1p1beta1/proto_docs/google/api/launch_stage.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/api/launch_stage.rb index ce75038366ae..9392a413fb1b 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/api/launch_stage.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/api/launch_stage.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-speech-v1p1beta1/proto_docs/google/api/resource.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/api/resource.rb index af0983c52ba2..25dec4847ac1 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/api/resource.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/api/resource.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-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb index 4b41112f6af3..00d8a38fa769 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.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-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb index 80c9b2918081..9d33bec8a1dd 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.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-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.rb index 1d525b3c36e9..09887768ca8a 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.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-speech-v1p1beta1/proto_docs/google/longrunning/operations.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/longrunning/operations.rb index f9f0f3ba2d98..7a757f512165 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/longrunning/operations.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/longrunning/operations.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-speech-v1p1beta1/proto_docs/google/protobuf/any.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/any.rb index 9e50df6c6015..58691995f02e 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/any.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/any.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-speech-v1p1beta1/proto_docs/google/protobuf/duration.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/duration.rb index 3f4f62c87f74..ea59f1f91daf 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/duration.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/duration.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-speech-v1p1beta1/proto_docs/google/protobuf/empty.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/empty.rb index ca2f9be17110..83e4481834a6 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/empty.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/empty.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-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.rb index 3db2d8f80bab..7f3ffc78601a 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.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-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.rb index 4891104f14b9..e58202461f88 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.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. @@ -110,14 +110,15 @@ module Protobuf # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). # @!attribute [rw] nanos # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 + # Non-negative fractions of a second at nanosecond resolution. This field is + # the nanosecond portion of the duration, not an alternative to seconds. + # Negative second values with fractions must still have non-negative nanos + # values that count forward in time. Must be between 0 and 999,999,999 # inclusive. class Timestamp include ::Google::Protobuf::MessageExts diff --git a/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.rb index fe47f66f016f..9a7c0269fa42 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.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-speech-v1p1beta1/proto_docs/google/rpc/status.rb b/google-cloud-speech-v1p1beta1/proto_docs/google/rpc/status.rb index 05ce4dd53aa6..c1a1c07eb2db 100644 --- a/google-cloud-speech-v1p1beta1/proto_docs/google/rpc/status.rb +++ b/google-cloud-speech-v1p1beta1/proto_docs/google/rpc/status.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-speech-v1p1beta1/snippets/Gemfile b/google-cloud-speech-v1p1beta1/snippets/Gemfile index 9856684ac160..4acec445659b 100755 --- a/google-cloud-speech-v1p1beta1/snippets/Gemfile +++ b/google-cloud-speech-v1p1beta1/snippets/Gemfile @@ -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-speech-v1p1beta1/snippets/adaptation/create_custom_class.rb b/google-cloud-speech-v1p1beta1/snippets/adaptation/create_custom_class.rb index 31bceef536c5..5c73bb5dd521 100755 --- a/google-cloud-speech-v1p1beta1/snippets/adaptation/create_custom_class.rb +++ b/google-cloud-speech-v1p1beta1/snippets/adaptation/create_custom_class.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-speech-v1p1beta1/snippets/adaptation/create_phrase_set.rb b/google-cloud-speech-v1p1beta1/snippets/adaptation/create_phrase_set.rb index 201df2564c7d..7d85b9d76fde 100755 --- a/google-cloud-speech-v1p1beta1/snippets/adaptation/create_phrase_set.rb +++ b/google-cloud-speech-v1p1beta1/snippets/adaptation/create_phrase_set.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-speech-v1p1beta1/snippets/adaptation/delete_custom_class.rb b/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_custom_class.rb index 26f745b3aa36..4093e3e479b3 100755 --- a/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_custom_class.rb +++ b/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_custom_class.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-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.rb b/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.rb index 901eb4ac60b5..742847acd058 100755 --- a/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.rb +++ b/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.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-speech-v1p1beta1/snippets/adaptation/get_custom_class.rb b/google-cloud-speech-v1p1beta1/snippets/adaptation/get_custom_class.rb index 4e9ba2b79dc5..67374d53dcb0 100755 --- a/google-cloud-speech-v1p1beta1/snippets/adaptation/get_custom_class.rb +++ b/google-cloud-speech-v1p1beta1/snippets/adaptation/get_custom_class.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-speech-v1p1beta1/snippets/adaptation/get_phrase_set.rb b/google-cloud-speech-v1p1beta1/snippets/adaptation/get_phrase_set.rb index 21559b27936b..292ba87e414c 100755 --- a/google-cloud-speech-v1p1beta1/snippets/adaptation/get_phrase_set.rb +++ b/google-cloud-speech-v1p1beta1/snippets/adaptation/get_phrase_set.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-speech-v1p1beta1/snippets/adaptation/list_custom_classes.rb b/google-cloud-speech-v1p1beta1/snippets/adaptation/list_custom_classes.rb index f824694ebba5..0bc4f30f6be8 100755 --- a/google-cloud-speech-v1p1beta1/snippets/adaptation/list_custom_classes.rb +++ b/google-cloud-speech-v1p1beta1/snippets/adaptation/list_custom_classes.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-speech-v1p1beta1/snippets/adaptation/list_phrase_set.rb b/google-cloud-speech-v1p1beta1/snippets/adaptation/list_phrase_set.rb index e4f1a693ecc9..6ad4f5cc6487 100755 --- a/google-cloud-speech-v1p1beta1/snippets/adaptation/list_phrase_set.rb +++ b/google-cloud-speech-v1p1beta1/snippets/adaptation/list_phrase_set.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-speech-v1p1beta1/snippets/adaptation/update_custom_class.rb b/google-cloud-speech-v1p1beta1/snippets/adaptation/update_custom_class.rb index 9d94b0d043ba..6cf5ff2deb0c 100755 --- a/google-cloud-speech-v1p1beta1/snippets/adaptation/update_custom_class.rb +++ b/google-cloud-speech-v1p1beta1/snippets/adaptation/update_custom_class.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-speech-v1p1beta1/snippets/adaptation/update_phrase_set.rb b/google-cloud-speech-v1p1beta1/snippets/adaptation/update_phrase_set.rb index 8a736b535ca0..4b35a1ba1fff 100755 --- a/google-cloud-speech-v1p1beta1/snippets/adaptation/update_phrase_set.rb +++ b/google-cloud-speech-v1p1beta1/snippets/adaptation/update_phrase_set.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-speech-v1p1beta1/snippets/speech/long_running_recognize.rb b/google-cloud-speech-v1p1beta1/snippets/speech/long_running_recognize.rb index cace73255efb..eb1d313092dd 100755 --- a/google-cloud-speech-v1p1beta1/snippets/speech/long_running_recognize.rb +++ b/google-cloud-speech-v1p1beta1/snippets/speech/long_running_recognize.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-speech-v1p1beta1/snippets/speech/recognize.rb b/google-cloud-speech-v1p1beta1/snippets/speech/recognize.rb index 1db3e18ef9e8..cd26986de973 100755 --- a/google-cloud-speech-v1p1beta1/snippets/speech/recognize.rb +++ b/google-cloud-speech-v1p1beta1/snippets/speech/recognize.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-speech-v1p1beta1/snippets/speech/streaming_recognize.rb b/google-cloud-speech-v1p1beta1/snippets/speech/streaming_recognize.rb index 15e74476411a..719413e3c9a3 100755 --- a/google-cloud-speech-v1p1beta1/snippets/speech/streaming_recognize.rb +++ b/google-cloud-speech-v1p1beta1/snippets/speech/streaming_recognize.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-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_test.rb b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_test.rb index 1ef510a8db7c..5b544b26135c 100644 --- a/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_test.rb +++ b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_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-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_test.rb b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_test.rb index bdaa0ddf909d..edcb942810ca 100644 --- a/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_test.rb +++ b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_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-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_test.rb b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_test.rb index 6f6333ade587..45d5c248278e 100644 --- a/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_test.rb +++ b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_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-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_test.rb b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_test.rb index 6a3c2b1093be..9b7d530e92fd 100644 --- a/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_test.rb +++ b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_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-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_test.rb b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_test.rb index 047125c9ef3d..9572a99afe91 100644 --- a/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_test.rb +++ b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_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-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_test.rb b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_test.rb index 33d47b50fd87..64c9cc539b53 100644 --- a/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_test.rb +++ b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_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-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_test.rb b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_test.rb index 830000e8787f..a6e3e98d8da1 100644 --- a/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_test.rb +++ b/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_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-speech-v1p1beta1/test/helper.rb b/google-cloud-speech-v1p1beta1/test/helper.rb index 9d59e7f6d179..4fb6756ac7e2 100644 --- a/google-cloud-speech-v1p1beta1/test/helper.rb +++ b/google-cloud-speech-v1p1beta1/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-secret_manager-v1beta1/.gitignore b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/.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-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.repo-metadata.json deleted file mode 100644 index bae754636e19..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/.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-v1beta1/latest", - "distribution_name": "google-cloud-secret_manager-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "secretmanager", - "name_pretty": "Secret Manager V1beta1 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. Note that google-cloud-secret_manager-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secret_manager instead. See the readme for more details.", - "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-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.rubocop.yml deleted file mode 100644 index 7f3f3a64f5cf..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-secret_manager-v1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-secret_manager-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/.yardopts b/owl-bot-staging/google-cloud-secret_manager-v1beta1/.yardopts deleted file mode 100644 index 78441fd84b43..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Secret Manager V1beta1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-secret_manager-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 755a69b7bf72..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-secret_manager-v1beta1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-secret_manager-v1beta1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/secret_manager/v1beta1" - -client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/secret_manager/v1beta1" - -::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-secret_manager-v1beta1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/secret_manager/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-secret_manager-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/Gemfile b/owl-bot-staging/google-cloud-secret_manager-v1beta1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-secret_manager-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/README.md b/owl-bot-staging/google-cloud-secret_manager-v1beta1/README.md deleted file mode 100644 index 34823d1f4db7..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Secret Manager V1beta1 API - -Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security. - -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. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Secret Manager V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-secret_manager](https://rubygems.org/gems/google-cloud-secret_manager). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-secret_manager-v1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/secretmanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/secret_manager/v1beta1" - -client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new -request = ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new # (request fields as keyword arguments...) -response = client.list_secrets request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/secret-manager) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/secret_manager/v1beta1" -require "logger" - -client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-secret_manager`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-secret_manager-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-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-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-secret_manager-v1beta1/Rakefile b/owl-bot-staging/google-cloud-secret_manager-v1beta1/Rakefile deleted file mode 100644 index 48d5c1256eec..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-secret_manager-v1beta1 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/v1beta1/secret_manager_service/credentials" - ::Google::Cloud::SecretManager::V1beta1::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-v1beta1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-secret_manager-v1beta1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-secret_manager-v1beta1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-secret_manager-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-secret_manager-v1beta1" - header "google-cloud-secret_manager-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-secret_manager-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-secret_manager-v1beta1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-secret_manager-v1beta1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-secret_manager-v1beta1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-secret_manager-v1beta1/gapic_metadata.json deleted file mode 100644 index baf3eab359db..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.secrets.v1beta1", - "libraryPackage": "::Google::Cloud::SecretManager::V1beta1", - "services": { - "SecretManagerService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client", - "rpcs": { - "ListSecrets": { - "methods": [ - "list_secrets" - ] - }, - "CreateSecret": { - "methods": [ - "create_secret" - ] - }, - "AddSecretVersion": { - "methods": [ - "add_secret_version" - ] - }, - "GetSecret": { - "methods": [ - "get_secret" - ] - }, - "UpdateSecret": { - "methods": [ - "update_secret" - ] - }, - "DeleteSecret": { - "methods": [ - "delete_secret" - ] - }, - "ListSecretVersions": { - "methods": [ - "list_secret_versions" - ] - }, - "GetSecretVersion": { - "methods": [ - "get_secret_version" - ] - }, - "AccessSecretVersion": { - "methods": [ - "access_secret_version" - ] - }, - "DisableSecretVersion": { - "methods": [ - "disable_secret_version" - ] - }, - "EnableSecretVersion": { - "methods": [ - "enable_secret_version" - ] - }, - "DestroySecretVersion": { - "methods": [ - "destroy_secret_version" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/google-cloud-secret_manager-v1beta1.gemspec b/owl-bot-staging/google-cloud-secret_manager-v1beta1/google-cloud-secret_manager-v1beta1.gemspec deleted file mode 100644 index 8736d60ccc3f..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/google-cloud-secret_manager-v1beta1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/secret_manager/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-secret_manager-v1beta1" - gem.version = Google::Cloud::SecretManager::V1beta1::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. Note that google-cloud-secret_manager-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secret_manager instead. See the readme for more details." - gem.summary = "Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google-cloud-secret_manager-v1beta1.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google-cloud-secret_manager-v1beta1.rb deleted file mode 100644 index 5e930f08a7d9..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google-cloud-secret_manager-v1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/secret_manager/v1beta1" diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1.rb deleted file mode 100644 index c73914ce8c82..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/secret_manager/v1beta1/secret_manager_service" -require "google/cloud/secret_manager/v1beta1/version" - -module Google - module Cloud - module SecretManager - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/secret_manager/v1beta1" - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/secret_manager/v1beta1" - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/secret_manager/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.rb deleted file mode 100644 index 0fadf3d51c06..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module SecretManager - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/secret_manager/v1beta1/rest" - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - module V1beta1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecretManager"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.rb deleted file mode 100644 index c97fa6acb0d9..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest" -require "google/cloud/secret_manager/v1beta1/bindings_override" -require "google/cloud/secret_manager/v1beta1/version" - -module Google - module Cloud - module SecretManager - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/secret_manager/v1beta1/rest" - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - module V1beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.rb deleted file mode 100644 index 7973da8d921f..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/secret_manager/v1beta1/version" - -require "google/cloud/secret_manager/v1beta1/secret_manager_service/credentials" -require "google/cloud/secret_manager/v1beta1/secret_manager_service/paths" -require "google/cloud/secret_manager/v1beta1/secret_manager_service/client" -require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest" - -module Google - module Cloud - module SecretManager - module V1beta1 - ## - # Secret Manager Service - # - # Manages secrets and operations using those secrets. Implements a REST - # model with the following objects: - # - # * {::Google::Cloud::SecretManager::V1beta1::Secret Secret} - # * {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/secret_manager/v1beta1/secret_manager_service" - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest" - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - module SecretManagerService - end - end - end - end -end - -helper_path = ::File.join __dir__, "secret_manager_service", "helpers.rb" -require "google/cloud/secret_manager/v1beta1/secret_manager_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb deleted file mode 100644 index 9d84a4a7f262..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/client.rb +++ /dev/null @@ -1,1944 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/secrets/v1beta1/service_pb" -require "google/cloud/location" - -module Google - module Cloud - module SecretManager - module V1beta1 - module SecretManagerService - ## - # Client for the SecretManagerService service. - # - # Secret Manager Service - # - # Manages secrets and operations using those secrets. Implements a REST - # model with the following objects: - # - # * {::Google::Cloud::SecretManager::V1beta1::Secret Secret} - # * {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "secretmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :secret_manager_service_stub - - ## - # Configure the SecretManagerService Client class. - # - # See {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecretManagerService clients - # ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecretManager", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_secrets.timeout = 60.0 - - default_config.rpcs.create_secret.timeout = 60.0 - - default_config.rpcs.add_secret_version.timeout = 60.0 - - default_config.rpcs.get_secret.timeout = 60.0 - - default_config.rpcs.update_secret.timeout = 60.0 - - default_config.rpcs.delete_secret.timeout = 60.0 - - default_config.rpcs.list_secret_versions.timeout = 60.0 - - default_config.rpcs.get_secret_version.timeout = 60.0 - - default_config.rpcs.access_secret_version.timeout = 60.0 - default_config.rpcs.access_secret_version.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.disable_secret_version.timeout = 60.0 - - default_config.rpcs.enable_secret_version.timeout = 60.0 - - default_config.rpcs.destroy_secret_version.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.get_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecretManagerService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @secret_manager_service_stub.universe_domain - end - - ## - # Create a new SecretManagerService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecretManagerService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/secrets/v1beta1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @secret_manager_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @secret_manager_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @secret_manager_service_stub.endpoint - config.universe_domain = @secret_manager_service_stub.universe_domain - config.logger = @secret_manager_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @secret_manager_service_stub.logger - end - - # Service calls - - ## - # Lists {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}. - # - # @overload list_secrets(request, options = nil) - # Pass arguments to `list_secrets` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_secrets(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_secrets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}, in the format `projects/*`. - # @param page_size [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::Secret>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::Secret>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new - # - # # Call the list_secrets method. - # result = client.list_secrets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecretManager::V1beta1::Secret. - # p item - # end - # - def list_secrets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_secrets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_secrets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_secrets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :list_secrets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new {::Google::Cloud::SecretManager::V1beta1::Secret Secret} containing no - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. - # - # @overload create_secret(request, options = nil) - # Pass arguments to `create_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_secret(parent: nil, secret_id: nil, secret: nil) - # Pass arguments to `create_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project to associate with the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format `projects/*`. - # @param secret_id [::String] - # Required. This must be unique within the project. - # - # A secret ID is a string with a maximum length of 255 characters and can - # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and - # underscore (`_`) characters. - # @param secret [::Google::Cloud::SecretManager::V1beta1::Secret, ::Hash] - # Required. A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with initial - # field values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::Secret] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::Secret] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new - # - # # Call the create_secret method. - # result = client.create_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. - # p result - # - def create_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_secret.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :create_secret, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} - # containing secret data and attaches it to an existing - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # @overload add_secret_version(request, options = nil) - # Pass arguments to `add_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload add_secret_version(parent: nil, payload: nil) - # Pass arguments to `add_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to associate with the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format - # `projects/*/secrets/*`. - # @param payload [::Google::Cloud::SecretManager::V1beta1::SecretPayload, ::Hash] - # Required. The secret payload of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new - # - # # Call the add_secret_version method. - # result = client.add_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p result - # - def add_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.add_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.add_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.add_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :add_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata for a given {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # @overload get_secret(request, options = nil) - # Pass arguments to `get_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::GetSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::GetSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_secret(name: nil) - # Pass arguments to `get_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format - # `projects/*/secrets/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::Secret] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::Secret] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new - # - # # Call the get_secret method. - # result = client.get_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. - # p result - # - def get_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_secret.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :get_secret, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates metadata of an existing - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # @overload update_secret(request, options = nil) - # Pass arguments to `update_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_secret(secret: nil, update_mask: nil) - # Pass arguments to `update_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param secret [::Google::Cloud::SecretManager::V1beta1::Secret, ::Hash] - # Required. {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with updated field - # values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Specifies the fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::Secret] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::Secret] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new - # - # # Call the update_secret method. - # result = client.update_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. - # p result - # - def update_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.secret&.name - header_params["secret.name"] = request.secret.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_secret.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :update_secret, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # @overload delete_secret(request, options = nil) - # Pass arguments to `delete_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_secret(name: nil) - # Pass arguments to `delete_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to delete in the format - # `projects/*/secrets/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new - # - # # Call the delete_secret method. - # result = client.delete_secret request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_secret.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :delete_secret, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. This - # call does not return secret data. - # - # @overload list_secret_versions(request, options = nil) - # Pass arguments to `list_secret_versions` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_secret_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} associated with the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} to list, in - # the format `projects/*/secrets/*`. - # @param page_size [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # ListSecretVersionsResponse.next_page_token][]. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::SecretVersion>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::SecretVersion>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new - # - # # Call the list_secret_versions method. - # result = client.list_secret_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p item - # end - # - def list_secret_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_secret_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_secret_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_secret_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :list_secret_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata for a - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # `projects/*/secrets/*/versions/latest` is an alias to the `latest` - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # @overload get_secret_version(request, options = nil) - # Pass arguments to `get_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_secret_version(name: nil) - # Pass arguments to `get_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format - # `projects/*/secrets/*/versions/*`. - # `projects/*/secrets/*/versions/latest` is an alias to the `latest` - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new - # - # # Call the get_secret_version method. - # result = client.get_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p result - # - def get_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :get_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accesses a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # This call returns the secret data. - # - # `projects/*/secrets/*/versions/latest` is an alias to the `latest` - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # @overload access_secret_version(request, options = nil) - # Pass arguments to `access_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload access_secret_version(name: nil) - # Pass arguments to `access_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format - # `projects/*/secrets/*/versions/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new - # - # # Call the access_secret_version method. - # result = client.access_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse. - # p result - # - def access_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.access_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.access_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.access_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :access_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disables a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DISABLED DISABLED}. - # - # @overload disable_secret_version(request, options = nil) - # Pass arguments to `disable_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload disable_secret_version(name: nil) - # Pass arguments to `disable_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to disable in - # the format `projects/*/secrets/*/versions/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new - # - # # Call the disable_secret_version method. - # result = client.disable_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p result - # - def disable_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.disable_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.disable_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :disable_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enables a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::ENABLED ENABLED}. - # - # @overload enable_secret_version(request, options = nil) - # Pass arguments to `enable_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enable_secret_version(name: nil) - # Pass arguments to `enable_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to enable in - # the format `projects/*/secrets/*/versions/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new - # - # # Call the enable_secret_version method. - # result = client.enable_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p result - # - def enable_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enable_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.enable_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :enable_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Destroys a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED} and - # irrevocably destroys the secret data. - # - # @overload destroy_secret_version(request, options = nil) - # Pass arguments to `destroy_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload destroy_secret_version(name: nil) - # Pass arguments to `destroy_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to destroy in - # the format `projects/*/secrets/*/versions/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new - # - # # Call the destroy_secret_version method. - # result = client.destroy_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p result - # - def destroy_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.destroy_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.destroy_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.destroy_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :destroy_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified secret. Replaces any - # existing policy. - # - # Permissions on {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} - # are enforced according to the policy set on the associated - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a secret. - # Returns empty policy if the secret exists and does not have a policy set. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has for the specified secret. - # If the secret does not exist, this call returns an empty set of - # permissions, not a NOT_FOUND error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecretManagerService API. - # - # This class represents the configuration for SecretManagerService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_secrets to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_secrets.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_secrets.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "secretmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the SecretManagerService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_secrets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_secrets - ## - # RPC-specific configuration for `create_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :create_secret - ## - # RPC-specific configuration for `add_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :add_secret_version - ## - # RPC-specific configuration for `get_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :get_secret - ## - # RPC-specific configuration for `update_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :update_secret - ## - # RPC-specific configuration for `delete_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_secret - ## - # RPC-specific configuration for `list_secret_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_secret_versions - ## - # RPC-specific configuration for `get_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_secret_version - ## - # RPC-specific configuration for `access_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :access_secret_version - ## - # RPC-specific configuration for `disable_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_secret_version - ## - # RPC-specific configuration for `enable_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_secret_version - ## - # RPC-specific configuration for `destroy_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :destroy_secret_version - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_secrets_config = parent_rpcs.list_secrets if parent_rpcs.respond_to? :list_secrets - @list_secrets = ::Gapic::Config::Method.new list_secrets_config - create_secret_config = parent_rpcs.create_secret if parent_rpcs.respond_to? :create_secret - @create_secret = ::Gapic::Config::Method.new create_secret_config - add_secret_version_config = parent_rpcs.add_secret_version if parent_rpcs.respond_to? :add_secret_version - @add_secret_version = ::Gapic::Config::Method.new add_secret_version_config - get_secret_config = parent_rpcs.get_secret if parent_rpcs.respond_to? :get_secret - @get_secret = ::Gapic::Config::Method.new get_secret_config - update_secret_config = parent_rpcs.update_secret if parent_rpcs.respond_to? :update_secret - @update_secret = ::Gapic::Config::Method.new update_secret_config - delete_secret_config = parent_rpcs.delete_secret if parent_rpcs.respond_to? :delete_secret - @delete_secret = ::Gapic::Config::Method.new delete_secret_config - list_secret_versions_config = parent_rpcs.list_secret_versions if parent_rpcs.respond_to? :list_secret_versions - @list_secret_versions = ::Gapic::Config::Method.new list_secret_versions_config - get_secret_version_config = parent_rpcs.get_secret_version if parent_rpcs.respond_to? :get_secret_version - @get_secret_version = ::Gapic::Config::Method.new get_secret_version_config - access_secret_version_config = parent_rpcs.access_secret_version if parent_rpcs.respond_to? :access_secret_version - @access_secret_version = ::Gapic::Config::Method.new access_secret_version_config - disable_secret_version_config = parent_rpcs.disable_secret_version if parent_rpcs.respond_to? :disable_secret_version - @disable_secret_version = ::Gapic::Config::Method.new disable_secret_version_config - enable_secret_version_config = parent_rpcs.enable_secret_version if parent_rpcs.respond_to? :enable_secret_version - @enable_secret_version = ::Gapic::Config::Method.new enable_secret_version_config - destroy_secret_version_config = parent_rpcs.destroy_secret_version if parent_rpcs.respond_to? :destroy_secret_version - @destroy_secret_version = ::Gapic::Config::Method.new destroy_secret_version_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.rb deleted file mode 100644 index 3fe96f0aee79..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module SecretManager - module V1beta1 - module SecretManagerService - # Credentials for the SecretManagerService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SECRET_MANAGER_CREDENTIALS", - "SECRET_MANAGER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SECRET_MANAGER_CREDENTIALS_JSON", - "SECRET_MANAGER_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.rb deleted file mode 100644 index 504b57a7a147..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/paths.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1beta1 - module SecretManagerService - # Path helper methods for the SecretManagerService API. - module Paths - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified Secret resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/secrets/{secret}` - # - # @param project [String] - # @param secret [String] - # - # @return [::String] - def secret_path project:, secret: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/secrets/#{secret}" - end - - ## - # Create a fully-qualified SecretVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/secrets/{secret}/versions/{secret_version}` - # - # @param project [String] - # @param secret [String] - # @param secret_version [String] - # - # @return [::String] - def secret_version_path project:, secret:, secret_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" - - "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.rb deleted file mode 100644 index 06dc1cced025..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/secret_manager/v1beta1/version" -require "google/cloud/secret_manager/v1beta1/bindings_override" - -require "google/cloud/secret_manager/v1beta1/secret_manager_service/credentials" -require "google/cloud/secret_manager/v1beta1/secret_manager_service/paths" -require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client" - -module Google - module Cloud - module SecretManager - module V1beta1 - ## - # Secret Manager Service - # - # Manages secrets and operations using those secrets. Implements a REST - # model with the following objects: - # - # * {::Google::Cloud::SecretManager::V1beta1::Secret Secret} - # * {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest" - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - module SecretManagerService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb deleted file mode 100644 index 8f9b19c07538..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/client.rb +++ /dev/null @@ -1,1804 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/secrets/v1beta1/service_pb" -require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module SecretManager - module V1beta1 - module SecretManagerService - module Rest - ## - # REST client for the SecretManagerService service. - # - # Secret Manager Service - # - # Manages secrets and operations using those secrets. Implements a REST - # model with the following objects: - # - # * {::Google::Cloud::SecretManager::V1beta1::Secret Secret} - # * {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "secretmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :secret_manager_service_stub - - ## - # Configure the SecretManagerService Client class. - # - # See {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecretManagerService clients - # ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecretManager", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_secrets.timeout = 60.0 - - default_config.rpcs.create_secret.timeout = 60.0 - - default_config.rpcs.add_secret_version.timeout = 60.0 - - default_config.rpcs.get_secret.timeout = 60.0 - - default_config.rpcs.update_secret.timeout = 60.0 - - default_config.rpcs.delete_secret.timeout = 60.0 - - default_config.rpcs.list_secret_versions.timeout = 60.0 - - default_config.rpcs.get_secret_version.timeout = 60.0 - - default_config.rpcs.access_secret_version.timeout = 60.0 - default_config.rpcs.access_secret_version.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.disable_secret_version.timeout = 60.0 - - default_config.rpcs.enable_secret_version.timeout = 60.0 - - default_config.rpcs.destroy_secret_version.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.get_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecretManagerService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @secret_manager_service_stub.universe_domain - end - - ## - # Create a new SecretManagerService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecretManagerService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @secret_manager_service_stub = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @secret_manager_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @secret_manager_service_stub.endpoint - config.universe_domain = @secret_manager_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @secret_manager_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @secret_manager_service_stub.logger - end - - # Service calls - - ## - # Lists {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}. - # - # @overload list_secrets(request, options = nil) - # Pass arguments to `list_secrets` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_secrets(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_secrets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}, in the format `projects/*`. - # @param page_size [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::Secret>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::Secret>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new - # - # # Call the list_secrets method. - # result = client.list_secrets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecretManager::V1beta1::Secret. - # p item - # end - # - def list_secrets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_secrets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_secrets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_secrets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.list_secrets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, "secrets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new {::Google::Cloud::SecretManager::V1beta1::Secret Secret} containing no - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. - # - # @overload create_secret(request, options = nil) - # Pass arguments to `create_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_secret(parent: nil, secret_id: nil, secret: nil) - # Pass arguments to `create_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project to associate with the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format `projects/*`. - # @param secret_id [::String] - # Required. This must be unique within the project. - # - # A secret ID is a string with a maximum length of 255 characters and can - # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and - # underscore (`_`) characters. - # @param secret [::Google::Cloud::SecretManager::V1beta1::Secret, ::Hash] - # Required. A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with initial - # field values. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::Secret] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new - # - # # Call the create_secret method. - # result = client.create_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. - # p result - # - def create_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_secret.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.create_secret request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} - # containing secret data and attaches it to an existing - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # @overload add_secret_version(request, options = nil) - # Pass arguments to `add_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload add_secret_version(parent: nil, payload: nil) - # Pass arguments to `add_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to associate with the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format - # `projects/*/secrets/*`. - # @param payload [::Google::Cloud::SecretManager::V1beta1::SecretPayload, ::Hash] - # Required. The secret payload of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new - # - # # Call the add_secret_version method. - # result = client.add_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p result - # - def add_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.add_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.add_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.add_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.add_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata for a given {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # @overload get_secret(request, options = nil) - # Pass arguments to `get_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::GetSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::GetSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_secret(name: nil) - # Pass arguments to `get_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format - # `projects/*/secrets/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::Secret] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new - # - # # Call the get_secret method. - # result = client.get_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. - # p result - # - def get_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_secret.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.get_secret request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates metadata of an existing - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # @overload update_secret(request, options = nil) - # Pass arguments to `update_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_secret(secret: nil, update_mask: nil) - # Pass arguments to `update_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param secret [::Google::Cloud::SecretManager::V1beta1::Secret, ::Hash] - # Required. {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with updated field - # values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Specifies the fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::Secret] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new - # - # # Call the update_secret method. - # result = client.update_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. - # p result - # - def update_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_secret.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.update_secret request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # @overload delete_secret(request, options = nil) - # Pass arguments to `delete_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_secret(name: nil) - # Pass arguments to `delete_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to delete in the format - # `projects/*/secrets/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new - # - # # Call the delete_secret method. - # result = client.delete_secret request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_secret.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.delete_secret request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. This - # call does not return secret data. - # - # @overload list_secret_versions(request, options = nil) - # Pass arguments to `list_secret_versions` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_secret_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} associated with the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} to list, in - # the format `projects/*/secrets/*`. - # @param page_size [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # ListSecretVersionsResponse.next_page_token][]. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::SecretVersion>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta1::SecretVersion>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new - # - # # Call the list_secret_versions method. - # result = client.list_secret_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p item - # end - # - def list_secret_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_secret_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_secret_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_secret_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.list_secret_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, "versions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata for a - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # `projects/*/secrets/*/versions/latest` is an alias to the `latest` - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # @overload get_secret_version(request, options = nil) - # Pass arguments to `get_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_secret_version(name: nil) - # Pass arguments to `get_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format - # `projects/*/secrets/*/versions/*`. - # `projects/*/secrets/*/versions/latest` is an alias to the `latest` - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new - # - # # Call the get_secret_version method. - # result = client.get_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p result - # - def get_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.get_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accesses a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # This call returns the secret data. - # - # `projects/*/secrets/*/versions/latest` is an alias to the `latest` - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # @overload access_secret_version(request, options = nil) - # Pass arguments to `access_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload access_secret_version(name: nil) - # Pass arguments to `access_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format - # `projects/*/secrets/*/versions/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new - # - # # Call the access_secret_version method. - # result = client.access_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse. - # p result - # - def access_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.access_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.access_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.access_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.access_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disables a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DISABLED DISABLED}. - # - # @overload disable_secret_version(request, options = nil) - # Pass arguments to `disable_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload disable_secret_version(name: nil) - # Pass arguments to `disable_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to disable in - # the format `projects/*/secrets/*/versions/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new - # - # # Call the disable_secret_version method. - # result = client.disable_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p result - # - def disable_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.disable_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.disable_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.disable_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enables a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::ENABLED ENABLED}. - # - # @overload enable_secret_version(request, options = nil) - # Pass arguments to `enable_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enable_secret_version(name: nil) - # Pass arguments to `enable_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to enable in - # the format `projects/*/secrets/*/versions/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new - # - # # Call the enable_secret_version method. - # result = client.enable_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p result - # - def enable_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enable_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.enable_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.enable_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Destroys a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED} and - # irrevocably destroys the secret data. - # - # @overload destroy_secret_version(request, options = nil) - # Pass arguments to `destroy_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload destroy_secret_version(name: nil) - # Pass arguments to `destroy_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to destroy in - # the format `projects/*/secrets/*/versions/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new - # - # # Call the destroy_secret_version method. - # result = client.destroy_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - # p result - # - def destroy_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.destroy_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.destroy_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.destroy_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.destroy_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified secret. Replaces any - # existing policy. - # - # Permissions on {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} - # are enforced according to the policy set on the associated - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a secret. - # Returns empty policy if the secret exists and does not have a policy set. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has for the specified secret. - # If the secret does not exist, this call returns an empty set of - # permissions, not a NOT_FOUND error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecretManagerService REST API. - # - # This class represents the configuration for SecretManagerService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_secrets to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_secrets.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_secrets.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "secretmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the SecretManagerService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_secrets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_secrets - ## - # RPC-specific configuration for `create_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :create_secret - ## - # RPC-specific configuration for `add_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :add_secret_version - ## - # RPC-specific configuration for `get_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :get_secret - ## - # RPC-specific configuration for `update_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :update_secret - ## - # RPC-specific configuration for `delete_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_secret - ## - # RPC-specific configuration for `list_secret_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_secret_versions - ## - # RPC-specific configuration for `get_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_secret_version - ## - # RPC-specific configuration for `access_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :access_secret_version - ## - # RPC-specific configuration for `disable_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_secret_version - ## - # RPC-specific configuration for `enable_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_secret_version - ## - # RPC-specific configuration for `destroy_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :destroy_secret_version - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_secrets_config = parent_rpcs.list_secrets if parent_rpcs.respond_to? :list_secrets - @list_secrets = ::Gapic::Config::Method.new list_secrets_config - create_secret_config = parent_rpcs.create_secret if parent_rpcs.respond_to? :create_secret - @create_secret = ::Gapic::Config::Method.new create_secret_config - add_secret_version_config = parent_rpcs.add_secret_version if parent_rpcs.respond_to? :add_secret_version - @add_secret_version = ::Gapic::Config::Method.new add_secret_version_config - get_secret_config = parent_rpcs.get_secret if parent_rpcs.respond_to? :get_secret - @get_secret = ::Gapic::Config::Method.new get_secret_config - update_secret_config = parent_rpcs.update_secret if parent_rpcs.respond_to? :update_secret - @update_secret = ::Gapic::Config::Method.new update_secret_config - delete_secret_config = parent_rpcs.delete_secret if parent_rpcs.respond_to? :delete_secret - @delete_secret = ::Gapic::Config::Method.new delete_secret_config - list_secret_versions_config = parent_rpcs.list_secret_versions if parent_rpcs.respond_to? :list_secret_versions - @list_secret_versions = ::Gapic::Config::Method.new list_secret_versions_config - get_secret_version_config = parent_rpcs.get_secret_version if parent_rpcs.respond_to? :get_secret_version - @get_secret_version = ::Gapic::Config::Method.new get_secret_version_config - access_secret_version_config = parent_rpcs.access_secret_version if parent_rpcs.respond_to? :access_secret_version - @access_secret_version = ::Gapic::Config::Method.new access_secret_version_config - disable_secret_version_config = parent_rpcs.disable_secret_version if parent_rpcs.respond_to? :disable_secret_version - @disable_secret_version = ::Gapic::Config::Method.new disable_secret_version_config - enable_secret_version_config = parent_rpcs.enable_secret_version if parent_rpcs.respond_to? :enable_secret_version - @enable_secret_version = ::Gapic::Config::Method.new enable_secret_version_config - destroy_secret_version_config = parent_rpcs.destroy_secret_version if parent_rpcs.respond_to? :destroy_secret_version - @destroy_secret_version = ::Gapic::Config::Method.new destroy_secret_version_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb deleted file mode 100644 index 968f6c2a4fd6..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/secret_manager_service/rest/service_stub.rb +++ /dev/null @@ -1,1004 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/secrets/v1beta1/service_pb" - -module Google - module Cloud - module SecretManager - module V1beta1 - module SecretManagerService - module Rest - ## - # REST service stub for the SecretManagerService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_secrets REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse] - # A result object deserialized from the server's reply - def list_secrets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_secrets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_secrets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::Secret] - # A result object deserialized from the server's reply - def create_secret request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_secret_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_secret", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta1::Secret.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the add_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # A result object deserialized from the server's reply - def add_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_add_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "add_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::GetSecretRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::Secret] - # A result object deserialized from the server's reply - def get_secret request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_secret_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_secret", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta1::Secret.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::Secret] - # A result object deserialized from the server's reply - def update_secret request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_secret_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_secret", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta1::Secret.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_secret request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_secret_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_secret", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_secret_versions REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse] - # A result object deserialized from the server's reply - def list_secret_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_secret_versions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_secret_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # A result object deserialized from the server's reply - def get_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the access_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse] - # A result object deserialized from the server's reply - def access_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_access_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "access_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the disable_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # A result object deserialized from the server's reply - def disable_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "disable_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enable_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # A result object deserialized from the server's reply - def enable_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enable_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the destroy_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion] - # A result object deserialized from the server's reply - def destroy_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_destroy_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "destroy_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_secrets REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_secrets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/secrets", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_secret_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/secrets", - body: "secret", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the add_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_add_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}:addVersion", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::GetSecretRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_secret_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_secret_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{secret.name}", - body: "secret", - matches: [ - ["secret.name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_secret_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_secret_versions REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_secret_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the access_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_access_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}:access", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_disable_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:disable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enable_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:enable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the destroy_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_destroy_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:destroy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/version.rb deleted file mode 100644 index 9b5192150b89..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secret_manager/v1beta1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecretManager - module V1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/resources_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/resources_pb.rb deleted file mode 100644 index 0bc06c21b282..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/resources_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/secrets/v1beta1/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/secrets/v1beta1/resources.proto\x12\x1cgoogle.cloud.secrets.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd9\x02\n\x06Secret\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x0breplication\x18\x02 \x01(\x0b\x32).google.cloud.secrets.v1beta1.ReplicationB\x06\xe0\x41\x05\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x06labels\x18\x04 \x03(\x0b\x32\x30.google.cloud.secrets.v1beta1.Secret.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:M\xea\x41J\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\"\x90\x03\n\rSecretVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0c\x64\x65stroy_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x04 \x01(\x0e\x32\x31.google.cloud.secrets.v1beta1.SecretVersion.StateB\x03\xe0\x41\x03\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tDESTROYED\x10\x03:n\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\"\xc5\x02\n\x0bReplication\x12H\n\tautomatic\x18\x01 \x01(\x0b\x32\x33.google.cloud.secrets.v1beta1.Replication.AutomaticH\x00\x12M\n\x0cuser_managed\x18\x02 \x01(\x0b\x32\x35.google.cloud.secrets.v1beta1.Replication.UserManagedH\x00\x1a\x0b\n\tAutomatic\x1a\x80\x01\n\x0bUserManaged\x12T\n\x08replicas\x18\x01 \x03(\x0b\x32=.google.cloud.secrets.v1beta1.Replication.UserManaged.ReplicaB\x03\xe0\x41\x02\x1a\x1b\n\x07Replica\x12\x10\n\x08location\x18\x01 \x01(\tB\r\n\x0breplication\"\x1d\n\rSecretPayload\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x42\xee\x01\n&com.google.cloud.secretmanager.v1beta1B\x0eResourcesProtoP\x01Z:cloud.google.com/go/secrets/apiv1beta1/secretspb;secretspb\xa2\x02\x03GSM\xaa\x02\"Google.Cloud.SecretManager.V1Beta1\xca\x02\"Google\\Cloud\\SecretManager\\V1beta1\xea\x02%Google::Cloud::SecretManager::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecretManager - module V1beta1 - Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.Secret").msgclass - SecretVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.SecretVersion").msgclass - SecretVersion::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.SecretVersion.State").enummodule - Replication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.Replication").msgclass - Replication::Automatic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.Replication.Automatic").msgclass - Replication::UserManaged = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.Replication.UserManaged").msgclass - Replication::UserManaged::Replica = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.Replication.UserManaged.Replica").msgclass - SecretPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.SecretPayload").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_pb.rb deleted file mode 100644 index af5986516c2c..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/secrets/v1beta1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/secrets/v1beta1/resources_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n*google/cloud/secrets/v1beta1/service.proto\x12\x1cgoogle.cloud.secrets.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/secrets/v1beta1/resources.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x8a\x01\n\x12ListSecretsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\x13ListSecretsResponse\x12\x35\n\x07secrets\x18\x01 \x03(\x0b\x32$.google.cloud.secrets.v1beta1.Secret\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\xad\x01\n\x13\x43reateSecretRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tsecret_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06secret\x18\x03 \x01(\x0b\x32$.google.cloud.secrets.v1beta1.SecretB\x03\xe0\x41\x02\"\x99\x01\n\x17\x41\x64\x64SecretVersionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\x12\x41\n\x07payload\x18\x02 \x01(\x0b\x32+.google.cloud.secrets.v1beta1.SecretPayloadB\x03\xe0\x41\x02\"M\n\x10GetSecretRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\"\x89\x01\n\x19ListSecretVersionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n\x1aListSecretVersionsResponse\x12=\n\x08versions\x18\x01 \x03(\x0b\x32+.google.cloud.secrets.v1beta1.SecretVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"[\n\x17GetSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\x86\x01\n\x13UpdateSecretRequest\x12\x39\n\x06secret\x18\x01 \x01(\x0b\x32$.google.cloud.secrets.v1beta1.SecretB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"^\n\x1a\x41\x63\x63\x65ssSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\x9a\x01\n\x1b\x41\x63\x63\x65ssSecretVersionResponse\x12=\n\x04name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12<\n\x07payload\x18\x02 \x01(\x0b\x32+.google.cloud.secrets.v1beta1.SecretPayload\"P\n\x13\x44\x65leteSecretRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\"_\n\x1b\x44isableSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"^\n\x1a\x45nableSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"_\n\x1b\x44\x65stroySecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion2\x83\x16\n\x14SecretManagerService\x12\xa9\x01\n\x0bListSecrets\x12\x30.google.cloud.secrets.v1beta1.ListSecretsRequest\x1a\x31.google.cloud.secrets.v1beta1.ListSecretsResponse\"5\xda\x41\x06parent\x82\xd3\xe4\x93\x02&\x12$/v1beta1/{parent=projects/*}/secrets\x12\xb7\x01\n\x0c\x43reateSecret\x12\x31.google.cloud.secrets.v1beta1.CreateSecretRequest\x1a$.google.cloud.secrets.v1beta1.Secret\"N\xda\x41\x17parent,secret_id,secret\x82\xd3\xe4\x93\x02.\"$/v1beta1/{parent=projects/*}/secrets:\x06secret\x12\xc5\x01\n\x10\x41\x64\x64SecretVersion\x12\x35.google.cloud.secrets.v1beta1.AddSecretVersionRequest\x1a+.google.cloud.secrets.v1beta1.SecretVersion\"M\xda\x41\x0eparent,payload\x82\xd3\xe4\x93\x02\x36\"1/v1beta1/{parent=projects/*/secrets/*}:addVersion:\x01*\x12\x96\x01\n\tGetSecret\x12..google.cloud.secrets.v1beta1.GetSecretRequest\x1a$.google.cloud.secrets.v1beta1.Secret\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1beta1/{name=projects/*/secrets/*}\x12\xb9\x01\n\x0cUpdateSecret\x12\x31.google.cloud.secrets.v1beta1.UpdateSecretRequest\x1a$.google.cloud.secrets.v1beta1.Secret\"P\xda\x41\x12secret,update_mask\x82\xd3\xe4\x93\x02\x35\x32+/v1beta1/{secret.name=projects/*/secrets/*}:\x06secret\x12\x8e\x01\n\x0c\x44\x65leteSecret\x12\x31.google.cloud.secrets.v1beta1.DeleteSecretRequest\x1a\x16.google.protobuf.Empty\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&*$/v1beta1/{name=projects/*/secrets/*}\x12\xc9\x01\n\x12ListSecretVersions\x12\x37.google.cloud.secrets.v1beta1.ListSecretVersionsRequest\x1a\x38.google.cloud.secrets.v1beta1.ListSecretVersionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{parent=projects/*/secrets/*}/versions\x12\xb6\x01\n\x10GetSecretVersion\x12\x35.google.cloud.secrets.v1beta1.GetSecretVersionRequest\x1a+.google.cloud.secrets.v1beta1.SecretVersion\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{name=projects/*/secrets/*/versions/*}\x12\xd1\x01\n\x13\x41\x63\x63\x65ssSecretVersion\x12\x38.google.cloud.secrets.v1beta1.AccessSecretVersionRequest\x1a\x39.google.cloud.secrets.v1beta1.AccessSecretVersionResponse\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta1/{name=projects/*/secrets/*/versions/*}:access\x12\xc9\x01\n\x14\x44isableSecretVersion\x12\x39.google.cloud.secrets.v1beta1.DisableSecretVersionRequest\x1a+.google.cloud.secrets.v1beta1.SecretVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1beta1/{name=projects/*/secrets/*/versions/*}:disable:\x01*\x12\xc6\x01\n\x13\x45nableSecretVersion\x12\x38.google.cloud.secrets.v1beta1.EnableSecretVersionRequest\x1a+.google.cloud.secrets.v1beta1.SecretVersion\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/secrets/*/versions/*}:enable:\x01*\x12\xc9\x01\n\x14\x44\x65stroySecretVersion\x12\x39.google.cloud.secrets.v1beta1.DestroySecretVersionRequest\x1a+.google.cloud.secrets.v1beta1.SecretVersion\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1beta1/{name=projects/*/secrets/*/versions/*}:destroy:\x01*\x12\x8b\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"@\x82\xd3\xe4\x93\x02:\"5/v1beta1/{resource=projects/*/secrets/*}:setIamPolicy:\x01*\x12\x88\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"=\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta1/{resource=projects/*/secrets/*}:getIamPolicy\x12\xb1\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"F\x82\xd3\xe4\x93\x02@\";/v1beta1/{resource=projects/*/secrets/*}:testIamPermissions:\x01*\x1aP\xca\x41\x1csecretmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xec\x01\n&com.google.cloud.secretmanager.v1beta1B\x0cServiceProtoP\x01Z:cloud.google.com/go/secrets/apiv1beta1/secretspb;secretspb\xa2\x02\x03GSM\xaa\x02\"Google.Cloud.SecretManager.V1Beta1\xca\x02\"Google\\Cloud\\SecretManager\\V1beta1\xea\x02%Google::Cloud::SecretManager::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecretManager - module V1beta1 - ListSecretsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.ListSecretsRequest").msgclass - ListSecretsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.ListSecretsResponse").msgclass - CreateSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.CreateSecretRequest").msgclass - AddSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.AddSecretVersionRequest").msgclass - GetSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.GetSecretRequest").msgclass - ListSecretVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.ListSecretVersionsRequest").msgclass - ListSecretVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.ListSecretVersionsResponse").msgclass - GetSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.GetSecretVersionRequest").msgclass - UpdateSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.UpdateSecretRequest").msgclass - AccessSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.AccessSecretVersionRequest").msgclass - AccessSecretVersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.AccessSecretVersionResponse").msgclass - DeleteSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.DeleteSecretRequest").msgclass - DisableSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.DisableSecretVersionRequest").msgclass - EnableSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.EnableSecretVersionRequest").msgclass - DestroySecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secrets.v1beta1.DestroySecretVersionRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb deleted file mode 100644 index 3ffb62db71bb..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/lib/google/cloud/secrets/v1beta1/service_services_pb.rb +++ /dev/null @@ -1,117 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/secrets/v1beta1/service.proto for package 'Google.Cloud.SecretManager.V1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/secrets/v1beta1/service_pb' - -module Google - module Cloud - module SecretManager - module V1beta1 - module SecretManagerService - # Secret Manager Service - # - # Manages secrets and operations using those secrets. Implements a REST - # model with the following objects: - # - # * [Secret][google.cloud.secrets.v1beta1.Secret] - # * [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.secrets.v1beta1.SecretManagerService' - - # Lists [Secrets][google.cloud.secrets.v1beta1.Secret]. - rpc :ListSecrets, ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest, ::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse - # Creates a new [Secret][google.cloud.secrets.v1beta1.Secret] containing no - # [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion]. - rpc :CreateSecret, ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest, ::Google::Cloud::SecretManager::V1beta1::Secret - # Creates a new [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] - # containing secret data and attaches it to an existing - # [Secret][google.cloud.secrets.v1beta1.Secret]. - rpc :AddSecretVersion, ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::SecretVersion - # Gets metadata for a given [Secret][google.cloud.secrets.v1beta1.Secret]. - rpc :GetSecret, ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest, ::Google::Cloud::SecretManager::V1beta1::Secret - # Updates metadata of an existing - # [Secret][google.cloud.secrets.v1beta1.Secret]. - rpc :UpdateSecret, ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest, ::Google::Cloud::SecretManager::V1beta1::Secret - # Deletes a [Secret][google.cloud.secrets.v1beta1.Secret]. - rpc :DeleteSecret, ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest, ::Google::Protobuf::Empty - # Lists [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion]. This - # call does not return secret data. - rpc :ListSecretVersions, ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest, ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse - # Gets metadata for a - # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. - # - # `projects/*/secrets/*/versions/latest` is an alias to the `latest` - # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. - rpc :GetSecretVersion, ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::SecretVersion - # Accesses a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. - # This call returns the secret data. - # - # `projects/*/secrets/*/versions/latest` is an alias to the `latest` - # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. - rpc :AccessSecretVersion, ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse - # Disables a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. - # - # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the - # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to - # [DISABLED][google.cloud.secrets.v1beta1.SecretVersion.State.DISABLED]. - rpc :DisableSecretVersion, ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::SecretVersion - # Enables a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. - # - # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the - # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to - # [ENABLED][google.cloud.secrets.v1beta1.SecretVersion.State.ENABLED]. - rpc :EnableSecretVersion, ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::SecretVersion - # Destroys a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]. - # - # Sets the [state][google.cloud.secrets.v1beta1.SecretVersion.state] of the - # [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to - # [DESTROYED][google.cloud.secrets.v1beta1.SecretVersion.State.DESTROYED] and - # irrevocably destroys the secret data. - rpc :DestroySecretVersion, ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest, ::Google::Cloud::SecretManager::V1beta1::SecretVersion - # Sets the access control policy on the specified secret. Replaces any - # existing policy. - # - # Permissions on [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] - # are enforced according to the policy set on the associated - # [Secret][google.cloud.secrets.v1beta1.Secret]. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the access control policy for a secret. - # Returns empty policy if the secret exists and does not have a policy set. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns permissions that a caller has for the specified secret. - # If the secret does not exist, this call returns an empty set of - # permissions, not a NOT_FOUND error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/README.md deleted file mode 100644 index 0040e72113a2..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Secret Manager V1beta1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.rb deleted file mode 100644 index ad2f4fa25e44..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/resources.rb +++ /dev/null @@ -1,189 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecretManager - module V1beta1 - # A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} is a logical secret whose - # value and versions can be accessed. - # - # A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} is made up of zero or more - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} that represent - # the secret data. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} in the format - # `projects/*/secrets/*`. - # @!attribute [rw] replication - # @return [::Google::Cloud::SecretManager::V1beta1::Replication] - # Required. Immutable. The replication policy of the secret data attached to - # the {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # The replication policy cannot be changed after the Secret has been created. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} was created. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The labels assigned to this Secret. - # - # Label keys must be between 1 and 63 characters long, have a UTF-8 encoding - # of maximum 128 bytes, and must conform to the following PCRE regular - # expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}` - # - # Label values must be between 0 and 63 characters long, have a UTF-8 - # encoding of maximum 128 bytes, and must conform to the following PCRE - # regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}` - # - # No more than 64 labels can be assigned to a given resource. - class Secret - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A secret version resource in the Secret Manager API. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format - # `projects/*/secrets/*/versions/*`. - # - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} IDs in a - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} start at 1 and are - # incremented for each subsequent version of the secret. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} was created. - # @!attribute [r] destroy_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time this - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} was destroyed. - # Only present if {::Google::Cloud::SecretManager::V1beta1::SecretVersion#state state} - # is {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::DESTROYED DESTROYED}. - # @!attribute [r] state - # @return [::Google::Cloud::SecretManager::V1beta1::SecretVersion::State] - # Output only. The current state of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - class SecretVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of a {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}, - # indicating if it can be accessed. - module State - # Not specified. This value is unused and invalid. - STATE_UNSPECIFIED = 0 - - # The {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} may be - # accessed. - ENABLED = 1 - - # The {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} may not - # be accessed, but the secret data is still available and can be placed - # back into the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion::State::ENABLED ENABLED} - # state. - DISABLED = 2 - - # The {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} is - # destroyed and the secret data is no longer stored. A version may not - # leave this state once entered. - DESTROYED = 3 - end - end - - # A policy that defines the replication configuration of data. - # @!attribute [rw] automatic - # @return [::Google::Cloud::SecretManager::V1beta1::Replication::Automatic] - # The {::Google::Cloud::SecretManager::V1beta1::Secret Secret} will automatically be - # replicated without any restrictions. - # - # Note: The following fields are mutually exclusive: `automatic`, `user_managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] user_managed - # @return [::Google::Cloud::SecretManager::V1beta1::Replication::UserManaged] - # The {::Google::Cloud::SecretManager::V1beta1::Secret Secret} will only be replicated - # into the locations specified. - # - # Note: The following fields are mutually exclusive: `user_managed`, `automatic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Replication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A replication policy that replicates the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} payload without any - # restrictions. - class Automatic - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A replication policy that replicates the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} payload into the locations - # specified in - # {::Google::Cloud::SecretManager::V1beta1::Replication::UserManaged#replicas Replication.UserManaged.replicas} - # @!attribute [rw] replicas - # @return [::Array<::Google::Cloud::SecretManager::V1beta1::Replication::UserManaged::Replica>] - # Required. The list of Replicas for this - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # - # Cannot be empty. - class UserManaged - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a Replica for this - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}. - # @!attribute [rw] location - # @return [::String] - # The canonical IDs of the location to replicate data. - # For example: `"us-east1"`. - class Replica - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # A secret payload resource in the Secret Manager API. This contains the - # sensitive secret data that is associated with a - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - # @!attribute [rw] data - # @return [::String] - # The secret data. Must be no larger than 64KiB. - class SecretPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.rb deleted file mode 100644 index dc304a41b777..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/cloud/secrets/v1beta1/service.rb +++ /dev/null @@ -1,261 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1beta1 - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secrets SecretManagerService.ListSecrets}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}, in the format `projects/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. - class ListSecretsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secrets SecretManagerService.ListSecrets}. - # @!attribute [rw] secrets - # @return [::Array<::Google::Cloud::SecretManager::V1beta1::Secret>] - # The list of {::Google::Cloud::SecretManager::V1beta1::Secret Secrets} sorted in - # reverse by create_time (newest first). - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. Pass this value in - # {::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest#page_token ListSecretsRequest.page_token} - # to retrieve the next page. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of {::Google::Cloud::SecretManager::V1beta1::Secret Secrets}. - class ListSecretsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#create_secret SecretManagerService.CreateSecret}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project to associate with the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format `projects/*`. - # @!attribute [rw] secret_id - # @return [::String] - # Required. This must be unique within the project. - # - # A secret ID is a string with a maximum length of 255 characters and can - # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and - # underscore (`_`) characters. - # @!attribute [rw] secret - # @return [::Google::Cloud::SecretManager::V1beta1::Secret] - # Required. A {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with initial - # field values. - class CreateSecretRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to associate with the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format - # `projects/*/secrets/*`. - # @!attribute [rw] payload - # @return [::Google::Cloud::SecretManager::V1beta1::SecretPayload] - # Required. The secret payload of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - class AddSecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret SecretManagerService.GetSecret}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret}, in the format - # `projects/*/secrets/*`. - class GetSecretRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secret_versions SecretManagerService.ListSecretVersions}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} associated with the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} to list, in - # the format `projects/*/secrets/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # ListSecretVersionsResponse.next_page_token][]. - class ListSecretVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secret_versions SecretManagerService.ListSecretVersions}. - # @!attribute [rw] versions - # @return [::Array<::Google::Cloud::SecretManager::V1beta1::SecretVersion>] - # The list of {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions} - # sorted in reverse by create_time (newest first). - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. Pass this value in - # {::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest#page_token ListSecretVersionsRequest.page_token} - # to retrieve the next page. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersions}. - class ListSecretVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret_version SecretManagerService.GetSecretVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format - # `projects/*/secrets/*/versions/*`. - # `projects/*/secrets/*/versions/latest` is an alias to the `latest` - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion}. - class GetSecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#update_secret SecretManagerService.UpdateSecret}. - # @!attribute [rw] secret - # @return [::Google::Cloud::SecretManager::V1beta1::Secret] - # Required. {::Google::Cloud::SecretManager::V1beta1::Secret Secret} with updated field - # values. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Specifies the fields to be updated. - class UpdateSecretRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format - # `projects/*/secrets/*/versions/*`. - class AccessSecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion}. - # @!attribute [rw] name - # @return [::String] - # The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} in the format - # `projects/*/secrets/*/versions/*`. - # @!attribute [rw] payload - # @return [::Google::Cloud::SecretManager::V1beta1::SecretPayload] - # Secret payload - class AccessSecretVersionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#delete_secret SecretManagerService.DeleteSecret}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::Secret Secret} to delete in the format - # `projects/*/secrets/*`. - class DeleteSecretRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#disable_secret_version SecretManagerService.DisableSecretVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to disable in - # the format `projects/*/secrets/*/versions/*`. - class DisableSecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#enable_secret_version SecretManagerService.EnableSecretVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to enable in - # the format `projects/*/secrets/*/versions/*`. - class EnableSecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#destroy_secret_version SecretManagerService.DestroySecretVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta1::SecretVersion SecretVersion} to destroy in - # the format `projects/*/secrets/*/versions/*`. - class DestroySecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/Gemfile deleted file mode 100644 index 7d0b3f462848..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-secret_manager-v1beta1", path: "../" -else - gem "google-cloud-secret_manager-v1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.rb deleted file mode 100644 index ac6df7b6e662..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/access_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the access_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#access_secret_version. -# -def access_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new - - # Call the access_secret_version method. - result = client.access_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.rb deleted file mode 100644 index 2a913b556c14..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/add_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the add_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#add_secret_version. -# -def add_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new - - # Call the add_secret_version method. - result = client.add_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.rb deleted file mode 100644 index b0fd1bcbba4a..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/create_secret.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the create_secret call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#create_secret. -# -def create_secret - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new - - # Call the create_secret method. - result = client.create_secret request - - # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.rb deleted file mode 100644 index 7148292e6d60..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/delete_secret.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the delete_secret call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#delete_secret. -# -def delete_secret - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new - - # Call the delete_secret method. - result = client.delete_secret request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.rb deleted file mode 100644 index a2ce12dcbae7..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/destroy_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the destroy_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#destroy_secret_version. -# -def destroy_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new - - # Call the destroy_secret_version method. - result = client.destroy_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.rb deleted file mode 100644 index c578b0471ea7..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/disable_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the disable_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#disable_secret_version. -# -def disable_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new - - # Call the disable_secret_version method. - result = client.disable_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.rb deleted file mode 100644 index 728070e800a2..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/enable_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the enable_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#enable_secret_version. -# -def enable_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new - - # Call the enable_secret_version method. - result = client.enable_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.rb deleted file mode 100644 index 2fcae7265e71..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the get_iam_policy call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.rb deleted file mode 100644 index 75619ce72ae8..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_GetSecret_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the get_secret call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret. -# -def get_secret - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new - - # Call the get_secret method. - result = client.get_secret request - - # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_GetSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.rb deleted file mode 100644 index 5c6734cf2a67..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/get_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the get_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret_version. -# -def get_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new - - # Call the get_secret_version method. - result = client.get_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta1::SecretVersion. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.rb deleted file mode 100644 index 3beb998ea346..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secret_versions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the list_secret_versions call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secret_versions. -# -def list_secret_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new - - # Call the list_secret_versions method. - result = client.list_secret_versions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecretManager::V1beta1::SecretVersion. - p item - end -end -# [END secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.rb deleted file mode 100644 index d29981383e36..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/list_secrets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the list_secrets call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secrets. -# -def list_secrets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new - - # Call the list_secrets method. - result = client.list_secrets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecretManager::V1beta1::Secret. - p item - end -end -# [END secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.rb deleted file mode 100644 index 0d96d5ef3a67..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the set_iam_policy call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.rb deleted file mode 100644 index 855968413f63..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the test_iam_permissions call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.rb deleted file mode 100644 index 7979fa334732..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/secret_manager_service/update_secret.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_sync] -require "google/cloud/secret_manager/v1beta1" - -## -# Snippet for the update_secret call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#update_secret. -# -def update_secret - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new - - # Call the update_secret method. - result = client.update_secret request - - # The returned object is of type Google::Cloud::SecretManager::V1beta1::Secret. - p result -end -# [END secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/snippet_metadata_google.cloud.secrets.v1beta1.json b/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/snippet_metadata_google.cloud.secrets.v1beta1.json deleted file mode 100644 index e3e0f532e34a..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/snippets/snippet_metadata_google.cloud.secrets.v1beta1.json +++ /dev/null @@ -1,615 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-secret_manager-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.secrets.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_sync", - "title": "Snippet for the list_secrets call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secrets.", - "file": "secret_manager_service/list_secrets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_secrets", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secrets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "ListSecrets", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.ListSecrets", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_sync", - "title": "Snippet for the create_secret call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#create_secret.", - "file": "secret_manager_service/create_secret.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_secret", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#create_secret", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta1::Secret", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "CreateSecret", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.CreateSecret", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_sync", - "title": "Snippet for the add_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#add_secret_version.", - "file": "secret_manager_service/add_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "add_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#add_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta1::SecretVersion", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "AddSecretVersion", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.AddSecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_GetSecret_sync", - "title": "Snippet for the get_secret call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret.", - "file": "secret_manager_service/get_secret.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_secret", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::GetSecretRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta1::Secret", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "GetSecret", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.GetSecret", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_sync", - "title": "Snippet for the update_secret call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#update_secret.", - "file": "secret_manager_service/update_secret.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_secret", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#update_secret", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta1::Secret", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "UpdateSecret", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.UpdateSecret", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_sync", - "title": "Snippet for the delete_secret call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#delete_secret.", - "file": "secret_manager_service/delete_secret.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_secret", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#delete_secret", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "DeleteSecret", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.DeleteSecret", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_sync", - "title": "Snippet for the list_secret_versions call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secret_versions.", - "file": "secret_manager_service/list_secret_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_secret_versions", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#list_secret_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "ListSecretVersions", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.ListSecretVersions", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_sync", - "title": "Snippet for the get_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret_version.", - "file": "secret_manager_service/get_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta1::SecretVersion", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "GetSecretVersion", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.GetSecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_sync", - "title": "Snippet for the access_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#access_secret_version.", - "file": "secret_manager_service/access_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "access_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#access_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "AccessSecretVersion", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.AccessSecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_sync", - "title": "Snippet for the disable_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#disable_secret_version.", - "file": "secret_manager_service/disable_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#disable_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta1::SecretVersion", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "DisableSecretVersion", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.DisableSecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_sync", - "title": "Snippet for the enable_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#enable_secret_version.", - "file": "secret_manager_service/enable_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#enable_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta1::SecretVersion", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "EnableSecretVersion", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.EnableSecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_sync", - "title": "Snippet for the destroy_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#destroy_secret_version.", - "file": "secret_manager_service/destroy_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "destroy_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#destroy_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta1::SecretVersion", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "DestroySecretVersion", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.DestroySecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#set_iam_policy.", - "file": "secret_manager_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.SetIamPolicy", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_iam_policy.", - "file": "secret_manager_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.GetIamPolicy", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#test_iam_permissions.", - "file": "secret_manager_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService.TestIamPermissions", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secrets.v1beta1.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_test.rb deleted file mode 100644 index 8b03d0133770..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/secret_manager/v1beta1/secret_manager_service" - -class ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_secret_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.secret_path project: "value0", secret: "value1" - assert_equal "projects/value0/secrets/value1", path - end - end - - def test_secret_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.secret_version_path project: "value0", secret: "value1", secret_version: "value2" - assert_equal "projects/value0/secrets/value1/versions/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_test.rb deleted file mode 100644 index 654e46b19b8a..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_rest_test.rb +++ /dev/null @@ -1,921 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/secrets/v1beta1/service_pb" -require "google/cloud/secret_manager/v1beta1/secret_manager_service/rest" - - -class ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_secrets - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_secrets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_list_secrets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_secrets_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_secrets parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_secrets ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_secrets(::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_secrets_client_stub.call_count - end - end - end - - def test_create_secret - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta1::Secret.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - secret_id = "hello world" - secret = {} - - create_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_create_secret_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_secret parent: parent, secret_id: secret_id, secret: secret do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_secret ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_secret(::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_secret_client_stub.call_count - end - end - end - - def test_add_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - payload = {} - - add_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_add_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, add_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.add_secret_version({ parent: parent, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.add_secret_version parent: parent, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.add_secret_version ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new(parent: parent, payload: payload) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.add_secret_version({ parent: parent, payload: payload }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.add_secret_version(::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new(parent: parent, payload: payload), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, add_secret_version_client_stub.call_count - end - end - end - - def test_get_secret - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta1::Secret.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_get_secret_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_secret({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_secret name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_secret ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_secret({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_secret(::Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_secret_client_stub.call_count - end - end - end - - def test_update_secret - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta1::Secret.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - secret = {} - update_mask = {} - - update_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_update_secret_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_secret({ secret: secret, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_secret secret: secret, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_secret ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new(secret: secret, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_secret({ secret: secret, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_secret(::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new(secret: secret, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_secret_client_stub.call_count - end - end - end - - def test_delete_secret - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_delete_secret_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_secret({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_secret name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_secret ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_secret({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_secret(::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_secret_client_stub.call_count - end - end - end - - def test_list_secret_versions - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_secret_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_list_secret_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_secret_versions_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_secret_versions parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_secret_versions ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_secret_versions(::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_secret_versions_client_stub.call_count - end - end - end - - def test_get_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_get_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_secret_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_secret_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_secret_version ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_secret_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_secret_version(::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_secret_version_client_stub.call_count - end - end - end - - def test_access_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - access_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_access_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, access_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.access_secret_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.access_secret_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.access_secret_version ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.access_secret_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.access_secret_version(::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, access_secret_version_client_stub.call_count - end - end - end - - def test_disable_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_disable_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.disable_secret_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.disable_secret_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.disable_secret_version ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.disable_secret_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.disable_secret_version(::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_secret_version_client_stub.call_count - end - end - end - - def test_enable_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_enable_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.enable_secret_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.enable_secret_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.enable_secret_version ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.enable_secret_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.enable_secret_version(::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_secret_version_client_stub.call_count - end - end - end - - def test_destroy_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - destroy_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_destroy_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, destroy_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.destroy_secret_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.destroy_secret_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.destroy_secret_version ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.destroy_secret_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.destroy_secret_version(::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, destroy_secret_version_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_test.rb deleted file mode 100644 index dae1d80c90fc..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/google/cloud/secret_manager/v1beta1/secret_manager_service_test.rb +++ /dev/null @@ -1,1008 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/secrets/v1beta1/service_pb" -require "google/cloud/secret_manager/v1beta1/secret_manager_service" - -class ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_secrets - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta1::ListSecretsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_secrets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_secrets, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_secrets_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_secrets parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_secrets ::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_secrets(::Google::Cloud::SecretManager::V1beta1::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_secrets_client_stub.call_rpc_count - end - end - - def test_create_secret - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta1::Secret.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - secret_id = "hello world" - secret = {} - - create_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_secret, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["secret_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta1::Secret), request["secret"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_secret parent: parent, secret_id: secret_id, secret: secret do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_secret ::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_secret(::Google::Cloud::SecretManager::V1beta1::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_secret_client_stub.call_rpc_count - end - end - - def test_add_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - payload = {} - - add_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :add_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta1::SecretPayload), request["payload"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, add_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.add_secret_version({ parent: parent, payload: payload }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.add_secret_version parent: parent, payload: payload do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.add_secret_version ::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new(parent: parent, payload: payload) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.add_secret_version({ parent: parent, payload: payload }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.add_secret_version(::Google::Cloud::SecretManager::V1beta1::AddSecretVersionRequest.new(parent: parent, payload: payload), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, add_secret_version_client_stub.call_rpc_count - end - end - - def test_get_secret - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta1::Secret.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_secret, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_secret({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_secret name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_secret ::Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_secret({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_secret(::Google::Cloud::SecretManager::V1beta1::GetSecretRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_secret_client_stub.call_rpc_count - end - end - - def test_update_secret - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta1::Secret.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - secret = {} - update_mask = {} - - update_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_secret, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta1::Secret), request["secret"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_secret({ secret: secret, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_secret secret: secret, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_secret ::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new(secret: secret, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_secret({ secret: secret, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_secret(::Google::Cloud::SecretManager::V1beta1::UpdateSecretRequest.new(secret: secret, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_secret_client_stub.call_rpc_count - end - end - - def test_delete_secret - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_secret, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_secret({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_secret name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_secret ::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_secret({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_secret(::Google::Cloud::SecretManager::V1beta1::DeleteSecretRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_secret_client_stub.call_rpc_count - end - end - - def test_list_secret_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_secret_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_secret_versions, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_secret_versions_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_secret_versions parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_secret_versions ::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_secret_versions(::Google::Cloud::SecretManager::V1beta1::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_secret_versions_client_stub.call_rpc_count - end - end - - def test_get_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_secret_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_secret_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_secret_version ::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_secret_version({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_secret_version(::Google::Cloud::SecretManager::V1beta1::GetSecretVersionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_secret_version_client_stub.call_rpc_count - end - end - - def test_access_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - access_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :access_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, access_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.access_secret_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.access_secret_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.access_secret_version ::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.access_secret_version({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.access_secret_version(::Google::Cloud::SecretManager::V1beta1::AccessSecretVersionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, access_secret_version_client_stub.call_rpc_count - end - end - - def test_disable_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.disable_secret_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.disable_secret_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.disable_secret_version ::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.disable_secret_version({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.disable_secret_version(::Google::Cloud::SecretManager::V1beta1::DisableSecretVersionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, disable_secret_version_client_stub.call_rpc_count - end - end - - def test_enable_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.enable_secret_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.enable_secret_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.enable_secret_version ::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.enable_secret_version({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.enable_secret_version(::Google::Cloud::SecretManager::V1beta1::EnableSecretVersionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enable_secret_version_client_stub.call_rpc_count - end - end - - def test_destroy_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta1::SecretVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - destroy_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :destroy_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, destroy_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.destroy_secret_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.destroy_secret_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.destroy_secret_version ::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.destroy_secret_version({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.destroy_secret_version(::Google::Cloud::SecretManager::V1beta1::DestroySecretVersionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, destroy_secret_version_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::SecretManager::V1beta1::SecretManagerService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta1/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-v1beta2/.gitignore b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/.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-v1beta2/.repo-metadata.json b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.repo-metadata.json deleted file mode 100644 index 14c52f056019..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/.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-v1beta2/latest", - "distribution_name": "google-cloud-secret_manager-v1beta2", - "is_cloud": true, - "language": "ruby", - "name": "secretmanager", - "name_pretty": "Secret Manager V1BETA2 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 Overview. Note that google-cloud-secret_manager-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secret_manager instead. See the readme for more details.", - "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-v1beta2/.rubocop.yml b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.rubocop.yml deleted file mode 100644 index 734c385c1bd1..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-secret_manager-v1beta2.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-secret_manager-v1beta2.rb" diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/.toys.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/.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-v1beta2/.yardopts b/owl-bot-staging/google-cloud-secret_manager-v1beta2/.yardopts deleted file mode 100644 index ac280e88bebc..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Secret Manager V1BETA2 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-secret_manager-v1beta2/AUTHENTICATION.md deleted file mode 100644 index 15838bd69def..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-secret_manager-v1beta2 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-v1beta2 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/v1beta2" - -client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/secret_manager/v1beta2" - -::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-secret_manager-v1beta2 -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/v1beta2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/CHANGELOG.md b/owl-bot-staging/google-cloud-secret_manager-v1beta2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/Gemfile b/owl-bot-staging/google-cloud-secret_manager-v1beta2/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-v1beta2/LICENSE.md b/owl-bot-staging/google-cloud-secret_manager-v1beta2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/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-v1beta2/README.md b/owl-bot-staging/google-cloud-secret_manager-v1beta2/README.md deleted file mode 100644 index 5d42a564c07a..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Secret Manager V1BETA2 API - -Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security. - -Secret Manager Overview. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Secret Manager V1BETA2 API. Most users should consider using -the main client gem, -[google-cloud-secret_manager](https://rubygems.org/gems/google-cloud-secret_manager). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-secret_manager-v1beta2 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/secretmanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/secret_manager/v1beta2" - -client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new -request = ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new # (request fields as keyword arguments...) -response = client.list_secrets request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1beta2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/secret-manager) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/secret_manager/v1beta2" -require "logger" - -client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-secret_manager`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-secret_manager-v1beta2`. -_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-v1beta2`. - -### 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-v1beta2/Rakefile b/owl-bot-staging/google-cloud-secret_manager-v1beta2/Rakefile deleted file mode 100644 index b1cfc54cac77..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-secret_manager-v1beta2 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/v1beta2/secret_manager_service/credentials" - ::Google::Cloud::SecretManager::V1beta2::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-v1beta2 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-v1beta2 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-v1beta2 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-v1beta2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-secret_manager-v1beta2" - header "google-cloud-secret_manager-v1beta2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-secret_manager-v1beta2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-secret_manager-v1beta2 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-v1beta2 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-v1beta2 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-v1beta2/gapic_metadata.json b/owl-bot-staging/google-cloud-secret_manager-v1beta2/gapic_metadata.json deleted file mode 100644 index fd910a3daa8c..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/gapic_metadata.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.secretmanager.v1beta2", - "libraryPackage": "::Google::Cloud::SecretManager::V1beta2", - "services": { - "SecretManagerService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client", - "rpcs": { - "ListSecrets": { - "methods": [ - "list_secrets" - ] - }, - "CreateSecret": { - "methods": [ - "create_secret" - ] - }, - "AddSecretVersion": { - "methods": [ - "add_secret_version" - ] - }, - "GetSecret": { - "methods": [ - "get_secret" - ] - }, - "UpdateSecret": { - "methods": [ - "update_secret" - ] - }, - "DeleteSecret": { - "methods": [ - "delete_secret" - ] - }, - "ListSecretVersions": { - "methods": [ - "list_secret_versions" - ] - }, - "GetSecretVersion": { - "methods": [ - "get_secret_version" - ] - }, - "AccessSecretVersion": { - "methods": [ - "access_secret_version" - ] - }, - "DisableSecretVersion": { - "methods": [ - "disable_secret_version" - ] - }, - "EnableSecretVersion": { - "methods": [ - "enable_secret_version" - ] - }, - "DestroySecretVersion": { - "methods": [ - "destroy_secret_version" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/google-cloud-secret_manager-v1beta2.gemspec b/owl-bot-staging/google-cloud-secret_manager-v1beta2/google-cloud-secret_manager-v1beta2.gemspec deleted file mode 100644 index cc529d218e90..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/google-cloud-secret_manager-v1beta2.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/secret_manager/v1beta2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-secret_manager-v1beta2" - gem.version = Google::Cloud::SecretManager::V1beta2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Secret Manager Overview. Note that google-cloud-secret_manager-v1beta2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secret_manager instead. See the readme for more details." - gem.summary = "Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.rb deleted file mode 100644 index 4fa698942ce3..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google-cloud-secret_manager-v1beta2.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/secret_manager/v1beta2" diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2.rb deleted file mode 100644 index 094bfb8e6d20..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/secret_manager/v1beta2/secret_manager_service" -require "google/cloud/secret_manager/v1beta2/version" - -module Google - module Cloud - module SecretManager - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/secret_manager/v1beta2" - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/secret_manager/v1beta2" - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - module V1beta2 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta2", "_helpers.rb" -require "google/cloud/secret_manager/v1beta2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb deleted file mode 100644 index 2cb21f372d4d..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module SecretManager - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/secret_manager/v1beta2/rest" - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - module V1beta2 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecretManager"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta2/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.rb deleted file mode 100644 index 4581b5c14be0..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest" -require "google/cloud/secret_manager/v1beta2/bindings_override" -require "google/cloud/secret_manager/v1beta2/version" - -module Google - module Cloud - module SecretManager - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/secret_manager/v1beta2/rest" - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - module V1beta2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb deleted file mode 100644 index 5200a70afe3b..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/secret_manager/v1beta2/version" - -require "google/cloud/secret_manager/v1beta2/secret_manager_service/credentials" -require "google/cloud/secret_manager/v1beta2/secret_manager_service/paths" -require "google/cloud/secret_manager/v1beta2/secret_manager_service/client" -require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest" - -module Google - module Cloud - module SecretManager - module V1beta2 - ## - # Secret Manager Service - # - # Manages secrets and operations using those secrets. Implements a REST - # model with the following objects: - # - # * {::Google::Cloud::SecretManager::V1beta2::Secret Secret} - # * {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/secret_manager/v1beta2/secret_manager_service" - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest" - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - module SecretManagerService - end - end - end - end -end - -helper_path = ::File.join __dir__, "secret_manager_service", "helpers.rb" -require "google/cloud/secret_manager/v1beta2/secret_manager_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb deleted file mode 100644 index dc83842b33eb..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/client.rb +++ /dev/null @@ -1,1998 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/secretmanager/v1beta2/service_pb" -require "google/cloud/location" - -module Google - module Cloud - module SecretManager - module V1beta2 - module SecretManagerService - ## - # Client for the SecretManagerService service. - # - # Secret Manager Service - # - # Manages secrets and operations using those secrets. Implements a REST - # model with the following objects: - # - # * {::Google::Cloud::SecretManager::V1beta2::Secret Secret} - # * {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "secretmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :secret_manager_service_stub - - ## - # Configure the SecretManagerService Client class. - # - # See {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecretManagerService clients - # ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecretManager", "V1beta2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_secrets.timeout = 60.0 - - default_config.rpcs.create_secret.timeout = 60.0 - - default_config.rpcs.add_secret_version.timeout = 60.0 - - default_config.rpcs.get_secret.timeout = 60.0 - - default_config.rpcs.update_secret.timeout = 60.0 - - default_config.rpcs.delete_secret.timeout = 60.0 - - default_config.rpcs.list_secret_versions.timeout = 60.0 - - default_config.rpcs.get_secret_version.timeout = 60.0 - - default_config.rpcs.access_secret_version.timeout = 60.0 - default_config.rpcs.access_secret_version.retry_policy = { - initial_delay: 2.0, max_delay: 60.0, multiplier: 2.0, retry_codes: [14, 8] - } - - default_config.rpcs.disable_secret_version.timeout = 60.0 - - default_config.rpcs.enable_secret_version.timeout = 60.0 - - default_config.rpcs.destroy_secret_version.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.get_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecretManagerService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @secret_manager_service_stub.universe_domain - end - - ## - # Create a new SecretManagerService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecretManagerService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/secretmanager/v1beta2/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @secret_manager_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @secret_manager_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @secret_manager_service_stub.endpoint - config.universe_domain = @secret_manager_service_stub.universe_domain - config.logger = @secret_manager_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @secret_manager_service_stub.logger - end - - # Service calls - - ## - # Lists {::Google::Cloud::SecretManager::V1beta2::Secret Secrets}. - # - # @overload list_secrets(request, options = nil) - # Pass arguments to `list_secrets` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_secrets(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_secrets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secrets}, in the format - # `projects/*` or `projects/*/locations/*` - # @param page_size [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. - # @param filter [::String] - # Optional. Filter string, adhering to the rules in - # [List-operation - # filtering](https://cloud.google.com/secret-manager/docs/filtering). List - # only secrets matching the filter. If filter is empty, all secrets are - # listed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::Secret>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::Secret>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new - # - # # Call the list_secrets method. - # result = client.list_secrets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecretManager::V1beta2::Secret. - # p item - # end - # - def list_secrets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_secrets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_secrets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_secrets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :list_secrets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new {::Google::Cloud::SecretManager::V1beta2::Secret Secret} - # containing no - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. - # - # @overload create_secret(request, options = nil) - # Pass arguments to `create_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_secret(parent: nil, secret_id: nil, secret: nil) - # Pass arguments to `create_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project to associate with the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format - # `projects/*` or `projects/*/locations/*`. - # @param secret_id [::String] - # Required. This must be unique within the project. - # - # A secret ID is a string with a maximum length of 255 characters and can - # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and - # underscore (`_`) characters. - # @param secret [::Google::Cloud::SecretManager::V1beta2::Secret, ::Hash] - # Required. A {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with - # initial field values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::Secret] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::Secret] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new - # - # # Call the create_secret method. - # result = client.create_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. - # p result - # - def create_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_secret.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :create_secret, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} - # containing secret data and attaches it to an existing - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # @overload add_secret_version(request, options = nil) - # Pass arguments to `add_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload add_secret_version(parent: nil, payload: nil) - # Pass arguments to `add_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to associate with the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the - # format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. - # @param payload [::Google::Cloud::SecretManager::V1beta2::SecretPayload, ::Hash] - # Required. The secret payload of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new - # - # # Call the add_secret_version method. - # result = client.add_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p result - # - def add_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.add_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.add_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.add_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :add_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata for a given - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # @overload get_secret(request, options = nil) - # Pass arguments to `get_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::GetSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::GetSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_secret(name: nil) - # Pass arguments to `get_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format - # `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::Secret] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::Secret] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new - # - # # Call the get_secret method. - # result = client.get_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. - # p result - # - def get_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_secret.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :get_secret, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates metadata of an existing - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # @overload update_secret(request, options = nil) - # Pass arguments to `update_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_secret(secret: nil, update_mask: nil) - # Pass arguments to `update_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param secret [::Google::Cloud::SecretManager::V1beta2::Secret, ::Hash] - # Required. {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with updated - # field values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Specifies the fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::Secret] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::Secret] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new - # - # # Call the update_secret method. - # result = client.update_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. - # p result - # - def update_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.secret&.name - header_params["secret.name"] = request.secret.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_secret.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :update_secret, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # @overload delete_secret(request, options = nil) - # Pass arguments to `delete_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_secret(name: nil, etag: nil) - # Pass arguments to `delete_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to delete in the format - # `projects/*/secrets/*`. - # @param etag [::String] - # Optional. Etag of the {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # The request succeeds if it matches the etag of the currently stored secret - # object. If the etag is omitted, the request succeeds. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new - # - # # Call the delete_secret method. - # result = client.delete_secret request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_secret.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :delete_secret, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. - # This call does not return secret data. - # - # @overload list_secret_versions(request, options = nil) - # Pass arguments to `list_secret_versions` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_secret_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} associated with the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} to list, - # in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. - # @param page_size [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # ListSecretVersionsResponse.next_page_token][]. - # @param filter [::String] - # Optional. Filter string, adhering to the rules in - # [List-operation - # filtering](https://cloud.google.com/secret-manager/docs/filtering). List - # only secret versions matching the filter. If filter is empty, all secret - # versions are listed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::SecretVersion>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::SecretVersion>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new - # - # # Call the list_secret_versions method. - # result = client.list_secret_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p item - # end - # - def list_secret_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_secret_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_secret_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_secret_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :list_secret_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata for a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # `projects/*/secrets/*/versions/latest` is an alias to the most recently - # created {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # @overload get_secret_version(request, options = nil) - # Pass arguments to `get_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_secret_version(name: nil) - # Pass arguments to `get_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the - # format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # - # `projects/*/secrets/*/versions/latest` or - # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most - # recently created - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new - # - # # Call the get_secret_version method. - # result = client.get_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p result - # - def get_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :get_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accesses a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. This - # call returns the secret data. - # - # `projects/*/secrets/*/versions/latest` is an alias to the most recently - # created {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # @overload access_secret_version(request, options = nil) - # Pass arguments to `access_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload access_secret_version(name: nil) - # Pass arguments to `access_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the - # format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # - # `projects/*/secrets/*/versions/latest` or - # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most - # recently created - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new - # - # # Call the access_secret_version method. - # result = client.access_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse. - # p result - # - def access_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.access_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.access_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.access_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :access_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disables a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of - # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::DISABLED DISABLED}. - # - # @overload disable_secret_version(request, options = nil) - # Pass arguments to `disable_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload disable_secret_version(name: nil, etag: nil) - # Pass arguments to `disable_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # disable in the format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # @param etag [::String] - # Optional. Etag of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The - # request succeeds if it matches the etag of the currently stored secret - # version object. If the etag is omitted, the request succeeds. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new - # - # # Call the disable_secret_version method. - # result = client.disable_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p result - # - def disable_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.disable_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.disable_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :disable_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enables a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of - # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::ENABLED ENABLED}. - # - # @overload enable_secret_version(request, options = nil) - # Pass arguments to `enable_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enable_secret_version(name: nil, etag: nil) - # Pass arguments to `enable_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to enable - # in the format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # @param etag [::String] - # Optional. Etag of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The - # request succeeds if it matches the etag of the currently stored secret - # version object. If the etag is omitted, the request succeeds. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new - # - # # Call the enable_secret_version method. - # result = client.enable_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p result - # - def enable_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enable_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.enable_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :enable_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Destroys a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of - # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::DESTROYED DESTROYED} - # and irrevocably destroys the secret data. - # - # @overload destroy_secret_version(request, options = nil) - # Pass arguments to `destroy_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload destroy_secret_version(name: nil, etag: nil) - # Pass arguments to `destroy_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # destroy in the format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # @param etag [::String] - # Optional. Etag of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The - # request succeeds if it matches the etag of the currently stored secret - # version object. If the etag is omitted, the request succeeds. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new - # - # # Call the destroy_secret_version method. - # result = client.destroy_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p result - # - def destroy_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.destroy_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.destroy_secret_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.destroy_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :destroy_secret_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified secret. Replaces any - # existing policy. - # - # Permissions on - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} are - # enforced according to the policy set on the associated - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a secret. - # Returns empty policy if the secret exists and does not have a policy set. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has for the specified secret. - # If the secret does not exist, this call returns an empty set of - # permissions, not a NOT_FOUND error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecretManagerService API. - # - # This class represents the configuration for SecretManagerService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_secrets to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_secrets.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_secrets.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "secretmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the SecretManagerService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_secrets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_secrets - ## - # RPC-specific configuration for `create_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :create_secret - ## - # RPC-specific configuration for `add_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :add_secret_version - ## - # RPC-specific configuration for `get_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :get_secret - ## - # RPC-specific configuration for `update_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :update_secret - ## - # RPC-specific configuration for `delete_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_secret - ## - # RPC-specific configuration for `list_secret_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_secret_versions - ## - # RPC-specific configuration for `get_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_secret_version - ## - # RPC-specific configuration for `access_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :access_secret_version - ## - # RPC-specific configuration for `disable_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_secret_version - ## - # RPC-specific configuration for `enable_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_secret_version - ## - # RPC-specific configuration for `destroy_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :destroy_secret_version - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_secrets_config = parent_rpcs.list_secrets if parent_rpcs.respond_to? :list_secrets - @list_secrets = ::Gapic::Config::Method.new list_secrets_config - create_secret_config = parent_rpcs.create_secret if parent_rpcs.respond_to? :create_secret - @create_secret = ::Gapic::Config::Method.new create_secret_config - add_secret_version_config = parent_rpcs.add_secret_version if parent_rpcs.respond_to? :add_secret_version - @add_secret_version = ::Gapic::Config::Method.new add_secret_version_config - get_secret_config = parent_rpcs.get_secret if parent_rpcs.respond_to? :get_secret - @get_secret = ::Gapic::Config::Method.new get_secret_config - update_secret_config = parent_rpcs.update_secret if parent_rpcs.respond_to? :update_secret - @update_secret = ::Gapic::Config::Method.new update_secret_config - delete_secret_config = parent_rpcs.delete_secret if parent_rpcs.respond_to? :delete_secret - @delete_secret = ::Gapic::Config::Method.new delete_secret_config - list_secret_versions_config = parent_rpcs.list_secret_versions if parent_rpcs.respond_to? :list_secret_versions - @list_secret_versions = ::Gapic::Config::Method.new list_secret_versions_config - get_secret_version_config = parent_rpcs.get_secret_version if parent_rpcs.respond_to? :get_secret_version - @get_secret_version = ::Gapic::Config::Method.new get_secret_version_config - access_secret_version_config = parent_rpcs.access_secret_version if parent_rpcs.respond_to? :access_secret_version - @access_secret_version = ::Gapic::Config::Method.new access_secret_version_config - disable_secret_version_config = parent_rpcs.disable_secret_version if parent_rpcs.respond_to? :disable_secret_version - @disable_secret_version = ::Gapic::Config::Method.new disable_secret_version_config - enable_secret_version_config = parent_rpcs.enable_secret_version if parent_rpcs.respond_to? :enable_secret_version - @enable_secret_version = ::Gapic::Config::Method.new enable_secret_version_config - destroy_secret_version_config = parent_rpcs.destroy_secret_version if parent_rpcs.respond_to? :destroy_secret_version - @destroy_secret_version = ::Gapic::Config::Method.new destroy_secret_version_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb deleted file mode 100644 index 42d6ada8e23f..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module SecretManager - module V1beta2 - module SecretManagerService - # Credentials for the SecretManagerService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SECRET_MANAGER_CREDENTIALS", - "SECRET_MANAGER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SECRET_MANAGER_CREDENTIALS_JSON", - "SECRET_MANAGER_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb deleted file mode 100644 index a3810d469c8f..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/paths.rb +++ /dev/null @@ -1,167 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1beta2 - module SecretManagerService - # Path helper methods for the SecretManagerService API. - module Paths - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified Secret resource string. - # - # @overload secret_path(project:, secret:) - # The resource will be in the following format: - # - # `projects/{project}/secrets/{secret}` - # - # @param project [String] - # @param secret [String] - # - # @overload secret_path(project:, location:, secret:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/secrets/{secret}` - # - # @param project [String] - # @param location [String] - # @param secret [String] - # - # @return [::String] - def secret_path **args - resources = { - "project:secret" => (proc do |project:, secret:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/secrets/#{secret}" - end), - "location:project:secret" => (proc do |project:, location:, secret:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/secrets/#{secret}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified SecretVersion resource string. - # - # @overload secret_version_path(project:, secret:, secret_version:) - # The resource will be in the following format: - # - # `projects/{project}/secrets/{secret}/versions/{secret_version}` - # - # @param project [String] - # @param secret [String] - # @param secret_version [String] - # - # @overload secret_version_path(project:, location:, secret:, secret_version:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}` - # - # @param project [String] - # @param location [String] - # @param secret [String] - # @param secret_version [String] - # - # @return [::String] - def secret_version_path **args - resources = { - "project:secret:secret_version" => (proc do |project:, secret:, secret_version:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" - - "projects/#{project}/secrets/#{secret}/versions/#{secret_version}" - end), - "location:project:secret:secret_version" => (proc do |project:, location:, secret:, secret_version:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" - - "projects/#{project}/locations/#{location}/secrets/#{secret}/versions/#{secret_version}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Topic resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/topics/{topic}` - # - # @param project [String] - # @param topic [String] - # - # @return [::String] - def topic_path project:, topic: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/topics/#{topic}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb deleted file mode 100644 index 0f60f9b3fd09..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/secret_manager/v1beta2/version" -require "google/cloud/secret_manager/v1beta2/bindings_override" - -require "google/cloud/secret_manager/v1beta2/secret_manager_service/credentials" -require "google/cloud/secret_manager/v1beta2/secret_manager_service/paths" -require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client" - -module Google - module Cloud - module SecretManager - module V1beta2 - ## - # Secret Manager Service - # - # Manages secrets and operations using those secrets. Implements a REST - # model with the following objects: - # - # * {::Google::Cloud::SecretManager::V1beta2::Secret Secret} - # * {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest" - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - module SecretManagerService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb deleted file mode 100644 index e674d89468e2..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/client.rb +++ /dev/null @@ -1,1858 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/secretmanager/v1beta2/service_pb" -require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module SecretManager - module V1beta2 - module SecretManagerService - module Rest - ## - # REST client for the SecretManagerService service. - # - # Secret Manager Service - # - # Manages secrets and operations using those secrets. Implements a REST - # model with the following objects: - # - # * {::Google::Cloud::SecretManager::V1beta2::Secret Secret} - # * {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "secretmanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :secret_manager_service_stub - - ## - # Configure the SecretManagerService Client class. - # - # See {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecretManagerService clients - # ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecretManager", "V1beta2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_secrets.timeout = 60.0 - - default_config.rpcs.create_secret.timeout = 60.0 - - default_config.rpcs.add_secret_version.timeout = 60.0 - - default_config.rpcs.get_secret.timeout = 60.0 - - default_config.rpcs.update_secret.timeout = 60.0 - - default_config.rpcs.delete_secret.timeout = 60.0 - - default_config.rpcs.list_secret_versions.timeout = 60.0 - - default_config.rpcs.get_secret_version.timeout = 60.0 - - default_config.rpcs.access_secret_version.timeout = 60.0 - default_config.rpcs.access_secret_version.retry_policy = { - initial_delay: 2.0, max_delay: 60.0, multiplier: 2.0, retry_codes: [14, 8] - } - - default_config.rpcs.disable_secret_version.timeout = 60.0 - - default_config.rpcs.enable_secret_version.timeout = 60.0 - - default_config.rpcs.destroy_secret_version.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.get_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecretManagerService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @secret_manager_service_stub.universe_domain - end - - ## - # Create a new SecretManagerService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecretManagerService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @secret_manager_service_stub = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @secret_manager_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @secret_manager_service_stub.endpoint - config.universe_domain = @secret_manager_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @secret_manager_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @secret_manager_service_stub.logger - end - - # Service calls - - ## - # Lists {::Google::Cloud::SecretManager::V1beta2::Secret Secrets}. - # - # @overload list_secrets(request, options = nil) - # Pass arguments to `list_secrets` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_secrets(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_secrets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secrets}, in the format - # `projects/*` or `projects/*/locations/*` - # @param page_size [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. - # @param filter [::String] - # Optional. Filter string, adhering to the rules in - # [List-operation - # filtering](https://cloud.google.com/secret-manager/docs/filtering). List - # only secrets matching the filter. If filter is empty, all secrets are - # listed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::Secret>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::Secret>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new - # - # # Call the list_secrets method. - # result = client.list_secrets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecretManager::V1beta2::Secret. - # p item - # end - # - def list_secrets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_secrets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_secrets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_secrets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.list_secrets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secret_manager_service_stub, :list_secrets, "secrets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new {::Google::Cloud::SecretManager::V1beta2::Secret Secret} - # containing no - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. - # - # @overload create_secret(request, options = nil) - # Pass arguments to `create_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_secret(parent: nil, secret_id: nil, secret: nil) - # Pass arguments to `create_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project to associate with the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format - # `projects/*` or `projects/*/locations/*`. - # @param secret_id [::String] - # Required. This must be unique within the project. - # - # A secret ID is a string with a maximum length of 255 characters and can - # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and - # underscore (`_`) characters. - # @param secret [::Google::Cloud::SecretManager::V1beta2::Secret, ::Hash] - # Required. A {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with - # initial field values. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::Secret] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new - # - # # Call the create_secret method. - # result = client.create_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. - # p result - # - def create_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_secret.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.create_secret request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} - # containing secret data and attaches it to an existing - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # @overload add_secret_version(request, options = nil) - # Pass arguments to `add_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload add_secret_version(parent: nil, payload: nil) - # Pass arguments to `add_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to associate with the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the - # format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. - # @param payload [::Google::Cloud::SecretManager::V1beta2::SecretPayload, ::Hash] - # Required. The secret payload of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new - # - # # Call the add_secret_version method. - # result = client.add_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p result - # - def add_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.add_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.add_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.add_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.add_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata for a given - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # @overload get_secret(request, options = nil) - # Pass arguments to `get_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::GetSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::GetSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_secret(name: nil) - # Pass arguments to `get_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format - # `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::Secret] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new - # - # # Call the get_secret method. - # result = client.get_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. - # p result - # - def get_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_secret.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.get_secret request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates metadata of an existing - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # @overload update_secret(request, options = nil) - # Pass arguments to `update_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_secret(secret: nil, update_mask: nil) - # Pass arguments to `update_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param secret [::Google::Cloud::SecretManager::V1beta2::Secret, ::Hash] - # Required. {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with updated - # field values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Specifies the fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::Secret] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new - # - # # Call the update_secret method. - # result = client.update_secret request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. - # p result - # - def update_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_secret.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.update_secret request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # @overload delete_secret(request, options = nil) - # Pass arguments to `delete_secret` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_secret(name: nil, etag: nil) - # Pass arguments to `delete_secret` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to delete in the format - # `projects/*/secrets/*`. - # @param etag [::String] - # Optional. Etag of the {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # The request succeeds if it matches the etag of the currently stored secret - # object. If the etag is omitted, the request succeeds. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new - # - # # Call the delete_secret method. - # result = client.delete_secret request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_secret request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_secret.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_secret.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_secret.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.delete_secret request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. - # This call does not return secret data. - # - # @overload list_secret_versions(request, options = nil) - # Pass arguments to `list_secret_versions` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_secret_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_secret_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} associated with the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} to list, - # in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. - # @param page_size [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # ListSecretVersionsResponse.next_page_token][]. - # @param filter [::String] - # Optional. Filter string, adhering to the rules in - # [List-operation - # filtering](https://cloud.google.com/secret-manager/docs/filtering). List - # only secret versions matching the filter. If filter is empty, all secret - # versions are listed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::SecretVersion>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecretManager::V1beta2::SecretVersion>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new - # - # # Call the list_secret_versions method. - # result = client.list_secret_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p item - # end - # - def list_secret_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_secret_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_secret_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_secret_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.list_secret_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secret_manager_service_stub, :list_secret_versions, "versions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata for a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # `projects/*/secrets/*/versions/latest` is an alias to the most recently - # created {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # @overload get_secret_version(request, options = nil) - # Pass arguments to `get_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_secret_version(name: nil) - # Pass arguments to `get_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the - # format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # - # `projects/*/secrets/*/versions/latest` or - # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most - # recently created - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new - # - # # Call the get_secret_version method. - # result = client.get_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p result - # - def get_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.get_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Accesses a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. This - # call returns the secret data. - # - # `projects/*/secrets/*/versions/latest` is an alias to the most recently - # created {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # @overload access_secret_version(request, options = nil) - # Pass arguments to `access_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload access_secret_version(name: nil) - # Pass arguments to `access_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the - # format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # - # `projects/*/secrets/*/versions/latest` or - # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most - # recently created - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new - # - # # Call the access_secret_version method. - # result = client.access_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse. - # p result - # - def access_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.access_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.access_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.access_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.access_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disables a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of - # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::DISABLED DISABLED}. - # - # @overload disable_secret_version(request, options = nil) - # Pass arguments to `disable_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload disable_secret_version(name: nil, etag: nil) - # Pass arguments to `disable_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # disable in the format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # @param etag [::String] - # Optional. Etag of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The - # request succeeds if it matches the etag of the currently stored secret - # version object. If the etag is omitted, the request succeeds. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new - # - # # Call the disable_secret_version method. - # result = client.disable_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p result - # - def disable_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.disable_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.disable_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.disable_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enables a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of - # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::ENABLED ENABLED}. - # - # @overload enable_secret_version(request, options = nil) - # Pass arguments to `enable_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enable_secret_version(name: nil, etag: nil) - # Pass arguments to `enable_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to enable - # in the format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # @param etag [::String] - # Optional. Etag of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The - # request succeeds if it matches the etag of the currently stored secret - # version object. If the etag is omitted, the request succeeds. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new - # - # # Call the enable_secret_version method. - # result = client.enable_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p result - # - def enable_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enable_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.enable_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.enable_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Destroys a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # - # Sets the {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} of - # the {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::DESTROYED DESTROYED} - # and irrevocably destroys the secret data. - # - # @overload destroy_secret_version(request, options = nil) - # Pass arguments to `destroy_secret_version` via a request object, either of type - # {::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload destroy_secret_version(name: nil, etag: nil) - # Pass arguments to `destroy_secret_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # destroy in the format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # @param etag [::String] - # Optional. Etag of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The - # request succeeds if it matches the etag of the currently stored secret - # version object. If the etag is omitted, the request succeeds. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new - # - # # Call the destroy_secret_version method. - # result = client.destroy_secret_version request - # - # # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - # p result - # - def destroy_secret_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.destroy_secret_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.destroy_secret_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.destroy_secret_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.destroy_secret_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified secret. Replaces any - # existing policy. - # - # Permissions on - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} are - # enforced according to the policy set on the associated - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a secret. - # Returns empty policy if the secret exists and does not have a policy set. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that a caller has for the specified secret. - # If the secret does not exist, this call returns an empty set of - # permissions, not a NOT_FOUND error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secret_manager/v1beta2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecretManager::V1beta2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secret_manager_service_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecretManagerService REST API. - # - # This class represents the configuration for SecretManagerService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_secrets to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_secrets.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_secrets.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "secretmanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the SecretManagerService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_secrets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_secrets - ## - # RPC-specific configuration for `create_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :create_secret - ## - # RPC-specific configuration for `add_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :add_secret_version - ## - # RPC-specific configuration for `get_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :get_secret - ## - # RPC-specific configuration for `update_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :update_secret - ## - # RPC-specific configuration for `delete_secret` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_secret - ## - # RPC-specific configuration for `list_secret_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_secret_versions - ## - # RPC-specific configuration for `get_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_secret_version - ## - # RPC-specific configuration for `access_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :access_secret_version - ## - # RPC-specific configuration for `disable_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_secret_version - ## - # RPC-specific configuration for `enable_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_secret_version - ## - # RPC-specific configuration for `destroy_secret_version` - # @return [::Gapic::Config::Method] - # - attr_reader :destroy_secret_version - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_secrets_config = parent_rpcs.list_secrets if parent_rpcs.respond_to? :list_secrets - @list_secrets = ::Gapic::Config::Method.new list_secrets_config - create_secret_config = parent_rpcs.create_secret if parent_rpcs.respond_to? :create_secret - @create_secret = ::Gapic::Config::Method.new create_secret_config - add_secret_version_config = parent_rpcs.add_secret_version if parent_rpcs.respond_to? :add_secret_version - @add_secret_version = ::Gapic::Config::Method.new add_secret_version_config - get_secret_config = parent_rpcs.get_secret if parent_rpcs.respond_to? :get_secret - @get_secret = ::Gapic::Config::Method.new get_secret_config - update_secret_config = parent_rpcs.update_secret if parent_rpcs.respond_to? :update_secret - @update_secret = ::Gapic::Config::Method.new update_secret_config - delete_secret_config = parent_rpcs.delete_secret if parent_rpcs.respond_to? :delete_secret - @delete_secret = ::Gapic::Config::Method.new delete_secret_config - list_secret_versions_config = parent_rpcs.list_secret_versions if parent_rpcs.respond_to? :list_secret_versions - @list_secret_versions = ::Gapic::Config::Method.new list_secret_versions_config - get_secret_version_config = parent_rpcs.get_secret_version if parent_rpcs.respond_to? :get_secret_version - @get_secret_version = ::Gapic::Config::Method.new get_secret_version_config - access_secret_version_config = parent_rpcs.access_secret_version if parent_rpcs.respond_to? :access_secret_version - @access_secret_version = ::Gapic::Config::Method.new access_secret_version_config - disable_secret_version_config = parent_rpcs.disable_secret_version if parent_rpcs.respond_to? :disable_secret_version - @disable_secret_version = ::Gapic::Config::Method.new disable_secret_version_config - enable_secret_version_config = parent_rpcs.enable_secret_version if parent_rpcs.respond_to? :enable_secret_version - @enable_secret_version = ::Gapic::Config::Method.new enable_secret_version_config - destroy_secret_version_config = parent_rpcs.destroy_secret_version if parent_rpcs.respond_to? :destroy_secret_version - @destroy_secret_version = ::Gapic::Config::Method.new destroy_secret_version_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb deleted file mode 100644 index 6975b7911fd6..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/secret_manager_service/rest/service_stub.rb +++ /dev/null @@ -1,1117 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/secretmanager/v1beta2/service_pb" - -module Google - module Cloud - module SecretManager - module V1beta2 - module SecretManagerService - module Rest - ## - # REST service stub for the SecretManagerService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_secrets REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse] - # A result object deserialized from the server's reply - def list_secrets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_secrets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_secrets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::Secret] - # A result object deserialized from the server's reply - def create_secret request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_secret_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_secret", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta2::Secret.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the add_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # A result object deserialized from the server's reply - def add_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_add_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "add_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::GetSecretRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::Secret] - # A result object deserialized from the server's reply - def get_secret request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_secret_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_secret", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta2::Secret.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::Secret] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::Secret] - # A result object deserialized from the server's reply - def update_secret request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_secret_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_secret", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta2::Secret.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_secret request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_secret_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_secret", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_secret_versions REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse] - # A result object deserialized from the server's reply - def list_secret_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_secret_versions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_secret_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # A result object deserialized from the server's reply - def get_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the access_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse] - # A result object deserialized from the server's reply - def access_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_access_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "access_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the disable_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # A result object deserialized from the server's reply - def disable_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "disable_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enable_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # A result object deserialized from the server's reply - def enable_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enable_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the destroy_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion] - # A result object deserialized from the server's reply - def destroy_secret_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_destroy_secret_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "destroy_secret_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_secrets REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_secrets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/secrets", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/secrets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_secret_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{parent}/secrets", - body: "secret", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{parent}/secrets", - body: "secret", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the add_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_add_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{parent}:addVersion", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{parent}:addVersion", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::GetSecretRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_secret_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_secret_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta2/{secret.name}", - body: "secret", - matches: [ - ["secret.name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta2/{secret.name}", - body: "secret", - matches: [ - ["secret.name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_secret REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_secret_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_secret_versions REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_secret_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the access_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_access_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}:access", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{name}:access", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_disable_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{name}:disable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{name}:disable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enable_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{name}:enable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{name}:enable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the destroy_secret_version REST call - # - # @param request_pb [::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_destroy_secret_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{name}:destroy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{name}:destroy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1beta2/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta2/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/secrets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/version.rb deleted file mode 100644 index 256dc4e50205..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secret_manager/v1beta2/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 SecretManager - module V1beta2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/resources_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/resources_pb.rb deleted file mode 100644 index 3c6f0ebe8af9..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/resources_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/secretmanager/v1beta2/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/secretmanager/v1beta2/resources.proto\x12\"google.cloud.secretmanager.v1beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\t\n\x06Secret\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12L\n\x0breplication\x18\x02 \x01(\x0b\x32/.google.cloud.secretmanager.v1beta2.ReplicationB\x06\xe0\x41\x05\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.secretmanager.v1beta2.Secret.LabelsEntry\x12>\n\x06topics\x18\x05 \x03(\x0b\x32).google.cloud.secretmanager.v1beta2.TopicB\x03\xe0\x41\x01\x12\x36\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01H\x00\x12-\n\x03ttl\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x04H\x00\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x08rotation\x18\t \x01(\x0b\x32,.google.cloud.secretmanager.v1beta2.RotationB\x03\xe0\x41\x01\x12\\\n\x0fversion_aliases\x18\x0b \x03(\x0b\x32>.google.cloud.secretmanager.v1beta2.Secret.VersionAliasesEntryB\x03\xe0\x41\x01\x12U\n\x0b\x61nnotations\x18\r \x03(\x0b\x32;.google.cloud.secretmanager.v1beta2.Secret.AnnotationsEntryB\x03\xe0\x41\x01\x12;\n\x13version_destroy_ttl\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12g\n\x1b\x63ustomer_managed_encryption\x18\x0f \x01(\x0b\x32=.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x35\n\x13VersionAliasesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x99\x01\xea\x41\x95\x01\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\x12\x38projects/{project}/locations/{location}/secrets/{secret}*\x07secrets2\x06secretB\x0c\n\nexpiration\"\xd1\x06\n\rSecretVersion\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0c\x64\x65stroy_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12K\n\x05state\x18\x04 \x01(\x0e\x32\x37.google.cloud.secretmanager.v1beta2.SecretVersion.StateB\x03\xe0\x41\x03\x12Q\n\x12replication_status\x18\x05 \x01(\x0b\x32\x35.google.cloud.secretmanager.v1beta2.ReplicationStatus\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12.\n!client_specified_payload_checksum\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x16scheduled_destroy_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12m\n\x1b\x63ustomer_managed_encryption\x18\t \x01(\x0b\x32\x43.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\"H\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tDESTROYED\x10\x03:\xe2\x01\xea\x41\xde\x01\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}\x12Rprojects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}*\x0esecretVersions2\rsecretVersion\"\xaa\x04\n\x0bReplication\x12N\n\tautomatic\x18\x01 \x01(\x0b\x32\x39.google.cloud.secretmanager.v1beta2.Replication.AutomaticH\x00\x12S\n\x0cuser_managed\x18\x02 \x01(\x0b\x32;.google.cloud.secretmanager.v1beta2.Replication.UserManagedH\x00\x1at\n\tAutomatic\x12g\n\x1b\x63ustomer_managed_encryption\x18\x01 \x01(\x0b\x32=.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionB\x03\xe0\x41\x01\x1a\xf0\x01\n\x0bUserManaged\x12Z\n\x08replicas\x18\x01 \x03(\x0b\x32\x43.google.cloud.secretmanager.v1beta2.Replication.UserManaged.ReplicaB\x03\xe0\x41\x02\x1a\x84\x01\n\x07Replica\x12\x10\n\x08location\x18\x01 \x01(\t\x12g\n\x1b\x63ustomer_managed_encryption\x18\x02 \x01(\x0b\x32=.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionB\x03\xe0\x41\x01\x42\r\n\x0breplication\"6\n\x19\x43ustomerManagedEncryption\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x85\x05\n\x11ReplicationStatus\x12Z\n\tautomatic\x18\x01 \x01(\x0b\x32\x45.google.cloud.secretmanager.v1beta2.ReplicationStatus.AutomaticStatusH\x00\x12_\n\x0cuser_managed\x18\x02 \x01(\x0b\x32G.google.cloud.secretmanager.v1beta2.ReplicationStatus.UserManagedStatusH\x00\x1a\x80\x01\n\x0f\x41utomaticStatus\x12m\n\x1b\x63ustomer_managed_encryption\x18\x01 \x01(\x0b\x32\x43.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\x1a\x99\x02\n\x11UserManagedStatus\x12l\n\x08replicas\x18\x01 \x03(\x0b\x32U.google.cloud.secretmanager.v1beta2.ReplicationStatus.UserManagedStatus.ReplicaStatusB\x03\xe0\x41\x03\x1a\x95\x01\n\rReplicaStatus\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12m\n\x1b\x63ustomer_managed_encryption\x18\x02 \x01(\x0b\x32\x43.google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionStatusB\x03\xe0\x41\x03\x42\x14\n\x12replication_status\"D\n\x1f\x43ustomerManagedEncryptionStatus\x12!\n\x14kms_key_version_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"_\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02:C\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\"\x80\x01\n\x08Rotation\x12;\n\x12next_rotation_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x37\n\x0frotation_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x04\"L\n\rSecretPayload\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x1d\n\x0b\x64\x61ta_crc32c\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0e\n\x0c_data_crc32cB\x80\x02\n&com.google.cloud.secretmanager.v1beta2B\x0eResourcesProtoP\x01ZLcloud.google.com/go/secretmanager/apiv1beta2/secretmanagerpb;secretmanagerpb\xa2\x02\x03GSM\xaa\x02\"Google.Cloud.SecretManager.V1Beta2\xca\x02\"Google\\Cloud\\SecretManager\\V1beta2\xea\x02%Google::Cloud::SecretManager::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecretManager - module V1beta2 - Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Secret").msgclass - SecretVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.SecretVersion").msgclass - SecretVersion::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.SecretVersion.State").enummodule - Replication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Replication").msgclass - Replication::Automatic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Replication.Automatic").msgclass - Replication::UserManaged = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Replication.UserManaged").msgclass - Replication::UserManaged::Replica = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Replication.UserManaged.Replica").msgclass - CustomerManagedEncryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.CustomerManagedEncryption").msgclass - ReplicationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ReplicationStatus").msgclass - ReplicationStatus::AutomaticStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ReplicationStatus.AutomaticStatus").msgclass - ReplicationStatus::UserManagedStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ReplicationStatus.UserManagedStatus").msgclass - ReplicationStatus::UserManagedStatus::ReplicaStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ReplicationStatus.UserManagedStatus.ReplicaStatus").msgclass - CustomerManagedEncryptionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.CustomerManagedEncryptionStatus").msgclass - Topic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Topic").msgclass - Rotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.Rotation").msgclass - SecretPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.SecretPayload").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_pb.rb deleted file mode 100644 index 36eb635dcf02..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/secretmanager/v1beta2/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/secretmanager/v1beta2/resources_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n0google/cloud/secretmanager/v1beta2/service.proto\x12\"google.cloud.secretmanager.v1beta2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/secretmanager/v1beta2/resources.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x97\x01\n\x12ListSecretsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#secretmanager.googleapis.com/Secret\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x13ListSecretsResponse\x12;\n\x07secrets\x18\x01 \x03(\x0b\x32*.google.cloud.secretmanager.v1beta2.Secret\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\xab\x01\n\x13\x43reateSecretRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#secretmanager.googleapis.com/Secret\x12\x16\n\tsecret_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x06secret\x18\x03 \x01(\x0b\x32*.google.cloud.secretmanager.v1beta2.SecretB\x03\xe0\x41\x02\"\x9f\x01\n\x17\x41\x64\x64SecretVersionRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\x12G\n\x07payload\x18\x02 \x01(\x0b\x32\x31.google.cloud.secretmanager.v1beta2.SecretPayloadB\x03\xe0\x41\x02\"M\n\x10GetSecretRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\"\x9e\x01\n\x19ListSecretVersionsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x8e\x01\n\x1aListSecretVersionsResponse\x12\x43\n\x08versions\x18\x01 \x03(\x0b\x32\x31.google.cloud.secretmanager.v1beta2.SecretVersion\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"[\n\x17GetSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\x8c\x01\n\x13UpdateSecretRequest\x12?\n\x06secret\x18\x01 \x01(\x0b\x32*.google.cloud.secretmanager.v1beta2.SecretB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"^\n\x1a\x41\x63\x63\x65ssSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\xa0\x01\n\x1b\x41\x63\x63\x65ssSecretVersionResponse\x12=\n\x04name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x42\n\x07payload\x18\x02 \x01(\x0b\x32\x31.google.cloud.secretmanager.v1beta2.SecretPayload\"c\n\x13\x44\x65leteSecretRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#secretmanager.googleapis.com/Secret\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n\x1b\x44isableSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"q\n\x1a\x45nableSecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"r\n\x1b\x44\x65stroySecretVersionRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xf7\x1e\n\x14SecretManagerService\x12\xe9\x01\n\x0bListSecrets\x12\x36.google.cloud.secretmanager.v1beta2.ListSecretsRequest\x1a\x37.google.cloud.secretmanager.v1beta2.ListSecretsResponse\"i\xda\x41\x06parent\x82\xd3\xe4\x93\x02Z\x12$/v1beta2/{parent=projects/*}/secretsZ2\x12\x30/v1beta2/{parent=projects/*/locations/*}/secrets\x12\x80\x02\n\x0c\x43reateSecret\x12\x37.google.cloud.secretmanager.v1beta2.CreateSecretRequest\x1a*.google.cloud.secretmanager.v1beta2.Secret\"\x8a\x01\xda\x41\x17parent,secret_id,secret\x82\xd3\xe4\x93\x02j\"$/v1beta2/{parent=projects/*}/secrets:\x06secretZ:\"0/v1beta2/{parent=projects/*/locations/*}/secrets:\x06secret\x12\x96\x02\n\x10\x41\x64\x64SecretVersion\x12;.google.cloud.secretmanager.v1beta2.AddSecretVersionRequest\x1a\x31.google.cloud.secretmanager.v1beta2.SecretVersion\"\x91\x01\xda\x41\x0eparent,payload\x82\xd3\xe4\x93\x02z\"1/v1beta2/{parent=projects/*/secrets/*}:addVersion:\x01*ZB\"=/v1beta2/{parent=projects/*/locations/*/secrets/*}:addVersion:\x01*\x12\xd6\x01\n\tGetSecret\x12\x34.google.cloud.secretmanager.v1beta2.GetSecretRequest\x1a*.google.cloud.secretmanager.v1beta2.Secret\"g\xda\x41\x04name\x82\xd3\xe4\x93\x02Z\x12$/v1beta2/{name=projects/*/secrets/*}Z2\x12\x30/v1beta2/{name=projects/*/locations/*/secrets/*}\x12\x89\x02\n\x0cUpdateSecret\x12\x37.google.cloud.secretmanager.v1beta2.UpdateSecretRequest\x1a*.google.cloud.secretmanager.v1beta2.Secret\"\x93\x01\xda\x41\x12secret,update_mask\x82\xd3\xe4\x93\x02x2+/v1beta2/{secret.name=projects/*/secrets/*}:\x06secretZA27/v1beta2/{secret.name=projects/*/locations/*/secrets/*}:\x06secret\x12\xc8\x01\n\x0c\x44\x65leteSecret\x12\x37.google.cloud.secretmanager.v1beta2.DeleteSecretRequest\x1a\x16.google.protobuf.Empty\"g\xda\x41\x04name\x82\xd3\xe4\x93\x02Z*$/v1beta2/{name=projects/*/secrets/*}Z2*0/v1beta2/{name=projects/*/locations/*/secrets/*}\x12\x94\x02\n\x12ListSecretVersions\x12=.google.cloud.secretmanager.v1beta2.ListSecretVersionsRequest\x1a>.google.cloud.secretmanager.v1beta2.ListSecretVersionsResponse\"\x7f\xda\x41\x06parent\x82\xd3\xe4\x93\x02p\x12//v1beta2/{parent=projects/*/secrets/*}/versionsZ=\x12;/v1beta2/{parent=projects/*/locations/*/secrets/*}/versions\x12\x81\x02\n\x10GetSecretVersion\x12;.google.cloud.secretmanager.v1beta2.GetSecretVersionRequest\x1a\x31.google.cloud.secretmanager.v1beta2.SecretVersion\"}\xda\x41\x04name\x82\xd3\xe4\x93\x02p\x12//v1beta2/{name=projects/*/secrets/*/versions/*}Z=\x12;/v1beta2/{name=projects/*/locations/*/secrets/*/versions/*}\x12\xa4\x02\n\x13\x41\x63\x63\x65ssSecretVersion\x12>.google.cloud.secretmanager.v1beta2.AccessSecretVersionRequest\x1a?.google.cloud.secretmanager.v1beta2.AccessSecretVersionResponse\"\x8b\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02~\x12\x36/v1beta2/{name=projects/*/secrets/*/versions/*}:accessZD\x12\x42/v1beta2/{name=projects/*/locations/*/secrets/*/versions/*}:access\x12\xa1\x02\n\x14\x44isableSecretVersion\x12?.google.cloud.secretmanager.v1beta2.DisableSecretVersionRequest\x1a\x31.google.cloud.secretmanager.v1beta2.SecretVersion\"\x94\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x86\x01\"7/v1beta2/{name=projects/*/secrets/*/versions/*}:disable:\x01*ZH\"C/v1beta2/{name=projects/*/locations/*/secrets/*/versions/*}:disable:\x01*\x12\x9d\x02\n\x13\x45nableSecretVersion\x12>.google.cloud.secretmanager.v1beta2.EnableSecretVersionRequest\x1a\x31.google.cloud.secretmanager.v1beta2.SecretVersion\"\x92\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x84\x01\"6/v1beta2/{name=projects/*/secrets/*/versions/*}:enable:\x01*ZG\"B/v1beta2/{name=projects/*/locations/*/secrets/*/versions/*}:enable:\x01*\x12\xa1\x02\n\x14\x44\x65stroySecretVersion\x12?.google.cloud.secretmanager.v1beta2.DestroySecretVersionRequest\x1a\x31.google.cloud.secretmanager.v1beta2.SecretVersion\"\x94\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x86\x01\"7/v1beta2/{name=projects/*/secrets/*/versions/*}:destroy:\x01*ZH\"C/v1beta2/{name=projects/*/locations/*/secrets/*/versions/*}:destroy:\x01*\x12\xd5\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\x89\x01\x82\xd3\xe4\x93\x02\x82\x01\"5/v1beta2/{resource=projects/*/secrets/*}:setIamPolicy:\x01*ZF\"A/v1beta2/{resource=projects/*/locations/*/secrets/*}:setIamPolicy:\x01*\x12\xce\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\x82\x01\x82\xd3\xe4\x93\x02|\x12\x35/v1beta2/{resource=projects/*/secrets/*}:getIamPolicyZC\x12\x41/v1beta2/{resource=projects/*/locations/*/secrets/*}:getIamPolicy\x12\x81\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\x95\x01\x82\xd3\xe4\x93\x02\x8e\x01\";/v1beta2/{resource=projects/*/secrets/*}:testIamPermissions:\x01*ZL\"G/v1beta2/{resource=projects/*/locations/*/secrets/*}:testIamPermissions:\x01*\x1aP\xca\x41\x1csecretmanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfe\x01\n&com.google.cloud.secretmanager.v1beta2B\x0cServiceProtoP\x01ZLcloud.google.com/go/secretmanager/apiv1beta2/secretmanagerpb;secretmanagerpb\xa2\x02\x03GSM\xaa\x02\"Google.Cloud.SecretManager.V1Beta2\xca\x02\"Google\\Cloud\\SecretManager\\V1beta2\xea\x02%Google::Cloud::SecretManager::V1beta2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecretManager - module V1beta2 - ListSecretsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ListSecretsRequest").msgclass - ListSecretsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ListSecretsResponse").msgclass - CreateSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.CreateSecretRequest").msgclass - AddSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.AddSecretVersionRequest").msgclass - GetSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.GetSecretRequest").msgclass - ListSecretVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ListSecretVersionsRequest").msgclass - ListSecretVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.ListSecretVersionsResponse").msgclass - GetSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.GetSecretVersionRequest").msgclass - UpdateSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.UpdateSecretRequest").msgclass - AccessSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.AccessSecretVersionRequest").msgclass - AccessSecretVersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.AccessSecretVersionResponse").msgclass - DeleteSecretRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.DeleteSecretRequest").msgclass - DisableSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.DisableSecretVersionRequest").msgclass - EnableSecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.EnableSecretVersionRequest").msgclass - DestroySecretVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.secretmanager.v1beta2.DestroySecretVersionRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb deleted file mode 100644 index 86d8147e919d..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/lib/google/cloud/secretmanager/v1beta2/service_services_pb.rb +++ /dev/null @@ -1,125 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/secretmanager/v1beta2/service.proto for package 'Google.Cloud.SecretManager.V1beta2' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/secretmanager/v1beta2/service_pb' - -module Google - module Cloud - module SecretManager - module V1beta2 - module SecretManagerService - # Secret Manager Service - # - # Manages secrets and operations using those secrets. Implements a REST - # model with the following objects: - # - # * [Secret][google.cloud.secretmanager.v1beta2.Secret] - # * [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.secretmanager.v1beta2.SecretManagerService' - - # Lists [Secrets][google.cloud.secretmanager.v1beta2.Secret]. - rpc :ListSecrets, ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest, ::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse - # Creates a new [Secret][google.cloud.secretmanager.v1beta2.Secret] - # containing no - # [SecretVersions][google.cloud.secretmanager.v1beta2.SecretVersion]. - rpc :CreateSecret, ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest, ::Google::Cloud::SecretManager::V1beta2::Secret - # Creates a new - # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] - # containing secret data and attaches it to an existing - # [Secret][google.cloud.secretmanager.v1beta2.Secret]. - rpc :AddSecretVersion, ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::SecretVersion - # Gets metadata for a given - # [Secret][google.cloud.secretmanager.v1beta2.Secret]. - rpc :GetSecret, ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest, ::Google::Cloud::SecretManager::V1beta2::Secret - # Updates metadata of an existing - # [Secret][google.cloud.secretmanager.v1beta2.Secret]. - rpc :UpdateSecret, ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest, ::Google::Cloud::SecretManager::V1beta2::Secret - # Deletes a [Secret][google.cloud.secretmanager.v1beta2.Secret]. - rpc :DeleteSecret, ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest, ::Google::Protobuf::Empty - # Lists [SecretVersions][google.cloud.secretmanager.v1beta2.SecretVersion]. - # This call does not return secret data. - rpc :ListSecretVersions, ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest, ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse - # Gets metadata for a - # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. - # - # `projects/*/secrets/*/versions/latest` is an alias to the most recently - # created [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. - rpc :GetSecretVersion, ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::SecretVersion - # Accesses a - # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. This - # call returns the secret data. - # - # `projects/*/secrets/*/versions/latest` is an alias to the most recently - # created [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. - rpc :AccessSecretVersion, ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse - # Disables a - # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. - # - # Sets the [state][google.cloud.secretmanager.v1beta2.SecretVersion.state] of - # the [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] to - # [DISABLED][google.cloud.secretmanager.v1beta2.SecretVersion.State.DISABLED]. - rpc :DisableSecretVersion, ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::SecretVersion - # Enables a - # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. - # - # Sets the [state][google.cloud.secretmanager.v1beta2.SecretVersion.state] of - # the [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] to - # [ENABLED][google.cloud.secretmanager.v1beta2.SecretVersion.State.ENABLED]. - rpc :EnableSecretVersion, ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::SecretVersion - # Destroys a - # [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. - # - # Sets the [state][google.cloud.secretmanager.v1beta2.SecretVersion.state] of - # the [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] to - # [DESTROYED][google.cloud.secretmanager.v1beta2.SecretVersion.State.DESTROYED] - # and irrevocably destroys the secret data. - rpc :DestroySecretVersion, ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest, ::Google::Cloud::SecretManager::V1beta2::SecretVersion - # Sets the access control policy on the specified secret. Replaces any - # existing policy. - # - # Permissions on - # [SecretVersions][google.cloud.secretmanager.v1beta2.SecretVersion] are - # enforced according to the policy set on the associated - # [Secret][google.cloud.secretmanager.v1beta2.Secret]. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the access control policy for a secret. - # Returns empty policy if the secret exists and does not have a policy set. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns permissions that a caller has for the specified secret. - # If the secret does not exist, this call returns an empty set of - # permissions, not a NOT_FOUND error. - # - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/README.md b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/README.md deleted file mode 100644 index 397e964dde26..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Secret Manager V1BETA2 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb deleted file mode 100644 index 67caed18595b..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/resources.rb +++ /dev/null @@ -1,512 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecretManager - module V1beta2 - # A {::Google::Cloud::SecretManager::V1beta2::Secret Secret} is a logical secret - # whose value and versions can be accessed. - # - # A {::Google::Cloud::SecretManager::V1beta2::Secret Secret} is made up of zero or - # more {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} that - # represent the secret data. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} in the format - # `projects/*/secrets/*`. - # @!attribute [rw] replication - # @return [::Google::Cloud::SecretManager::V1beta2::Replication] - # Optional. Immutable. The replication policy of the secret data attached to - # the {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # The replication policy cannot be changed after the Secret has been created. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} was created. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The labels assigned to this Secret. - # - # Label keys must be between 1 and 63 characters long, have a UTF-8 encoding - # of maximum 128 bytes, and must conform to the following PCRE regular - # expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}` - # - # Label values must be between 0 and 63 characters long, have a UTF-8 - # encoding of maximum 128 bytes, and must conform to the following PCRE - # regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}` - # - # No more than 64 labels can be assigned to a given resource. - # @!attribute [rw] topics - # @return [::Array<::Google::Cloud::SecretManager::V1beta2::Topic>] - # Optional. A list of up to 10 Pub/Sub topics to which messages are published - # when control plane operations are called on the secret or its versions. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Timestamp in UTC when the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} is scheduled to - # expire. This is always provided on output, regardless of what was sent on - # input. - # - # Note: The following fields are mutually exclusive: `expire_time`, `ttl`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ttl - # @return [::Google::Protobuf::Duration] - # Input only. The TTL for the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # Note: The following fields are mutually exclusive: `ttl`, `expire_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] etag - # @return [::String] - # Optional. Etag of the currently stored - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # @!attribute [rw] rotation - # @return [::Google::Cloud::SecretManager::V1beta2::Rotation] - # Optional. Rotation policy attached to the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. May be excluded if - # there is no rotation policy. - # @!attribute [rw] version_aliases - # @return [::Google::Protobuf::Map{::String => ::Integer}] - # Optional. Mapping from version alias to version name. - # - # A version alias is a string with a maximum length of 63 characters and can - # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) - # and underscore ('_') characters. An alias string must start with a - # letter and cannot be the string 'latest' or 'NEW'. - # No more than 50 aliases can be assigned to a given secret. - # - # Version-Alias pairs will be viewable via GetSecret and modifiable via - # UpdateSecret. Access by alias is only supported for - # GetSecretVersion and AccessSecretVersion. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Custom metadata about the secret. - # - # Annotations are distinct from various forms of labels. - # Annotations exist to allow client tools to store their own state - # information without requiring a database. - # - # Annotation keys must be between 1 and 63 characters long, have a UTF-8 - # encoding of maximum 128 bytes, begin and end with an alphanumeric character - # ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and - # alphanumerics in between these symbols. - # - # The total size of annotation keys and values must be less than 16KiB. - # @!attribute [rw] version_destroy_ttl - # @return [::Google::Protobuf::Duration] - # Optional. Secret Version TTL after destruction request - # - # This is a part of the Delayed secret version destroy feature. - # For secret with TTL>0, version destruction doesn't happen immediately - # on calling destroy instead the version goes to a disabled state and - # destruction happens after the TTL expires. - # @!attribute [rw] customer_managed_encryption - # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryption] - # Optional. The customer-managed encryption configuration of the Regionalised - # Secrets. If no configuration is provided, Google-managed default encryption - # is used. - # - # Updates to the {::Google::Cloud::SecretManager::V1beta2::Secret Secret} - # encryption configuration only apply to - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} added - # afterwards. They do not apply retroactively to existing - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. - class Secret - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Integer] - class VersionAliasesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A secret version resource in the Secret Manager API. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the - # format `projects/*/secrets/*/versions/*`. - # - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} IDs in a - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} start at 1 and are - # incremented for each subsequent version of the secret. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} was - # created. - # @!attribute [r] destroy_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time this - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} was - # destroyed. Only present if - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion#state state} is - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::DESTROYED DESTROYED}. - # @!attribute [r] state - # @return [::Google::Cloud::SecretManager::V1beta2::SecretVersion::State] - # Output only. The current state of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # @!attribute [rw] replication_status - # @return [::Google::Cloud::SecretManager::V1beta2::ReplicationStatus] - # The replication status of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # @!attribute [r] etag - # @return [::String] - # Output only. Etag of the currently stored - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # @!attribute [r] client_specified_payload_checksum - # @return [::Boolean] - # Output only. True if payload checksum specified in - # {::Google::Cloud::SecretManager::V1beta2::SecretPayload SecretPayload} object - # has been received by - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client SecretManagerService} - # on - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion}. - # @!attribute [r] scheduled_destroy_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Output only. Scheduled destroy time for secret version. - # This is a part of the Delayed secret version destroy feature. For a - # Secret with a valid version destroy TTL, when a secert version is - # destroyed, version is moved to disabled state and it is scheduled for - # destruction Version is destroyed only after the scheduled_destroy_time. - # @!attribute [r] customer_managed_encryption - # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryptionStatus] - # Output only. The customer-managed encryption status of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. Only - # populated if customer-managed encryption is used and - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} is a Regionalised - # Secret. - class SecretVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}, - # indicating if it can be accessed. - module State - # Not specified. This value is unused and invalid. - STATE_UNSPECIFIED = 0 - - # The {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} may - # be accessed. - ENABLED = 1 - - # The {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} may - # not be accessed, but the secret data is still available and can be placed - # back into the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion::State::ENABLED ENABLED} - # state. - DISABLED = 2 - - # The {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} is - # destroyed and the secret data is no longer stored. A version may not - # leave this state once entered. - DESTROYED = 3 - end - end - - # A policy that defines the replication and encryption configuration of data. - # @!attribute [rw] automatic - # @return [::Google::Cloud::SecretManager::V1beta2::Replication::Automatic] - # The {::Google::Cloud::SecretManager::V1beta2::Secret Secret} will - # automatically be replicated without any restrictions. - # - # Note: The following fields are mutually exclusive: `automatic`, `user_managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] user_managed - # @return [::Google::Cloud::SecretManager::V1beta2::Replication::UserManaged] - # The {::Google::Cloud::SecretManager::V1beta2::Secret Secret} will only be - # replicated into the locations specified. - # - # Note: The following fields are mutually exclusive: `user_managed`, `automatic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Replication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A replication policy that replicates the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} payload without any - # restrictions. - # @!attribute [rw] customer_managed_encryption - # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryption] - # Optional. The customer-managed encryption configuration of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. If no configuration - # is provided, Google-managed default encryption is used. - # - # Updates to the {::Google::Cloud::SecretManager::V1beta2::Secret Secret} - # encryption configuration only apply to - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} added - # afterwards. They do not apply retroactively to existing - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. - class Automatic - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A replication policy that replicates the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} payload into the - # locations specified in - # {::Google::Cloud::SecretManager::V1beta2::Replication::UserManaged#replicas Replication.UserManaged.replicas} - # @!attribute [rw] replicas - # @return [::Array<::Google::Cloud::SecretManager::V1beta2::Replication::UserManaged::Replica>] - # Required. The list of Replicas for this - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # - # Cannot be empty. - class UserManaged - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a Replica for this - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # @!attribute [rw] location - # @return [::String] - # The canonical IDs of the location to replicate data. - # For example: `"us-east1"`. - # @!attribute [rw] customer_managed_encryption - # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryption] - # Optional. The customer-managed encryption configuration of the - # [User-Managed Replica][Replication.UserManaged.Replica]. If no - # configuration is provided, Google-managed default encryption is used. - # - # Updates to the {::Google::Cloud::SecretManager::V1beta2::Secret Secret} - # encryption configuration only apply to - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} - # added afterwards. They do not apply retroactively to existing - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions}. - class Replica - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Configuration for encrypting secret payloads using customer-managed - # encryption keys (CMEK). - # @!attribute [rw] kms_key_name - # @return [::String] - # Required. The resource name of the Cloud KMS CryptoKey used to encrypt - # secret payloads. - # - # For secrets using the - # {::Google::Cloud::SecretManager::V1beta2::Replication::UserManaged UserManaged} - # replication policy type, Cloud KMS CryptoKeys must reside in the same - # location as the [replica location][Secret.UserManaged.Replica.location]. - # - # For secrets using the - # {::Google::Cloud::SecretManager::V1beta2::Replication::Automatic Automatic} - # replication policy type, Cloud KMS CryptoKeys must reside in `global`. - # - # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - class CustomerManagedEncryption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The replication status of a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # @!attribute [rw] automatic - # @return [::Google::Cloud::SecretManager::V1beta2::ReplicationStatus::AutomaticStatus] - # Describes the replication status of a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} with - # automatic replication. - # - # Only populated if the parent - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} has an automatic - # replication policy. - # - # Note: The following fields are mutually exclusive: `automatic`, `user_managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] user_managed - # @return [::Google::Cloud::SecretManager::V1beta2::ReplicationStatus::UserManagedStatus] - # Describes the replication status of a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} with - # user-managed replication. - # - # Only populated if the parent - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} has a user-managed - # replication policy. - # - # Note: The following fields are mutually exclusive: `user_managed`, `automatic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ReplicationStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The replication status of a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} using - # automatic replication. - # - # Only populated if the parent - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} has an automatic - # replication policy. - # @!attribute [r] customer_managed_encryption - # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryptionStatus] - # Output only. The customer-managed encryption status of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. Only - # populated if customer-managed encryption is used. - class AutomaticStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The replication status of a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} using - # user-managed replication. - # - # Only populated if the parent - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} has a user-managed - # replication policy. - # @!attribute [r] replicas - # @return [::Array<::Google::Cloud::SecretManager::V1beta2::ReplicationStatus::UserManagedStatus::ReplicaStatus>] - # Output only. The list of replica statuses for the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - class UserManagedStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the status of a user-managed replica for the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # @!attribute [r] location - # @return [::String] - # Output only. The canonical ID of the replica location. - # For example: `"us-east1"`. - # @!attribute [r] customer_managed_encryption - # @return [::Google::Cloud::SecretManager::V1beta2::CustomerManagedEncryptionStatus] - # Output only. The customer-managed encryption status of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. Only - # populated if customer-managed encryption is used. - class ReplicaStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Describes the status of customer-managed encryption. - # @!attribute [rw] kms_key_version_name - # @return [::String] - # Required. The resource name of the Cloud KMS CryptoKeyVersion used to - # encrypt the secret payload, in the following format: - # `projects/*/locations/*/keyRings/*/cryptoKeys/*/versions/*`. - class CustomerManagedEncryptionStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Pub/Sub topic which Secret Manager will publish to when control plane - # events occur on this secret. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Pub/Sub topic that will be published to, - # in the following format: `projects/*/topics/*`. For publication to succeed, - # the Secret Manager service agent must have the `pubsub.topic.publish` - # permission on the topic. The Pub/Sub Publisher role - # (`roles/pubsub.publisher`) includes this permission. - class Topic - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The rotation time and period for a - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. At next_rotation_time, - # Secret Manager will send a Pub/Sub notification to the topics configured on - # the Secret. {::Google::Cloud::SecretManager::V1beta2::Secret#topics Secret.topics} - # must be set to configure rotation. - # @!attribute [rw] next_rotation_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Timestamp in UTC at which the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} is scheduled to rotate. - # Cannot be set to less than 300s (5 min) in the future and at most - # 3153600000s (100 years). - # - # {::Google::Cloud::SecretManager::V1beta2::Rotation#next_rotation_time next_rotation_time} - # MUST be set if - # {::Google::Cloud::SecretManager::V1beta2::Rotation#rotation_period rotation_period} - # is set. - # @!attribute [rw] rotation_period - # @return [::Google::Protobuf::Duration] - # Input only. The Duration between rotation notifications. Must be in seconds - # and at least 3600s (1h) and at most 3153600000s (100 years). - # - # If - # {::Google::Cloud::SecretManager::V1beta2::Rotation#rotation_period rotation_period} - # is set, - # {::Google::Cloud::SecretManager::V1beta2::Rotation#next_rotation_time next_rotation_time} - # must be set. - # {::Google::Cloud::SecretManager::V1beta2::Rotation#next_rotation_time next_rotation_time} - # will be advanced by this period when the service automatically sends - # rotation notifications. - class Rotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A secret payload resource in the Secret Manager API. This contains the - # sensitive secret payload that is associated with a - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - # @!attribute [rw] data - # @return [::String] - # The secret data. Must be no larger than 64KiB. - # @!attribute [rw] data_crc32c - # @return [::Integer] - # Optional. If specified, - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client SecretManagerService} - # will verify the integrity of the received - # {::Google::Cloud::SecretManager::V1beta2::SecretPayload#data data} on - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion} - # calls using the crc32c checksum and store it to include in future - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion} - # responses. If a checksum is not provided in the - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion} - # request, the - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client SecretManagerService} - # will generate and store one for you. - # - # The CRC32C value is encoded as a Int64 for compatibility, and can be - # safely downconverted to uint32 in languages that support this type. - # https://cloud.google.com/apis/design/design_patterns#integer_types - class SecretPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.rb deleted file mode 100644 index 9df94e60b5d9..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/cloud/secretmanager/v1beta2/service.rb +++ /dev/null @@ -1,321 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecretManager - module V1beta2 - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secrets SecretManagerService.ListSecrets}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secrets}, in the format - # `projects/*` or `projects/*/locations/*` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse#next_page_token ListSecretsResponse.next_page_token}. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter string, adhering to the rules in - # [List-operation - # filtering](https://cloud.google.com/secret-manager/docs/filtering). List - # only secrets matching the filter. If filter is empty, all secrets are - # listed. - class ListSecretsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secrets SecretManagerService.ListSecrets}. - # @!attribute [rw] secrets - # @return [::Array<::Google::Cloud::SecretManager::V1beta2::Secret>] - # The list of {::Google::Cloud::SecretManager::V1beta2::Secret Secrets} sorted in - # reverse by create_time (newest first). - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. Pass this value in - # {::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest#page_token ListSecretsRequest.page_token} - # to retrieve the next page. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of {::Google::Cloud::SecretManager::V1beta2::Secret Secrets} - # but 0 when the - # {::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest#filter ListSecretsRequest.filter} - # field is set. - class ListSecretsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#create_secret SecretManagerService.CreateSecret}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project to associate with the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format - # `projects/*` or `projects/*/locations/*`. - # @!attribute [rw] secret_id - # @return [::String] - # Required. This must be unique within the project. - # - # A secret ID is a string with a maximum length of 255 characters and can - # contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and - # underscore (`_`) characters. - # @!attribute [rw] secret - # @return [::Google::Cloud::SecretManager::V1beta2::Secret] - # Required. A {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with - # initial field values. - class CreateSecretRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version SecretManagerService.AddSecretVersion}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to associate with the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the - # format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. - # @!attribute [rw] payload - # @return [::Google::Cloud::SecretManager::V1beta2::SecretPayload] - # Required. The secret payload of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - class AddSecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret SecretManagerService.GetSecret}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret}, in the format - # `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. - class GetSecretRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secret_versions SecretManagerService.ListSecretVersions}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} associated with the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} to list, - # in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to be returned in a single page. If - # set to 0, the server decides the number of results to return. If the - # number is greater than 25000, it is capped at 25000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # ListSecretVersionsResponse.next_page_token][]. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter string, adhering to the rules in - # [List-operation - # filtering](https://cloud.google.com/secret-manager/docs/filtering). List - # only secret versions matching the filter. If filter is empty, all secret - # versions are listed. - class ListSecretVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secret_versions SecretManagerService.ListSecretVersions}. - # @!attribute [rw] versions - # @return [::Array<::Google::Cloud::SecretManager::V1beta2::SecretVersion>] - # The list of - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} sorted - # in reverse by create_time (newest first). - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. Pass this value in - # {::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest#page_token ListSecretVersionsRequest.page_token} - # to retrieve the next page. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersions} but 0 - # when the - # {::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest#filter ListSecretsRequest.filter} - # field is set. - class ListSecretVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret_version SecretManagerService.GetSecretVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the - # format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # - # `projects/*/secrets/*/versions/latest` or - # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most - # recently created - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - class GetSecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#update_secret SecretManagerService.UpdateSecret}. - # @!attribute [rw] secret - # @return [::Google::Cloud::SecretManager::V1beta2::Secret] - # Required. {::Google::Cloud::SecretManager::V1beta2::Secret Secret} with updated - # field values. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Specifies the fields to be updated. - class UpdateSecretRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the - # format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # - # `projects/*/secrets/*/versions/latest` or - # `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most - # recently created - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. - class AccessSecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version SecretManagerService.AccessSecretVersion}. - # @!attribute [rw] name - # @return [::String] - # The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} in the - # format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # @!attribute [rw] payload - # @return [::Google::Cloud::SecretManager::V1beta2::SecretPayload] - # Secret payload - class AccessSecretVersionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#delete_secret SecretManagerService.DeleteSecret}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::Secret Secret} to delete in the format - # `projects/*/secrets/*`. - # @!attribute [rw] etag - # @return [::String] - # Optional. Etag of the {::Google::Cloud::SecretManager::V1beta2::Secret Secret}. - # The request succeeds if it matches the etag of the currently stored secret - # object. If the etag is omitted, the request succeeds. - class DeleteSecretRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#disable_secret_version SecretManagerService.DisableSecretVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # disable in the format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # @!attribute [rw] etag - # @return [::String] - # Optional. Etag of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The - # request succeeds if it matches the etag of the currently stored secret - # version object. If the etag is omitted, the request succeeds. - class DisableSecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#enable_secret_version SecretManagerService.EnableSecretVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to enable - # in the format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # @!attribute [rw] etag - # @return [::String] - # Optional. Etag of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The - # request succeeds if it matches the etag of the currently stored secret - # version object. If the etag is omitted, the request succeeds. - class EnableSecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#destroy_secret_version SecretManagerService.DestroySecretVersion}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion} to - # destroy in the format `projects/*/secrets/*/versions/*` or - # `projects/*/locations/*/secrets/*/versions/*`. - # @!attribute [rw] etag - # @return [::String] - # Optional. Etag of the - # {::Google::Cloud::SecretManager::V1beta2::SecretVersion SecretVersion}. The - # request succeeds if it matches the etag of the currently stored secret - # version object. If the etag is omitted, the request succeeds. - class DestroySecretVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/Gemfile b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/Gemfile deleted file mode 100644 index dbb02f1e7509..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-secret_manager-v1beta2", path: "../" -else - gem "google-cloud-secret_manager-v1beta2" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/access_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/access_secret_version.rb deleted file mode 100644 index d0d080ffd38d..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/access_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_AccessSecretVersion_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the access_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version. -# -def access_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new - - # Call the access_secret_version method. - result = client.access_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_AccessSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/add_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/add_secret_version.rb deleted file mode 100644 index e80ead1cc007..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/add_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_AddSecretVersion_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the add_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version. -# -def add_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new - - # Call the add_secret_version method. - result = client.add_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_AddSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/create_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/create_secret.rb deleted file mode 100644 index e3bad58b58f1..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/create_secret.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_CreateSecret_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the create_secret call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#create_secret. -# -def create_secret - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new - - # Call the create_secret method. - result = client.create_secret request - - # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_CreateSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/delete_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/delete_secret.rb deleted file mode 100644 index 13e175a049e9..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/delete_secret.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_DeleteSecret_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the delete_secret call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#delete_secret. -# -def delete_secret - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new - - # Call the delete_secret method. - result = client.delete_secret request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_DeleteSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/destroy_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/destroy_secret_version.rb deleted file mode 100644 index d806c328f332..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/destroy_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_DestroySecretVersion_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the destroy_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#destroy_secret_version. -# -def destroy_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new - - # Call the destroy_secret_version method. - result = client.destroy_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_DestroySecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/disable_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/disable_secret_version.rb deleted file mode 100644 index b5c83f8366d2..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/disable_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_DisableSecretVersion_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the disable_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#disable_secret_version. -# -def disable_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new - - # Call the disable_secret_version method. - result = client.disable_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_DisableSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/enable_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/enable_secret_version.rb deleted file mode 100644 index 25e18d630f29..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/enable_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_EnableSecretVersion_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the enable_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#enable_secret_version. -# -def enable_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new - - # Call the enable_secret_version method. - result = client.enable_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_EnableSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_iam_policy.rb deleted file mode 100644 index 27c9a36d2f37..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_GetIamPolicy_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the get_iam_policy call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret.rb deleted file mode 100644 index 85d7b4256e33..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_GetSecret_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the get_secret call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret. -# -def get_secret - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new - - # Call the get_secret method. - result = client.get_secret request - - # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_GetSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret_version.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret_version.rb deleted file mode 100644 index 20072c84fd22..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/get_secret_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_GetSecretVersion_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the get_secret_version call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret_version. -# -def get_secret_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new - - # Call the get_secret_version method. - result = client.get_secret_version request - - # The returned object is of type Google::Cloud::SecretManager::V1beta2::SecretVersion. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_GetSecretVersion_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secret_versions.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secret_versions.rb deleted file mode 100644 index 7742f1a55a7d..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secret_versions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_ListSecretVersions_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the list_secret_versions call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secret_versions. -# -def list_secret_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new - - # Call the list_secret_versions method. - result = client.list_secret_versions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecretManager::V1beta2::SecretVersion. - p item - end -end -# [END secretmanager_v1beta2_generated_SecretManagerService_ListSecretVersions_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secrets.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secrets.rb deleted file mode 100644 index fd2e425d30c3..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/list_secrets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_ListSecrets_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the list_secrets call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secrets. -# -def list_secrets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new - - # Call the list_secrets method. - result = client.list_secrets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecretManager::V1beta2::Secret. - p item - end -end -# [END secretmanager_v1beta2_generated_SecretManagerService_ListSecrets_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/set_iam_policy.rb deleted file mode 100644 index 30030038e28f..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_SetIamPolicy_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the set_iam_policy call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/test_iam_permissions.rb deleted file mode 100644 index 52ad7f6d8e08..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_TestIamPermissions_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the test_iam_permissions call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/update_secret.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/update_secret.rb deleted file mode 100644 index 74eec379aa18..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/secret_manager_service/update_secret.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START secretmanager_v1beta2_generated_SecretManagerService_UpdateSecret_sync] -require "google/cloud/secret_manager/v1beta2" - -## -# Snippet for the update_secret call in the SecretManagerService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#update_secret. -# -def update_secret - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new - - # Call the update_secret method. - result = client.update_secret request - - # The returned object is of type Google::Cloud::SecretManager::V1beta2::Secret. - p result -end -# [END secretmanager_v1beta2_generated_SecretManagerService_UpdateSecret_sync] diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/snippet_metadata_google.cloud.secretmanager.v1beta2.json b/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/snippet_metadata_google.cloud.secretmanager.v1beta2.json deleted file mode 100644 index 8628979bdc17..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/snippets/snippet_metadata_google.cloud.secretmanager.v1beta2.json +++ /dev/null @@ -1,615 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-secret_manager-v1beta2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.secretmanager.v1beta2", - "version": "v1beta2" - } - ] - }, - "snippets": [ - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_ListSecrets_sync", - "title": "Snippet for the list_secrets call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secrets.", - "file": "secret_manager_service/list_secrets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_secrets", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secrets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "ListSecrets", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.ListSecrets", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_CreateSecret_sync", - "title": "Snippet for the create_secret call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#create_secret.", - "file": "secret_manager_service/create_secret.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_secret", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#create_secret", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta2::Secret", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "CreateSecret", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.CreateSecret", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_AddSecretVersion_sync", - "title": "Snippet for the add_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version.", - "file": "secret_manager_service/add_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "add_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#add_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta2::SecretVersion", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "AddSecretVersion", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.AddSecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_GetSecret_sync", - "title": "Snippet for the get_secret call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret.", - "file": "secret_manager_service/get_secret.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_secret", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::GetSecretRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta2::Secret", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "GetSecret", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.GetSecret", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_UpdateSecret_sync", - "title": "Snippet for the update_secret call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#update_secret.", - "file": "secret_manager_service/update_secret.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_secret", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#update_secret", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta2::Secret", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "UpdateSecret", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.UpdateSecret", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_DeleteSecret_sync", - "title": "Snippet for the delete_secret call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#delete_secret.", - "file": "secret_manager_service/delete_secret.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_secret", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#delete_secret", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "DeleteSecret", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.DeleteSecret", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_ListSecretVersions_sync", - "title": "Snippet for the list_secret_versions call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secret_versions.", - "file": "secret_manager_service/list_secret_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_secret_versions", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#list_secret_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "ListSecretVersions", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.ListSecretVersions", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_GetSecretVersion_sync", - "title": "Snippet for the get_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret_version.", - "file": "secret_manager_service/get_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta2::SecretVersion", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "GetSecretVersion", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.GetSecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_AccessSecretVersion_sync", - "title": "Snippet for the access_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version.", - "file": "secret_manager_service/access_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "access_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#access_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "AccessSecretVersion", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.AccessSecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_DisableSecretVersion_sync", - "title": "Snippet for the disable_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#disable_secret_version.", - "file": "secret_manager_service/disable_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#disable_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta2::SecretVersion", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "DisableSecretVersion", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.DisableSecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_EnableSecretVersion_sync", - "title": "Snippet for the enable_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#enable_secret_version.", - "file": "secret_manager_service/enable_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#enable_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta2::SecretVersion", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "EnableSecretVersion", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.EnableSecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_DestroySecretVersion_sync", - "title": "Snippet for the destroy_secret_version call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#destroy_secret_version.", - "file": "secret_manager_service/destroy_secret_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "destroy_secret_version", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#destroy_secret_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecretManager::V1beta2::SecretVersion", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "DestroySecretVersion", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.DestroySecretVersion", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#set_iam_policy.", - "file": "secret_manager_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.SetIamPolicy", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_iam_policy.", - "file": "secret_manager_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.GetIamPolicy", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "secretmanager_v1beta2_generated_SecretManagerService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the SecretManagerService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#test_iam_permissions.", - "file": "secret_manager_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "SecretManagerService::Client", - "full_name": "::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService.TestIamPermissions", - "service": { - "short_name": "SecretManagerService", - "full_name": "google.cloud.secretmanager.v1beta2.SecretManagerService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_test.rb deleted file mode 100644 index f28501a34bc5..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_paths_test.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/secret_manager/v1beta2/secret_manager_service" - -class ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_secret_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.secret_path project: "value0", secret: "value1" - assert_equal "projects/value0/secrets/value1", path - - path = client.secret_path project: "value0", location: "value1", secret: "value2" - assert_equal "projects/value0/locations/value1/secrets/value2", path - end - end - - def test_secret_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.secret_version_path project: "value0", secret: "value1", secret_version: "value2" - assert_equal "projects/value0/secrets/value1/versions/value2", path - - path = client.secret_version_path project: "value0", location: "value1", secret: "value2", secret_version: "value3" - assert_equal "projects/value0/locations/value1/secrets/value2/versions/value3", path - end - end - - def test_topic_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.topic_path project: "value0", topic: "value1" - assert_equal "projects/value0/topics/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_test.rb deleted file mode 100644 index 498bb30fc0c7..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_rest_test.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/secretmanager/v1beta2/service_pb" -require "google/cloud/secret_manager/v1beta2/secret_manager_service/rest" - - -class ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_secrets - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_secrets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_list_secrets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_secrets_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_secrets parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_secrets ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_secrets(::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_secrets_client_stub.call_count - end - end - end - - def test_create_secret - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta2::Secret.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - secret_id = "hello world" - secret = {} - - create_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_create_secret_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_secret parent: parent, secret_id: secret_id, secret: secret do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_secret ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_secret(::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_secret_client_stub.call_count - end - end - end - - def test_add_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - payload = {} - - add_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_add_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, add_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.add_secret_version({ parent: parent, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.add_secret_version parent: parent, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.add_secret_version ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new(parent: parent, payload: payload) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.add_secret_version({ parent: parent, payload: payload }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.add_secret_version(::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new(parent: parent, payload: payload), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, add_secret_version_client_stub.call_count - end - end - end - - def test_get_secret - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta2::Secret.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_get_secret_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_secret({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_secret name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_secret ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_secret({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_secret(::Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_secret_client_stub.call_count - end - end - end - - def test_update_secret - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta2::Secret.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - secret = {} - update_mask = {} - - update_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_update_secret_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_secret({ secret: secret, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_secret secret: secret, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_secret ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new(secret: secret, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_secret({ secret: secret, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_secret(::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new(secret: secret, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_secret_client_stub.call_count - end - end - end - - def test_delete_secret - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_secret_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_delete_secret_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_secret({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_secret name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_secret ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_secret({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_secret(::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_secret_client_stub.call_count - end - end - end - - def test_list_secret_versions - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_secret_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_list_secret_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_secret_versions_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_secret_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_secret_versions ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_secret_versions(::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_secret_versions_client_stub.call_count - end - end - end - - def test_get_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_get_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_secret_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_secret_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_secret_version ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_secret_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_secret_version(::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_secret_version_client_stub.call_count - end - end - end - - def test_access_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - access_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_access_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, access_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.access_secret_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.access_secret_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.access_secret_version ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.access_secret_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.access_secret_version(::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, access_secret_version_client_stub.call_count - end - end - end - - def test_disable_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - disable_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_disable_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.disable_secret_version({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.disable_secret_version name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.disable_secret_version ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.disable_secret_version({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.disable_secret_version(::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_secret_version_client_stub.call_count - end - end - end - - def test_enable_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - enable_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_enable_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.enable_secret_version({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.enable_secret_version name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.enable_secret_version ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.enable_secret_version({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.enable_secret_version(::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_secret_version_client_stub.call_count - end - end - end - - def test_destroy_secret_version - # Create test objects. - client_result = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - destroy_secret_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_destroy_secret_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, destroy_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.destroy_secret_version({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.destroy_secret_version name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.destroy_secret_version ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.destroy_secret_version({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.destroy_secret_version(::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, destroy_secret_version_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_test.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_test.rb deleted file mode 100644 index f8e5a58d175f..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/google/cloud/secret_manager/v1beta2/secret_manager_service_test.rb +++ /dev/null @@ -1,1020 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/secretmanager/v1beta2/service_pb" -require "google/cloud/secret_manager/v1beta2/secret_manager_service" - -class ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_secrets - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta2::ListSecretsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_secrets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_secrets, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_secrets_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_secrets parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_secrets ::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_secrets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_secrets(::Google::Cloud::SecretManager::V1beta2::ListSecretsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_secrets_client_stub.call_rpc_count - end - end - - def test_create_secret - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta2::Secret.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - secret_id = "hello world" - secret = {} - - create_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_secret, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["secret_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta2::Secret), request["secret"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_secret parent: parent, secret_id: secret_id, secret: secret do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_secret ::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_secret({ parent: parent, secret_id: secret_id, secret: secret }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_secret(::Google::Cloud::SecretManager::V1beta2::CreateSecretRequest.new(parent: parent, secret_id: secret_id, secret: secret), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_secret_client_stub.call_rpc_count - end - end - - def test_add_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - payload = {} - - add_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :add_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta2::SecretPayload), request["payload"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, add_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.add_secret_version({ parent: parent, payload: payload }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.add_secret_version parent: parent, payload: payload do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.add_secret_version ::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new(parent: parent, payload: payload) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.add_secret_version({ parent: parent, payload: payload }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.add_secret_version(::Google::Cloud::SecretManager::V1beta2::AddSecretVersionRequest.new(parent: parent, payload: payload), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, add_secret_version_client_stub.call_rpc_count - end - end - - def test_get_secret - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta2::Secret.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_secret, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_secret({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_secret name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_secret ::Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_secret({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_secret(::Google::Cloud::SecretManager::V1beta2::GetSecretRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_secret_client_stub.call_rpc_count - end - end - - def test_update_secret - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta2::Secret.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - secret = {} - update_mask = {} - - update_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_secret, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecretManager::V1beta2::Secret), request["secret"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_secret({ secret: secret, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_secret secret: secret, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_secret ::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new(secret: secret, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_secret({ secret: secret, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_secret(::Google::Cloud::SecretManager::V1beta2::UpdateSecretRequest.new(secret: secret, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_secret_client_stub.call_rpc_count - end - end - - def test_delete_secret - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_secret_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_secret, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_secret_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_secret({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_secret name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_secret ::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_secret({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_secret(::Google::Cloud::SecretManager::V1beta2::DeleteSecretRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_secret_client_stub.call_rpc_count - end - end - - def test_list_secret_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_secret_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_secret_versions, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_secret_versions_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_secret_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_secret_versions ::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_secret_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_secret_versions(::Google::Cloud::SecretManager::V1beta2::ListSecretVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_secret_versions_client_stub.call_rpc_count - end - end - - def test_get_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_secret_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_secret_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_secret_version ::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_secret_version({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_secret_version(::Google::Cloud::SecretManager::V1beta2::GetSecretVersionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_secret_version_client_stub.call_rpc_count - end - end - - def test_access_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - access_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :access_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, access_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.access_secret_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.access_secret_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.access_secret_version ::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.access_secret_version({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.access_secret_version(::Google::Cloud::SecretManager::V1beta2::AccessSecretVersionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, access_secret_version_client_stub.call_rpc_count - end - end - - def test_disable_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - disable_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.disable_secret_version({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.disable_secret_version name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.disable_secret_version ::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.disable_secret_version({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.disable_secret_version(::Google::Cloud::SecretManager::V1beta2::DisableSecretVersionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, disable_secret_version_client_stub.call_rpc_count - end - end - - def test_enable_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - enable_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.enable_secret_version({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.enable_secret_version name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.enable_secret_version ::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.enable_secret_version({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.enable_secret_version(::Google::Cloud::SecretManager::V1beta2::EnableSecretVersionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enable_secret_version_client_stub.call_rpc_count - end - end - - def test_destroy_secret_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecretManager::V1beta2::SecretVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - destroy_secret_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :destroy_secret_version, name - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, destroy_secret_version_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.destroy_secret_version({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.destroy_secret_version name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.destroy_secret_version ::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.destroy_secret_version({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.destroy_secret_version(::Google::Cloud::SecretManager::V1beta2::DestroySecretVersionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, destroy_secret_version_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::SecretManager::V1beta2::SecretManagerService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/helper.rb b/owl-bot-staging/google-cloud-secret_manager-v1beta2/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-secret_manager-v1beta2/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-v1/.gitignore b/owl-bot-staging/google-cloud-secure_source_manager-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/.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-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-secure_source_manager-v1/.repo-metadata.json deleted file mode 100644 index 8301929ac8fd..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/.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-v1/latest", - "distribution_name": "google-cloud-secure_source_manager-v1", - "is_cloud": true, - "language": "ruby", - "name": "securesourcemanager", - "name_pretty": "Secure Source Manager V1 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. Note that google-cloud-secure_source_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secure_source_manager instead. See the readme for more details.", - "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-v1/.rubocop.yml b/owl-bot-staging/google-cloud-secure_source_manager-v1/.rubocop.yml deleted file mode 100644 index 93adabe4f472..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-secure_source_manager-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-secure_source_manager-v1.rb" diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/.toys.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/.yardopts b/owl-bot-staging/google-cloud-secure_source_manager-v1/.yardopts deleted file mode 100644 index 6adcda101376..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Secure Source Manager V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-secure_source_manager-v1/AUTHENTICATION.md deleted file mode 100644 index 32e59d3cbbea..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-secure_source_manager-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-secure_source_manager-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/secure_source_manager/v1" - -client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new 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/v1" - -::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-secure_source_manager-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/secure_source_manager/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-secure_source_manager-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/Gemfile b/owl-bot-staging/google-cloud-secure_source_manager-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-v1/LICENSE.md b/owl-bot-staging/google-cloud-secure_source_manager-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/README.md b/owl-bot-staging/google-cloud-secure_source_manager-v1/README.md deleted file mode 100644 index 7336cf26afe2..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Secure Source Manager V1 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. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Secure Source Manager V1 API. Most users should consider using -the main client gem, -[google-cloud-secure_source_manager](https://rubygems.org/gems/google-cloud-secure_source_manager). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-secure_source_manager-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/securesourcemanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/secure_source_manager/v1" - -client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new -request = ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new # (request fields as keyword arguments...) -response = client.list_instances request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-secure_source_manager-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/secure-source-manager/docs/overview) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/secure_source_manager/v1" -require "logger" - -client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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-v1/Rakefile b/owl-bot-staging/google-cloud-secure_source_manager-v1/Rakefile deleted file mode 100644 index 9fd2e0c76cc0..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-secure_source_manager-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/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-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-secure_source_manager-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-secure_source_manager-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-secure_source_manager-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-secure_source_manager-v1" - header "google-cloud-secure_source_manager-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-secure_source_manager-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-secure_source_manager-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-secure_source_manager-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-secure_source_manager-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-secure_source_manager-v1/gapic_metadata.json deleted file mode 100644 index cb4bf595a281..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/gapic_metadata.json +++ /dev/null @@ -1,278 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.securesourcemanager.v1", - "libraryPackage": "::Google::Cloud::SecureSourceManager::V1", - "services": { - "SecureSourceManager": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client", - "rpcs": { - "ListInstances": { - "methods": [ - "list_instances" - ] - }, - "GetInstance": { - "methods": [ - "get_instance" - ] - }, - "CreateInstance": { - "methods": [ - "create_instance" - ] - }, - "DeleteInstance": { - "methods": [ - "delete_instance" - ] - }, - "ListRepositories": { - "methods": [ - "list_repositories" - ] - }, - "GetRepository": { - "methods": [ - "get_repository" - ] - }, - "CreateRepository": { - "methods": [ - "create_repository" - ] - }, - "UpdateRepository": { - "methods": [ - "update_repository" - ] - }, - "DeleteRepository": { - "methods": [ - "delete_repository" - ] - }, - "ListHooks": { - "methods": [ - "list_hooks" - ] - }, - "GetHook": { - "methods": [ - "get_hook" - ] - }, - "CreateHook": { - "methods": [ - "create_hook" - ] - }, - "UpdateHook": { - "methods": [ - "update_hook" - ] - }, - "DeleteHook": { - "methods": [ - "delete_hook" - ] - }, - "GetIamPolicyRepo": { - "methods": [ - "get_iam_policy_repo" - ] - }, - "SetIamPolicyRepo": { - "methods": [ - "set_iam_policy_repo" - ] - }, - "TestIamPermissionsRepo": { - "methods": [ - "test_iam_permissions_repo" - ] - }, - "CreateBranchRule": { - "methods": [ - "create_branch_rule" - ] - }, - "ListBranchRules": { - "methods": [ - "list_branch_rules" - ] - }, - "GetBranchRule": { - "methods": [ - "get_branch_rule" - ] - }, - "UpdateBranchRule": { - "methods": [ - "update_branch_rule" - ] - }, - "DeleteBranchRule": { - "methods": [ - "delete_branch_rule" - ] - }, - "CreatePullRequest": { - "methods": [ - "create_pull_request" - ] - }, - "GetPullRequest": { - "methods": [ - "get_pull_request" - ] - }, - "ListPullRequests": { - "methods": [ - "list_pull_requests" - ] - }, - "UpdatePullRequest": { - "methods": [ - "update_pull_request" - ] - }, - "MergePullRequest": { - "methods": [ - "merge_pull_request" - ] - }, - "OpenPullRequest": { - "methods": [ - "open_pull_request" - ] - }, - "ClosePullRequest": { - "methods": [ - "close_pull_request" - ] - }, - "ListPullRequestFileDiffs": { - "methods": [ - "list_pull_request_file_diffs" - ] - }, - "FetchTree": { - "methods": [ - "fetch_tree" - ] - }, - "FetchBlob": { - "methods": [ - "fetch_blob" - ] - }, - "CreateIssue": { - "methods": [ - "create_issue" - ] - }, - "GetIssue": { - "methods": [ - "get_issue" - ] - }, - "ListIssues": { - "methods": [ - "list_issues" - ] - }, - "UpdateIssue": { - "methods": [ - "update_issue" - ] - }, - "DeleteIssue": { - "methods": [ - "delete_issue" - ] - }, - "OpenIssue": { - "methods": [ - "open_issue" - ] - }, - "CloseIssue": { - "methods": [ - "close_issue" - ] - }, - "GetPullRequestComment": { - "methods": [ - "get_pull_request_comment" - ] - }, - "ListPullRequestComments": { - "methods": [ - "list_pull_request_comments" - ] - }, - "CreatePullRequestComment": { - "methods": [ - "create_pull_request_comment" - ] - }, - "UpdatePullRequestComment": { - "methods": [ - "update_pull_request_comment" - ] - }, - "DeletePullRequestComment": { - "methods": [ - "delete_pull_request_comment" - ] - }, - "BatchCreatePullRequestComments": { - "methods": [ - "batch_create_pull_request_comments" - ] - }, - "ResolvePullRequestComments": { - "methods": [ - "resolve_pull_request_comments" - ] - }, - "UnresolvePullRequestComments": { - "methods": [ - "unresolve_pull_request_comments" - ] - }, - "CreateIssueComment": { - "methods": [ - "create_issue_comment" - ] - }, - "GetIssueComment": { - "methods": [ - "get_issue_comment" - ] - }, - "ListIssueComments": { - "methods": [ - "list_issue_comments" - ] - }, - "UpdateIssueComment": { - "methods": [ - "update_issue_comment" - ] - }, - "DeleteIssueComment": { - "methods": [ - "delete_issue_comment" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/google-cloud-secure_source_manager-v1.gemspec b/owl-bot-staging/google-cloud-secure_source_manager-v1/google-cloud-secure_source_manager-v1.gemspec deleted file mode 100644 index c1b92e838a02..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/google-cloud-secure_source_manager-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/secure_source_manager/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-secure_source_manager-v1" - gem.version = Google::Cloud::SecureSourceManager::V1::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. Note that google-cloud-secure_source_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-secure_source_manager instead. See the readme for more details." - 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") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google-cloud-secure_source_manager-v1.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google-cloud-secure_source_manager-v1.rb deleted file mode 100644 index 0de64e27e2a1..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google-cloud-secure_source_manager-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/secure_source_manager/v1" diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1.rb deleted file mode 100644 index 34a35e7b08eb..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/secure_source_manager/v1/secure_source_manager" -require "google/cloud/secure_source_manager/v1/version" - -module Google - module Cloud - module SecureSourceManager - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/secure_source_manager/v1" - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/secure_source_manager/v1" - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/secure_source_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.rb deleted file mode 100644 index 31599cbdad14..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/bindings_override.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module SecureSourceManager - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/secure_source_manager/v1/rest" - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecureSourceManager"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/rest.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/rest.rb deleted file mode 100644 index 8696eba4fdff..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/secure_source_manager/v1/secure_source_manager/rest" -require "google/cloud/secure_source_manager/v1/bindings_override" -require "google/cloud/secure_source_manager/v1/version" - -module Google - module Cloud - module SecureSourceManager - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/secure_source_manager/v1/rest" - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb deleted file mode 100644 index b4982af54739..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/secure_source_manager/v1/version" - -require "google/cloud/secure_source_manager/v1/secure_source_manager/credentials" -require "google/cloud/secure_source_manager/v1/secure_source_manager/paths" -require "google/cloud/secure_source_manager/v1/secure_source_manager/operations" -require "google/cloud/secure_source_manager/v1/secure_source_manager/client" -require "google/cloud/secure_source_manager/v1/secure_source_manager/rest" - -module Google - module Cloud - module SecureSourceManager - module V1 - ## - # Secure Source Manager API - # - # Access Secure Source Manager instances, resources, and repositories. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/secure_source_manager/v1/secure_source_manager" - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/secure_source_manager/v1/secure_source_manager/rest" - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - module SecureSourceManager - end - end - end - end -end - -helper_path = ::File.join __dir__, "secure_source_manager", "helpers.rb" -require "google/cloud/secure_source_manager/v1/secure_source_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb deleted file mode 100644 index 5320e8dfbdfa..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/client.rb +++ /dev/null @@ -1,5883 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module SecureSourceManager - module V1 - module SecureSourceManager - ## - # Client for the SecureSourceManager service. - # - # Secure Source Manager API - # - # Access Secure Source Manager instances, resources, and repositories. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securesourcemanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :secure_source_manager_stub - - ## - # Configure the SecureSourceManager Client class. - # - # See {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecureSourceManager clients - # ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecureSourceManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_instances.timeout = 60.0 - default_config.rpcs.list_instances.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_instance.timeout = 60.0 - default_config.rpcs.get_instance.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_repositories.timeout = 60.0 - default_config.rpcs.list_repositories.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_repository.timeout = 60.0 - default_config.rpcs.get_repository.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy_repo.timeout = 60.0 - default_config.rpcs.get_iam_policy_repo.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecureSourceManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @secure_source_manager_stub.universe_domain - end - - ## - # Create a new SecureSourceManager client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecureSourceManager client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/securesourcemanager/v1/secure_source_manager_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @secure_source_manager_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @secure_source_manager_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @secure_source_manager_stub.endpoint - config.universe_domain = @secure_source_manager_stub.universe_domain - config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @secure_source_manager_stub.endpoint - config.universe_domain = @secure_source_manager_stub.universe_domain - config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @secure_source_manager_stub.logger - end - - # Service calls - - ## - # Lists Instances in a given project and location. - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListInstancesRequest. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filter for filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_instances.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :list_instances, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_instances, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::Instance] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :get_instance, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new instance in a given project and location. - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param instance_id [::String] - # Required. ID of the instance to be created. - # @param instance [::Google::Cloud::SecureSourceManager::V1::Instance, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :create_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single instance. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_instance(name: nil, request_id: nil, force: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param force [::Boolean] - # Optional. If set to true, will force the deletion of the instance. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :delete_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Repositories in a given project and location. - # - # The instance field is required in the query parameter for requests using - # the securesourcemanager.googleapis.com endpoint. - # - # @overload list_repositories(request, options = nil) - # Pass arguments to `list_repositories` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, instance: nil) - # Pass arguments to `list_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListRepositoriesRequest. - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filter results. - # @param instance [::String] - # Optional. The name of the instance in which the repository is hosted, - # formatted as - # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - # When listing repositories via securesourcemanager.googleapis.com, this - # field is required. When listing repositories via *.sourcemanager.dev, this - # field is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new - # - # # Call the list_repositories method. - # result = client.list_repositories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Repository. - # p item - # end - # - def list_repositories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_repositories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_repositories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :list_repositories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_repositories, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata of a repository. - # - # @overload get_repository(request, options = nil) - # Pass arguments to `get_repository` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_repository(name: nil) - # Pass arguments to `get_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the repository to retrieve. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::Repository] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Repository] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new - # - # # Call the get_repository method. - # result = client.get_repository request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Repository. - # p result - # - def get_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :get_repository, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new repository in a given project and location. - # - # The Repository.Instance field is required in the request body for requests - # using the securesourcemanager.googleapis.com endpoint. - # - # @overload create_repository(request, options = nil) - # Pass arguments to `create_repository` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_repository(parent: nil, repository: nil, repository_id: nil) - # Pass arguments to `create_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project in which to create the repository. Values are of the - # form `projects/{project_number}/locations/{location_id}` - # @param repository [::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash] - # Required. The resource being created. - # @param repository_id [::String] - # Required. The ID to use for the repository, which will become the final - # component of the repository's resource name. This value should be 4-63 - # characters, and valid characters are /[a-z][0-9]-/. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new - # - # # Call the create_repository method. - # result = client.create_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :create_repository, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the metadata of a repository. - # - # @overload update_repository(request, options = nil) - # Pass arguments to `update_repository` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_repository(update_mask: nil, repository: nil, validate_only: nil) - # Pass arguments to `update_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # repository resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param repository [::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash] - # Required. The repository being updated. - # @param validate_only [::Boolean] - # Optional. False by default. If set to true, the request is validated and - # the user is provided with an expected result, but no actual change is made. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new - # - # # Call the update_repository method. - # result = client.update_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.repository&.name - header_params["repository.name"] = request.repository.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :update_repository, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Repository. - # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_repository(name: nil, allow_missing: nil) - # Pass arguments to `delete_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the repository to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the repository is not found, the request will - # succeed but no action will be taken on the server. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new - # - # # Call the delete_repository method. - # result = client.delete_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :delete_repository, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists hooks in a given repository. - # - # @overload list_hooks(request, options = nil) - # Pass arguments to `list_hooks` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListHooksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_hooks(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_hooks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListHooksRequest. - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new - # - # # Call the list_hooks method. - # result = client.list_hooks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Hook. - # p item - # end - # - def list_hooks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_hooks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_hooks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_hooks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :list_hooks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_hooks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata of a hook. - # - # @overload get_hook(request, options = nil) - # Pass arguments to `get_hook` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetHookRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetHookRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_hook(name: nil) - # Pass arguments to `get_hook` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the hook to retrieve. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::Hook] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Hook] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new - # - # # Call the get_hook method. - # result = client.get_hook request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook. - # p result - # - def get_hook request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetHookRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_hook.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_hook.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_hook.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :get_hook, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new hook in a given repository. - # - # @overload create_hook(request, options = nil) - # Pass arguments to `create_hook` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateHookRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_hook(parent: nil, hook: nil, hook_id: nil) - # Pass arguments to `create_hook` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The repository in which to create the hook. Values are of the - # form - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] - # Required. The resource being created. - # @param hook_id [::String] - # Required. The ID to use for the hook, which will become the final component - # of the hook's resource name. This value restricts to lower-case letters, - # numbers, and hyphen, with the first character a letter, the last a letter - # or a number, and a 63 character maximum. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new - # - # # Call the create_hook method. - # result = client.create_hook request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_hook request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_hook.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_hook.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_hook.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :create_hook, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the metadata of a hook. - # - # @overload update_hook(request, options = nil) - # Pass arguments to `update_hook` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_hook(update_mask: nil, hook: nil) - # Pass arguments to `update_hook` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # hook resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] - # Required. The hook being updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new - # - # # Call the update_hook method. - # result = client.update_hook request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_hook request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_hook.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.hook&.name - header_params["hook.name"] = request.hook.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_hook.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_hook.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :update_hook, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Hook. - # - # @overload delete_hook(request, options = nil) - # Pass arguments to `delete_hook` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_hook(name: nil) - # Pass arguments to `delete_hook` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the hook to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new - # - # # Call the delete_hook method. - # result = client.delete_hook request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_hook request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_hook.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_hook.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_hook.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :delete_hook, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get IAM policy for a repository. - # - # @overload get_iam_policy_repo(request, options = nil) - # Pass arguments to `get_iam_policy_repo` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy_repo(resource: nil, options: nil) - # Pass arguments to `get_iam_policy_repo` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy_repo method. - # result = client.get_iam_policy_repo request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy_repo request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy_repo.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy_repo.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy_repo.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :get_iam_policy_repo, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Set IAM policy on a repository. - # - # @overload set_iam_policy_repo(request, options = nil) - # Pass arguments to `set_iam_policy_repo` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy_repo` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy_repo method. - # result = client.set_iam_policy_repo request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy_repo request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy_repo.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy_repo.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy_repo.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :set_iam_policy_repo, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Test IAM permissions on a repository. - # IAM permission checks are not required on this method. - # - # @overload test_iam_permissions_repo(request, options = nil) - # Pass arguments to `test_iam_permissions_repo` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions_repo(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions_repo` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions_repo method. - # result = client.test_iam_permissions_repo request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions_repo request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions_repo.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions_repo.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions_repo.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :test_iam_permissions_repo, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # CreateBranchRule creates a branch rule in a given repository. - # - # @overload create_branch_rule(request, options = nil) - # Pass arguments to `create_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) - # Pass arguments to `create_branch_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] - # @param branch_rule_id [::String] - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new - # - # # Call the create_branch_rule method. - # result = client.create_branch_rule request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_branch_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_branch_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_branch_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_branch_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :create_branch_rule, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # ListBranchRules lists branch rules in a given repository. - # - # @overload list_branch_rules(request, options = nil) - # Pass arguments to `list_branch_rules` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_branch_rules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_branch_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new - # - # # Call the list_branch_rules method. - # result = client.list_branch_rules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::BranchRule. - # p item - # end - # - def list_branch_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_branch_rules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_branch_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_branch_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :list_branch_rules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # GetBranchRule gets a branch rule. - # - # @overload get_branch_rule(request, options = nil) - # Pass arguments to `get_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_branch_rule(name: nil) - # Pass arguments to `get_branch_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the repository to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::BranchRule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new - # - # # Call the get_branch_rule method. - # result = client.get_branch_rule request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule. - # p result - # - def get_branch_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_branch_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_branch_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_branch_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :get_branch_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # UpdateBranchRule updates a branch rule. - # - # @overload update_branch_rule(request, options = nil) - # Pass arguments to `update_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_branch_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually post it. (https://google.aip.dev/163, for declarative friendly) - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # branchRule resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new - # - # # Call the update_branch_rule method. - # result = client.update_branch_rule request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_branch_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_branch_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.branch_rule&.name - header_params["branch_rule.name"] = request.branch_rule.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_branch_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_branch_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :update_branch_rule, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # DeleteBranchRule deletes a branch rule. - # - # @overload delete_branch_rule(request, options = nil) - # Pass arguments to `delete_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_branch_rule(name: nil, allow_missing: nil) - # Pass arguments to `delete_branch_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # @param allow_missing [::Boolean] - # Optional. If set to true, and the branch rule is not found, the request - # will succeed but no action will be taken on the server. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new - # - # # Call the delete_branch_rule method. - # result = client.delete_branch_rule request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_branch_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_branch_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_branch_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_branch_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :delete_branch_rule, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a pull request. - # - # @overload create_pull_request(request, options = nil) - # Pass arguments to `create_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_pull_request(parent: nil, pull_request: nil) - # Pass arguments to `create_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The repository that the pull request is created from. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] - # Required. The pull request to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new - # - # # Call the create_pull_request method. - # result = client.create_pull_request request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_pull_request.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :create_pull_request, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a pull request. - # - # @overload get_pull_request(request, options = nil) - # Pass arguments to `get_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_pull_request(name: nil) - # Pass arguments to `get_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the pull request to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::PullRequest] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new - # - # # Call the get_pull_request method. - # result = client.get_pull_request request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequest. - # p result - # - def get_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_pull_request.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :get_pull_request, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists pull requests in a repository. - # - # @overload list_pull_requests(request, options = nil) - # Pass arguments to `list_pull_requests` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_pull_requests(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_pull_requests` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The repository in which to list pull requests. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new - # - # # Call the list_pull_requests method. - # result = client.list_pull_requests request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequest. - # p item - # end - # - def list_pull_requests request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_pull_requests.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_pull_requests.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_pull_requests.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :list_pull_requests, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_requests, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a pull request. - # - # @overload update_pull_request(request, options = nil) - # Pass arguments to `update_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_pull_request(pull_request: nil, update_mask: nil) - # Pass arguments to `update_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] - # Required. The pull request to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # pull request resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new - # - # # Call the update_pull_request method. - # result = client.update_pull_request request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.pull_request&.name - header_params["pull_request.name"] = request.pull_request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_pull_request.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :update_pull_request, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Merges a pull request. - # - # @overload merge_pull_request(request, options = nil) - # Pass arguments to `merge_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload merge_pull_request(name: nil) - # Pass arguments to `merge_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The pull request to merge. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new - # - # # Call the merge_pull_request method. - # result = client.merge_pull_request request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def merge_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.merge_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.merge_pull_request.timeout, - metadata: metadata, - retry_policy: @config.rpcs.merge_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :merge_pull_request, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Opens a pull request. - # - # @overload open_pull_request(request, options = nil) - # Pass arguments to `open_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload open_pull_request(name: nil) - # Pass arguments to `open_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The pull request to open. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new - # - # # Call the open_pull_request method. - # result = client.open_pull_request request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def open_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.open_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.open_pull_request.timeout, - metadata: metadata, - retry_policy: @config.rpcs.open_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :open_pull_request, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Closes a pull request without merging. - # - # @overload close_pull_request(request, options = nil) - # Pass arguments to `close_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload close_pull_request(name: nil) - # Pass arguments to `close_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The pull request to close. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new - # - # # Call the close_pull_request method. - # result = client.close_pull_request request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def close_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.close_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.close_pull_request.timeout, - metadata: metadata, - retry_policy: @config.rpcs.close_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :close_pull_request, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists a pull request's file diffs. - # - # @overload list_pull_request_file_diffs(request, options = nil) - # Pass arguments to `list_pull_request_file_diffs` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_pull_request_file_diffs(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_pull_request_file_diffs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The pull request to list file diffs for. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new - # - # # Call the list_pull_request_file_diffs method. - # result = client.list_pull_request_file_diffs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::FileDiff. - # p item - # end - # - def list_pull_request_file_diffs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_pull_request_file_diffs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_pull_request_file_diffs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_pull_request_file_diffs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :list_pull_request_file_diffs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_file_diffs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a tree from a repository. - # - # @overload fetch_tree(request, options = nil) - # Pass arguments to `fetch_tree` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_tree(repository: nil, ref: nil, recursive: nil, page_size: nil, page_token: nil) - # Pass arguments to `fetch_tree` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param repository [::String] - # Required. The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - # Specifies the repository to fetch the tree from. - # @param ref [::String] - # Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies - # which tree to fetch. If not specified, the default branch will be used. - # @param recursive [::Boolean] - # Optional. If true, include all subfolders and their files in the response. - # If false, only the immediate children are returned. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, at most 10,000 items will be returned. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new - # - # # Call the fetch_tree method. - # result = client.fetch_tree request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::TreeEntry. - # p item - # end - # - def fetch_tree request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_tree.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.repository - header_params["repository"] = request.repository - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_tree.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_tree.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :fetch_tree, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :fetch_tree, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a blob from a repository. - # - # @overload fetch_blob(request, options = nil) - # Pass arguments to `fetch_blob` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_blob(repository: nil, sha: nil) - # Pass arguments to `fetch_blob` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param repository [::String] - # Required. The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - # Specifies the repository containing the blob. - # @param sha [::String] - # Required. The SHA-1 hash of the blob to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new - # - # # Call the fetch_blob method. - # result = client.fetch_blob request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::FetchBlobResponse. - # p result - # - def fetch_blob request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_blob.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.repository - header_params["repository"] = request.repository - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_blob.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_blob.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :fetch_blob, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an issue. - # - # @overload create_issue(request, options = nil) - # Pass arguments to `create_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_issue(parent: nil, issue: nil) - # Pass arguments to `create_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The repository in which to create the issue. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] - # Required. The issue to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new - # - # # Call the create_issue method. - # result = client.create_issue request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_issue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :create_issue, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an issue. - # - # @overload get_issue(request, options = nil) - # Pass arguments to `get_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_issue(name: nil) - # Pass arguments to `get_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::Issue] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Issue] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new - # - # # Call the get_issue method. - # result = client.get_issue request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Issue. - # p result - # - def get_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_issue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :get_issue, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists issues in a repository. - # - # @overload list_issues(request, options = nil) - # Pass arguments to `list_issues` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_issues(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The repository in which to list issues. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Used to filter the resulting issues list. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new - # - # # Call the list_issues method. - # result = client.list_issues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Issue. - # p item - # end - # - def list_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_issues.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :list_issues, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_issues, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a issue. - # - # @overload update_issue(request, options = nil) - # Pass arguments to `update_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_issue(issue: nil, update_mask: nil) - # Pass arguments to `update_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] - # Required. The issue to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # issue resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new - # - # # Call the update_issue method. - # result = client.update_issue request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.issue&.name - header_params["issue.name"] = request.issue.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_issue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :update_issue, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an issue. - # - # @overload delete_issue(request, options = nil) - # Pass arguments to `delete_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_issue(name: nil, etag: nil) - # Pass arguments to `delete_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - # @param etag [::String] - # Optional. The current etag of the issue. - # If the etag is provided and does not match the current etag of the issue, - # deletion will be blocked and an ABORTED error will be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new - # - # # Call the delete_issue method. - # result = client.delete_issue request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_issue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :delete_issue, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Opens an issue. - # - # @overload open_issue(request, options = nil) - # Pass arguments to `open_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload open_issue(name: nil, etag: nil) - # Pass arguments to `open_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue to open. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - # @param etag [::String] - # Optional. The current etag of the issue. - # If the etag is provided and does not match the current etag of the issue, - # opening will be blocked and an ABORTED error will be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new - # - # # Call the open_issue method. - # result = client.open_issue request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def open_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.open_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.open_issue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.open_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :open_issue, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Closes an issue. - # - # @overload close_issue(request, options = nil) - # Pass arguments to `close_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload close_issue(name: nil, etag: nil) - # Pass arguments to `close_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue to close. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - # @param etag [::String] - # Optional. The current etag of the issue. - # If the etag is provided and does not match the current etag of the issue, - # closing will be blocked and an ABORTED error will be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new - # - # # Call the close_issue method. - # result = client.close_issue request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def close_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.close_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.close_issue.timeout, - metadata: metadata, - retry_policy: @config.rpcs.close_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :close_issue, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a pull request comment. - # - # @overload get_pull_request_comment(request, options = nil) - # Pass arguments to `get_pull_request_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_pull_request_comment(name: nil) - # Pass arguments to `get_pull_request_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the pull request comment to retrieve. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new - # - # # Call the get_pull_request_comment method. - # result = client.get_pull_request_comment request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequestComment. - # p result - # - def get_pull_request_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_pull_request_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_pull_request_comment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_pull_request_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :get_pull_request_comment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists pull request comments. - # - # @overload list_pull_request_comments(request, options = nil) - # Pass arguments to `list_pull_request_comments` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_pull_request_comments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_pull_request_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The pull request in which to list pull request comments. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new - # - # # Call the list_pull_request_comments method. - # result = client.list_pull_request_comments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequestComment. - # p item - # end - # - def list_pull_request_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_pull_request_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_pull_request_comments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_pull_request_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :list_pull_request_comments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_comments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a pull request comment. This function is used to create a single - # PullRequestComment of type Comment, or a single PullRequestComment of type - # Code that's replying to another PullRequestComment of type Code. Use - # BatchCreatePullRequestComments to create multiple PullRequestComments for - # code reviews. - # - # @overload create_pull_request_comment(request, options = nil) - # Pass arguments to `create_pull_request_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_pull_request_comment(parent: nil, pull_request_comment: nil) - # Pass arguments to `create_pull_request_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The pull request in which to create the pull request comment. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] - # Required. The pull request comment to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new - # - # # Call the create_pull_request_comment method. - # result = client.create_pull_request_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_pull_request_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_pull_request_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_pull_request_comment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_pull_request_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :create_pull_request_comment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a pull request comment. - # - # @overload update_pull_request_comment(request, options = nil) - # Pass arguments to `update_pull_request_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_pull_request_comment(pull_request_comment: nil, update_mask: nil) - # Pass arguments to `update_pull_request_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] - # Required. The pull request comment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # pull request comment resource by the update. Updatable fields are - # `body`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new - # - # # Call the update_pull_request_comment method. - # result = client.update_pull_request_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_pull_request_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_pull_request_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.pull_request_comment&.name - header_params["pull_request_comment.name"] = request.pull_request_comment.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_pull_request_comment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_pull_request_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :update_pull_request_comment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a pull request comment. - # - # @overload delete_pull_request_comment(request, options = nil) - # Pass arguments to `delete_pull_request_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_pull_request_comment(name: nil) - # Pass arguments to `delete_pull_request_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the pull request comment to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new - # - # # Call the delete_pull_request_comment method. - # result = client.delete_pull_request_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_pull_request_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_pull_request_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_pull_request_comment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_pull_request_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :delete_pull_request_comment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Batch creates pull request comments. This function is used to create - # multiple PullRequestComments for code review. There needs to be exactly one - # PullRequestComment of type Review, and at most 100 PullRequestComments of - # type Code per request. The Position of the code comments must be unique - # within the request. - # - # @overload batch_create_pull_request_comments(request, options = nil) - # Pass arguments to `batch_create_pull_request_comments` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_create_pull_request_comments(parent: nil, requests: nil) - # Pass arguments to `batch_create_pull_request_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The pull request in which to create the pull request comments. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param requests [::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash>] - # Required. The request message specifying the resources to create. There - # should be exactly one CreatePullRequestCommentRequest with CommentDetail - # being REVIEW in the list, and no more than 100 - # CreatePullRequestCommentRequests with CommentDetail being CODE in the list - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new - # - # # Call the batch_create_pull_request_comments method. - # result = client.batch_create_pull_request_comments request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_create_pull_request_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_create_pull_request_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_create_pull_request_comments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_pull_request_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :batch_create_pull_request_comments, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resolves pull request comments. A list of PullRequestComment names must be - # provided. The PullRequestComment names must be in the same conversation - # thread. If auto_fill is set, all comments in the conversation thread will - # be resolved. - # - # @overload resolve_pull_request_comments(request, options = nil) - # Pass arguments to `resolve_pull_request_comments` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload resolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) - # Pass arguments to `resolve_pull_request_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The pull request in which to resolve the pull request comments. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param names [::Array<::String>] - # Required. The names of the pull request comments to resolve. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` - # Only comments from the same threads are allowed in the same request. - # @param auto_fill [::Boolean] - # Optional. If set, at least one comment in a thread is required, rest of the - # comments in the same thread will be automatically updated to resolved. If - # unset, all comments in the same thread need be present. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new - # - # # Call the resolve_pull_request_comments method. - # result = client.resolve_pull_request_comments request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def resolve_pull_request_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.resolve_pull_request_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.resolve_pull_request_comments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.resolve_pull_request_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :resolve_pull_request_comments, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unresolves pull request comments. A list of PullRequestComment names must - # be provided. The PullRequestComment names must be in the same conversation - # thread. If auto_fill is set, all comments in the conversation thread will - # be unresolved. - # - # @overload unresolve_pull_request_comments(request, options = nil) - # Pass arguments to `unresolve_pull_request_comments` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload unresolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) - # Pass arguments to `unresolve_pull_request_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The pull request in which to resolve the pull request comments. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param names [::Array<::String>] - # Required. The names of the pull request comments to unresolve. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` - # Only comments from the same threads are allowed in the same request. - # @param auto_fill [::Boolean] - # Optional. If set, at least one comment in a thread is required, rest of the - # comments in the same thread will be automatically updated to unresolved. If - # unset, all comments in the same thread need be present. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new - # - # # Call the unresolve_pull_request_comments method. - # result = client.unresolve_pull_request_comments request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def unresolve_pull_request_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.unresolve_pull_request_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.unresolve_pull_request_comments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.unresolve_pull_request_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :unresolve_pull_request_comments, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an issue comment. - # - # @overload create_issue_comment(request, options = nil) - # Pass arguments to `create_issue_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_issue_comment(parent: nil, issue_comment: nil) - # Pass arguments to `create_issue_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The issue in which to create the issue comment. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] - # Required. The issue comment to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new - # - # # Call the create_issue_comment method. - # result = client.create_issue_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_issue_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_issue_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_issue_comment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_issue_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :create_issue_comment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an issue comment. - # - # @overload get_issue_comment(request, options = nil) - # Pass arguments to `get_issue_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_issue_comment(name: nil) - # Pass arguments to `get_issue_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue comment to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecureSourceManager::V1::IssueComment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new - # - # # Call the get_issue_comment method. - # result = client.get_issue_comment request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment. - # p result - # - def get_issue_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_issue_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_issue_comment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_issue_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :get_issue_comment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists comments in an issue. - # - # @overload list_issue_comments(request, options = nil) - # Pass arguments to `list_issue_comments` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_issue_comments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_issue_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The issue in which to list the comments. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new - # - # # Call the list_issue_comments method. - # result = client.list_issue_comments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::IssueComment. - # p item - # end - # - def list_issue_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_issue_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_issue_comments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_issue_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :list_issue_comments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_issue_comments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an issue comment. - # - # @overload update_issue_comment(request, options = nil) - # Pass arguments to `update_issue_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_issue_comment(issue_comment: nil, update_mask: nil) - # Pass arguments to `update_issue_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] - # Required. The issue comment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # issue comment resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new - # - # # Call the update_issue_comment method. - # result = client.update_issue_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_issue_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_issue_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.issue_comment&.name - header_params["issue_comment.name"] = request.issue_comment.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_issue_comment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_issue_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :update_issue_comment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an issue comment. - # - # @overload delete_issue_comment(request, options = nil) - # Pass arguments to `delete_issue_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_issue_comment(name: nil) - # Pass arguments to `delete_issue_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue comment to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new - # - # # Call the delete_issue_comment method. - # result = client.delete_issue_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_issue_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_issue_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_issue_comment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_issue_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.call_rpc :delete_issue_comment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecureSourceManager API. - # - # This class represents the configuration for SecureSourceManager, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_instances to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securesourcemanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the SecureSourceManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `list_repositories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_repositories - ## - # RPC-specific configuration for `get_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :get_repository - ## - # RPC-specific configuration for `create_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :create_repository - ## - # RPC-specific configuration for `update_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :update_repository - ## - # RPC-specific configuration for `delete_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_repository - ## - # RPC-specific configuration for `list_hooks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_hooks - ## - # RPC-specific configuration for `get_hook` - # @return [::Gapic::Config::Method] - # - attr_reader :get_hook - ## - # RPC-specific configuration for `create_hook` - # @return [::Gapic::Config::Method] - # - attr_reader :create_hook - ## - # RPC-specific configuration for `update_hook` - # @return [::Gapic::Config::Method] - # - attr_reader :update_hook - ## - # RPC-specific configuration for `delete_hook` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_hook - ## - # RPC-specific configuration for `get_iam_policy_repo` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy_repo - ## - # RPC-specific configuration for `set_iam_policy_repo` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy_repo - ## - # RPC-specific configuration for `test_iam_permissions_repo` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions_repo - ## - # RPC-specific configuration for `create_branch_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_branch_rule - ## - # RPC-specific configuration for `list_branch_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_branch_rules - ## - # RPC-specific configuration for `get_branch_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_branch_rule - ## - # RPC-specific configuration for `update_branch_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_branch_rule - ## - # RPC-specific configuration for `delete_branch_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_branch_rule - ## - # RPC-specific configuration for `create_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :create_pull_request - ## - # RPC-specific configuration for `get_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :get_pull_request - ## - # RPC-specific configuration for `list_pull_requests` - # @return [::Gapic::Config::Method] - # - attr_reader :list_pull_requests - ## - # RPC-specific configuration for `update_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :update_pull_request - ## - # RPC-specific configuration for `merge_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :merge_pull_request - ## - # RPC-specific configuration for `open_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :open_pull_request - ## - # RPC-specific configuration for `close_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :close_pull_request - ## - # RPC-specific configuration for `list_pull_request_file_diffs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_pull_request_file_diffs - ## - # RPC-specific configuration for `fetch_tree` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_tree - ## - # RPC-specific configuration for `fetch_blob` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_blob - ## - # RPC-specific configuration for `create_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :create_issue - ## - # RPC-specific configuration for `get_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :get_issue - ## - # RPC-specific configuration for `list_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_issues - ## - # RPC-specific configuration for `update_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :update_issue - ## - # RPC-specific configuration for `delete_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_issue - ## - # RPC-specific configuration for `open_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :open_issue - ## - # RPC-specific configuration for `close_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :close_issue - ## - # RPC-specific configuration for `get_pull_request_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_pull_request_comment - ## - # RPC-specific configuration for `list_pull_request_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_pull_request_comments - ## - # RPC-specific configuration for `create_pull_request_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_pull_request_comment - ## - # RPC-specific configuration for `update_pull_request_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_pull_request_comment - ## - # RPC-specific configuration for `delete_pull_request_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_pull_request_comment - ## - # RPC-specific configuration for `batch_create_pull_request_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_pull_request_comments - ## - # RPC-specific configuration for `resolve_pull_request_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :resolve_pull_request_comments - ## - # RPC-specific configuration for `unresolve_pull_request_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :unresolve_pull_request_comments - ## - # RPC-specific configuration for `create_issue_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_issue_comment - ## - # RPC-specific configuration for `get_issue_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_issue_comment - ## - # RPC-specific configuration for `list_issue_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_issue_comments - ## - # RPC-specific configuration for `update_issue_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_issue_comment - ## - # RPC-specific configuration for `delete_issue_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_issue_comment - - # @private - def initialize parent_rpcs = nil - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories - @list_repositories = ::Gapic::Config::Method.new list_repositories_config - get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository - @get_repository = ::Gapic::Config::Method.new get_repository_config - create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository - @create_repository = ::Gapic::Config::Method.new create_repository_config - update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository - @update_repository = ::Gapic::Config::Method.new update_repository_config - delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository - @delete_repository = ::Gapic::Config::Method.new delete_repository_config - list_hooks_config = parent_rpcs.list_hooks if parent_rpcs.respond_to? :list_hooks - @list_hooks = ::Gapic::Config::Method.new list_hooks_config - get_hook_config = parent_rpcs.get_hook if parent_rpcs.respond_to? :get_hook - @get_hook = ::Gapic::Config::Method.new get_hook_config - create_hook_config = parent_rpcs.create_hook if parent_rpcs.respond_to? :create_hook - @create_hook = ::Gapic::Config::Method.new create_hook_config - update_hook_config = parent_rpcs.update_hook if parent_rpcs.respond_to? :update_hook - @update_hook = ::Gapic::Config::Method.new update_hook_config - delete_hook_config = parent_rpcs.delete_hook if parent_rpcs.respond_to? :delete_hook - @delete_hook = ::Gapic::Config::Method.new delete_hook_config - get_iam_policy_repo_config = parent_rpcs.get_iam_policy_repo if parent_rpcs.respond_to? :get_iam_policy_repo - @get_iam_policy_repo = ::Gapic::Config::Method.new get_iam_policy_repo_config - set_iam_policy_repo_config = parent_rpcs.set_iam_policy_repo if parent_rpcs.respond_to? :set_iam_policy_repo - @set_iam_policy_repo = ::Gapic::Config::Method.new set_iam_policy_repo_config - test_iam_permissions_repo_config = parent_rpcs.test_iam_permissions_repo if parent_rpcs.respond_to? :test_iam_permissions_repo - @test_iam_permissions_repo = ::Gapic::Config::Method.new test_iam_permissions_repo_config - create_branch_rule_config = parent_rpcs.create_branch_rule if parent_rpcs.respond_to? :create_branch_rule - @create_branch_rule = ::Gapic::Config::Method.new create_branch_rule_config - list_branch_rules_config = parent_rpcs.list_branch_rules if parent_rpcs.respond_to? :list_branch_rules - @list_branch_rules = ::Gapic::Config::Method.new list_branch_rules_config - get_branch_rule_config = parent_rpcs.get_branch_rule if parent_rpcs.respond_to? :get_branch_rule - @get_branch_rule = ::Gapic::Config::Method.new get_branch_rule_config - update_branch_rule_config = parent_rpcs.update_branch_rule if parent_rpcs.respond_to? :update_branch_rule - @update_branch_rule = ::Gapic::Config::Method.new update_branch_rule_config - delete_branch_rule_config = parent_rpcs.delete_branch_rule if parent_rpcs.respond_to? :delete_branch_rule - @delete_branch_rule = ::Gapic::Config::Method.new delete_branch_rule_config - create_pull_request_config = parent_rpcs.create_pull_request if parent_rpcs.respond_to? :create_pull_request - @create_pull_request = ::Gapic::Config::Method.new create_pull_request_config - get_pull_request_config = parent_rpcs.get_pull_request if parent_rpcs.respond_to? :get_pull_request - @get_pull_request = ::Gapic::Config::Method.new get_pull_request_config - list_pull_requests_config = parent_rpcs.list_pull_requests if parent_rpcs.respond_to? :list_pull_requests - @list_pull_requests = ::Gapic::Config::Method.new list_pull_requests_config - update_pull_request_config = parent_rpcs.update_pull_request if parent_rpcs.respond_to? :update_pull_request - @update_pull_request = ::Gapic::Config::Method.new update_pull_request_config - merge_pull_request_config = parent_rpcs.merge_pull_request if parent_rpcs.respond_to? :merge_pull_request - @merge_pull_request = ::Gapic::Config::Method.new merge_pull_request_config - open_pull_request_config = parent_rpcs.open_pull_request if parent_rpcs.respond_to? :open_pull_request - @open_pull_request = ::Gapic::Config::Method.new open_pull_request_config - close_pull_request_config = parent_rpcs.close_pull_request if parent_rpcs.respond_to? :close_pull_request - @close_pull_request = ::Gapic::Config::Method.new close_pull_request_config - list_pull_request_file_diffs_config = parent_rpcs.list_pull_request_file_diffs if parent_rpcs.respond_to? :list_pull_request_file_diffs - @list_pull_request_file_diffs = ::Gapic::Config::Method.new list_pull_request_file_diffs_config - fetch_tree_config = parent_rpcs.fetch_tree if parent_rpcs.respond_to? :fetch_tree - @fetch_tree = ::Gapic::Config::Method.new fetch_tree_config - fetch_blob_config = parent_rpcs.fetch_blob if parent_rpcs.respond_to? :fetch_blob - @fetch_blob = ::Gapic::Config::Method.new fetch_blob_config - create_issue_config = parent_rpcs.create_issue if parent_rpcs.respond_to? :create_issue - @create_issue = ::Gapic::Config::Method.new create_issue_config - get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue - @get_issue = ::Gapic::Config::Method.new get_issue_config - list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues - @list_issues = ::Gapic::Config::Method.new list_issues_config - update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue - @update_issue = ::Gapic::Config::Method.new update_issue_config - delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue - @delete_issue = ::Gapic::Config::Method.new delete_issue_config - open_issue_config = parent_rpcs.open_issue if parent_rpcs.respond_to? :open_issue - @open_issue = ::Gapic::Config::Method.new open_issue_config - close_issue_config = parent_rpcs.close_issue if parent_rpcs.respond_to? :close_issue - @close_issue = ::Gapic::Config::Method.new close_issue_config - get_pull_request_comment_config = parent_rpcs.get_pull_request_comment if parent_rpcs.respond_to? :get_pull_request_comment - @get_pull_request_comment = ::Gapic::Config::Method.new get_pull_request_comment_config - list_pull_request_comments_config = parent_rpcs.list_pull_request_comments if parent_rpcs.respond_to? :list_pull_request_comments - @list_pull_request_comments = ::Gapic::Config::Method.new list_pull_request_comments_config - create_pull_request_comment_config = parent_rpcs.create_pull_request_comment if parent_rpcs.respond_to? :create_pull_request_comment - @create_pull_request_comment = ::Gapic::Config::Method.new create_pull_request_comment_config - update_pull_request_comment_config = parent_rpcs.update_pull_request_comment if parent_rpcs.respond_to? :update_pull_request_comment - @update_pull_request_comment = ::Gapic::Config::Method.new update_pull_request_comment_config - delete_pull_request_comment_config = parent_rpcs.delete_pull_request_comment if parent_rpcs.respond_to? :delete_pull_request_comment - @delete_pull_request_comment = ::Gapic::Config::Method.new delete_pull_request_comment_config - batch_create_pull_request_comments_config = parent_rpcs.batch_create_pull_request_comments if parent_rpcs.respond_to? :batch_create_pull_request_comments - @batch_create_pull_request_comments = ::Gapic::Config::Method.new batch_create_pull_request_comments_config - resolve_pull_request_comments_config = parent_rpcs.resolve_pull_request_comments if parent_rpcs.respond_to? :resolve_pull_request_comments - @resolve_pull_request_comments = ::Gapic::Config::Method.new resolve_pull_request_comments_config - unresolve_pull_request_comments_config = parent_rpcs.unresolve_pull_request_comments if parent_rpcs.respond_to? :unresolve_pull_request_comments - @unresolve_pull_request_comments = ::Gapic::Config::Method.new unresolve_pull_request_comments_config - create_issue_comment_config = parent_rpcs.create_issue_comment if parent_rpcs.respond_to? :create_issue_comment - @create_issue_comment = ::Gapic::Config::Method.new create_issue_comment_config - get_issue_comment_config = parent_rpcs.get_issue_comment if parent_rpcs.respond_to? :get_issue_comment - @get_issue_comment = ::Gapic::Config::Method.new get_issue_comment_config - list_issue_comments_config = parent_rpcs.list_issue_comments if parent_rpcs.respond_to? :list_issue_comments - @list_issue_comments = ::Gapic::Config::Method.new list_issue_comments_config - update_issue_comment_config = parent_rpcs.update_issue_comment if parent_rpcs.respond_to? :update_issue_comment - @update_issue_comment = ::Gapic::Config::Method.new update_issue_comment_config - delete_issue_comment_config = parent_rpcs.delete_issue_comment if parent_rpcs.respond_to? :delete_issue_comment - @delete_issue_comment = ::Gapic::Config::Method.new delete_issue_comment_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.rb deleted file mode 100644 index 514b539ee5fe..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module SecureSourceManager - module V1 - module SecureSourceManager - # Credentials for the SecureSourceManager API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb deleted file mode 100644 index 47e65cdbc636..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module SecureSourceManager - module V1 - module SecureSourceManager - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securesourcemanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the SecureSourceManager Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the SecureSourceManager Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securesourcemanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb deleted file mode 100644 index da9c90ca3b1d..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/paths.rb +++ /dev/null @@ -1,313 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - module SecureSourceManager - # Path helper methods for the SecureSourceManager API. - module Paths - ## - # Create a fully-qualified BranchRule resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param branch_rule [String] - # - # @return [::String] - def branch_rule_path project:, location:, repository:, branch_rule: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/branchRules/#{branch_rule}" - end - - ## - # Create a fully-qualified CaPool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/caPools/{ca_pool}` - # - # @param project [String] - # @param location [String] - # @param ca_pool [String] - # - # @return [::String] - def ca_pool_path project:, location:, ca_pool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/caPools/#{ca_pool}" - end - - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # - # @return [::String] - def crypto_key_path project:, location:, key_ring:, crypto_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" - end - - ## - # Create a fully-qualified Hook resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/hooks/{hook}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param hook [String] - # - # @return [::String] - def hook_path project:, location:, repository:, hook: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/hooks/#{hook}" - end - - ## - # Create a fully-qualified InspectTemplate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/inspectTemplates/{inspect_template}` - # - # @param project [String] - # @param location [String] - # @param inspect_template [String] - # - # @return [::String] - def inspect_template_path project:, location:, inspect_template: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/inspectTemplates/#{inspect_template}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified Issue resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param issue [String] - # - # @return [::String] - def issue_path project:, location:, repository:, issue: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/issues/#{issue}" - end - - ## - # Create a fully-qualified IssueComment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param issue [String] - # @param comment [String] - # - # @return [::String] - def issue_comment_path project:, location:, repository:, issue:, comment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - raise ::ArgumentError, "issue cannot contain /" if issue.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/issues/#{issue}/issueComments/#{comment}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified PullRequest resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param pull_request [String] - # - # @return [::String] - def pull_request_path project:, location:, repository:, pull_request: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/pullRequests/#{pull_request}" - end - - ## - # Create a fully-qualified PullRequestComment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # @param pull_request [String] - # @param comment [String] - # - # @return [::String] - def pull_request_comment_path project:, location:, repository:, pull_request:, comment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "repository cannot contain /" if repository.to_s.include? "/" - raise ::ArgumentError, "pull_request cannot contain /" if pull_request.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}/pullRequests/#{pull_request}/pullRequestComments/#{comment}" - end - - ## - # Create a fully-qualified Repository resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # - # @return [::String] - def repository_path project:, location:, repository: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}" - end - - ## - # Create a fully-qualified ServiceAccount resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/serviceAccounts/{service_account}` - # - # @param project [String] - # @param service_account [String] - # - # @return [::String] - def service_account_path project:, service_account: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/serviceAccounts/#{service_account}" - end - - ## - # Create a fully-qualified ServiceAttachment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}` - # - # @param project [String] - # @param region [String] - # @param service_attachment [String] - # - # @return [::String] - def service_attachment_path project:, region:, service_attachment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" - - "projects/#{project}/regions/#{region}/serviceAttachments/#{service_attachment}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb deleted file mode 100644 index 1d049bd8ad6d..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/secure_source_manager/v1/version" -require "google/cloud/secure_source_manager/v1/bindings_override" - -require "google/cloud/secure_source_manager/v1/secure_source_manager/credentials" -require "google/cloud/secure_source_manager/v1/secure_source_manager/paths" -require "google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations" -require "google/cloud/secure_source_manager/v1/secure_source_manager/rest/client" - -module Google - module Cloud - module SecureSourceManager - module V1 - ## - # Secure Source Manager API - # - # Access Secure Source Manager instances, resources, and repositories. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/secure_source_manager/v1/secure_source_manager/rest" - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - module SecureSourceManager - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/secure_source_manager/v1/secure_source_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb deleted file mode 100644 index 5256c3f91046..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/client.rb +++ /dev/null @@ -1,5485 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" -require "google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module SecureSourceManager - module V1 - module SecureSourceManager - module Rest - ## - # REST client for the SecureSourceManager service. - # - # Secure Source Manager API - # - # Access Secure Source Manager instances, resources, and repositories. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securesourcemanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :secure_source_manager_stub - - ## - # Configure the SecureSourceManager Client class. - # - # See {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecureSourceManager clients - # ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecureSourceManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_instances.timeout = 60.0 - default_config.rpcs.list_instances.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_instance.timeout = 60.0 - default_config.rpcs.get_instance.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_repositories.timeout = 60.0 - default_config.rpcs.list_repositories.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_repository.timeout = 60.0 - default_config.rpcs.get_repository.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy_repo.timeout = 60.0 - default_config.rpcs.get_iam_policy_repo.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecureSourceManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @secure_source_manager_stub.universe_domain - end - - ## - # Create a new SecureSourceManager REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecureSourceManager client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @secure_source_manager_stub = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @secure_source_manager_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @secure_source_manager_stub.endpoint - config.universe_domain = @secure_source_manager_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @secure_source_manager_stub.endpoint - config.universe_domain = @secure_source_manager_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @secure_source_manager_stub.logger - end - - # Service calls - - ## - # Lists Instances in a given project and location. - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListInstancesRequest. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filter for filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Instance>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_instances.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.list_instances request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_instances, "instances", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.get_instance request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new instance in a given project and location. - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param instance_id [::String] - # Required. ID of the instance to be created. - # @param instance [::Google::Cloud::SecureSourceManager::V1::Instance, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.create_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single instance. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_instance(name: nil, request_id: nil, force: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param force [::Boolean] - # Optional. If set to true, will force the deletion of the instance. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.delete_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Repositories in a given project and location. - # - # The instance field is required in the query parameter for requests using - # the securesourcemanager.googleapis.com endpoint. - # - # @overload list_repositories(request, options = nil) - # Pass arguments to `list_repositories` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil, instance: nil) - # Pass arguments to `list_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListRepositoriesRequest. - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filter results. - # @param instance [::String] - # Optional. The name of the instance in which the repository is hosted, - # formatted as - # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - # When listing repositories via securesourcemanager.googleapis.com, this - # field is required. When listing repositories via *.sourcemanager.dev, this - # field is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Repository>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new - # - # # Call the list_repositories method. - # result = client.list_repositories request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Repository. - # p item - # end - # - def list_repositories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_repositories.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_repositories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_repositories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.list_repositories request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_repositories, "repositories", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata of a repository. - # - # @overload get_repository(request, options = nil) - # Pass arguments to `get_repository` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_repository(name: nil) - # Pass arguments to `get_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the repository to retrieve. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Repository] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new - # - # # Call the get_repository method. - # result = client.get_repository request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Repository. - # p result - # - def get_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.get_repository request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new repository in a given project and location. - # - # The Repository.Instance field is required in the request body for requests - # using the securesourcemanager.googleapis.com endpoint. - # - # @overload create_repository(request, options = nil) - # Pass arguments to `create_repository` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_repository(parent: nil, repository: nil, repository_id: nil) - # Pass arguments to `create_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project in which to create the repository. Values are of the - # form `projects/{project_number}/locations/{location_id}` - # @param repository [::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash] - # Required. The resource being created. - # @param repository_id [::String] - # Required. The ID to use for the repository, which will become the final - # component of the repository's resource name. This value should be 4-63 - # characters, and valid characters are /[a-z][0-9]-/. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new - # - # # Call the create_repository method. - # result = client.create_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.create_repository request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the metadata of a repository. - # - # @overload update_repository(request, options = nil) - # Pass arguments to `update_repository` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_repository(update_mask: nil, repository: nil, validate_only: nil) - # Pass arguments to `update_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # repository resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param repository [::Google::Cloud::SecureSourceManager::V1::Repository, ::Hash] - # Required. The repository being updated. - # @param validate_only [::Boolean] - # Optional. False by default. If set to true, the request is validated and - # the user is provided with an expected result, but no actual change is made. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new - # - # # Call the update_repository method. - # result = client.update_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.update_repository request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Repository. - # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_repository(name: nil, allow_missing: nil) - # Pass arguments to `delete_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the repository to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the repository is not found, the request will - # succeed but no action will be taken on the server. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new - # - # # Call the delete_repository method. - # result = client.delete_repository request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_repository.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.delete_repository request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists hooks in a given repository. - # - # @overload list_hooks(request, options = nil) - # Pass arguments to `list_hooks` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListHooksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_hooks(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_hooks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListHooksRequest. - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Hook>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new - # - # # Call the list_hooks method. - # result = client.list_hooks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Hook. - # p item - # end - # - def list_hooks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_hooks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_hooks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_hooks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.list_hooks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_hooks, "hooks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata of a hook. - # - # @overload get_hook(request, options = nil) - # Pass arguments to `get_hook` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetHookRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetHookRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_hook(name: nil) - # Pass arguments to `get_hook` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the hook to retrieve. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Hook] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Hook] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new - # - # # Call the get_hook method. - # result = client.get_hook request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook. - # p result - # - def get_hook request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetHookRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_hook.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_hook.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_hook.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.get_hook request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new hook in a given repository. - # - # @overload create_hook(request, options = nil) - # Pass arguments to `create_hook` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateHookRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_hook(parent: nil, hook: nil, hook_id: nil) - # Pass arguments to `create_hook` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The repository in which to create the hook. Values are of the - # form - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] - # Required. The resource being created. - # @param hook_id [::String] - # Required. The ID to use for the hook, which will become the final component - # of the hook's resource name. This value restricts to lower-case letters, - # numbers, and hyphen, with the first character a letter, the last a letter - # or a number, and a 63 character maximum. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new - # - # # Call the create_hook method. - # result = client.create_hook request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_hook request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_hook.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_hook.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_hook.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.create_hook request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the metadata of a hook. - # - # @overload update_hook(request, options = nil) - # Pass arguments to `update_hook` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_hook(update_mask: nil, hook: nil) - # Pass arguments to `update_hook` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # hook resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # @param hook [::Google::Cloud::SecureSourceManager::V1::Hook, ::Hash] - # Required. The hook being updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new - # - # # Call the update_hook method. - # result = client.update_hook request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_hook request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_hook.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_hook.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_hook.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.update_hook request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Hook. - # - # @overload delete_hook(request, options = nil) - # Pass arguments to `delete_hook` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_hook(name: nil) - # Pass arguments to `delete_hook` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the hook to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new - # - # # Call the delete_hook method. - # result = client.delete_hook request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_hook request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_hook.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_hook.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_hook.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.delete_hook request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get IAM policy for a repository. - # - # @overload get_iam_policy_repo(request, options = nil) - # Pass arguments to `get_iam_policy_repo` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy_repo(resource: nil, options: nil) - # Pass arguments to `get_iam_policy_repo` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy_repo method. - # result = client.get_iam_policy_repo request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy_repo request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy_repo.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy_repo.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy_repo.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.get_iam_policy_repo request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Set IAM policy on a repository. - # - # @overload set_iam_policy_repo(request, options = nil) - # Pass arguments to `set_iam_policy_repo` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy_repo(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy_repo` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy_repo method. - # result = client.set_iam_policy_repo request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy_repo request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy_repo.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy_repo.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy_repo.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.set_iam_policy_repo request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Test IAM permissions on a repository. - # IAM permission checks are not required on this method. - # - # @overload test_iam_permissions_repo(request, options = nil) - # Pass arguments to `test_iam_permissions_repo` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions_repo(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions_repo` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions_repo method. - # result = client.test_iam_permissions_repo request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions_repo request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions_repo.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions_repo.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions_repo.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.test_iam_permissions_repo request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # CreateBranchRule creates a branch rule in a given repository. - # - # @overload create_branch_rule(request, options = nil) - # Pass arguments to `create_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_branch_rule(parent: nil, branch_rule: nil, branch_rule_id: nil) - # Pass arguments to `create_branch_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] - # @param branch_rule_id [::String] - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new - # - # # Call the create_branch_rule method. - # result = client.create_branch_rule request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_branch_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_branch_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_branch_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_branch_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.create_branch_rule request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # ListBranchRules lists branch rules in a given repository. - # - # @overload list_branch_rules(request, options = nil) - # Pass arguments to `list_branch_rules` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_branch_rules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_branch_rules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::BranchRule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new - # - # # Call the list_branch_rules method. - # result = client.list_branch_rules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::BranchRule. - # p item - # end - # - def list_branch_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_branch_rules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_branch_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_branch_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.list_branch_rules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, "branch_rules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # GetBranchRule gets a branch rule. - # - # @overload get_branch_rule(request, options = nil) - # Pass arguments to `get_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_branch_rule(name: nil) - # Pass arguments to `get_branch_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the repository to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::BranchRule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new - # - # # Call the get_branch_rule method. - # result = client.get_branch_rule request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule. - # p result - # - def get_branch_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_branch_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_branch_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_branch_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.get_branch_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # UpdateBranchRule updates a branch rule. - # - # @overload update_branch_rule(request, options = nil) - # Pass arguments to `update_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_branch_rule(branch_rule: nil, validate_only: nil, update_mask: nil) - # Pass arguments to `update_branch_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param branch_rule [::Google::Cloud::SecureSourceManager::V1::BranchRule, ::Hash] - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually post it. (https://google.aip.dev/163, for declarative friendly) - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # branchRule resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new - # - # # Call the update_branch_rule method. - # result = client.update_branch_rule request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_branch_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_branch_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_branch_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_branch_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.update_branch_rule request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # DeleteBranchRule deletes a branch rule. - # - # @overload delete_branch_rule(request, options = nil) - # Pass arguments to `delete_branch_rule` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_branch_rule(name: nil, allow_missing: nil) - # Pass arguments to `delete_branch_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # @param allow_missing [::Boolean] - # Optional. If set to true, and the branch rule is not found, the request - # will succeed but no action will be taken on the server. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new - # - # # Call the delete_branch_rule method. - # result = client.delete_branch_rule request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_branch_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_branch_rule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_branch_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_branch_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.delete_branch_rule request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a pull request. - # - # @overload create_pull_request(request, options = nil) - # Pass arguments to `create_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_pull_request(parent: nil, pull_request: nil) - # Pass arguments to `create_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The repository that the pull request is created from. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] - # Required. The pull request to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new - # - # # Call the create_pull_request method. - # result = client.create_pull_request request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_pull_request.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.create_pull_request request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a pull request. - # - # @overload get_pull_request(request, options = nil) - # Pass arguments to `get_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_pull_request(name: nil) - # Pass arguments to `get_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the pull request to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequest] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new - # - # # Call the get_pull_request method. - # result = client.get_pull_request request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequest. - # p result - # - def get_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_pull_request.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.get_pull_request request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists pull requests in a repository. - # - # @overload list_pull_requests(request, options = nil) - # Pass arguments to `list_pull_requests` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_pull_requests(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_pull_requests` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The repository in which to list pull requests. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequest>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new - # - # # Call the list_pull_requests method. - # result = client.list_pull_requests request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequest. - # p item - # end - # - def list_pull_requests request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_pull_requests.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_pull_requests.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_pull_requests.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.list_pull_requests request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_requests, "pull_requests", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a pull request. - # - # @overload update_pull_request(request, options = nil) - # Pass arguments to `update_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_pull_request(pull_request: nil, update_mask: nil) - # Pass arguments to `update_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param pull_request [::Google::Cloud::SecureSourceManager::V1::PullRequest, ::Hash] - # Required. The pull request to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # pull request resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new - # - # # Call the update_pull_request method. - # result = client.update_pull_request request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_pull_request.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.update_pull_request request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Merges a pull request. - # - # @overload merge_pull_request(request, options = nil) - # Pass arguments to `merge_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload merge_pull_request(name: nil) - # Pass arguments to `merge_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The pull request to merge. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new - # - # # Call the merge_pull_request method. - # result = client.merge_pull_request request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def merge_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.merge_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.merge_pull_request.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.merge_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.merge_pull_request request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Opens a pull request. - # - # @overload open_pull_request(request, options = nil) - # Pass arguments to `open_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload open_pull_request(name: nil) - # Pass arguments to `open_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The pull request to open. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new - # - # # Call the open_pull_request method. - # result = client.open_pull_request request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def open_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.open_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.open_pull_request.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.open_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.open_pull_request request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Closes a pull request without merging. - # - # @overload close_pull_request(request, options = nil) - # Pass arguments to `close_pull_request` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload close_pull_request(name: nil) - # Pass arguments to `close_pull_request` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The pull request to close. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new - # - # # Call the close_pull_request method. - # result = client.close_pull_request request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def close_pull_request request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.close_pull_request.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.close_pull_request.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.close_pull_request.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.close_pull_request request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists a pull request's file diffs. - # - # @overload list_pull_request_file_diffs(request, options = nil) - # Pass arguments to `list_pull_request_file_diffs` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_pull_request_file_diffs(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_pull_request_file_diffs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The pull request to list file diffs for. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::FileDiff>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new - # - # # Call the list_pull_request_file_diffs method. - # result = client.list_pull_request_file_diffs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::FileDiff. - # p item - # end - # - def list_pull_request_file_diffs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_pull_request_file_diffs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_pull_request_file_diffs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_pull_request_file_diffs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.list_pull_request_file_diffs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_file_diffs, "file_diffs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a tree from a repository. - # - # @overload fetch_tree(request, options = nil) - # Pass arguments to `fetch_tree` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_tree(repository: nil, ref: nil, recursive: nil, page_size: nil, page_token: nil) - # Pass arguments to `fetch_tree` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param repository [::String] - # Required. The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - # Specifies the repository to fetch the tree from. - # @param ref [::String] - # Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies - # which tree to fetch. If not specified, the default branch will be used. - # @param recursive [::Boolean] - # Optional. If true, include all subfolders and their files in the response. - # If false, only the immediate children are returned. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, at most 10,000 items will be returned. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new - # - # # Call the fetch_tree method. - # result = client.fetch_tree request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::TreeEntry. - # p item - # end - # - def fetch_tree request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_tree.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_tree.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_tree.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.fetch_tree request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :fetch_tree, "tree_entries", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches a blob from a repository. - # - # @overload fetch_blob(request, options = nil) - # Pass arguments to `fetch_blob` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_blob(repository: nil, sha: nil) - # Pass arguments to `fetch_blob` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param repository [::String] - # Required. The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - # Specifies the repository containing the blob. - # @param sha [::String] - # Required. The SHA-1 hash of the blob to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new - # - # # Call the fetch_blob method. - # result = client.fetch_blob request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::FetchBlobResponse. - # p result - # - def fetch_blob request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_blob.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_blob.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_blob.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.fetch_blob request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an issue. - # - # @overload create_issue(request, options = nil) - # Pass arguments to `create_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_issue(parent: nil, issue: nil) - # Pass arguments to `create_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The repository in which to create the issue. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] - # Required. The issue to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new - # - # # Call the create_issue method. - # result = client.create_issue request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_issue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.create_issue request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an issue. - # - # @overload get_issue(request, options = nil) - # Pass arguments to `get_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_issue(name: nil) - # Pass arguments to `get_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Issue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Issue] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new - # - # # Call the get_issue method. - # result = client.get_issue request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::Issue. - # p result - # - def get_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_issue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.get_issue request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists issues in a repository. - # - # @overload list_issues(request, options = nil) - # Pass arguments to `list_issues` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_issues(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_issues` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The repository in which to list issues. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Used to filter the resulting issues list. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::Issue>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new - # - # # Call the list_issues method. - # result = client.list_issues request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Issue. - # p item - # end - # - def list_issues request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_issues.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_issues.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_issues.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.list_issues request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_issues, "issues", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a issue. - # - # @overload update_issue(request, options = nil) - # Pass arguments to `update_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_issue(issue: nil, update_mask: nil) - # Pass arguments to `update_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param issue [::Google::Cloud::SecureSourceManager::V1::Issue, ::Hash] - # Required. The issue to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # issue resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new - # - # # Call the update_issue method. - # result = client.update_issue request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_issue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.update_issue request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an issue. - # - # @overload delete_issue(request, options = nil) - # Pass arguments to `delete_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_issue(name: nil, etag: nil) - # Pass arguments to `delete_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - # @param etag [::String] - # Optional. The current etag of the issue. - # If the etag is provided and does not match the current etag of the issue, - # deletion will be blocked and an ABORTED error will be returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new - # - # # Call the delete_issue method. - # result = client.delete_issue request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_issue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.delete_issue request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Opens an issue. - # - # @overload open_issue(request, options = nil) - # Pass arguments to `open_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload open_issue(name: nil, etag: nil) - # Pass arguments to `open_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue to open. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - # @param etag [::String] - # Optional. The current etag of the issue. - # If the etag is provided and does not match the current etag of the issue, - # opening will be blocked and an ABORTED error will be returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new - # - # # Call the open_issue method. - # result = client.open_issue request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def open_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.open_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.open_issue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.open_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.open_issue request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Closes an issue. - # - # @overload close_issue(request, options = nil) - # Pass arguments to `close_issue` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload close_issue(name: nil, etag: nil) - # Pass arguments to `close_issue` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue to close. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - # @param etag [::String] - # Optional. The current etag of the issue. - # If the etag is provided and does not match the current etag of the issue, - # closing will be blocked and an ABORTED error will be returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new - # - # # Call the close_issue method. - # result = client.close_issue request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def close_issue request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.close_issue.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.close_issue.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.close_issue.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.close_issue request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a pull request comment. - # - # @overload get_pull_request_comment(request, options = nil) - # Pass arguments to `get_pull_request_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_pull_request_comment(name: nil) - # Pass arguments to `get_pull_request_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the pull request comment to retrieve. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new - # - # # Call the get_pull_request_comment method. - # result = client.get_pull_request_comment request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequestComment. - # p result - # - def get_pull_request_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_pull_request_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_pull_request_comment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_pull_request_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.get_pull_request_comment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists pull request comments. - # - # @overload list_pull_request_comments(request, options = nil) - # Pass arguments to `list_pull_request_comments` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_pull_request_comments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_pull_request_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The pull request in which to list pull request comments. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new - # - # # Call the list_pull_request_comments method. - # result = client.list_pull_request_comments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequestComment. - # p item - # end - # - def list_pull_request_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_pull_request_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_pull_request_comments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_pull_request_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.list_pull_request_comments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_pull_request_comments, "pull_request_comments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a pull request comment. This function is used to create a single - # PullRequestComment of type Comment, or a single PullRequestComment of type - # Code that's replying to another PullRequestComment of type Code. Use - # BatchCreatePullRequestComments to create multiple PullRequestComments for - # code reviews. - # - # @overload create_pull_request_comment(request, options = nil) - # Pass arguments to `create_pull_request_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_pull_request_comment(parent: nil, pull_request_comment: nil) - # Pass arguments to `create_pull_request_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The pull request in which to create the pull request comment. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] - # Required. The pull request comment to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new - # - # # Call the create_pull_request_comment method. - # result = client.create_pull_request_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_pull_request_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_pull_request_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_pull_request_comment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_pull_request_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.create_pull_request_comment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a pull request comment. - # - # @overload update_pull_request_comment(request, options = nil) - # Pass arguments to `update_pull_request_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_pull_request_comment(pull_request_comment: nil, update_mask: nil) - # Pass arguments to `update_pull_request_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param pull_request_comment [::Google::Cloud::SecureSourceManager::V1::PullRequestComment, ::Hash] - # Required. The pull request comment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # pull request comment resource by the update. Updatable fields are - # `body`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new - # - # # Call the update_pull_request_comment method. - # result = client.update_pull_request_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_pull_request_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_pull_request_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_pull_request_comment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_pull_request_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.update_pull_request_comment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a pull request comment. - # - # @overload delete_pull_request_comment(request, options = nil) - # Pass arguments to `delete_pull_request_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_pull_request_comment(name: nil) - # Pass arguments to `delete_pull_request_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the pull request comment to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new - # - # # Call the delete_pull_request_comment method. - # result = client.delete_pull_request_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_pull_request_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_pull_request_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_pull_request_comment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_pull_request_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.delete_pull_request_comment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Batch creates pull request comments. This function is used to create - # multiple PullRequestComments for code review. There needs to be exactly one - # PullRequestComment of type Review, and at most 100 PullRequestComments of - # type Code per request. The Position of the code comments must be unique - # within the request. - # - # @overload batch_create_pull_request_comments(request, options = nil) - # Pass arguments to `batch_create_pull_request_comments` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_create_pull_request_comments(parent: nil, requests: nil) - # Pass arguments to `batch_create_pull_request_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The pull request in which to create the pull request comments. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param requests [::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Hash>] - # Required. The request message specifying the resources to create. There - # should be exactly one CreatePullRequestCommentRequest with CommentDetail - # being REVIEW in the list, and no more than 100 - # CreatePullRequestCommentRequests with CommentDetail being CODE in the list - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new - # - # # Call the batch_create_pull_request_comments method. - # result = client.batch_create_pull_request_comments request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_create_pull_request_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_create_pull_request_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_create_pull_request_comments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_create_pull_request_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.batch_create_pull_request_comments request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resolves pull request comments. A list of PullRequestComment names must be - # provided. The PullRequestComment names must be in the same conversation - # thread. If auto_fill is set, all comments in the conversation thread will - # be resolved. - # - # @overload resolve_pull_request_comments(request, options = nil) - # Pass arguments to `resolve_pull_request_comments` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload resolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) - # Pass arguments to `resolve_pull_request_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The pull request in which to resolve the pull request comments. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param names [::Array<::String>] - # Required. The names of the pull request comments to resolve. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` - # Only comments from the same threads are allowed in the same request. - # @param auto_fill [::Boolean] - # Optional. If set, at least one comment in a thread is required, rest of the - # comments in the same thread will be automatically updated to resolved. If - # unset, all comments in the same thread need be present. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new - # - # # Call the resolve_pull_request_comments method. - # result = client.resolve_pull_request_comments request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def resolve_pull_request_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.resolve_pull_request_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.resolve_pull_request_comments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.resolve_pull_request_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.resolve_pull_request_comments request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unresolves pull request comments. A list of PullRequestComment names must - # be provided. The PullRequestComment names must be in the same conversation - # thread. If auto_fill is set, all comments in the conversation thread will - # be unresolved. - # - # @overload unresolve_pull_request_comments(request, options = nil) - # Pass arguments to `unresolve_pull_request_comments` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload unresolve_pull_request_comments(parent: nil, names: nil, auto_fill: nil) - # Pass arguments to `unresolve_pull_request_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The pull request in which to resolve the pull request comments. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @param names [::Array<::String>] - # Required. The names of the pull request comments to unresolve. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` - # Only comments from the same threads are allowed in the same request. - # @param auto_fill [::Boolean] - # Optional. If set, at least one comment in a thread is required, rest of the - # comments in the same thread will be automatically updated to unresolved. If - # unset, all comments in the same thread need be present. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new - # - # # Call the unresolve_pull_request_comments method. - # result = client.unresolve_pull_request_comments request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def unresolve_pull_request_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.unresolve_pull_request_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.unresolve_pull_request_comments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.unresolve_pull_request_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.unresolve_pull_request_comments request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an issue comment. - # - # @overload create_issue_comment(request, options = nil) - # Pass arguments to `create_issue_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_issue_comment(parent: nil, issue_comment: nil) - # Pass arguments to `create_issue_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The issue in which to create the issue comment. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] - # Required. The issue comment to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new - # - # # Call the create_issue_comment method. - # result = client.create_issue_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_issue_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_issue_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_issue_comment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_issue_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.create_issue_comment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an issue comment. - # - # @overload get_issue_comment(request, options = nil) - # Pass arguments to `get_issue_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_issue_comment(name: nil) - # Pass arguments to `get_issue_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue comment to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::IssueComment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new - # - # # Call the get_issue_comment method. - # result = client.get_issue_comment request - # - # # The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment. - # p result - # - def get_issue_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_issue_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_issue_comment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_issue_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.get_issue_comment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists comments in an issue. - # - # @overload list_issue_comments(request, options = nil) - # Pass arguments to `list_issue_comments` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_issue_comments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_issue_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The issue in which to list the comments. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - # @param page_size [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecureSourceManager::V1::IssueComment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new - # - # # Call the list_issue_comments method. - # result = client.list_issue_comments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecureSourceManager::V1::IssueComment. - # p item - # end - # - def list_issue_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_issue_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_issue_comments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_issue_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.list_issue_comments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_issue_comments, "issue_comments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an issue comment. - # - # @overload update_issue_comment(request, options = nil) - # Pass arguments to `update_issue_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_issue_comment(issue_comment: nil, update_mask: nil) - # Pass arguments to `update_issue_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param issue_comment [::Google::Cloud::SecureSourceManager::V1::IssueComment, ::Hash] - # Required. The issue comment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # issue comment resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new - # - # # Call the update_issue_comment method. - # result = client.update_issue_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_issue_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_issue_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_issue_comment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_issue_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.update_issue_comment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an issue comment. - # - # @overload delete_issue_comment(request, options = nil) - # Pass arguments to `delete_issue_comment` via a request object, either of type - # {::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_issue_comment(name: nil) - # Pass arguments to `delete_issue_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the issue comment to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/secure_source_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new - # - # # Call the delete_issue_comment method. - # result = client.delete_issue_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_issue_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_issue_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_issue_comment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_issue_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @secure_source_manager_stub.delete_issue_comment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecureSourceManager REST API. - # - # This class represents the configuration for SecureSourceManager REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_instances to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securesourcemanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the SecureSourceManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `list_repositories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_repositories - ## - # RPC-specific configuration for `get_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :get_repository - ## - # RPC-specific configuration for `create_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :create_repository - ## - # RPC-specific configuration for `update_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :update_repository - ## - # RPC-specific configuration for `delete_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_repository - ## - # RPC-specific configuration for `list_hooks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_hooks - ## - # RPC-specific configuration for `get_hook` - # @return [::Gapic::Config::Method] - # - attr_reader :get_hook - ## - # RPC-specific configuration for `create_hook` - # @return [::Gapic::Config::Method] - # - attr_reader :create_hook - ## - # RPC-specific configuration for `update_hook` - # @return [::Gapic::Config::Method] - # - attr_reader :update_hook - ## - # RPC-specific configuration for `delete_hook` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_hook - ## - # RPC-specific configuration for `get_iam_policy_repo` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy_repo - ## - # RPC-specific configuration for `set_iam_policy_repo` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy_repo - ## - # RPC-specific configuration for `test_iam_permissions_repo` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions_repo - ## - # RPC-specific configuration for `create_branch_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_branch_rule - ## - # RPC-specific configuration for `list_branch_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_branch_rules - ## - # RPC-specific configuration for `get_branch_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_branch_rule - ## - # RPC-specific configuration for `update_branch_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_branch_rule - ## - # RPC-specific configuration for `delete_branch_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_branch_rule - ## - # RPC-specific configuration for `create_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :create_pull_request - ## - # RPC-specific configuration for `get_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :get_pull_request - ## - # RPC-specific configuration for `list_pull_requests` - # @return [::Gapic::Config::Method] - # - attr_reader :list_pull_requests - ## - # RPC-specific configuration for `update_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :update_pull_request - ## - # RPC-specific configuration for `merge_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :merge_pull_request - ## - # RPC-specific configuration for `open_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :open_pull_request - ## - # RPC-specific configuration for `close_pull_request` - # @return [::Gapic::Config::Method] - # - attr_reader :close_pull_request - ## - # RPC-specific configuration for `list_pull_request_file_diffs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_pull_request_file_diffs - ## - # RPC-specific configuration for `fetch_tree` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_tree - ## - # RPC-specific configuration for `fetch_blob` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_blob - ## - # RPC-specific configuration for `create_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :create_issue - ## - # RPC-specific configuration for `get_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :get_issue - ## - # RPC-specific configuration for `list_issues` - # @return [::Gapic::Config::Method] - # - attr_reader :list_issues - ## - # RPC-specific configuration for `update_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :update_issue - ## - # RPC-specific configuration for `delete_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_issue - ## - # RPC-specific configuration for `open_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :open_issue - ## - # RPC-specific configuration for `close_issue` - # @return [::Gapic::Config::Method] - # - attr_reader :close_issue - ## - # RPC-specific configuration for `get_pull_request_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_pull_request_comment - ## - # RPC-specific configuration for `list_pull_request_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_pull_request_comments - ## - # RPC-specific configuration for `create_pull_request_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_pull_request_comment - ## - # RPC-specific configuration for `update_pull_request_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_pull_request_comment - ## - # RPC-specific configuration for `delete_pull_request_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_pull_request_comment - ## - # RPC-specific configuration for `batch_create_pull_request_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_pull_request_comments - ## - # RPC-specific configuration for `resolve_pull_request_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :resolve_pull_request_comments - ## - # RPC-specific configuration for `unresolve_pull_request_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :unresolve_pull_request_comments - ## - # RPC-specific configuration for `create_issue_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_issue_comment - ## - # RPC-specific configuration for `get_issue_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_issue_comment - ## - # RPC-specific configuration for `list_issue_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_issue_comments - ## - # RPC-specific configuration for `update_issue_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_issue_comment - ## - # RPC-specific configuration for `delete_issue_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_issue_comment - - # @private - def initialize parent_rpcs = nil - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories - @list_repositories = ::Gapic::Config::Method.new list_repositories_config - get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository - @get_repository = ::Gapic::Config::Method.new get_repository_config - create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository - @create_repository = ::Gapic::Config::Method.new create_repository_config - update_repository_config = parent_rpcs.update_repository if parent_rpcs.respond_to? :update_repository - @update_repository = ::Gapic::Config::Method.new update_repository_config - delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository - @delete_repository = ::Gapic::Config::Method.new delete_repository_config - list_hooks_config = parent_rpcs.list_hooks if parent_rpcs.respond_to? :list_hooks - @list_hooks = ::Gapic::Config::Method.new list_hooks_config - get_hook_config = parent_rpcs.get_hook if parent_rpcs.respond_to? :get_hook - @get_hook = ::Gapic::Config::Method.new get_hook_config - create_hook_config = parent_rpcs.create_hook if parent_rpcs.respond_to? :create_hook - @create_hook = ::Gapic::Config::Method.new create_hook_config - update_hook_config = parent_rpcs.update_hook if parent_rpcs.respond_to? :update_hook - @update_hook = ::Gapic::Config::Method.new update_hook_config - delete_hook_config = parent_rpcs.delete_hook if parent_rpcs.respond_to? :delete_hook - @delete_hook = ::Gapic::Config::Method.new delete_hook_config - get_iam_policy_repo_config = parent_rpcs.get_iam_policy_repo if parent_rpcs.respond_to? :get_iam_policy_repo - @get_iam_policy_repo = ::Gapic::Config::Method.new get_iam_policy_repo_config - set_iam_policy_repo_config = parent_rpcs.set_iam_policy_repo if parent_rpcs.respond_to? :set_iam_policy_repo - @set_iam_policy_repo = ::Gapic::Config::Method.new set_iam_policy_repo_config - test_iam_permissions_repo_config = parent_rpcs.test_iam_permissions_repo if parent_rpcs.respond_to? :test_iam_permissions_repo - @test_iam_permissions_repo = ::Gapic::Config::Method.new test_iam_permissions_repo_config - create_branch_rule_config = parent_rpcs.create_branch_rule if parent_rpcs.respond_to? :create_branch_rule - @create_branch_rule = ::Gapic::Config::Method.new create_branch_rule_config - list_branch_rules_config = parent_rpcs.list_branch_rules if parent_rpcs.respond_to? :list_branch_rules - @list_branch_rules = ::Gapic::Config::Method.new list_branch_rules_config - get_branch_rule_config = parent_rpcs.get_branch_rule if parent_rpcs.respond_to? :get_branch_rule - @get_branch_rule = ::Gapic::Config::Method.new get_branch_rule_config - update_branch_rule_config = parent_rpcs.update_branch_rule if parent_rpcs.respond_to? :update_branch_rule - @update_branch_rule = ::Gapic::Config::Method.new update_branch_rule_config - delete_branch_rule_config = parent_rpcs.delete_branch_rule if parent_rpcs.respond_to? :delete_branch_rule - @delete_branch_rule = ::Gapic::Config::Method.new delete_branch_rule_config - create_pull_request_config = parent_rpcs.create_pull_request if parent_rpcs.respond_to? :create_pull_request - @create_pull_request = ::Gapic::Config::Method.new create_pull_request_config - get_pull_request_config = parent_rpcs.get_pull_request if parent_rpcs.respond_to? :get_pull_request - @get_pull_request = ::Gapic::Config::Method.new get_pull_request_config - list_pull_requests_config = parent_rpcs.list_pull_requests if parent_rpcs.respond_to? :list_pull_requests - @list_pull_requests = ::Gapic::Config::Method.new list_pull_requests_config - update_pull_request_config = parent_rpcs.update_pull_request if parent_rpcs.respond_to? :update_pull_request - @update_pull_request = ::Gapic::Config::Method.new update_pull_request_config - merge_pull_request_config = parent_rpcs.merge_pull_request if parent_rpcs.respond_to? :merge_pull_request - @merge_pull_request = ::Gapic::Config::Method.new merge_pull_request_config - open_pull_request_config = parent_rpcs.open_pull_request if parent_rpcs.respond_to? :open_pull_request - @open_pull_request = ::Gapic::Config::Method.new open_pull_request_config - close_pull_request_config = parent_rpcs.close_pull_request if parent_rpcs.respond_to? :close_pull_request - @close_pull_request = ::Gapic::Config::Method.new close_pull_request_config - list_pull_request_file_diffs_config = parent_rpcs.list_pull_request_file_diffs if parent_rpcs.respond_to? :list_pull_request_file_diffs - @list_pull_request_file_diffs = ::Gapic::Config::Method.new list_pull_request_file_diffs_config - fetch_tree_config = parent_rpcs.fetch_tree if parent_rpcs.respond_to? :fetch_tree - @fetch_tree = ::Gapic::Config::Method.new fetch_tree_config - fetch_blob_config = parent_rpcs.fetch_blob if parent_rpcs.respond_to? :fetch_blob - @fetch_blob = ::Gapic::Config::Method.new fetch_blob_config - create_issue_config = parent_rpcs.create_issue if parent_rpcs.respond_to? :create_issue - @create_issue = ::Gapic::Config::Method.new create_issue_config - get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue - @get_issue = ::Gapic::Config::Method.new get_issue_config - list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues - @list_issues = ::Gapic::Config::Method.new list_issues_config - update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue - @update_issue = ::Gapic::Config::Method.new update_issue_config - delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue - @delete_issue = ::Gapic::Config::Method.new delete_issue_config - open_issue_config = parent_rpcs.open_issue if parent_rpcs.respond_to? :open_issue - @open_issue = ::Gapic::Config::Method.new open_issue_config - close_issue_config = parent_rpcs.close_issue if parent_rpcs.respond_to? :close_issue - @close_issue = ::Gapic::Config::Method.new close_issue_config - get_pull_request_comment_config = parent_rpcs.get_pull_request_comment if parent_rpcs.respond_to? :get_pull_request_comment - @get_pull_request_comment = ::Gapic::Config::Method.new get_pull_request_comment_config - list_pull_request_comments_config = parent_rpcs.list_pull_request_comments if parent_rpcs.respond_to? :list_pull_request_comments - @list_pull_request_comments = ::Gapic::Config::Method.new list_pull_request_comments_config - create_pull_request_comment_config = parent_rpcs.create_pull_request_comment if parent_rpcs.respond_to? :create_pull_request_comment - @create_pull_request_comment = ::Gapic::Config::Method.new create_pull_request_comment_config - update_pull_request_comment_config = parent_rpcs.update_pull_request_comment if parent_rpcs.respond_to? :update_pull_request_comment - @update_pull_request_comment = ::Gapic::Config::Method.new update_pull_request_comment_config - delete_pull_request_comment_config = parent_rpcs.delete_pull_request_comment if parent_rpcs.respond_to? :delete_pull_request_comment - @delete_pull_request_comment = ::Gapic::Config::Method.new delete_pull_request_comment_config - batch_create_pull_request_comments_config = parent_rpcs.batch_create_pull_request_comments if parent_rpcs.respond_to? :batch_create_pull_request_comments - @batch_create_pull_request_comments = ::Gapic::Config::Method.new batch_create_pull_request_comments_config - resolve_pull_request_comments_config = parent_rpcs.resolve_pull_request_comments if parent_rpcs.respond_to? :resolve_pull_request_comments - @resolve_pull_request_comments = ::Gapic::Config::Method.new resolve_pull_request_comments_config - unresolve_pull_request_comments_config = parent_rpcs.unresolve_pull_request_comments if parent_rpcs.respond_to? :unresolve_pull_request_comments - @unresolve_pull_request_comments = ::Gapic::Config::Method.new unresolve_pull_request_comments_config - create_issue_comment_config = parent_rpcs.create_issue_comment if parent_rpcs.respond_to? :create_issue_comment - @create_issue_comment = ::Gapic::Config::Method.new create_issue_comment_config - get_issue_comment_config = parent_rpcs.get_issue_comment if parent_rpcs.respond_to? :get_issue_comment - @get_issue_comment = ::Gapic::Config::Method.new get_issue_comment_config - list_issue_comments_config = parent_rpcs.list_issue_comments if parent_rpcs.respond_to? :list_issue_comments - @list_issue_comments = ::Gapic::Config::Method.new list_issue_comments_config - update_issue_comment_config = parent_rpcs.update_issue_comment if parent_rpcs.respond_to? :update_issue_comment - @update_issue_comment = ::Gapic::Config::Method.new update_issue_comment_config - delete_issue_comment_config = parent_rpcs.delete_issue_comment if parent_rpcs.respond_to? :delete_issue_comment - @delete_issue_comment = ::Gapic::Config::Method.new delete_issue_comment_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb deleted file mode 100644 index b4d307413f79..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module SecureSourceManager - module V1 - module SecureSourceManager - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securesourcemanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the SecureSourceManager Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the SecureSourceManager Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecureSourceManager::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securesourcemanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb deleted file mode 100644 index f85cddd65669..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/secure_source_manager/rest/service_stub.rb +++ /dev/null @@ -1,3278 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" - -module Google - module Cloud - module SecureSourceManager - module V1 - module SecureSourceManager - module Rest - ## - # REST service stub for the SecureSourceManager service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_instances REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse] - # A result object deserialized from the server's reply - def list_instances request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_instances", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_instance REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Instance] - # A result object deserialized from the server's reply - def get_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::Instance.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_instance REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_repositories REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse] - # A result object deserialized from the server's reply - def list_repositories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_repositories_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_repositories", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_repository REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Repository] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Repository] - # A result object deserialized from the server's reply - def get_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::Repository.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_repository REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_repository REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_repository REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_repository request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_repository_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_repository", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_hooks REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListHooksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::ListHooksResponse] - # A result object deserialized from the server's reply - def list_hooks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_hooks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_hooks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_hook REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetHookRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Hook] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Hook] - # A result object deserialized from the server's reply - def get_hook request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_hook_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_hook", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::Hook.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_hook REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_hook request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_hook_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_hook", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_hook REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_hook request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_hook_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_hook", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_hook REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_hook request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_hook_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_hook", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy_repo REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy_repo request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_repo_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy_repo", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy_repo REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy_repo request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_repo_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy_repo", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions_repo REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions_repo request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_repo_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions_repo", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_branch_rule REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_branch_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_branch_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_branch_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_branch_rules REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse] - # A result object deserialized from the server's reply - def list_branch_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_branch_rules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_branch_rules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_branch_rule REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::BranchRule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] - # A result object deserialized from the server's reply - def get_branch_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_branch_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_branch_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::BranchRule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_branch_rule REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_branch_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_branch_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_branch_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_branch_rule REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_branch_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_branch_rule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_branch_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_pull_request request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_pull_request_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_pull_request", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequest] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] - # A result object deserialized from the server's reply - def get_pull_request request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_pull_request_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_pull_request", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::PullRequest.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_pull_requests REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse] - # A result object deserialized from the server's reply - def list_pull_requests request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_pull_requests_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_pull_requests", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_pull_request request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_pull_request_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_pull_request", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the merge_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def merge_pull_request request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_merge_pull_request_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "merge_pull_request", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the open_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def open_pull_request request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_open_pull_request_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "open_pull_request", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the close_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def close_pull_request request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_close_pull_request_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "close_pull_request", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_pull_request_file_diffs REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse] - # A result object deserialized from the server's reply - def list_pull_request_file_diffs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_pull_request_file_diffs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_pull_request_file_diffs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_tree REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse] - # A result object deserialized from the server's reply - def fetch_tree request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_tree_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_tree", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_blob REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse] - # A result object deserialized from the server's reply - def fetch_blob request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_blob_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_blob", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_issue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_issue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_issue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::Issue] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::Issue] - # A result object deserialized from the server's reply - def get_issue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_issue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_issue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::Issue.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_issues REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse] - # A result object deserialized from the server's reply - def list_issues request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_issues_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_issues", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_issue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_issue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_issue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_issue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_issue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_issue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the open_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def open_issue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_open_issue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "open_issue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the close_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def close_issue request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_close_issue_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "close_issue", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_pull_request_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] - # A result object deserialized from the server's reply - def get_pull_request_comment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_pull_request_comment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_pull_request_comment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::PullRequestComment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_pull_request_comments REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse] - # A result object deserialized from the server's reply - def list_pull_request_comments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_pull_request_comments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_pull_request_comments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_pull_request_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_pull_request_comment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_pull_request_comment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_pull_request_comment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_pull_request_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_pull_request_comment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_pull_request_comment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_pull_request_comment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_pull_request_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_pull_request_comment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_pull_request_comment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_pull_request_comment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_create_pull_request_comments REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def batch_create_pull_request_comments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_pull_request_comments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_create_pull_request_comments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the resolve_pull_request_comments REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def resolve_pull_request_comments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_resolve_pull_request_comments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "resolve_pull_request_comments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the unresolve_pull_request_comments REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def unresolve_pull_request_comments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_unresolve_pull_request_comments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "unresolve_pull_request_comments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_issue_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_issue_comment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_issue_comment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_issue_comment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_issue_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::IssueComment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] - # A result object deserialized from the server's reply - def get_issue_comment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_issue_comment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_issue_comment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::IssueComment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_issue_comments REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse] - # A result object deserialized from the server's reply - def list_issue_comments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_issue_comments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_issue_comments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_issue_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_issue_comment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_issue_comment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_issue_comment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_issue_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_issue_comment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_issue_comment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_issue_comment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_instances REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_instances_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/instances", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_instance REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/instances", - body: "instance", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_repositories REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_repositories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/repositories", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_repository REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_repository REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/repositories", - body: "repository", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_repository REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{repository.name}", - body: "repository", - matches: [ - ["repository.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_repository REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_repository_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_hooks REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListHooksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_hooks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/hooks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_hook REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetHookRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_hook_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_hook REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateHookRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_hook_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/hooks", - body: "hook", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_hook REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_hook_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{hook.name}", - body: "hook", - matches: [ - ["hook.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_hook REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_hook_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/hooks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy_repo REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_repo_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy_repo REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_repo_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions_repo REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_repo_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_branch_rule REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_branch_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/branchRules", - body: "branch_rule", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_branch_rules REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_branch_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/branchRules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_branch_rule REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_branch_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_branch_rule REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_branch_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{branch_rule.name}", - body: "branch_rule", - matches: [ - ["branch_rule.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_branch_rule REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_branch_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/branchRules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_pull_request_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/pullRequests", - body: "pull_request", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_pull_request_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_pull_requests REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_pull_requests_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/pullRequests", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_pull_request_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{pull_request.name}", - body: "pull_request", - matches: [ - ["pull_request.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the merge_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_merge_pull_request_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:merge", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the open_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_open_pull_request_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:open", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the close_pull_request REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_close_pull_request_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:close", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_pull_request_file_diffs REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_pull_request_file_diffs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:listFileDiffs", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_tree REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_tree_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{repository}:fetchTree", - matches: [ - ["repository", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_blob REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_blob_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{repository}:fetchBlob", - matches: [ - ["repository", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_issue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/issues", - body: "issue", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_issue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_issues REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_issues_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/issues", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_issue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{issue.name}", - body: "issue", - matches: [ - ["issue.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_issue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the open_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_open_issue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:open", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the close_issue REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_close_issue_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:close", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_pull_request_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_pull_request_comment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_pull_request_comments REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_pull_request_comments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/pullRequestComments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_pull_request_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_pull_request_comment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/pullRequestComments", - body: "pull_request_comment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_pull_request_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_pull_request_comment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{pull_request_comment.name}", - body: "pull_request_comment", - matches: [ - ["pull_request_comment.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_pull_request_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_pull_request_comment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/pullRequestComments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_create_pull_request_comments REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_create_pull_request_comments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/pullRequestComments:batchCreate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the resolve_pull_request_comments REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_resolve_pull_request_comments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/pullRequestComments:resolve", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the unresolve_pull_request_comments REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_unresolve_pull_request_comments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/pullRequestComments:unresolve", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/pullRequests/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_issue_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_issue_comment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/issueComments", - body: "issue_comment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_issue_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_issue_comment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_issue_comments REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_issue_comments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/issueComments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_issue_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_issue_comment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{issue_comment.name}", - body: "issue_comment", - matches: [ - ["issue_comment.name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_issue_comment REST call - # - # @param request_pb [::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_issue_comment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/issues/[^/]+/issueComments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb deleted file mode 100644 index aa5823b1716e..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/secure_source_manager/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecureSourceManager - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb deleted file mode 100644 index 2728b0fc9add..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_pb.rb +++ /dev/null @@ -1,129 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securesourcemanager/v1/secure_source_manager.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n?google/cloud/securesourcemanager/v1/secure_source_manager.proto\x12#google.cloud.securesourcemanager.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xed\r\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12N\n\x06labels\x18\x04 \x03(\x0b\x32\x39.google.cloud.securesourcemanager.v1.Instance.LabelsEntryB\x03\xe0\x41\x01\x12X\n\x0eprivate_config\x18\r \x01(\x0b\x32;.google.cloud.securesourcemanager.v1.Instance.PrivateConfigB\x03\xe0\x41\x01\x12G\n\x05state\x18\x05 \x01(\x0e\x32\x33.google.cloud.securesourcemanager.v1.Instance.StateB\x03\xe0\x41\x03\x12P\n\nstate_note\x18\n \x01(\x0e\x32\x37.google.cloud.securesourcemanager.v1.Instance.StateNoteB\x03\xe0\x41\x03\x12:\n\x07kms_key\x18\x0b \x01(\tB)\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12R\n\x0bhost_config\x18\t \x01(\x0b\x32\x38.google.cloud.securesourcemanager.v1.Instance.HostConfigB\x03\xe0\x41\x03\x12\x82\x01\n$workforce_identity_federation_config\x18\x0e \x01(\x0b\x32O.google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfigB\x03\xe0\x41\x01\x1a^\n\nHostConfig\x12\x11\n\x04html\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08git_http\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07git_ssh\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\x85\x04\n\rPrivateConfig\x12\x1a\n\nis_private\x18\x01 \x01(\x08\x42\x06\xe0\x41\x05\xe0\x41\x02\x12;\n\x07\x63\x61_pool\x18\x02 \x01(\tB*\xe0\x41\x05\xe0\x41\x01\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12Q\n\x17http_service_attachment\x18\x03 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(compute.googleapis.com/ServiceAttachment\x12P\n\x16ssh_service_attachment\x18\x04 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(compute.googleapis.com/ServiceAttachment\x12!\n\x14psc_allowed_projects\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12m\n\x12\x63ustom_host_config\x18\x07 \x01(\x0b\x32L.google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfigB\x03\xe0\x41\x01\x1a\x64\n\x10\x43ustomHostConfig\x12\x11\n\x04html\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x61pi\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07git_ssh\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08git_http\x18\x04 \x01(\tB\x03\xe0\x41\x02\x1a<\n!WorkforceIdentityFederationConfig\x12\x17\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x06\xe0\x41\x05\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"_\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\n\n\x06PAUSED\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x06\"_\n\tStateNote\x12\x1a\n\x16STATE_NOTE_UNSPECIFIED\x10\x00\x12\x1b\n\x17PAUSED_CMEK_UNAVAILABLE\x10\x01\x12\x19\n\x11INSTANCE_RESUMING\x10\x02\x1a\x02\x08\x01:q\xea\x41n\n+securesourcemanager.googleapis.com/Instance\x12.google.cloud.securesourcemanager.v1.PullRequestComment.ReviewB\x03\xe0\x41\x01H\x00\x12W\n\x07\x63omment\x18\x05 \x01(\x0b\x32?.google.cloud.securesourcemanager.v1.PullRequestComment.CommentB\x03\xe0\x41\x01H\x00\x12Q\n\x04\x63ode\x18\x06 \x01(\x0b\x32<.google.cloud.securesourcemanager.v1.PullRequestComment.CodeB\x03\xe0\x41\x01H\x00\x1a\xff\x01\n\x06Review\x12\x63\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32I.google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionTypeB\x03\xe0\x41\x02\x12\x11\n\x04\x62ody\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14\x65\x66\x66\x65\x63tive_commit_sha\x18\x04 \x01(\tB\x03\xe0\x41\x03\"Z\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMMENT\x10\x01\x12\x14\n\x10\x43HANGE_REQUESTED\x10\x02\x12\x0c\n\x08\x41PPROVED\x10\x03\x1a\x1c\n\x07\x43omment\x12\x11\n\x04\x62ody\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xe8\x01\n\x04\x43ode\x12\x11\n\x04\x62ody\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x05reply\x18\x02 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x04\x12W\n\x08position\x18\x03 \x01(\x0b\x32@.google.cloud.securesourcemanager.v1.PullRequestComment.PositionB\x03\xe0\x41\x01\x12#\n\x16\x65\x66\x66\x65\x63tive_root_comment\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08resolved\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12!\n\x14\x65\x66\x66\x65\x63tive_commit_sha\x18\x07 \x01(\tB\x03\xe0\x41\x03\x1a\x30\n\x08Position\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04line\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02:\xb8\x01\xea\x41\xb4\x01\n5securesourcemanager.googleapis.com/PullRequestComment\x12{projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}B\x10\n\x0e\x63omment_detail\"\xb8\x01\n\x14ListInstancesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+securesourcemanager.googleapis.com/Instance\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x15ListInstancesResponse\x12@\n\tinstances\x18\x01 \x03(\x0b\x32-.google.cloud.securesourcemanager.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"W\n\x12GetInstanceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\"\xdd\x01\n\x15\x43reateInstanceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+securesourcemanager.googleapis.com/Instance\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x08instance\x18\x03 \x01(\x0b\x32-.google.cloud.securesourcemanager.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x8f\x01\n\x15\x44\x65leteInstanceRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xed\x01\n\x17ListRepositoriesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x08instance\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+securesourcemanager.googleapis.com/Instance\"z\n\x18ListRepositoriesResponse\x12\x45\n\x0crepositories\x18\x01 \x03(\x0b\x32/.google.cloud.securesourcemanager.v1.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"[\n\x14GetRepositoryRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\"\xc6\x01\n\x17\x43reateRepositoryRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/Repository\x12H\n\nrepository\x18\x02 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rrepository_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb5\x01\n\x17UpdateRepositoryRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12H\n\nrepository\x18\x02 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"z\n\x17\x44\x65leteRepositoryRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x1a\n\rallow_missing\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x84\x01\n\x10ListHooksRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'securesourcemanager.googleapis.com/Hook\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"f\n\x11ListHooksResponse\x12\x38\n\x05hooks\x18\x01 \x03(\x0b\x32).google.cloud.securesourcemanager.v1.Hook\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x0eGetHookRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'securesourcemanager.googleapis.com/Hook\"\xae\x01\n\x11\x43reateHookRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12<\n\x04hook\x18\x02 \x01(\x0b\x32).google.cloud.securesourcemanager.v1.HookB\x03\xe0\x41\x02\x12\x14\n\x07hook_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x87\x01\n\x11UpdateHookRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12<\n\x04hook\x18\x02 \x01(\x0b\x32).google.cloud.securesourcemanager.v1.HookB\x03\xe0\x41\x02\"R\n\x11\x44\x65leteHookRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'securesourcemanager.googleapis.com/Hook\"[\n\x14GetBranchRuleRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/BranchRule\"\xc8\x01\n\x17\x43reateBranchRuleRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/BranchRule\x12I\n\x0b\x62ranch_rule\x18\x02 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xe0\x41\x02\x12\x1b\n\x0e\x62ranch_rule_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x90\x01\n\x16ListBranchRulesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-securesourcemanager.googleapis.com/BranchRule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"z\n\x17\x44\x65leteBranchRuleRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/BranchRule\x12\x1a\n\rallow_missing\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xb6\x01\n\x17UpdateBranchRuleRequest\x12I\n\x0b\x62ranch_rule\x18\x01 \x01(\x0b\x32/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"y\n\x17ListBranchRulesResponse\x12\x45\n\x0c\x62ranch_rules\x18\x01 \x03(\x0b\x32/.google.cloud.securesourcemanager.v1.BranchRule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xae\x01\n\x18\x43reatePullRequestRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12K\n\x0cpull_request\x18\x02 \x01(\x0b\x32\x30.google.cloud.securesourcemanager.v1.PullRequestB\x03\xe0\x41\x02\"]\n\x15GetPullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"\x91\x01\n\x17ListPullRequestsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"|\n\x18ListPullRequestsResponse\x12G\n\rpull_requests\x18\x01 \x03(\x0b\x32\x30.google.cloud.securesourcemanager.v1.PullRequest\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9d\x01\n\x18UpdatePullRequestRequest\x12K\n\x0cpull_request\x18\x01 \x01(\x0b\x32\x30.google.cloud.securesourcemanager.v1.PullRequestB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"_\n\x17MergePullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"^\n\x16OpenPullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"_\n\x17\x43losePullRequestRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\"\x98\x01\n\x1fListPullRequestFileDiffsRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.securesourcemanager.googleapis.com/PullRequest\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"~\n ListPullRequestFileDiffsResponse\x12\x41\n\nfile_diffs\x18\x01 \x03(\x0b\x32-.google.cloud.securesourcemanager.v1.FileDiff\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9b\x01\n\x12\x43reateIssueRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12>\n\x05issue\x18\x02 \x01(\x0b\x32*.google.cloud.securesourcemanager.v1.IssueB\x03\xe0\x41\x02\"Q\n\x0fGetIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\"\x9b\x01\n\x11ListIssuesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securesourcemanager.googleapis.com/Issue\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"i\n\x12ListIssuesResponse\x12:\n\x06issues\x18\x01 \x03(\x0b\x32*.google.cloud.securesourcemanager.v1.Issue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8a\x01\n\x12UpdateIssueRequest\x12>\n\x05issue\x18\x01 \x01(\x0b\x32*.google.cloud.securesourcemanager.v1.IssueB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"g\n\x12\x44\x65leteIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"f\n\x11\x43loseIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x10OpenIssueRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xef\x01\n\tTreeEntry\x12L\n\x04type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securesourcemanager.v1.TreeEntry.ObjectTypeB\x03\xe0\x41\x03\x12\x10\n\x03sha\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04mode\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04size\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\"I\n\nObjectType\x12\x1b\n\x17OBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04TREE\x10\x01\x12\x08\n\x04\x42LOB\x10\x02\x12\n\n\x06\x43OMMIT\x10\x03\"\xb8\x01\n\x10\x46\x65tchTreeRequest\x12I\n\nrepository\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x10\n\x03ref\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\trecursive\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"r\n\x11\x46\x65tchTreeResponse\x12\x44\n\x0ctree_entries\x18\x01 \x03(\x0b\x32..google.cloud.securesourcemanager.v1.TreeEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"o\n\x10\x46\x65tchBlobRequest\x12I\n\nrepository\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-securesourcemanager.googleapis.com/Repository\x12\x10\n\x03sha\x18\x02 \x01(\tB\x03\xe0\x41\x02\"1\n\x11\x46\x65tchBlobResponse\x12\x0b\n\x03sha\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\"\xa0\x01\n\x1eListPullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x92\x01\n\x1fListPullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcc\x01\n\x1f\x43reatePullRequestCommentRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12Z\n\x14pull_request_comment\x18\x02 \x01(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xe0\x41\x02\"\xd3\x01\n%BatchCreatePullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12[\n\x08requests\x18\x02 \x03(\x0b\x32\x44.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequestB\x03\xe0\x41\x02\"\x80\x01\n&BatchCreatePullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"\xb3\x01\n\x1fUpdatePullRequestCommentRequest\x12Z\n\x14pull_request_comment\x18\x01 \x01(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"n\n\x1f\x44\x65letePullRequestCommentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\"k\n\x1cGetPullRequestCommentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\"\xd8\x01\n!ResolvePullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12L\n\x05names\x18\x02 \x03(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\n\tauto_fill\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"|\n\"ResolvePullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"\xda\x01\n#UnresolvePullRequestCommentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35securesourcemanager.googleapis.com/PullRequestComment\x12L\n\x05names\x18\x02 \x03(\tB=\xe0\x41\x02\xfa\x41\x37\n5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\n\tauto_fill\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"~\n$UnresolvePullRequestCommentsResponse\x12V\n\x15pull_request_comments\x18\x01 \x03(\x0b\x32\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"\xac\x01\n\x19\x43reateIssueCommentRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securesourcemanager.googleapis.com/Issue\x12M\n\rissue_comment\x18\x02 \x01(\x0b\x32\x31.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xe0\x41\x02\"_\n\x16GetIssueCommentRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/securesourcemanager.googleapis.com/IssueComment\"\x94\x01\n\x18ListIssueCommentsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/securesourcemanager.googleapis.com/IssueComment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x19ListIssueCommentsResponse\x12I\n\x0eissue_comments\x18\x01 \x03(\x0b\x32\x31.google.cloud.securesourcemanager.v1.IssueComment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa0\x01\n\x19UpdateIssueCommentRequest\x12M\n\rissue_comment\x18\x01 \x01(\x0b\x32\x31.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"b\n\x19\x44\x65leteIssueCommentRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/securesourcemanager.googleapis.com/IssueComment2\xfe\x64\n\x13SecureSourceManager\x12\xc6\x01\n\rListInstances\x12\x39.google.cloud.securesourcemanager.v1.ListInstancesRequest\x1a:.google.cloud.securesourcemanager.v1.ListInstancesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xb3\x01\n\x0bGetInstance\x12\x37.google.cloud.securesourcemanager.v1.GetInstanceRequest\x1a-.google.cloud.securesourcemanager.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xea\x01\n\x0e\x43reateInstance\x12:.google.cloud.securesourcemanager.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xd6\x01\n\x0e\x44\x65leteInstance\x12:.google.cloud.securesourcemanager.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xd2\x01\n\x10ListRepositories\x12<.google.cloud.securesourcemanager.v1.ListRepositoriesRequest\x1a=.google.cloud.securesourcemanager.v1.ListRepositoriesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/repositories\x12\xbc\x01\n\rGetRepository\x12\x39.google.cloud.securesourcemanager.v1.GetRepositoryRequest\x1a/.google.cloud.securesourcemanager.v1.Repository\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/repositories/*}\x12\xfa\x01\n\x10\x43reateRepository\x12<.google.cloud.securesourcemanager.v1.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41\x1f\n\nRepository\x12\x11OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xfc\x01\n\x10UpdateRepository\x12<.google.cloud.securesourcemanager.v1.UpdateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nRepository\x12\x11OperationMetadata\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\xdd\x01\n\x10\x44\x65leteRepository\x12<.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xc5\x01\n\tListHooks\x12\x35.google.cloud.securesourcemanager.v1.ListHooksRequest\x1a\x36.google.cloud.securesourcemanager.v1.ListHooksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/repositories/*}/hooks\x12\xb2\x01\n\x07GetHook\x12\x33.google.cloud.securesourcemanager.v1.GetHookRequest\x1a).google.cloud.securesourcemanager.v1.Hook\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xdd\x01\n\nCreateHook\x12\x36.google.cloud.securesourcemanager.v1.CreateHookRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x19\n\x04Hook\x12\x11OperationMetadata\xda\x41\x13parent,hook,hook_id\x82\xd3\xe4\x93\x02@\"8/v1/{parent=projects/*/locations/*/repositories/*}/hooks:\x04hook\x12\xdf\x01\n\nUpdateHook\x12\x36.google.cloud.securesourcemanager.v1.UpdateHookRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x19\n\x04Hook\x12\x11OperationMetadata\xda\x41\x10hook,update_mask\x82\xd3\xe4\x93\x02\x45\x32=/v1/{hook.name=projects/*/locations/*/repositories/*/hooks/*}:\x04hook\x12\xd9\x01\n\nDeleteHook\x12\x36.google.cloud.securesourcemanager.v1.DeleteHookRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xa3\x01\n\x10GetIamPolicyRepo\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"T\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xa6\x01\n\x10SetIamPolicyRepo\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"W\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\xcc\x01\n\x16TestIamPermissionsRepo\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x08resource\x82\xd3\xe4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\x8b\x02\n\x10\x43reateBranchRule\x12<.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"\x99\x01\xca\x41\x1f\n\nBranchRule\x12\x11OperationMetadata\xda\x41!parent,branch_rule,branch_rule_id\x82\xd3\xe4\x93\x02M\">/v1/{parent=projects/*/locations/*/repositories/*}/branchRules:\x0b\x62ranch_rule\x12\xdd\x01\n\x0fListBranchRules\x12;.google.cloud.securesourcemanager.v1.ListBranchRulesRequest\x1a<.google.cloud.securesourcemanager.v1.ListBranchRulesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/branchRules\x12\xca\x01\n\rGetBranchRule\x12\x39.google.cloud.securesourcemanager.v1.GetBranchRuleRequest\x1a/.google.cloud.securesourcemanager.v1.BranchRule\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\x8d\x02\n\x10UpdateBranchRule\x12<.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\x1f\n\nBranchRule\x12\x11OperationMetadata\xda\x41\x17\x62ranch_rule,update_mask\x82\xd3\xe4\x93\x02Y2J/v1/{branch_rule.name=projects/*/locations/*/repositories/*/branchRules/*}:\x0b\x62ranch_rule\x12\xeb\x01\n\x10\x44\x65leteBranchRule\x12<.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\xa6\x02\n\x11\x43reatePullRequest\x12=.google.cloud.securesourcemanager.v1.CreatePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x13parent,pull_request\x82\xd3\xe4\x93\x02O\"?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests:\x0cpull_request\x12\xce\x01\n\x0eGetPullRequest\x12:.google.cloud.securesourcemanager.v1.GetPullRequestRequest\x1a\x30.google.cloud.securesourcemanager.v1.PullRequest\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}\x12\xe1\x01\n\x10ListPullRequests\x12<.google.cloud.securesourcemanager.v1.ListPullRequestsRequest\x1a=.google.cloud.securesourcemanager.v1.ListPullRequestsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests\x12\xb8\x02\n\x11UpdatePullRequest\x12=.google.cloud.securesourcemanager.v1.UpdatePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x18pull_request,update_mask\x82\xd3\xe4\x93\x02\\2L/v1/{pull_request.name=projects/*/locations/*/repositories/*/pullRequests/*}:\x0cpull_request\x12\x90\x02\n\x10MergePullRequest\x12<.google.cloud.securesourcemanager.v1.MergePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:merge:\x01*\x12\x8d\x02\n\x0fOpenPullRequest\x12;.google.cloud.securesourcemanager.v1.OpenPullRequestRequest\x1a\x1d.google.longrunning.Operation\"\x9d\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02I\"D/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:open:\x01*\x12\x90\x02\n\x10\x43losePullRequest\x12<.google.cloud.securesourcemanager.v1.ClosePullRequestRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41\x44\n/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:close:\x01*\x12\x85\x02\n\x18ListPullRequestFileDiffs\x12\x44.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest\x1a\x45.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\x12M/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:listFileDiffs\x12\xc4\x01\n\tFetchTree\x12\x35.google.cloud.securesourcemanager.v1.FetchTreeRequest\x1a\x36.google.cloud.securesourcemanager.v1.FetchTreeResponse\"H\x82\xd3\xe4\x93\x02\x42\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchTree\x12\xc4\x01\n\tFetchBlob\x12\x35.google.cloud.securesourcemanager.v1.FetchBlobRequest\x1a\x36.google.cloud.securesourcemanager.v1.FetchBlobResponse\"H\x82\xd3\xe4\x93\x02\x42\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchBlob\x12\x80\x02\n\x0b\x43reateIssue\x12\x37.google.cloud.securesourcemanager.v1.CreateIssueRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x0cparent,issue\x82\xd3\xe4\x93\x02\x42\"9/v1/{parent=projects/*/locations/*/repositories/*}/issues:\x05issue\x12\xb6\x01\n\x08GetIssue\x12\x34.google.cloud.securesourcemanager.v1.GetIssueRequest\x1a*.google.cloud.securesourcemanager.v1.Issue\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xc9\x01\n\nListIssues\x12\x36.google.cloud.securesourcemanager.v1.ListIssuesRequest\x1a\x37.google.cloud.securesourcemanager.v1.ListIssuesResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/repositories/*}/issues\x12\x8b\x02\n\x0bUpdateIssue\x12\x37.google.cloud.securesourcemanager.v1.UpdateIssueRequest\x1a\x1d.google.longrunning.Operation\"\xa3\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x11issue,update_mask\x82\xd3\xe4\x93\x02H2?/v1/{issue.name=projects/*/locations/*/repositories/*/issues/*}:\x05issue\x12\xdc\x01\n\x0b\x44\x65leteIssue\x12\x37.google.cloud.securesourcemanager.v1.DeleteIssueRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xf5\x01\n\tOpenIssue\x12\x35.google.cloud.securesourcemanager.v1.OpenIssueRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\">/v1/{name=projects/*/locations/*/repositories/*/issues/*}:open:\x01*\x12\xf8\x01\n\nCloseIssue\x12\x36.google.cloud.securesourcemanager.v1.CloseIssueRequest\x1a\x1d.google.longrunning.Operation\"\x92\x01\xca\x41>\n)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\"?/v1/{name=projects/*/locations/*/repositories/*/issues/*}:close:\x01*\x12\xf9\x01\n\x15GetPullRequestComment\x12\x41.google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest\x1a\x37.google.cloud.securesourcemanager.v1.PullRequestComment\"d\xda\x41\x04name\x82\xd3\xe4\x93\x02W\x12U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\x8c\x02\n\x17ListPullRequestComments\x12\x43.google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest\x1a\x44.google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse\"f\xda\x41\x06parent\x82\xd3\xe4\x93\x02W\x12U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments\x12\xe1\x02\n\x18\x43reatePullRequestComment\x12\x44.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest\x1a\x1d.google.longrunning.Operation\"\xdf\x01\xca\x41K\n6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xda\x41\x1bparent,pull_request_comment\x82\xd3\xe4\x93\x02m\"U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:\x14pull_request_comment\x12\xfc\x02\n\x18UpdatePullRequestComment\x12\x44.google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest\x1a\x1d.google.longrunning.Operation\"\xfa\x01\xca\x41K\n6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xda\x41 pull_request_comment,update_mask\x82\xd3\xe4\x93\x02\x82\x01\x32j/v1/{pull_request_comment.name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}:\x14pull_request_comment\x12\x93\x02\n\x18\x44\x65letePullRequestComment\x12\x44.google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02W*U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\xca\x02\n\x1e\x42\x61tchCreatePullRequestComments\x12J.google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest\x1a\x1d.google.longrunning.Operation\"\xbc\x01\xca\x41;\n&BatchCreatePullRequestCommentsResponse\x12\x11OperationMetadata\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x66\"a/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:batchCreate:\x01*\x12\xb7\x02\n\x1aResolvePullRequestComments\x12\x46.google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41\x37\n\"ResolvePullRequestCommentsResponse\x12\x11OperationMetadata\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02\x62\"]/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:resolve:\x01*\x12\xbf\x02\n\x1cUnresolvePullRequestComments\x12H.google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest\x1a\x1d.google.longrunning.Operation\"\xb5\x01\xca\x41\x39\n$UnresolvePullRequestCommentsResponse\x12\x11OperationMetadata\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02\x64\"_/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:unresolve:\x01*\x12\xb5\x02\n\x12\x43reateIssueComment\x12>.google.cloud.securesourcemanager.v1.CreateIssueCommentRequest\x1a\x1d.google.longrunning.Operation\"\xbf\x01\xca\x41\x45\n0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xda\x41\x14parent,issue_comment\x82\xd3\xe4\x93\x02Z\"I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments:\rissue_comment\x12\xdb\x01\n\x0fGetIssueComment\x12;.google.cloud.securesourcemanager.v1.GetIssueCommentRequest\x1a\x31.google.cloud.securesourcemanager.v1.IssueComment\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x12\xee\x01\n\x11ListIssueComments\x12=.google.cloud.securesourcemanager.v1.ListIssueCommentsRequest\x1a>.google.cloud.securesourcemanager.v1.ListIssueCommentsResponse\"Z\xda\x41\x06parent\x82\xd3\xe4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments\x12\xc8\x02\n\x12UpdateIssueComment\x12>.google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest\x1a\x1d.google.longrunning.Operation\"\xd2\x01\xca\x41\x45\n0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xda\x41\x19issue_comment,update_mask\x82\xd3\xe4\x93\x02h2W/v1/{issue_comment.name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}:\rissue_comment\x12\xfb\x01\n\x12\x44\x65leteIssueComment\x12>.google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02K*I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x1aV\xca\x41\"securesourcemanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb9\x06\n\'com.google.cloud.securesourcemanager.v1B\x18SecureSourceManagerProtoP\x01ZYcloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb;securesourcemanagerpb\xaa\x02#Google.Cloud.SecureSourceManager.V1\xca\x02#Google\\Cloud\\SecureSourceManager\\V1\xea\x02&Google::Cloud::SecureSourceManager::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}\xea\x41q\n\"dlp.googleapis.com/InspectTemplate\x12Kprojects/{project}/locations/{location}/inspectTemplates/{inspect_template}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecureSourceManager - module V1 - Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance").msgclass - Instance::HostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.HostConfig").msgclass - Instance::PrivateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.PrivateConfig").msgclass - Instance::PrivateConfig::CustomHostConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig").msgclass - Instance::WorkforceIdentityFederationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig").msgclass - Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.State").enummodule - Instance::StateNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Instance.StateNote").enummodule - Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository").msgclass - Repository::URIs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository.URIs").msgclass - Repository::InitialConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository.InitialConfig").msgclass - Repository::ScanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository.ScanConfig").msgclass - Repository::ScanConfig::SecretScanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Repository.ScanConfig.SecretScanConfig").msgclass - Hook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Hook").msgclass - Hook::PushOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Hook.PushOption").msgclass - Hook::HookEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Hook.HookEventType").enummodule - BranchRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BranchRule").msgclass - BranchRule::Check = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BranchRule.Check").msgclass - PullRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequest").msgclass - PullRequest::Branch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequest.Branch").msgclass - PullRequest::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequest.State").enummodule - FileDiff = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FileDiff").msgclass - FileDiff::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FileDiff.Action").enummodule - Issue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Issue").msgclass - Issue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.Issue.State").enummodule - IssueComment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.IssueComment").msgclass - PullRequestComment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment").msgclass - PullRequestComment::Review = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Review").msgclass - PullRequestComment::Review::ActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType").enummodule - PullRequestComment::Comment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Comment").msgclass - PullRequestComment::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Code").msgclass - PullRequestComment::Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.PullRequestComment.Position").msgclass - ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListInstancesRequest").msgclass - ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListInstancesResponse").msgclass - GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetInstanceRequest").msgclass - CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateInstanceRequest").msgclass - DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteInstanceRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.OperationMetadata").msgclass - ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListRepositoriesRequest").msgclass - ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListRepositoriesResponse").msgclass - GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetRepositoryRequest").msgclass - CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateRepositoryRequest").msgclass - UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateRepositoryRequest").msgclass - DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteRepositoryRequest").msgclass - ListHooksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListHooksRequest").msgclass - ListHooksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListHooksResponse").msgclass - GetHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetHookRequest").msgclass - CreateHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateHookRequest").msgclass - UpdateHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateHookRequest").msgclass - DeleteHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteHookRequest").msgclass - GetBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetBranchRuleRequest").msgclass - CreateBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateBranchRuleRequest").msgclass - ListBranchRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListBranchRulesRequest").msgclass - DeleteBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest").msgclass - UpdateBranchRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest").msgclass - ListBranchRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListBranchRulesResponse").msgclass - CreatePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreatePullRequestRequest").msgclass - GetPullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetPullRequestRequest").msgclass - ListPullRequestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestsRequest").msgclass - ListPullRequestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestsResponse").msgclass - UpdatePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdatePullRequestRequest").msgclass - MergePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.MergePullRequestRequest").msgclass - OpenPullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.OpenPullRequestRequest").msgclass - ClosePullRequestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ClosePullRequestRequest").msgclass - ListPullRequestFileDiffsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest").msgclass - ListPullRequestFileDiffsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse").msgclass - CreateIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateIssueRequest").msgclass - GetIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetIssueRequest").msgclass - ListIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssuesRequest").msgclass - ListIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssuesResponse").msgclass - UpdateIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateIssueRequest").msgclass - DeleteIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteIssueRequest").msgclass - CloseIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CloseIssueRequest").msgclass - OpenIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.OpenIssueRequest").msgclass - TreeEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.TreeEntry").msgclass - TreeEntry::ObjectType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.TreeEntry.ObjectType").enummodule - FetchTreeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchTreeRequest").msgclass - FetchTreeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchTreeResponse").msgclass - FetchBlobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchBlobRequest").msgclass - FetchBlobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.FetchBlobResponse").msgclass - ListPullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest").msgclass - ListPullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse").msgclass - CreatePullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest").msgclass - BatchCreatePullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest").msgclass - BatchCreatePullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsResponse").msgclass - UpdatePullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest").msgclass - DeletePullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest").msgclass - GetPullRequestCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest").msgclass - ResolvePullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest").msgclass - ResolvePullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsResponse").msgclass - UnresolvePullRequestCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest").msgclass - UnresolvePullRequestCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsResponse").msgclass - CreateIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.CreateIssueCommentRequest").msgclass - GetIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.GetIssueCommentRequest").msgclass - ListIssueCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssueCommentsRequest").msgclass - ListIssueCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.ListIssueCommentsResponse").msgclass - UpdateIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest").msgclass - DeleteIssueCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb deleted file mode 100644 index cea486da7706..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/lib/google/cloud/securesourcemanager/v1/secure_source_manager_services_pb.rb +++ /dev/null @@ -1,170 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/securesourcemanager/v1/secure_source_manager.proto for package 'Google.Cloud.SecureSourceManager.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/securesourcemanager/v1/secure_source_manager_pb' - -module Google - module Cloud - module SecureSourceManager - module V1 - module SecureSourceManager - # Secure Source Manager API - # - # Access Secure Source Manager instances, resources, and repositories. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.securesourcemanager.v1.SecureSourceManager' - - # Lists Instances in a given project and location. - rpc :ListInstances, ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest, ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse - # Gets details of a single instance. - rpc :GetInstance, ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest, ::Google::Cloud::SecureSourceManager::V1::Instance - # Creates a new instance in a given project and location. - rpc :CreateInstance, ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest, ::Google::Longrunning::Operation - # Deletes a single instance. - rpc :DeleteInstance, ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation - # Lists Repositories in a given project and location. - # - # The instance field is required in the query parameter for requests using - # the securesourcemanager.googleapis.com endpoint. - rpc :ListRepositories, ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest, ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse - # Gets metadata of a repository. - rpc :GetRepository, ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest, ::Google::Cloud::SecureSourceManager::V1::Repository - # Creates a new repository in a given project and location. - # - # The Repository.Instance field is required in the request body for requests - # using the securesourcemanager.googleapis.com endpoint. - rpc :CreateRepository, ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest, ::Google::Longrunning::Operation - # Updates the metadata of a repository. - rpc :UpdateRepository, ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, ::Google::Longrunning::Operation - # Deletes a Repository. - rpc :DeleteRepository, ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, ::Google::Longrunning::Operation - # Lists hooks in a given repository. - rpc :ListHooks, ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse - # Gets metadata of a hook. - rpc :GetHook, ::Google::Cloud::SecureSourceManager::V1::GetHookRequest, ::Google::Cloud::SecureSourceManager::V1::Hook - # Creates a new hook in a given repository. - rpc :CreateHook, ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, ::Google::Longrunning::Operation - # Updates the metadata of a hook. - rpc :UpdateHook, ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, ::Google::Longrunning::Operation - # Deletes a Hook. - rpc :DeleteHook, ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, ::Google::Longrunning::Operation - # Get IAM policy for a repository. - rpc :GetIamPolicyRepo, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Set IAM policy on a repository. - rpc :SetIamPolicyRepo, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Test IAM permissions on a repository. - # IAM permission checks are not required on this method. - rpc :TestIamPermissionsRepo, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # CreateBranchRule creates a branch rule in a given repository. - rpc :CreateBranchRule, ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, ::Google::Longrunning::Operation - # ListBranchRules lists branch rules in a given repository. - rpc :ListBranchRules, ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse - # GetBranchRule gets a branch rule. - rpc :GetBranchRule, ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, ::Google::Cloud::SecureSourceManager::V1::BranchRule - # UpdateBranchRule updates a branch rule. - rpc :UpdateBranchRule, ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, ::Google::Longrunning::Operation - # DeleteBranchRule deletes a branch rule. - rpc :DeleteBranchRule, ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, ::Google::Longrunning::Operation - # Creates a pull request. - rpc :CreatePullRequest, ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, ::Google::Longrunning::Operation - # Gets a pull request. - rpc :GetPullRequest, ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, ::Google::Cloud::SecureSourceManager::V1::PullRequest - # Lists pull requests in a repository. - rpc :ListPullRequests, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse - # Updates a pull request. - rpc :UpdatePullRequest, ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, ::Google::Longrunning::Operation - # Merges a pull request. - rpc :MergePullRequest, ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, ::Google::Longrunning::Operation - # Opens a pull request. - rpc :OpenPullRequest, ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, ::Google::Longrunning::Operation - # Closes a pull request without merging. - rpc :ClosePullRequest, ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, ::Google::Longrunning::Operation - # Lists a pull request's file diffs. - rpc :ListPullRequestFileDiffs, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse - # Fetches a tree from a repository. - rpc :FetchTree, ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse - # Fetches a blob from a repository. - rpc :FetchBlob, ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse - # Creates an issue. - rpc :CreateIssue, ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, ::Google::Longrunning::Operation - # Gets an issue. - rpc :GetIssue, ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, ::Google::Cloud::SecureSourceManager::V1::Issue - # Lists issues in a repository. - rpc :ListIssues, ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse - # Updates a issue. - rpc :UpdateIssue, ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, ::Google::Longrunning::Operation - # Deletes an issue. - rpc :DeleteIssue, ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, ::Google::Longrunning::Operation - # Opens an issue. - rpc :OpenIssue, ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, ::Google::Longrunning::Operation - # Closes an issue. - rpc :CloseIssue, ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, ::Google::Longrunning::Operation - # Gets a pull request comment. - rpc :GetPullRequestComment, ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, ::Google::Cloud::SecureSourceManager::V1::PullRequestComment - # Lists pull request comments. - rpc :ListPullRequestComments, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse - # Creates a pull request comment. This function is used to create a single - # PullRequestComment of type Comment, or a single PullRequestComment of type - # Code that's replying to another PullRequestComment of type Code. Use - # BatchCreatePullRequestComments to create multiple PullRequestComments for - # code reviews. - rpc :CreatePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, ::Google::Longrunning::Operation - # Updates a pull request comment. - rpc :UpdatePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, ::Google::Longrunning::Operation - # Deletes a pull request comment. - rpc :DeletePullRequestComment, ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, ::Google::Longrunning::Operation - # Batch creates pull request comments. This function is used to create - # multiple PullRequestComments for code review. There needs to be exactly one - # PullRequestComment of type Review, and at most 100 PullRequestComments of - # type Code per request. The Position of the code comments must be unique - # within the request. - rpc :BatchCreatePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, ::Google::Longrunning::Operation - # Resolves pull request comments. A list of PullRequestComment names must be - # provided. The PullRequestComment names must be in the same conversation - # thread. If auto_fill is set, all comments in the conversation thread will - # be resolved. - rpc :ResolvePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, ::Google::Longrunning::Operation - # Unresolves pull request comments. A list of PullRequestComment names must - # be provided. The PullRequestComment names must be in the same conversation - # thread. If auto_fill is set, all comments in the conversation thread will - # be unresolved. - rpc :UnresolvePullRequestComments, ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, ::Google::Longrunning::Operation - # Creates an issue comment. - rpc :CreateIssueComment, ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, ::Google::Longrunning::Operation - # Gets an issue comment. - rpc :GetIssueComment, ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, ::Google::Cloud::SecureSourceManager::V1::IssueComment - # Lists comments in an issue. - rpc :ListIssueComments, ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse - # Updates an issue comment. - rpc :UpdateIssueComment, ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, ::Google::Longrunning::Operation - # Deletes an issue comment. - rpc :DeleteIssueComment, ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/README.md deleted file mode 100644 index 993b0230a7dc..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Secure Source Manager V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb deleted file mode 100644 index b120f62bbaae..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/cloud/securesourcemanager/v1/secure_source_manager.rb +++ /dev/null @@ -1,1857 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # A resource that represents a Secure Source Manager instance. - # @!attribute [rw] name - # @return [::String] - # Identifier. A unique identifier for an instance. The name should be of the - # format: - # `projects/{project_number}/locations/{location_id}/instances/{instance_id}` - # - # `project_number`: Maps to a unique int64 id assigned to each project. - # - # `location_id`: Refers to the region where the instance will be deployed. - # Since Secure Source Manager is a regional service, it must be one of the - # valid GCP regions. - # - # `instance_id`: User provided name for the instance, must be unique for a - # project_number and location_id combination. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update timestamp. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels as key value pairs. - # Keys and values can contain only lowercase letters, numeric characters, - # underscores, and dashes. - # For more information, see [Requirements for - # labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). - # @!attribute [rw] private_config - # @return [::Google::Cloud::SecureSourceManager::V1::Instance::PrivateConfig] - # Optional. Private settings for private instance. - # @!attribute [r] state - # @return [::Google::Cloud::SecureSourceManager::V1::Instance::State] - # Output only. Current state of the instance. - # @!attribute [r] state_note - # @return [::Google::Cloud::SecureSourceManager::V1::Instance::StateNote] - # Output only. An optional field providing information about the current - # instance state. - # @!attribute [rw] kms_key - # @return [::String] - # Optional. Immutable. Customer-managed encryption key name, in the format - # projects/*/locations/*/keyRings/*/cryptoKeys/*. - # @!attribute [r] host_config - # @return [::Google::Cloud::SecureSourceManager::V1::Instance::HostConfig] - # Output only. A list of hostnames for this instance. - # @!attribute [rw] workforce_identity_federation_config - # @return [::Google::Cloud::SecureSourceManager::V1::Instance::WorkforceIdentityFederationConfig] - # Optional. Configuration for Workforce Identity Federation to support - # third party identity provider. If unset, defaults to the Google OIDC IdP. - class Instance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # HostConfig has different instance endpoints. - # @!attribute [r] html - # @return [::String] - # Output only. HTML hostname. - # @!attribute [r] api - # @return [::String] - # Output only. API hostname. - # @!attribute [r] git_http - # @return [::String] - # Output only. Git HTTP hostname. - # @!attribute [r] git_ssh - # @return [::String] - # Output only. Git SSH hostname. - class HostConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # PrivateConfig includes settings for private instance. - # @!attribute [rw] is_private - # @return [::Boolean] - # Required. Immutable. Indicate if it's private instance. - # @!attribute [rw] ca_pool - # @return [::String] - # Optional. Immutable. CA pool resource, resource must in the format of - # `projects/{project}/locations/{location}/caPools/{ca_pool}`. - # @!attribute [r] http_service_attachment - # @return [::String] - # Output only. Service Attachment for HTTP, resource is in the format of - # `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. - # @!attribute [r] ssh_service_attachment - # @return [::String] - # Output only. Service Attachment for SSH, resource is in the format of - # `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. - # @!attribute [rw] psc_allowed_projects - # @return [::Array<::String>] - # Optional. Additional allowed projects for setting up PSC connections. - # Instance host project is automatically allowed and does not need to be - # included in this list. - # @!attribute [rw] custom_host_config - # @return [::Google::Cloud::SecureSourceManager::V1::Instance::PrivateConfig::CustomHostConfig] - # Optional. Custom host config for the instance. - class PrivateConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Custom host config for the instance. - # @!attribute [rw] html - # @return [::String] - # Required. The custom UI hostname for the instance, e.g., - # "git.source.internal.mycompany.com" - # @!attribute [rw] api - # @return [::String] - # Required. The custom API hostname for the instance, e.g., - # "api.source.internal.mycompany.com" - # @!attribute [rw] git_ssh - # @return [::String] - # Required. The custom git ssh hostname for the instance, e.g., - # "ssh.source.internal.mycompany.com" - # @!attribute [rw] git_http - # @return [::String] - # Required. The custom git http hostname for the instance, e.g., - # "git.source.internal.mycompany.com" - class CustomHostConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # WorkforceIdentityFederationConfig allows this instance to support users - # from external identity providers. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. Immutable. Whether Workforce Identity Federation is enabled. - class WorkforceIdentityFederationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Secure Source Manager instance state. - module State - # Not set. This should only be the case for incoming requests. - STATE_UNSPECIFIED = 0 - - # Instance is being created. - CREATING = 1 - - # Instance is ready. - ACTIVE = 2 - - # Instance is being deleted. - DELETING = 3 - - # Instance is paused. - PAUSED = 4 - - # Instance is unknown, we are not sure if it's functioning. - UNKNOWN = 6 - end - - # Provides information about the current instance state. - module StateNote - # STATE_NOTE_UNSPECIFIED as the first value of State. - STATE_NOTE_UNSPECIFIED = 0 - - # CMEK access is unavailable. - PAUSED_CMEK_UNAVAILABLE = 1 - - # INSTANCE_RESUMING indicates that the instance was previously paused - # and is under the process of being brought back. - INSTANCE_RESUMING = 2 - end - end - - # Metadata of a Secure Source Manager repository. - # @!attribute [rw] name - # @return [::String] - # Identifier. A unique identifier for a repository. The name should be of the - # format: - # `projects/{project}/locations/{location_id}/repositories/{repository_id}` - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the repository, which cannot exceed 500 - # characters. - # @!attribute [rw] instance - # @return [::String] - # Optional. The name of the instance in which the repository is hosted, - # formatted as - # `projects/{project_number}/locations/{location_id}/instances/{instance_id}` - # When creating repository via securesourcemanager.googleapis.com, this field - # is used as input. When creating repository via *.sourcemanager.dev, this - # field is output only. - # @!attribute [r] uid - # @return [::String] - # Output only. Unique identifier of the repository. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update timestamp. - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @!attribute [r] uris - # @return [::Google::Cloud::SecureSourceManager::V1::Repository::URIs] - # Output only. URIs for the repository. - # @!attribute [rw] initial_config - # @return [::Google::Cloud::SecureSourceManager::V1::Repository::InitialConfig] - # Input only. Initial configurations for the repository. - # @!attribute [rw] service_account - # @return [::String] - # Optional. Repository level service account (BYOSA). - # @!attribute [rw] scan_config - # @return [::Google::Cloud::SecureSourceManager::V1::Repository::ScanConfig] - # Optional. Provides configuration for scanning. - class Repository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # URIs for the repository. - # @!attribute [r] html - # @return [::String] - # Output only. HTML is the URI for user to view the repository in a - # browser. - # @!attribute [r] git_https - # @return [::String] - # Output only. git_https is the git HTTPS URI for git operations. - # @!attribute [r] api - # @return [::String] - # Output only. API is the URI for API access. - class URIs - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Repository initialization configuration. - # @!attribute [rw] default_branch - # @return [::String] - # Default branch name of the repository. - # @!attribute [rw] gitignores - # @return [::Array<::String>] - # List of gitignore template names user can choose from. - # Valid values: actionscript, ada, agda, android, - # anjuta, ansible, appcelerator-titanium, app-engine, archives, - # arch-linux-packages, atmel-studio, autotools, backup, bazaar, bazel, - # bitrix, bricx-cc, c, cake-php, calabash, cf-wheels, chef-cookbook, - # clojure, cloud9, c-make, code-igniter, code-kit, code-sniffer, - # common-lisp, composer, concrete5, coq, cordova, cpp, craft-cms, cuda, - # cvs, d, dart, dart-editor, delphi, diff, dm, dreamweaver, dropbox, - # drupal, drupal-7, eagle, eclipse, eiffel-studio, elisp, elixir, elm, - # emacs, ensime, epi-server, erlang, esp-idf, espresso, exercism, - # expression-engine, ext-js, fancy, finale, flex-builder, force-dot-com, - # fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, godot, gpg, - # gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, images, - # infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, - # jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, - # kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, - # lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, - # logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, - # mercurial, mercury, metals, meta-programming-system, meteor, - # microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, - # nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, - # opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, - # phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, - # psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, - # rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, - # sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, - # slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, - # sugar-crm, svn, swift, symfony, symphony-cms, synopsys-vcs, tags, - # terraform, tex, text-mate, textpattern, think-php, tortoise-git, - # turbo-gears-2, typo3, umbraco, unity, unreal-engine, vagrant, vim, - # virtual-env, virtuoso, visual-studio, visual-studio-code, vue, vvvv, waf, - # web-methods, windows, word-press, xcode, xilinx, xilinx-ise, xojo, - # yeoman, yii, zend-framework, zephir. - # @!attribute [rw] license - # @return [::String] - # License template name user can choose from. - # Valid values: license-0bsd, license-389-exception, aal, abstyles, - # adobe-2006, adobe-glyph, adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, - # afl-3-0, afmparse, agpl-1-0, agpl-1-0-only, agpl-1-0-or-later, - # agpl-3-0-only, agpl-3-0-or-later, aladdin, amdplpa, aml, ampas, antlr-pd, - # antlr-pd-fallback, apache-1-0, apache-1-1, apache-2-0, apafml, apl-1-0, - # apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, artistic-1-0, artistic-1-0-cl8, - # artistic-1-0-perl, artistic-2-0, autoconf-exception-2-0, - # autoconf-exception-3-0, bahyph, barr, beerware, bison-exception-2-2, - # bittorrent-1-0, bittorrent-1-1, blessing, blueoak-1-0-0, - # bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, - # bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, - # bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, - # bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, - # bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, - # bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, - # bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, - # bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, - # catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, - # cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, - # cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, - # cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, - # cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, - # cc-by-nd-3-0, cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, - # cc-by-sa-2-1-jp, cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, - # cddl-1-0, cddl-1-1, cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, - # cecill-1-1, cecill-2-0, cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, - # cern-ohl-1-2, cern-ohl-p-2-0, cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, - # classpath-exception-2-0, clisp-exception-2-0, cnri-jython, cnri-python, - # cnri-python-gpl-compatible, condor-1-1, copyleft-next-0-3-0, - # copyleft-next-0-3-1, cpal-1-0, cpl-1-0, cpol-1-02, crossword, - # crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, d-fsl-1-0, diffmark, - # digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, dvipdfm, ecl-1-0, - # ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, entessa, epics, - # epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, eupl-1-0, eupl-1-1, - # eupl-1-2, eurosym, fair, fawkes-runtime-exception, fltk-exception, - # font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, - # freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, - # gcc-exception-3-1, gd, gfdl-1-1-invariants-only, - # gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, - # gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, - # gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, - # gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, - # gfdl-1-2-only, gfdl-1-2-or-later, gfdl-1-3-invariants-only, - # gfdl-1-3-invariants-or-later, gfdl-1-3-no-invariants-only, - # gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, gfdl-1-3-or-later, - # giftware, gl2ps, glide, glulxe, glwtpl, gnu-javamail-exception, gnuplot, - # gpl-1-0-only, gpl-1-0-or-later, gpl-2-0-only, gpl-2-0-or-later, - # gpl-3-0-linking-exception, gpl-3-0-linking-source-exception, - # gpl-3-0-only, gpl-3-0-or-later, gpl-cc-1-0, gsoap-1-3b, haskell-report, - # hippocratic-2-1, hpnd, hpnd-sell-variant, htmltidy, - # i2p-gpl-java-exception, ibm-pibs, icu, ijg, image-magick, imatix, imlib2, - # info-zip, intel, intel-acpi, interbase-1-0, ipa, ipl-1-0, isc, - # jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, leptonica, - # lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, lgpl-2-1-or-later, - # lgpl-3-0-linking-exception, lgpl-3-0-only, lgpl-3-0-or-later, lgpllr, - # libpng, libpng-2-0, libselinux-1-0, libtiff, libtool-exception, - # liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, - # linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, - # lppl-1-1, lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, - # mif-exception, miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, - # mit-feh, mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, - # mpl-1-0, mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, - # mtll, mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, - # naumen, nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, - # nist-pd, nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, - # nosl, noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, - # ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, - # odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, - # ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, - # ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, - # oldap-1-3, oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, - # oldap-2-2-1, oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, - # openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, - # opl-1-0, oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, - # o-uda-1-0, parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, - # plexus, polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, - # postgresql, psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, - # python-2-0, qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, - # qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, - # ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, - # sgi-b-1-1, sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, - # sissl-1-2, sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, - # spencer-99, spl-1-0, ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, - # swift-exception, swl, tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, - # tosl, tu-berlin-1-0, tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, - # unicode-dfs-2015, unicode-dfs-2016, unicode-tou, - # universal-foss-exception-1-0, unlicense, upl-1-0, vim, vostrom, vsl-1-0, - # w3c, w3c-19980720, w3c-20150513, watcom-1-0, wsuipa, wtfpl, - # wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, xnet, xpp, - # xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, zlib, - # zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1. - # @!attribute [rw] readme - # @return [::String] - # README template name. - # Valid template name(s) are: default. - class InitialConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for scanning. - # @!attribute [rw] secret_scan_config - # @return [::Google::Cloud::SecureSourceManager::V1::Repository::ScanConfig::SecretScanConfig] - # Optional. Configuration for secret scanning. - class ScanConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for secret scanning. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. Enables secret scanning for the repository. - # @!attribute [rw] inspect_template - # @return [::String] - # Optional. The DLP inspect template to use for secret scanning. - class SecretScanConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Metadata of a Secure Source Manager Hook. - # @!attribute [rw] name - # @return [::String] - # Identifier. A unique identifier for a Hook. The name should be of the - # format: - # `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` - # @!attribute [rw] target_uri - # @return [::String] - # Required. The target URI to which the payloads will be delivered. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. Determines if the hook disabled or not. - # Set to true to stop sending traffic. - # @!attribute [rw] events - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Hook::HookEventType>] - # Optional. The events that trigger hook on. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update timestamp. - # @!attribute [r] uid - # @return [::String] - # Output only. Unique identifier of the hook. - # @!attribute [rw] push_option - # @return [::Google::Cloud::SecureSourceManager::V1::Hook::PushOption] - # Optional. The trigger option for push events. - # @!attribute [rw] sensitive_query_string - # @return [::String] - # Optional. The sensitive query string to be appended to the target URI. - class Hook - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] branch_filter - # @return [::String] - # Optional. Trigger hook for matching branches only. - # Specified as glob pattern. If empty or *, events for all branches are - # reported. Examples: main, \\{main,release*}. - # See https://pkg.go.dev/github.com/gobwas/glob documentation. - class PushOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - module HookEventType - # Unspecified. - UNSPECIFIED = 0 - - # Push events are triggered when pushing to the repository. - PUSH = 1 - - # Pull request events are triggered when a pull request is opened, closed, - # reopened, or edited. - PULL_REQUEST = 2 - end - end - - # Metadata of a BranchRule. BranchRule is the protection rule to enforce - # pre-defined rules on designated branches within a repository. - # @!attribute [rw] name - # @return [::String] - # Identifier. A unique identifier for a BranchRule. The name should be of the - # format: - # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` - # @!attribute [r] uid - # @return [::String] - # Output only. Unique identifier of the repository. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Update timestamp. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User annotations. These attributes can only be set and used by - # the user. See https://google.aip.dev/128#annotations for more details such - # as format and size limitations. - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @!attribute [rw] include_pattern - # @return [::String] - # Optional. The pattern of the branch that can match to this BranchRule. - # Specified as regex. - # .* for all branches. Examples: main, (main|release.*). - # Current MVP phase only support `.*` for wildcard. - # @!attribute [rw] disabled - # @return [::Boolean] - # Optional. Determines if the branch rule is disabled or not. - # @!attribute [rw] require_pull_request - # @return [::Boolean] - # Optional. Determines if the branch rule requires a pull request or not. - # @!attribute [rw] minimum_reviews_count - # @return [::Integer] - # Optional. The minimum number of reviews required for the branch rule to be - # matched. - # @!attribute [rw] minimum_approvals_count - # @return [::Integer] - # Optional. The minimum number of approvals required for the branch rule to - # be matched. - # @!attribute [rw] require_code_owner_approval - # @return [::Boolean] - # Optional. Determines if code owners must approve before merging to the - # branch. - # @!attribute [rw] require_comments_resolved - # @return [::Boolean] - # Optional. Determines if require comments resolved before merging to the - # branch. - # @!attribute [rw] allow_stale_reviews - # @return [::Boolean] - # Optional. Determines if allow stale reviews or approvals before merging to - # the branch. - # @!attribute [rw] require_linear_history - # @return [::Boolean] - # Optional. Determines if require linear history before merging to the - # branch. - # @!attribute [rw] required_status_checks - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::BranchRule::Check>] - # Optional. List of required status checks before merging to the branch. - class BranchRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Check is a type for status check. - # @!attribute [rw] context - # @return [::String] - # Required. The context of the check. - class Check - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Metadata of a PullRequest. PullRequest is the request - # from a user to merge a branch (head) into another branch (base). - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. A unique identifier for a PullRequest. The number - # appended at the end is generated by the server. Format: - # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` - # @!attribute [rw] title - # @return [::String] - # Required. The pull request title. - # @!attribute [rw] body - # @return [::String] - # Optional. The pull request body. Provides a detailed description of the - # changes. - # @!attribute [rw] base - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest::Branch] - # Required. The branch to merge changes in. - # @!attribute [rw] head - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest::Branch] - # Immutable. The branch containing the changes to be merged. - # @!attribute [r] state - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest::State] - # Output only. State of the pull request (open, closed or merged). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last updated timestamp. - # @!attribute [r] close_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Close timestamp (if closed or merged). Cleared when pull - # request is re-opened. - class PullRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Branch represents a branch involved in a pull request. - # @!attribute [rw] ref - # @return [::String] - # Required. Name of the branch. - # @!attribute [r] sha - # @return [::String] - # Output only. The commit at the tip of the branch. - class Branch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State of the pull request. - module State - # Unspecified. - STATE_UNSPECIFIED = 0 - - # An open pull request. - OPEN = 1 - - # A closed pull request. - CLOSED = 2 - - # A merged pull request. - MERGED = 3 - end - end - - # Metadata of a FileDiff. FileDiff represents a single file diff in a pull - # request. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the file. - # @!attribute [r] action - # @return [::Google::Cloud::SecureSourceManager::V1::FileDiff::Action] - # Output only. The action taken on the file (eg. added, modified, deleted). - # @!attribute [r] sha - # @return [::String] - # Output only. The commit pointing to the file changes. - # @!attribute [r] patch - # @return [::String] - # Output only. The git patch containing the file changes. - class FileDiff - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Action taken on the file. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # The file was added. - ADDED = 1 - - # The file was modified. - MODIFIED = 2 - - # The file was deleted. - DELETED = 3 - end - end - - # Metadata of an Issue. - # @!attribute [rw] name - # @return [::String] - # Identifier. Unique identifier for an issue. The issue id is generated by - # the server. Format: - # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}` - # @!attribute [rw] title - # @return [::String] - # Required. Issue title. - # @!attribute [rw] body - # @return [::String] - # Optional. Issue body. Provides a detailed description of the issue. - # @!attribute [r] state - # @return [::Google::Cloud::SecureSourceManager::V1::Issue::State] - # Output only. State of the issue. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last updated timestamp. - # @!attribute [r] close_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Close timestamp (if closed). Cleared when is re-opened. - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - class Issue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of an issue. - module State - # Unspecified. - STATE_UNSPECIFIED = 0 - - # An open issue. - OPEN = 1 - - # A closed issue. - CLOSED = 2 - end - end - - # IssueComment represents a comment on an issue. - # @!attribute [rw] name - # @return [::String] - # Identifier. Unique identifier for an issue comment. The comment id is - # generated by the server. Format: - # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}` - # @!attribute [rw] body - # @return [::String] - # Required. The comment body. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last updated timestamp. - class IssueComment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # PullRequestComment represents a comment on a pull request. - # @!attribute [rw] name - # @return [::String] - # Identifier. Unique identifier for the pull request comment. The comment id - # is generated by the server. Format: - # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last updated timestamp. - # @!attribute [rw] review - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Review] - # Optional. The review summary comment. - # - # Note: The following fields are mutually exclusive: `review`, `comment`, `code`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] comment - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Comment] - # Optional. The general pull request comment. - # - # Note: The following fields are mutually exclusive: `comment`, `review`, `code`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] code - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Code] - # Optional. The comment on a code line. - # - # Note: The following fields are mutually exclusive: `code`, `review`, `comment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class PullRequestComment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The review summary comment. - # @!attribute [rw] action_type - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Review::ActionType] - # Required. The review action type. - # @!attribute [rw] body - # @return [::String] - # Optional. The comment body. - # @!attribute [r] effective_commit_sha - # @return [::String] - # Output only. The effective commit sha this review is pointing to. - class Review - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The review action type. - module ActionType - # Unspecified. - ACTION_TYPE_UNSPECIFIED = 0 - - # A general review comment. - COMMENT = 1 - - # Change required from this review. - CHANGE_REQUESTED = 2 - - # Change approved from this review. - APPROVED = 3 - end - end - - # The general pull request comment. - # @!attribute [rw] body - # @return [::String] - # Required. The comment body. - class Comment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The comment on a code line. - # @!attribute [rw] body - # @return [::String] - # Required. The comment body. - # @!attribute [rw] reply - # @return [::String] - # Optional. Input only. The PullRequestComment resource name that this - # comment is replying to. - # @!attribute [rw] position - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment::Position] - # Optional. The position of the comment. - # @!attribute [r] effective_root_comment - # @return [::String] - # Output only. The root comment of the conversation, derived from the reply - # field. - # @!attribute [r] resolved - # @return [::Boolean] - # Output only. Boolean indicator if the comment is resolved. - # @!attribute [r] effective_commit_sha - # @return [::String] - # Output only. The effective commit sha this code comment is pointing to. - class Code - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The position of the code comment. - # @!attribute [rw] path - # @return [::String] - # Required. The path of the file. - # @!attribute [rw] line - # @return [::Integer] - # Required. The line number of the comment. Positive value means it's on - # the new side of the diff, negative value means it's on the old side. - class Position - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # ListInstancesRequest is the request to list instances. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListInstancesRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter for filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListInstancesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Instance>] - # The list of instances. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListInstancesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetInstanceRequest is the request for getting an instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CreateInstanceRequest is the request for creating an instance. - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] instance_id - # @return [::String] - # Required. ID of the instance to be created. - # @!attribute [rw] instance - # @return [::Google::Cloud::SecureSourceManager::V1::Instance] - # Required. The resource being created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteInstanceRequest is the request for deleting an instance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, will force the deletion of the instance. - class DeleteInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListRepositoriesRequest is request to list repositories. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListRepositoriesRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter results. - # @!attribute [rw] instance - # @return [::String] - # Optional. The name of the instance in which the repository is hosted, - # formatted as - # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - # When listing repositories via securesourcemanager.googleapis.com, this - # field is required. When listing repositories via *.sourcemanager.dev, this - # field is ignored. - class ListRepositoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] repositories - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Repository>] - # The list of repositories. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListRepositoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetRepositoryRequest is the request for getting a repository. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the repository to retrieve. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - class GetRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CreateRepositoryRequest is the request for creating a repository. - # @!attribute [rw] parent - # @return [::String] - # Required. The project in which to create the repository. Values are of the - # form `projects/{project_number}/locations/{location_id}` - # @!attribute [rw] repository - # @return [::Google::Cloud::SecureSourceManager::V1::Repository] - # Required. The resource being created. - # @!attribute [rw] repository_id - # @return [::String] - # Required. The ID to use for the repository, which will become the final - # component of the repository's resource name. This value should be 4-63 - # characters, and valid characters are /[a-z][0-9]-/. - class CreateRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # UpdateRepositoryRequest is the request to update a repository. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # repository resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] repository - # @return [::Google::Cloud::SecureSourceManager::V1::Repository] - # Required. The repository being updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. False by default. If set to true, the request is validated and - # the user is provided with an expected result, but no actual change is made. - class UpdateRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteRepositoryRequest is the request to delete a repository. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the repository to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the repository is not found, the request will - # succeed but no action will be taken on the server. - class DeleteRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListHooksRequest is request to list hooks. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListHooksRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - class ListHooksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListHooksResponse is response to list hooks. - # @!attribute [rw] hooks - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Hook>] - # The list of hooks. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListHooksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetHookRequest is the request for getting a hook. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the hook to retrieve. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - class GetHookRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CreateHookRequest is the request for creating a hook. - # @!attribute [rw] parent - # @return [::String] - # Required. The repository in which to create the hook. Values are of the - # form - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @!attribute [rw] hook - # @return [::Google::Cloud::SecureSourceManager::V1::Hook] - # Required. The resource being created. - # @!attribute [rw] hook_id - # @return [::String] - # Required. The ID to use for the hook, which will become the final component - # of the hook's resource name. This value restricts to lower-case letters, - # numbers, and hyphen, with the first character a letter, the last a letter - # or a number, and a 63 character maximum. - class CreateHookRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # UpdateHookRequest is the request to update a hook. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # hook resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # @!attribute [rw] hook - # @return [::Google::Cloud::SecureSourceManager::V1::Hook] - # Required. The hook being updated. - class UpdateHookRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteHookRequest is the request to delete a hook. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the hook to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - class DeleteHookRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetBranchRuleRequest is the request for getting a branch rule. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the repository to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. - class GetBranchRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CreateBranchRuleRequest is the request to create a branch rule. - # @!attribute [rw] parent - # @return [::String] - # @!attribute [rw] branch_rule - # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] - # @!attribute [rw] branch_rule_id - # @return [::String] - class CreateBranchRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListBranchRulesRequest is the request to list branch rules. - # @!attribute [rw] parent - # @return [::String] - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - class ListBranchRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteBranchRuleRequest is the request to delete a branch rule. - # @!attribute [rw] name - # @return [::String] - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the branch rule is not found, the request - # will succeed but no action will be taken on the server. - class DeleteBranchRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # UpdateBranchRuleRequest is the request to update a branchRule. - # @!attribute [rw] branch_rule - # @return [::Google::Cloud::SecureSourceManager::V1::BranchRule] - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually post it. (https://google.aip.dev/163, for declarative friendly) - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # branchRule resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - class UpdateBranchRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListBranchRulesResponse is the response to listing branchRules. - # @!attribute [rw] branch_rules - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::BranchRule>] - # The list of branch rules. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListBranchRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CreatePullRequestRequest is the request to create a pull request. - # @!attribute [rw] parent - # @return [::String] - # Required. The repository that the pull request is created from. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @!attribute [rw] pull_request - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] - # Required. The pull request to create. - class CreatePullRequestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetPullRequestRequest is the request to get a pull request. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the pull request to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. - class GetPullRequestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListPullRequestsRequest is the request to list pull requests. - # @!attribute [rw] parent - # @return [::String] - # Required. The repository in which to list pull requests. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - class ListPullRequestsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListPullRequestsResponse is the response to list pull requests. - # @!attribute [rw] pull_requests - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequest>] - # The list of pull requests. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListPullRequestsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # UpdatePullRequestRequest is the request to update a pull request. - # @!attribute [rw] pull_request - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequest] - # Required. The pull request to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # pull request resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - class UpdatePullRequestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MergePullRequestRequest is the request to merge a pull request. - # @!attribute [rw] name - # @return [::String] - # Required. The pull request to merge. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - class MergePullRequestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # OpenPullRequestRequest is the request to open a pull request. - # @!attribute [rw] name - # @return [::String] - # Required. The pull request to open. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - class OpenPullRequestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ClosePullRequestRequest is the request to close a pull request. - # @!attribute [rw] name - # @return [::String] - # Required. The pull request to close. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - class ClosePullRequestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListPullRequestFileDiffsRequest is the request to list pull request file - # diffs. - # @!attribute [rw] name - # @return [::String] - # Required. The pull request to list file diffs for. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - class ListPullRequestFileDiffsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListPullRequestFileDiffsResponse is the response containing file diffs - # returned from ListPullRequestFileDiffs. - # @!attribute [rw] file_diffs - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::FileDiff>] - # The list of pull request file diffs. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListPullRequestFileDiffsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create an issue. - # @!attribute [rw] parent - # @return [::String] - # Required. The repository in which to create the issue. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @!attribute [rw] issue - # @return [::Google::Cloud::SecureSourceManager::V1::Issue] - # Required. The issue to create. - class CreateIssueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to get an issue. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the issue to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. - class GetIssueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list issues. - # @!attribute [rw] parent - # @return [::String] - # Required. The repository in which to list issues. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Used to filter the resulting issues list. - class ListIssuesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to list issues. - # @!attribute [rw] issues - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::Issue>] - # The list of issues. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListIssuesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update an issue. - # @!attribute [rw] issue - # @return [::Google::Cloud::SecureSourceManager::V1::Issue] - # Required. The issue to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # issue resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - class UpdateIssueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete an issue. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the issue to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the issue. - # If the etag is provided and does not match the current etag of the issue, - # deletion will be blocked and an ABORTED error will be returned. - class DeleteIssueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to close an issue. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the issue to close. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the issue. - # If the etag is provided and does not match the current etag of the issue, - # closing will be blocked and an ABORTED error will be returned. - class CloseIssueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to open an issue. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the issue to open. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. The current etag of the issue. - # If the etag is provided and does not match the current etag of the issue, - # opening will be blocked and an ABORTED error will be returned. - class OpenIssueRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an entry within a tree structure (like a Git tree). - # @!attribute [r] type - # @return [::Google::Cloud::SecureSourceManager::V1::TreeEntry::ObjectType] - # Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. - # @!attribute [r] sha - # @return [::String] - # Output only. The SHA-1 hash of the object (unique identifier). Output-only. - # @!attribute [r] path - # @return [::String] - # Output only. The path of the file or directory within the tree (e.g., - # "src/main/java/MyClass.java"). Output-only. - # @!attribute [r] mode - # @return [::String] - # Output only. The file mode as a string (e.g., "100644"). Indicates file - # type. Output-only. - # @!attribute [r] size - # @return [::Integer] - # Output only. The size of the object in bytes (only for blobs). Output-only. - class TreeEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the type of object the TreeEntry represents. - module ObjectType - # Default value, indicating the object type is unspecified. - OBJECT_TYPE_UNSPECIFIED = 0 - - # Represents a directory (folder). - TREE = 1 - - # Represents a file (contains file data). - BLOB = 2 - - # Represents a pointer to another repository (submodule). - COMMIT = 3 - end - end - - # Request message for fetching a tree structure from a repository. - # @!attribute [rw] repository - # @return [::String] - # Required. The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - # Specifies the repository to fetch the tree from. - # @!attribute [rw] ref - # @return [::String] - # Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies - # which tree to fetch. If not specified, the default branch will be used. - # @!attribute [rw] recursive - # @return [::Boolean] - # Optional. If true, include all subfolders and their files in the response. - # If false, only the immediate children are returned. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, at most 10,000 items will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - class FetchTreeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing a list of TreeEntry objects. - # @!attribute [rw] tree_entries - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::TreeEntry>] - # The list of TreeEntry objects. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class FetchTreeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for fetching a blob (file content) from a repository. - # @!attribute [rw] repository - # @return [::String] - # Required. The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - # Specifies the repository containing the blob. - # @!attribute [rw] sha - # @return [::String] - # Required. The SHA-1 hash of the blob to retrieve. - class FetchBlobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message containing the content of a blob. - # @!attribute [rw] sha - # @return [::String] - # The SHA-1 hash of the blob. - # @!attribute [rw] content - # @return [::String] - # The content of the blob, encoded as base64. - class FetchBlobResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list pull request comments. - # @!attribute [rw] parent - # @return [::String] - # Required. The pull request in which to list pull request comments. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - class ListPullRequestCommentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to list pull request comments. - # @!attribute [rw] pull_request_comments - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] - # The list of pull request comments. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to set as page_token to retrieve the next page. If this field is - # omitted, there are no subsequent pages. - class ListPullRequestCommentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create a pull request comment. - # @!attribute [rw] parent - # @return [::String] - # Required. The pull request in which to create the pull request comment. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @!attribute [rw] pull_request_comment - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] - # Required. The pull request comment to create. - class CreatePullRequestCommentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to batch create pull request comments. - # @!attribute [rw] parent - # @return [::String] - # Required. The pull request in which to create the pull request comments. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest>] - # Required. The request message specifying the resources to create. There - # should be exactly one CreatePullRequestCommentRequest with CommentDetail - # being REVIEW in the list, and no more than 100 - # CreatePullRequestCommentRequests with CommentDetail being CODE in the list - class BatchCreatePullRequestCommentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to batch create pull request comments. - # @!attribute [rw] pull_request_comments - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] - # The list of pull request comments created. - class BatchCreatePullRequestCommentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update a pull request comment. - # @!attribute [rw] pull_request_comment - # @return [::Google::Cloud::SecureSourceManager::V1::PullRequestComment] - # Required. The pull request comment to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # pull request comment resource by the update. Updatable fields are - # `body`. - class UpdatePullRequestCommentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete a pull request comment. A Review PullRequestComment - # cannot be deleted. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the pull request comment to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. - class DeletePullRequestCommentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to get a pull request comment. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the pull request comment to retrieve. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}`. - class GetPullRequestCommentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to resolve multiple pull request comments. - # @!attribute [rw] parent - # @return [::String] - # Required. The pull request in which to resolve the pull request comments. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. The names of the pull request comments to resolve. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` - # Only comments from the same threads are allowed in the same request. - # @!attribute [rw] auto_fill - # @return [::Boolean] - # Optional. If set, at least one comment in a thread is required, rest of the - # comments in the same thread will be automatically updated to resolved. If - # unset, all comments in the same thread need be present. - class ResolvePullRequestCommentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to resolve multiple pull request comments. - # @!attribute [rw] pull_request_comments - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] - # The list of pull request comments resolved. - class ResolvePullRequestCommentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to unresolve multiple pull request comments. - # @!attribute [rw] parent - # @return [::String] - # Required. The pull request in which to resolve the pull request comments. - # Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. The names of the pull request comments to unresolve. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}` - # Only comments from the same threads are allowed in the same request. - # @!attribute [rw] auto_fill - # @return [::Boolean] - # Optional. If set, at least one comment in a thread is required, rest of the - # comments in the same thread will be automatically updated to unresolved. If - # unset, all comments in the same thread need be present. - class UnresolvePullRequestCommentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to unresolve multiple pull request comments. - # @!attribute [rw] pull_request_comments - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::PullRequestComment>] - # The list of pull request comments unresolved. - class UnresolvePullRequestCommentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to create an issue comment. - # @!attribute [rw] parent - # @return [::String] - # Required. The issue in which to create the issue comment. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - # @!attribute [rw] issue_comment - # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] - # Required. The issue comment to create. - class CreateIssueCommentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to get an issue comment. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the issue comment to retrieve. - # The format is - # `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. - class GetIssueCommentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to list issue comments. - # @!attribute [rw] parent - # @return [::String] - # Required. The issue in which to list the comments. Format: - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. If unspecified, a default size of 30 will be - # used. The maximum value is 100; values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - class ListIssueCommentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to list issue comments. - # @!attribute [rw] issue_comments - # @return [::Array<::Google::Cloud::SecureSourceManager::V1::IssueComment>] - # The list of issue comments. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListIssueCommentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to update an issue comment. - # @!attribute [rw] issue_comment - # @return [::Google::Cloud::SecureSourceManager::V1::IssueComment] - # Required. The issue comment to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # issue comment resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - class UpdateIssueCommentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request to delete an issue comment. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the issue comment to delete. - # The format is - # `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}`. - class DeleteIssueCommentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/Gemfile deleted file mode 100644 index c02a8c6ffa97..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-secure_source_manager-v1", path: "../" -else - gem "google-cloud-secure_source_manager-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb deleted file mode 100644 index 6aeca4d125fe..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/batch_create_pull_request_comments.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_BatchCreatePullRequestComments_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the batch_create_pull_request_comments call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#batch_create_pull_request_comments. -# -def batch_create_pull_request_comments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new - - # Call the batch_create_pull_request_comments method. - result = client.batch_create_pull_request_comments request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_BatchCreatePullRequestComments_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb deleted file mode 100644 index b2ba82ae6d45..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_issue.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_CloseIssue_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the close_issue call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_issue. -# -def close_issue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new - - # Call the close_issue method. - result = client.close_issue request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_CloseIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb deleted file mode 100644 index 38c1ced837e0..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/close_pull_request.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_ClosePullRequest_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the close_pull_request call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_pull_request. -# -def close_pull_request - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new - - # Call the close_pull_request method. - result = client.close_pull_request request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_ClosePullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.rb deleted file mode 100644 index 81740887a0f5..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_branch_rule.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_CreateBranchRule_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the create_branch_rule call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_branch_rule. -# -def create_branch_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new - - # Call the create_branch_rule method. - result = client.create_branch_rule request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_CreateBranchRule_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb deleted file mode 100644 index 9ebf7f19e4b0..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_hook.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_CreateHook_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the create_hook call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_hook. -# -def create_hook - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new - - # Call the create_hook method. - result = client.create_hook request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_CreateHook_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_instance.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_instance.rb deleted file mode 100644 index d7e6ebc48aea..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_CreateInstance_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the create_instance call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_instance. -# -def create_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new - - # Call the create_instance method. - result = client.create_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb deleted file mode 100644 index c7ecf6b65771..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_CreateIssue_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the create_issue call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue. -# -def create_issue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new - - # Call the create_issue method. - result = client.create_issue request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_CreateIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb deleted file mode 100644 index 9a392c0b40e5..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_issue_comment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_CreateIssueComment_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the create_issue_comment call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue_comment. -# -def create_issue_comment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new - - # Call the create_issue_comment method. - result = client.create_issue_comment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_CreateIssueComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb deleted file mode 100644 index 96f9276bb3ad..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequest_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the create_pull_request call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request. -# -def create_pull_request - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new - - # Call the create_pull_request method. - result = client.create_pull_request request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb deleted file mode 100644 index 42a6943f1657..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_pull_request_comment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequestComment_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the create_pull_request_comment call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request_comment. -# -def create_pull_request_comment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new - - # Call the create_pull_request_comment method. - result = client.create_pull_request_comment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequestComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_repository.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_repository.rb deleted file mode 100644 index 8a5c6b9f1c9c..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/create_repository.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_CreateRepository_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the create_repository call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_repository. -# -def create_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new - - # Call the create_repository method. - result = client.create_repository request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_branch_rule.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_branch_rule.rb deleted file mode 100644 index 7be487c5cd28..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_branch_rule.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteBranchRule_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the delete_branch_rule call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_branch_rule. -# -def delete_branch_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new - - # Call the delete_branch_rule method. - result = client.delete_branch_rule request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteBranchRule_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb deleted file mode 100644 index bb832a22960e..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_hook.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteHook_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the delete_hook call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_hook. -# -def delete_hook - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new - - # Call the delete_hook method. - result = client.delete_hook request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteHook_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.rb deleted file mode 100644 index 3846d75b48de..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteInstance_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the delete_instance call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_instance. -# -def delete_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new - - # Call the delete_instance method. - result = client.delete_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb deleted file mode 100644 index 97ae38f29b45..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteIssue_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the delete_issue call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue. -# -def delete_issue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new - - # Call the delete_issue method. - result = client.delete_issue request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb deleted file mode 100644 index 7d4cf8df2226..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_issue_comment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteIssueComment_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the delete_issue_comment call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue_comment. -# -def delete_issue_comment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new - - # Call the delete_issue_comment method. - result = client.delete_issue_comment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteIssueComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb deleted file mode 100644 index 9b109842de87..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_pull_request_comment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_DeletePullRequestComment_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the delete_pull_request_comment call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_pull_request_comment. -# -def delete_pull_request_comment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new - - # Call the delete_pull_request_comment method. - result = client.delete_pull_request_comment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_DeletePullRequestComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.rb deleted file mode 100644 index 5ac51c078de8..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/delete_repository.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_DeleteRepository_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the delete_repository call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_repository. -# -def delete_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new - - # Call the delete_repository method. - result = client.delete_repository request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb deleted file mode 100644 index cf6d2c9e3b39..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_blob.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_FetchBlob_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the fetch_blob call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_blob. -# -def fetch_blob - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new - - # Call the fetch_blob method. - result = client.fetch_blob request - - # The returned object is of type Google::Cloud::SecureSourceManager::V1::FetchBlobResponse. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_FetchBlob_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb deleted file mode 100644 index f44b00813d69..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/fetch_tree.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_FetchTree_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the fetch_tree call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_tree. -# -def fetch_tree - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new - - # Call the fetch_tree method. - result = client.fetch_tree request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecureSourceManager::V1::TreeEntry. - p item - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_FetchTree_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.rb deleted file mode 100644 index f34587a87d48..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_branch_rule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_GetBranchRule_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the get_branch_rule call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_branch_rule. -# -def get_branch_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new - - # Call the get_branch_rule method. - result = client.get_branch_rule request - - # The returned object is of type Google::Cloud::SecureSourceManager::V1::BranchRule. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_GetBranchRule_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb deleted file mode 100644 index 7e6782e5a4ad..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_hook.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_GetHook_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the get_hook call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_hook. -# -def get_hook - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::GetHookRequest.new - - # Call the get_hook method. - result = client.get_hook request - - # The returned object is of type Google::Cloud::SecureSourceManager::V1::Hook. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_GetHook_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.rb deleted file mode 100644 index e9ce8413832f..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_iam_policy_repo.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_GetIamPolicyRepo_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the get_iam_policy_repo call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_iam_policy_repo. -# -def get_iam_policy_repo - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy_repo method. - result = client.get_iam_policy_repo request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_GetIamPolicyRepo_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_instance.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_instance.rb deleted file mode 100644 index 36213b70cd2b..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_instance.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_GetInstance_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the get_instance call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::SecureSourceManager::V1::Instance. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb deleted file mode 100644 index a00d369904cc..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_GetIssue_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the get_issue call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue. -# -def get_issue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new - - # Call the get_issue method. - result = client.get_issue request - - # The returned object is of type Google::Cloud::SecureSourceManager::V1::Issue. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_GetIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb deleted file mode 100644 index d72bb362175a..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_issue_comment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_GetIssueComment_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the get_issue_comment call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue_comment. -# -def get_issue_comment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new - - # Call the get_issue_comment method. - result = client.get_issue_comment request - - # The returned object is of type Google::Cloud::SecureSourceManager::V1::IssueComment. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_GetIssueComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb deleted file mode 100644 index 99294fe78a70..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_GetPullRequest_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the get_pull_request call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request. -# -def get_pull_request - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new - - # Call the get_pull_request method. - result = client.get_pull_request request - - # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequest. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_GetPullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb deleted file mode 100644 index b353146f2611..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_pull_request_comment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_GetPullRequestComment_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the get_pull_request_comment call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request_comment. -# -def get_pull_request_comment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new - - # Call the get_pull_request_comment method. - result = client.get_pull_request_comment request - - # The returned object is of type Google::Cloud::SecureSourceManager::V1::PullRequestComment. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_GetPullRequestComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_repository.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_repository.rb deleted file mode 100644 index c061ef825149..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/get_repository.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_GetRepository_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the get_repository call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_repository. -# -def get_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new - - # Call the get_repository method. - result = client.get_repository request - - # The returned object is of type Google::Cloud::SecureSourceManager::V1::Repository. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_branch_rules.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_branch_rules.rb deleted file mode 100644 index 00499c4f7fe8..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_branch_rules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_ListBranchRules_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the list_branch_rules call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_branch_rules. -# -def list_branch_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new - - # Call the list_branch_rules method. - result = client.list_branch_rules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecureSourceManager::V1::BranchRule. - p item - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_ListBranchRules_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb deleted file mode 100644 index bdd7fcb4c869..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_hooks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_ListHooks_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the list_hooks call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_hooks. -# -def list_hooks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new - - # Call the list_hooks method. - result = client.list_hooks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Hook. - p item - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_ListHooks_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_instances.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_instances.rb deleted file mode 100644 index a0635c75ef14..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_instances.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_ListInstances_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the list_instances call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_instances. -# -def list_instances - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new - - # Call the list_instances method. - result = client.list_instances request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Instance. - p item - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb deleted file mode 100644 index c67d4b141f75..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issue_comments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_ListIssueComments_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the list_issue_comments call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issue_comments. -# -def list_issue_comments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new - - # Call the list_issue_comments method. - result = client.list_issue_comments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecureSourceManager::V1::IssueComment. - p item - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_ListIssueComments_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb deleted file mode 100644 index 1d06ffba7fd6..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_issues.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_ListIssues_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the list_issues call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issues. -# -def list_issues - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new - - # Call the list_issues method. - result = client.list_issues request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Issue. - p item - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_ListIssues_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb deleted file mode 100644 index e27942c2285c..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_comments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestComments_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the list_pull_request_comments call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_comments. -# -def list_pull_request_comments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new - - # Call the list_pull_request_comments method. - result = client.list_pull_request_comments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequestComment. - p item - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestComments_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb deleted file mode 100644 index ee7f1fb85eee..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_request_file_diffs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestFileDiffs_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the list_pull_request_file_diffs call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_file_diffs. -# -def list_pull_request_file_diffs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new - - # Call the list_pull_request_file_diffs method. - result = client.list_pull_request_file_diffs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecureSourceManager::V1::FileDiff. - p item - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestFileDiffs_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb deleted file mode 100644 index 7d7b6c3956a6..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_pull_requests.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_ListPullRequests_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the list_pull_requests call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_requests. -# -def list_pull_requests - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new - - # Call the list_pull_requests method. - result = client.list_pull_requests request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecureSourceManager::V1::PullRequest. - p item - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequests_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.rb deleted file mode 100644 index bed32be0efe7..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/list_repositories.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_ListRepositories_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the list_repositories call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_repositories. -# -def list_repositories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new - - # Call the list_repositories method. - result = client.list_repositories request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecureSourceManager::V1::Repository. - p item - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb deleted file mode 100644 index a561bbc1483f..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/merge_pull_request.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_MergePullRequest_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the merge_pull_request call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#merge_pull_request. -# -def merge_pull_request - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new - - # Call the merge_pull_request method. - result = client.merge_pull_request request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_MergePullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb deleted file mode 100644 index aac118b714ec..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_issue.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_OpenIssue_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the open_issue call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_issue. -# -def open_issue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new - - # Call the open_issue method. - result = client.open_issue request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_OpenIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb deleted file mode 100644 index e144b045570d..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/open_pull_request.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_OpenPullRequest_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the open_pull_request call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_pull_request. -# -def open_pull_request - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new - - # Call the open_pull_request method. - result = client.open_pull_request request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_OpenPullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb deleted file mode 100644 index 7a9e2ed11b6c..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/resolve_pull_request_comments.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_ResolvePullRequestComments_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the resolve_pull_request_comments call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#resolve_pull_request_comments. -# -def resolve_pull_request_comments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new - - # Call the resolve_pull_request_comments method. - result = client.resolve_pull_request_comments request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_ResolvePullRequestComments_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.rb deleted file mode 100644 index 9eaf3ef13717..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/set_iam_policy_repo.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_SetIamPolicyRepo_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the set_iam_policy_repo call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#set_iam_policy_repo. -# -def set_iam_policy_repo - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy_repo method. - result = client.set_iam_policy_repo request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_SetIamPolicyRepo_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/test_iam_permissions_repo.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/test_iam_permissions_repo.rb deleted file mode 100644 index 73012017a1b3..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/test_iam_permissions_repo.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_TestIamPermissionsRepo_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the test_iam_permissions_repo call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#test_iam_permissions_repo. -# -def test_iam_permissions_repo - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions_repo method. - result = client.test_iam_permissions_repo request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END securesourcemanager_v1_generated_SecureSourceManager_TestIamPermissionsRepo_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb deleted file mode 100644 index d8c323b516f2..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/unresolve_pull_request_comments.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_UnresolvePullRequestComments_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the unresolve_pull_request_comments call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#unresolve_pull_request_comments. -# -def unresolve_pull_request_comments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new - - # Call the unresolve_pull_request_comments method. - result = client.unresolve_pull_request_comments request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_UnresolvePullRequestComments_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.rb deleted file mode 100644 index bd2c0fd99ca4..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_branch_rule.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_UpdateBranchRule_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the update_branch_rule call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_branch_rule. -# -def update_branch_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new - - # Call the update_branch_rule method. - result = client.update_branch_rule request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateBranchRule_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb deleted file mode 100644 index 724f047f2413..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_hook.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_UpdateHook_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the update_hook call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_hook. -# -def update_hook - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new - - # Call the update_hook method. - result = client.update_hook request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateHook_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb deleted file mode 100644 index 4de76feb6560..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_UpdateIssue_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the update_issue call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue. -# -def update_issue - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new - - # Call the update_issue method. - result = client.update_issue request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateIssue_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb deleted file mode 100644 index f19c0a363e5b..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_issue_comment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_UpdateIssueComment_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the update_issue_comment call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue_comment. -# -def update_issue_comment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new - - # Call the update_issue_comment method. - result = client.update_issue_comment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateIssueComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb deleted file mode 100644 index caea95463f77..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequest_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the update_pull_request call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request. -# -def update_pull_request - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new - - # Call the update_pull_request method. - result = client.update_pull_request request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequest_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb deleted file mode 100644 index 902089aa57c5..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_pull_request_comment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequestComment_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the update_pull_request_comment call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request_comment. -# -def update_pull_request_comment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new - - # Call the update_pull_request_comment method. - result = client.update_pull_request_comment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequestComment_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb deleted file mode 100644 index fa3df85ca997..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/secure_source_manager/update_repository.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securesourcemanager_v1_generated_SecureSourceManager_UpdateRepository_sync] -require "google/cloud/secure_source_manager/v1" - -## -# Snippet for the update_repository call in the SecureSourceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_repository. -# -def update_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new - - # Call the update_repository method. - result = client.update_repository request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securesourcemanager_v1_generated_SecureSourceManager_UpdateRepository_sync] diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json b/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json deleted file mode 100644 index 98391cb30a6e..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/snippets/snippet_metadata_google.cloud.securesourcemanager.v1.json +++ /dev/null @@ -1,2095 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-secure_source_manager-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.securesourcemanager.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListInstances_sync", - "title": "Snippet for the list_instances call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_instances.", - "file": "secure_source_manager/list_instances.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instances", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_instances", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "ListInstances", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListInstances", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetInstance_sync", - "title": "Snippet for the get_instance call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_instance.", - "file": "secure_source_manager/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::Instance", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetInstance", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateInstance_sync", - "title": "Snippet for the create_instance call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_instance.", - "file": "secure_source_manager/create_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_instance", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "CreateInstance", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateInstance", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteInstance_sync", - "title": "Snippet for the delete_instance call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_instance.", - "file": "secure_source_manager/delete_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_instance", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "DeleteInstance", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteInstance", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListRepositories_sync", - "title": "Snippet for the list_repositories call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_repositories.", - "file": "secure_source_manager/list_repositories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_repositories", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_repositories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "ListRepositories", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListRepositories", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetRepository_sync", - "title": "Snippet for the get_repository call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_repository.", - "file": "secure_source_manager/get_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_repository", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::Repository", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "GetRepository", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetRepository", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateRepository_sync", - "title": "Snippet for the create_repository call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_repository.", - "file": "secure_source_manager/create_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_repository", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "CreateRepository", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateRepository", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateRepository_sync", - "title": "Snippet for the update_repository call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_repository.", - "file": "secure_source_manager/update_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_repository", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "UpdateRepository", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateRepository", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteRepository_sync", - "title": "Snippet for the delete_repository call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_repository.", - "file": "secure_source_manager/delete_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_repository", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "DeleteRepository", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteRepository", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListHooks_sync", - "title": "Snippet for the list_hooks call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_hooks.", - "file": "secure_source_manager/list_hooks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_hooks", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_hooks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::ListHooksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::ListHooksResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "ListHooks", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListHooks", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetHook_sync", - "title": "Snippet for the get_hook call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_hook.", - "file": "secure_source_manager/get_hook.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_hook", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_hook", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::GetHookRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::Hook", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "GetHook", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetHook", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateHook_sync", - "title": "Snippet for the create_hook call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_hook.", - "file": "secure_source_manager/create_hook.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_hook", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_hook", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::CreateHookRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "CreateHook", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateHook", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateHook_sync", - "title": "Snippet for the update_hook call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_hook.", - "file": "secure_source_manager/update_hook.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_hook", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_hook", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "UpdateHook", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateHook", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteHook_sync", - "title": "Snippet for the delete_hook call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_hook.", - "file": "secure_source_manager/delete_hook.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_hook", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_hook", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "DeleteHook", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteHook", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetIamPolicyRepo_sync", - "title": "Snippet for the get_iam_policy_repo call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_iam_policy_repo.", - "file": "secure_source_manager/get_iam_policy_repo.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy_repo", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_iam_policy_repo", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "GetIamPolicyRepo", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetIamPolicyRepo", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_SetIamPolicyRepo_sync", - "title": "Snippet for the set_iam_policy_repo call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#set_iam_policy_repo.", - "file": "secure_source_manager/set_iam_policy_repo.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy_repo", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#set_iam_policy_repo", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "SetIamPolicyRepo", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.SetIamPolicyRepo", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_TestIamPermissionsRepo_sync", - "title": "Snippet for the test_iam_permissions_repo call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#test_iam_permissions_repo.", - "file": "secure_source_manager/test_iam_permissions_repo.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions_repo", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#test_iam_permissions_repo", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "TestIamPermissionsRepo", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.TestIamPermissionsRepo", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateBranchRule_sync", - "title": "Snippet for the create_branch_rule call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_branch_rule.", - "file": "secure_source_manager/create_branch_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_branch_rule", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_branch_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "CreateBranchRule", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateBranchRule", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListBranchRules_sync", - "title": "Snippet for the list_branch_rules call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_branch_rules.", - "file": "secure_source_manager/list_branch_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_branch_rules", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_branch_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "ListBranchRules", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListBranchRules", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetBranchRule_sync", - "title": "Snippet for the get_branch_rule call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_branch_rule.", - "file": "secure_source_manager/get_branch_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_branch_rule", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_branch_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::BranchRule", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "GetBranchRule", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetBranchRule", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateBranchRule_sync", - "title": "Snippet for the update_branch_rule call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_branch_rule.", - "file": "secure_source_manager/update_branch_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_branch_rule", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_branch_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "UpdateBranchRule", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateBranchRule", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteBranchRule_sync", - "title": "Snippet for the delete_branch_rule call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_branch_rule.", - "file": "secure_source_manager/delete_branch_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_branch_rule", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_branch_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "DeleteBranchRule", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteBranchRule", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequest_sync", - "title": "Snippet for the create_pull_request call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request.", - "file": "secure_source_manager/create_pull_request.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_pull_request", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "CreatePullRequest", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreatePullRequest", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetPullRequest_sync", - "title": "Snippet for the get_pull_request call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request.", - "file": "secure_source_manager/get_pull_request.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_pull_request", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::PullRequest", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "GetPullRequest", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetPullRequest", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListPullRequests_sync", - "title": "Snippet for the list_pull_requests call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_requests.", - "file": "secure_source_manager/list_pull_requests.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_pull_requests", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_requests", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "ListPullRequests", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListPullRequests", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequest_sync", - "title": "Snippet for the update_pull_request call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request.", - "file": "secure_source_manager/update_pull_request.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_pull_request", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "UpdatePullRequest", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdatePullRequest", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_MergePullRequest_sync", - "title": "Snippet for the merge_pull_request call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#merge_pull_request.", - "file": "secure_source_manager/merge_pull_request.rb", - "language": "RUBY", - "client_method": { - "short_name": "merge_pull_request", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#merge_pull_request", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "MergePullRequest", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.MergePullRequest", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_OpenPullRequest_sync", - "title": "Snippet for the open_pull_request call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_pull_request.", - "file": "secure_source_manager/open_pull_request.rb", - "language": "RUBY", - "client_method": { - "short_name": "open_pull_request", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_pull_request", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "OpenPullRequest", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.OpenPullRequest", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ClosePullRequest_sync", - "title": "Snippet for the close_pull_request call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_pull_request.", - "file": "secure_source_manager/close_pull_request.rb", - "language": "RUBY", - "client_method": { - "short_name": "close_pull_request", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_pull_request", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "ClosePullRequest", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ClosePullRequest", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestFileDiffs_sync", - "title": "Snippet for the list_pull_request_file_diffs call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_file_diffs.", - "file": "secure_source_manager/list_pull_request_file_diffs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_pull_request_file_diffs", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_file_diffs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "ListPullRequestFileDiffs", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListPullRequestFileDiffs", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_FetchTree_sync", - "title": "Snippet for the fetch_tree call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_tree.", - "file": "secure_source_manager/fetch_tree.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_tree", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_tree", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "FetchTree", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.FetchTree", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_FetchBlob_sync", - "title": "Snippet for the fetch_blob call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_blob.", - "file": "secure_source_manager/fetch_blob.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_blob", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#fetch_blob", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "FetchBlob", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.FetchBlob", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateIssue_sync", - "title": "Snippet for the create_issue call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue.", - "file": "secure_source_manager/create_issue.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_issue", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "CreateIssue", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateIssue", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetIssue_sync", - "title": "Snippet for the get_issue call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue.", - "file": "secure_source_manager/get_issue.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_issue", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::GetIssueRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::Issue", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "GetIssue", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetIssue", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListIssues_sync", - "title": "Snippet for the list_issues call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issues.", - "file": "secure_source_manager/list_issues.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_issues", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issues", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "ListIssues", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListIssues", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateIssue_sync", - "title": "Snippet for the update_issue call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue.", - "file": "secure_source_manager/update_issue.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_issue", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "UpdateIssue", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateIssue", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteIssue_sync", - "title": "Snippet for the delete_issue call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue.", - "file": "secure_source_manager/delete_issue.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_issue", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "DeleteIssue", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteIssue", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_OpenIssue_sync", - "title": "Snippet for the open_issue call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_issue.", - "file": "secure_source_manager/open_issue.rb", - "language": "RUBY", - "client_method": { - "short_name": "open_issue", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#open_issue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "OpenIssue", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.OpenIssue", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CloseIssue_sync", - "title": "Snippet for the close_issue call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_issue.", - "file": "secure_source_manager/close_issue.rb", - "language": "RUBY", - "client_method": { - "short_name": "close_issue", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#close_issue", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "CloseIssue", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CloseIssue", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetPullRequestComment_sync", - "title": "Snippet for the get_pull_request_comment call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request_comment.", - "file": "secure_source_manager/get_pull_request_comment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_pull_request_comment", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_pull_request_comment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::PullRequestComment", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "GetPullRequestComment", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetPullRequestComment", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestComments_sync", - "title": "Snippet for the list_pull_request_comments call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_comments.", - "file": "secure_source_manager/list_pull_request_comments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_pull_request_comments", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_pull_request_comments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "ListPullRequestComments", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListPullRequestComments", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequestComment_sync", - "title": "Snippet for the create_pull_request_comment call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request_comment.", - "file": "secure_source_manager/create_pull_request_comment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_pull_request_comment", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_pull_request_comment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "CreatePullRequestComment", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreatePullRequestComment", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequestComment_sync", - "title": "Snippet for the update_pull_request_comment call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request_comment.", - "file": "secure_source_manager/update_pull_request_comment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_pull_request_comment", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_pull_request_comment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "UpdatePullRequestComment", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdatePullRequestComment", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeletePullRequestComment_sync", - "title": "Snippet for the delete_pull_request_comment call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_pull_request_comment.", - "file": "secure_source_manager/delete_pull_request_comment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_pull_request_comment", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_pull_request_comment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "DeletePullRequestComment", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeletePullRequestComment", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_BatchCreatePullRequestComments_sync", - "title": "Snippet for the batch_create_pull_request_comments call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#batch_create_pull_request_comments.", - "file": "secure_source_manager/batch_create_pull_request_comments.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_pull_request_comments", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#batch_create_pull_request_comments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "BatchCreatePullRequestComments", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.BatchCreatePullRequestComments", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ResolvePullRequestComments_sync", - "title": "Snippet for the resolve_pull_request_comments call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#resolve_pull_request_comments.", - "file": "secure_source_manager/resolve_pull_request_comments.rb", - "language": "RUBY", - "client_method": { - "short_name": "resolve_pull_request_comments", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#resolve_pull_request_comments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "ResolvePullRequestComments", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ResolvePullRequestComments", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UnresolvePullRequestComments_sync", - "title": "Snippet for the unresolve_pull_request_comments call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#unresolve_pull_request_comments.", - "file": "secure_source_manager/unresolve_pull_request_comments.rb", - "language": "RUBY", - "client_method": { - "short_name": "unresolve_pull_request_comments", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#unresolve_pull_request_comments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "UnresolvePullRequestComments", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UnresolvePullRequestComments", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_CreateIssueComment_sync", - "title": "Snippet for the create_issue_comment call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue_comment.", - "file": "secure_source_manager/create_issue_comment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_issue_comment", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#create_issue_comment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "CreateIssueComment", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.CreateIssueComment", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_GetIssueComment_sync", - "title": "Snippet for the get_issue_comment call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue_comment.", - "file": "secure_source_manager/get_issue_comment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_issue_comment", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#get_issue_comment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::IssueComment", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "GetIssueComment", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.GetIssueComment", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_ListIssueComments_sync", - "title": "Snippet for the list_issue_comments call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issue_comments.", - "file": "secure_source_manager/list_issue_comments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_issue_comments", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#list_issue_comments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "ListIssueComments", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.ListIssueComments", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_UpdateIssueComment_sync", - "title": "Snippet for the update_issue_comment call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue_comment.", - "file": "secure_source_manager/update_issue_comment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_issue_comment", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#update_issue_comment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "UpdateIssueComment", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.UpdateIssueComment", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securesourcemanager_v1_generated_SecureSourceManager_DeleteIssueComment_sync", - "title": "Snippet for the delete_issue_comment call in the SecureSourceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue_comment.", - "file": "secure_source_manager/delete_issue_comment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_issue_comment", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client#delete_issue_comment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecureSourceManager::Client", - "full_name": "::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client" - }, - "method": { - "short_name": "DeleteIssueComment", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager.DeleteIssueComment", - "service": { - "short_name": "SecureSourceManager", - "full_name": "google.cloud.securesourcemanager.v1.SecureSourceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb deleted file mode 100644 index f4daf3d553b9..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" -require "google/cloud/securesourcemanager/v1/secure_source_manager_services_pb" -require "google/cloud/secure_source_manager/v1/secure_source_manager" - -class ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_test.rb deleted file mode 100644 index 5320203b8443..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_paths_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 "gapic/grpc/service_stub" - -require "google/cloud/secure_source_manager/v1/secure_source_manager" - -class ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_branch_rule_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.branch_rule_path project: "value0", location: "value1", repository: "value2", branch_rule: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/branchRules/value3", path - end - end - - def test_ca_pool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.ca_pool_path project: "value0", location: "value1", ca_pool: "value2" - assert_equal "projects/value0/locations/value1/caPools/value2", path - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path - end - end - - def test_hook_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.hook_path project: "value0", location: "value1", repository: "value2", hook: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/hooks/value3", path - end - end - - def test_inspect_template_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.inspect_template_path project: "value0", location: "value1", inspect_template: "value2" - assert_equal "projects/value0/locations/value1/inspectTemplates/value2", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_issue_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.issue_path project: "value0", location: "value1", repository: "value2", issue: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/issues/value3", path - end - end - - def test_issue_comment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.issue_comment_path project: "value0", location: "value1", repository: "value2", issue: "value3", comment: "value4" - assert_equal "projects/value0/locations/value1/repositories/value2/issues/value3/issueComments/value4", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_pull_request_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.pull_request_path project: "value0", location: "value1", repository: "value2", pull_request: "value3" - assert_equal "projects/value0/locations/value1/repositories/value2/pullRequests/value3", path - end - end - - def test_pull_request_comment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.pull_request_comment_path project: "value0", location: "value1", repository: "value2", pull_request: "value3", comment: "value4" - assert_equal "projects/value0/locations/value1/repositories/value2/pullRequests/value3/pullRequestComments/value4", path - end - end - - def test_repository_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.repository_path project: "value0", location: "value1", repository: "value2" - assert_equal "projects/value0/locations/value1/repositories/value2", path - end - end - - def test_service_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_account_path project: "value0", service_account: "value1" - assert_equal "projects/value0/serviceAccounts/value1", path - end - end - - def test_service_attachment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_attachment_path project: "value0", region: "value1", service_attachment: "value2" - assert_equal "projects/value0/regions/value1/serviceAttachments/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb deleted file mode 100644 index 32cf40c3585f..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_rest_test.rb +++ /dev/null @@ -1,2973 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" -require "google/cloud/secure_source_manager/v1/secure_source_manager/rest" - - -class ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_instances - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_instances ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_instances(::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_instances_client_stub.call_count - end - end - end - - def test_get_instance - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_instance ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_instance(::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_count - end - end - end - - def test_create_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_id = "hello world" - instance = {} - request_id = "hello world" - - create_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_instance parent: parent, instance_id: instance_id, instance: instance, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_instance ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_instance(::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_instance_client_stub.call_count - end - end - end - - def test_delete_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - - delete_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_instance({ name: name, request_id: request_id, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_instance name: name, request_id: request_id, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_instance ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new(name: name, request_id: request_id, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_instance({ name: name, request_id: request_id, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_instance(::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new(name: name, request_id: request_id, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_instance_client_stub.call_count - end - end - end - - def test_list_repositories - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - instance = "hello world" - - list_repositories_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_repositories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_repositories_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_repositories parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_repositories ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_repositories(::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_repositories_client_stub.call_count - end - end - end - - def test_get_repository - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::Repository.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_repository_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_repository({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_repository name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_repository ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_repository({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_repository(::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_repository_client_stub.call_count - end - end - end - - def test_create_repository - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - repository = {} - repository_id = "hello world" - - create_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_repository_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_repository({ parent: parent, repository: repository, repository_id: repository_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_repository parent: parent, repository: repository, repository_id: repository_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_repository ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_repository({ parent: parent, repository: repository, repository_id: repository_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_repository(::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_repository_client_stub.call_count - end - end - end - - def test_update_repository - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - repository = {} - validate_only = true - - update_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_repository_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_repository update_mask: update_mask, repository: repository, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_repository ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_repository(::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_repository_client_stub.call_count - end - end - end - - def test_delete_repository - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - allow_missing = true - - delete_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_repository_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_repository_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_repository({ name: name, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_repository name: name, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_repository ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_repository({ name: name, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_repository(::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_repository_client_stub.call_count - end - end - end - - def test_list_hooks - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_hooks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_hooks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_hooks_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_hooks({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_hooks parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_hooks ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_hooks({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_hooks(::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_hooks_client_stub.call_count - end - end - end - - def test_get_hook - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::Hook.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_hook_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_hook_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_hook_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_hook({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_hook name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_hook ::Google::Cloud::SecureSourceManager::V1::GetHookRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_hook({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_hook(::Google::Cloud::SecureSourceManager::V1::GetHookRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_hook_client_stub.call_count - end - end - end - - def test_create_hook - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - hook = {} - hook_id = "hello world" - - create_hook_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_hook_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_hook_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_hook({ parent: parent, hook: hook, hook_id: hook_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_hook parent: parent, hook: hook, hook_id: hook_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_hook ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_hook({ parent: parent, hook: hook, hook_id: hook_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_hook(::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_hook_client_stub.call_count - end - end - end - - def test_update_hook - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - hook = {} - - update_hook_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_hook_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_hook_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_hook({ update_mask: update_mask, hook: hook }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_hook update_mask: update_mask, hook: hook do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_hook ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_hook({ update_mask: update_mask, hook: hook }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_hook(::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_hook_client_stub.call_count - end - end - end - - def test_delete_hook - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_hook_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_hook_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_hook_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_hook({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_hook name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_hook ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_hook({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_hook(::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_hook_client_stub.call_count - end - end - end - - def test_get_iam_policy_repo - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_repo_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_iam_policy_repo_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_repo_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy_repo({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy_repo resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy_repo ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy_repo({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy_repo(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_repo_client_stub.call_count - end - end - end - - def test_set_iam_policy_repo - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_repo_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_set_iam_policy_repo_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_repo_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy_repo resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy_repo ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy_repo(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_repo_client_stub.call_count - end - end - end - - def test_test_iam_permissions_repo - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_repo_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_test_iam_permissions_repo_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_repo_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions_repo({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions_repo resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions_repo ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions_repo({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions_repo(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_repo_client_stub.call_count - end - end - end - - def test_create_branch_rule - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - branch_rule = {} - branch_rule_id = "hello world" - - create_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_branch_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_branch_rule_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_branch_rule parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_branch_rule ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_branch_rule(::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_branch_rule_client_stub.call_count - end - end - end - - def test_list_branch_rules - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_branch_rules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_branch_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_branch_rules_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_branch_rules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_branch_rules ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_branch_rules(::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_branch_rules_client_stub.call_count - end - end - end - - def test_get_branch_rule - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::BranchRule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_branch_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_branch_rule_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_branch_rule({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_branch_rule name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_branch_rule ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_branch_rule({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_branch_rule(::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_branch_rule_client_stub.call_count - end - end - end - - def test_update_branch_rule - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - branch_rule = {} - validate_only = true - update_mask = {} - - update_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_branch_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_branch_rule_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_branch_rule branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_branch_rule ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_branch_rule(::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_branch_rule_client_stub.call_count - end - end - end - - def test_delete_branch_rule - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - allow_missing = true - - delete_branch_rule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_branch_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_branch_rule_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_branch_rule({ name: name, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_branch_rule name: name, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_branch_rule ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_branch_rule({ name: name, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_branch_rule(::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_branch_rule_client_stub.call_count - end - end - end - - def test_create_pull_request - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - pull_request = {} - - create_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_pull_request_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_pull_request({ parent: parent, pull_request: pull_request }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_pull_request parent: parent, pull_request: pull_request do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_pull_request ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_pull_request({ parent: parent, pull_request: pull_request }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_pull_request(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_pull_request_client_stub.call_count - end - end - end - - def test_get_pull_request - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::PullRequest.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_pull_request_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_pull_request({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_pull_request name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_pull_request ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_pull_request({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_pull_request(::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_pull_request_client_stub.call_count - end - end - end - - def test_list_pull_requests - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_pull_requests_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_pull_requests_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_pull_requests_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_pull_requests({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_pull_requests parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_pull_requests ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_pull_requests({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_pull_requests(::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_pull_requests_client_stub.call_count - end - end - end - - def test_update_pull_request - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - pull_request = {} - update_mask = {} - - update_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_pull_request_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_pull_request({ pull_request: pull_request, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_pull_request pull_request: pull_request, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_pull_request ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_pull_request({ pull_request: pull_request, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_pull_request(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_pull_request_client_stub.call_count - end - end - end - - def test_merge_pull_request - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - merge_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_merge_pull_request_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, merge_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.merge_pull_request({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.merge_pull_request name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.merge_pull_request ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.merge_pull_request({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.merge_pull_request(::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, merge_pull_request_client_stub.call_count - end - end - end - - def test_open_pull_request - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - open_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_open_pull_request_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, open_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.open_pull_request({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.open_pull_request name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.open_pull_request ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.open_pull_request({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.open_pull_request(::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, open_pull_request_client_stub.call_count - end - end - end - - def test_close_pull_request - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - close_pull_request_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_close_pull_request_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, close_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.close_pull_request({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.close_pull_request name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.close_pull_request ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.close_pull_request({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.close_pull_request(::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, close_pull_request_client_stub.call_count - end - end - end - - def test_list_pull_request_file_diffs - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_pull_request_file_diffs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_pull_request_file_diffs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_pull_request_file_diffs_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_pull_request_file_diffs({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_pull_request_file_diffs name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_pull_request_file_diffs ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_pull_request_file_diffs({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_pull_request_file_diffs(::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_pull_request_file_diffs_client_stub.call_count - end - end - end - - def test_fetch_tree - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - repository = "hello world" - ref = "hello world" - recursive = true - page_size = 42 - page_token = "hello world" - - fetch_tree_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_fetch_tree_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_tree_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.fetch_tree({ repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.fetch_tree repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.fetch_tree ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.fetch_tree({ repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.fetch_tree(::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_tree_client_stub.call_count - end - end - end - - def test_fetch_blob - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - repository = "hello world" - sha = "hello world" - - fetch_blob_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_fetch_blob_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_blob_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.fetch_blob({ repository: repository, sha: sha }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.fetch_blob repository: repository, sha: sha do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.fetch_blob ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.fetch_blob({ repository: repository, sha: sha }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.fetch_blob(::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_blob_client_stub.call_count - end - end - end - - def test_create_issue - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - issue = {} - - create_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_issue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_issue({ parent: parent, issue: issue }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_issue parent: parent, issue: issue do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_issue ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_issue({ parent: parent, issue: issue }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_issue(::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_issue_client_stub.call_count - end - end - end - - def test_get_issue - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::Issue.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_issue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_issue({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_issue name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_issue ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_issue({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_issue(::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_issue_client_stub.call_count - end - end - end - - def test_list_issues - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_issues_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_issues_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_issues({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_issues parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_issues ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_issues({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_issues(::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_issues_client_stub.call_count - end - end - end - - def test_update_issue - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - issue = {} - update_mask = {} - - update_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_issue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_issue({ issue: issue, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_issue issue: issue, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_issue ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_issue({ issue: issue, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_issue(::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_issue_client_stub.call_count - end - end - end - - def test_delete_issue - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_issue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_issue({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_issue name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_issue ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_issue({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_issue(::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_issue_client_stub.call_count - end - end - end - - def test_open_issue - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - open_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_open_issue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, open_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.open_issue({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.open_issue name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.open_issue ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.open_issue({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.open_issue(::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, open_issue_client_stub.call_count - end - end - end - - def test_close_issue - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - close_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_close_issue_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, close_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.close_issue({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.close_issue name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.close_issue ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.close_issue({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.close_issue(::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, close_issue_client_stub.call_count - end - end - end - - def test_get_pull_request_comment - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::PullRequestComment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_pull_request_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_pull_request_comment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_pull_request_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_pull_request_comment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_pull_request_comment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_pull_request_comment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_pull_request_comment_client_stub.call_count - end - end - end - - def test_list_pull_request_comments - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_pull_request_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_pull_request_comments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_pull_request_comments_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_pull_request_comments({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_pull_request_comments parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_pull_request_comments({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_pull_request_comments_client_stub.call_count - end - end - end - - def test_create_pull_request_comment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - pull_request_comment = {} - - create_pull_request_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_pull_request_comment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_pull_request_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_pull_request_comment parent: parent, pull_request_comment: pull_request_comment do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_pull_request_comment_client_stub.call_count - end - end - end - - def test_update_pull_request_comment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - pull_request_comment = {} - update_mask = {} - - update_pull_request_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_pull_request_comment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_pull_request_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_pull_request_comment pull_request_comment: pull_request_comment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_pull_request_comment_client_stub.call_count - end - end - end - - def test_delete_pull_request_comment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_pull_request_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_pull_request_comment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_pull_request_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_pull_request_comment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_pull_request_comment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_pull_request_comment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_pull_request_comment_client_stub.call_count - end - end - end - - def test_batch_create_pull_request_comments - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_create_pull_request_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_batch_create_pull_request_comments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_create_pull_request_comments_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_create_pull_request_comments({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_create_pull_request_comments parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_create_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_create_pull_request_comments({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_create_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_create_pull_request_comments_client_stub.call_count - end - end - end - - def test_resolve_pull_request_comments - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - names = ["hello world"] - auto_fill = true - - resolve_pull_request_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_resolve_pull_request_comments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, resolve_pull_request_comments_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.resolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.resolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.resolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, resolve_pull_request_comments_client_stub.call_count - end - end - end - - def test_unresolve_pull_request_comments - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - names = ["hello world"] - auto_fill = true - - unresolve_pull_request_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_unresolve_pull_request_comments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, unresolve_pull_request_comments_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.unresolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.unresolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.unresolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, unresolve_pull_request_comments_client_stub.call_count - end - end - end - - def test_create_issue_comment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - issue_comment = {} - - create_issue_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_create_issue_comment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_issue_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_issue_comment({ parent: parent, issue_comment: issue_comment }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_issue_comment parent: parent, issue_comment: issue_comment do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_issue_comment ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_issue_comment({ parent: parent, issue_comment: issue_comment }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_issue_comment(::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_issue_comment_client_stub.call_count - end - end - end - - def test_get_issue_comment - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::IssueComment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_issue_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_get_issue_comment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_issue_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_issue_comment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_issue_comment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_issue_comment ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_issue_comment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_issue_comment(::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_issue_comment_client_stub.call_count - end - end - end - - def test_list_issue_comments - # Create test objects. - client_result = ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_issue_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_list_issue_comments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_issue_comments_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_issue_comments({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_issue_comments parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_issue_comments ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_issue_comments({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_issue_comments(::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_issue_comments_client_stub.call_count - end - end - end - - def test_update_issue_comment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - issue_comment = {} - update_mask = {} - - update_issue_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_update_issue_comment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_issue_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_issue_comment issue_comment: issue_comment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_issue_comment ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_issue_comment(::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_issue_comment_client_stub.call_count - end - end - end - - def test_delete_issue_comment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_issue_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::ServiceStub.stub :transcode_delete_issue_comment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_issue_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_issue_comment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_issue_comment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_issue_comment ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_issue_comment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_issue_comment(::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_issue_comment_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb deleted file mode 100644 index e03409ec4ac5..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/google/cloud/secure_source_manager/v1/secure_source_manager_test.rb +++ /dev/null @@ -1,3466 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/securesourcemanager/v1/secure_source_manager_pb" -require "google/cloud/secure_source_manager/v1/secure_source_manager" - -class ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_instances - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListInstancesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_instances, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_instances_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_instances ::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_instances(::Google::Cloud::SecureSourceManager::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_instances_client_stub.call_rpc_count - end - end - - def test_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::Instance.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_instance({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_instance name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_instance ::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_instance({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_instance(::Google::Cloud::SecureSourceManager::V1::GetInstanceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_rpc_count - end - end - - def test_create_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_id = "hello world" - instance = {} - request_id = "hello world" - - create_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_instance, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["instance_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Instance), request["instance"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_instance_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_instance parent: parent, instance_id: instance_id, instance: instance, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_instance ::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_instance(::Google::Cloud::SecureSourceManager::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_instance_client_stub.call_rpc_count - end - end - - def test_delete_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - - delete_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_instance, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_instance_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_instance({ name: name, request_id: request_id, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_instance name: name, request_id: request_id, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_instance ::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new(name: name, request_id: request_id, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_instance({ name: name, request_id: request_id, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_instance(::Google::Cloud::SecureSourceManager::V1::DeleteInstanceRequest.new(name: name, request_id: request_id, force: force), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_instance_client_stub.call_rpc_count - end - end - - def test_list_repositories - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - instance = "hello world" - - list_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_repositories, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["instance"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_repositories_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_repositories parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_repositories ::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_repositories({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_repositories(::Google::Cloud::SecureSourceManager::V1::ListRepositoriesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance: instance), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_repositories_client_stub.call_rpc_count - end - end - - def test_get_repository - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::Repository.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_repository, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_repository_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_repository({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_repository name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_repository ::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_repository({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_repository(::Google::Cloud::SecureSourceManager::V1::GetRepositoryRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_repository_client_stub.call_rpc_count - end - end - - def test_create_repository - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - repository = {} - repository_id = "hello world" - - create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_repository, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Repository), request["repository"] - assert_equal "hello world", request["repository_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_repository_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_repository({ parent: parent, repository: repository, repository_id: repository_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_repository parent: parent, repository: repository, repository_id: repository_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_repository ::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_repository({ parent: parent, repository: repository, repository_id: repository_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_repository(::Google::Cloud::SecureSourceManager::V1::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_repository_client_stub.call_rpc_count - end - end - - def test_update_repository - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - repository = {} - validate_only = true - - update_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_repository, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Repository), request["repository"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_repository_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_repository update_mask: update_mask, repository: repository, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_repository ::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_repository({ update_mask: update_mask, repository: repository, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_repository(::Google::Cloud::SecureSourceManager::V1::UpdateRepositoryRequest.new(update_mask: update_mask, repository: repository, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_repository_client_stub.call_rpc_count - end - end - - def test_delete_repository - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - allow_missing = true - - delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_repository, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_repository_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_repository({ name: name, allow_missing: allow_missing }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_repository name: name, allow_missing: allow_missing do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_repository ::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_repository({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_repository(::Google::Cloud::SecureSourceManager::V1::DeleteRepositoryRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_repository_client_stub.call_rpc_count - end - end - - def test_list_hooks - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListHooksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_hooks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_hooks, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_hooks_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_hooks({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_hooks parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_hooks ::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_hooks({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_hooks(::Google::Cloud::SecureSourceManager::V1::ListHooksRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_hooks_client_stub.call_rpc_count - end - end - - def test_get_hook - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::Hook.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_hook, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetHookRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_hook_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_hook({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_hook name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_hook ::Google::Cloud::SecureSourceManager::V1::GetHookRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_hook({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_hook(::Google::Cloud::SecureSourceManager::V1::GetHookRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_hook_client_stub.call_rpc_count - end - end - - def test_create_hook - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - hook = {} - hook_id = "hello world" - - create_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_hook, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Hook), request["hook"] - assert_equal "hello world", request["hook_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_hook_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_hook({ parent: parent, hook: hook, hook_id: hook_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_hook parent: parent, hook: hook, hook_id: hook_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_hook ::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_hook({ parent: parent, hook: hook, hook_id: hook_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_hook(::Google::Cloud::SecureSourceManager::V1::CreateHookRequest.new(parent: parent, hook: hook, hook_id: hook_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_hook_client_stub.call_rpc_count - end - end - - def test_update_hook - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - hook = {} - - update_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_hook, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Hook), request["hook"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_hook_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_hook({ update_mask: update_mask, hook: hook }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_hook update_mask: update_mask, hook: hook do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_hook ::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_hook({ update_mask: update_mask, hook: hook }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_hook(::Google::Cloud::SecureSourceManager::V1::UpdateHookRequest.new(update_mask: update_mask, hook: hook), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_hook_client_stub.call_rpc_count - end - end - - def test_delete_hook - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_hook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_hook, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_hook_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_hook({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_hook name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_hook ::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_hook({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_hook(::Google::Cloud::SecureSourceManager::V1::DeleteHookRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_hook_client_stub.call_rpc_count - end - end - - def test_get_iam_policy_repo - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy_repo, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_repo_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy_repo({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy_repo resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy_repo ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy_repo({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy_repo(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_repo_client_stub.call_rpc_count - end - end - - def test_set_iam_policy_repo - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy_repo, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_repo_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy_repo resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy_repo ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy_repo({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy_repo(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_repo_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions_repo - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_repo_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions_repo, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_repo_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions_repo({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions_repo resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions_repo ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions_repo({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions_repo(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_repo_client_stub.call_rpc_count - end - end - - def test_create_branch_rule - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - branch_rule = {} - branch_rule_id = "hello world" - - create_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_branch_rule, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::BranchRule), request["branch_rule"] - assert_equal "hello world", request["branch_rule_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_branch_rule_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_branch_rule parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_branch_rule ::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_branch_rule({ parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_branch_rule(::Google::Cloud::SecureSourceManager::V1::CreateBranchRuleRequest.new(parent: parent, branch_rule: branch_rule, branch_rule_id: branch_rule_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_branch_rule_client_stub.call_rpc_count - end - end - - def test_list_branch_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_branch_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_branch_rules, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_branch_rules_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_branch_rules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_branch_rules ::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_branch_rules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_branch_rules(::Google::Cloud::SecureSourceManager::V1::ListBranchRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_branch_rules_client_stub.call_rpc_count - end - end - - def test_get_branch_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::BranchRule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_branch_rule, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_branch_rule_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_branch_rule({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_branch_rule name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_branch_rule ::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_branch_rule({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_branch_rule(::Google::Cloud::SecureSourceManager::V1::GetBranchRuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_branch_rule_client_stub.call_rpc_count - end - end - - def test_update_branch_rule - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - branch_rule = {} - validate_only = true - update_mask = {} - - update_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_branch_rule, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::BranchRule), request["branch_rule"] - assert_equal true, request["validate_only"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_branch_rule_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_branch_rule branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_branch_rule ::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_branch_rule({ branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_branch_rule(::Google::Cloud::SecureSourceManager::V1::UpdateBranchRuleRequest.new(branch_rule: branch_rule, validate_only: validate_only, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_branch_rule_client_stub.call_rpc_count - end - end - - def test_delete_branch_rule - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - allow_missing = true - - delete_branch_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_branch_rule, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_branch_rule_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_branch_rule({ name: name, allow_missing: allow_missing }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_branch_rule name: name, allow_missing: allow_missing do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_branch_rule ::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_branch_rule({ name: name, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_branch_rule(::Google::Cloud::SecureSourceManager::V1::DeleteBranchRuleRequest.new(name: name, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_branch_rule_client_stub.call_rpc_count - end - end - - def test_create_pull_request - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - pull_request = {} - - create_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_pull_request, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequest), request["pull_request"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_pull_request({ parent: parent, pull_request: pull_request }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_pull_request parent: parent, pull_request: pull_request do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_pull_request ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_pull_request({ parent: parent, pull_request: pull_request }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_pull_request(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestRequest.new(parent: parent, pull_request: pull_request), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_pull_request_client_stub.call_rpc_count - end - end - - def test_get_pull_request - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::PullRequest.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_pull_request, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_pull_request({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_pull_request name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_pull_request ::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_pull_request({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_pull_request(::Google::Cloud::SecureSourceManager::V1::GetPullRequestRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_pull_request_client_stub.call_rpc_count - end - end - - def test_list_pull_requests - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_pull_requests_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_pull_requests, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_pull_requests_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_pull_requests({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_pull_requests parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_pull_requests ::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_pull_requests({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_pull_requests(::Google::Cloud::SecureSourceManager::V1::ListPullRequestsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_pull_requests_client_stub.call_rpc_count - end - end - - def test_update_pull_request - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - pull_request = {} - update_mask = {} - - update_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_pull_request, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequest), request["pull_request"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_pull_request({ pull_request: pull_request, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_pull_request pull_request: pull_request, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_pull_request ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_pull_request({ pull_request: pull_request, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_pull_request(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestRequest.new(pull_request: pull_request, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_pull_request_client_stub.call_rpc_count - end - end - - def test_merge_pull_request - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - merge_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :merge_pull_request, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, merge_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.merge_pull_request({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.merge_pull_request name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.merge_pull_request ::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.merge_pull_request({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.merge_pull_request(::Google::Cloud::SecureSourceManager::V1::MergePullRequestRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, merge_pull_request_client_stub.call_rpc_count - end - end - - def test_open_pull_request - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - open_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :open_pull_request, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, open_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.open_pull_request({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.open_pull_request name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.open_pull_request ::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.open_pull_request({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.open_pull_request(::Google::Cloud::SecureSourceManager::V1::OpenPullRequestRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, open_pull_request_client_stub.call_rpc_count - end - end - - def test_close_pull_request - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - close_pull_request_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :close_pull_request, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, close_pull_request_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.close_pull_request({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.close_pull_request name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.close_pull_request ::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.close_pull_request({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.close_pull_request(::Google::Cloud::SecureSourceManager::V1::ClosePullRequestRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, close_pull_request_client_stub.call_rpc_count - end - end - - def test_list_pull_request_file_diffs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_pull_request_file_diffs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_pull_request_file_diffs, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_pull_request_file_diffs_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_pull_request_file_diffs({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_pull_request_file_diffs name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_pull_request_file_diffs ::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_pull_request_file_diffs({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_pull_request_file_diffs(::Google::Cloud::SecureSourceManager::V1::ListPullRequestFileDiffsRequest.new(name: name, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_pull_request_file_diffs_client_stub.call_rpc_count - end - end - - def test_fetch_tree - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::FetchTreeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - repository = "hello world" - ref = "hello world" - recursive = true - page_size = 42 - page_token = "hello world" - - fetch_tree_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_tree, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest, request - assert_equal "hello world", request["repository"] - assert_equal "hello world", request["ref"] - assert_equal true, request["recursive"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_tree_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_tree({ repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.fetch_tree repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.fetch_tree ::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.fetch_tree({ repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.fetch_tree(::Google::Cloud::SecureSourceManager::V1::FetchTreeRequest.new(repository: repository, ref: ref, recursive: recursive, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_tree_client_stub.call_rpc_count - end - end - - def test_fetch_blob - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::FetchBlobResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - repository = "hello world" - sha = "hello world" - - fetch_blob_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_blob, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest, request - assert_equal "hello world", request["repository"] - assert_equal "hello world", request["sha"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_blob_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_blob({ repository: repository, sha: sha }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.fetch_blob repository: repository, sha: sha do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.fetch_blob ::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.fetch_blob({ repository: repository, sha: sha }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.fetch_blob(::Google::Cloud::SecureSourceManager::V1::FetchBlobRequest.new(repository: repository, sha: sha), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_blob_client_stub.call_rpc_count - end - end - - def test_create_issue - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - issue = {} - - create_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_issue, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Issue), request["issue"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_issue({ parent: parent, issue: issue }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_issue parent: parent, issue: issue do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_issue ::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_issue({ parent: parent, issue: issue }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_issue(::Google::Cloud::SecureSourceManager::V1::CreateIssueRequest.new(parent: parent, issue: issue), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_issue_client_stub.call_rpc_count - end - end - - def test_get_issue - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::Issue.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_issue, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_issue({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_issue name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_issue ::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_issue({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_issue(::Google::Cloud::SecureSourceManager::V1::GetIssueRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_issue_client_stub.call_rpc_count - end - end - - def test_list_issues - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListIssuesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_issues, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_issues_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_issues({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_issues parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_issues ::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_issues({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_issues(::Google::Cloud::SecureSourceManager::V1::ListIssuesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_issues_client_stub.call_rpc_count - end - end - - def test_update_issue - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - issue = {} - update_mask = {} - - update_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_issue, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::Issue), request["issue"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_issue({ issue: issue, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_issue issue: issue, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_issue ::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_issue({ issue: issue, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_issue(::Google::Cloud::SecureSourceManager::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_issue_client_stub.call_rpc_count - end - end - - def test_delete_issue - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_issue, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_issue({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_issue name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_issue ::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_issue({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_issue(::Google::Cloud::SecureSourceManager::V1::DeleteIssueRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_issue_client_stub.call_rpc_count - end - end - - def test_open_issue - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - open_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :open_issue, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, open_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.open_issue({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.open_issue name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.open_issue ::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.open_issue({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.open_issue(::Google::Cloud::SecureSourceManager::V1::OpenIssueRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, open_issue_client_stub.call_rpc_count - end - end - - def test_close_issue - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - close_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :close_issue, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, close_issue_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.close_issue({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.close_issue name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.close_issue ::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.close_issue({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.close_issue(::Google::Cloud::SecureSourceManager::V1::CloseIssueRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, close_issue_client_stub.call_rpc_count - end - end - - def test_get_pull_request_comment - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::PullRequestComment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_pull_request_comment, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_pull_request_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_pull_request_comment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_pull_request_comment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_pull_request_comment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::GetPullRequestCommentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_pull_request_comment_client_stub.call_rpc_count - end - end - - def test_list_pull_request_comments - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_pull_request_comments, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_pull_request_comments_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_pull_request_comments({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_pull_request_comments parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_pull_request_comments({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ListPullRequestCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_pull_request_comments_client_stub.call_rpc_count - end - end - - def test_create_pull_request_comment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - pull_request_comment = {} - - create_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_pull_request_comment, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequestComment), request["pull_request_comment"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_pull_request_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_pull_request_comment parent: parent, pull_request_comment: pull_request_comment do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_pull_request_comment({ parent: parent, pull_request_comment: pull_request_comment }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest.new(parent: parent, pull_request_comment: pull_request_comment), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_pull_request_comment_client_stub.call_rpc_count - end - end - - def test_update_pull_request_comment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - pull_request_comment = {} - update_mask = {} - - update_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_pull_request_comment, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::PullRequestComment), request["pull_request_comment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_pull_request_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_pull_request_comment pull_request_comment: pull_request_comment, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_pull_request_comment({ pull_request_comment: pull_request_comment, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::UpdatePullRequestCommentRequest.new(pull_request_comment: pull_request_comment, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_pull_request_comment_client_stub.call_rpc_count - end - end - - def test_delete_pull_request_comment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_pull_request_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_pull_request_comment, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_pull_request_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_pull_request_comment({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_pull_request_comment name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_pull_request_comment ::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_pull_request_comment({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_pull_request_comment(::Google::Cloud::SecureSourceManager::V1::DeletePullRequestCommentRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_pull_request_comment_client_stub.call_rpc_count - end - end - - def test_batch_create_pull_request_comments - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_create_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_pull_request_comments, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreatePullRequestCommentRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_pull_request_comments_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_create_pull_request_comments({ parent: parent, requests: requests }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_create_pull_request_comments parent: parent, requests: requests do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_create_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_create_pull_request_comments({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_create_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::BatchCreatePullRequestCommentsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_pull_request_comments_client_stub.call_rpc_count - end - end - - def test_resolve_pull_request_comments - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - names = ["hello world"] - auto_fill = true - - resolve_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :resolve_pull_request_comments, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["names"] - assert_equal true, request["auto_fill"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, resolve_pull_request_comments_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.resolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.resolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.resolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.resolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::ResolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, resolve_pull_request_comments_client_stub.call_rpc_count - end - end - - def test_unresolve_pull_request_comments - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - names = ["hello world"] - auto_fill = true - - unresolve_pull_request_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :unresolve_pull_request_comments, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["names"] - assert_equal true, request["auto_fill"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, unresolve_pull_request_comments_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.unresolve_pull_request_comments parent: parent, names: names, auto_fill: auto_fill do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.unresolve_pull_request_comments ::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.unresolve_pull_request_comments({ parent: parent, names: names, auto_fill: auto_fill }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.unresolve_pull_request_comments(::Google::Cloud::SecureSourceManager::V1::UnresolvePullRequestCommentsRequest.new(parent: parent, names: names, auto_fill: auto_fill), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, unresolve_pull_request_comments_client_stub.call_rpc_count - end - end - - def test_create_issue_comment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - issue_comment = {} - - create_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_issue_comment, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::IssueComment), request["issue_comment"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_issue_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_issue_comment({ parent: parent, issue_comment: issue_comment }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_issue_comment parent: parent, issue_comment: issue_comment do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_issue_comment ::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_issue_comment({ parent: parent, issue_comment: issue_comment }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_issue_comment(::Google::Cloud::SecureSourceManager::V1::CreateIssueCommentRequest.new(parent: parent, issue_comment: issue_comment), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_issue_comment_client_stub.call_rpc_count - end - end - - def test_get_issue_comment - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::IssueComment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_issue_comment, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_issue_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_issue_comment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_issue_comment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_issue_comment ::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_issue_comment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_issue_comment(::Google::Cloud::SecureSourceManager::V1::GetIssueCommentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_issue_comment_client_stub.call_rpc_count - end - end - - def test_list_issue_comments - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_issue_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_issue_comments, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_issue_comments_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_issue_comments({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_issue_comments parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_issue_comments ::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_issue_comments({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_issue_comments(::Google::Cloud::SecureSourceManager::V1::ListIssueCommentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_issue_comments_client_stub.call_rpc_count - end - end - - def test_update_issue_comment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - issue_comment = {} - update_mask = {} - - update_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_issue_comment, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecureSourceManager::V1::IssueComment), request["issue_comment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_issue_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_issue_comment issue_comment: issue_comment, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_issue_comment ::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_issue_comment({ issue_comment: issue_comment, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_issue_comment(::Google::Cloud::SecureSourceManager::V1::UpdateIssueCommentRequest.new(issue_comment: issue_comment, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_issue_comment_client_stub.call_rpc_count - end - end - - def test_delete_issue_comment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_issue_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_issue_comment, name - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_issue_comment_client_stub do - # Create client - c = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_issue_comment({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_issue_comment name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_issue_comment ::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_issue_comment({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_issue_comment(::Google::Cloud::SecureSourceManager::V1::DeleteIssueCommentRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_issue_comment_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::SecureSourceManager::V1::SecureSourceManager::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-secure_source_manager-v1/test/helper.rb b/owl-bot-staging/google-cloud-secure_source_manager-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-secure_source_manager-v1/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-v1/.gitignore b/owl-bot-staging/google-cloud-security-private_ca-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/.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-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-security-private_ca-v1/.repo-metadata.json deleted file mode 100644 index f7ac3d34f8c4..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/.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-v1/latest", - "distribution_name": "google-cloud-security-private_ca-v1", - "is_cloud": true, - "language": "ruby", - "name": "privateca", - "name_pretty": "Certificate Authority Service V1 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). Note that google-cloud-security-private_ca-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security-private_ca instead. See the readme for more details.", - "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-v1/.rubocop.yml b/owl-bot-staging/google-cloud-security-private_ca-v1/.rubocop.yml deleted file mode 100644 index f143186a635f..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security-private_ca-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-security-private_ca-v1.rb" diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/.toys.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/.yardopts b/owl-bot-staging/google-cloud-security-private_ca-v1/.yardopts deleted file mode 100644 index 4cd4bdadd755..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Certificate Authority Service V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security-private_ca-v1/AUTHENTICATION.md deleted file mode 100644 index b0dc4d853281..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security-private_ca-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-security-private_ca-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/security/private_ca/v1" - -client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new 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/v1" - -::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-security-private_ca-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/security/private_ca/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-security-private_ca-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/Gemfile b/owl-bot-staging/google-cloud-security-private_ca-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-v1/LICENSE.md b/owl-bot-staging/google-cloud-security-private_ca-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/README.md b/owl-bot-staging/google-cloud-security-private_ca-v1/README.md deleted file mode 100644 index de3b38eef2b3..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Certificate Authority Service V1 API - -The Certificate Authority Service API is a highly-available, scalable service that enables you to simplify and automate the management of private certificate authorities (CAs) while staying in control of your private keys. - -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). - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Certificate Authority Service V1 API. Most users should consider using -the main client gem, -[google-cloud-security-private_ca](https://rubygems.org/gems/google-cloud-security-private_ca). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-security-private_ca-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/privateca.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/security/private_ca/v1" - -client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new -request = ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new # (request fields as keyword arguments...) -response = client.create_certificate request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/certificate-authority-service/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/security/private_ca/v1" -require "logger" - -client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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-v1/Rakefile b/owl-bot-staging/google-cloud-security-private_ca-v1/Rakefile deleted file mode 100644 index bb7b3d9c8032..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-security-private_ca-v1 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-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security-private_ca-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security-private_ca-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-security-private_ca-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security-private_ca-v1" - header "google-cloud-security-private_ca-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security-private_ca-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security-private_ca-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-security-private_ca-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-security-private_ca-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-security-private_ca-v1/gapic_metadata.json deleted file mode 100644 index a3ae1a7a8d29..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/gapic_metadata.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.security.privateca.v1", - "libraryPackage": "::Google::Cloud::Security::PrivateCA::V1", - "services": { - "CertificateAuthorityService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client", - "rpcs": { - "CreateCertificate": { - "methods": [ - "create_certificate" - ] - }, - "GetCertificate": { - "methods": [ - "get_certificate" - ] - }, - "ListCertificates": { - "methods": [ - "list_certificates" - ] - }, - "RevokeCertificate": { - "methods": [ - "revoke_certificate" - ] - }, - "UpdateCertificate": { - "methods": [ - "update_certificate" - ] - }, - "ActivateCertificateAuthority": { - "methods": [ - "activate_certificate_authority" - ] - }, - "CreateCertificateAuthority": { - "methods": [ - "create_certificate_authority" - ] - }, - "DisableCertificateAuthority": { - "methods": [ - "disable_certificate_authority" - ] - }, - "EnableCertificateAuthority": { - "methods": [ - "enable_certificate_authority" - ] - }, - "FetchCertificateAuthorityCsr": { - "methods": [ - "fetch_certificate_authority_csr" - ] - }, - "GetCertificateAuthority": { - "methods": [ - "get_certificate_authority" - ] - }, - "ListCertificateAuthorities": { - "methods": [ - "list_certificate_authorities" - ] - }, - "UndeleteCertificateAuthority": { - "methods": [ - "undelete_certificate_authority" - ] - }, - "DeleteCertificateAuthority": { - "methods": [ - "delete_certificate_authority" - ] - }, - "UpdateCertificateAuthority": { - "methods": [ - "update_certificate_authority" - ] - }, - "CreateCaPool": { - "methods": [ - "create_ca_pool" - ] - }, - "UpdateCaPool": { - "methods": [ - "update_ca_pool" - ] - }, - "GetCaPool": { - "methods": [ - "get_ca_pool" - ] - }, - "ListCaPools": { - "methods": [ - "list_ca_pools" - ] - }, - "DeleteCaPool": { - "methods": [ - "delete_ca_pool" - ] - }, - "FetchCaCerts": { - "methods": [ - "fetch_ca_certs" - ] - }, - "GetCertificateRevocationList": { - "methods": [ - "get_certificate_revocation_list" - ] - }, - "ListCertificateRevocationLists": { - "methods": [ - "list_certificate_revocation_lists" - ] - }, - "UpdateCertificateRevocationList": { - "methods": [ - "update_certificate_revocation_list" - ] - }, - "CreateCertificateTemplate": { - "methods": [ - "create_certificate_template" - ] - }, - "DeleteCertificateTemplate": { - "methods": [ - "delete_certificate_template" - ] - }, - "GetCertificateTemplate": { - "methods": [ - "get_certificate_template" - ] - }, - "ListCertificateTemplates": { - "methods": [ - "list_certificate_templates" - ] - }, - "UpdateCertificateTemplate": { - "methods": [ - "update_certificate_template" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/google-cloud-security-private_ca-v1.gemspec b/owl-bot-staging/google-cloud-security-private_ca-v1/google-cloud-security-private_ca-v1.gemspec deleted file mode 100644 index 07003500a08f..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/google-cloud-security-private_ca-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security/private_ca/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security-private_ca-v1" - gem.version = Google::Cloud::Security::PrivateCA::V1::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). Note that google-cloud-security-private_ca-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security-private_ca instead. See the readme for more details." - gem.summary = "The Certificate Authority Service API is a highly-available, scalable service that enables you to simplify and automate the management of private certificate authorities (CAs) while staying in control of your private keys." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.rb deleted file mode 100644 index ec80d7546971..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google-cloud-security-private_ca-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/security/private_ca/v1" diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.rb deleted file mode 100644 index 2dcf3038bbe3..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security/private_ca/v1/certificate_authority_service" -require "google/cloud/security/private_ca/v1/version" - -module Google - module Cloud - module Security - module PrivateCA - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/security/private_ca/v1" - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/security/private_ca/v1" - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/security/private_ca/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.rb deleted file mode 100644 index f9fc3eab4e89..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/bindings_override.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 "gapic/rest" - -module Google - module Cloud - module Security - module PrivateCA - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/security/private_ca/v1/rest" - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Security", "PrivateCA"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb deleted file mode 100644 index 780346978920..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security/private_ca/v1/version" - -require "google/cloud/security/private_ca/v1/certificate_authority_service/credentials" -require "google/cloud/security/private_ca/v1/certificate_authority_service/paths" -require "google/cloud/security/private_ca/v1/certificate_authority_service/operations" -require "google/cloud/security/private_ca/v1/certificate_authority_service/client" -require "google/cloud/security/private_ca/v1/certificate_authority_service/rest" - -module Google - module Cloud - module Security - module PrivateCA - module V1 - ## - # [Certificate Authority - # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] - # manages private certificate authorities and issued certificates. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/security/private_ca/v1/certificate_authority_service" - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/security/private_ca/v1/certificate_authority_service/rest" - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - module CertificateAuthorityService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "certificate_authority_service", "helpers.rb" -require "google/cloud/security/private_ca/v1/certificate_authority_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb deleted file mode 100644 index 29c542d7d4b1..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/client.rb +++ /dev/null @@ -1,3815 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/security/privateca/v1/service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Security - module PrivateCA - module V1 - module CertificateAuthorityService - ## - # Client for the CertificateAuthorityService service. - # - # [Certificate Authority - # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] - # manages private certificate authorities and issued certificates. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :certificate_authority_service_stub - - ## - # Configure the CertificateAuthorityService Client class. - # - # See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CertificateAuthorityService clients - # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Security", "PrivateCA", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CertificateAuthorityService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @certificate_authority_service_stub.universe_domain - end - - ## - # Create a new CertificateAuthorityService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CertificateAuthorityService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/security/privateca/v1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @certificate_authority_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @certificate_authority_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @certificate_authority_service_stub.endpoint - config.universe_domain = @certificate_authority_service_stub.universe_domain - config.logger = @certificate_authority_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @certificate_authority_service_stub.endpoint - config.universe_domain = @certificate_authority_service_stub.universe_domain - config.logger = @certificate_authority_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @certificate_authority_service_stub.logger - end - - # Service calls - - ## - # Create a new {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} - # in a given Project, Location from a particular - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # - # @overload create_certificate(request, options = nil) - # Pass arguments to `create_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil, validate_only: nil, issuing_certificate_authority_id: nil) - # Pass arguments to `create_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}, in the - # format `projects/*/locations/*/caPools/*`. - # @param certificate_id [::String] - # Optional. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the Enterprise - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#tier CertificateAuthority.tier}, - # but is optional and its value is ignored otherwise. - # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash] - # Required. A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} - # with initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request ID, - # the server can check if original operation with the same request ID was - # received, and if so, will ignore the second request. This prevents clients - # from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If this is true, no - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} resource will - # be persisted regardless of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s - # {::Google::Cloud::Security::PrivateCA::V1::CaPool#tier tier}, and the returned - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} will not - # contain the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate#pem_certificate pem_certificate} - # field. - # @param issuing_certificate_authority_id [::String] - # Optional. The resource ID of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # that should issue the certificate. This optional field will ignore the - # load-balancing scheme of the Pool and directly issue the certificate from - # the CA with the specified ID, contained in the same - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} referenced by `parent`. - # Per-CA quota rules apply. If left empty, a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # will be chosen from the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} - # by the service. For example, to issue a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} from a - # Certificate Authority with resource name - # "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", - # you can set the - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#parent parent} - # to "projects/my-project/locations/us-central1/caPools/my-pool" and the - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#issuing_certificate_authority_id issuing_certificate_authority_id} - # to "my-ca". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new - # - # # Call the create_certificate method. - # result = client.create_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - # p result - # - def create_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :create_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. - # - # @overload get_certificate(request, options = nil) - # Pass arguments to `get_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_certificate(name: nil) - # Pass arguments to `get_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1::Certificate#name name} - # of the {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} to - # get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new - # - # # Call the get_certificate method. - # result = client.get_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - # p result - # - def get_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :get_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. - # - # @overload list_certificates(request, options = nil) - # Pass arguments to `list_certificates` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent associated with the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}, in the - # format `projects/*/locations/*/caPools/*`. The parent resource name can be - # in one of two forms: - # - # 1. **Specific CA Pool:** To list certificates within a single CA Pool: - # `projects/*/locations/*/caPools/*` - # - # 2. **All CA Pools in a Location:** To list certificates across *all* CA - # Pools in a given project and location, use the wildcard character (`-`) - # in place of the CA Pool ID. - # Example: `projects/*/locations/*/caPools/-` - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} to include - # in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} can - # subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. For - # details on supported filters and syntax, see [Certificates Filtering - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). - # @param order_by [::String] - # Optional. Specify how the results should be sorted. For details on - # supported fields and syntax, see [Certificates Sorting - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::Certificate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::Certificate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new - # - # # Call the list_certificates method. - # result = client.list_certificates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::Certificate. - # p item - # end - # - def list_certificates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_certificates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_certificates.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_certificates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :list_certificates, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificates, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Revoke a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. - # - # @overload revoke_certificate(request, options = nil) - # Pass arguments to `revoke_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload revoke_certificate(name: nil, reason: nil, request_id: nil) - # Pass arguments to `revoke_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the format - # `projects/*/locations/*/caPools/*/certificates/*`. - # @param reason [::Google::Cloud::Security::PrivateCA::V1::RevocationReason] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::RevocationReason RevocationReason} for - # revoking this certificate. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new - # - # # Call the revoke_certificate method. - # result = client.revoke_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - # p result - # - def revoke_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.revoke_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.revoke_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :revoke_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. - # Currently, the only field you can update is the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate#labels labels} field. - # - # @overload update_certificate(request, options = nil) - # Pass arguments to `update_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_certificate(certificate: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash] - # Required. {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} - # with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new - # - # # Call the update_certificate method. - # result = client.update_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - # p result - # - def update_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.certificate&.name - header_params["certificate.name"] = request.certificate.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :update_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Activate a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # that is in state - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION} - # and is of type - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. - # After the parent Certificate Authority signs a certificate signing request - # from - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr FetchCertificateAuthorityCsr}, - # this method can complete the activation process. - # - # @overload activate_certificate_authority(request, options = nil) - # Pass arguments to `activate_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil) - # Pass arguments to `activate_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param pem_ca_certificate [::String] - # Required. The signed CA certificate issued from - # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. - # @param subordinate_config [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig, ::Hash] - # Required. Must include information about the issuer of - # 'pem_ca_certificate', and any further issuers until the self-signed CA. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new - # - # # Call the activate_certificate_authority method. - # result = client.activate_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def activate_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.activate_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.activate_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :activate_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a new - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in a given Project and Location. - # - # @overload create_certificate_authority(request, options = nil) - # Pass arguments to `create_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil) - # Pass arguments to `create_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, - # in the format `projects/*/locations/*/caPools/*`. - # @param certificate_authority_id [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash] - # Required. A - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # with initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new - # - # # Call the create_certificate_authority method. - # result = client.create_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :create_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # - # @overload disable_certificate_authority(request, options = nil) - # Pass arguments to `disable_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload disable_certificate_authority(name: nil, request_id: nil, ignore_dependent_resources: nil) - # Pass arguments to `disable_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param ignore_dependent_resources [::Boolean] - # Optional. This field allows this CA to be disabled even if it's being - # depended on by another resource. However, doing so may result in unintended - # and unrecoverable effects on any dependent resources since the CA will - # no longer be able to issue certificates. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new - # - # # Call the disable_certificate_authority method. - # result = client.disable_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def disable_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.disable_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :disable_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # - # @overload enable_certificate_authority(request, options = nil) - # Pass arguments to `enable_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enable_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `enable_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new - # - # # Call the enable_certificate_authority method. - # result = client.enable_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def enable_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enable_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :enable_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch a certificate signing request (CSR) from a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # that is in state - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION} - # and is of type - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. - # The CSR must then be signed by the desired parent Certificate Authority, - # which could be another - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # resource, or could be an on-prem certificate authority. See also - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#activate_certificate_authority ActivateCertificateAuthority}. - # - # @overload fetch_certificate_authority_csr(request, options = nil) - # Pass arguments to `fetch_certificate_authority_csr` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_certificate_authority_csr(name: nil) - # Pass arguments to `fetch_certificate_authority_csr` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new - # - # # Call the fetch_certificate_authority_csr method. - # result = client.fetch_certificate_authority_csr request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse. - # p result - # - def fetch_certificate_authority_csr request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_certificate_authority_csr.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :fetch_certificate_authority_csr, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # - # @overload get_certificate_authority(request, options = nil) - # Pass arguments to `get_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_certificate_authority(name: nil) - # Pass arguments to `get_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new - # - # # Call the get_certificate_authority method. - # result = client.get_certificate_authority request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. - # p result - # - def get_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :get_certificate_authority, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}. - # - # @overload list_certificate_authorities(request, options = nil) - # Pass arguments to `list_certificate_authorities` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_certificate_authorities(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_authorities` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, - # in the format `projects/*/locations/*/caPools/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} - # to include in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new - # - # # Call the list_certificate_authorities method. - # result = client.list_certificate_authorities request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. - # p item - # end - # - def list_certificate_authorities request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_certificate_authorities.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_certificate_authorities.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :list_certificate_authorities, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_authorities, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undelete a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # that has been deleted. - # - # @overload undelete_certificate_authority(request, options = nil) - # Pass arguments to `undelete_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undelete_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `undelete_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new - # - # # Call the undelete_certificate_authority method. - # result = client.undelete_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undelete_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undelete_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.undelete_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undelete_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :undelete_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # - # @overload delete_certificate_authority(request, options = nil) - # Pass arguments to `delete_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_certificate_authority(name: nil, request_id: nil, ignore_active_certificates: nil, skip_grace_period: nil, ignore_dependent_resources: nil) - # Pass arguments to `delete_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param ignore_active_certificates [::Boolean] - # Optional. This field allows the CA to be deleted even if the CA has - # active certs. Active certs include both unrevoked and unexpired certs. - # @param skip_grace_period [::Boolean] - # Optional. If this flag is set, the Certificate Authority will be deleted as - # soon as possible without a 30-day grace period where undeletion would have - # been allowed. If you proceed, there will be no way to recover this CA. - # @param ignore_dependent_resources [::Boolean] - # Optional. This field allows this CA to be deleted even if it's being - # depended on by another resource. However, doing so may result in unintended - # and unrecoverable effects on any dependent resources since the CA will - # no longer be able to issue certificates. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new - # - # # Call the delete_certificate_authority method. - # result = client.delete_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :delete_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # - # @overload update_certificate_authority(request, options = nil) - # Pass arguments to `update_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_certificate_authority(certificate_authority: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash] - # Required. - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new - # - # # Call the update_certificate_authority method. - # result = client.update_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.certificate_authority&.name - header_params["certificate_authority.name"] = request.certificate_authority.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :update_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # - # @overload create_ca_pool(request, options = nil) - # Pass arguments to `create_ca_pool` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_ca_pool(parent: nil, ca_pool_id: nil, ca_pool: nil, request_id: nil) - # Pass arguments to `create_ca_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}, in the format - # `projects/*/locations/*`. - # @param ca_pool_id [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash] - # Required. A {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with - # initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new - # - # # Call the create_ca_pool method. - # result = client.create_ca_pool request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_ca_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_ca_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_ca_pool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_ca_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :create_ca_pool, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # - # @overload update_ca_pool(request, options = nil) - # Pass arguments to `update_ca_pool` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_ca_pool(ca_pool: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_ca_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash] - # Required. {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with updated - # values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new - # - # # Call the update_ca_pool method. - # result = client.update_ca_pool request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_ca_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_ca_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.ca_pool&.name - header_params["ca_pool.name"] = request.ca_pool.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_ca_pool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_ca_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :update_ca_pool, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # - # @overload get_ca_pool(request, options = nil) - # Pass arguments to `get_ca_pool` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_ca_pool(name: nil) - # Pass arguments to `get_ca_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1::CaPool#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::CaPool] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new - # - # # Call the get_ca_pool method. - # result = client.get_ca_pool request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CaPool. - # p result - # - def get_ca_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_ca_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_ca_pool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_ca_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :get_ca_pool, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}. - # - # @overload list_ca_pools(request, options = nil) - # Pass arguments to `list_ca_pools` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_ca_pools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_ca_pools` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}, in the format - # `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} to include in the - # response. Further {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} can - # subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CaPool>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CaPool>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new - # - # # Call the list_ca_pools method. - # result = client.list_ca_pools request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CaPool. - # p item - # end - # - def list_ca_pools request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_ca_pools.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_ca_pools.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_ca_pools.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :list_ca_pools, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_ca_pools, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # - # @overload delete_ca_pool(request, options = nil) - # Pass arguments to `delete_ca_pool` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_ca_pool(name: nil, request_id: nil, ignore_dependent_resources: nil) - # Pass arguments to `delete_ca_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format - # `projects/*/locations/*/caPools/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param ignore_dependent_resources [::Boolean] - # Optional. This field allows this pool to be deleted even if it's being - # depended on by another resource. However, doing so may result in unintended - # and unrecoverable effects on any dependent resources since the pool will - # no longer be able to issue certificates. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new - # - # # Call the delete_ca_pool method. - # result = client.delete_ca_pool request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_ca_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_ca_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_ca_pool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_ca_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :delete_ca_pool, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchCaCerts returns the current trust anchor for the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. This will include CA - # certificate chains for all certificate authorities in the ENABLED, - # DISABLED, or STAGED states. - # - # @overload fetch_ca_certs(request, options = nil) - # Pass arguments to `fetch_ca_certs` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_ca_certs(ca_pool: nil, request_id: nil) - # Pass arguments to `fetch_ca_certs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param ca_pool [::String] - # Required. The resource name for the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format - # `projects/*/locations/*/caPools/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new - # - # # Call the fetch_ca_certs method. - # result = client.fetch_ca_certs request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse. - # p result - # - def fetch_ca_certs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_ca_certs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.ca_pool - header_params["ca_pool"] = request.ca_pool - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_ca_certs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_ca_certs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :fetch_ca_certs, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. - # - # @overload get_certificate_revocation_list(request, options = nil) - # Pass arguments to `get_certificate_revocation_list` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_certificate_revocation_list(name: nil) - # Pass arguments to `get_certificate_revocation_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList#name name} - # of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new - # - # # Call the get_certificate_revocation_list method. - # result = client.get_certificate_revocation_list request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. - # p result - # - def get_certificate_revocation_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_certificate_revocation_list.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :get_certificate_revocation_list, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}. - # - # @overload list_certificate_revocation_lists(request, options = nil) - # Pass arguments to `list_certificate_revocation_lists` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_certificate_revocation_lists(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_revocation_lists` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}, - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} - # to include in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new - # - # # Call the list_certificate_revocation_lists method. - # result = client.list_certificate_revocation_lists request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. - # p item - # end - # - def list_certificate_revocation_lists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_certificate_revocation_lists.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :list_certificate_revocation_lists, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_revocation_lists, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. - # - # @overload update_certificate_revocation_list(request, options = nil) - # Pass arguments to `update_certificate_revocation_list` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_certificate_revocation_list(certificate_revocation_list: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate_revocation_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_revocation_list [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList, ::Hash] - # Required. - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new - # - # # Call the update_certificate_revocation_list method. - # result = client.update_certificate_revocation_list request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_certificate_revocation_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_certificate_revocation_list.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.certificate_revocation_list&.name - header_params["certificate_revocation_list.name"] = request.certificate_revocation_list.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :update_certificate_revocation_list, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a new - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # in a given Project and Location. - # - # @overload create_certificate_template(request, options = nil) - # Pass arguments to `create_certificate_template` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_certificate_template(parent: nil, certificate_template_id: nil, certificate_template: nil, request_id: nil) - # Pass arguments to `create_certificate_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}, - # in the format `projects/*/locations/*`. - # @param certificate_template_id [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash] - # Required. A - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # with initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new - # - # # Call the create_certificate_template method. - # result = client.create_certificate_template request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_certificate_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_certificate_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_certificate_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_certificate_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :create_certificate_template, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # DeleteCertificateTemplate deletes a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. - # - # @overload delete_certificate_template(request, options = nil) - # Pass arguments to `delete_certificate_template` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_certificate_template(name: nil, request_id: nil) - # Pass arguments to `delete_certificate_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # in the format `projects/*/locations/*/certificateTemplates/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new - # - # # Call the delete_certificate_template method. - # result = client.delete_certificate_template request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_certificate_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_certificate_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_certificate_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_certificate_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :delete_certificate_template, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. - # - # @overload get_certificate_template(request, options = nil) - # Pass arguments to `get_certificate_template` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_certificate_template(name: nil) - # Pass arguments to `get_certificate_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new - # - # # Call the get_certificate_template method. - # result = client.get_certificate_template request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. - # p result - # - def get_certificate_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_certificate_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_certificate_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_certificate_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :get_certificate_template, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}. - # - # @overload list_certificate_templates(request, options = nil) - # Pass arguments to `list_certificate_templates` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_certificate_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_templates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}, - # in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} - # to include in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new - # - # # Call the list_certificate_templates method. - # result = client.list_certificate_templates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. - # p item - # end - # - def list_certificate_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_certificate_templates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_certificate_templates.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_certificate_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :list_certificate_templates, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_templates, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. - # - # @overload update_certificate_template(request, options = nil) - # Pass arguments to `update_certificate_template` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_certificate_template(certificate_template: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash] - # Required. - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new - # - # # Call the update_certificate_template method. - # result = client.update_certificate_template request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_certificate_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_certificate_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.certificate_template&.name - header_params["certificate_template.name"] = request.certificate_template.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_certificate_template.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_certificate_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :update_certificate_template, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CertificateAuthorityService API. - # - # This class represents the configuration for CertificateAuthorityService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_certificate to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_certificate.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_certificate.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "privateca.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CertificateAuthorityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate - ## - # RPC-specific configuration for `get_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate - ## - # RPC-specific configuration for `list_certificates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificates - ## - # RPC-specific configuration for `revoke_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :revoke_certificate - ## - # RPC-specific configuration for `update_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate - ## - # RPC-specific configuration for `activate_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :activate_certificate_authority - ## - # RPC-specific configuration for `create_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_authority - ## - # RPC-specific configuration for `disable_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_certificate_authority - ## - # RPC-specific configuration for `enable_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_certificate_authority - ## - # RPC-specific configuration for `fetch_certificate_authority_csr` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_certificate_authority_csr - ## - # RPC-specific configuration for `get_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_authority - ## - # RPC-specific configuration for `list_certificate_authorities` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_authorities - ## - # RPC-specific configuration for `undelete_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_certificate_authority - ## - # RPC-specific configuration for `delete_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate_authority - ## - # RPC-specific configuration for `update_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_authority - ## - # RPC-specific configuration for `create_ca_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :create_ca_pool - ## - # RPC-specific configuration for `update_ca_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :update_ca_pool - ## - # RPC-specific configuration for `get_ca_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :get_ca_pool - ## - # RPC-specific configuration for `list_ca_pools` - # @return [::Gapic::Config::Method] - # - attr_reader :list_ca_pools - ## - # RPC-specific configuration for `delete_ca_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_ca_pool - ## - # RPC-specific configuration for `fetch_ca_certs` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_ca_certs - ## - # RPC-specific configuration for `get_certificate_revocation_list` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_revocation_list - ## - # RPC-specific configuration for `list_certificate_revocation_lists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_revocation_lists - ## - # RPC-specific configuration for `update_certificate_revocation_list` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_revocation_list - ## - # RPC-specific configuration for `create_certificate_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_template - ## - # RPC-specific configuration for `delete_certificate_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate_template - ## - # RPC-specific configuration for `get_certificate_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_template - ## - # RPC-specific configuration for `list_certificate_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_templates - ## - # RPC-specific configuration for `update_certificate_template` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_template - - # @private - def initialize parent_rpcs = nil - create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate - @create_certificate = ::Gapic::Config::Method.new create_certificate_config - get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate - @get_certificate = ::Gapic::Config::Method.new get_certificate_config - list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates - @list_certificates = ::Gapic::Config::Method.new list_certificates_config - revoke_certificate_config = parent_rpcs.revoke_certificate if parent_rpcs.respond_to? :revoke_certificate - @revoke_certificate = ::Gapic::Config::Method.new revoke_certificate_config - update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate - @update_certificate = ::Gapic::Config::Method.new update_certificate_config - activate_certificate_authority_config = parent_rpcs.activate_certificate_authority if parent_rpcs.respond_to? :activate_certificate_authority - @activate_certificate_authority = ::Gapic::Config::Method.new activate_certificate_authority_config - create_certificate_authority_config = parent_rpcs.create_certificate_authority if parent_rpcs.respond_to? :create_certificate_authority - @create_certificate_authority = ::Gapic::Config::Method.new create_certificate_authority_config - disable_certificate_authority_config = parent_rpcs.disable_certificate_authority if parent_rpcs.respond_to? :disable_certificate_authority - @disable_certificate_authority = ::Gapic::Config::Method.new disable_certificate_authority_config - enable_certificate_authority_config = parent_rpcs.enable_certificate_authority if parent_rpcs.respond_to? :enable_certificate_authority - @enable_certificate_authority = ::Gapic::Config::Method.new enable_certificate_authority_config - fetch_certificate_authority_csr_config = parent_rpcs.fetch_certificate_authority_csr if parent_rpcs.respond_to? :fetch_certificate_authority_csr - @fetch_certificate_authority_csr = ::Gapic::Config::Method.new fetch_certificate_authority_csr_config - get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority - @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config - list_certificate_authorities_config = parent_rpcs.list_certificate_authorities if parent_rpcs.respond_to? :list_certificate_authorities - @list_certificate_authorities = ::Gapic::Config::Method.new list_certificate_authorities_config - undelete_certificate_authority_config = parent_rpcs.undelete_certificate_authority if parent_rpcs.respond_to? :undelete_certificate_authority - @undelete_certificate_authority = ::Gapic::Config::Method.new undelete_certificate_authority_config - delete_certificate_authority_config = parent_rpcs.delete_certificate_authority if parent_rpcs.respond_to? :delete_certificate_authority - @delete_certificate_authority = ::Gapic::Config::Method.new delete_certificate_authority_config - update_certificate_authority_config = parent_rpcs.update_certificate_authority if parent_rpcs.respond_to? :update_certificate_authority - @update_certificate_authority = ::Gapic::Config::Method.new update_certificate_authority_config - create_ca_pool_config = parent_rpcs.create_ca_pool if parent_rpcs.respond_to? :create_ca_pool - @create_ca_pool = ::Gapic::Config::Method.new create_ca_pool_config - update_ca_pool_config = parent_rpcs.update_ca_pool if parent_rpcs.respond_to? :update_ca_pool - @update_ca_pool = ::Gapic::Config::Method.new update_ca_pool_config - get_ca_pool_config = parent_rpcs.get_ca_pool if parent_rpcs.respond_to? :get_ca_pool - @get_ca_pool = ::Gapic::Config::Method.new get_ca_pool_config - list_ca_pools_config = parent_rpcs.list_ca_pools if parent_rpcs.respond_to? :list_ca_pools - @list_ca_pools = ::Gapic::Config::Method.new list_ca_pools_config - delete_ca_pool_config = parent_rpcs.delete_ca_pool if parent_rpcs.respond_to? :delete_ca_pool - @delete_ca_pool = ::Gapic::Config::Method.new delete_ca_pool_config - fetch_ca_certs_config = parent_rpcs.fetch_ca_certs if parent_rpcs.respond_to? :fetch_ca_certs - @fetch_ca_certs = ::Gapic::Config::Method.new fetch_ca_certs_config - get_certificate_revocation_list_config = parent_rpcs.get_certificate_revocation_list if parent_rpcs.respond_to? :get_certificate_revocation_list - @get_certificate_revocation_list = ::Gapic::Config::Method.new get_certificate_revocation_list_config - list_certificate_revocation_lists_config = parent_rpcs.list_certificate_revocation_lists if parent_rpcs.respond_to? :list_certificate_revocation_lists - @list_certificate_revocation_lists = ::Gapic::Config::Method.new list_certificate_revocation_lists_config - update_certificate_revocation_list_config = parent_rpcs.update_certificate_revocation_list if parent_rpcs.respond_to? :update_certificate_revocation_list - @update_certificate_revocation_list = ::Gapic::Config::Method.new update_certificate_revocation_list_config - create_certificate_template_config = parent_rpcs.create_certificate_template if parent_rpcs.respond_to? :create_certificate_template - @create_certificate_template = ::Gapic::Config::Method.new create_certificate_template_config - delete_certificate_template_config = parent_rpcs.delete_certificate_template if parent_rpcs.respond_to? :delete_certificate_template - @delete_certificate_template = ::Gapic::Config::Method.new delete_certificate_template_config - get_certificate_template_config = parent_rpcs.get_certificate_template if parent_rpcs.respond_to? :get_certificate_template - @get_certificate_template = ::Gapic::Config::Method.new get_certificate_template_config - list_certificate_templates_config = parent_rpcs.list_certificate_templates if parent_rpcs.respond_to? :list_certificate_templates - @list_certificate_templates = ::Gapic::Config::Method.new list_certificate_templates_config - update_certificate_template_config = parent_rpcs.update_certificate_template if parent_rpcs.respond_to? :update_certificate_template - @update_certificate_template = ::Gapic::Config::Method.new update_certificate_template_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.rb deleted file mode 100644 index 47ad11aa913e..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/credentials.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Security - module PrivateCA - module V1 - module CertificateAuthorityService - # Credentials for the CertificateAuthorityService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "PRIVATE_CA_CREDENTIALS", - "PRIVATE_CA_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "PRIVATE_CA_CREDENTIALS_JSON", - "PRIVATE_CA_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb deleted file mode 100644 index 23f248bdc84e..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/operations.rb +++ /dev/null @@ -1,845 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Security - module PrivateCA - module V1 - module CertificateAuthorityService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CertificateAuthorityService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CertificateAuthorityService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "privateca.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb deleted file mode 100644 index 57c61d556fb1..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/paths.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - module CertificateAuthorityService - # Path helper methods for the CertificateAuthorityService API. - module Paths - ## - # Create a fully-qualified CaPool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/caPools/{ca_pool}` - # - # @param project [String] - # @param location [String] - # @param ca_pool [String] - # - # @return [::String] - def ca_pool_path project:, location:, ca_pool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/caPools/#{ca_pool}" - end - - ## - # Create a fully-qualified Certificate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}` - # - # @param project [String] - # @param location [String] - # @param ca_pool [String] - # @param certificate [String] - # - # @return [::String] - def certificate_path project:, location:, ca_pool:, certificate: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "ca_pool cannot contain /" if ca_pool.to_s.include? "/" - - "projects/#{project}/locations/#{location}/caPools/#{ca_pool}/certificates/#{certificate}" - end - - ## - # Create a fully-qualified CertificateAuthority resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}` - # - # @param project [String] - # @param location [String] - # @param ca_pool [String] - # @param certificate_authority [String] - # - # @return [::String] - def certificate_authority_path project:, location:, ca_pool:, certificate_authority: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "ca_pool cannot contain /" if ca_pool.to_s.include? "/" - - "projects/#{project}/locations/#{location}/caPools/#{ca_pool}/certificateAuthorities/#{certificate_authority}" - end - - ## - # Create a fully-qualified CertificateRevocationList resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}` - # - # @param project [String] - # @param location [String] - # @param ca_pool [String] - # @param certificate_authority [String] - # @param certificate_revocation_list [String] - # - # @return [::String] - def certificate_revocation_list_path project:, location:, ca_pool:, certificate_authority:, certificate_revocation_list: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "ca_pool cannot contain /" if ca_pool.to_s.include? "/" - raise ::ArgumentError, "certificate_authority cannot contain /" if certificate_authority.to_s.include? "/" - - "projects/#{project}/locations/#{location}/caPools/#{ca_pool}/certificateAuthorities/#{certificate_authority}/certificateRevocationLists/#{certificate_revocation_list}" - end - - ## - # Create a fully-qualified CertificateTemplate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/certificateTemplates/{certificate_template}` - # - # @param project [String] - # @param location [String] - # @param certificate_template [String] - # - # @return [::String] - def certificate_template_path project:, location:, certificate_template: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/certificateTemplates/#{certificate_template}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb deleted file mode 100644 index 04c2876adc55..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security/private_ca/v1/version" -require "google/cloud/security/private_ca/v1/bindings_override" - -require "google/cloud/security/private_ca/v1/certificate_authority_service/credentials" -require "google/cloud/security/private_ca/v1/certificate_authority_service/paths" -require "google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations" -require "google/cloud/security/private_ca/v1/certificate_authority_service/rest/client" - -module Google - module Cloud - module Security - module PrivateCA - module V1 - ## - # [Certificate Authority - # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] - # manages private certificate authorities and issued certificates. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/security/private_ca/v1/certificate_authority_service/rest" - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - module CertificateAuthorityService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/security/private_ca/v1/certificate_authority_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb deleted file mode 100644 index 840608d90785..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/client.rb +++ /dev/null @@ -1,3578 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/security/privateca/v1/service_pb" -require "google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Security - module PrivateCA - module V1 - module CertificateAuthorityService - module Rest - ## - # REST client for the CertificateAuthorityService service. - # - # [Certificate Authority - # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] - # manages private certificate authorities and issued certificates. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :certificate_authority_service_stub - - ## - # Configure the CertificateAuthorityService Client class. - # - # See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CertificateAuthorityService clients - # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Security", "PrivateCA", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CertificateAuthorityService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @certificate_authority_service_stub.universe_domain - end - - ## - # Create a new CertificateAuthorityService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CertificateAuthorityService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @certificate_authority_service_stub = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @certificate_authority_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @certificate_authority_service_stub.endpoint - config.universe_domain = @certificate_authority_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @certificate_authority_service_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @certificate_authority_service_stub.endpoint - config.universe_domain = @certificate_authority_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @certificate_authority_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @certificate_authority_service_stub.logger - end - - # Service calls - - ## - # Create a new {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} - # in a given Project, Location from a particular - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # - # @overload create_certificate(request, options = nil) - # Pass arguments to `create_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil, validate_only: nil, issuing_certificate_authority_id: nil) - # Pass arguments to `create_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}, in the - # format `projects/*/locations/*/caPools/*`. - # @param certificate_id [::String] - # Optional. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the Enterprise - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#tier CertificateAuthority.tier}, - # but is optional and its value is ignored otherwise. - # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash] - # Required. A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} - # with initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request ID, - # the server can check if original operation with the same request ID was - # received, and if so, will ignore the second request. This prevents clients - # from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param validate_only [::Boolean] - # Optional. If this is true, no - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} resource will - # be persisted regardless of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s - # {::Google::Cloud::Security::PrivateCA::V1::CaPool#tier tier}, and the returned - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} will not - # contain the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate#pem_certificate pem_certificate} - # field. - # @param issuing_certificate_authority_id [::String] - # Optional. The resource ID of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # that should issue the certificate. This optional field will ignore the - # load-balancing scheme of the Pool and directly issue the certificate from - # the CA with the specified ID, contained in the same - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} referenced by `parent`. - # Per-CA quota rules apply. If left empty, a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # will be chosen from the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} - # by the service. For example, to issue a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} from a - # Certificate Authority with resource name - # "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", - # you can set the - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#parent parent} - # to "projects/my-project/locations/us-central1/caPools/my-pool" and the - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#issuing_certificate_authority_id issuing_certificate_authority_id} - # to "my-ca". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new - # - # # Call the create_certificate method. - # result = client.create_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - # p result - # - def create_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.create_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. - # - # @overload get_certificate(request, options = nil) - # Pass arguments to `get_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_certificate(name: nil) - # Pass arguments to `get_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1::Certificate#name name} - # of the {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} to - # get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new - # - # # Call the get_certificate method. - # result = client.get_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - # p result - # - def get_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.get_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. - # - # @overload list_certificates(request, options = nil) - # Pass arguments to `list_certificates` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the parent associated with the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}, in the - # format `projects/*/locations/*/caPools/*`. The parent resource name can be - # in one of two forms: - # - # 1. **Specific CA Pool:** To list certificates within a single CA Pool: - # `projects/*/locations/*/caPools/*` - # - # 2. **All CA Pools in a Location:** To list certificates across *all* CA - # Pools in a given project and location, use the wildcard character (`-`) - # in place of the CA Pool ID. - # Example: `projects/*/locations/*/caPools/-` - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} to include - # in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} can - # subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. For - # details on supported filters and syntax, see [Certificates Filtering - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). - # @param order_by [::String] - # Optional. Specify how the results should be sorted. For details on - # supported fields and syntax, see [Certificates Sorting - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::Certificate>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::Certificate>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new - # - # # Call the list_certificates method. - # result = client.list_certificates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::Certificate. - # p item - # end - # - def list_certificates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_certificates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_certificates.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_certificates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.list_certificates request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificates, "certificates", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Revoke a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. - # - # @overload revoke_certificate(request, options = nil) - # Pass arguments to `revoke_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload revoke_certificate(name: nil, reason: nil, request_id: nil) - # Pass arguments to `revoke_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the format - # `projects/*/locations/*/caPools/*/certificates/*`. - # @param reason [::Google::Cloud::Security::PrivateCA::V1::RevocationReason] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::RevocationReason RevocationReason} for - # revoking this certificate. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new - # - # # Call the revoke_certificate method. - # result = client.revoke_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - # p result - # - def revoke_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.revoke_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.revoke_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.revoke_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. - # Currently, the only field you can update is the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate#labels labels} field. - # - # @overload update_certificate(request, options = nil) - # Pass arguments to `update_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_certificate(certificate: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate [::Google::Cloud::Security::PrivateCA::V1::Certificate, ::Hash] - # Required. {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} - # with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new - # - # # Call the update_certificate method. - # result = client.update_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - # p result - # - def update_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.update_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Activate a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # that is in state - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION} - # and is of type - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. - # After the parent Certificate Authority signs a certificate signing request - # from - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client#fetch_certificate_authority_csr FetchCertificateAuthorityCsr}, - # this method can complete the activation process. - # - # @overload activate_certificate_authority(request, options = nil) - # Pass arguments to `activate_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil) - # Pass arguments to `activate_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param pem_ca_certificate [::String] - # Required. The signed CA certificate issued from - # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. - # @param subordinate_config [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig, ::Hash] - # Required. Must include information about the issuer of - # 'pem_ca_certificate', and any further issuers until the self-signed CA. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new - # - # # Call the activate_certificate_authority method. - # result = client.activate_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def activate_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.activate_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.activate_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.activate_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a new - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in a given Project and Location. - # - # @overload create_certificate_authority(request, options = nil) - # Pass arguments to `create_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil) - # Pass arguments to `create_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, - # in the format `projects/*/locations/*/caPools/*`. - # @param certificate_authority_id [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash] - # Required. A - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # with initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new - # - # # Call the create_certificate_authority method. - # result = client.create_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.create_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # - # @overload disable_certificate_authority(request, options = nil) - # Pass arguments to `disable_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload disable_certificate_authority(name: nil, request_id: nil, ignore_dependent_resources: nil) - # Pass arguments to `disable_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param ignore_dependent_resources [::Boolean] - # Optional. This field allows this CA to be disabled even if it's being - # depended on by another resource. However, doing so may result in unintended - # and unrecoverable effects on any dependent resources since the CA will - # no longer be able to issue certificates. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new - # - # # Call the disable_certificate_authority method. - # result = client.disable_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def disable_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.disable_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.disable_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # - # @overload enable_certificate_authority(request, options = nil) - # Pass arguments to `enable_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enable_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `enable_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new - # - # # Call the enable_certificate_authority method. - # result = client.enable_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def enable_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enable_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.enable_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch a certificate signing request (CSR) from a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # that is in state - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::AWAITING_USER_ACTIVATION AWAITING_USER_ACTIVATION} - # and is of type - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. - # The CSR must then be signed by the desired parent Certificate Authority, - # which could be another - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # resource, or could be an on-prem certificate authority. See also - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client#activate_certificate_authority ActivateCertificateAuthority}. - # - # @overload fetch_certificate_authority_csr(request, options = nil) - # Pass arguments to `fetch_certificate_authority_csr` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_certificate_authority_csr(name: nil) - # Pass arguments to `fetch_certificate_authority_csr` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new - # - # # Call the fetch_certificate_authority_csr method. - # result = client.fetch_certificate_authority_csr request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse. - # p result - # - def fetch_certificate_authority_csr request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_certificate_authority_csr.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.fetch_certificate_authority_csr request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # - # @overload get_certificate_authority(request, options = nil) - # Pass arguments to `get_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_certificate_authority(name: nil) - # Pass arguments to `get_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new - # - # # Call the get_certificate_authority method. - # result = client.get_certificate_authority request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. - # p result - # - def get_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.get_certificate_authority request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}. - # - # @overload list_certificate_authorities(request, options = nil) - # Pass arguments to `list_certificate_authorities` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_certificate_authorities(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_authorities` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, - # in the format `projects/*/locations/*/caPools/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} - # to include in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new - # - # # Call the list_certificate_authorities method. - # result = client.list_certificate_authorities request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. - # p item - # end - # - def list_certificate_authorities request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_certificate_authorities.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_certificate_authorities.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.list_certificate_authorities request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_authorities, "certificate_authorities", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undelete a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # that has been deleted. - # - # @overload undelete_certificate_authority(request, options = nil) - # Pass arguments to `undelete_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undelete_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `undelete_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new - # - # # Call the undelete_certificate_authority method. - # result = client.undelete_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undelete_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undelete_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.undelete_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undelete_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.undelete_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # - # @overload delete_certificate_authority(request, options = nil) - # Pass arguments to `delete_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_certificate_authority(name: nil, request_id: nil, ignore_active_certificates: nil, skip_grace_period: nil, ignore_dependent_resources: nil) - # Pass arguments to `delete_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param ignore_active_certificates [::Boolean] - # Optional. This field allows the CA to be deleted even if the CA has - # active certs. Active certs include both unrevoked and unexpired certs. - # @param skip_grace_period [::Boolean] - # Optional. If this flag is set, the Certificate Authority will be deleted as - # soon as possible without a 30-day grace period where undeletion would have - # been allowed. If you proceed, there will be no way to recover this CA. - # @param ignore_dependent_resources [::Boolean] - # Optional. This field allows this CA to be deleted even if it's being - # depended on by another resource. However, doing so may result in unintended - # and unrecoverable effects on any dependent resources since the CA will - # no longer be able to issue certificates. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new - # - # # Call the delete_certificate_authority method. - # result = client.delete_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.delete_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # - # @overload update_certificate_authority(request, options = nil) - # Pass arguments to `update_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_certificate_authority(certificate_authority: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority, ::Hash] - # Required. - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new - # - # # Call the update_certificate_authority method. - # result = client.update_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.update_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # - # @overload create_ca_pool(request, options = nil) - # Pass arguments to `create_ca_pool` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_ca_pool(parent: nil, ca_pool_id: nil, ca_pool: nil, request_id: nil) - # Pass arguments to `create_ca_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}, in the format - # `projects/*/locations/*`. - # @param ca_pool_id [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash] - # Required. A {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with - # initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new - # - # # Call the create_ca_pool method. - # result = client.create_ca_pool request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_ca_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_ca_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_ca_pool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_ca_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.create_ca_pool request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # - # @overload update_ca_pool(request, options = nil) - # Pass arguments to `update_ca_pool` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_ca_pool(ca_pool: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_ca_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param ca_pool [::Google::Cloud::Security::PrivateCA::V1::CaPool, ::Hash] - # Required. {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with updated - # values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new - # - # # Call the update_ca_pool method. - # result = client.update_ca_pool request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_ca_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_ca_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_ca_pool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_ca_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.update_ca_pool request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # - # @overload get_ca_pool(request, options = nil) - # Pass arguments to `get_ca_pool` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_ca_pool(name: nil) - # Pass arguments to `get_ca_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1::CaPool#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CaPool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new - # - # # Call the get_ca_pool method. - # result = client.get_ca_pool request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CaPool. - # p result - # - def get_ca_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_ca_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_ca_pool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_ca_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.get_ca_pool request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}. - # - # @overload list_ca_pools(request, options = nil) - # Pass arguments to `list_ca_pools` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_ca_pools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_ca_pools` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}, in the format - # `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} to include in the - # response. Further {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} can - # subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CaPool>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CaPool>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new - # - # # Call the list_ca_pools method. - # result = client.list_ca_pools request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CaPool. - # p item - # end - # - def list_ca_pools request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_ca_pools.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_ca_pools.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_ca_pools.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.list_ca_pools request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_ca_pools, "ca_pools", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # - # @overload delete_ca_pool(request, options = nil) - # Pass arguments to `delete_ca_pool` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_ca_pool(name: nil, request_id: nil, ignore_dependent_resources: nil) - # Pass arguments to `delete_ca_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format - # `projects/*/locations/*/caPools/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param ignore_dependent_resources [::Boolean] - # Optional. This field allows this pool to be deleted even if it's being - # depended on by another resource. However, doing so may result in unintended - # and unrecoverable effects on any dependent resources since the pool will - # no longer be able to issue certificates. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new - # - # # Call the delete_ca_pool method. - # result = client.delete_ca_pool request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_ca_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_ca_pool.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_ca_pool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_ca_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.delete_ca_pool request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # FetchCaCerts returns the current trust anchor for the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. This will include CA - # certificate chains for all certificate authorities in the ENABLED, - # DISABLED, or STAGED states. - # - # @overload fetch_ca_certs(request, options = nil) - # Pass arguments to `fetch_ca_certs` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_ca_certs(ca_pool: nil, request_id: nil) - # Pass arguments to `fetch_ca_certs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param ca_pool [::String] - # Required. The resource name for the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format - # `projects/*/locations/*/caPools/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new - # - # # Call the fetch_ca_certs method. - # result = client.fetch_ca_certs request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse. - # p result - # - def fetch_ca_certs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_ca_certs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_ca_certs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_ca_certs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.fetch_ca_certs request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. - # - # @overload get_certificate_revocation_list(request, options = nil) - # Pass arguments to `get_certificate_revocation_list` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_certificate_revocation_list(name: nil) - # Pass arguments to `get_certificate_revocation_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList#name name} - # of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new - # - # # Call the get_certificate_revocation_list method. - # result = client.get_certificate_revocation_list request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. - # p result - # - def get_certificate_revocation_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_certificate_revocation_list.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.get_certificate_revocation_list request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}. - # - # @overload list_certificate_revocation_lists(request, options = nil) - # Pass arguments to `list_certificate_revocation_lists` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_certificate_revocation_lists(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_revocation_lists` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}, - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} - # to include in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new - # - # # Call the list_certificate_revocation_lists method. - # result = client.list_certificate_revocation_lists request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. - # p item - # end - # - def list_certificate_revocation_lists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_certificate_revocation_lists.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.list_certificate_revocation_lists request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_revocation_lists, "certificate_revocation_lists", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. - # - # @overload update_certificate_revocation_list(request, options = nil) - # Pass arguments to `update_certificate_revocation_list` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_certificate_revocation_list(certificate_revocation_list: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate_revocation_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_revocation_list [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList, ::Hash] - # Required. - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new - # - # # Call the update_certificate_revocation_list method. - # result = client.update_certificate_revocation_list request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_certificate_revocation_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_certificate_revocation_list.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.update_certificate_revocation_list request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a new - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # in a given Project and Location. - # - # @overload create_certificate_template(request, options = nil) - # Pass arguments to `create_certificate_template` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_certificate_template(parent: nil, certificate_template_id: nil, certificate_template: nil, request_id: nil) - # Pass arguments to `create_certificate_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}, - # in the format `projects/*/locations/*`. - # @param certificate_template_id [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash] - # Required. A - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # with initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new - # - # # Call the create_certificate_template method. - # result = client.create_certificate_template request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_certificate_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_certificate_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_certificate_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_certificate_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.create_certificate_template request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # DeleteCertificateTemplate deletes a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. - # - # @overload delete_certificate_template(request, options = nil) - # Pass arguments to `delete_certificate_template` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_certificate_template(name: nil, request_id: nil) - # Pass arguments to `delete_certificate_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # in the format `projects/*/locations/*/certificateTemplates/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new - # - # # Call the delete_certificate_template method. - # result = client.delete_certificate_template request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_certificate_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_certificate_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_certificate_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_certificate_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.delete_certificate_template request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. - # - # @overload get_certificate_template(request, options = nil) - # Pass arguments to `get_certificate_template` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_certificate_template(name: nil) - # Pass arguments to `get_certificate_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new - # - # # Call the get_certificate_template method. - # result = client.get_certificate_template request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. - # p result - # - def get_certificate_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_certificate_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_certificate_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.get_certificate_template request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}. - # - # @overload list_certificate_templates(request, options = nil) - # Pass arguments to `list_certificate_templates` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_certificate_templates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_templates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}, - # in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} - # to include in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new - # - # # Call the list_certificate_templates method. - # result = client.list_certificate_templates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. - # p item - # end - # - def list_certificate_templates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_certificate_templates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_certificate_templates.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_certificate_templates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.list_certificate_templates request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_templates, "certificate_templates", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. - # - # @overload update_certificate_template(request, options = nil) - # Pass arguments to `update_certificate_template` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_certificate_template(certificate_template: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate_template` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_template [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate, ::Hash] - # Required. - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new - # - # # Call the update_certificate_template method. - # result = client.update_certificate_template request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_certificate_template request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_certificate_template.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_certificate_template.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_certificate_template.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.update_certificate_template request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CertificateAuthorityService REST API. - # - # This class represents the configuration for CertificateAuthorityService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_certificate to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_certificate.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_certificate.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "privateca.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the CertificateAuthorityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate - ## - # RPC-specific configuration for `get_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate - ## - # RPC-specific configuration for `list_certificates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificates - ## - # RPC-specific configuration for `revoke_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :revoke_certificate - ## - # RPC-specific configuration for `update_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate - ## - # RPC-specific configuration for `activate_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :activate_certificate_authority - ## - # RPC-specific configuration for `create_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_authority - ## - # RPC-specific configuration for `disable_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_certificate_authority - ## - # RPC-specific configuration for `enable_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_certificate_authority - ## - # RPC-specific configuration for `fetch_certificate_authority_csr` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_certificate_authority_csr - ## - # RPC-specific configuration for `get_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_authority - ## - # RPC-specific configuration for `list_certificate_authorities` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_authorities - ## - # RPC-specific configuration for `undelete_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_certificate_authority - ## - # RPC-specific configuration for `delete_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate_authority - ## - # RPC-specific configuration for `update_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_authority - ## - # RPC-specific configuration for `create_ca_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :create_ca_pool - ## - # RPC-specific configuration for `update_ca_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :update_ca_pool - ## - # RPC-specific configuration for `get_ca_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :get_ca_pool - ## - # RPC-specific configuration for `list_ca_pools` - # @return [::Gapic::Config::Method] - # - attr_reader :list_ca_pools - ## - # RPC-specific configuration for `delete_ca_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_ca_pool - ## - # RPC-specific configuration for `fetch_ca_certs` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_ca_certs - ## - # RPC-specific configuration for `get_certificate_revocation_list` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_revocation_list - ## - # RPC-specific configuration for `list_certificate_revocation_lists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_revocation_lists - ## - # RPC-specific configuration for `update_certificate_revocation_list` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_revocation_list - ## - # RPC-specific configuration for `create_certificate_template` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_template - ## - # RPC-specific configuration for `delete_certificate_template` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate_template - ## - # RPC-specific configuration for `get_certificate_template` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_template - ## - # RPC-specific configuration for `list_certificate_templates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_templates - ## - # RPC-specific configuration for `update_certificate_template` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_template - - # @private - def initialize parent_rpcs = nil - create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate - @create_certificate = ::Gapic::Config::Method.new create_certificate_config - get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate - @get_certificate = ::Gapic::Config::Method.new get_certificate_config - list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates - @list_certificates = ::Gapic::Config::Method.new list_certificates_config - revoke_certificate_config = parent_rpcs.revoke_certificate if parent_rpcs.respond_to? :revoke_certificate - @revoke_certificate = ::Gapic::Config::Method.new revoke_certificate_config - update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate - @update_certificate = ::Gapic::Config::Method.new update_certificate_config - activate_certificate_authority_config = parent_rpcs.activate_certificate_authority if parent_rpcs.respond_to? :activate_certificate_authority - @activate_certificate_authority = ::Gapic::Config::Method.new activate_certificate_authority_config - create_certificate_authority_config = parent_rpcs.create_certificate_authority if parent_rpcs.respond_to? :create_certificate_authority - @create_certificate_authority = ::Gapic::Config::Method.new create_certificate_authority_config - disable_certificate_authority_config = parent_rpcs.disable_certificate_authority if parent_rpcs.respond_to? :disable_certificate_authority - @disable_certificate_authority = ::Gapic::Config::Method.new disable_certificate_authority_config - enable_certificate_authority_config = parent_rpcs.enable_certificate_authority if parent_rpcs.respond_to? :enable_certificate_authority - @enable_certificate_authority = ::Gapic::Config::Method.new enable_certificate_authority_config - fetch_certificate_authority_csr_config = parent_rpcs.fetch_certificate_authority_csr if parent_rpcs.respond_to? :fetch_certificate_authority_csr - @fetch_certificate_authority_csr = ::Gapic::Config::Method.new fetch_certificate_authority_csr_config - get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority - @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config - list_certificate_authorities_config = parent_rpcs.list_certificate_authorities if parent_rpcs.respond_to? :list_certificate_authorities - @list_certificate_authorities = ::Gapic::Config::Method.new list_certificate_authorities_config - undelete_certificate_authority_config = parent_rpcs.undelete_certificate_authority if parent_rpcs.respond_to? :undelete_certificate_authority - @undelete_certificate_authority = ::Gapic::Config::Method.new undelete_certificate_authority_config - delete_certificate_authority_config = parent_rpcs.delete_certificate_authority if parent_rpcs.respond_to? :delete_certificate_authority - @delete_certificate_authority = ::Gapic::Config::Method.new delete_certificate_authority_config - update_certificate_authority_config = parent_rpcs.update_certificate_authority if parent_rpcs.respond_to? :update_certificate_authority - @update_certificate_authority = ::Gapic::Config::Method.new update_certificate_authority_config - create_ca_pool_config = parent_rpcs.create_ca_pool if parent_rpcs.respond_to? :create_ca_pool - @create_ca_pool = ::Gapic::Config::Method.new create_ca_pool_config - update_ca_pool_config = parent_rpcs.update_ca_pool if parent_rpcs.respond_to? :update_ca_pool - @update_ca_pool = ::Gapic::Config::Method.new update_ca_pool_config - get_ca_pool_config = parent_rpcs.get_ca_pool if parent_rpcs.respond_to? :get_ca_pool - @get_ca_pool = ::Gapic::Config::Method.new get_ca_pool_config - list_ca_pools_config = parent_rpcs.list_ca_pools if parent_rpcs.respond_to? :list_ca_pools - @list_ca_pools = ::Gapic::Config::Method.new list_ca_pools_config - delete_ca_pool_config = parent_rpcs.delete_ca_pool if parent_rpcs.respond_to? :delete_ca_pool - @delete_ca_pool = ::Gapic::Config::Method.new delete_ca_pool_config - fetch_ca_certs_config = parent_rpcs.fetch_ca_certs if parent_rpcs.respond_to? :fetch_ca_certs - @fetch_ca_certs = ::Gapic::Config::Method.new fetch_ca_certs_config - get_certificate_revocation_list_config = parent_rpcs.get_certificate_revocation_list if parent_rpcs.respond_to? :get_certificate_revocation_list - @get_certificate_revocation_list = ::Gapic::Config::Method.new get_certificate_revocation_list_config - list_certificate_revocation_lists_config = parent_rpcs.list_certificate_revocation_lists if parent_rpcs.respond_to? :list_certificate_revocation_lists - @list_certificate_revocation_lists = ::Gapic::Config::Method.new list_certificate_revocation_lists_config - update_certificate_revocation_list_config = parent_rpcs.update_certificate_revocation_list if parent_rpcs.respond_to? :update_certificate_revocation_list - @update_certificate_revocation_list = ::Gapic::Config::Method.new update_certificate_revocation_list_config - create_certificate_template_config = parent_rpcs.create_certificate_template if parent_rpcs.respond_to? :create_certificate_template - @create_certificate_template = ::Gapic::Config::Method.new create_certificate_template_config - delete_certificate_template_config = parent_rpcs.delete_certificate_template if parent_rpcs.respond_to? :delete_certificate_template - @delete_certificate_template = ::Gapic::Config::Method.new delete_certificate_template_config - get_certificate_template_config = parent_rpcs.get_certificate_template if parent_rpcs.respond_to? :get_certificate_template - @get_certificate_template = ::Gapic::Config::Method.new get_certificate_template_config - list_certificate_templates_config = parent_rpcs.list_certificate_templates if parent_rpcs.respond_to? :list_certificate_templates - @list_certificate_templates = ::Gapic::Config::Method.new list_certificate_templates_config - update_certificate_template_config = parent_rpcs.update_certificate_template if parent_rpcs.respond_to? :update_certificate_template - @update_certificate_template = ::Gapic::Config::Method.new update_certificate_template_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb deleted file mode 100644 index 02a7da47b22c..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/operations.rb +++ /dev/null @@ -1,929 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Security - module PrivateCA - module V1 - module CertificateAuthorityService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CertificateAuthorityService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CertificateAuthorityService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "privateca.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb deleted file mode 100644 index 1665c56a8de6..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/certificate_authority_service/rest/service_stub.rb +++ /dev/null @@ -1,1867 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/privateca/v1/service_pb" - -module Google - module Cloud - module Security - module PrivateCA - module V1 - module CertificateAuthorityService - module Rest - ## - # REST service stub for the CertificateAuthorityService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # A result object deserialized from the server's reply - def create_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # A result object deserialized from the server's reply - def get_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_certificates REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse] - # A result object deserialized from the server's reply - def list_certificates request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_certificates_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_certificates", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the revoke_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # A result object deserialized from the server's reply - def revoke_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_revoke_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "revoke_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # A result object deserialized from the server's reply - def update_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the activate_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def activate_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_activate_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "activate_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the disable_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def disable_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "disable_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enable_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def enable_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enable_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_certificate_authority_csr REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse] - # A result object deserialized from the server's reply - def fetch_certificate_authority_csr request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_certificate_authority_csr_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_certificate_authority_csr", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] - # A result object deserialized from the server's reply - def get_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_certificate_authorities REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse] - # A result object deserialized from the server's reply - def list_certificate_authorities request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_authorities_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_certificate_authorities", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the undelete_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def undelete_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undelete_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undelete_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_ca_pool REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_ca_pool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_ca_pool_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_ca_pool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_ca_pool REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_ca_pool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_ca_pool_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_ca_pool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_ca_pool REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CaPool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool] - # A result object deserialized from the server's reply - def get_ca_pool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_ca_pool_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_ca_pool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::CaPool.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_ca_pools REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse] - # A result object deserialized from the server's reply - def list_ca_pools request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_ca_pools_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_ca_pools", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_ca_pool REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_ca_pool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_ca_pool_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_ca_pool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_ca_certs REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse] - # A result object deserialized from the server's reply - def fetch_ca_certs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_ca_certs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_ca_certs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_certificate_revocation_list REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] - # A result object deserialized from the server's reply - def get_certificate_revocation_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_revocation_list_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_certificate_revocation_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_certificate_revocation_lists REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse] - # A result object deserialized from the server's reply - def list_certificate_revocation_lists request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_revocation_lists_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_certificate_revocation_lists", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_certificate_revocation_list REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_certificate_revocation_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_revocation_list_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_certificate_revocation_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_certificate_template REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_certificate_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_certificate_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_certificate_template REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_certificate_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_certificate_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_certificate_template REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] - # A result object deserialized from the server's reply - def get_certificate_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_certificate_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_certificate_templates REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse] - # A result object deserialized from the server's reply - def list_certificate_templates request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_templates_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_certificate_templates", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_certificate_template REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_certificate_template request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_template_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_certificate_template", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/certificates", - body: "certificate", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_certificates REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_certificates_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/certificates", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the revoke_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_revoke_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:revoke", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{certificate.name}", - body: "certificate", - matches: [ - ["certificate.name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the activate_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_activate_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:activate", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/certificateAuthorities", - body: "certificate_authority", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_disable_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:disable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enable_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:enable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_certificate_authority_csr REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_certificate_authority_csr_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:fetch", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_certificate_authorities REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_certificate_authorities_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/certificateAuthorities", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undelete_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undelete_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:undelete", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{certificate_authority.name}", - body: "certificate_authority", - matches: [ - ["certificate_authority.name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_ca_pool REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_ca_pool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/caPools", - body: "ca_pool", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_ca_pool REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_ca_pool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{ca_pool.name}", - body: "ca_pool", - matches: [ - ["ca_pool.name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_ca_pool REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_ca_pool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_ca_pools REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_ca_pools_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/caPools", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_ca_pool REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_ca_pool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_ca_certs REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_ca_certs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{ca_pool}:fetchCaCerts", - body: "*", - matches: [ - ["ca_pool", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_certificate_revocation_list REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_certificate_revocation_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_certificate_revocation_lists REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_certificate_revocation_lists_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/certificateRevocationLists", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_certificate_revocation_list REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_certificate_revocation_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{certificate_revocation_list.name}", - body: "certificate_revocation_list", - matches: [ - ["certificate_revocation_list.name", %r{^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_certificate_template REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_certificate_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/certificateTemplates", - body: "certificate_template", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_certificate_template REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_certificate_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_certificate_template REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_certificate_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_certificate_templates REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_certificate_templates_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/certificateTemplates", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_certificate_template REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_certificate_template_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{certificate_template.name}", - body: "certificate_template", - matches: [ - ["certificate_template.name", %r{^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.rb deleted file mode 100644 index 32ff1bdaacad..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/rest.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security/private_ca/v1/certificate_authority_service/rest" -require "google/cloud/security/private_ca/v1/bindings_override" -require "google/cloud/security/private_ca/v1/version" - -module Google - module Cloud - module Security - module PrivateCA - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/security/private_ca/v1/rest" - # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb deleted file mode 100644 index c9a5e76697ad..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/private_ca/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Security - module PrivateCA - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb deleted file mode 100644 index e05f1bb88584..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/resources_pb.rb +++ /dev/null @@ -1,81 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/security/privateca/v1/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\n2google/cloud/security/privateca/v1/resources.proto\x12\"google.cloud.security.privateca.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\x86\x12\n\x14\x43\x65rtificateAuthority\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12S\n\x04type\x18\x02 \x01(\x0e\x32=.google.cloud.security.privateca.v1.CertificateAuthority.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12M\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.CertificateConfigB\x06\xe0\x41\x02\xe0\x41\x05\x12\x33\n\x08lifetime\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x06\xe0\x41\x02\xe0\x41\x05\x12\x61\n\x08key_spec\x18\x05 \x01(\x0b\x32G.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpecB\x06\xe0\x41\x02\xe0\x41\x05\x12V\n\x12subordinate_config\x18\x06 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.SubordinateConfigB\x03\xe0\x41\x01\x12\x42\n\x04tier\x18\x07 \x01(\x0e\x32/.google.cloud.security.privateca.v1.CaPool.TierB\x03\xe0\x41\x03\x12R\n\x05state\x18\x08 \x01(\x0e\x32>.google.cloud.security.privateca.v1.CertificateAuthority.StateB\x03\xe0\x41\x03\x12 \n\x13pem_ca_certificates\x18\t \x03(\tB\x03\xe0\x41\x03\x12\x64\n\x1b\x63\x61_certificate_descriptions\x18\n \x03(\x0b\x32:.google.cloud.security.privateca.v1.CertificateDescriptionB\x03\xe0\x41\x03\x12\x17\n\ngcs_bucket\x18\x0b \x01(\tB\x03\xe0\x41\x05\x12]\n\x0b\x61\x63\x63\x65ss_urls\x18\x0c \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrlsB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x06labels\x18\x11 \x03(\x0b\x32\x44.google.cloud.security.privateca.v1.CertificateAuthority.LabelsEntryB\x03\xe0\x41\x01\x12u\n\x18user_defined_access_urls\x18\x12 \x01(\x0b\x32N.google.cloud.security.privateca.v1.CertificateAuthority.UserDefinedAccessUrlsB\x03\xe0\x41\x01\x12\x1a\n\rsatisfies_pzs\x18\x13 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x14 \x01(\x08\x42\x03\xe0\x41\x03\x1aH\n\nAccessUrls\x12!\n\x19\x63\x61_certificate_access_url\x18\x01 \x01(\t\x12\x17\n\x0f\x63rl_access_urls\x18\x02 \x03(\t\x1a\xa0\x01\n\x0eKeyVersionSpec\x12\x1f\n\x15\x63loud_kms_key_version\x18\x01 \x01(\tH\x00\x12_\n\talgorithm\x18\x02 \x01(\x0e\x32J.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithmH\x00\x42\x0c\n\nKeyVersion\x1a`\n\x15UserDefinedAccessUrls\x12)\n\x1c\x61ia_issuing_certificate_urls\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63rl_access_urls\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSELF_SIGNED\x10\x01\x12\x0f\n\x0bSUBORDINATE\x10\x02\"p\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\n\n\x06STAGED\x10\x03\x12\x1c\n\x18\x41WAITING_USER_ACTIVATION\x10\x04\x12\x0b\n\x07\x44\x45LETED\x10\x05\"\xfc\x01\n\x11SignHashAlgorithm\x12#\n\x1fSIGN_HASH_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x19\n\x15RSA_PKCS1_2048_SHA256\x10\x06\x12\x19\n\x15RSA_PKCS1_3072_SHA256\x10\x07\x12\x19\n\x15RSA_PKCS1_4096_SHA256\x10\x08\x12\x12\n\x0e\x45\x43_P256_SHA256\x10\x04\x12\x12\n\x0e\x45\x43_P384_SHA384\x10\x05:\x9d\x01\xea\x41\x99\x01\n-privateca.googleapis.com/CertificateAuthority\x12hprojects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}\"\xe6\x11\n\x06\x43\x61Pool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x45\n\x04tier\x18\x02 \x01(\x0e\x32/.google.cloud.security.privateca.v1.CaPool.TierB\x06\xe0\x41\x02\xe0\x41\x05\x12W\n\x0fissuance_policy\x18\x03 \x01(\x0b\x32\x39.google.cloud.security.privateca.v1.CaPool.IssuancePolicyB\x03\xe0\x41\x01\x12]\n\x12publishing_options\x18\x04 \x01(\x0b\x32<.google.cloud.security.privateca.v1.CaPool.PublishingOptionsB\x03\xe0\x41\x01\x12P\n\x0f\x65ncryption_spec\x18\x08 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.EncryptionSpecB\x03\xe0\x41\x01\x12K\n\x06labels\x18\x05 \x03(\x0b\x32\x36.google.cloud.security.privateca.v1.CaPool.LabelsEntryB\x03\xe0\x41\x01\x1a\xfb\x01\n\x11PublishingOptions\x12\x1c\n\x0fpublish_ca_cert\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bpublish_crl\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12i\n\x0f\x65ncoding_format\x18\x03 \x01(\x0e\x32K.google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormatB\x03\xe0\x41\x01\"C\n\x0e\x45ncodingFormat\x12\x1f\n\x1b\x45NCODING_FORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03PEM\x10\x01\x12\x07\n\x03\x44\x45R\x10\x02\x1a\xe2\n\n\x0eIssuancePolicy\x12h\n\x11\x61llowed_key_types\x18\x01 \x03(\x0b\x32H.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyTypeB\x03\xe0\x41\x01\x12\x39\n\x11\x62\x61\x63kdate_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x36\n)allow_requester_specified_not_before_time\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\x38\n\x10maximum_lifetime\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12l\n\x16\x61llowed_issuance_modes\x18\x03 \x01(\x0b\x32G.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModesB\x03\xe0\x41\x01\x12P\n\x0f\x62\x61seline_values\x18\x04 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x01\x12\x65\n\x14identity_constraints\x18\x05 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.CertificateIdentityConstraintsB\x03\xe0\x41\x01\x12h\n\x16passthrough_extensions\x18\x06 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateExtensionConstraintsB\x03\xe0\x41\x01\x1a\xc5\x04\n\x0e\x41llowedKeyType\x12\x62\n\x03rsa\x18\x01 \x01(\x0b\x32S.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyTypeH\x00\x12l\n\x0e\x65lliptic_curve\x18\x02 \x01(\x0b\x32R.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyTypeH\x00\x1aJ\n\nRsaKeyType\x12\x1d\n\x10min_modulus_size\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1d\n\x10max_modulus_size\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x1a\x88\x02\n\tEcKeyType\x12\x89\x01\n\x13signature_algorithm\x18\x01 \x01(\x0e\x32g.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithmB\x03\xe0\x41\x01\"o\n\x14\x45\x63SignatureAlgorithm\x12&\n\"EC_SIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x0e\n\nECDSA_P256\x10\x01\x12\x0e\n\nECDSA_P384\x10\x02\x12\x0f\n\x0b\x45\x44\x44SA_25519\x10\x03\x42\n\n\x08key_type\x1a`\n\rIssuanceModes\x12%\n\x18\x61llow_csr_based_issuance\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1b\x61llow_config_based_issuance\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"8\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\n\n\x06\x44\x45VOPS\x10\x02:_\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}\"\'\n\x0e\x45ncryptionSpec\x12\x15\n\rcloud_kms_key\x18\x01 \x01(\t\"\xbc\x08\n\x19\x43\x65rtificateRevocationList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0fsequence_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12s\n\x14revoked_certificates\x18\x03 \x03(\x0b\x32P.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificateB\x03\xe0\x41\x03\x12\x14\n\x07pem_crl\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naccess_url\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12W\n\x05state\x18\x06 \x01(\x0e\x32\x43.google.cloud.security.privateca.v1.CertificateRevocationList.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12^\n\x06labels\x18\n \x03(\x0b\x32I.google.cloud.security.privateca.v1.CertificateRevocationList.LabelsEntryB\x03\xe0\x41\x01\x1a\xc0\x01\n\x12RevokedCertificate\x12>\n\x0b\x63\x65rtificate\x18\x01 \x01(\tB)\xfa\x41&\n$privateca.googleapis.com/Certificate\x12\x19\n\x11hex_serial_number\x18\x02 \x01(\t\x12O\n\x11revocation_reason\x18\x03 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReason\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0e\n\nSUPERSEDED\x10\x02:\xdc\x01\xea\x41\xd8\x01\n2privateca.googleapis.com/CertificateRevocationList\x12\xa1\x01projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}\"\xaa\n\n\x0b\x43\x65rtificate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\x07pem_csr\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x12L\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.CertificateConfigB\x03\xe0\x41\x05H\x00\x12[\n\x1cissuer_certificate_authority\x18\x04 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x33\n\x08lifetime\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x06\xe0\x41\x02\xe0\x41\x05\x12R\n\x14\x63\x65rtificate_template\x18\x06 \x01(\tB4\xe0\x41\x05\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\x12Q\n\x0csubject_mode\x18\x07 \x01(\x0e\x32\x36.google.cloud.security.privateca.v1.SubjectRequestModeB\x03\xe0\x41\x05\x12\x62\n\x12revocation_details\x18\x08 \x01(\x0b\x32\x41.google.cloud.security.privateca.v1.Certificate.RevocationDetailsB\x03\xe0\x41\x03\x12\x1c\n\x0fpem_certificate\x18\t \x01(\tB\x03\xe0\x41\x03\x12`\n\x17\x63\x65rtificate_description\x18\n \x01(\x0b\x32:.google.cloud.security.privateca.v1.CertificateDescriptionB\x03\xe0\x41\x03\x12\"\n\x15pem_certificate_chain\x18\x0b \x03(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x06labels\x18\x0e \x03(\x0b\x32;.google.cloud.security.privateca.v1.Certificate.LabelsEntryB\x03\xe0\x41\x01\x12\x42\n\x19requested_not_before_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x1a\x98\x01\n\x11RevocationDetails\x12N\n\x10revocation_state\x18\x01 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReason\x12\x33\n\x0frevocation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x7f\xea\x41|\n$privateca.googleapis.com/Certificate\x12Tprojects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}B\x14\n\x12\x63\x65rtificate_config\"\xa0\x06\n\x13\x43\x65rtificateTemplate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x38\n\x10maximum_lifetime\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12R\n\x11predefined_values\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x01\x12\x65\n\x14identity_constraints\x18\x03 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.CertificateIdentityConstraintsB\x03\xe0\x41\x01\x12h\n\x16passthrough_extensions\x18\x04 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateExtensionConstraintsB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12X\n\x06labels\x18\x08 \x03(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateTemplate.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x87\x01\xea\x41\x83\x01\n,privateca.googleapis.com/CertificateTemplate\x12Sprojects/{project}/locations/{location}/certificateTemplates/{certificate_template}\"\xce\x06\n\x0eX509Parameters\x12\x44\n\tkey_usage\x18\x01 \x01(\x0b\x32,.google.cloud.security.privateca.v1.KeyUsageB\x03\xe0\x41\x01\x12U\n\nca_options\x18\x02 \x01(\x0b\x32<.google.cloud.security.privateca.v1.X509Parameters.CaOptionsB\x03\xe0\x41\x01\x12\x45\n\npolicy_ids\x18\x03 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x01\x12\x1d\n\x10\x61ia_ocsp_servers\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x61\n\x10name_constraints\x18\x06 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1.X509Parameters.NameConstraintsB\x03\xe0\x41\x01\x12U\n\x15\x61\x64\x64itional_extensions\x18\x05 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1.X509ExtensionB\x03\xe0\x41\x01\x1as\n\tCaOptions\x12\x17\n\x05is_ca\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12(\n\x16max_issuer_path_length\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x08\n\x06_is_caB\x19\n\x17_max_issuer_path_length\x1a\x89\x02\n\x0fNameConstraints\x12\x10\n\x08\x63ritical\x18\x01 \x01(\x08\x12\x1b\n\x13permitted_dns_names\x18\x02 \x03(\t\x12\x1a\n\x12\x65xcluded_dns_names\x18\x03 \x03(\t\x12\x1b\n\x13permitted_ip_ranges\x18\x04 \x03(\t\x12\x1a\n\x12\x65xcluded_ip_ranges\x18\x05 \x03(\t\x12!\n\x19permitted_email_addresses\x18\x06 \x03(\t\x12 \n\x18\x65xcluded_email_addresses\x18\x07 \x03(\t\x12\x16\n\x0epermitted_uris\x18\x08 \x03(\t\x12\x15\n\rexcluded_uris\x18\t \x03(\t\"\xa9\x02\n\x11SubordinateConfig\x12V\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthorityH\x00\x12m\n\x10pem_issuer_chain\x18\x02 \x01(\x0b\x32L.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChainB\x03\xe0\x41\x02H\x00\x1a\x37\n\x16SubordinateConfigChain\x12\x1d\n\x10pem_certificates\x18\x01 \x03(\tB\x03\xe0\x41\x02\x42\x14\n\x12subordinate_config\"\x9d\x01\n\tPublicKey\x12\x10\n\x03key\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x02\x12L\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x37.google.cloud.security.privateca.v1.PublicKey.KeyFormatB\x03\xe0\x41\x02\"0\n\tKeyFormat\x12\x1a\n\x16KEY_FORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03PEM\x10\x01\"\xac\x04\n\x11\x43\x65rtificateConfig\x12`\n\x0esubject_config\x18\x01 \x01(\x0b\x32\x43.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfigB\x03\xe0\x41\x02\x12L\n\x0bx509_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509ParametersB\x03\xe0\x41\x02\x12\x46\n\npublic_key\x18\x03 \x01(\x0b\x32-.google.cloud.security.privateca.v1.PublicKeyB\x03\xe0\x41\x01\x12X\n\x0esubject_key_id\x18\x04 \x01(\x0b\x32;.google.cloud.security.privateca.v1.CertificateConfig.KeyIdB\x03\xe0\x41\x01\x1a\xa6\x01\n\rSubjectConfig\x12\x41\n\x07subject\x18\x01 \x01(\x0b\x32+.google.cloud.security.privateca.v1.SubjectB\x03\xe0\x41\x01\x12R\n\x10subject_alt_name\x18\x02 \x01(\x0b\x32\x33.google.cloud.security.privateca.v1.SubjectAltNamesB\x03\xe0\x41\x01\x1a\x1c\n\x05KeyId\x12\x13\n\x06key_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xc1\x08\n\x16\x43\x65rtificateDescription\x12j\n\x13subject_description\x18\x01 \x01(\x0b\x32M.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription\x12L\n\x10x509_description\x18\x02 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1.X509Parameters\x12\x41\n\npublic_key\x18\x03 \x01(\x0b\x32-.google.cloud.security.privateca.v1.PublicKey\x12X\n\x0esubject_key_id\x18\x04 \x01(\x0b\x32@.google.cloud.security.privateca.v1.CertificateDescription.KeyId\x12Z\n\x10\x61uthority_key_id\x18\x05 \x01(\x0b\x32@.google.cloud.security.privateca.v1.CertificateDescription.KeyId\x12\x1f\n\x17\x63rl_distribution_points\x18\x06 \x03(\t\x12$\n\x1c\x61ia_issuing_certificate_urls\x18\x07 \x03(\t\x12k\n\x10\x63\x65rt_fingerprint\x18\x08 \x01(\x0b\x32Q.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint\x12\x1e\n\x16tbs_certificate_digest\x18\t \x01(\t\x1a\xd2\x02\n\x12SubjectDescription\x12<\n\x07subject\x18\x01 \x01(\x0b\x32+.google.cloud.security.privateca.v1.Subject\x12M\n\x10subject_alt_name\x18\x02 \x01(\x0b\x32\x33.google.cloud.security.privateca.v1.SubjectAltNames\x12\x19\n\x11hex_serial_number\x18\x03 \x01(\t\x12+\n\x08lifetime\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x33\n\x0fnot_before_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0enot_after_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x1c\n\x05KeyId\x12\x13\n\x06key_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x16\x43\x65rtificateFingerprint\x12\x13\n\x0bsha256_hash\x18\x01 \x01(\t\"\'\n\x08ObjectId\x12\x1b\n\x0eobject_id_path\x18\x01 \x03(\x05\x42\x03\xe0\x41\x02\"\x80\x01\n\rX509Extension\x12\x44\n\tobject_id\x18\x01 \x01(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x02\x12\x15\n\x08\x63ritical\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x02\"\xa2\x05\n\x08KeyUsage\x12T\n\x0e\x62\x61se_key_usage\x18\x01 \x01(\x0b\x32<.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions\x12`\n\x12\x65xtended_key_usage\x18\x02 \x01(\x0b\x32\x44.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions\x12Q\n\x1bunknown_extended_key_usages\x18\x03 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectId\x1a\xe7\x01\n\x0fKeyUsageOptions\x12\x19\n\x11\x64igital_signature\x18\x01 \x01(\x08\x12\x1a\n\x12\x63ontent_commitment\x18\x02 \x01(\x08\x12\x18\n\x10key_encipherment\x18\x03 \x01(\x08\x12\x19\n\x11\x64\x61ta_encipherment\x18\x04 \x01(\x08\x12\x15\n\rkey_agreement\x18\x05 \x01(\x08\x12\x11\n\tcert_sign\x18\x06 \x01(\x08\x12\x10\n\x08\x63rl_sign\x18\x07 \x01(\x08\x12\x15\n\rencipher_only\x18\x08 \x01(\x08\x12\x15\n\rdecipher_only\x18\t \x01(\x08\x1a\xa0\x01\n\x17\x45xtendedKeyUsageOptions\x12\x13\n\x0bserver_auth\x18\x01 \x01(\x08\x12\x13\n\x0b\x63lient_auth\x18\x02 \x01(\x08\x12\x14\n\x0c\x63ode_signing\x18\x03 \x01(\x08\x12\x18\n\x10\x65mail_protection\x18\x04 \x01(\x08\x12\x15\n\rtime_stamping\x18\x05 \x01(\x08\x12\x14\n\x0cocsp_signing\x18\x06 \x01(\x08\"\xbe\x01\n\x15\x41ttributeTypeAndValue\x12\x41\n\x04type\x18\x01 \x01(\x0e\x32\x31.google.cloud.security.privateca.v1.AttributeTypeH\x00\x12\x41\n\tobject_id\x18\x02 \x01(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdH\x00\x12\r\n\x05value\x18\x03 \x01(\tB\x10\n\x0e\x61ttribute_type\"j\n\x19RelativeDistinguishedName\x12M\n\nattributes\x18\x01 \x03(\x0b\x32\x39.google.cloud.security.privateca.v1.AttributeTypeAndValue\"\x8d\x02\n\x07Subject\x12\x13\n\x0b\x63ommon_name\x18\x01 \x01(\t\x12\x14\n\x0c\x63ountry_code\x18\x02 \x01(\t\x12\x14\n\x0corganization\x18\x03 \x01(\t\x12\x1b\n\x13organizational_unit\x18\x04 \x01(\t\x12\x10\n\x08locality\x18\x05 \x01(\t\x12\x10\n\x08province\x18\x06 \x01(\t\x12\x16\n\x0estreet_address\x18\x07 \x01(\t\x12\x13\n\x0bpostal_code\x18\x08 \x01(\t\x12S\n\x0crdn_sequence\x18\t \x03(\x0b\x32=.google.cloud.security.privateca.v1.RelativeDistinguishedName\"\xa9\x01\n\x0fSubjectAltNames\x12\x11\n\tdns_names\x18\x01 \x03(\t\x12\x0c\n\x04uris\x18\x02 \x03(\t\x12\x17\n\x0f\x65mail_addresses\x18\x03 \x03(\t\x12\x14\n\x0cip_addresses\x18\x04 \x03(\t\x12\x46\n\x0b\x63ustom_sans\x18\x05 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1.X509Extension\"\xfa\x01\n\x1e\x43\x65rtificateIdentityConstraints\x12.\n\x0e\x63\x65l_expression\x18\x01 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12+\n\x19\x61llow_subject_passthrough\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x35\n#allow_subject_alt_names_passthrough\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x1c\n\x1a_allow_subject_passthroughB&\n$_allow_subject_alt_names_passthrough\"\xb4\x03\n\x1f\x43\x65rtificateExtensionConstraints\x12|\n\x10known_extensions\x18\x01 \x03(\x0e\x32].google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtensionB\x03\xe0\x41\x01\x12P\n\x15\x61\x64\x64itional_extensions\x18\x02 \x03(\x0b\x32,.google.cloud.security.privateca.v1.ObjectIdB\x03\xe0\x41\x01\"\xc0\x01\n\x19KnownCertificateExtension\x12+\n\'KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41SE_KEY_USAGE\x10\x01\x12\x16\n\x12\x45XTENDED_KEY_USAGE\x10\x02\x12\x0e\n\nCA_OPTIONS\x10\x03\x12\x0e\n\nPOLICY_IDS\x10\x04\x12\x14\n\x10\x41IA_OCSP_SERVERS\x10\x05\x12\x14\n\x10NAME_CONSTRAINTS\x10\x06*\xbe\x01\n\rAttributeType\x12\x1e\n\x1a\x41TTRIBUTE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x43OMMON_NAME\x10\x01\x12\x10\n\x0c\x43OUNTRY_CODE\x10\x02\x12\x10\n\x0cORGANIZATION\x10\x03\x12\x17\n\x13ORGANIZATIONAL_UNIT\x10\x04\x12\x0c\n\x08LOCALITY\x10\x05\x12\x0c\n\x08PROVINCE\x10\x06\x12\x12\n\x0eSTREET_ADDRESS\x10\x07\x12\x0f\n\x0bPOSTAL_CODE\x10\x08*\x87\x02\n\x10RevocationReason\x12!\n\x1dREVOCATION_REASON_UNSPECIFIED\x10\x00\x12\x12\n\x0eKEY_COMPROMISE\x10\x01\x12$\n CERTIFICATE_AUTHORITY_COMPROMISE\x10\x02\x12\x17\n\x13\x41\x46\x46ILIATION_CHANGED\x10\x03\x12\x0e\n\nSUPERSEDED\x10\x04\x12\x1a\n\x16\x43\x45SSATION_OF_OPERATION\x10\x05\x12\x14\n\x10\x43\x45RTIFICATE_HOLD\x10\x06\x12\x17\n\x13PRIVILEGE_WITHDRAWN\x10\x07\x12\"\n\x1e\x41TTRIBUTE_AUTHORITY_COMPROMISE\x10\x08*o\n\x12SubjectRequestMode\x12$\n SUBJECT_REQUEST_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x10\n\x0cRDN_SEQUENCE\x10\x03\x12\x14\n\x10REFLECTED_SPIFFE\x10\x02\x42\xfc\x01\n&com.google.cloud.security.privateca.v1B\x17PrivateCaResourcesProtoP\x01ZDcloud.google.com/go/security/privateca/apiv1/privatecapb;privatecapb\xaa\x02\"Google.Cloud.Security.PrivateCA.V1\xca\x02\"Google\\Cloud\\Security\\PrivateCA\\V1\xea\x02&Google::Cloud::Security::PrivateCA::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Security - module PrivateCA - module V1 - CertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority").msgclass - CertificateAuthority::AccessUrls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls").msgclass - CertificateAuthority::KeyVersionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec").msgclass - CertificateAuthority::UserDefinedAccessUrls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.UserDefinedAccessUrls").msgclass - CertificateAuthority::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.Type").enummodule - CertificateAuthority::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.State").enummodule - CertificateAuthority::SignHashAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm").enummodule - CaPool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool").msgclass - CaPool::PublishingOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.PublishingOptions").msgclass - CaPool::PublishingOptions::EncodingFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat").enummodule - CaPool::IssuancePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy").msgclass - CaPool::IssuancePolicy::AllowedKeyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType").msgclass - CaPool::IssuancePolicy::AllowedKeyType::RsaKeyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType").msgclass - CaPool::IssuancePolicy::AllowedKeyType::EcKeyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType").msgclass - CaPool::IssuancePolicy::AllowedKeyType::EcKeyType::EcSignatureAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm").enummodule - CaPool::IssuancePolicy::IssuanceModes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes").msgclass - CaPool::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CaPool.Tier").enummodule - EncryptionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.EncryptionSpec").msgclass - CertificateRevocationList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateRevocationList").msgclass - CertificateRevocationList::RevokedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate").msgclass - CertificateRevocationList::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateRevocationList.State").enummodule - Certificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.Certificate").msgclass - Certificate::RevocationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.Certificate.RevocationDetails").msgclass - CertificateTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateTemplate").msgclass - X509Parameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.X509Parameters").msgclass - X509Parameters::CaOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.X509Parameters.CaOptions").msgclass - X509Parameters::NameConstraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.X509Parameters.NameConstraints").msgclass - SubordinateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.SubordinateConfig").msgclass - SubordinateConfig::SubordinateConfigChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain").msgclass - PublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.PublicKey").msgclass - PublicKey::KeyFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.PublicKey.KeyFormat").enummodule - CertificateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateConfig").msgclass - CertificateConfig::SubjectConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig").msgclass - CertificateConfig::KeyId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateConfig.KeyId").msgclass - CertificateDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateDescription").msgclass - CertificateDescription::SubjectDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription").msgclass - CertificateDescription::KeyId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateDescription.KeyId").msgclass - CertificateDescription::CertificateFingerprint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint").msgclass - ObjectId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ObjectId").msgclass - X509Extension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.X509Extension").msgclass - KeyUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.KeyUsage").msgclass - KeyUsage::KeyUsageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions").msgclass - KeyUsage::ExtendedKeyUsageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions").msgclass - AttributeTypeAndValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.AttributeTypeAndValue").msgclass - RelativeDistinguishedName = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.RelativeDistinguishedName").msgclass - Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.Subject").msgclass - SubjectAltNames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.SubjectAltNames").msgclass - CertificateIdentityConstraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateIdentityConstraints").msgclass - CertificateExtensionConstraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateExtensionConstraints").msgclass - CertificateExtensionConstraints::KnownCertificateExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension").enummodule - AttributeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.AttributeType").enummodule - RevocationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.RevocationReason").enummodule - SubjectRequestMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.SubjectRequestMode").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb deleted file mode 100644 index f329659efa1f..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_pb.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/security/privateca/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/security/privateca/v1/resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/cloud/security/privateca/v1/service.proto\x12\"google.cloud.security.privateca.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/security/privateca/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9f\x02\n\x18\x43reateCertificateRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x1b\n\x0e\x63\x65rtificate_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12I\n\x0b\x63\x65rtificate\x18\x03 \x01(\x0b\x32/.google.cloud.security.privateca.v1.CertificateB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n issuing_certificate_authority_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\"S\n\x15GetCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\"\xaf\x01\n\x17ListCertificatesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x18ListCertificatesResponse\x12\x45\n\x0c\x63\x65rtificates\x18\x01 \x03(\x0b\x32/.google.cloud.security.privateca.v1.Certificate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xba\x01\n\x18RevokeCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\x12I\n\x06reason\x18\x02 \x01(\x0e\x32\x34.google.cloud.security.privateca.v1.RevocationReasonB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb4\x01\n\x18UpdateCertificateRequest\x12I\n\x0b\x63\x65rtificate\x18\x01 \x01(\x0b\x32/.google.cloud.security.privateca.v1.CertificateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x84\x02\n#ActivateCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\x12pem_ca_certificate\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x12subordinate_config\x18\x03 \x01(\x0b\x32\x35.google.cloud.security.privateca.v1.SubordinateConfigB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xfa\x01\n!CreateCertificateAuthorityRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12%\n\x18\x63\x65rtificate_authority_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x15\x63\x65rtificate_authority\x18\x03 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xb3\x01\n\"DisableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\'\n\x1aignore_dependent_resources\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x89\x01\n!EnableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"j\n#FetchCertificateAuthorityCsrRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"<\n$FetchCertificateAuthorityCsrResponse\x12\x14\n\x07pem_csr\x18\x01 \x01(\tB\x03\xe0\x41\x03\"e\n\x1eGetCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"\xb9\x01\n!ListCertificateAuthoritiesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n\"ListCertificateAuthoritiesResponse\x12Y\n\x17\x63\x65rtificate_authorities\x18\x01 \x03(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthority\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8b\x01\n#UndeleteCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xfb\x01\n!DeleteCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\'\n\x1aignore_active_certificates\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x11skip_grace_period\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1aignore_dependent_resources\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xd8\x01\n!UpdateCertificateAuthorityRequest\x12\\\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xcc\x01\n\x13\x43reateCaPoolRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x17\n\nca_pool_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x07\x63\x61_pool\x18\x03 \x01(\x0b\x32*.google.cloud.security.privateca.v1.CaPoolB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xae\x01\n\x13UpdateCaPoolRequest\x12@\n\x07\x63\x61_pool\x18\x01 \x01(\x0b\x32*.google.cloud.security.privateca.v1.CaPoolB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x96\x01\n\x13\x44\x65leteCaPoolRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\'\n\x1aignore_dependent_resources\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"h\n\x13\x46\x65tchCaCertsRequest\x12\x38\n\x07\x63\x61_pool\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x14\x46\x65tchCaCertsResponse\x12T\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32\x42.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain\x1a!\n\tCertChain\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\t\"I\n\x10GetCaPoolRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPool\"\xac\x01\n\x12ListCaPoolsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n\x13ListCaPoolsResponse\x12<\n\x08\x63\x61_pools\x18\x01 \x03(\x0b\x32*.google.cloud.security.privateca.v1.CaPool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"o\n#GetCertificateRevocationListRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2privateca.googleapis.com/CertificateRevocationList\"\xcb\x01\n%ListCertificateRevocationListsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xbb\x01\n&ListCertificateRevocationListsResponse\x12\x63\n\x1c\x63\x65rtificate_revocation_lists\x18\x01 \x03(\x0b\x32=.google.cloud.security.privateca.v1.CertificateRevocationList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xe0\x01\n&UpdateCertificateRevocationListRequest\x12g\n\x1b\x63\x65rtificate_revocation_list\x18\x01 \x01(\x0b\x32=.google.cloud.security.privateca.v1.CertificateRevocationListB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x80\x02\n CreateCertificateTemplateRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12$\n\x17\x63\x65rtificate_template_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x14\x63\x65rtificate_template\x18\x03 \x01(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplateB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x87\x01\n DeleteCertificateTemplateRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"c\n\x1dGetCertificateTemplateRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,privateca.googleapis.com/CertificateTemplate\"\xb9\x01\n\x1fListCertificateTemplatesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa8\x01\n ListCertificateTemplatesResponse\x12V\n\x15\x63\x65rtificate_templates\x18\x01 \x03(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd5\x01\n UpdateCertificateTemplateRequest\x12Z\n\x14\x63\x65rtificate_template\x18\x01 \x01(\x0b\x32\x37.google.cloud.security.privateca.v1.CertificateTemplateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xfa;\n\x1b\x43\x65rtificateAuthorityService\x12\xf7\x01\n\x11\x43reateCertificate\x12<.google.cloud.security.privateca.v1.CreateCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"s\xda\x41!parent,certificate,certificate_id\x82\xd3\xe4\x93\x02I\":/v1/{parent=projects/*/locations/*/caPools/*}/certificates:\x0b\x63\x65rtificate\x12\xc7\x01\n\x0eGetCertificate\x12\x39.google.cloud.security.privateca.v1.GetCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/caPools/*/certificates/*}\x12\xda\x01\n\x10ListCertificates\x12;.google.cloud.security.privateca.v1.ListCertificatesRequest\x1a<.google.cloud.security.privateca.v1.ListCertificatesResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/caPools/*}/certificates\x12\xd7\x01\n\x11RevokeCertificate\x12<.google.cloud.security.privateca.v1.RevokeCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\"A/v1/{name=projects/*/locations/*/caPools/*/certificates/*}:revoke:\x01*\x12\xf9\x01\n\x11UpdateCertificate\x12<.google.cloud.security.privateca.v1.UpdateCertificateRequest\x1a/.google.cloud.security.privateca.v1.Certificate\"u\xda\x41\x17\x63\x65rtificate,update_mask\x82\xd3\xe4\x93\x02U2F/v1/{certificate.name=projects/*/locations/*/caPools/*/certificates/*}:\x0b\x63\x65rtificate\x12\x94\x02\n\x1c\x41\x63tivateCertificateAuthority\x12G.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:activate:\x01*\x12\xcc\x02\n\x1a\x43reateCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x35parent,certificate_authority,certificate_authority_id\x82\xd3\xe4\x93\x02]\"D/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities:\x15\x63\x65rtificate_authority\x12\x91\x02\n\x1b\x44isableCertificateAuthority\x12\x46.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\"L/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:disable:\x01*\x12\x8e\x02\n\x1a\x45nableCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02P\"K/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:enable:\x01*\x12\x8c\x02\n\x1c\x46\x65tchCertificateAuthorityCsr\x12G.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest\x1aH.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:fetch\x12\xec\x01\n\x17GetCertificateAuthority\x12\x42.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest\x1a\x38.google.cloud.security.privateca.v1.CertificateAuthority\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}\x12\x82\x02\n\x1aListCertificateAuthorities\x12\x45.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest\x1a\x46.google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse\"U\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities\x12\x94\x02\n\x1cUndeleteCertificateAuthority\x12G.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:undelete:\x01*\x12\x83\x02\n\x1a\x44\x65leteCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46*D/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}\x12\xce\x02\n\x1aUpdateCertificateAuthority\x12\x45.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41!certificate_authority,update_mask\x82\xd3\xe4\x93\x02s2Z/v1/{certificate_authority.name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:\x15\x63\x65rtificate_authority\x12\xde\x01\n\x0c\x43reateCaPool\x12\x37.google.cloud.security.privateca.v1.CreateCaPoolRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\x1b\n\x06\x43\x61Pool\x12\x11OperationMetadata\xda\x41\x19parent,ca_pool,ca_pool_id\x82\xd3\xe4\x93\x02\x36\"+/v1/{parent=projects/*/locations/*}/caPools:\x07\x63\x61_pool\x12\xe0\x01\n\x0cUpdateCaPool\x12\x37.google.cloud.security.privateca.v1.UpdateCaPoolRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x1b\n\x06\x43\x61Pool\x12\x11OperationMetadata\xda\x41\x13\x63\x61_pool,update_mask\x82\xd3\xe4\x93\x02>23/v1/{ca_pool.name=projects/*/locations/*/caPools/*}:\x07\x63\x61_pool\x12\xa9\x01\n\tGetCaPool\x12\x34.google.cloud.security.privateca.v1.GetCaPoolRequest\x1a*.google.cloud.security.privateca.v1.CaPool\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/caPools/*}\x12\xbc\x01\n\x0bListCaPools\x12\x36.google.cloud.security.privateca.v1.ListCaPoolsRequest\x1a\x37.google.cloud.security.privateca.v1.ListCaPoolsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/caPools\x12\xcf\x01\n\x0c\x44\x65leteCaPool\x12\x37.google.cloud.security.privateca.v1.DeleteCaPoolRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/caPools/*}\x12\xd3\x01\n\x0c\x46\x65tchCaCerts\x12\x37.google.cloud.security.privateca.v1.FetchCaCertsRequest\x1a\x38.google.cloud.security.privateca.v1.FetchCaCertsResponse\"P\xda\x41\x07\x63\x61_pool\x82\xd3\xe4\x93\x02@\";/v1/{ca_pool=projects/*/locations/*/caPools/*}:fetchCaCerts:\x01*\x12\x98\x02\n\x1cGetCertificateRevocationList\x12G.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest\x1a=.google.cloud.security.privateca.v1.CertificateRevocationList\"p\xda\x41\x04name\x82\xd3\xe4\x93\x02\x63\x12\x61/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}\x12\xab\x02\n\x1eListCertificateRevocationLists\x12I.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest\x1aJ.google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse\"r\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x63\x12\x61/v1/{parent=projects/*/locations/*/caPools/*/certificateAuthorities/*}/certificateRevocationLists\x12\x8d\x03\n\x1fUpdateCertificateRevocationList\x12J.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest\x1a\x1d.google.longrunning.Operation\"\xfe\x01\xca\x41.\n\x19\x43\x65rtificateRevocationList\x12\x11OperationMetadata\xda\x41\'certificate_revocation_list,update_mask\x82\xd3\xe4\x93\x02\x9c\x01\x32}/v1/{certificate_revocation_list.name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}:\x1b\x63\x65rtificate_revocation_list\x12\xba\x02\n\x19\x43reateCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41(\n\x13\x43\x65rtificateTemplate\x12\x11OperationMetadata\xda\x41\x33parent,certificate_template,certificate_template_id\x82\xd3\xe4\x93\x02P\"8/v1/{parent=projects/*/locations/*}/certificateTemplates:\x14\x63\x65rtificate_template\x12\x9a\x02\n\x19\x44\x65leteCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41M\n\x15google.protobuf.Empty\x12\x34google.cloud.security.privateca.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/certificateTemplates/*}\x12\xdd\x01\n\x16GetCertificateTemplate\x12\x41.google.cloud.security.privateca.v1.GetCertificateTemplateRequest\x1a\x37.google.cloud.security.privateca.v1.CertificateTemplate\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/certificateTemplates/*}\x12\xf0\x01\n\x18ListCertificateTemplates\x12\x43.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest\x1a\x44.google.cloud.security.privateca.v1.ListCertificateTemplatesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/certificateTemplates\x12\xbc\x02\n\x19UpdateCertificateTemplate\x12\x44.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41(\n\x13\x43\x65rtificateTemplate\x12\x11OperationMetadata\xda\x41 certificate_template,update_mask\x82\xd3\xe4\x93\x02\x65\x32M/v1/{certificate_template.name=projects/*/locations/*/certificateTemplates/*}:\x14\x63\x65rtificate_template\x1aL\xca\x41\x18privateca.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf3\x01\n&com.google.cloud.security.privateca.v1B\x0ePrivateCaProtoP\x01ZDcloud.google.com/go/security/privateca/apiv1/privatecapb;privatecapb\xaa\x02\"Google.Cloud.Security.PrivateCA.V1\xca\x02\"Google\\Cloud\\Security\\PrivateCA\\V1\xea\x02&Google::Cloud::Security::PrivateCA::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Security - module PrivateCA - module V1 - CreateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CreateCertificateRequest").msgclass - GetCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.GetCertificateRequest").msgclass - ListCertificatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificatesRequest").msgclass - ListCertificatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificatesResponse").msgclass - RevokeCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.RevokeCertificateRequest").msgclass - UpdateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UpdateCertificateRequest").msgclass - ActivateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest").msgclass - CreateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest").msgclass - DisableCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest").msgclass - EnableCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest").msgclass - FetchCertificateAuthorityCsrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest").msgclass - FetchCertificateAuthorityCsrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse").msgclass - GetCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.GetCertificateAuthorityRequest").msgclass - ListCertificateAuthoritiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest").msgclass - ListCertificateAuthoritiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse").msgclass - UndeleteCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest").msgclass - DeleteCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest").msgclass - UpdateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest").msgclass - CreateCaPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CreateCaPoolRequest").msgclass - UpdateCaPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UpdateCaPoolRequest").msgclass - DeleteCaPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.DeleteCaPoolRequest").msgclass - FetchCaCertsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.FetchCaCertsRequest").msgclass - FetchCaCertsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.FetchCaCertsResponse").msgclass - FetchCaCertsResponse::CertChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain").msgclass - GetCaPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.GetCaPoolRequest").msgclass - ListCaPoolsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCaPoolsRequest").msgclass - ListCaPoolsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCaPoolsResponse").msgclass - GetCertificateRevocationListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.GetCertificateRevocationListRequest").msgclass - ListCertificateRevocationListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest").msgclass - ListCertificateRevocationListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse").msgclass - UpdateCertificateRevocationListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest").msgclass - CreateCertificateTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.CreateCertificateTemplateRequest").msgclass - DeleteCertificateTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest").msgclass - GetCertificateTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.GetCertificateTemplateRequest").msgclass - ListCertificateTemplatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateTemplatesRequest").msgclass - ListCertificateTemplatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.ListCertificateTemplatesResponse").msgclass - UpdateCertificateTemplateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1.OperationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb deleted file mode 100644 index a9cc50318222..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/lib/google/cloud/security/privateca/v1/service_services_pb.rb +++ /dev/null @@ -1,150 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/security/privateca/v1/service.proto for package 'Google.Cloud.Security.PrivateCA.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/security/privateca/v1/service_pb' - -module Google - module Cloud - module Security - module PrivateCA - module V1 - module CertificateAuthorityService - # [Certificate Authority - # Service][google.cloud.security.privateca.v1.CertificateAuthorityService] - # manages private certificate authorities and issued certificates. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.security.privateca.v1.CertificateAuthorityService' - - # Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] - # in a given Project, Location from a particular - # [CaPool][google.cloud.security.privateca.v1.CaPool]. - rpc :CreateCertificate, ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1::Certificate - # Returns a [Certificate][google.cloud.security.privateca.v1.Certificate]. - rpc :GetCertificate, ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1::Certificate - # Lists [Certificates][google.cloud.security.privateca.v1.Certificate]. - rpc :ListCertificates, ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest, ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse - # Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate]. - rpc :RevokeCertificate, ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1::Certificate - # Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. - # Currently, the only field you can update is the - # [labels][google.cloud.security.privateca.v1.Certificate.labels] field. - rpc :UpdateCertificate, ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1::Certificate - # Activate a - # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - # that is in state - # [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] - # and is of type - # [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. - # After the parent Certificate Authority signs a certificate signing request - # from - # [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], - # this method can complete the activation process. - rpc :ActivateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Create a new - # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - # in a given Project and Location. - rpc :CreateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Disable a - # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc :DisableCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Enable a - # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc :EnableCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Fetch a certificate signing request (CSR) from a - # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - # that is in state - # [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] - # and is of type - # [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. - # The CSR must then be signed by the desired parent Certificate Authority, - # which could be another - # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - # resource, or could be an on-prem certificate authority. See also - # [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority]. - rpc :FetchCertificateAuthorityCsr, ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest, ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse - # Returns a - # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc :GetCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest, ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority - # Lists - # [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc :ListCertificateAuthorities, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse - # Undelete a - # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - # that has been deleted. - rpc :UndeleteCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Delete a - # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc :DeleteCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Update a - # [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc :UpdateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Create a [CaPool][google.cloud.security.privateca.v1.CaPool]. - rpc :CreateCaPool, ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest, ::Google::Longrunning::Operation - # Update a [CaPool][google.cloud.security.privateca.v1.CaPool]. - rpc :UpdateCaPool, ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest, ::Google::Longrunning::Operation - # Returns a [CaPool][google.cloud.security.privateca.v1.CaPool]. - rpc :GetCaPool, ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest, ::Google::Cloud::Security::PrivateCA::V1::CaPool - # Lists [CaPools][google.cloud.security.privateca.v1.CaPool]. - rpc :ListCaPools, ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest, ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse - # Delete a [CaPool][google.cloud.security.privateca.v1.CaPool]. - rpc :DeleteCaPool, ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest, ::Google::Longrunning::Operation - # FetchCaCerts returns the current trust anchor for the - # [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA - # certificate chains for all certificate authorities in the ENABLED, - # DISABLED, or STAGED states. - rpc :FetchCaCerts, ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest, ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse - # Returns a - # [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. - rpc :GetCertificateRevocationList, ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest, ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList - # Lists - # [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList]. - rpc :ListCertificateRevocationLists, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse - # Update a - # [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. - rpc :UpdateCertificateRevocationList, ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest, ::Google::Longrunning::Operation - # Create a new - # [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] - # in a given Project and Location. - rpc :CreateCertificateTemplate, ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest, ::Google::Longrunning::Operation - # DeleteCertificateTemplate deletes a - # [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. - rpc :DeleteCertificateTemplate, ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest, ::Google::Longrunning::Operation - # Returns a - # [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. - rpc :GetCertificateTemplate, ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest, ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate - # Lists - # [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate]. - rpc :ListCertificateTemplates, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest, ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse - # Update a - # [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. - rpc :UpdateCertificateTemplate, ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/README.md deleted file mode 100644 index c573f864e64a..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Certificate Authority Service V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb deleted file mode 100644 index a49d13fd66e4..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/resources.rb +++ /dev/null @@ -1,1725 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # A - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # represents an individual Certificate Authority. A - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # can be used to create - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @!attribute [rw] type - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type] - # Required. Immutable. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::Type Type} of - # this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # @!attribute [rw] config - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateConfig] - # Required. Immutable. The config used to create a self-signed X.509 - # certificate or CSR. - # @!attribute [rw] lifetime - # @return [::Google::Protobuf::Duration] - # Required. Immutable. The desired lifetime of the CA certificate. Used to - # create the "not_before_time" and "not_after_time" fields inside an X.509 - # certificate. - # @!attribute [rw] key_spec - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::KeyVersionSpec] - # Required. Immutable. Used when issuing certificates for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # If this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # is a self-signed CertificateAuthority, this key is also used to sign the - # self-signed CA certificate. Otherwise, it is used to sign a CSR. - # @!attribute [rw] subordinate_config - # @return [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig] - # Optional. If this is a subordinate - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}, - # this field will be set with the subordinate configuration, which describes - # its issuers. This may be updated, but this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # must continue to validate. - # @!attribute [r] tier - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::Tier] - # Output only. The - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::Tier CaPool.Tier} of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} that includes this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # @!attribute [r] state - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State] - # Output only. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State State} for - # this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # @!attribute [r] pem_ca_certificates - # @return [::Array<::String>] - # Output only. This - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s - # certificate chain, including the current - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s - # certificate. Ordered such that the root issuer is the final element - # (consistent with RFC 5246). For a self-signed CA, this will only list the - # current - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s - # certificate. - # @!attribute [r] ca_certificate_descriptions - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateDescription>] - # Output only. A structured description of this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s - # CA certificate and its issuers. Ordered as self-to-root. - # @!attribute [rw] gcs_bucket - # @return [::String] - # Immutable. The name of a Cloud Storage bucket where this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # will publish content, such as the CA certificate and CRLs. This must be a - # bucket name, without any prefixes (such as `gs://`) or suffixes (such as - # `.googleapis.com`). For example, to use a bucket named `my-bucket`, you - # would simply specify `my-bucket`. If not specified, a managed bucket will - # be created. - # @!attribute [r] access_urls - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::AccessUrls] - # Output only. URLs for accessing content published by this CA, such as the - # CA certificate and CRLs. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # was last updated. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # was soft deleted, if it is in the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::DELETED DELETED} - # state. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # will be permanently purged, if it is in the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::State::DELETED DELETED} - # state. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels with user-defined metadata. - # @!attribute [rw] user_defined_access_urls - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::UserDefinedAccessUrls] - # Optional. User-defined URLs for CA certificate and CRLs. The service does - # not publish content to these URLs. It is up to the user to mirror content - # to these URLs. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - class CertificateAuthority - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # URLs where a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # will publish content. - # @!attribute [rw] ca_certificate_access_url - # @return [::String] - # The URL where this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s - # CA certificate is published. This will only be set for CAs that have been - # activated. - # @!attribute [rw] crl_access_urls - # @return [::Array<::String>] - # The URLs where this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s - # CRLs are published. This will only be set for CAs that have been - # activated. - class AccessUrls - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Cloud KMS key configuration that a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # will use. - # @!attribute [rw] cloud_kms_key_version - # @return [::String] - # The resource name for an existing Cloud KMS CryptoKeyVersion in the - # format - # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - # This option enables full flexibility in the key's capabilities and - # properties. - # - # Note: The following fields are mutually exclusive: `cloud_kms_key_version`, `algorithm`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] algorithm - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority::SignHashAlgorithm] - # The algorithm to use for creating a managed Cloud KMS key for a for a - # simplified experience. All managed keys will be have their - # [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`. - # - # Note: The following fields are mutually exclusive: `algorithm`, `cloud_kms_key_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class KeyVersionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # User-defined URLs for accessing content published by this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # @!attribute [rw] aia_issuing_certificate_urls - # @return [::Array<::String>] - # Optional. A list of URLs where the issuer CA certificate may be - # downloaded, which appears in the "Authority Information Access" extension - # in the certificate. If specified, the default [Cloud Storage - # URLs][google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.ca_certificate_access_url] - # will be omitted. - # @!attribute [rw] crl_access_urls - # @return [::Array<::String>] - # Optional. A list of URLs where to obtain CRL information, i.e. - # the DistributionPoint.fullName described by - # https://tools.ietf.org/html/rfc5280#section-4.2.1.13. - # If specified, the default - # [Cloud Storage - # URLs][google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.crl_access_urls] - # will be omitted. - class UserDefinedAccessUrls - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}, - # indicating its issuing chain. - module Type - # Not specified. - TYPE_UNSPECIFIED = 0 - - # Self-signed CA. - SELF_SIGNED = 1 - - # Subordinate CA. Could be issued by a Private CA - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # or an unmanaged CA. - SUBORDINATE = 2 - end - - # The state of a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}, - # indicating if it can be used. - module State - # Not specified. - STATE_UNSPECIFIED = 0 - - # Certificates can be issued from this CA. CRLs will be generated for this - # CA. The CA will be part of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s trust anchor, and - # will be used to issue certificates from the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - ENABLED = 1 - - # Certificates cannot be issued from this CA. CRLs will still be generated. - # The CA will be part of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s trust anchor, but - # will not be used to issue certificates from the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - DISABLED = 2 - - # Certificates can be issued from this CA. CRLs will be generated for this - # CA. The CA will be part of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s trust anchor, but - # will not be used to issue certificates from the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - STAGED = 3 - - # Certificates cannot be issued from this CA. CRLs will not be generated. - # The CA will not be part of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s trust anchor, and - # will not be used to issue certificates from the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - AWAITING_USER_ACTIVATION = 4 - - # Certificates cannot be issued from this CA. CRLs will not be generated. - # The CA may still be recovered by calling - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#undelete_certificate_authority CertificateAuthorityService.UndeleteCertificateAuthority} - # before - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#expire_time expire_time}. - # The CA will not be part of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s trust anchor, and - # will not be used to issue certificates from the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - DELETED = 5 - end - - # The algorithm of a Cloud KMS CryptoKeyVersion of a - # [CryptoKey][google.cloud.kms.v1.CryptoKey] with the - # [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value - # `ASYMMETRIC_SIGN`. These values correspond to the - # [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - # values. For RSA signing algorithms, the PSS algorithms should be preferred, - # use PKCS1 algorithms if required for compatibility. For further - # recommendations, see - # https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations. - module SignHashAlgorithm - # Not specified. - SIGN_HASH_ALGORITHM_UNSPECIFIED = 0 - - # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256 - RSA_PSS_2048_SHA256 = 1 - - # maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256 - RSA_PSS_3072_SHA256 = 2 - - # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256 - RSA_PSS_4096_SHA256 = 3 - - # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256 - RSA_PKCS1_2048_SHA256 = 6 - - # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256 - RSA_PKCS1_3072_SHA256 = 7 - - # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256 - RSA_PKCS1_4096_SHA256 = 8 - - # maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256 - EC_P256_SHA256 = 4 - - # maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384 - EC_P384_SHA384 = 5 - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} represents a group of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} - # that form a trust anchor. A - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} can be used to manage - # issuance policies for one or more - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # resources and to rotate CA certificates in and out of the trust anchor. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format - # `projects/*/locations/*/caPools/*`. - # @!attribute [rw] tier - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::Tier] - # Required. Immutable. The - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::Tier Tier} of this - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # @!attribute [rw] issuance_policy - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy] - # Optional. The - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy IssuancePolicy} - # to control how - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} will be - # issued from this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # @!attribute [rw] publishing_options - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::PublishingOptions] - # Optional. The - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::PublishingOptions PublishingOptions} - # to follow when issuing - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} from any - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # @!attribute [rw] encryption_spec - # @return [::Google::Cloud::Security::PrivateCA::V1::EncryptionSpec] - # Optional. When - # {::Google::Cloud::Security::PrivateCA::V1::EncryptionSpec EncryptionSpec} is - # provided, the {::Google::Cloud::Security::PrivateCA::V1::Subject Subject}, - # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames}, and - # the PEM-encoded certificate fields will be encrypted at rest. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels with user-defined metadata. - class CaPool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Options relating to the publication of each - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s - # CA certificate and CRLs and their inclusion as extensions in issued - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. The options - # set here apply to certificates issued by any - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # @!attribute [rw] publish_ca_cert - # @return [::Boolean] - # Optional. When true, publishes each - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s - # CA certificate and includes its URL in the "Authority Information Access" - # X.509 extension in all issued - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. If this - # is false, the CA certificate will not be published and the corresponding - # X.509 extension will not be written in issued certificates. - # @!attribute [rw] publish_crl - # @return [::Boolean] - # Optional. When true, publishes each - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s - # CRL and includes its URL in the "CRL Distribution Points" X.509 extension - # in all issued - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. If this - # is false, CRLs will not be published and the corresponding X.509 - # extension will not be written in issued certificates. CRLs will expire 7 - # days from their creation. However, we will rebuild daily. CRLs are also - # rebuilt shortly after a certificate is revoked. - # @!attribute [rw] encoding_format - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::PublishingOptions::EncodingFormat] - # Optional. Specifies the encoding format of each - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # resource's CA certificate and CRLs. If this is omitted, CA certificates - # and CRLs will be published in PEM. - class PublishingOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Supported encoding formats for publishing. - module EncodingFormat - # Not specified. By default, PEM format will be used. - ENCODING_FORMAT_UNSPECIFIED = 0 - - # The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s - # CA certificate and CRLs will be published in PEM format. - PEM = 1 - - # The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}'s - # CA certificate and CRLs will be published in DER format. - DER = 2 - end - end - - # Defines controls over all certificate issuance within a - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # @!attribute [rw] allowed_key_types - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType>] - # Optional. If any - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType AllowedKeyType} - # is specified, then the certificate request's public key must match one of - # the key types listed here. Otherwise, any key may be used. - # @!attribute [rw] backdate_duration - # @return [::Google::Protobuf::Duration] - # Optional. If set, all certificates issued from this - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} will be backdated by - # this duration. The 'not_before_time' will be the issuance time minus this - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#backdate_duration backdate_duration}, - # and the 'not_after_time' will be adjusted to preserve the requested - # lifetime. The maximum duration that a certificate can be backdated with - # these options is 48 hours in the past. - # This option cannot be set if - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#allow_requester_specified_not_before_time allow_requester_specified_not_before_time} - # is set. - # @!attribute [rw] allow_requester_specified_not_before_time - # @return [::Boolean] - # Optional. If set to true, allows requesters to specify the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate#requested_not_before_time requested_not_before_time} - # field when creating a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. - # Certificates requested with this option enabled will have a - # 'not_before_time' equal to the value specified in the request. The - # 'not_after_time' will be adjusted to preserve the requested lifetime. The - # maximum time that a certificate can be backdated with these options is 48 - # hours in the past. This option cannot be set if - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#backdate_duration backdate_duration} - # is set. - # @!attribute [rw] maximum_lifetime - # @return [::Google::Protobuf::Duration] - # Optional. The maximum lifetime allowed for issued - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. Note that - # if the issuing - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # expires before a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} resource's - # requested maximum_lifetime, the effective lifetime will be explicitly - # truncated to match it. - # @!attribute [rw] allowed_issuance_modes - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::IssuanceModes] - # Optional. If specified, then only methods allowed in the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::IssuanceModes IssuanceModes} - # may be used to issue - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. - # @!attribute [rw] baseline_values - # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters] - # Optional. A set of X.509 values that will be applied to all certificates - # issued through this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # If a certificate request includes conflicting values for the same - # properties, they will be overwritten by the values defined here. If a - # certificate request uses a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # that defines conflicting - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#predefined_values predefined_values} - # for the same properties, the certificate issuance request will fail. - # @!attribute [rw] identity_constraints - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateIdentityConstraints] - # Optional. Describes constraints on identities that may appear in - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} issued - # through this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. If this - # is omitted, then this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} - # will not add restrictions on a certificate's identity. - # @!attribute [rw] passthrough_extensions - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateExtensionConstraints] - # Optional. Describes the set of X.509 extensions that may appear in a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued - # through this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. If a - # certificate request sets extensions that don't appear in the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#passthrough_extensions passthrough_extensions}, - # those extensions will be dropped. If a certificate request uses a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # with - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#predefined_values predefined_values} - # that don't appear here, the certificate issuance request will fail. If - # this is omitted, then this - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} will not add - # restrictions on a certificate's X.509 extensions. These constraints do - # not apply to X.509 extensions set in this - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#baseline_values baseline_values}. - class IssuancePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a "type" of key that may be used in a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued from - # a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. Note that a single - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType AllowedKeyType} - # may refer to either a fully-qualified key algorithm, such as RSA 4096, or - # a family of key algorithms, such as any RSA key. - # @!attribute [rw] rsa - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType::RsaKeyType] - # Represents an allowed RSA key type. - # - # Note: The following fields are mutually exclusive: `rsa`, `elliptic_curve`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] elliptic_curve - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType::EcKeyType] - # Represents an allowed Elliptic Curve key type. - # - # Note: The following fields are mutually exclusive: `elliptic_curve`, `rsa`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AllowedKeyType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes an RSA key that may be used in a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued - # from a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # @!attribute [rw] min_modulus_size - # @return [::Integer] - # Optional. The minimum allowed RSA modulus size (inclusive), in bits. - # If this is not set, or if set to zero, the service-level min RSA - # modulus size will continue to apply. - # @!attribute [rw] max_modulus_size - # @return [::Integer] - # Optional. The maximum allowed RSA modulus size (inclusive), in bits. - # If this is not set, or if set to zero, the service will not enforce - # an explicit upper bound on RSA modulus sizes. - class RsaKeyType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes an Elliptic Curve key that may be used in a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued - # from a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # @!attribute [rw] signature_algorithm - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::AllowedKeyType::EcKeyType::EcSignatureAlgorithm] - # Optional. A signature algorithm that must be used. If this is - # omitted, any EC-based signature algorithm will be allowed. - class EcKeyType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes an elliptic curve-based signature algorithm that may be - # used in a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued - # from a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - module EcSignatureAlgorithm - # Not specified. Signifies that any signature algorithm may be used. - EC_SIGNATURE_ALGORITHM_UNSPECIFIED = 0 - - # Refers to the Elliptic Curve Digital Signature Algorithm over the - # NIST P-256 curve. - ECDSA_P256 = 1 - - # Refers to the Elliptic Curve Digital Signature Algorithm over the - # NIST P-384 curve. - ECDSA_P384 = 2 - - # Refers to the Edwards-curve Digital Signature Algorithm over curve - # 25519, as described in RFC 8410. - EDDSA_25519 = 3 - end - end - end - - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy::IssuanceModes IssuanceModes} - # specifies the allowed ways in which - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} may be - # requested from this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # @!attribute [rw] allow_csr_based_issuance - # @return [::Boolean] - # Optional. When true, allows callers to create - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} by - # specifying a CSR. - # @!attribute [rw] allow_config_based_issuance - # @return [::Boolean] - # Optional. When true, allows callers to create - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} by - # specifying a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateConfig CertificateConfig}. - class IssuanceModes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The tier of a {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}, - # indicating its supported functionality and/or billing SKU. - module Tier - # Not specified. - TIER_UNSPECIFIED = 0 - - # Enterprise tier. - ENTERPRISE = 1 - - # DevOps tier. - DEVOPS = 2 - end - end - - # The configuration used for encrypting data at rest. - # @!attribute [rw] cloud_kms_key - # @return [::String] - # The resource name for a Cloud KMS key in the format - # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - class EncryptionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # corresponds to a signed X.509 certificate Revocation List (CRL). A CRL - # contains the serial numbers of certificates that should no longer be trusted. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # in the format `projects/*/locations/*/caPools/*certificateAuthorities/*/ - # certificateRevocationLists/*`. - # @!attribute [r] sequence_number - # @return [::Integer] - # Output only. The CRL sequence number that appears in pem_crl. - # @!attribute [r] revoked_certificates - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList::RevokedCertificate>] - # Output only. The revoked serial numbers that appear in pem_crl. - # @!attribute [r] pem_crl - # @return [::String] - # Output only. The PEM-encoded X.509 CRL. - # @!attribute [r] access_url - # @return [::String] - # Output only. The location where 'pem_crl' can be accessed. - # @!attribute [r] state - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList::State] - # Output only. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList::State State} - # for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # was updated. - # @!attribute [r] revision_id - # @return [::String] - # Output only. The revision ID of this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}. - # A new revision is committed whenever a new CRL is published. The format is - # an 8-character hexadecimal string. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels with user-defined metadata. - class CertificateRevocationList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a revoked - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. - # @!attribute [rw] certificate - # @return [::String] - # The resource name for the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the - # format `projects/*/locations/*/caPools/*/certificates/*`. - # @!attribute [rw] hex_serial_number - # @return [::String] - # The serial number of the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. - # @!attribute [rw] revocation_reason - # @return [::Google::Cloud::Security::PrivateCA::V1::RevocationReason] - # The reason the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} was - # revoked. - class RevokedCertificate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList}, - # indicating if it is current. - module State - # Not specified. - STATE_UNSPECIFIED = 0 - - # The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # is up to date. - ACTIVE = 1 - - # The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # is no longer current. - SUPERSEDED = 2 - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} corresponds - # to a signed X.509 certificate issued by a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the format - # `projects/*/locations/*/caPools/*/certificates/*`. - # @!attribute [rw] pem_csr - # @return [::String] - # Immutable. A pem-encoded X.509 certificate signing request (CSR). - # - # Note: The following fields are mutually exclusive: `pem_csr`, `config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] config - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateConfig] - # Immutable. A description of the certificate and key that does not require - # X.509 or ASN.1. - # - # Note: The following fields are mutually exclusive: `config`, `pem_csr`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] issuer_certificate_authority - # @return [::String] - # Output only. The resource name of the issuing - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @!attribute [rw] lifetime - # @return [::Google::Protobuf::Duration] - # Required. Immutable. The desired lifetime of a certificate. Used to create - # the "not_before_time" and "not_after_time" fields inside an X.509 - # certificate. Note that the lifetime may be truncated if it would extend - # past the life of any certificate authority in the issuing chain. - # @!attribute [rw] certificate_template - # @return [::String] - # Immutable. The resource name for a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # used to issue this certificate, in the format - # `projects/*/locations/*/certificateTemplates/*`. - # If this is specified, the caller must have the necessary permission to - # use this template. If this is omitted, no template will be used. - # This template must be in the same location as the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. - # @!attribute [rw] subject_mode - # @return [::Google::Cloud::Security::PrivateCA::V1::SubjectRequestMode] - # Immutable. Specifies how the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}'s identity - # fields are to be decided. If this is omitted, the `DEFAULT` subject mode - # will be used. - # @!attribute [r] revocation_details - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate::RevocationDetails] - # Output only. Details regarding the revocation of this - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. This - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} is considered - # revoked if and only if this field is present. - # @!attribute [r] pem_certificate - # @return [::String] - # Output only. The pem-encoded, signed X.509 certificate. - # @!attribute [r] certificate_description - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateDescription] - # Output only. A structured description of the issued X.509 certificate. - # @!attribute [r] pem_certificate_chain - # @return [::Array<::String>] - # Output only. The chain that may be used to verify the X.509 certificate. - # Expected to be in issuer-to-root order according to RFC 5246. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels with user-defined metadata. - # @!attribute [rw] requested_not_before_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The requested - # {::Google::Cloud::Security::PrivateCA::V1::CertificateDescription::SubjectDescription#not_before_time not_before_time} - # of this {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. This - # field may only be set if the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#allow_requester_specified_not_before_time CaPool.IssuancePolicy.allow_requester_specified_not_before_time} - # field is set to true for the issuing - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}. - # - # If this field is specified, the certificate will be issued with this - # 'not_before_time'. If this is not specified, the 'not_before_time' will be - # set to the issuance time or issuance time minus - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#backdate_duration backdate_duration} - # depending on the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} - # configuration. - class Certificate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes fields that are relavent to the revocation of a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. - # @!attribute [rw] revocation_state - # @return [::Google::Cloud::Security::PrivateCA::V1::RevocationReason] - # Indicates why a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} was - # revoked. - # @!attribute [rw] revocation_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} was - # revoked. - class RevocationDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # refers to a managed template for certificate issuance. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # in the format `projects/*/locations/*/certificateTemplates/*`. - # @!attribute [rw] maximum_lifetime - # @return [::Google::Protobuf::Duration] - # Optional. The maximum lifetime allowed for issued - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} that use - # this template. If the issuing - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} resource's - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy IssuancePolicy} - # specifies a - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#maximum_lifetime maximum_lifetime} - # the minimum of the two durations will be the maximum lifetime for issued - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. Note that - # if the issuing - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # expires before a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}'s requested - # maximum_lifetime, the effective lifetime will be explicitly truncated - # to match it. - # @!attribute [rw] predefined_values - # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters] - # Optional. A set of X.509 values that will be applied to all issued - # certificates that use this template. If the certificate request includes - # conflicting values for the same properties, they will be overwritten by the - # values defined here. If the issuing - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy IssuancePolicy} - # defines conflicting - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#baseline_values baseline_values} - # for the same properties, the certificate issuance request will fail. - # @!attribute [rw] identity_constraints - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateIdentityConstraints] - # Optional. Describes constraints on identities that may be appear in - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} issued using - # this template. If this is omitted, then this template will not add - # restrictions on a certificate's identity. - # @!attribute [rw] passthrough_extensions - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateExtensionConstraints] - # Optional. Describes the set of X.509 extensions that may appear in a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} issued using - # this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}. - # If a certificate request sets extensions that don't appear in the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#passthrough_extensions passthrough_extensions}, - # those extensions will be dropped. If the issuing - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy IssuancePolicy} - # defines - # {::Google::Cloud::Security::PrivateCA::V1::CaPool::IssuancePolicy#baseline_values baseline_values} - # that don't appear here, the certificate issuance request will fail. If this - # is omitted, then this template will not add restrictions on a certificate's - # X.509 extensions. These constraints do not apply to X.509 extensions set in - # this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}'s - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#predefined_values predefined_values}. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of scenarios this template is - # intended for. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels with user-defined metadata. - class CertificateTemplate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An {::Google::Cloud::Security::PrivateCA::V1::X509Parameters X509Parameters} is - # used to describe certain fields of an X.509 certificate, such as the key - # usage fields, fields specific to CA certificates, certificate policy - # extensions and custom extensions. - # @!attribute [rw] key_usage - # @return [::Google::Cloud::Security::PrivateCA::V1::KeyUsage] - # Optional. Indicates the intended use for keys that correspond to a - # certificate. - # @!attribute [rw] ca_options - # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters::CaOptions] - # Optional. Describes options in this - # {::Google::Cloud::Security::PrivateCA::V1::X509Parameters X509Parameters} that - # are relevant in a CA certificate. If not specified, a default basic - # constraints extension with `is_ca=false` will be added for leaf - # certificates. - # @!attribute [rw] policy_ids - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::ObjectId>] - # Optional. Describes the X.509 certificate policy object identifiers, per - # https://tools.ietf.org/html/rfc5280#section-4.2.1.4. - # @!attribute [rw] aia_ocsp_servers - # @return [::Array<::String>] - # Optional. Describes Online Certificate Status Protocol (OCSP) endpoint - # addresses that appear in the "Authority Information Access" extension in - # the certificate. - # @!attribute [rw] name_constraints - # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters::NameConstraints] - # Optional. Describes the X.509 name constraints extension. - # @!attribute [rw] additional_extensions - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::X509Extension>] - # Optional. Describes custom X.509 extensions. - class X509Parameters - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the X.509 basic constraints extension, per [RFC 5280 - # section 4.2.1.9](https://tools.ietf.org/html/rfc5280#section-4.2.1.9) - # @!attribute [rw] is_ca - # @return [::Boolean] - # Optional. Refers to the "CA" boolean field in the X.509 extension. - # When this value is missing, the basic constraints extension will be - # omitted from the certificate. - # @!attribute [rw] max_issuer_path_length - # @return [::Integer] - # Optional. Refers to the path length constraint field in the X.509 - # extension. For a CA certificate, this value describes the depth of - # subordinate CA certificates that are allowed. If this value is less than - # 0, the request will fail. If this value is missing, the max path length - # will be omitted from the certificate. - class CaOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the X.509 name constraints extension, per - # https://tools.ietf.org/html/rfc5280#section-4.2.1.10 - # @!attribute [rw] critical - # @return [::Boolean] - # Indicates whether or not the name constraints are marked critical. - # @!attribute [rw] permitted_dns_names - # @return [::Array<::String>] - # Contains permitted DNS names. Any DNS name that can be - # constructed by simply adding zero or more labels to - # the left-hand side of the name satisfies the name constraint. - # For example, `example.com`, `www.example.com`, `www.sub.example.com` - # would satisfy `example.com` while `example1.com` does not. - # @!attribute [rw] excluded_dns_names - # @return [::Array<::String>] - # Contains excluded DNS names. Any DNS name that can be - # constructed by simply adding zero or more labels to - # the left-hand side of the name satisfies the name constraint. - # For example, `example.com`, `www.example.com`, `www.sub.example.com` - # would satisfy `example.com` while `example1.com` does not. - # @!attribute [rw] permitted_ip_ranges - # @return [::Array<::String>] - # Contains the permitted IP ranges. For IPv4 addresses, the ranges - # are expressed using CIDR notation as specified in RFC 4632. - # For IPv6 addresses, the ranges are expressed in similar encoding as IPv4 - # addresses. - # @!attribute [rw] excluded_ip_ranges - # @return [::Array<::String>] - # Contains the excluded IP ranges. For IPv4 addresses, the ranges - # are expressed using CIDR notation as specified in RFC 4632. - # For IPv6 addresses, the ranges are expressed in similar encoding as IPv4 - # addresses. - # @!attribute [rw] permitted_email_addresses - # @return [::Array<::String>] - # Contains the permitted email addresses. The value can be a particular - # email address, a hostname to indicate all email addresses on that host or - # a domain with a leading period (e.g. `.example.com`) to indicate - # all email addresses in that domain. - # @!attribute [rw] excluded_email_addresses - # @return [::Array<::String>] - # Contains the excluded email addresses. The value can be a particular - # email address, a hostname to indicate all email addresses on that host or - # a domain with a leading period (e.g. `.example.com`) to indicate - # all email addresses in that domain. - # @!attribute [rw] permitted_uris - # @return [::Array<::String>] - # Contains the permitted URIs that apply to the host part of the name. - # The value can be a hostname or a domain with a - # leading period (like `.example.com`) - # @!attribute [rw] excluded_uris - # @return [::Array<::String>] - # Contains the excluded URIs that apply to the host part of the name. - # The value can be a hostname or a domain with a - # leading period (like `.example.com`) - class NameConstraints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes a subordinate CA's issuers. This is either a resource name to a - # known issuing - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}, - # or a PEM issuer certificate chain. - # @!attribute [rw] certificate_authority - # @return [::String] - # Required. This can refer to a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # that was used to create a subordinate - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}. - # This field is used for information and usability purposes only. The - # resource name is in the format - # `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # - # Note: The following fields are mutually exclusive: `certificate_authority`, `pem_issuer_chain`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pem_issuer_chain - # @return [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig::SubordinateConfigChain] - # Required. Contains the PEM certificate chain for the issuers of this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority}, - # but not pem certificate for this CA itself. - # - # Note: The following fields are mutually exclusive: `pem_issuer_chain`, `certificate_authority`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SubordinateConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This message describes a subordinate CA's issuer certificate chain. This - # wrapper exists for compatibility reasons. - # @!attribute [rw] pem_certificates - # @return [::Array<::String>] - # Required. Expected to be in leaf-to-root order according to RFC 5246. - class SubordinateConfigChain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1::PublicKey PublicKey} describes a - # public key. - # @!attribute [rw] key - # @return [::String] - # Required. A public key. The padding and encoding - # must match with the `KeyFormat` value specified for the `format` field. - # @!attribute [rw] format - # @return [::Google::Cloud::Security::PrivateCA::V1::PublicKey::KeyFormat] - # Required. The format of the public key. - class PublicKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of public keys formats that are supported. Currently, only `PEM` - # format is supported. - module KeyFormat - # Default unspecified value. - KEY_FORMAT_UNSPECIFIED = 0 - - # The key is PEM-encoded as defined in [RFC - # 7468](https://tools.ietf.org/html/rfc7468). It can be any of the - # following: a PEM-encoded PKCS#1/RFC 3447 RSAPublicKey - # structure, an RFC 5280 - # [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) - # or a PEM-encoded X.509 certificate signing request (CSR). If a - # [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) - # is specified, it can contain a A PEM-encoded PKCS#1/RFC 3447 RSAPublicKey - # or a NIST P-256/secp256r1/prime256v1 or P-384 key. If a CSR is specified, - # it will used solely for the purpose of extracting the public key. When - # generated by the service, it will always be an RFC 5280 - # [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) - # structure containing an algorithm identifier and a key. - PEM = 1 - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1::CertificateConfig CertificateConfig} - # describes an X.509 certificate or CSR that is to be created, as an - # alternative to using ASN.1. - # @!attribute [rw] subject_config - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateConfig::SubjectConfig] - # Required. Specifies some of the values in a certificate that are related to - # the subject. - # @!attribute [rw] x509_config - # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters] - # Required. Describes how some of the technical X.509 fields in a certificate - # should be populated. - # @!attribute [rw] public_key - # @return [::Google::Cloud::Security::PrivateCA::V1::PublicKey] - # Optional. The public key that corresponds to this config. This is, for - # example, used when issuing - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}, but not - # when creating a self-signed - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # or - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # CSR. - # @!attribute [rw] subject_key_id - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateConfig::KeyId] - # Optional. When specified this provides a custom SKI to be used in the - # certificate. This should only be used to maintain a SKI of an existing CA - # originally created outside CA service, which was not generated using method - # (1) described in RFC 5280 section 4.2.1.2. - class CertificateConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # These values are used to create the distinguished name and subject - # alternative name fields in an X.509 certificate. - # @!attribute [rw] subject - # @return [::Google::Cloud::Security::PrivateCA::V1::Subject] - # Optional. Contains distinguished name fields such as the common name, - # location and organization. - # @!attribute [rw] subject_alt_name - # @return [::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames] - # Optional. The subject alternative name fields. - class SubjectConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A KeyId identifies a specific public key, usually by hashing the public - # key. - # @!attribute [rw] key_id - # @return [::String] - # Required. The value of this KeyId encoded in lowercase hexadecimal. This - # is most likely the 160 bit SHA-1 hash of the public key. - class KeyId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A - # {::Google::Cloud::Security::PrivateCA::V1::CertificateDescription CertificateDescription} - # describes an X.509 certificate or CSR that has been issued, as an alternative - # to using ASN.1 / X.509. - # @!attribute [rw] subject_description - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateDescription::SubjectDescription] - # Describes some of the values in a certificate that are related to the - # subject and lifetime. - # @!attribute [rw] x509_description - # @return [::Google::Cloud::Security::PrivateCA::V1::X509Parameters] - # Describes some of the technical X.509 fields in a certificate. - # @!attribute [rw] public_key - # @return [::Google::Cloud::Security::PrivateCA::V1::PublicKey] - # The public key that corresponds to an issued certificate. - # @!attribute [rw] subject_key_id - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateDescription::KeyId] - # Provides a means of identifiying certificates that contain a particular - # public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2. - # @!attribute [rw] authority_key_id - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateDescription::KeyId] - # Identifies the subject_key_id of the parent certificate, per - # https://tools.ietf.org/html/rfc5280#section-4.2.1.1 - # @!attribute [rw] crl_distribution_points - # @return [::Array<::String>] - # Describes a list of locations to obtain CRL information, i.e. - # the DistributionPoint.fullName described by - # https://tools.ietf.org/html/rfc5280#section-4.2.1.13 - # @!attribute [rw] aia_issuing_certificate_urls - # @return [::Array<::String>] - # Describes lists of issuer CA certificate URLs that appear in the - # "Authority Information Access" extension in the certificate. - # @!attribute [rw] cert_fingerprint - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateDescription::CertificateFingerprint] - # The hash of the x.509 certificate. - # @!attribute [rw] tbs_certificate_digest - # @return [::String] - # The hash of the pre-signed certificate, which will be signed by the CA. - # Corresponds to the TBS Certificate in - # https://tools.ietf.org/html/rfc5280#section-4.1.2. The field will always be - # populated. - class CertificateDescription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # These values describe fields in an issued X.509 certificate such as the - # distinguished name, subject alternative names, serial number, and lifetime. - # @!attribute [rw] subject - # @return [::Google::Cloud::Security::PrivateCA::V1::Subject] - # Contains distinguished name fields such as the common name, location and - # / organization. - # @!attribute [rw] subject_alt_name - # @return [::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames] - # The subject alternative name fields. - # @!attribute [rw] hex_serial_number - # @return [::String] - # The serial number encoded in lowercase hexadecimal. - # @!attribute [rw] lifetime - # @return [::Google::Protobuf::Duration] - # For convenience, the actual lifetime of an issued certificate. - # @!attribute [rw] not_before_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the certificate becomes valid. - # @!attribute [rw] not_after_time - # @return [::Google::Protobuf::Timestamp] - # The time after which the certificate is expired. - # Per RFC 5280, the validity period for a certificate is the period of time - # from not_before_time through not_after_time, inclusive. - # Corresponds to 'not_before_time' + 'lifetime' - 1 second. - class SubjectDescription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A KeyId identifies a specific public key, usually by hashing the public - # key. - # @!attribute [rw] key_id - # @return [::String] - # Optional. The value of this KeyId encoded in lowercase hexadecimal. This - # is most likely the 160 bit SHA-1 hash of the public key. - class KeyId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A group of fingerprints for the x509 certificate. - # @!attribute [rw] sha256_hash - # @return [::String] - # The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate. - class CertificateFingerprint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An {::Google::Cloud::Security::PrivateCA::V1::ObjectId ObjectId} specifies an - # object identifier (OID). These provide context and describe types in ASN.1 - # messages. - # @!attribute [rw] object_id_path - # @return [::Array<::Integer>] - # Required. The parts of an OID path. The most significant parts of the path - # come first. - class ObjectId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An {::Google::Cloud::Security::PrivateCA::V1::X509Extension X509Extension} - # specifies an X.509 extension, which may be used in different parts of X.509 - # objects like certificates, CSRs, and CRLs. - # @!attribute [rw] object_id - # @return [::Google::Cloud::Security::PrivateCA::V1::ObjectId] - # Required. The OID for this X.509 extension. - # @!attribute [rw] critical - # @return [::Boolean] - # Optional. Indicates whether or not this extension is critical (i.e., if the - # client does not know how to handle this extension, the client should - # consider this to be an error). - # @!attribute [rw] value - # @return [::String] - # Required. The value of this X.509 extension. - class X509Extension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A {::Google::Cloud::Security::PrivateCA::V1::KeyUsage KeyUsage} describes key usage - # values that may appear in an X.509 certificate. - # @!attribute [rw] base_key_usage - # @return [::Google::Cloud::Security::PrivateCA::V1::KeyUsage::KeyUsageOptions] - # Describes high-level ways in which a key may be used. - # @!attribute [rw] extended_key_usage - # @return [::Google::Cloud::Security::PrivateCA::V1::KeyUsage::ExtendedKeyUsageOptions] - # Detailed scenarios in which a key may be used. - # @!attribute [rw] unknown_extended_key_usages - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::ObjectId>] - # Used to describe extended key usages that are not listed in the - # {::Google::Cloud::Security::PrivateCA::V1::KeyUsage::ExtendedKeyUsageOptions KeyUsage.ExtendedKeyUsageOptions} - # message. - class KeyUsage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # {::Google::Cloud::Security::PrivateCA::V1::KeyUsage::KeyUsageOptions KeyUsage.KeyUsageOptions} - # corresponds to the key usage values described in - # https://tools.ietf.org/html/rfc5280#section-4.2.1.3. - # @!attribute [rw] digital_signature - # @return [::Boolean] - # The key may be used for digital signatures. - # @!attribute [rw] content_commitment - # @return [::Boolean] - # The key may be used for cryptographic commitments. Note that this may - # also be referred to as "non-repudiation". - # @!attribute [rw] key_encipherment - # @return [::Boolean] - # The key may be used to encipher other keys. - # @!attribute [rw] data_encipherment - # @return [::Boolean] - # The key may be used to encipher data. - # @!attribute [rw] key_agreement - # @return [::Boolean] - # The key may be used in a key agreement protocol. - # @!attribute [rw] cert_sign - # @return [::Boolean] - # The key may be used to sign certificates. - # @!attribute [rw] crl_sign - # @return [::Boolean] - # The key may be used sign certificate revocation lists. - # @!attribute [rw] encipher_only - # @return [::Boolean] - # The key may be used to encipher only. - # @!attribute [rw] decipher_only - # @return [::Boolean] - # The key may be used to decipher only. - class KeyUsageOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # {::Google::Cloud::Security::PrivateCA::V1::KeyUsage::ExtendedKeyUsageOptions KeyUsage.ExtendedKeyUsageOptions} - # has fields that correspond to certain common OIDs that could be specified - # as an extended key usage value. - # @!attribute [rw] server_auth - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW - # server authentication", though regularly used for non-WWW TLS. - # @!attribute [rw] client_auth - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW - # client authentication", though regularly used for non-WWW TLS. - # @!attribute [rw] code_signing - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of - # downloadable executable code client authentication". - # @!attribute [rw] email_protection - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email - # protection". - # @!attribute [rw] time_stamping - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding - # the hash of an object to a time". - # @!attribute [rw] ocsp_signing - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing - # OCSP responses". - class ExtendedKeyUsageOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # {::Google::Cloud::Security::PrivateCA::V1::AttributeTypeAndValue AttributeTypeAndValue} - # specifies an attribute type and value. It can use either a OID or enum value - # to specify the attribute type. - # @!attribute [rw] type - # @return [::Google::Cloud::Security::PrivateCA::V1::AttributeType] - # The attribute type of the attribute and value pair. - # - # Note: The following fields are mutually exclusive: `type`, `object_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] object_id - # @return [::Google::Cloud::Security::PrivateCA::V1::ObjectId] - # Object ID for an attribute type of an attribute and value pair. - # - # Note: The following fields are mutually exclusive: `object_id`, `type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] value - # @return [::String] - # The value for the attribute type. - class AttributeTypeAndValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # {::Google::Cloud::Security::PrivateCA::V1::RelativeDistinguishedName RelativeDistinguishedName} - # specifies a relative distinguished name which will be used to build a - # distinguished name. - # @!attribute [rw] attributes - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::AttributeTypeAndValue>] - # Attributes describes the attribute value assertions in the RDN. - class RelativeDistinguishedName - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} describes parts of a - # distinguished name that, in turn, describes the subject of the certificate. - # @!attribute [rw] common_name - # @return [::String] - # The "common name" of the subject. - # @!attribute [rw] country_code - # @return [::String] - # The country code of the subject. - # @!attribute [rw] organization - # @return [::String] - # The organization of the subject. - # @!attribute [rw] organizational_unit - # @return [::String] - # The organizational_unit of the subject. - # @!attribute [rw] locality - # @return [::String] - # The locality or city of the subject. - # @!attribute [rw] province - # @return [::String] - # The province, territory, or regional state of the subject. - # @!attribute [rw] street_address - # @return [::String] - # The street address of the subject. - # @!attribute [rw] postal_code - # @return [::String] - # The postal code of the subject. - # @!attribute [rw] rdn_sequence - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::RelativeDistinguishedName>] - # This field can be used in place of the named subject fields. - class Subject - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} - # corresponds to a more modern way of listing what the asserted identity is in - # a certificate (i.e., compared to the "common name" in the distinguished - # name). - # @!attribute [rw] dns_names - # @return [::Array<::String>] - # Contains only valid, fully-qualified host names. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Contains only valid RFC 3986 URIs. - # @!attribute [rw] email_addresses - # @return [::Array<::String>] - # Contains only valid RFC 2822 E-mail addresses. - # @!attribute [rw] ip_addresses - # @return [::Array<::String>] - # Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses. - # @!attribute [rw] custom_sans - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::X509Extension>] - # Contains additional subject alternative name values. - # For each custom_san, the `value` field must contain an ASN.1 encoded - # UTF8String. - class SubjectAltNames - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes constraints on a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}'s - # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} and - # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames}. - # @!attribute [rw] cel_expression - # @return [::Google::Type::Expr] - # Optional. A CEL expression that may be used to validate the resolved X.509 - # Subject and/or Subject Alternative Name before a certificate is signed. To - # see the full allowed syntax and some examples, see - # https://cloud.google.com/certificate-authority-service/docs/using-cel - # @!attribute [rw] allow_subject_passthrough - # @return [::Boolean] - # Required. If this is true, the - # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} field may be copied - # from a certificate request into the signed certificate. Otherwise, the - # requested {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} will be - # discarded. - # @!attribute [rw] allow_subject_alt_names_passthrough - # @return [::Boolean] - # Required. If this is true, the - # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} - # extension may be copied from a certificate request into the signed - # certificate. Otherwise, the requested - # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} will - # be discarded. - class CertificateIdentityConstraints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a set of X.509 extensions that may be part of some certificate - # issuance controls. - # @!attribute [rw] known_extensions - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateExtensionConstraints::KnownCertificateExtension>] - # Optional. A set of named X.509 extensions. Will be combined with - # {::Google::Cloud::Security::PrivateCA::V1::CertificateExtensionConstraints#additional_extensions additional_extensions} - # to determine the full set of X.509 extensions. - # @!attribute [rw] additional_extensions - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::ObjectId>] - # Optional. A set of {::Google::Cloud::Security::PrivateCA::V1::ObjectId ObjectIds} - # identifying custom X.509 extensions. Will be combined with - # {::Google::Cloud::Security::PrivateCA::V1::CertificateExtensionConstraints#known_extensions known_extensions} - # to determine the full set of X.509 extensions. - class CertificateExtensionConstraints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes well-known X.509 extensions that can appear in a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}, not - # including the - # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} - # extension. - module KnownCertificateExtension - # Not specified. - KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED = 0 - - # Refers to a certificate's Key Usage extension, as described in [RFC 5280 - # section 4.2.1.3](https://tools.ietf.org/html/rfc5280#section-4.2.1.3). - # This corresponds to the - # {::Google::Cloud::Security::PrivateCA::V1::KeyUsage#base_key_usage KeyUsage.base_key_usage} - # field. - BASE_KEY_USAGE = 1 - - # Refers to a certificate's Extended Key Usage extension, as described in - # [RFC 5280 - # section 4.2.1.12](https://tools.ietf.org/html/rfc5280#section-4.2.1.12). - # This corresponds to the - # {::Google::Cloud::Security::PrivateCA::V1::KeyUsage#extended_key_usage KeyUsage.extended_key_usage} - # message. - EXTENDED_KEY_USAGE = 2 - - # Refers to a certificate's Basic Constraints extension, as described in - # [RFC 5280 - # section 4.2.1.9](https://tools.ietf.org/html/rfc5280#section-4.2.1.9). - # This corresponds to the - # {::Google::Cloud::Security::PrivateCA::V1::X509Parameters#ca_options X509Parameters.ca_options} - # field. - CA_OPTIONS = 3 - - # Refers to a certificate's Policy object identifiers, as described in - # [RFC 5280 - # section 4.2.1.4](https://tools.ietf.org/html/rfc5280#section-4.2.1.4). - # This corresponds to the - # {::Google::Cloud::Security::PrivateCA::V1::X509Parameters#policy_ids X509Parameters.policy_ids} - # field. - POLICY_IDS = 4 - - # Refers to OCSP servers in a certificate's Authority Information Access - # extension, as described in - # [RFC 5280 - # section 4.2.2.1](https://tools.ietf.org/html/rfc5280#section-4.2.2.1), - # This corresponds to the - # {::Google::Cloud::Security::PrivateCA::V1::X509Parameters#aia_ocsp_servers X509Parameters.aia_ocsp_servers} - # field. - AIA_OCSP_SERVERS = 5 - - # Refers to Name Constraints extension as described in - # [RFC 5280 - # section 4.2.1.10](https://tools.ietf.org/html/rfc5280#section-4.2.1.10) - NAME_CONSTRAINTS = 6 - end - end - - # {::Google::Cloud::Security::PrivateCA::V1::AttributeType AttributeType} specifies - # the type of Attribute in a relative distinguished name. - module AttributeType - # Attribute type is unspecified. - ATTRIBUTE_TYPE_UNSPECIFIED = 0 - - # The "common name" of the subject. - COMMON_NAME = 1 - - # The country code of the subject. - COUNTRY_CODE = 2 - - # The organization of the subject. - ORGANIZATION = 3 - - # The organizational unit of the subject. - ORGANIZATIONAL_UNIT = 4 - - # The locality or city of the subject. - LOCALITY = 5 - - # The province, territory, or regional state of the subject. - PROVINCE = 6 - - # The street address of the subject. - STREET_ADDRESS = 7 - - # The postal code of the subject. - POSTAL_CODE = 8 - end - - # A {::Google::Cloud::Security::PrivateCA::V1::RevocationReason RevocationReason} - # indicates whether a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} has been - # revoked, and the reason for revocation. These correspond to standard - # revocation reasons from RFC 5280. Note that the enum labels and values in - # this definition are not the same ASN.1 values defined in RFC 5280. These - # values will be translated to the correct ASN.1 values when a CRL is created. - module RevocationReason - # Default unspecified value. This value does indicate that a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} has been - # revoked, but that a reason has not been recorded. - REVOCATION_REASON_UNSPECIFIED = 0 - - # Key material for this - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} may have - # leaked. - KEY_COMPROMISE = 1 - - # The key material for a certificate authority in the issuing path may have - # leaked. - CERTIFICATE_AUTHORITY_COMPROMISE = 2 - - # The subject or other attributes in this - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} have changed. - AFFILIATION_CHANGED = 3 - - # This {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} has been - # superseded. - SUPERSEDED = 4 - - # This {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} or - # entities in the issuing path have ceased to operate. - CESSATION_OF_OPERATION = 5 - - # This {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} should - # not be considered valid, it is expected that it may become valid in the - # future. - CERTIFICATE_HOLD = 6 - - # This {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} no - # longer has permission to assert the listed attributes. - PRIVILEGE_WITHDRAWN = 7 - - # The authority which determines appropriate attributes for a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} may have been - # compromised. - ATTRIBUTE_AUTHORITY_COMPROMISE = 8 - end - - # Describes the way in which a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}'s - # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} and/or - # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} will be - # resolved. - module SubjectRequestMode - # Not specified. - SUBJECT_REQUEST_MODE_UNSPECIFIED = 0 - - # The default mode used in most cases. Indicates that the certificate's - # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} and/or - # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} are - # specified in the certificate request. This mode requires the caller to have - # the `privateca.certificates.create` permission. - DEFAULT = 1 - - # A mode used to get an accurate representation of the Subject - # field's distinguished name. Indicates that the certificate's - # {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} and/or - # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} are - # specified in the certificate request. When parsing a PEM CSR this mode will - # maintain the sequence of RDNs found in the CSR's subject field in the - # issued {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}. This - # mode requires the caller to have the `privateca.certificates.create` - # permission. - RDN_SEQUENCE = 3 - - # A mode reserved for special cases. Indicates that the certificate should - # have one SPIFFE - # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} set - # by the service based on the caller's identity. This mode will ignore any - # explicitly specified {::Google::Cloud::Security::PrivateCA::V1::Subject Subject} - # and/or - # {::Google::Cloud::Security::PrivateCA::V1::SubjectAltNames SubjectAltNames} in - # the certificate request. This mode requires the caller to have the - # `privateca.certificates.createForSelf` permission. - REFLECTED_SPIFFE = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb deleted file mode 100644 index 6a4a087b61da..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/cloud/security/privateca/v1/service.rb +++ /dev/null @@ -1,1041 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate CertificateAuthorityService.CreateCertificate}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate}, in the - # format `projects/*/locations/*/caPools/*`. - # @!attribute [rw] certificate_id - # @return [::String] - # Optional. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the Enterprise - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#tier CertificateAuthority.tier}, - # but is optional and its value is ignored otherwise. - # @!attribute [rw] certificate - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # Required. A {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} - # with initial field values. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request ID, - # the server can check if original operation with the same request ID was - # received, and if so, will ignore the second request. This prevents clients - # from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If this is true, no - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} resource will - # be persisted regardless of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}'s - # {::Google::Cloud::Security::PrivateCA::V1::CaPool#tier tier}, and the returned - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} will not - # contain the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate#pem_certificate pem_certificate} - # field. - # @!attribute [rw] issuing_certificate_authority_id - # @return [::String] - # Optional. The resource ID of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # that should issue the certificate. This optional field will ignore the - # load-balancing scheme of the Pool and directly issue the certificate from - # the CA with the specified ID, contained in the same - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} referenced by `parent`. - # Per-CA quota rules apply. If left empty, a - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # will be chosen from the {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} - # by the service. For example, to issue a - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} from a - # Certificate Authority with resource name - # "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", - # you can set the - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#parent parent} - # to "projects/my-project/locations/us-central1/caPools/my-pool" and the - # {::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest#issuing_certificate_authority_id issuing_certificate_authority_id} - # to "my-ca". - class CreateCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate CertificateAuthorityService.GetCertificate}. - # @!attribute [rw] name - # @return [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1::Certificate#name name} - # of the {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} to - # get. - class GetCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificates CertificateAuthorityService.ListCertificates}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the parent associated with the - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}, in the - # format `projects/*/locations/*/caPools/*`. The parent resource name can be - # in one of two forms: - # - # 1. **Specific CA Pool:** To list certificates within a single CA Pool: - # `projects/*/locations/*/caPools/*` - # - # 2. **All CA Pools in a Location:** To list certificates across *all* CA - # Pools in a given project and location, use the wildcard character (`-`) - # in place of the CA Pool ID. - # Example: `projects/*/locations/*/caPools/-` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} to include - # in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates} can - # subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. - # @!attribute [rw] filter - # @return [::String] - # Optional. Only include resources that match the filter in the response. For - # details on supported filters and syntax, see [Certificates Filtering - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specify how the results should be sorted. For details on - # supported fields and syntax, see [Certificates Sorting - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). - class ListCertificatesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificates CertificateAuthorityService.ListCertificates}. - # @!attribute [rw] certificates - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::Certificate>] - # The list of {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificates}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. Pass this value in - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest#page_token ListCertificatesRequest.page_token} - # to retrieve the next page of results. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations (e.g. "us-west1") that could not be reached. - class ListCertificatesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#revoke_certificate CertificateAuthorityService.RevokeCertificate}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} in the format - # `projects/*/locations/*/caPools/*/certificates/*`. - # @!attribute [rw] reason - # @return [::Google::Cloud::Security::PrivateCA::V1::RevocationReason] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::RevocationReason RevocationReason} for - # revoking this certificate. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class RevokeCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate CertificateAuthorityService.UpdateCertificate}. - # @!attribute [rw] certificate - # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate] - # Required. {::Google::Cloud::Security::PrivateCA::V1::Certificate Certificate} - # with updated values. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A list of fields to be updated in this request. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#activate_certificate_authority CertificateAuthorityService.ActivateCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @!attribute [rw] pem_ca_certificate - # @return [::String] - # Required. The signed CA certificate issued from - # {::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. - # @!attribute [rw] subordinate_config - # @return [::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig] - # Required. Must include information about the issuer of - # 'pem_ca_certificate', and any further issuers until the self-signed CA. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class ActivateCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_authority CertificateAuthorityService.CreateCertificateAuthority}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, - # in the format `projects/*/locations/*/caPools/*`. - # @!attribute [rw] certificate_authority_id - # @return [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @!attribute [rw] certificate_authority - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] - # Required. A - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # with initial field values. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#disable_certificate_authority CertificateAuthorityService.DisableCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] ignore_dependent_resources - # @return [::Boolean] - # Optional. This field allows this CA to be disabled even if it's being - # depended on by another resource. However, doing so may result in unintended - # and unrecoverable effects on any dependent resources since the CA will - # no longer be able to issue certificates. - class DisableCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#enable_certificate_authority CertificateAuthorityService.EnableCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class EnableCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr CertificateAuthorityService.FetchCertificateAuthorityCsr}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - class FetchCertificateAuthorityCsrRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr CertificateAuthorityService.FetchCertificateAuthorityCsr}. - # @!attribute [r] pem_csr - # @return [::String] - # Output only. The PEM-encoded signed certificate signing request (CSR). - class FetchCertificateAuthorityCsrResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_authority CertificateAuthorityService.GetCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # to get. - class GetCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_authorities CertificateAuthorityService.ListCertificateAuthorities}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}, - # in the format `projects/*/locations/*/caPools/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} - # to include in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. - # @!attribute [rw] filter - # @return [::String] - # Optional. Only include resources that match the filter in the response. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specify how the results should be sorted. - class ListCertificateAuthoritiesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_authorities CertificateAuthorityService.ListCertificateAuthorities}. - # @!attribute [rw] certificate_authorities - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority>] - # The list of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthorities}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. Pass this value in - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest#page_token ListCertificateAuthoritiesRequest.page_token} - # to retrieve the next page of results. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations (e.g. "us-west1") that could not be reached. - class ListCertificateAuthoritiesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#undelete_certificate_authority CertificateAuthorityService.UndeleteCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UndeleteCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_authority CertificateAuthorityService.DeleteCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] ignore_active_certificates - # @return [::Boolean] - # Optional. This field allows the CA to be deleted even if the CA has - # active certs. Active certs include both unrevoked and unexpired certs. - # @!attribute [rw] skip_grace_period - # @return [::Boolean] - # Optional. If this flag is set, the Certificate Authority will be deleted as - # soon as possible without a 30-day grace period where undeletion would have - # been allowed. If you proceed, there will be no way to recover this CA. - # @!attribute [rw] ignore_dependent_resources - # @return [::Boolean] - # Optional. This field allows this CA to be deleted even if it's being - # depended on by another resource. However, doing so may result in unintended - # and unrecoverable effects on any dependent resources since the CA will - # no longer be able to issue certificates. - class DeleteCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_authority CertificateAuthorityService.UpdateCertificateAuthority}. - # @!attribute [rw] certificate_authority - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority] - # Required. - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority CertificateAuthority} - # with updated values. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A list of fields to be updated in this request. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_ca_pool CertificateAuthorityService.CreateCaPool}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool}, in the format - # `projects/*/locations/*`. - # @!attribute [rw] ca_pool_id - # @return [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @!attribute [rw] ca_pool - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool] - # Required. A {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with - # initial field values. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateCaPoolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_ca_pool CertificateAuthorityService.UpdateCaPool}. - # @!attribute [rw] ca_pool - # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool] - # Required. {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} with updated - # values. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A list of fields to be updated in this request. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateCaPoolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_ca_pool CertificateAuthorityService.DeleteCaPool}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format - # `projects/*/locations/*/caPools/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] ignore_dependent_resources - # @return [::Boolean] - # Optional. This field allows this pool to be deleted even if it's being - # depended on by another resource. However, doing so may result in unintended - # and unrecoverable effects on any dependent resources since the pool will - # no longer be able to issue certificates. - class DeleteCaPoolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_ca_certs CertificateAuthorityService.FetchCaCerts}. - # @!attribute [rw] ca_pool - # @return [::String] - # Required. The resource name for the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the format - # `projects/*/locations/*/caPools/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class FetchCaCertsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_ca_certs CertificateAuthorityService.FetchCaCerts}. - # @!attribute [rw] ca_certs - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse::CertChain>] - # The PEM encoded CA certificate chains of all certificate authorities in - # this {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} in the ENABLED, - # DISABLED, or STAGED states. - class FetchCaCertsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] certificates - # @return [::Array<::String>] - # The certificates that form the CA chain, from leaf to root order. - class CertChain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_ca_pool CertificateAuthorityService.GetCaPool}. - # @!attribute [rw] name - # @return [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1::CaPool#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPool} to get. - class GetCaPoolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_ca_pools CertificateAuthorityService.ListCaPools}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}, in the format - # `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} to include in the - # response. Further {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools} can - # subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse#next_page_token ListCaPoolsResponse.next_page_token}. - # @!attribute [rw] filter - # @return [::String] - # Optional. Only include resources that match the filter in the response. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specify how the results should be sorted. - class ListCaPoolsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_ca_pools CertificateAuthorityService.ListCaPools}. - # @!attribute [rw] ca_pools - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CaPool>] - # The list of {::Google::Cloud::Security::PrivateCA::V1::CaPool CaPools}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. Pass this value in - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest#page_token ListCertificateAuthoritiesRequest.page_token} - # to retrieve the next page of results. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations (e.g. "us-west1") that could not be reached. - class ListCaPoolsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_revocation_list CertificateAuthorityService.GetCertificateRevocationList}. - # @!attribute [rw] name - # @return [::String] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList#name name} - # of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # to get. - class GetCertificateRevocationListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_revocation_lists CertificateAuthorityService.ListCertificateRevocationLists}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}, - # in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} - # to include in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. - # @!attribute [rw] filter - # @return [::String] - # Optional. Only include resources that match the filter in the response. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specify how the results should be sorted. - class ListCertificateRevocationListsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_revocation_lists CertificateAuthorityService.ListCertificateRevocationLists}. - # @!attribute [rw] certificate_revocation_lists - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList>] - # The list of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationLists}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. Pass this value in - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest#page_token ListCertificateRevocationListsRequest.page_token} - # to retrieve the next page of results. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations (e.g. "us-west1") that could not be reached. - class ListCertificateRevocationListsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_revocation_list CertificateAuthorityService.UpdateCertificateRevocationList}. - # @!attribute [rw] certificate_revocation_list - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList] - # Required. - # {::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList CertificateRevocationList} - # with updated values. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A list of fields to be updated in this request. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateCertificateRevocationListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_template CertificateAuthorityService.CreateCertificateTemplate}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate}, - # in the format `projects/*/locations/*`. - # @!attribute [rw] certificate_template_id - # @return [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @!attribute [rw] certificate_template - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] - # Required. A - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # with initial field values. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateCertificateTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_template CertificateAuthorityService.DeleteCertificateTemplate}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # in the format `projects/*/locations/*/certificateTemplates/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteCertificateTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_template CertificateAuthorityService.GetCertificateTemplate}. - # @!attribute [rw] name - # @return [::String] - # Required. The - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # to get. - class GetCertificateTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_templates CertificateAuthorityService.ListCertificateTemplates}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}, - # in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} - # to include in the response. Further - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token} - # in a subsequent request. If unspecified, the server will pick an - # appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse#next_page_token ListCertificateTemplatesResponse.next_page_token}. - # @!attribute [rw] filter - # @return [::String] - # Optional. Only include resources that match the filter in the response. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specify how the results should be sorted. - class ListCertificateTemplatesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_templates CertificateAuthorityService.ListCertificateTemplates}. - # @!attribute [rw] certificate_templates - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate>] - # The list of - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplates}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. Pass this value in - # {::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest#page_token ListCertificateTemplatesRequest.page_token} - # to retrieve the next page of results. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations (e.g. "us-west1") that could not be reached. - class ListCertificateTemplatesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_template CertificateAuthorityService.UpdateCertificateTemplate}. - # @!attribute [rw] certificate_template - # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate] - # Required. - # {::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate CertificateTemplate} - # with updated values. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A list of fields to be updated in this request. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that - # if you must retry your request, the server will know to ignore the request - # if it has already been completed. The server will guarantee that for at - # least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateCertificateTemplateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/Gemfile deleted file mode 100644 index 15d0144fd102..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-security-private_ca-v1", path: "../" -else - gem "google-cloud-security-private_ca-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.rb deleted file mode 100644 index 2ca2884e3cdb..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/activate_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the activate_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#activate_certificate_authority. -# -def activate_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new - - # Call the activate_certificate_authority method. - result = client.activate_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.rb deleted file mode 100644 index 2086f329dd24..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_ca_pool.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_CreateCaPool_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the create_ca_pool call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_ca_pool. -# -def create_ca_pool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new - - # Call the create_ca_pool method. - result = client.create_ca_pool request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_CreateCaPool_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.rb deleted file mode 100644 index 02ba1cd69a00..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificate_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the create_certificate call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate. -# -def create_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new - - # Call the create_certificate method. - result = client.create_certificate request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - p result -end -# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.rb deleted file mode 100644 index 837bf4f5e52b..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the create_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_authority. -# -def create_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new - - # Call the create_certificate_authority method. - result = client.create_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.rb deleted file mode 100644 index 04864381efcf..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/create_certificate_template.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the create_certificate_template call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_template. -# -def create_certificate_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new - - # Call the create_certificate_template method. - result = client.create_certificate_template request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.rb deleted file mode 100644 index d83ae4819dc9..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_ca_pool.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the delete_ca_pool call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_ca_pool. -# -def delete_ca_pool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new - - # Call the delete_ca_pool method. - result = client.delete_ca_pool request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.rb deleted file mode 100644 index 25db9c72707e..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the delete_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_authority. -# -def delete_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new - - # Call the delete_certificate_authority method. - result = client.delete_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.rb deleted file mode 100644 index ffd2b9603f86..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/delete_certificate_template.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the delete_certificate_template call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_template. -# -def delete_certificate_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new - - # Call the delete_certificate_template method. - result = client.delete_certificate_template request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.rb deleted file mode 100644 index cf6fffe863ae..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/disable_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the disable_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#disable_certificate_authority. -# -def disable_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new - - # Call the disable_certificate_authority method. - result = client.disable_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.rb deleted file mode 100644 index 66ab672c075a..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/enable_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the enable_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#enable_certificate_authority. -# -def enable_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new - - # Call the enable_certificate_authority method. - result = client.enable_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.rb deleted file mode 100644 index 939e386615d0..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_ca_certs.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the fetch_ca_certs call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_ca_certs. -# -def fetch_ca_certs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new - - # Call the fetch_ca_certs method. - result = client.fetch_ca_certs request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse. - p result -end -# [END privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb deleted file mode 100644 index f51e0bff99ab..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the fetch_certificate_authority_csr call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr. -# -def fetch_certificate_authority_csr - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new - - # Call the fetch_certificate_authority_csr method. - result = client.fetch_certificate_authority_csr request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse. - p result -end -# [END privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.rb deleted file mode 100644 index c82b3ce69063..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_ca_pool.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_GetCaPool_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the get_ca_pool call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_ca_pool. -# -def get_ca_pool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new - - # Call the get_ca_pool method. - result = client.get_ca_pool request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CaPool. - p result -end -# [END privateca_v1_generated_CertificateAuthorityService_GetCaPool_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.rb deleted file mode 100644 index ce87f3b91296..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_GetCertificate_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the get_certificate call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate. -# -def get_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new - - # Call the get_certificate method. - result = client.get_certificate request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - p result -end -# [END privateca_v1_generated_CertificateAuthorityService_GetCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.rb deleted file mode 100644 index 0fb13b1d62ac..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_authority.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the get_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_authority. -# -def get_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new - - # Call the get_certificate_authority method. - result = client.get_certificate_authority request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. - p result -end -# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.rb deleted file mode 100644 index e840b4be9acc..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_revocation_list.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the get_certificate_revocation_list call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_revocation_list. -# -def get_certificate_revocation_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new - - # Call the get_certificate_revocation_list method. - result = client.get_certificate_revocation_list request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. - p result -end -# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.rb deleted file mode 100644 index d084f7fa5d49..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/get_certificate_template.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the get_certificate_template call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_template. -# -def get_certificate_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new - - # Call the get_certificate_template method. - result = client.get_certificate_template request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. - p result -end -# [END privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.rb deleted file mode 100644 index 0de634246136..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_ca_pools.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_ListCaPools_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the list_ca_pools call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_ca_pools. -# -def list_ca_pools - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new - - # Call the list_ca_pools method. - result = client.list_ca_pools request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CaPool. - p item - end -end -# [END privateca_v1_generated_CertificateAuthorityService_ListCaPools_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.rb deleted file mode 100644 index c2e06a669891..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_authorities.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the list_certificate_authorities call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_authorities. -# -def list_certificate_authorities - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new - - # Call the list_certificate_authorities method. - result = client.list_certificate_authorities request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority. - p item - end -end -# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb deleted file mode 100644 index 32d72bf58c5c..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the list_certificate_revocation_lists call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_revocation_lists. -# -def list_certificate_revocation_lists - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new - - # Call the list_certificate_revocation_lists method. - result = client.list_certificate_revocation_lists request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList. - p item - end -end -# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.rb deleted file mode 100644 index 269ed16695f8..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificate_templates.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the list_certificate_templates call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_templates. -# -def list_certificate_templates - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new - - # Call the list_certificate_templates method. - result = client.list_certificate_templates request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate. - p item - end -end -# [END privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.rb deleted file mode 100644 index dfdcae76c14f..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/list_certificates.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_ListCertificates_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the list_certificates call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificates. -# -def list_certificates - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new - - # Call the list_certificates method. - result = client.list_certificates request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::Certificate. - p item - end -end -# [END privateca_v1_generated_CertificateAuthorityService_ListCertificates_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.rb deleted file mode 100644 index 85e6363d58ac..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/revoke_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the revoke_certificate call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#revoke_certificate. -# -def revoke_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new - - # Call the revoke_certificate method. - result = client.revoke_certificate request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - p result -end -# [END privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.rb deleted file mode 100644 index 0aaba870e26d..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/undelete_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the undelete_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#undelete_certificate_authority. -# -def undelete_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new - - # Call the undelete_certificate_authority method. - result = client.undelete_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.rb deleted file mode 100644 index ff687e1efbc2..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_ca_pool.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the update_ca_pool call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_ca_pool. -# -def update_ca_pool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new - - # Call the update_ca_pool method. - result = client.update_ca_pool request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.rb deleted file mode 100644 index 82e041db102b..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the update_certificate call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate. -# -def update_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new - - # Call the update_certificate method. - result = client.update_certificate request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate. - p result -end -# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.rb deleted file mode 100644 index 4f4aacbc82f0..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the update_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_authority. -# -def update_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new - - # Call the update_certificate_authority method. - result = client.update_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.rb deleted file mode 100644 index 3f573ab17f29..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_revocation_list.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the update_certificate_revocation_list call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_revocation_list. -# -def update_certificate_revocation_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new - - # Call the update_certificate_revocation_list method. - result = client.update_certificate_revocation_list request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.rb deleted file mode 100644 index 037307454cb4..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/certificate_authority_service/update_certificate_template.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_sync] -require "google/cloud/security/private_ca/v1" - -## -# Snippet for the update_certificate_template call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_template. -# -def update_certificate_template - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new - - # Call the update_certificate_template method. - result = client.update_certificate_template request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json b/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json deleted file mode 100644 index 9534d7bc3fea..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/snippets/snippet_metadata_google.cloud.security.privateca.v1.json +++ /dev/null @@ -1,1175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-security-private_ca-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.security.privateca.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificate_sync", - "title": "Snippet for the create_certificate call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate.", - "file": "certificate_authority_service/create_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_certificate", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::Certificate", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "CreateCertificate", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_GetCertificate_sync", - "title": "Snippet for the get_certificate call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate.", - "file": "certificate_authority_service/get_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::Certificate", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "GetCertificate", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_ListCertificates_sync", - "title": "Snippet for the list_certificates call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificates.", - "file": "certificate_authority_service/list_certificates.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_certificates", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificates", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ListCertificates", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_sync", - "title": "Snippet for the revoke_certificate call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#revoke_certificate.", - "file": "certificate_authority_service/revoke_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "revoke_certificate", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#revoke_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::Certificate", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "RevokeCertificate", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_sync", - "title": "Snippet for the update_certificate call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate.", - "file": "certificate_authority_service/update_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_certificate", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::Certificate", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "UpdateCertificate", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync", - "title": "Snippet for the activate_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#activate_certificate_authority.", - "file": "certificate_authority_service/activate_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "activate_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#activate_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ActivateCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync", - "title": "Snippet for the create_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_authority.", - "file": "certificate_authority_service/create_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "CreateCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync", - "title": "Snippet for the disable_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#disable_certificate_authority.", - "file": "certificate_authority_service/disable_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#disable_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "DisableCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync", - "title": "Snippet for the enable_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#enable_certificate_authority.", - "file": "certificate_authority_service/enable_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#enable_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "EnableCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync", - "title": "Snippet for the fetch_certificate_authority_csr call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr.", - "file": "certificate_authority_service/fetch_certificate_authority_csr.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_certificate_authority_csr", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_certificate_authority_csr", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "FetchCertificateAuthorityCsr", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_sync", - "title": "Snippet for the get_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_authority.", - "file": "certificate_authority_service/get_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "GetCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync", - "title": "Snippet for the list_certificate_authorities call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_authorities.", - "file": "certificate_authority_service/list_certificate_authorities.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_certificate_authorities", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_authorities", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ListCertificateAuthorities", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_sync", - "title": "Snippet for the undelete_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#undelete_certificate_authority.", - "file": "certificate_authority_service/undelete_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "undelete_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#undelete_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "UndeleteCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_sync", - "title": "Snippet for the delete_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_authority.", - "file": "certificate_authority_service/delete_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "DeleteCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync", - "title": "Snippet for the update_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_authority.", - "file": "certificate_authority_service/update_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "UpdateCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_CreateCaPool_sync", - "title": "Snippet for the create_ca_pool call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_ca_pool.", - "file": "certificate_authority_service/create_ca_pool.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_ca_pool", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_ca_pool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "CreateCaPool", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_sync", - "title": "Snippet for the update_ca_pool call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_ca_pool.", - "file": "certificate_authority_service/update_ca_pool.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_ca_pool", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_ca_pool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "UpdateCaPool", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_GetCaPool_sync", - "title": "Snippet for the get_ca_pool call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_ca_pool.", - "file": "certificate_authority_service/get_ca_pool.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_ca_pool", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_ca_pool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::CaPool", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "GetCaPool", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_ListCaPools_sync", - "title": "Snippet for the list_ca_pools call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_ca_pools.", - "file": "certificate_authority_service/list_ca_pools.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_ca_pools", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_ca_pools", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ListCaPools", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_sync", - "title": "Snippet for the delete_ca_pool call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_ca_pool.", - "file": "certificate_authority_service/delete_ca_pool.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_ca_pool", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_ca_pool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "DeleteCaPool", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_sync", - "title": "Snippet for the fetch_ca_certs call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_ca_certs.", - "file": "certificate_authority_service/fetch_ca_certs.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_ca_certs", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#fetch_ca_certs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "FetchCaCerts", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync", - "title": "Snippet for the get_certificate_revocation_list call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_revocation_list.", - "file": "certificate_authority_service/get_certificate_revocation_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate_revocation_list", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_revocation_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "GetCertificateRevocationList", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync", - "title": "Snippet for the list_certificate_revocation_lists call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_revocation_lists.", - "file": "certificate_authority_service/list_certificate_revocation_lists.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_certificate_revocation_lists", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_revocation_lists", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ListCertificateRevocationLists", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync", - "title": "Snippet for the update_certificate_revocation_list call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_revocation_list.", - "file": "certificate_authority_service/update_certificate_revocation_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_certificate_revocation_list", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_revocation_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "UpdateCertificateRevocationList", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_sync", - "title": "Snippet for the create_certificate_template call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_template.", - "file": "certificate_authority_service/create_certificate_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_certificate_template", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#create_certificate_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "CreateCertificateTemplate", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_sync", - "title": "Snippet for the delete_certificate_template call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_template.", - "file": "certificate_authority_service/delete_certificate_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_certificate_template", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#delete_certificate_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "DeleteCertificateTemplate", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_sync", - "title": "Snippet for the get_certificate_template call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_template.", - "file": "certificate_authority_service/get_certificate_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate_template", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#get_certificate_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "GetCertificateTemplate", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_sync", - "title": "Snippet for the list_certificate_templates call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_templates.", - "file": "certificate_authority_service/list_certificate_templates.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_certificate_templates", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#list_certificate_templates", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ListCertificateTemplates", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_sync", - "title": "Snippet for the update_certificate_template call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_template.", - "file": "certificate_authority_service/update_certificate_template.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_certificate_template", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client#update_certificate_template", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "UpdateCertificateTemplate", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_test.rb deleted file mode 100644 index 6e457af60f99..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/security/privateca/v1/service_pb" -require "google/cloud/security/privateca/v1/service_services_pb" -require "google/cloud/security/private_ca/v1/certificate_authority_service" - -class ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_test.rb deleted file mode 100644 index b5b52911b307..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_paths_test.rb +++ /dev/null @@ -1,115 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/security/private_ca/v1/certificate_authority_service" - -class ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_ca_pool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.ca_pool_path project: "value0", location: "value1", ca_pool: "value2" - assert_equal "projects/value0/locations/value1/caPools/value2", path - end - end - - def test_certificate_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_path project: "value0", location: "value1", ca_pool: "value2", certificate: "value3" - assert_equal "projects/value0/locations/value1/caPools/value2/certificates/value3", path - end - end - - def test_certificate_authority_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_authority_path project: "value0", location: "value1", ca_pool: "value2", certificate_authority: "value3" - assert_equal "projects/value0/locations/value1/caPools/value2/certificateAuthorities/value3", path - end - end - - def test_certificate_revocation_list_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_revocation_list_path project: "value0", location: "value1", ca_pool: "value2", certificate_authority: "value3", certificate_revocation_list: "value4" - assert_equal "projects/value0/locations/value1/caPools/value2/certificateAuthorities/value3/certificateRevocationLists/value4", path - end - end - - def test_certificate_template_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_template_path project: "value0", location: "value1", certificate_template: "value2" - assert_equal "projects/value0/locations/value1/certificateTemplates/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_test.rb deleted file mode 100644 index 7f1dd7fc1670..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_rest_test.rb +++ /dev/null @@ -1,1726 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/security/privateca/v1/service_pb" -require "google/cloud/security/private_ca/v1/certificate_authority_service/rest" - - -class ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_certificate - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate_id = "hello world" - certificate = {} - request_id = "hello world" - validate_only = true - issuing_certificate_authority_id = "hello world" - - create_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_certificate parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_certificate ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_certificate(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_certificate_client_stub.call_count - end - end - end - - def test_get_certificate - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_certificate({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_certificate name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_certificate ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_certificate({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_certificate(::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_client_stub.call_count - end - end - end - - def test_list_certificates - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificates_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_certificates_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_certificates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_certificates ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_certificates(::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_certificates_client_stub.call_count - end - end - end - - def test_revoke_certificate - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - reason = :REVOCATION_REASON_UNSPECIFIED - request_id = "hello world" - - revoke_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_revoke_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, revoke_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.revoke_certificate({ name: name, reason: reason, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.revoke_certificate name: name, reason: reason, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.revoke_certificate ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.revoke_certificate({ name: name, reason: reason, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.revoke_certificate(::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, revoke_certificate_client_stub.call_count - end - end - end - - def test_update_certificate - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - certificate = {} - update_mask = {} - request_id = "hello world" - - update_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_certificate certificate: certificate, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_certificate ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_certificate(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_certificate_client_stub.call_count - end - end - end - - def test_activate_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - pem_ca_certificate = "hello world" - subordinate_config = {} - request_id = "hello world" - - activate_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_activate_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, activate_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.activate_certificate_authority name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.activate_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.activate_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, activate_certificate_authority_client_stub.call_count - end - end - end - - def test_create_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate_authority_id = "hello world" - certificate_authority = {} - request_id = "hello world" - - create_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_certificate_authority parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_certificate_authority_client_stub.call_count - end - end - end - - def test_disable_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - ignore_dependent_resources = true - - disable_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_disable_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.disable_certificate_authority({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.disable_certificate_authority name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.disable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.disable_certificate_authority({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.disable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_certificate_authority_client_stub.call_count - end - end - end - - def test_enable_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - enable_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_enable_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.enable_certificate_authority({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.enable_certificate_authority name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.enable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.enable_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.enable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_certificate_authority_client_stub.call_count - end - end - end - - def test_fetch_certificate_authority_csr - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - fetch_certificate_authority_csr_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_fetch_certificate_authority_csr_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_certificate_authority_csr_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.fetch_certificate_authority_csr({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.fetch_certificate_authority_csr name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.fetch_certificate_authority_csr ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.fetch_certificate_authority_csr({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.fetch_certificate_authority_csr(::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_certificate_authority_csr_client_stub.call_count - end - end - end - - def test_get_certificate_authority - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_certificate_authority({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_certificate_authority name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_certificate_authority({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_authority_client_stub.call_count - end - end - end - - def test_list_certificate_authorities - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificate_authorities_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificate_authorities_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_certificate_authorities_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_certificate_authorities parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_certificate_authorities ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_certificate_authorities(::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_certificate_authorities_client_stub.call_count - end - end - end - - def test_undelete_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - undelete_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_undelete_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undelete_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.undelete_certificate_authority({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.undelete_certificate_authority name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.undelete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.undelete_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.undelete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undelete_certificate_authority_client_stub.call_count - end - end - end - - def test_delete_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - ignore_active_certificates = true - skip_grace_period = true - ignore_dependent_resources = true - - delete_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_delete_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_certificate_authority({ name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_certificate_authority name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_certificate_authority({ name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_certificate_authority_client_stub.call_count - end - end - end - - def test_update_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - certificate_authority = {} - update_mask = {} - request_id = "hello world" - - update_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_certificate_authority certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_certificate_authority_client_stub.call_count - end - end - end - - def test_create_ca_pool - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - ca_pool_id = "hello world" - ca_pool = {} - request_id = "hello world" - - create_ca_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_ca_pool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_ca_pool_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_ca_pool({ parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_ca_pool parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_ca_pool ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new(parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_ca_pool({ parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_ca_pool(::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new(parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_ca_pool_client_stub.call_count - end - end - end - - def test_update_ca_pool - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - ca_pool = {} - update_mask = {} - request_id = "hello world" - - update_ca_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_ca_pool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_ca_pool_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_ca_pool({ ca_pool: ca_pool, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_ca_pool ca_pool: ca_pool, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_ca_pool ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new(ca_pool: ca_pool, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_ca_pool({ ca_pool: ca_pool, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_ca_pool(::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new(ca_pool: ca_pool, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_ca_pool_client_stub.call_count - end - end - end - - def test_get_ca_pool - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::CaPool.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_ca_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_ca_pool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_ca_pool_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_ca_pool({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_ca_pool name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_ca_pool ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_ca_pool({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_ca_pool(::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_ca_pool_client_stub.call_count - end - end - end - - def test_list_ca_pools - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_ca_pools_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_ca_pools_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_ca_pools_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_ca_pools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_ca_pools parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_ca_pools ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_ca_pools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_ca_pools(::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_ca_pools_client_stub.call_count - end - end - end - - def test_delete_ca_pool - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - ignore_dependent_resources = true - - delete_ca_pool_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_delete_ca_pool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_ca_pool_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_ca_pool({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_ca_pool name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_ca_pool ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_ca_pool({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_ca_pool(::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_ca_pool_client_stub.call_count - end - end - end - - def test_fetch_ca_certs - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - ca_pool = "hello world" - request_id = "hello world" - - fetch_ca_certs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_fetch_ca_certs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_ca_certs_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.fetch_ca_certs({ ca_pool: ca_pool, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.fetch_ca_certs ca_pool: ca_pool, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.fetch_ca_certs ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new(ca_pool: ca_pool, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.fetch_ca_certs({ ca_pool: ca_pool, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.fetch_ca_certs(::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new(ca_pool: ca_pool, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_ca_certs_client_stub.call_count - end - end - end - - def test_get_certificate_revocation_list - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_revocation_list_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_revocation_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_revocation_list_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_certificate_revocation_list({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_certificate_revocation_list name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_certificate_revocation_list({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_revocation_list_client_stub.call_count - end - end - end - - def test_list_certificate_revocation_lists - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificate_revocation_lists_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificate_revocation_lists_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_certificate_revocation_lists_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_certificate_revocation_lists parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_certificate_revocation_lists ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_certificate_revocation_lists(::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_certificate_revocation_lists_client_stub.call_count - end - end - end - - def test_update_certificate_revocation_list - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - certificate_revocation_list = {} - update_mask = {} - request_id = "hello world" - - update_certificate_revocation_list_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_revocation_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_certificate_revocation_list_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_certificate_revocation_list certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_certificate_revocation_list_client_stub.call_count - end - end - end - - def test_create_certificate_template - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate_template_id = "hello world" - certificate_template = {} - request_id = "hello world" - - create_certificate_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_certificate_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_certificate_template_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_certificate_template({ parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_certificate_template parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_certificate_template ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new(parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_certificate_template({ parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_certificate_template(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new(parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_certificate_template_client_stub.call_count - end - end - end - - def test_delete_certificate_template - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_certificate_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_delete_certificate_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_certificate_template_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_certificate_template({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_certificate_template name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_certificate_template ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_certificate_template({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_certificate_template(::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_certificate_template_client_stub.call_count - end - end - end - - def test_get_certificate_template - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_template_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_certificate_template({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_certificate_template name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_certificate_template ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_certificate_template({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_certificate_template(::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_template_client_stub.call_count - end - end - end - - def test_list_certificate_templates - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificate_templates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificate_templates_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_certificate_templates_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_certificate_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_certificate_templates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_certificate_templates ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_certificate_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_certificate_templates(::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_certificate_templates_client_stub.call_count - end - end - end - - def test_update_certificate_template - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - certificate_template = {} - update_mask = {} - request_id = "hello world" - - update_certificate_template_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_template_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_certificate_template_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_certificate_template({ certificate_template: certificate_template, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_certificate_template certificate_template: certificate_template, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_certificate_template ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new(certificate_template: certificate_template, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_certificate_template({ certificate_template: certificate_template, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_certificate_template(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new(certificate_template: certificate_template, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_certificate_template_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_test.rb deleted file mode 100644 index 30f45ca1fa7c..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/test/google/cloud/security/private_ca/v1/certificate_authority_service_test.rb +++ /dev/null @@ -1,2017 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/security/privateca/v1/service_pb" -require "google/cloud/security/private_ca/v1/certificate_authority_service" - -class ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate_id = "hello world" - certificate = {} - request_id = "hello world" - validate_only = true - issuing_certificate_authority_id = "hello world" - - create_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_certificate, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["certificate_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::Certificate), request["certificate"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["issuing_certificate_authority_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_certificate parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_certificate ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_certificate(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id, validate_only: validate_only, issuing_certificate_authority_id: issuing_certificate_authority_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_certificate_client_stub.call_rpc_count - end - end - - def test_get_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_certificate, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_certificate({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_certificate name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_certificate ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_certificate({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_certificate(::Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_certificate_client_stub.call_rpc_count - end - end - - def test_list_certificates - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_certificates, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_certificates_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_certificates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_certificates ::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_certificates(::Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_certificates_client_stub.call_rpc_count - end - end - - def test_revoke_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - reason = :REVOCATION_REASON_UNSPECIFIED - request_id = "hello world" - - revoke_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :revoke_certificate, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest, request - assert_equal "hello world", request["name"] - assert_equal :REVOCATION_REASON_UNSPECIFIED, request["reason"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, revoke_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.revoke_certificate({ name: name, reason: reason, request_id: request_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.revoke_certificate name: name, reason: reason, request_id: request_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.revoke_certificate ::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.revoke_certificate({ name: name, reason: reason, request_id: request_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.revoke_certificate(::Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, revoke_certificate_client_stub.call_rpc_count - end - end - - def test_update_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::Certificate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - certificate = {} - update_mask = {} - request_id = "hello world" - - update_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_certificate, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::Certificate), request["certificate"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_certificate certificate: certificate, update_mask: update_mask, request_id: request_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_certificate ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_certificate(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_certificate_client_stub.call_rpc_count - end - end - - def test_activate_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - pem_ca_certificate = "hello world" - subordinate_config = {} - request_id = "hello world" - - activate_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :activate_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["pem_ca_certificate"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::SubordinateConfig), request["subordinate_config"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, activate_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.activate_certificate_authority name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.activate_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.activate_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, activate_certificate_authority_client_stub.call_rpc_count - end - end - - def test_create_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate_authority_id = "hello world" - certificate_authority = {} - request_id = "hello world" - - create_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["certificate_authority_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority), request["certificate_authority"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_certificate_authority parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_certificate_authority_client_stub.call_rpc_count - end - end - - def test_disable_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - ignore_dependent_resources = true - - disable_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["ignore_dependent_resources"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.disable_certificate_authority({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.disable_certificate_authority name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.disable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.disable_certificate_authority({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.disable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, disable_certificate_authority_client_stub.call_rpc_count - end - end - - def test_enable_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - enable_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.enable_certificate_authority({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.enable_certificate_authority name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.enable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.enable_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.enable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enable_certificate_authority_client_stub.call_rpc_count - end - end - - def test_fetch_certificate_authority_csr - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - fetch_certificate_authority_csr_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_certificate_authority_csr, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_certificate_authority_csr_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_certificate_authority_csr({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.fetch_certificate_authority_csr name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.fetch_certificate_authority_csr ::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.fetch_certificate_authority_csr({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.fetch_certificate_authority_csr(::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_certificate_authority_csr_client_stub.call_rpc_count - end - end - - def test_get_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_certificate_authority({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_certificate_authority name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_certificate_authority({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_certificate_authority_client_stub.call_rpc_count - end - end - - def test_list_certificate_authorities - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificate_authorities_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_certificate_authorities, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_certificate_authorities_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_certificate_authorities parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_certificate_authorities ::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_certificate_authorities(::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_certificate_authorities_client_stub.call_rpc_count - end - end - - def test_undelete_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - undelete_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undelete_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undelete_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.undelete_certificate_authority({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.undelete_certificate_authority name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.undelete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.undelete_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.undelete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, undelete_certificate_authority_client_stub.call_rpc_count - end - end - - def test_delete_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - ignore_active_certificates = true - skip_grace_period = true - ignore_dependent_resources = true - - delete_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["ignore_active_certificates"] - assert_equal true, request["skip_grace_period"] - assert_equal true, request["ignore_dependent_resources"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_certificate_authority({ name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_certificate_authority name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_certificate_authority({ name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new(name: name, request_id: request_id, ignore_active_certificates: ignore_active_certificates, skip_grace_period: skip_grace_period, ignore_dependent_resources: ignore_dependent_resources), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_certificate_authority_client_stub.call_rpc_count - end - end - - def test_update_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - certificate_authority = {} - update_mask = {} - request_id = "hello world" - - update_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority), request["certificate_authority"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_certificate_authority certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_certificate_authority ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_certificate_authority(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_certificate_authority_client_stub.call_rpc_count - end - end - - def test_create_ca_pool - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - ca_pool_id = "hello world" - ca_pool = {} - request_id = "hello world" - - create_ca_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_ca_pool, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["ca_pool_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CaPool), request["ca_pool"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_ca_pool_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_ca_pool({ parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_ca_pool parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_ca_pool ::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new(parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_ca_pool({ parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_ca_pool(::Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new(parent: parent, ca_pool_id: ca_pool_id, ca_pool: ca_pool, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_ca_pool_client_stub.call_rpc_count - end - end - - def test_update_ca_pool - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - ca_pool = {} - update_mask = {} - request_id = "hello world" - - update_ca_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_ca_pool, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CaPool), request["ca_pool"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_ca_pool_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_ca_pool({ ca_pool: ca_pool, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_ca_pool ca_pool: ca_pool, update_mask: update_mask, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_ca_pool ::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new(ca_pool: ca_pool, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_ca_pool({ ca_pool: ca_pool, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_ca_pool(::Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new(ca_pool: ca_pool, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_ca_pool_client_stub.call_rpc_count - end - end - - def test_get_ca_pool - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::CaPool.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_ca_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_ca_pool, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_ca_pool_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_ca_pool({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_ca_pool name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_ca_pool ::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_ca_pool({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_ca_pool(::Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_ca_pool_client_stub.call_rpc_count - end - end - - def test_list_ca_pools - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_ca_pools_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_ca_pools, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_ca_pools_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_ca_pools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_ca_pools parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_ca_pools ::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_ca_pools({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_ca_pools(::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_ca_pools_client_stub.call_rpc_count - end - end - - def test_delete_ca_pool - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - ignore_dependent_resources = true - - delete_ca_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_ca_pool, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["ignore_dependent_resources"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_ca_pool_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_ca_pool({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_ca_pool name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_ca_pool ::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_ca_pool({ name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_ca_pool(::Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new(name: name, request_id: request_id, ignore_dependent_resources: ignore_dependent_resources), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_ca_pool_client_stub.call_rpc_count - end - end - - def test_fetch_ca_certs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - ca_pool = "hello world" - request_id = "hello world" - - fetch_ca_certs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_ca_certs, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest, request - assert_equal "hello world", request["ca_pool"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_ca_certs_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_ca_certs({ ca_pool: ca_pool, request_id: request_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.fetch_ca_certs ca_pool: ca_pool, request_id: request_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.fetch_ca_certs ::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new(ca_pool: ca_pool, request_id: request_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.fetch_ca_certs({ ca_pool: ca_pool, request_id: request_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.fetch_ca_certs(::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new(ca_pool: ca_pool, request_id: request_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_ca_certs_client_stub.call_rpc_count - end - end - - def test_get_certificate_revocation_list - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_revocation_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_certificate_revocation_list, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_certificate_revocation_list_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_certificate_revocation_list({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_certificate_revocation_list name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_certificate_revocation_list({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_certificate_revocation_list_client_stub.call_rpc_count - end - end - - def test_list_certificate_revocation_lists - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificate_revocation_lists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_certificate_revocation_lists, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_certificate_revocation_lists_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_certificate_revocation_lists parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_certificate_revocation_lists ::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_certificate_revocation_lists(::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_certificate_revocation_lists_client_stub.call_rpc_count - end - end - - def test_update_certificate_revocation_list - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - certificate_revocation_list = {} - update_mask = {} - request_id = "hello world" - - update_certificate_revocation_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_certificate_revocation_list, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList), request["certificate_revocation_list"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_certificate_revocation_list_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_certificate_revocation_list certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_certificate_revocation_list_client_stub.call_rpc_count - end - end - - def test_create_certificate_template - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate_template_id = "hello world" - certificate_template = {} - request_id = "hello world" - - create_certificate_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_certificate_template, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["certificate_template_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate), request["certificate_template"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_certificate_template_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_certificate_template({ parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_certificate_template parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_certificate_template ::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new(parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_certificate_template({ parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_certificate_template(::Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new(parent: parent, certificate_template_id: certificate_template_id, certificate_template: certificate_template, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_certificate_template_client_stub.call_rpc_count - end - end - - def test_delete_certificate_template - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_certificate_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_certificate_template, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_certificate_template_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_certificate_template({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_certificate_template name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_certificate_template ::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_certificate_template({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_certificate_template(::Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_certificate_template_client_stub.call_rpc_count - end - end - - def test_get_certificate_template - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_certificate_template, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_certificate_template_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_certificate_template({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_certificate_template name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_certificate_template ::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_certificate_template({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_certificate_template(::Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_certificate_template_client_stub.call_rpc_count - end - end - - def test_list_certificate_templates - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificate_templates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_certificate_templates, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_certificate_templates_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_certificate_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_certificate_templates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_certificate_templates ::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_certificate_templates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_certificate_templates(::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_certificate_templates_client_stub.call_rpc_count - end - end - - def test_update_certificate_template - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - certificate_template = {} - update_mask = {} - request_id = "hello world" - - update_certificate_template_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_certificate_template, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate), request["certificate_template"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_certificate_template_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_certificate_template({ certificate_template: certificate_template, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_certificate_template certificate_template: certificate_template, update_mask: update_mask, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_certificate_template ::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new(certificate_template: certificate_template, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_certificate_template({ certificate_template: certificate_template, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_certificate_template(::Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new(certificate_template: certificate_template, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_certificate_template_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1/test/helper.rb b/owl-bot-staging/google-cloud-security-private_ca-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1/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-v1beta1/.gitignore b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.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-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.repo-metadata.json deleted file mode 100644 index a2c53d30db17..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.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-v1beta1/latest", - "distribution_name": "google-cloud-security-private_ca-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "privateca", - "name_pretty": "Certificate Authority Service V1beta1 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). Note that google-cloud-security-private_ca-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security-private_ca instead. See the readme for more details.", - "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-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.rubocop.yml deleted file mode 100644 index fd09dadd27e7..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security-private_ca-v1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-security-private_ca-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.yardopts b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.yardopts deleted file mode 100644 index 0500d6ab419b..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Certificate Authority Service V1beta1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/AUTHENTICATION.md deleted file mode 100644 index af0fea24815e..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security-private_ca-v1beta1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-security-private_ca-v1beta1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/security/private_ca/v1beta1" - -client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new 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/v1beta1" - -::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-security-private_ca-v1beta1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/security/private_ca/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/Gemfile b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/README.md b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/README.md deleted file mode 100644 index 6041d14d2b01..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Certificate Authority Service V1beta1 API - -API Client library for the Certificate Authority Service V1beta1 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). - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Certificate Authority Service V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-security-private_ca](https://rubygems.org/gems/google-cloud-security-private_ca). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-security-private_ca-v1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/privateca.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/security/private_ca/v1beta1" - -client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new -request = ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new # (request fields as keyword arguments...) -response = client.create_certificate request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/certificate-authority-service/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/security/private_ca/v1beta1" -require "logger" - -client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-security-private_ca`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-security-private_ca-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-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-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-security-private_ca-v1beta1/Rakefile b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/Rakefile deleted file mode 100644 index 26402e7d932d..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-security-private_ca-v1beta1 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/v1beta1/certificate_authority_service/credentials" - ::Google::Cloud::Security::PrivateCA::V1beta1::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-v1beta1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security-private_ca-v1beta1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security-private_ca-v1beta1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-security-private_ca-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security-private_ca-v1beta1" - header "google-cloud-security-private_ca-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security-private_ca-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security-private_ca-v1beta1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-security-private_ca-v1beta1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-security-private_ca-v1beta1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/gapic_metadata.json deleted file mode 100644 index 7a5ef08f6ba7..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.security.privateca.v1beta1", - "libraryPackage": "::Google::Cloud::Security::PrivateCA::V1beta1", - "services": { - "CertificateAuthorityService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client", - "rpcs": { - "CreateCertificate": { - "methods": [ - "create_certificate" - ] - }, - "GetCertificate": { - "methods": [ - "get_certificate" - ] - }, - "ListCertificates": { - "methods": [ - "list_certificates" - ] - }, - "RevokeCertificate": { - "methods": [ - "revoke_certificate" - ] - }, - "UpdateCertificate": { - "methods": [ - "update_certificate" - ] - }, - "ActivateCertificateAuthority": { - "methods": [ - "activate_certificate_authority" - ] - }, - "CreateCertificateAuthority": { - "methods": [ - "create_certificate_authority" - ] - }, - "DisableCertificateAuthority": { - "methods": [ - "disable_certificate_authority" - ] - }, - "EnableCertificateAuthority": { - "methods": [ - "enable_certificate_authority" - ] - }, - "FetchCertificateAuthorityCsr": { - "methods": [ - "fetch_certificate_authority_csr" - ] - }, - "GetCertificateAuthority": { - "methods": [ - "get_certificate_authority" - ] - }, - "ListCertificateAuthorities": { - "methods": [ - "list_certificate_authorities" - ] - }, - "RestoreCertificateAuthority": { - "methods": [ - "restore_certificate_authority" - ] - }, - "ScheduleDeleteCertificateAuthority": { - "methods": [ - "schedule_delete_certificate_authority" - ] - }, - "UpdateCertificateAuthority": { - "methods": [ - "update_certificate_authority" - ] - }, - "GetCertificateRevocationList": { - "methods": [ - "get_certificate_revocation_list" - ] - }, - "ListCertificateRevocationLists": { - "methods": [ - "list_certificate_revocation_lists" - ] - }, - "UpdateCertificateRevocationList": { - "methods": [ - "update_certificate_revocation_list" - ] - }, - "GetReusableConfig": { - "methods": [ - "get_reusable_config" - ] - }, - "ListReusableConfigs": { - "methods": [ - "list_reusable_configs" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/google-cloud-security-private_ca-v1beta1.gemspec b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/google-cloud-security-private_ca-v1beta1.gemspec deleted file mode 100644 index 7d37d8f73423..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/google-cloud-security-private_ca-v1beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security/private_ca/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security-private_ca-v1beta1" - gem.version = Google::Cloud::Security::PrivateCA::V1beta1::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). Note that google-cloud-security-private_ca-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security-private_ca instead. See the readme for more details." - gem.summary = "API Client library for the Certificate Authority Service V1beta1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google-cloud-security-private_ca-v1beta1.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google-cloud-security-private_ca-v1beta1.rb deleted file mode 100644 index 472d24065727..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google-cloud-security-private_ca-v1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/security/private_ca/v1beta1" diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1.rb deleted file mode 100644 index d311a3538d33..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service" -require "google/cloud/security/private_ca/v1beta1/version" - -module Google - module Cloud - module Security - module PrivateCA - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/security/private_ca/v1beta1" - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/security/private_ca/v1beta1" - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - module V1beta1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/security/private_ca/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.rb deleted file mode 100644 index e8e34962137a..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security/private_ca/v1beta1/version" - -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/client" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest" - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - ## - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client Certificate Authority Service} manages private - # certificate authorities and issued certificates. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/security/private_ca/v1beta1/certificate_authority_service" - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest" - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - module CertificateAuthorityService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "certificate_authority_service", "helpers.rb" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.rb deleted file mode 100644 index 732510db8176..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/client.rb +++ /dev/null @@ -1,2616 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/security/privateca/v1beta1/service_pb" - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - module CertificateAuthorityService - ## - # Client for the CertificateAuthorityService service. - # - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client Certificate Authority Service} manages private - # certificate authorities and issued certificates. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :certificate_authority_service_stub - - ## - # Configure the CertificateAuthorityService Client class. - # - # See {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CertificateAuthorityService clients - # ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Security", "PrivateCA", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CertificateAuthorityService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @certificate_authority_service_stub.universe_domain - end - - ## - # Create a new CertificateAuthorityService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CertificateAuthorityService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/security/privateca/v1beta1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @certificate_authority_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @certificate_authority_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @certificate_authority_service_stub.logger - end - - # Service calls - - ## - # Create a new {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in a given Project, Location from a particular - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # - # @overload create_certificate(request, options = nil) - # Pass arguments to `create_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil) - # Pass arguments to `create_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location and {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} - # associated with the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}, in the format - # `projects/*/locations/*/certificateAuthorities/*`. - # @param certificate_id [::String] - # Optional. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the Enterprise {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Tier CertificateAuthority.Tier}, - # but is optional and its value is ignored otherwise. - # @param certificate [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate, ::Hash] - # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new - # - # # Call the create_certificate method. - # result = client.create_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - # p result - # - def create_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :create_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. - # - # @overload get_certificate(request, options = nil) - # Pass arguments to `get_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_certificate(name: nil) - # Pass arguments to `get_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new - # - # # Call the get_certificate method. - # result = client.get_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - # p result - # - def get_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :get_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. - # - # @overload list_certificates(request, options = nil) - # Pass arguments to `list_certificates` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}, in the format - # `projects/*/locations/*/certificateauthorities/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} to include in the - # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} can subsequently be obtained - # by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} in a subsequent - # request. If unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. For details - # on supported filters and syntax, see [Certificates Filtering - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). - # @param order_by [::String] - # Optional. Specify how the results should be sorted. For details on supported fields - # and syntax, see [Certificates Sorting - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::Certificate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::Certificate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new - # - # # Call the list_certificates method. - # result = client.list_certificates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - # p item - # end - # - def list_certificates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_certificates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_certificates.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_certificates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :list_certificates, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificates, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Revoke a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. - # - # @overload revoke_certificate(request, options = nil) - # Pass arguments to `revoke_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload revoke_certificate(name: nil, reason: nil, request_id: nil) - # Pass arguments to `revoke_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in the - # format `projects/*/locations/*/certificateAuthorities/*/certificates/*`. - # @param reason [::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason RevocationReason} for revoking this certificate. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new - # - # # Call the revoke_certificate method. - # result = client.revoke_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - # p result - # - def revoke_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.revoke_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.revoke_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :revoke_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. Currently, the only field you can update is the - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate#labels labels} field. - # - # @overload update_certificate(request, options = nil) - # Pass arguments to `update_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_certificate(certificate: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate, ::Hash] - # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new - # - # # Call the update_certificate method. - # result = client.update_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - # p result - # - def update_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.certificate&.name - header_params["certificate.name"] = request.certificate.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :update_certificate, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Activate a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} that is in state - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State::PENDING_ACTIVATION PENDING_ACTIVATION} and is - # of type {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. After the - # parent Certificate Authority signs a certificate signing request from - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr FetchCertificateAuthorityCsr}, this method can complete the activation - # process. - # - # @overload activate_certificate_authority(request, options = nil) - # Pass arguments to `activate_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil) - # Pass arguments to `activate_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @param pem_ca_certificate [::String] - # Required. The signed CA certificate issued from - # {::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. - # @param subordinate_config [::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig, ::Hash] - # Required. Must include information about the issuer of 'pem_ca_certificate', and any - # further issuers until the self-signed CA. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new - # - # # Call the activate_certificate_authority method. - # result = client.activate_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def activate_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.activate_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.activate_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :activate_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a new {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in a given Project and Location. - # - # @overload create_certificate_authority(request, options = nil) - # Pass arguments to `create_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil) - # Pass arguments to `create_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format - # `projects/*/locations/*`. - # @param certificate_authority_id [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority, ::Hash] - # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new - # - # # Call the create_certificate_authority method. - # result = client.create_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :create_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # - # @overload disable_certificate_authority(request, options = nil) - # Pass arguments to `disable_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload disable_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `disable_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new - # - # # Call the disable_certificate_authority method. - # result = client.disable_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def disable_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.disable_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :disable_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # - # @overload enable_certificate_authority(request, options = nil) - # Pass arguments to `enable_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enable_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `enable_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new - # - # # Call the enable_certificate_authority method. - # result = client.enable_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def enable_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enable_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :enable_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch a certificate signing request (CSR) from a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} - # that is in state - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State::PENDING_ACTIVATION PENDING_ACTIVATION} and is - # of type {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. The CSR must - # then be signed by the desired parent Certificate Authority, which could be - # another {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} resource, or could be an on-prem - # certificate authority. See also {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#activate_certificate_authority ActivateCertificateAuthority}. - # - # @overload fetch_certificate_authority_csr(request, options = nil) - # Pass arguments to `fetch_certificate_authority_csr` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_certificate_authority_csr(name: nil) - # Pass arguments to `fetch_certificate_authority_csr` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new - # - # # Call the fetch_certificate_authority_csr method. - # result = client.fetch_certificate_authority_csr request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse. - # p result - # - def fetch_certificate_authority_csr request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_certificate_authority_csr.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :fetch_certificate_authority_csr, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # - # @overload get_certificate_authority(request, options = nil) - # Pass arguments to `get_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_certificate_authority(name: nil) - # Pass arguments to `get_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} to - # get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new - # - # # Call the get_certificate_authority method. - # result = client.get_certificate_authority request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. - # p result - # - def get_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :get_certificate_authority, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}. - # - # @overload list_certificate_authorities(request, options = nil) - # Pass arguments to `list_certificate_authorities` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_certificate_authorities(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_authorities` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format - # `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} to - # include in the response. - # Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} can subsequently be - # obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} in a subsequent - # request. If unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new - # - # # Call the list_certificate_authorities method. - # result = client.list_certificate_authorities request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. - # p item - # end - # - def list_certificate_authorities request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_certificate_authorities.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_certificate_authorities.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :list_certificate_authorities, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_authorities, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restore a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} that is scheduled for deletion. - # - # @overload restore_certificate_authority(request, options = nil) - # Pass arguments to `restore_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restore_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `restore_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new - # - # # Call the restore_certificate_authority method. - # result = client.restore_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restore_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.restore_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restore_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :restore_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Schedule a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} for deletion. - # - # @overload schedule_delete_certificate_authority(request, options = nil) - # Pass arguments to `schedule_delete_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload schedule_delete_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `schedule_delete_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new - # - # # Call the schedule_delete_certificate_authority method. - # result = client.schedule_delete_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def schedule_delete_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.schedule_delete_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.schedule_delete_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.schedule_delete_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :schedule_delete_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # - # @overload update_certificate_authority(request, options = nil) - # Pass arguments to `update_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_certificate_authority(certificate_authority: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority, ::Hash] - # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new - # - # # Call the update_certificate_authority method. - # result = client.update_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.certificate_authority&.name - header_params["certificate_authority.name"] = request.certificate_authority.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :update_certificate_authority, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}. - # - # @overload get_certificate_revocation_list(request, options = nil) - # Pass arguments to `get_certificate_revocation_list` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_certificate_revocation_list(name: nil) - # Pass arguments to `get_certificate_revocation_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new - # - # # Call the get_certificate_revocation_list method. - # result = client.get_certificate_revocation_list request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. - # p result - # - def get_certificate_revocation_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_certificate_revocation_list.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :get_certificate_revocation_list, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}. - # - # @overload list_certificate_revocation_lists(request, options = nil) - # Pass arguments to `list_certificate_revocation_lists` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_certificate_revocation_lists(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_revocation_lists` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}, in the format - # `projects/*/locations/*/certificateauthorities/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} to include in the - # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} in a subsequent - # request. If unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new - # - # # Call the list_certificate_revocation_lists method. - # result = client.list_certificate_revocation_lists request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. - # p item - # end - # - def list_certificate_revocation_lists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_certificate_revocation_lists.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :list_certificate_revocation_lists, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_revocation_lists, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}. - # - # @overload update_certificate_revocation_list(request, options = nil) - # Pass arguments to `update_certificate_revocation_list` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_certificate_revocation_list(certificate_revocation_list: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate_revocation_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_revocation_list [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList, ::Hash] - # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new - # - # # Call the update_certificate_revocation_list method. - # result = client.update_certificate_revocation_list request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_certificate_revocation_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_certificate_revocation_list.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.certificate_revocation_list&.name - header_params["certificate_revocation_list.name"] = request.certificate_revocation_list.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :update_certificate_revocation_list, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig}. - # - # @overload get_reusable_config(request, options = nil) - # Pass arguments to `get_reusable_config` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_reusable_config(name: nil) - # Pass arguments to `get_reusable_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new - # - # # Call the get_reusable_config method. - # result = client.get_reusable_config request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. - # p result - # - def get_reusable_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_reusable_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_reusable_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_reusable_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :get_reusable_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}. - # - # @overload list_reusable_configs(request, options = nil) - # Pass arguments to `list_reusable_configs` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_reusable_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_reusable_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}, in the format - # `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} to include in the response. - # Further {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} can subsequently be - # obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token} in a subsequent request. If - # unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new - # - # # Call the list_reusable_configs method. - # result = client.list_reusable_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. - # p item - # end - # - def list_reusable_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_reusable_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_reusable_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_reusable_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.call_rpc :list_reusable_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_reusable_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CertificateAuthorityService API. - # - # This class represents the configuration for CertificateAuthorityService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_certificate to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_certificate.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_certificate.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "privateca.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CertificateAuthorityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate - ## - # RPC-specific configuration for `get_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate - ## - # RPC-specific configuration for `list_certificates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificates - ## - # RPC-specific configuration for `revoke_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :revoke_certificate - ## - # RPC-specific configuration for `update_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate - ## - # RPC-specific configuration for `activate_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :activate_certificate_authority - ## - # RPC-specific configuration for `create_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_authority - ## - # RPC-specific configuration for `disable_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_certificate_authority - ## - # RPC-specific configuration for `enable_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_certificate_authority - ## - # RPC-specific configuration for `fetch_certificate_authority_csr` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_certificate_authority_csr - ## - # RPC-specific configuration for `get_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_authority - ## - # RPC-specific configuration for `list_certificate_authorities` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_authorities - ## - # RPC-specific configuration for `restore_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_certificate_authority - ## - # RPC-specific configuration for `schedule_delete_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :schedule_delete_certificate_authority - ## - # RPC-specific configuration for `update_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_authority - ## - # RPC-specific configuration for `get_certificate_revocation_list` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_revocation_list - ## - # RPC-specific configuration for `list_certificate_revocation_lists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_revocation_lists - ## - # RPC-specific configuration for `update_certificate_revocation_list` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_revocation_list - ## - # RPC-specific configuration for `get_reusable_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reusable_config - ## - # RPC-specific configuration for `list_reusable_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reusable_configs - - # @private - def initialize parent_rpcs = nil - create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate - @create_certificate = ::Gapic::Config::Method.new create_certificate_config - get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate - @get_certificate = ::Gapic::Config::Method.new get_certificate_config - list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates - @list_certificates = ::Gapic::Config::Method.new list_certificates_config - revoke_certificate_config = parent_rpcs.revoke_certificate if parent_rpcs.respond_to? :revoke_certificate - @revoke_certificate = ::Gapic::Config::Method.new revoke_certificate_config - update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate - @update_certificate = ::Gapic::Config::Method.new update_certificate_config - activate_certificate_authority_config = parent_rpcs.activate_certificate_authority if parent_rpcs.respond_to? :activate_certificate_authority - @activate_certificate_authority = ::Gapic::Config::Method.new activate_certificate_authority_config - create_certificate_authority_config = parent_rpcs.create_certificate_authority if parent_rpcs.respond_to? :create_certificate_authority - @create_certificate_authority = ::Gapic::Config::Method.new create_certificate_authority_config - disable_certificate_authority_config = parent_rpcs.disable_certificate_authority if parent_rpcs.respond_to? :disable_certificate_authority - @disable_certificate_authority = ::Gapic::Config::Method.new disable_certificate_authority_config - enable_certificate_authority_config = parent_rpcs.enable_certificate_authority if parent_rpcs.respond_to? :enable_certificate_authority - @enable_certificate_authority = ::Gapic::Config::Method.new enable_certificate_authority_config - fetch_certificate_authority_csr_config = parent_rpcs.fetch_certificate_authority_csr if parent_rpcs.respond_to? :fetch_certificate_authority_csr - @fetch_certificate_authority_csr = ::Gapic::Config::Method.new fetch_certificate_authority_csr_config - get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority - @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config - list_certificate_authorities_config = parent_rpcs.list_certificate_authorities if parent_rpcs.respond_to? :list_certificate_authorities - @list_certificate_authorities = ::Gapic::Config::Method.new list_certificate_authorities_config - restore_certificate_authority_config = parent_rpcs.restore_certificate_authority if parent_rpcs.respond_to? :restore_certificate_authority - @restore_certificate_authority = ::Gapic::Config::Method.new restore_certificate_authority_config - schedule_delete_certificate_authority_config = parent_rpcs.schedule_delete_certificate_authority if parent_rpcs.respond_to? :schedule_delete_certificate_authority - @schedule_delete_certificate_authority = ::Gapic::Config::Method.new schedule_delete_certificate_authority_config - update_certificate_authority_config = parent_rpcs.update_certificate_authority if parent_rpcs.respond_to? :update_certificate_authority - @update_certificate_authority = ::Gapic::Config::Method.new update_certificate_authority_config - get_certificate_revocation_list_config = parent_rpcs.get_certificate_revocation_list if parent_rpcs.respond_to? :get_certificate_revocation_list - @get_certificate_revocation_list = ::Gapic::Config::Method.new get_certificate_revocation_list_config - list_certificate_revocation_lists_config = parent_rpcs.list_certificate_revocation_lists if parent_rpcs.respond_to? :list_certificate_revocation_lists - @list_certificate_revocation_lists = ::Gapic::Config::Method.new list_certificate_revocation_lists_config - update_certificate_revocation_list_config = parent_rpcs.update_certificate_revocation_list if parent_rpcs.respond_to? :update_certificate_revocation_list - @update_certificate_revocation_list = ::Gapic::Config::Method.new update_certificate_revocation_list_config - get_reusable_config_config = parent_rpcs.get_reusable_config if parent_rpcs.respond_to? :get_reusable_config - @get_reusable_config = ::Gapic::Config::Method.new get_reusable_config_config - list_reusable_configs_config = parent_rpcs.list_reusable_configs if parent_rpcs.respond_to? :list_reusable_configs - @list_reusable_configs = ::Gapic::Config::Method.new list_reusable_configs_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.rb deleted file mode 100644 index 4790c8bbb309..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - module CertificateAuthorityService - # Credentials for the CertificateAuthorityService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "PRIVATE_CA_CREDENTIALS", - "PRIVATE_CA_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "PRIVATE_CA_CREDENTIALS_JSON", - "PRIVATE_CA_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.rb deleted file mode 100644 index 10eabef020dc..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/operations.rb +++ /dev/null @@ -1,845 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - module CertificateAuthorityService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CertificateAuthorityService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CertificateAuthorityService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "privateca.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb deleted file mode 100644 index ba157f7e9c6d..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths.rb +++ /dev/null @@ -1,132 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1beta1 - module CertificateAuthorityService - # Path helper methods for the CertificateAuthorityService API. - module Paths - ## - # Create a fully-qualified Certificate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificates/{certificate}` - # - # @param project [String] - # @param location [String] - # @param certificate_authority [String] - # @param certificate [String] - # - # @return [::String] - def certificate_path project:, location:, certificate_authority:, certificate: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "certificate_authority cannot contain /" if certificate_authority.to_s.include? "/" - - "projects/#{project}/locations/#{location}/certificateAuthorities/#{certificate_authority}/certificates/#{certificate}" - end - - ## - # Create a fully-qualified CertificateAuthority resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}` - # - # @param project [String] - # @param location [String] - # @param certificate_authority [String] - # - # @return [::String] - def certificate_authority_path project:, location:, certificate_authority: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/certificateAuthorities/#{certificate_authority}" - end - - ## - # Create a fully-qualified CertificateRevocationList resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}` - # - # @param project [String] - # @param location [String] - # @param certificate_authority [String] - # @param certificate_revocation_list [String] - # - # @return [::String] - def certificate_revocation_list_path project:, location:, certificate_authority:, certificate_revocation_list: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "certificate_authority cannot contain /" if certificate_authority.to_s.include? "/" - - "projects/#{project}/locations/#{location}/certificateAuthorities/#{certificate_authority}/certificateRevocationLists/#{certificate_revocation_list}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified ReusableConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/reusableConfigs/{reusable_config}` - # - # @param project [String] - # @param location [String] - # @param reusable_config [String] - # - # @return [::String] - def reusable_config_path project:, location:, reusable_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/reusableConfigs/#{reusable_config}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.rb deleted file mode 100644 index 8e50943b6059..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security/private_ca/v1beta1/version" - -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/credentials" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/paths" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client" - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - ## - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client Certificate Authority Service} manages private - # certificate authorities and issued certificates. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest" - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - module CertificateAuthorityService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.rb deleted file mode 100644 index 8338b5e6ab6d..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/client.rb +++ /dev/null @@ -1,2433 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/security/privateca/v1beta1/service_pb" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub" - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - module CertificateAuthorityService - module Rest - ## - # REST client for the CertificateAuthorityService service. - # - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client Certificate Authority Service} manages private - # certificate authorities and issued certificates. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :certificate_authority_service_stub - - ## - # Configure the CertificateAuthorityService Client class. - # - # See {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CertificateAuthorityService clients - # ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Security", "PrivateCA", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CertificateAuthorityService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @certificate_authority_service_stub.universe_domain - end - - ## - # Create a new CertificateAuthorityService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CertificateAuthorityService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @certificate_authority_service_stub = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @certificate_authority_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @certificate_authority_service_stub.logger - end - - # Service calls - - ## - # Create a new {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in a given Project, Location from a particular - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # - # @overload create_certificate(request, options = nil) - # Pass arguments to `create_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_certificate(parent: nil, certificate_id: nil, certificate: nil, request_id: nil) - # Pass arguments to `create_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location and {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} - # associated with the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}, in the format - # `projects/*/locations/*/certificateAuthorities/*`. - # @param certificate_id [::String] - # Optional. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the Enterprise {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Tier CertificateAuthority.Tier}, - # but is optional and its value is ignored otherwise. - # @param certificate [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate, ::Hash] - # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new - # - # # Call the create_certificate method. - # result = client.create_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - # p result - # - def create_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.create_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. - # - # @overload get_certificate(request, options = nil) - # Pass arguments to `get_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_certificate(name: nil) - # Pass arguments to `get_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new - # - # # Call the get_certificate method. - # result = client.get_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - # p result - # - def get_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.get_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. - # - # @overload list_certificates(request, options = nil) - # Pass arguments to `list_certificates` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificates` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}, in the format - # `projects/*/locations/*/certificateauthorities/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} to include in the - # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} can subsequently be obtained - # by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} in a subsequent - # request. If unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. For details - # on supported filters and syntax, see [Certificates Filtering - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). - # @param order_by [::String] - # Optional. Specify how the results should be sorted. For details on supported fields - # and syntax, see [Certificates Sorting - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::Certificate>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::Certificate>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new - # - # # Call the list_certificates method. - # result = client.list_certificates request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - # p item - # end - # - def list_certificates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_certificates.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_certificates.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_certificates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.list_certificates request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificates, "certificates", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Revoke a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. - # - # @overload revoke_certificate(request, options = nil) - # Pass arguments to `revoke_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload revoke_certificate(name: nil, reason: nil, request_id: nil) - # Pass arguments to `revoke_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in the - # format `projects/*/locations/*/certificateAuthorities/*/certificates/*`. - # @param reason [::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason RevocationReason} for revoking this certificate. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new - # - # # Call the revoke_certificate method. - # result = client.revoke_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - # p result - # - def revoke_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.revoke_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.revoke_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.revoke_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. Currently, the only field you can update is the - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate#labels labels} field. - # - # @overload update_certificate(request, options = nil) - # Pass arguments to `update_certificate` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_certificate(certificate: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate, ::Hash] - # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new - # - # # Call the update_certificate method. - # result = client.update_certificate request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - # p result - # - def update_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_certificate.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.update_certificate request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Activate a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} that is in state - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State::PENDING_ACTIVATION PENDING_ACTIVATION} and is - # of type {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. After the - # parent Certificate Authority signs a certificate signing request from - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client#fetch_certificate_authority_csr FetchCertificateAuthorityCsr}, this method can complete the activation - # process. - # - # @overload activate_certificate_authority(request, options = nil) - # Pass arguments to `activate_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload activate_certificate_authority(name: nil, pem_ca_certificate: nil, subordinate_config: nil, request_id: nil) - # Pass arguments to `activate_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @param pem_ca_certificate [::String] - # Required. The signed CA certificate issued from - # {::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. - # @param subordinate_config [::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig, ::Hash] - # Required. Must include information about the issuer of 'pem_ca_certificate', and any - # further issuers until the self-signed CA. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new - # - # # Call the activate_certificate_authority method. - # result = client.activate_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def activate_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.activate_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.activate_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.activate_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a new {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in a given Project and Location. - # - # @overload create_certificate_authority(request, options = nil) - # Pass arguments to `create_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_certificate_authority(parent: nil, certificate_authority_id: nil, certificate_authority: nil, request_id: nil) - # Pass arguments to `create_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format - # `projects/*/locations/*`. - # @param certificate_authority_id [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority, ::Hash] - # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with initial field values. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new - # - # # Call the create_certificate_authority method. - # result = client.create_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.create_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # - # @overload disable_certificate_authority(request, options = nil) - # Pass arguments to `disable_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload disable_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `disable_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new - # - # # Call the disable_certificate_authority method. - # result = client.disable_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def disable_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.disable_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.disable_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # - # @overload enable_certificate_authority(request, options = nil) - # Pass arguments to `enable_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enable_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `enable_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new - # - # # Call the enable_certificate_authority method. - # result = client.enable_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def enable_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enable_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.enable_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetch a certificate signing request (CSR) from a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} - # that is in state - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State::PENDING_ACTIVATION PENDING_ACTIVATION} and is - # of type {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type::SUBORDINATE SUBORDINATE}. The CSR must - # then be signed by the desired parent Certificate Authority, which could be - # another {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} resource, or could be an on-prem - # certificate authority. See also {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client#activate_certificate_authority ActivateCertificateAuthority}. - # - # @overload fetch_certificate_authority_csr(request, options = nil) - # Pass arguments to `fetch_certificate_authority_csr` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_certificate_authority_csr(name: nil) - # Pass arguments to `fetch_certificate_authority_csr` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new - # - # # Call the fetch_certificate_authority_csr method. - # result = client.fetch_certificate_authority_csr request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse. - # p result - # - def fetch_certificate_authority_csr request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_certificate_authority_csr.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.fetch_certificate_authority_csr request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # - # @overload get_certificate_authority(request, options = nil) - # Pass arguments to `get_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_certificate_authority(name: nil) - # Pass arguments to `get_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} to - # get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new - # - # # Call the get_certificate_authority method. - # result = client.get_certificate_authority request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. - # p result - # - def get_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.get_certificate_authority request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}. - # - # @overload list_certificate_authorities(request, options = nil) - # Pass arguments to `list_certificate_authorities` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_certificate_authorities(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_authorities` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format - # `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} to - # include in the response. - # Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} can subsequently be - # obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} in a subsequent - # request. If unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new - # - # # Call the list_certificate_authorities method. - # result = client.list_certificate_authorities request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. - # p item - # end - # - def list_certificate_authorities request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_certificate_authorities.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_certificate_authorities.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.list_certificate_authorities request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_authorities, "certificate_authorities", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Restore a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} that is scheduled for deletion. - # - # @overload restore_certificate_authority(request, options = nil) - # Pass arguments to `restore_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restore_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `restore_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new - # - # # Call the restore_certificate_authority method. - # result = client.restore_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restore_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.restore_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restore_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.restore_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Schedule a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} for deletion. - # - # @overload schedule_delete_certificate_authority(request, options = nil) - # Pass arguments to `schedule_delete_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload schedule_delete_certificate_authority(name: nil, request_id: nil) - # Pass arguments to `schedule_delete_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new - # - # # Call the schedule_delete_certificate_authority method. - # result = client.schedule_delete_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def schedule_delete_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.schedule_delete_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.schedule_delete_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.schedule_delete_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.schedule_delete_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # - # @overload update_certificate_authority(request, options = nil) - # Pass arguments to `update_certificate_authority` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_certificate_authority(certificate_authority: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate_authority` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_authority [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority, ::Hash] - # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new - # - # # Call the update_certificate_authority method. - # result = client.update_certificate_authority request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_certificate_authority.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.update_certificate_authority request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}. - # - # @overload get_certificate_revocation_list(request, options = nil) - # Pass arguments to `get_certificate_revocation_list` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_certificate_revocation_list(name: nil) - # Pass arguments to `get_certificate_revocation_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new - # - # # Call the get_certificate_revocation_list method. - # result = client.get_certificate_revocation_list request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. - # p result - # - def get_certificate_revocation_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_certificate_revocation_list.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.get_certificate_revocation_list request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}. - # - # @overload list_certificate_revocation_lists(request, options = nil) - # Pass arguments to `list_certificate_revocation_lists` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_certificate_revocation_lists(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_revocation_lists` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}, in the format - # `projects/*/locations/*/certificateauthorities/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} to include in the - # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} in a subsequent - # request. If unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new - # - # # Call the list_certificate_revocation_lists method. - # result = client.list_certificate_revocation_lists request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. - # p item - # end - # - def list_certificate_revocation_lists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_certificate_revocation_lists.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.list_certificate_revocation_lists request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_revocation_lists, "certificate_revocation_lists", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}. - # - # @overload update_certificate_revocation_list(request, options = nil) - # Pass arguments to `update_certificate_revocation_list` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_certificate_revocation_list(certificate_revocation_list: nil, update_mask: nil, request_id: nil) - # Pass arguments to `update_certificate_revocation_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_revocation_list [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList, ::Hash] - # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} with updated values. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A list of fields to be updated in this request. - # @param request_id [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new - # - # # Call the update_certificate_revocation_list method. - # result = client.update_certificate_revocation_list request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_certificate_revocation_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_certificate_revocation_list.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.update_certificate_revocation_list request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig}. - # - # @overload get_reusable_config(request, options = nil) - # Pass arguments to `get_reusable_config` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_reusable_config(name: nil) - # Pass arguments to `get_reusable_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new - # - # # Call the get_reusable_config method. - # result = client.get_reusable_config request - # - # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. - # p result - # - def get_reusable_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_reusable_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_reusable_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_reusable_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.get_reusable_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}. - # - # @overload list_reusable_configs(request, options = nil) - # Pass arguments to `list_reusable_configs` via a request object, either of type - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_reusable_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_reusable_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}, in the format - # `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} to include in the response. - # Further {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} can subsequently be - # obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token} in a subsequent request. If - # unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token}. - # @param filter [::String] - # Optional. Only include resources that match the filter in the response. - # @param order_by [::String] - # Optional. Specify how the results should be sorted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security/private_ca/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new - # - # # Call the list_reusable_configs method. - # result = client.list_reusable_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. - # p item - # end - # - def list_reusable_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_reusable_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_reusable_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_reusable_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_authority_service_stub.list_reusable_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_authority_service_stub, :list_reusable_configs, "reusable_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CertificateAuthorityService REST API. - # - # This class represents the configuration for CertificateAuthorityService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_certificate to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_certificate.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_certificate.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "privateca.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the CertificateAuthorityService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate - ## - # RPC-specific configuration for `get_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate - ## - # RPC-specific configuration for `list_certificates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificates - ## - # RPC-specific configuration for `revoke_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :revoke_certificate - ## - # RPC-specific configuration for `update_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate - ## - # RPC-specific configuration for `activate_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :activate_certificate_authority - ## - # RPC-specific configuration for `create_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_authority - ## - # RPC-specific configuration for `disable_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_certificate_authority - ## - # RPC-specific configuration for `enable_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_certificate_authority - ## - # RPC-specific configuration for `fetch_certificate_authority_csr` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_certificate_authority_csr - ## - # RPC-specific configuration for `get_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_authority - ## - # RPC-specific configuration for `list_certificate_authorities` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_authorities - ## - # RPC-specific configuration for `restore_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_certificate_authority - ## - # RPC-specific configuration for `schedule_delete_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :schedule_delete_certificate_authority - ## - # RPC-specific configuration for `update_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_authority - ## - # RPC-specific configuration for `get_certificate_revocation_list` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_revocation_list - ## - # RPC-specific configuration for `list_certificate_revocation_lists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_revocation_lists - ## - # RPC-specific configuration for `update_certificate_revocation_list` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_revocation_list - ## - # RPC-specific configuration for `get_reusable_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reusable_config - ## - # RPC-specific configuration for `list_reusable_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reusable_configs - - # @private - def initialize parent_rpcs = nil - create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate - @create_certificate = ::Gapic::Config::Method.new create_certificate_config - get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate - @get_certificate = ::Gapic::Config::Method.new get_certificate_config - list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates - @list_certificates = ::Gapic::Config::Method.new list_certificates_config - revoke_certificate_config = parent_rpcs.revoke_certificate if parent_rpcs.respond_to? :revoke_certificate - @revoke_certificate = ::Gapic::Config::Method.new revoke_certificate_config - update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate - @update_certificate = ::Gapic::Config::Method.new update_certificate_config - activate_certificate_authority_config = parent_rpcs.activate_certificate_authority if parent_rpcs.respond_to? :activate_certificate_authority - @activate_certificate_authority = ::Gapic::Config::Method.new activate_certificate_authority_config - create_certificate_authority_config = parent_rpcs.create_certificate_authority if parent_rpcs.respond_to? :create_certificate_authority - @create_certificate_authority = ::Gapic::Config::Method.new create_certificate_authority_config - disable_certificate_authority_config = parent_rpcs.disable_certificate_authority if parent_rpcs.respond_to? :disable_certificate_authority - @disable_certificate_authority = ::Gapic::Config::Method.new disable_certificate_authority_config - enable_certificate_authority_config = parent_rpcs.enable_certificate_authority if parent_rpcs.respond_to? :enable_certificate_authority - @enable_certificate_authority = ::Gapic::Config::Method.new enable_certificate_authority_config - fetch_certificate_authority_csr_config = parent_rpcs.fetch_certificate_authority_csr if parent_rpcs.respond_to? :fetch_certificate_authority_csr - @fetch_certificate_authority_csr = ::Gapic::Config::Method.new fetch_certificate_authority_csr_config - get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority - @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config - list_certificate_authorities_config = parent_rpcs.list_certificate_authorities if parent_rpcs.respond_to? :list_certificate_authorities - @list_certificate_authorities = ::Gapic::Config::Method.new list_certificate_authorities_config - restore_certificate_authority_config = parent_rpcs.restore_certificate_authority if parent_rpcs.respond_to? :restore_certificate_authority - @restore_certificate_authority = ::Gapic::Config::Method.new restore_certificate_authority_config - schedule_delete_certificate_authority_config = parent_rpcs.schedule_delete_certificate_authority if parent_rpcs.respond_to? :schedule_delete_certificate_authority - @schedule_delete_certificate_authority = ::Gapic::Config::Method.new schedule_delete_certificate_authority_config - update_certificate_authority_config = parent_rpcs.update_certificate_authority if parent_rpcs.respond_to? :update_certificate_authority - @update_certificate_authority = ::Gapic::Config::Method.new update_certificate_authority_config - get_certificate_revocation_list_config = parent_rpcs.get_certificate_revocation_list if parent_rpcs.respond_to? :get_certificate_revocation_list - @get_certificate_revocation_list = ::Gapic::Config::Method.new get_certificate_revocation_list_config - list_certificate_revocation_lists_config = parent_rpcs.list_certificate_revocation_lists if parent_rpcs.respond_to? :list_certificate_revocation_lists - @list_certificate_revocation_lists = ::Gapic::Config::Method.new list_certificate_revocation_lists_config - update_certificate_revocation_list_config = parent_rpcs.update_certificate_revocation_list if parent_rpcs.respond_to? :update_certificate_revocation_list - @update_certificate_revocation_list = ::Gapic::Config::Method.new update_certificate_revocation_list_config - get_reusable_config_config = parent_rpcs.get_reusable_config if parent_rpcs.respond_to? :get_reusable_config - @get_reusable_config = ::Gapic::Config::Method.new get_reusable_config_config - list_reusable_configs_config = parent_rpcs.list_reusable_configs if parent_rpcs.respond_to? :list_reusable_configs - @list_reusable_configs = ::Gapic::Config::Method.new list_reusable_configs_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.rb deleted file mode 100644 index aa973e7c95cb..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/operations.rb +++ /dev/null @@ -1,929 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - module CertificateAuthorityService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CertificateAuthorityService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CertificateAuthorityService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "privateca.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.rb deleted file mode 100644 index 0dd294029796..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest/service_stub.rb +++ /dev/null @@ -1,1314 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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/privateca/v1beta1/service_pb" - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - module CertificateAuthorityService - module Rest - ## - # REST service stub for the CertificateAuthorityService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # A result object deserialized from the server's reply - def create_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # A result object deserialized from the server's reply - def get_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_certificates REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse] - # A result object deserialized from the server's reply - def list_certificates request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_certificates_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_certificates", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the revoke_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # A result object deserialized from the server's reply - def revoke_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_revoke_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "revoke_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # A result object deserialized from the server's reply - def update_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the activate_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def activate_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_activate_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "activate_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the disable_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def disable_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "disable_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enable_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def enable_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enable_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_certificate_authority_csr REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse] - # A result object deserialized from the server's reply - def fetch_certificate_authority_csr request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_certificate_authority_csr_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_certificate_authority_csr", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] - # A result object deserialized from the server's reply - def get_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_certificate_authorities REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse] - # A result object deserialized from the server's reply - def list_certificate_authorities request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_authorities_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_certificate_authorities", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the restore_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def restore_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restore_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "restore_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the schedule_delete_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def schedule_delete_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_schedule_delete_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "schedule_delete_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_authority_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_certificate_revocation_list REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] - # A result object deserialized from the server's reply - def get_certificate_revocation_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_revocation_list_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_certificate_revocation_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_certificate_revocation_lists REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse] - # A result object deserialized from the server's reply - def list_certificate_revocation_lists request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_revocation_lists_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_certificate_revocation_lists", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_certificate_revocation_list REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_certificate_revocation_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_revocation_list_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_certificate_revocation_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_reusable_config REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig] - # A result object deserialized from the server's reply - def get_reusable_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_reusable_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_reusable_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_reusable_configs REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse] - # A result object deserialized from the server's reply - def list_reusable_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_reusable_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_reusable_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/certificates", - body: "certificate", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_certificates REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_certificates_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/certificates", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the revoke_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_revoke_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:revoke", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_certificate REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{certificate.name}", - body: "certificate", - matches: [ - ["certificate.name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the activate_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_activate_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:activate", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/certificateAuthorities", - body: "certificate_authority", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_disable_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:disable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enable_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:enable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_certificate_authority_csr REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_certificate_authority_csr_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}:fetch", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_certificate_authorities REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_certificate_authorities_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/certificateAuthorities", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restore_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restore_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:restore", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the schedule_delete_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_schedule_delete_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:scheduleDelete", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{certificate_authority.name}", - body: "certificate_authority", - matches: [ - ["certificate_authority.name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_certificate_revocation_list REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_certificate_revocation_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_certificate_revocation_lists REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_certificate_revocation_lists_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/certificateRevocationLists", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_certificate_revocation_list REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_certificate_revocation_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{certificate_revocation_list.name}", - body: "certificate_revocation_list", - matches: [ - ["certificate_revocation_list.name", %r{^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_reusable_config REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_reusable_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reusableConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_reusable_configs REST call - # - # @param request_pb [::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_reusable_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/reusableConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.rb deleted file mode 100644 index 0edf85a556a2..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest" -require "google/cloud/security/private_ca/v1beta1/version" - -module Google - module Cloud - module Security - module PrivateCA - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/security/private_ca/v1beta1/rest" - # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new - # - module V1beta1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/version.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/version.rb deleted file mode 100644 index 348951b0ad41..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/private_ca/v1beta1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/resources_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/resources_pb.rb deleted file mode 100644 index 0a964f805bc2..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/resources_pb.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/security/privateca/v1beta1/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n7google/cloud/security/privateca/v1beta1/resources.proto\x12\'google.cloud.security.privateca.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xa8\x1c\n\x14\x43\x65rtificateAuthority\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12X\n\x04type\x18\x02 \x01(\x0e\x32\x42.google.cloud.security.privateca.v1beta1.CertificateAuthority.TypeB\x06\xe0\x41\x02\xe0\x41\x05\x12X\n\x04tier\x18\x03 \x01(\x0e\x32\x42.google.cloud.security.privateca.v1beta1.CertificateAuthority.TierB\x06\xe0\x41\x02\xe0\x41\x05\x12R\n\x06\x63onfig\x18\x04 \x01(\x0b\x32:.google.cloud.security.privateca.v1beta1.CertificateConfigB\x06\xe0\x41\x02\xe0\x41\x05\x12\x30\n\x08lifetime\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x66\n\x08key_spec\x18\x06 \x01(\x0b\x32L.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpecB\x06\xe0\x41\x02\xe0\x41\x05\x12y\n\x12\x63\x65rtificate_policy\x18\x07 \x01(\x0b\x32X.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicyB\x03\xe0\x41\x01\x12j\n\x0fissuing_options\x18\x08 \x01(\x0b\x32L.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptionsB\x03\xe0\x41\x01\x12[\n\x12subordinate_config\x18\x13 \x01(\x0b\x32:.google.cloud.security.privateca.v1beta1.SubordinateConfigB\x03\xe0\x41\x01\x12W\n\x05state\x18\n \x01(\x0e\x32\x43.google.cloud.security.privateca.v1beta1.CertificateAuthority.StateB\x03\xe0\x41\x03\x12 \n\x13pem_ca_certificates\x18\t \x03(\tB\x03\xe0\x41\x03\x12i\n\x1b\x63\x61_certificate_descriptions\x18\x0c \x03(\x0b\x32?.google.cloud.security.privateca.v1beta1.CertificateDescriptionB\x03\xe0\x41\x03\x12\x17\n\ngcs_bucket\x18\r \x01(\tB\x03\xe0\x41\x05\x12\x62\n\x0b\x61\x63\x63\x65ss_urls\x18\x0e \x01(\x0b\x32H.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrlsB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12^\n\x06labels\x18\x12 \x03(\x0b\x32I.google.cloud.security.privateca.v1beta1.CertificateAuthority.LabelsEntryB\x03\xe0\x41\x01\x1aW\n\x0eIssuingOptions\x12 \n\x13include_ca_cert_url\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12#\n\x16include_crl_access_url\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x1a\xbe\t\n\x1a\x43\x65rtificateAuthorityPolicy\x12\x8e\x01\n\x13\x61llowed_config_list\x18\x01 \x01(\x0b\x32j.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigListB\x03\xe0\x41\x01H\x00\x12\x66\n\x17overwrite_config_values\x18\x02 \x01(\x0b\x32>.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperB\x03\xe0\x41\x01H\x00\x12\x62\n#allowed_locations_and_organizations\x18\x03 \x03(\x0b\x32\x30.google.cloud.security.privateca.v1beta1.SubjectB\x03\xe0\x41\x01\x12!\n\x14\x61llowed_common_names\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x8a\x01\n\x0c\x61llowed_sans\x18\x05 \x01(\x0b\x32o.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNamesB\x03\xe0\x41\x01\x12\x38\n\x10maximum_lifetime\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x8b\x01\n\x16\x61llowed_issuance_modes\x18\x08 \x01(\x0b\x32\x66.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModesB\x03\xe0\x41\x01\x1aw\n\x11\x41llowedConfigList\x12\x62\n\x15\x61llowed_config_values\x18\x01 \x03(\x0b\x32>.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperB\x03\xe0\x41\x02\x1a\xde\x01\n\x16\x41llowedSubjectAltNames\x12\x1e\n\x11\x61llowed_dns_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61llowed_uris\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12$\n\x17\x61llowed_email_addresses\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x61llowed_ips\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12)\n\x1c\x61llow_globbing_dns_wildcards\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1e\n\x11\x61llow_custom_sans\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a`\n\rIssuanceModes\x12%\n\x18\x61llow_csr_based_issuance\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12(\n\x1b\x61llow_config_based_issuance\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x42\x0f\n\rconfig_policy\x1aG\n\nAccessUrls\x12!\n\x19\x63\x61_certificate_access_url\x18\x01 \x01(\t\x12\x16\n\x0e\x63rl_access_url\x18\x02 \x01(\t\x1a\xaf\x01\n\x0eKeyVersionSpec\x12$\n\x15\x63loud_kms_key_version\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x12i\n\talgorithm\x18\x02 \x01(\x0e\x32O.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithmB\x03\xe0\x41\x02H\x00\x42\x0c\n\nKeyVersion\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\">\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bSELF_SIGNED\x10\x01\x12\x0f\n\x0bSUBORDINATE\x10\x02\"8\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0e\n\nENTERPRISE\x10\x01\x12\n\n\x06\x44\x45VOPS\x10\x02\"g\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\x16\n\x12PENDING_ACTIVATION\x10\x03\x12\x14\n\x10PENDING_DELETION\x10\x04\"\xfc\x01\n\x11SignHashAlgorithm\x12#\n\x1fSIGN_HASH_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x19\n\x15RSA_PKCS1_2048_SHA256\x10\x06\x12\x19\n\x15RSA_PKCS1_3072_SHA256\x10\x07\x12\x19\n\x15RSA_PKCS1_4096_SHA256\x10\x08\x12\x12\n\x0e\x45\x43_P256_SHA256\x10\x04\x12\x12\n\x0e\x45\x43_P384_SHA384\x10\x05:\x8b\x01\xea\x41\x87\x01\n-privateca.googleapis.com/CertificateAuthority\x12Vprojects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}\"\xf9\x07\n\x19\x43\x65rtificateRevocationList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fsequence_number\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12x\n\x14revoked_certificates\x18\x03 \x03(\x0b\x32U.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificateB\x03\xe0\x41\x03\x12\x14\n\x07pem_crl\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naccess_url\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x05state\x18\x06 \x01(\x0e\x32H.google.cloud.security.privateca.v1beta1.CertificateRevocationList.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x63\n\x06labels\x18\t \x03(\x0b\x32N.google.cloud.security.privateca.v1beta1.CertificateRevocationList.LabelsEntryB\x03\xe0\x41\x01\x1a\x9a\x01\n\x12RevokedCertificate\x12\x13\n\x0b\x63\x65rtificate\x18\x01 \x01(\t\x12\x19\n\x11hex_serial_number\x18\x02 \x01(\t\x12T\n\x11revocation_reason\x18\x03 \x01(\x0e\x32\x39.google.cloud.security.privateca.v1beta1.RevocationReason\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0e\n\nSUPERSEDED\x10\x02:\xca\x01\xea\x41\xc6\x01\n2privateca.googleapis.com/CertificateRevocationList\x12\x8f\x01projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}\"\x9a\x08\n\x0b\x43\x65rtificate\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x07pem_csr\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x12Q\n\x06\x63onfig\x18\x03 \x01(\x0b\x32:.google.cloud.security.privateca.v1beta1.CertificateConfigB\x03\xe0\x41\x05H\x00\x12\x33\n\x08lifetime\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x06\xe0\x41\x02\xe0\x41\x05\x12g\n\x12revocation_details\x18\x05 \x01(\x0b\x32\x46.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetailsB\x03\xe0\x41\x03\x12\x1c\n\x0fpem_certificate\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x65\n\x17\x63\x65rtificate_description\x18\x07 \x01(\x0b\x32?.google.cloud.security.privateca.v1beta1.CertificateDescriptionB\x03\xe0\x41\x03\x12\"\n\x15pem_certificate_chain\x18\x08 \x03(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12U\n\x06labels\x18\x0b \x03(\x0b\x32@.google.cloud.security.privateca.v1beta1.Certificate.LabelsEntryB\x03\xe0\x41\x01\x1a\x9d\x01\n\x11RevocationDetails\x12S\n\x10revocation_state\x18\x01 \x01(\x0e\x32\x39.google.cloud.security.privateca.v1beta1.RevocationReason\x12\x33\n\x0frevocation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9d\x01\xea\x41\x99\x01\n$privateca.googleapis.com/Certificate\x12qprojects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificates/{certificate}B\x14\n\x12\x63\x65rtificate_config\"\xff\x03\n\x0eReusableConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12R\n\x06values\x18\x02 \x01(\x0b\x32=.google.cloud.security.privateca.v1beta1.ReusableConfigValuesB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12X\n\x06labels\x18\x06 \x03(\x0b\x32\x43.google.cloud.security.privateca.v1beta1.ReusableConfig.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:w\xea\x41t\n\'privateca.googleapis.com/ReusableConfig\x12Iprojects/{project}/locations/{location}/reusableConfigs/{reusable_config}\"\x89\x04\n\x14ReusableConfigValues\x12I\n\tkey_usage\x18\x01 \x01(\x0b\x32\x31.google.cloud.security.privateca.v1beta1.KeyUsageB\x03\xe0\x41\x01\x12`\n\nca_options\x18\x02 \x01(\x0b\x32G.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptionsB\x03\xe0\x41\x01\x12J\n\npolicy_ids\x18\x03 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1beta1.ObjectIdB\x03\xe0\x41\x01\x12\x1d\n\x10\x61ia_ocsp_servers\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12Z\n\x15\x61\x64\x64itional_extensions\x18\x05 \x03(\x0b\x32\x36.google.cloud.security.privateca.v1beta1.X509ExtensionB\x03\xe0\x41\x01\x1a}\n\tCaOptions\x12.\n\x05is_ca\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x01\x12@\n\x16max_issuer_path_length\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32ValueB\x03\xe0\x41\x01\"\xae\x01\n\x15ReusableConfigWrapper\x12\x1e\n\x0freusable_config\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x12\x64\n\x16reusable_config_values\x18\x02 \x01(\x0b\x32=.google.cloud.security.privateca.v1beta1.ReusableConfigValuesB\x03\xe0\x41\x02H\x00\x42\x0f\n\rconfig_values\"\xfc\x01\n\x11SubordinateConfig\x12$\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x12r\n\x10pem_issuer_chain\x18\x02 \x01(\x0b\x32Q.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChainB\x03\xe0\x41\x02H\x00\x1a\x37\n\x16SubordinateConfigChain\x12\x1d\n\x10pem_certificates\x18\x01 \x03(\tB\x03\xe0\x41\x02\x42\x14\n\x12subordinate_config\"\xb2\x01\n\tPublicKey\x12M\n\x04type\x18\x01 \x01(\x0e\x32:.google.cloud.security.privateca.v1beta1.PublicKey.KeyTypeB\x03\xe0\x41\x02\x12\x10\n\x03key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"D\n\x07KeyType\x12\x18\n\x14KEY_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPEM_RSA_KEY\x10\x01\x12\x0e\n\nPEM_EC_KEY\x10\x02\"\xf2\x03\n\x11\x43\x65rtificateConfig\x12\x65\n\x0esubject_config\x18\x01 \x01(\x0b\x32H.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfigB\x03\xe0\x41\x02\x12\\\n\x0freusable_config\x18\x02 \x01(\x0b\x32>.google.cloud.security.privateca.v1beta1.ReusableConfigWrapperB\x03\xe0\x41\x02\x12K\n\npublic_key\x18\x03 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1beta1.PublicKeyB\x03\xe0\x41\x01\x1a\xca\x01\n\rSubjectConfig\x12\x46\n\x07subject\x18\x01 \x01(\x0b\x32\x30.google.cloud.security.privateca.v1beta1.SubjectB\x03\xe0\x41\x02\x12\x18\n\x0b\x63ommon_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12W\n\x10subject_alt_name\x18\x03 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1beta1.SubjectAltNamesB\x03\xe0\x41\x01\"\xe1\x08\n\x16\x43\x65rtificateDescription\x12o\n\x13subject_description\x18\x01 \x01(\x0b\x32R.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription\x12T\n\rconfig_values\x18\x02 \x01(\x0b\x32=.google.cloud.security.privateca.v1beta1.ReusableConfigValues\x12\x46\n\npublic_key\x18\x03 \x01(\x0b\x32\x32.google.cloud.security.privateca.v1beta1.PublicKey\x12]\n\x0esubject_key_id\x18\x04 \x01(\x0b\x32\x45.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId\x12_\n\x10\x61uthority_key_id\x18\x05 \x01(\x0b\x32\x45.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId\x12\x1f\n\x17\x63rl_distribution_points\x18\x06 \x03(\t\x12$\n\x1c\x61ia_issuing_certificate_urls\x18\x07 \x03(\t\x12p\n\x10\x63\x65rt_fingerprint\x18\x08 \x01(\x0b\x32V.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint\x1a\xf1\x02\n\x12SubjectDescription\x12\x41\n\x07subject\x18\x01 \x01(\x0b\x32\x30.google.cloud.security.privateca.v1beta1.Subject\x12\x13\n\x0b\x63ommon_name\x18\x02 \x01(\t\x12R\n\x10subject_alt_name\x18\x03 \x01(\x0b\x32\x38.google.cloud.security.privateca.v1beta1.SubjectAltNames\x12\x19\n\x11hex_serial_number\x18\x04 \x01(\t\x12+\n\x08lifetime\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x33\n\x0fnot_before_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0enot_after_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x1c\n\x05KeyId\x12\x13\n\x06key_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x16\x43\x65rtificateFingerprint\x12\x13\n\x0bsha256_hash\x18\x01 \x01(\t\"\'\n\x08ObjectId\x12\x1b\n\x0eobject_id_path\x18\x01 \x03(\x05\x42\x03\xe0\x41\x02\"\x85\x01\n\rX509Extension\x12I\n\tobject_id\x18\x01 \x01(\x0b\x32\x31.google.cloud.security.privateca.v1beta1.ObjectIdB\x03\xe0\x41\x02\x12\x15\n\x08\x63ritical\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x02\"\xb1\x05\n\x08KeyUsage\x12Y\n\x0e\x62\x61se_key_usage\x18\x01 \x01(\x0b\x32\x41.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions\x12\x65\n\x12\x65xtended_key_usage\x18\x02 \x01(\x0b\x32I.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions\x12V\n\x1bunknown_extended_key_usages\x18\x03 \x03(\x0b\x32\x31.google.cloud.security.privateca.v1beta1.ObjectId\x1a\xe7\x01\n\x0fKeyUsageOptions\x12\x19\n\x11\x64igital_signature\x18\x01 \x01(\x08\x12\x1a\n\x12\x63ontent_commitment\x18\x02 \x01(\x08\x12\x18\n\x10key_encipherment\x18\x03 \x01(\x08\x12\x19\n\x11\x64\x61ta_encipherment\x18\x04 \x01(\x08\x12\x15\n\rkey_agreement\x18\x05 \x01(\x08\x12\x11\n\tcert_sign\x18\x06 \x01(\x08\x12\x10\n\x08\x63rl_sign\x18\x07 \x01(\x08\x12\x15\n\rencipher_only\x18\x08 \x01(\x08\x12\x15\n\rdecipher_only\x18\t \x01(\x08\x1a\xa0\x01\n\x17\x45xtendedKeyUsageOptions\x12\x13\n\x0bserver_auth\x18\x01 \x01(\x08\x12\x13\n\x0b\x63lient_auth\x18\x02 \x01(\x08\x12\x14\n\x0c\x63ode_signing\x18\x03 \x01(\x08\x12\x18\n\x10\x65mail_protection\x18\x04 \x01(\x08\x12\x15\n\rtime_stamping\x18\x05 \x01(\x08\x12\x14\n\x0cocsp_signing\x18\x06 \x01(\x08\"\xa3\x01\n\x07Subject\x12\x14\n\x0c\x63ountry_code\x18\x01 \x01(\t\x12\x14\n\x0corganization\x18\x02 \x01(\t\x12\x1b\n\x13organizational_unit\x18\x03 \x01(\t\x12\x10\n\x08locality\x18\x04 \x01(\t\x12\x10\n\x08province\x18\x05 \x01(\t\x12\x16\n\x0estreet_address\x18\x06 \x01(\t\x12\x13\n\x0bpostal_code\x18\x07 \x01(\t\"\xae\x01\n\x0fSubjectAltNames\x12\x11\n\tdns_names\x18\x01 \x03(\t\x12\x0c\n\x04uris\x18\x02 \x03(\t\x12\x17\n\x0f\x65mail_addresses\x18\x03 \x03(\t\x12\x14\n\x0cip_addresses\x18\x04 \x03(\t\x12K\n\x0b\x63ustom_sans\x18\x05 \x03(\x0b\x32\x36.google.cloud.security.privateca.v1beta1.X509Extension*\x87\x02\n\x10RevocationReason\x12!\n\x1dREVOCATION_REASON_UNSPECIFIED\x10\x00\x12\x12\n\x0eKEY_COMPROMISE\x10\x01\x12$\n CERTIFICATE_AUTHORITY_COMPROMISE\x10\x02\x12\x17\n\x13\x41\x46\x46ILIATION_CHANGED\x10\x03\x12\x0e\n\nSUPERSEDED\x10\x04\x12\x1a\n\x16\x43\x45SSATION_OF_OPERATION\x10\x05\x12\x14\n\x10\x43\x45RTIFICATE_HOLD\x10\x06\x12\x17\n\x13PRIVILEGE_WITHDRAWN\x10\x07\x12\"\n\x1e\x41TTRIBUTE_AUTHORITY_COMPROMISE\x10\x08\x42\x98\x02\n+com.google.cloud.security.privateca.v1beta1B\x17PrivateCaResourcesProtoP\x01ZIcloud.google.com/go/security/privateca/apiv1beta1/privatecapb;privatecapb\xf8\x01\x01\xaa\x02\'Google.Cloud.Security.PrivateCA.V1Beta1\xca\x02\'Google\\Cloud\\Security\\PrivateCA\\V1beta1\xea\x02+Google::Cloud::Security::PrivateCA::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - CertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority").msgclass - CertificateAuthority::IssuingOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions").msgclass - CertificateAuthority::CertificateAuthorityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy").msgclass - CertificateAuthority::CertificateAuthorityPolicy::AllowedConfigList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList").msgclass - CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames").msgclass - CertificateAuthority::CertificateAuthorityPolicy::IssuanceModes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes").msgclass - CertificateAuthority::AccessUrls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls").msgclass - CertificateAuthority::KeyVersionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec").msgclass - CertificateAuthority::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.Type").enummodule - CertificateAuthority::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier").enummodule - CertificateAuthority::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.State").enummodule - CertificateAuthority::SignHashAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm").enummodule - CertificateRevocationList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateRevocationList").msgclass - CertificateRevocationList::RevokedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate").msgclass - CertificateRevocationList::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateRevocationList.State").enummodule - Certificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.Certificate").msgclass - Certificate::RevocationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails").msgclass - ReusableConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ReusableConfig").msgclass - ReusableConfigValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ReusableConfigValues").msgclass - ReusableConfigValues::CaOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions").msgclass - ReusableConfigWrapper = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ReusableConfigWrapper").msgclass - SubordinateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.SubordinateConfig").msgclass - SubordinateConfig::SubordinateConfigChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain").msgclass - PublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.PublicKey").msgclass - PublicKey::KeyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.PublicKey.KeyType").enummodule - CertificateConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateConfig").msgclass - CertificateConfig::SubjectConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig").msgclass - CertificateDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateDescription").msgclass - CertificateDescription::SubjectDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription").msgclass - CertificateDescription::KeyId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId").msgclass - CertificateDescription::CertificateFingerprint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint").msgclass - ObjectId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ObjectId").msgclass - X509Extension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.X509Extension").msgclass - KeyUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.KeyUsage").msgclass - KeyUsage::KeyUsageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions").msgclass - KeyUsage::ExtendedKeyUsageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions").msgclass - Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.Subject").msgclass - SubjectAltNames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.SubjectAltNames").msgclass - RevocationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.RevocationReason").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_pb.rb deleted file mode 100644 index a760dc678bed..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/security/privateca/v1beta1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/security/privateca/v1beta1/resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/security/privateca/v1beta1/service.proto\x12\'google.cloud.security.privateca.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x37google/cloud/security/privateca/v1beta1/resources.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe7\x01\n\x18\x43reateCertificateRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1b\n\x0e\x63\x65rtificate_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0b\x63\x65rtificate\x18\x03 \x01(\x0b\x32\x34.google.cloud.security.privateca.v1beta1.CertificateB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"S\n\x15GetCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\"\xbd\x01\n\x17ListCertificatesRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x18ListCertificatesResponse\x12J\n\x0c\x63\x65rtificates\x18\x01 \x03(\x0b\x32\x34.google.cloud.security.privateca.v1beta1.Certificate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbf\x01\n\x18RevokeCertificateRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$privateca.googleapis.com/Certificate\x12N\n\x06reason\x18\x02 \x01(\x0e\x32\x39.google.cloud.security.privateca.v1beta1.RevocationReasonB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb9\x01\n\x18UpdateCertificateRequest\x12N\n\x0b\x63\x65rtificate\x18\x01 \x01(\x0b\x32\x34.google.cloud.security.privateca.v1beta1.CertificateB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x81\x02\n#ActivateCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x1f\n\x12pem_ca_certificate\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12[\n\x12subordinate_config\x18\x03 \x01(\x0b\x32:.google.cloud.security.privateca.v1beta1.SubordinateConfigB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x81\x02\n!CreateCertificateAuthorityRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12%\n\x18\x63\x65rtificate_authority_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\x15\x63\x65rtificate_authority\x18\x03 \x01(\x0b\x32=.google.cloud.security.privateca.v1beta1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\"DisableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x81\x01\n!EnableCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"j\n#FetchCertificateAuthorityCsrRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"<\n$FetchCertificateAuthorityCsrResponse\x12\x14\n\x07pem_csr\x18\x01 \x01(\tB\x03\xe0\x41\x03\"e\n\x1eGetCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\"\xbb\x01\n!ListCertificateAuthoritiesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xb2\x01\n\"ListCertificateAuthoritiesResponse\x12^\n\x17\x63\x65rtificate_authorities\x18\x01 \x03(\x0b\x32=.google.cloud.security.privateca.v1beta1.CertificateAuthority\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x82\x01\n\"RestoreCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x89\x01\n)ScheduleDeleteCertificateAuthorityRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xd5\x01\n!UpdateCertificateAuthorityRequest\x12\x61\n\x15\x63\x65rtificate_authority\x18\x01 \x01(\x0b\x32=.google.cloud.security.privateca.v1beta1.CertificateAuthorityB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"o\n#GetCertificateRevocationListRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2privateca.googleapis.com/CertificateRevocationList\"\xcb\x01\n%ListCertificateRevocationListsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-privateca.googleapis.com/CertificateAuthority\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xc0\x01\n&ListCertificateRevocationListsResponse\x12h\n\x1c\x63\x65rtificate_revocation_lists\x18\x01 \x03(\x0b\x32\x42.google.cloud.security.privateca.v1beta1.CertificateRevocationList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xe5\x01\n&UpdateCertificateRevocationListRequest\x12l\n\x1b\x63\x65rtificate_revocation_list\x18\x01 \x01(\x0b\x32\x42.google.cloud.security.privateca.v1beta1.CertificateRevocationListB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Y\n\x18GetReusableConfigRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'privateca.googleapis.com/ReusableConfig\"\xb4\x01\n\x1aListReusableConfigsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9e\x01\n\x1bListReusableConfigsResponse\x12Q\n\x10reusable_configs\x18\x01 \x03(\x0b\x32\x37.google.cloud.security.privateca.v1beta1.ReusableConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xd1,\n\x1b\x43\x65rtificateAuthorityService\x12\x96\x02\n\x11\x43reateCertificate\x12\x41.google.cloud.security.privateca.v1beta1.CreateCertificateRequest\x1a\x34.google.cloud.security.privateca.v1beta1.Certificate\"\x87\x01\xda\x41!parent,certificate,certificate_id\x82\xd3\xe4\x93\x02]\"N/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates:\x0b\x63\x65rtificate\x12\xe5\x01\n\x0eGetCertificate\x12>.google.cloud.security.privateca.v1beta1.GetCertificateRequest\x1a\x34.google.cloud.security.privateca.v1beta1.Certificate\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\x12N/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}\x12\xf8\x01\n\x10ListCertificates\x12@.google.cloud.security.privateca.v1beta1.ListCertificatesRequest\x1a\x41.google.cloud.security.privateca.v1beta1.ListCertificatesResponse\"_\xda\x41\x06parent\x82\xd3\xe4\x93\x02P\x12N/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates\x12\xf5\x01\n\x11RevokeCertificate\x12\x41.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest\x1a\x34.google.cloud.security.privateca.v1beta1.Certificate\"g\xda\x41\x04name\x82\xd3\xe4\x93\x02Z\"U/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}:revoke:\x01*\x12\x98\x02\n\x11UpdateCertificate\x12\x41.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest\x1a\x34.google.cloud.security.privateca.v1beta1.Certificate\"\x89\x01\xda\x41\x17\x63\x65rtificate,update_mask\x82\xd3\xe4\x93\x02i2Z/v1beta1/{certificate.name=projects/*/locations/*/certificateAuthorities/*/certificates/*}:\x0b\x63\x65rtificate\x12\x94\x02\n\x1c\x41\x63tivateCertificateAuthority\x12L.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02M\"H/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:activate:\x01*\x12\xcc\x02\n\x1a\x43reateCertificateAuthority\x12J.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc2\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x35parent,certificate_authority,certificate_authority_id\x82\xd3\xe4\x93\x02X\"?/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities:\x15\x63\x65rtificate_authority\x12\x91\x02\n\x1b\x44isableCertificateAuthority\x12K.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:disable:\x01*\x12\x8e\x02\n\x1a\x45nableCertificateAuthority\x12J.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02K\"F/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:enable:\x01*\x12\x91\x02\n\x1c\x46\x65tchCertificateAuthorityCsr\x12L.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest\x1aM.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:fetch\x12\xf1\x01\n\x17GetCertificateAuthority\x12G.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest\x1a=.google.cloud.security.privateca.v1beta1.CertificateAuthority\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}\x12\x87\x02\n\x1aListCertificateAuthorities\x12J.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest\x1aK.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities\x12\x91\x02\n\x1bRestoreCertificateAuthority\x12K.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:restore:\x01*\x12\xa6\x02\n\"ScheduleDeleteCertificateAuthority\x12R.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02S\"N/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:scheduleDelete:\x01*\x12\xce\x02\n\x1aUpdateCertificateAuthority\x12J.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest\x1a\x1d.google.longrunning.Operation\"\xc4\x01\xca\x41)\n\x14\x43\x65rtificateAuthority\x12\x11OperationMetadata\xda\x41!certificate_authority,update_mask\x82\xd3\xe4\x93\x02n2U/v1beta1/{certificate_authority.name=projects/*/locations/*/certificateAuthorities/*}:\x15\x63\x65rtificate_authority\x12\x9d\x02\n\x1cGetCertificateRevocationList\x12L.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest\x1a\x42.google.cloud.security.privateca.v1beta1.CertificateRevocationList\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^\x12\\/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}\x12\xb0\x02\n\x1eListCertificateRevocationLists\x12N.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest\x1aO.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse\"m\xda\x41\x06parent\x82\xd3\xe4\x93\x02^\x12\\/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists\x12\x8d\x03\n\x1fUpdateCertificateRevocationList\x12O.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest\x1a\x1d.google.longrunning.Operation\"\xf9\x01\xca\x41.\n\x19\x43\x65rtificateRevocationList\x12\x11OperationMetadata\xda\x41\'certificate_revocation_list,update_mask\x82\xd3\xe4\x93\x02\x97\x01\x32x/v1beta1/{certificate_revocation_list.name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}:\x1b\x63\x65rtificate_revocation_list\x12\xd8\x01\n\x11GetReusableConfig\x12\x41.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest\x1a\x37.google.cloud.security.privateca.v1beta1.ReusableConfig\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}\x12\xeb\x01\n\x13ListReusableConfigs\x12\x43.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest\x1a\x44.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1beta1/{parent=projects/*/locations/*}/reusableConfigs\x1aL\xca\x41\x18privateca.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8f\x02\n+com.google.cloud.security.privateca.v1beta1B\x0ePrivateCaProtoP\x01ZIcloud.google.com/go/security/privateca/apiv1beta1/privatecapb;privatecapb\xf8\x01\x01\xaa\x02\'Google.Cloud.Security.PrivateCA.V1Beta1\xca\x02\'Google\\Cloud\\Security\\PrivateCA\\V1beta1\xea\x02+Google::Cloud::Security::PrivateCA::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - CreateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CreateCertificateRequest").msgclass - GetCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.GetCertificateRequest").msgclass - ListCertificatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificatesRequest").msgclass - ListCertificatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificatesResponse").msgclass - RevokeCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.RevokeCertificateRequest").msgclass - UpdateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.UpdateCertificateRequest").msgclass - ActivateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest").msgclass - CreateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest").msgclass - DisableCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest").msgclass - EnableCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest").msgclass - FetchCertificateAuthorityCsrRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest").msgclass - FetchCertificateAuthorityCsrResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse").msgclass - GetCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest").msgclass - ListCertificateAuthoritiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest").msgclass - ListCertificateAuthoritiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse").msgclass - RestoreCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest").msgclass - ScheduleDeleteCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest").msgclass - UpdateCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest").msgclass - GetCertificateRevocationListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest").msgclass - ListCertificateRevocationListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest").msgclass - ListCertificateRevocationListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse").msgclass - UpdateCertificateRevocationListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest").msgclass - GetReusableConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.GetReusableConfigRequest").msgclass - ListReusableConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest").msgclass - ListReusableConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.security.privateca.v1beta1.OperationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb deleted file mode 100644 index 5d3942b0c029..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/lib/google/cloud/security/privateca/v1beta1/service_services_pb.rb +++ /dev/null @@ -1,99 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/security/privateca/v1beta1/service.proto for package 'Google.Cloud.Security.PrivateCA.V1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/security/privateca/v1beta1/service_pb' - -module Google - module Cloud - module Security - module PrivateCA - module V1beta1 - module CertificateAuthorityService - # [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private - # certificate authorities and issued certificates. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.security.privateca.v1beta1.CertificateAuthorityService' - - # Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular - # [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. - rpc :CreateCertificate, ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate - # Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. - rpc :GetCertificate, ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate - # Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. - rpc :ListCertificates, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse - # Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. - rpc :RevokeCertificate, ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate - # Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the only field you can update is the - # [labels][google.cloud.security.privateca.v1beta1.Certificate.labels] field. - rpc :UpdateCertificate, ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate - # Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state - # [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is - # of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the - # parent Certificate Authority signs a certificate signing request from - # [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation - # process. - rpc :ActivateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location. - rpc :CreateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. - rpc :DisableCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. - rpc :EnableCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] - # that is in state - # [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is - # of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must - # then be signed by the desired parent Certificate Authority, which could be - # another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem - # certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority]. - rpc :FetchCertificateAuthorityCsr, ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse - # Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. - rpc :GetCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority - # Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority]. - rpc :ListCertificateAuthorities, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse - # Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion. - rpc :RestoreCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion. - rpc :ScheduleDeleteCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. - rpc :UpdateCertificateAuthority, ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest, ::Google::Longrunning::Operation - # Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. - rpc :GetCertificateRevocationList, ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList - # Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. - rpc :ListCertificateRevocationLists, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse - # Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. - rpc :UpdateCertificateRevocationList, ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest, ::Google::Longrunning::Operation - # Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. - rpc :GetReusableConfig, ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig - # Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig]. - rpc :ListReusableConfigs, ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest, ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/README.md deleted file mode 100644 index 3e513ef757bc..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Certificate Authority Service V1beta1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.rb deleted file mode 100644 index 195a33eff695..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/resources.rb +++ /dev/null @@ -1,1001 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1beta1 - # A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} represents an individual Certificate Authority. - # A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} can be used to create {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @!attribute [rw] type - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type] - # Required. Immutable. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Type Type} of this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # @!attribute [rw] tier - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Tier] - # Required. Immutable. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Tier Tier} of this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # @!attribute [rw] config - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateConfig] - # Required. Immutable. The config used to create a self-signed X.509 certificate or CSR. - # @!attribute [rw] lifetime - # @return [::Google::Protobuf::Duration] - # Required. The desired lifetime of the CA certificate. Used to create the - # "not_before_time" and "not_after_time" fields inside an X.509 - # certificate. - # @!attribute [rw] key_spec - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::KeyVersionSpec] - # Required. Immutable. Used when issuing certificates for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. If this - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} is a self-signed CertificateAuthority, this key - # is also used to sign the self-signed CA certificate. Otherwise, it - # is used to sign a CSR. - # @!attribute [rw] certificate_policy - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy] - # Optional. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy CertificateAuthorityPolicy} to enforce when issuing - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} from this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # @!attribute [rw] issuing_options - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::IssuingOptions] - # Optional. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::IssuingOptions IssuingOptions} to follow when issuing {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} - # from this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # @!attribute [rw] subordinate_config - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig] - # Optional. If this is a subordinate {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, this field will be set - # with the subordinate configuration, which describes its issuers. This may - # be updated, but this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} must continue to validate. - # @!attribute [r] state - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State] - # Output only. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::State State} for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # @!attribute [r] pem_ca_certificates - # @return [::Array<::String>] - # Output only. This {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s certificate chain, including the current - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s certificate. Ordered such that the root issuer - # is the final element (consistent with RFC 5246). For a self-signed CA, this - # will only list the current {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s certificate. - # @!attribute [r] ca_certificate_descriptions - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription>] - # Output only. A structured description of this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s CA certificate - # and its issuers. Ordered as self-to-root. - # @!attribute [rw] gcs_bucket - # @return [::String] - # Immutable. The name of a Cloud Storage bucket where this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} will - # publish content, such as the CA certificate and CRLs. This must be a bucket - # name, without any prefixes (such as `gs://`) or suffixes (such as - # `.googleapis.com`). For example, to use a bucket named `my-bucket`, you - # would simply specify `my-bucket`. If not specified, a managed bucket will - # be created. - # @!attribute [r] access_urls - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::AccessUrls] - # Output only. URLs for accessing content published by this CA, such as the CA certificate - # and CRLs. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} was updated. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} will be deleted, if - # scheduled for deletion. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels with user-defined metadata. - class CertificateAuthority - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Options that affect all certificates issued by a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # @!attribute [rw] include_ca_cert_url - # @return [::Boolean] - # Required. When true, includes a URL to the issuing CA certificate in the - # "authority information access" X.509 extension. - # @!attribute [rw] include_crl_access_url - # @return [::Boolean] - # Required. When true, includes a URL to the CRL corresponding to certificates - # issued from a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # CRLs will expire 7 days from their creation. However, we will rebuild - # daily. CRLs are also rebuilt shortly after a certificate is revoked. - class IssuingOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The issuing policy for a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} will not be successfully issued from this - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} if they violate the policy. - # @!attribute [rw] allowed_config_list - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedConfigList] - # Optional. All {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} - # must match at least one listed {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper ReusableConfigWrapper} in the list. - # - # Note: The following fields are mutually exclusive: `allowed_config_list`, `overwrite_config_values`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] overwrite_config_values - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper] - # Optional. All {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} - # will use the provided configuration values, overwriting any requested - # configuration values. - # - # Note: The following fields are mutually exclusive: `overwrite_config_values`, `allowed_config_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] allowed_locations_and_organizations - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::Subject>] - # Optional. If any {::Google::Cloud::Security::PrivateCA::V1beta1::Subject Subject} is specified here, then all - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} must - # match at least one listed {::Google::Cloud::Security::PrivateCA::V1beta1::Subject Subject}. If a {::Google::Cloud::Security::PrivateCA::V1beta1::Subject Subject} has an empty - # field, any value will be allowed for that field. - # @!attribute [rw] allowed_common_names - # @return [::Array<::String>] - # Optional. If any value is specified here, then all - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} must - # match at least one listed value. If no value is specified, all values - # will be allowed for this fied. Glob patterns are also supported. - # @!attribute [rw] allowed_sans - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames] - # Optional. If a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames AllowedSubjectAltNames} is specified here, then all - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} must - # match {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames AllowedSubjectAltNames}. If no value or an empty value - # is specified, any value will be allowed for the {::Google::Cloud::Security::PrivateCA::V1beta1::SubjectAltNames SubjectAltNames} - # field. - # @!attribute [rw] maximum_lifetime - # @return [::Google::Protobuf::Duration] - # Optional. The maximum lifetime allowed by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. Note that - # if the any part if the issuing chain expires before a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}'s - # requested maximum_lifetime, the effective lifetime will be explicitly - # truncated. - # @!attribute [rw] allowed_issuance_modes - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::IssuanceModes] - # Optional. If specified, then only methods allowed in the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::IssuanceModes IssuanceModes} may be - # used to issue {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. - class CertificateAuthorityPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] allowed_config_values - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper>] - # Required. All {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} issued by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} - # must match at least one listed {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper ReusableConfigWrapper}. If a - # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper ReusableConfigWrapper} has an empty field, any value will be - # allowed for that field. - class AllowedConfigList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames AllowedSubjectAltNames} specifies the allowed values for - # {::Google::Cloud::Security::PrivateCA::V1beta1::SubjectAltNames SubjectAltNames} by the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} when issuing - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. - # @!attribute [rw] allowed_dns_names - # @return [::Array<::String>] - # Optional. Contains valid, fully-qualified host names. Glob patterns are also - # supported. To allow an explicit wildcard certificate, escape with - # backlash (i.e. `\*`). - # E.g. for globbed entries: `*bar.com` will allow `foo.bar.com`, but not - # `*.bar.com`, unless the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames#allow_globbing_dns_wildcards allow_globbing_dns_wildcards} field is set. - # E.g. for wildcard entries: `\*.bar.com` will allow `*.bar.com`, but not - # `foo.bar.com`. - # @!attribute [rw] allowed_uris - # @return [::Array<::String>] - # Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To - # match across path seperators (i.e. '/') use the double star glob - # pattern (i.e. '**'). - # @!attribute [rw] allowed_email_addresses - # @return [::Array<::String>] - # Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also - # supported. - # @!attribute [rw] allowed_ips - # @return [::Array<::String>] - # Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6 - # addresses and subnet ranges. Subnet ranges are specified using the - # '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns - # are supported only for ip address entries (i.e. not for subnet ranges). - # @!attribute [rw] allow_globbing_dns_wildcards - # @return [::Boolean] - # Optional. Specifies if glob patterns used for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::AllowedSubjectAltNames#allowed_dns_names allowed_dns_names} allows - # wildcard certificates. - # @!attribute [rw] allow_custom_sans - # @return [::Boolean] - # Optional. Specifies if to allow custom X509Extension values. - class AllowedSubjectAltNames - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::CertificateAuthorityPolicy::IssuanceModes IssuanceModes} specifies the allowed ways in which - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} may be requested from this - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # @!attribute [rw] allow_csr_based_issuance - # @return [::Boolean] - # Required. When true, allows callers to create {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} by - # specifying a CSR. - # @!attribute [rw] allow_config_based_issuance - # @return [::Boolean] - # Required. When true, allows callers to create {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} by - # specifying a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateConfig CertificateConfig}. - class IssuanceModes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # URLs where a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} will publish content. - # @!attribute [rw] ca_certificate_access_url - # @return [::String] - # The URL where this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s CA certificate is - # published. This will only be set for CAs that have been activated. - # @!attribute [rw] crl_access_url - # @return [::String] - # The URL where this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}'s CRLs are published. This - # will only be set for CAs that have been activated. - class AccessUrls - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Cloud KMS key configuration that a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} will use. - # @!attribute [rw] cloud_kms_key_version - # @return [::String] - # Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the - # format - # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - # This option enables full flexibility in the key's capabilities and - # properties. - # - # Note: The following fields are mutually exclusive: `cloud_kms_key_version`, `algorithm`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] algorithm - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::SignHashAlgorithm] - # Required. The algorithm to use for creating a managed Cloud KMS key for a for a - # simplified experience. All managed keys will be have their - # [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`. - # - # Note: The following fields are mutually exclusive: `algorithm`, `cloud_kms_key_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class KeyVersionSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, indicating its issuing chain. - module Type - # Not specified. - TYPE_UNSPECIFIED = 0 - - # Self-signed CA. - SELF_SIGNED = 1 - - # Subordinate CA. Could be issued by a Private CA {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} - # or an unmanaged CA. - SUBORDINATE = 2 - end - - # The tier of a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, indicating its supported - # functionality and/or billing SKU. - module Tier - # Not specified. - TIER_UNSPECIFIED = 0 - - # Enterprise tier. - ENTERPRISE = 1 - - # DevOps tier. - DEVOPS = 2 - end - - # The state of a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, indicating if it can be used. - module State - # Not specified. - STATE_UNSPECIFIED = 0 - - # Certificates can be issued from this CA. CRLs will be generated for this - # CA. - ENABLED = 1 - - # Certificates cannot be issued from this CA. CRLs will still be generated. - DISABLED = 2 - - # Certificates cannot be issued from this CA. CRLs will not be generated. - PENDING_ACTIVATION = 3 - - # Certificates cannot be issued from this CA. CRLs will not be generated. - PENDING_DELETION = 4 - end - - # The algorithm of a Cloud KMS CryptoKeyVersion of a - # [CryptoKey][google.cloud.kms.v1.CryptoKey] with the - # [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value - # `ASYMMETRIC_SIGN`. These values correspond to the - # [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - # values. For RSA signing algorithms, the PSS algorithms should be preferred, - # use PKCS1 algorithms if required for compatibility. For further - # recommandations, see - # https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations. - module SignHashAlgorithm - # Not specified. - SIGN_HASH_ALGORITHM_UNSPECIFIED = 0 - - # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256 - RSA_PSS_2048_SHA256 = 1 - - # maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256 - RSA_PSS_3072_SHA256 = 2 - - # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256 - RSA_PSS_4096_SHA256 = 3 - - # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256 - RSA_PKCS1_2048_SHA256 = 6 - - # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256 - RSA_PKCS1_3072_SHA256 = 7 - - # maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256 - RSA_PKCS1_4096_SHA256 = 8 - - # maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256 - EC_P256_SHA256 = 4 - - # maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384 - EC_P384_SHA384 = 5 - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} corresponds to a signed X.509 certificate - # Revocation List (CRL). A CRL contains the serial numbers of certificates that - # should no longer be trusted. - # @!attribute [r] name - # @return [::String] - # Output only. The resource path for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} in - # the format - # `projects/*/locations/*/certificateAuthorities/*/ - # certificateRevocationLists/*`. - # @!attribute [r] sequence_number - # @return [::Integer] - # Output only. The CRL sequence number that appears in pem_crl. - # @!attribute [r] revoked_certificates - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList::RevokedCertificate>] - # Output only. The revoked serial numbers that appear in pem_crl. - # @!attribute [r] pem_crl - # @return [::String] - # Output only. The PEM-encoded X.509 CRL. - # @!attribute [r] access_url - # @return [::String] - # Output only. The location where 'pem_crl' can be accessed. - # @!attribute [r] state - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList::State] - # Output only. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList::State State} for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels with user-defined metadata. - class CertificateRevocationList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a revoked {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. - # @!attribute [rw] certificate - # @return [::String] - # The resource path for the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in the format - # `projects/*/locations/*/certificateAuthorities/*/certificates/*`. - # @!attribute [rw] hex_serial_number - # @return [::String] - # The serial number of the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. - # @!attribute [rw] revocation_reason - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason] - # The reason the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} was revoked. - class RevokedCertificate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList}, indicating if it is current. - module State - # Not specified. - STATE_UNSPECIFIED = 0 - - # The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} is up to date. - ACTIVE = 1 - - # The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} is no longer current. - SUPERSEDED = 2 - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} corresponds to a signed X.509 certificate issued by a - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. - # @!attribute [r] name - # @return [::String] - # Output only. The resource path for this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in the format - # `projects/*/locations/*/certificateAuthorities/*/certificates/*`. - # @!attribute [rw] pem_csr - # @return [::String] - # Immutable. A pem-encoded X.509 certificate signing request (CSR). - # - # Note: The following fields are mutually exclusive: `pem_csr`, `config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] config - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateConfig] - # Immutable. A description of the certificate and key that does not require X.509 or - # ASN.1. - # - # Note: The following fields are mutually exclusive: `config`, `pem_csr`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] lifetime - # @return [::Google::Protobuf::Duration] - # Required. Immutable. The desired lifetime of a certificate. Used to create the - # "not_before_time" and "not_after_time" fields inside an X.509 - # certificate. Note that the lifetime may be truncated if it would extend - # past the life of any certificate authority in the issuing chain. - # @!attribute [r] revocation_details - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate::RevocationDetails] - # Output only. Details regarding the revocation of this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. This - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} is considered revoked if and only if this field is present. - # @!attribute [r] pem_certificate - # @return [::String] - # Output only. The pem-encoded, signed X.509 certificate. - # @!attribute [r] certificate_description - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription] - # Output only. A structured description of the issued X.509 certificate. - # @!attribute [r] pem_certificate_chain - # @return [::Array<::String>] - # Output only. The chain that may be used to verify the X.509 certificate. Expected to be - # in issuer-to-root order according to RFC 5246. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels with user-defined metadata. - class Certificate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes fields that are relavent to the revocation of a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}. - # @!attribute [rw] revocation_state - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason] - # Indicates why a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} was revoked. - # @!attribute [rw] revocation_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} was revoked. - class RevocationDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig} refers to a managed {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues ReusableConfigValues}. Those, in - # turn, are used to describe certain fields of an X.509 certificate, such as - # the key usage fields, fields specific to CA certificates, certificate policy - # extensions and custom extensions. - # @!attribute [r] name - # @return [::String] - # Output only. The resource path for this {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig} in the format - # `projects/*/locations/*/reusableConfigs/*`. - # @!attribute [rw] values - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues] - # Required. The config values. - # @!attribute [rw] description - # @return [::String] - # Optional. A human-readable description of scenarios these ReusableConfigValues may be - # compatible with. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig} was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig} was updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels with user-defined metadata. - class ReusableConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues ReusableConfigValues} is used to describe certain fields of an - # X.509 certificate, such as the key usage fields, fields specific to CA - # certificates, certificate policy extensions and custom extensions. - # @!attribute [rw] key_usage - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage] - # Optional. Indicates the intended use for keys that correspond to a certificate. - # @!attribute [rw] ca_options - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues::CaOptions] - # Optional. Describes options in this {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues ReusableConfigValues} that are - # relevant in a CA certificate. - # @!attribute [rw] policy_ids - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId>] - # Optional. Describes the X.509 certificate policy object identifiers, per - # https://tools.ietf.org/html/rfc5280#section-4.2.1.4. - # @!attribute [rw] aia_ocsp_servers - # @return [::Array<::String>] - # Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses - # that appear in the "Authority Information Access" extension in the - # certificate. - # @!attribute [rw] additional_extensions - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::X509Extension>] - # Optional. Describes custom X.509 extensions. - class ReusableConfigValues - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes values that are relevant in a CA certificate. - # @!attribute [rw] is_ca - # @return [::Google::Protobuf::BoolValue] - # Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this - # value is missing, the extension will be omitted from the CA certificate. - # @!attribute [rw] max_issuer_path_length - # @return [::Google::Protobuf::Int32Value] - # Optional. Refers to the path length restriction X.509 extension. For a CA - # certificate, this value describes the depth of subordinate CA - # certificates that are allowed. - # If this value is less than 0, the request will fail. - # If this value is missing, the max path length will be omitted from the - # CA certificate. - class CaOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper ReusableConfigWrapper} describes values that may assist in creating an - # X.509 certificate, or a reference to a pre-defined set of values. - # @!attribute [rw] reusable_config - # @return [::String] - # Required. A resource path to a {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfig} in the format - # `projects/*/locations/*/reusableConfigs/*`. - # - # Note: The following fields are mutually exclusive: `reusable_config`, `reusable_config_values`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] reusable_config_values - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues] - # Required. A user-specified inline {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues ReusableConfigValues}. - # - # Note: The following fields are mutually exclusive: `reusable_config_values`, `reusable_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ReusableConfigWrapper - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a subordinate CA's issuers. This is either a resource path to a - # known issuing {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, or a PEM issuer certificate chain. - # @!attribute [rw] certificate_authority - # @return [::String] - # Required. This can refer to a {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the same project that - # was used to create a subordinate {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}. This field - # is used for information and usability purposes only. The resource name - # is in the format `projects/*/locations/*/certificateAuthorities/*`. - # - # Note: The following fields are mutually exclusive: `certificate_authority`, `pem_issuer_chain`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pem_issuer_chain - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig::SubordinateConfigChain] - # Required. Contains the PEM certificate chain for the issuers of this - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority}, but not pem certificate for this CA itself. - # - # Note: The following fields are mutually exclusive: `pem_issuer_chain`, `certificate_authority`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SubordinateConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This message describes a subordinate CA's issuer certificate chain. This - # wrapper exists for compatibility reasons. - # @!attribute [rw] pem_certificates - # @return [::Array<::String>] - # Required. Expected to be in leaf-to-root order according to RFC 5246. - class SubordinateConfigChain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey PublicKey} describes a public key. - # @!attribute [rw] type - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey::KeyType] - # Required. The type of public key. - # @!attribute [rw] key - # @return [::String] - # Required. A public key. Padding and encoding varies by 'KeyType' and is described - # along with the KeyType values. - class PublicKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of public keys that are supported. - # At a minimum, we support RSA and ECDSA, for the key sizes or curves listed: - # https://cloud.google.com/kms/docs/algorithms#asymmetric_signing_algorithms - module KeyType - # Default unspecified value. - KEY_TYPE_UNSPECIFIED = 0 - - # A PEM-encoded PKCS#1/RFC 3447 RSAPrivateKey structure. - PEM_RSA_KEY = 1 - - # A PEM-encoded compressed NIST P-256/secp256r1/prime256v1 or P-384 key. - PEM_EC_KEY = 2 - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateConfig CertificateConfig} describes an X.509 certificate or CSR that is to be - # created, as an alternative to using ASN.1. - # @!attribute [rw] subject_config - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateConfig::SubjectConfig] - # Required. Specifies some of the values in a certificate that are related to the - # subject. - # @!attribute [rw] reusable_config - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigWrapper] - # Required. Describes how some of the technical fields in a certificate should be - # populated. - # @!attribute [rw] public_key - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey] - # Optional. The public key that corresponds to this config. This is, for example, used - # when issuing {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}, but not when creating a - # self-signed {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} or {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} CSR. - class CertificateConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # These values are used to create the distinguished name and subject - # alternative name fields in an X.509 certificate. - # @!attribute [rw] subject - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Subject] - # Required. Contains distinguished name fields such as the location and organization. - # @!attribute [rw] common_name - # @return [::String] - # Optional. The "common name" of the distinguished name. - # @!attribute [rw] subject_alt_name - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::SubjectAltNames] - # Optional. The subject alternative name fields. - class SubjectConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription CertificateDescription} describes an X.509 certificate or CSR that has - # been issued, as an alternative to using ASN.1 / X.509. - # @!attribute [rw] subject_description - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription::SubjectDescription] - # Describes some of the values in a certificate that are related to the - # subject and lifetime. - # @!attribute [rw] config_values - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfigValues] - # Describes some of the technical fields in a certificate. - # @!attribute [rw] public_key - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::PublicKey] - # The public key that corresponds to an issued certificate. - # @!attribute [rw] subject_key_id - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription::KeyId] - # Provides a means of identifiying certificates that contain a particular - # public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2. - # @!attribute [rw] authority_key_id - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription::KeyId] - # Identifies the subject_key_id of the parent certificate, per - # https://tools.ietf.org/html/rfc5280#section-4.2.1.1 - # @!attribute [rw] crl_distribution_points - # @return [::Array<::String>] - # Describes a list of locations to obtain CRL information, i.e. - # the DistributionPoint.fullName described by - # https://tools.ietf.org/html/rfc5280#section-4.2.1.13 - # @!attribute [rw] aia_issuing_certificate_urls - # @return [::Array<::String>] - # Describes lists of issuer CA certificate URLs that appear in the - # "Authority Information Access" extension in the certificate. - # @!attribute [rw] cert_fingerprint - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateDescription::CertificateFingerprint] - # The hash of the x.509 certificate. - class CertificateDescription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # These values describe fields in an issued X.509 certificate such as the - # distinguished name, subject alternative names, serial number, and lifetime. - # @!attribute [rw] subject - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Subject] - # Contains distinguished name fields such as the location and organization. - # @!attribute [rw] common_name - # @return [::String] - # The "common name" of the distinguished name. - # @!attribute [rw] subject_alt_name - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::SubjectAltNames] - # The subject alternative name fields. - # @!attribute [rw] hex_serial_number - # @return [::String] - # The serial number encoded in lowercase hexadecimal. - # @!attribute [rw] lifetime - # @return [::Google::Protobuf::Duration] - # For convenience, the actual lifetime of an issued certificate. - # Corresponds to 'not_after_time' - 'not_before_time'. - # @!attribute [rw] not_before_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the certificate becomes valid. - # @!attribute [rw] not_after_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the certificate expires. - class SubjectDescription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A KeyId identifies a specific public key, usually by hashing the public - # key. - # @!attribute [rw] key_id - # @return [::String] - # Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most - # likely the 160 bit SHA-1 hash of the public key. - class KeyId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A group of fingerprints for the x509 certificate. - # @!attribute [rw] sha256_hash - # @return [::String] - # The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate. - class CertificateFingerprint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # An {::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId ObjectId} specifies an object identifier (OID). These provide context - # and describe types in ASN.1 messages. - # @!attribute [rw] object_id_path - # @return [::Array<::Integer>] - # Required. The parts of an OID path. The most significant parts of the path come - # first. - class ObjectId - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An {::Google::Cloud::Security::PrivateCA::V1beta1::X509Extension X509Extension} specifies an X.509 extension, which may be used in - # different parts of X.509 objects like certificates, CSRs, and CRLs. - # @!attribute [rw] object_id - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId] - # Required. The OID for this X.509 extension. - # @!attribute [rw] critical - # @return [::Boolean] - # Required. Indicates whether or not this extension is critical (i.e., if the client - # does not know how to handle this extension, the client should consider this - # to be an error). - # @!attribute [rw] value - # @return [::String] - # Required. The value of this X.509 extension. - class X509Extension - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A {::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage KeyUsage} describes key usage values that may appear in an X.509 - # certificate. - # @!attribute [rw] base_key_usage - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::KeyUsageOptions] - # Describes high-level ways in which a key may be used. - # @!attribute [rw] extended_key_usage - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions] - # Detailed scenarios in which a key may be used. - # @!attribute [rw] unknown_extended_key_usages - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId>] - # Used to describe extended key usages that are not listed in the - # {::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions KeyUsage.ExtendedKeyUsageOptions} message. - class KeyUsage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # {::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::KeyUsageOptions KeyUsage.KeyUsageOptions} corresponds to the key usage values - # described in https://tools.ietf.org/html/rfc5280#section-4.2.1.3. - # @!attribute [rw] digital_signature - # @return [::Boolean] - # The key may be used for digital signatures. - # @!attribute [rw] content_commitment - # @return [::Boolean] - # The key may be used for cryptographic commitments. Note that this may - # also be referred to as "non-repudiation". - # @!attribute [rw] key_encipherment - # @return [::Boolean] - # The key may be used to encipher other keys. - # @!attribute [rw] data_encipherment - # @return [::Boolean] - # The key may be used to encipher data. - # @!attribute [rw] key_agreement - # @return [::Boolean] - # The key may be used in a key agreement protocol. - # @!attribute [rw] cert_sign - # @return [::Boolean] - # The key may be used to sign certificates. - # @!attribute [rw] crl_sign - # @return [::Boolean] - # The key may be used sign certificate revocation lists. - # @!attribute [rw] encipher_only - # @return [::Boolean] - # The key may be used to encipher only. - # @!attribute [rw] decipher_only - # @return [::Boolean] - # The key may be used to decipher only. - class KeyUsageOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # {::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions KeyUsage.ExtendedKeyUsageOptions} has fields that correspond to - # certain common OIDs that could be specified as an extended key usage value. - # @!attribute [rw] server_auth - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW - # server authentication", though regularly used for non-WWW TLS. - # @!attribute [rw] client_auth - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW - # client authentication", though regularly used for non-WWW TLS. - # @!attribute [rw] code_signing - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of - # downloadable executable code client authentication". - # @!attribute [rw] email_protection - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email - # protection". - # @!attribute [rw] time_stamping - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding - # the hash of an object to a time". - # @!attribute [rw] ocsp_signing - # @return [::Boolean] - # Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing - # OCSP responses". - class ExtendedKeyUsageOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # {::Google::Cloud::Security::PrivateCA::V1beta1::Subject Subject} describes parts of a distinguished name that, in turn, - # describes the subject of the certificate. - # @!attribute [rw] country_code - # @return [::String] - # The country code of the subject. - # @!attribute [rw] organization - # @return [::String] - # The organization of the subject. - # @!attribute [rw] organizational_unit - # @return [::String] - # The organizational_unit of the subject. - # @!attribute [rw] locality - # @return [::String] - # The locality or city of the subject. - # @!attribute [rw] province - # @return [::String] - # The province, territory, or regional state of the subject. - # @!attribute [rw] street_address - # @return [::String] - # The street address of the subject. - # @!attribute [rw] postal_code - # @return [::String] - # The postal code of the subject. - class Subject - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # {::Google::Cloud::Security::PrivateCA::V1beta1::SubjectAltNames SubjectAltNames} corresponds to a more modern way of listing what - # the asserted identity is in a certificate (i.e., compared to the "common - # name" in the distinguished name). - # @!attribute [rw] dns_names - # @return [::Array<::String>] - # Contains only valid, fully-qualified host names. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Contains only valid RFC 3986 URIs. - # @!attribute [rw] email_addresses - # @return [::Array<::String>] - # Contains only valid RFC 2822 E-mail addresses. - # @!attribute [rw] ip_addresses - # @return [::Array<::String>] - # Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses. - # @!attribute [rw] custom_sans - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::X509Extension>] - # Contains additional subject alternative name values. - class SubjectAltNames - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A {::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason RevocationReason} indicates whether a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} has been revoked, - # and the reason for revocation. These correspond to standard revocation - # reasons from RFC 5280. Note that the enum labels and values in this - # definition are not the same ASN.1 values defined in RFC 5280. These values - # will be translated to the correct ASN.1 values when a CRL is created. - module RevocationReason - # Default unspecified value. This value does indicate that a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} - # has been revoked, but that a reason has not been recorded. - REVOCATION_REASON_UNSPECIFIED = 0 - - # Key material for this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} may have leaked. - KEY_COMPROMISE = 1 - - # The key material for a certificate authority in the issuing path may have - # leaked. - CERTIFICATE_AUTHORITY_COMPROMISE = 2 - - # The subject or other attributes in this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} have changed. - AFFILIATION_CHANGED = 3 - - # This {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} has been superseded. - SUPERSEDED = 4 - - # This {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} or entities in the issuing path have ceased to - # operate. - CESSATION_OF_OPERATION = 5 - - # This {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} should not be considered valid, it is expected that it - # may become valid in the future. - CERTIFICATE_HOLD = 6 - - # This {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} no longer has permission to assert the listed - # attributes. - PRIVILEGE_WITHDRAWN = 7 - - # The authority which determines appropriate attributes for a {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} - # may have been compromised. - ATTRIBUTE_AUTHORITY_COMPROMISE = 8 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.rb deleted file mode 100644 index 6a9041ea2415..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/cloud/security/privateca/v1beta1/service.rb +++ /dev/null @@ -1,633 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1beta1 - # Request message for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate CertificateAuthorityService.CreateCertificate}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location and {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} - # associated with the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate}, in the format - # `projects/*/locations/*/certificateAuthorities/*`. - # @!attribute [rw] certificate_id - # @return [::String] - # Optional. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the Enterprise {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority::Tier CertificateAuthority.Tier}, - # but is optional and its value is ignored otherwise. - # @!attribute [rw] certificate - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with initial field values. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate CertificateAuthorityService.GetCertificate}. - # @!attribute [rw] name - # @return [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} to get. - class GetCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificates CertificateAuthorityService.ListCertificates}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}, in the format - # `projects/*/locations/*/certificateauthorities/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} to include in the - # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates} can subsequently be obtained - # by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token} in a subsequent - # request. If unspecified, the server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse#next_page_token ListCertificatesResponse.next_page_token}. - # @!attribute [rw] filter - # @return [::String] - # Optional. Only include resources that match the filter in the response. For details - # on supported filters and syntax, see [Certificates Filtering - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specify how the results should be sorted. For details on supported fields - # and syntax, see [Certificates Sorting - # documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). - class ListCertificatesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificates CertificateAuthorityService.ListCertificates}. - # @!attribute [rw] certificates - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::Certificate>] - # The list of {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificates}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. Pass this value in - # [ListCertificatesRequest.next_page_token][] to retrieve the - # next page of results. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations (e.g. "us-west1") that could not be reached. - class ListCertificatesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#revoke_certificate CertificateAuthorityService.RevokeCertificate}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} in the - # format `projects/*/locations/*/certificateAuthorities/*/certificates/*`. - # @!attribute [rw] reason - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::RevocationReason RevocationReason} for revoking this certificate. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class RevokeCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate CertificateAuthorityService.UpdateCertificate}. - # @!attribute [rw] certificate - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::Certificate] - # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::Certificate Certificate} with updated values. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A list of fields to be updated in this request. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#activate_certificate_authority CertificateAuthorityService.ActivateCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @!attribute [rw] pem_ca_certificate - # @return [::String] - # Required. The signed CA certificate issued from - # {::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse#pem_csr FetchCertificateAuthorityCsrResponse.pem_csr}. - # @!attribute [rw] subordinate_config - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig] - # Required. Must include information about the issuer of 'pem_ca_certificate', and any - # further issuers until the self-signed CA. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class ActivateCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate_authority CertificateAuthorityService.CreateCertificateAuthority}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format - # `projects/*/locations/*`. - # @!attribute [rw] certificate_authority_id - # @return [::String] - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]{1,63}` - # @!attribute [rw] certificate_authority - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] - # Required. A {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with initial field values. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#disable_certificate_authority CertificateAuthorityService.DisableCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DisableCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#enable_certificate_authority CertificateAuthorityService.EnableCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class EnableCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr CertificateAuthorityService.FetchCertificateAuthorityCsr}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - class FetchCertificateAuthorityCsrRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr CertificateAuthorityService.FetchCertificateAuthorityCsr}. - # @!attribute [r] pem_csr - # @return [::String] - # Output only. The PEM-encoded signed certificate signing request (CSR). - class FetchCertificateAuthorityCsrResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_authority CertificateAuthorityService.GetCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority#name name} of the {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} to - # get. - class GetCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_authorities CertificateAuthorityService.ListCertificateAuthorities}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}, in the format - # `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Limit on the number of {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} to - # include in the response. - # Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities} can subsequently be - # obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token} in a subsequent - # request. If unspecified, the server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse#next_page_token ListCertificateAuthoritiesResponse.next_page_token}. - # @!attribute [rw] filter - # @return [::String] - # Optional. Only include resources that match the filter in the response. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specify how the results should be sorted. - class ListCertificateAuthoritiesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_authorities CertificateAuthorityService.ListCertificateAuthorities}. - # @!attribute [rw] certificate_authorities - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority>] - # The list of {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthorities}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. Pass this value in - # [ListCertificateAuthoritiesRequest.next_page_token][] to retrieve the next - # page of results. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations (e.g. "us-west1") that could not be reached. - class ListCertificateAuthoritiesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#restore_certificate_authority CertificateAuthorityService.RestoreCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class RestoreCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#schedule_delete_certificate_authority CertificateAuthorityService.ScheduleDeleteCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name for this {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} in the - # format `projects/*/locations/*/certificateAuthorities/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class ScheduleDeleteCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_authority CertificateAuthorityService.UpdateCertificateAuthority}. - # @!attribute [rw] certificate_authority - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority] - # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority CertificateAuthority} with updated values. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A list of fields to be updated in this request. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_revocation_list CertificateAuthorityService.GetCertificateRevocationList}. - # @!attribute [rw] name - # @return [::String] - # Required. The {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList#name name} of the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} to get. - class GetCertificateRevocationListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_revocation_lists CertificateAuthorityService.ListCertificateRevocationLists}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}, in the format - # `projects/*/locations/*/certificateauthorities/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} to include in the - # response. Further {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists} - # can subsequently be obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token} in a subsequent - # request. If unspecified, the server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse#next_page_token ListCertificateRevocationListsResponse.next_page_token}. - # @!attribute [rw] filter - # @return [::String] - # Optional. Only include resources that match the filter in the response. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specify how the results should be sorted. - class ListCertificateRevocationListsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_revocation_lists CertificateAuthorityService.ListCertificateRevocationLists}. - # @!attribute [rw] certificate_revocation_lists - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList>] - # The list of {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationLists}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. Pass this value in - # [ListCertificateRevocationListsRequest.next_page_token][] to retrieve the - # next page of results. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations (e.g. "us-west1") that could not be reached. - class ListCertificateRevocationListsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_revocation_list CertificateAuthorityService.UpdateCertificateRevocationList}. - # @!attribute [rw] certificate_revocation_list - # @return [::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList] - # Required. {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList CertificateRevocationList} with updated values. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A list of fields to be updated in this request. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An ID to identify requests. Specify a unique request ID so that if you must - # retry your request, the server will know to ignore the request if it has - # already been completed. The server will guarantee that for at least 60 - # minutes since the first request. - # - # For example, consider a situation where you make an initial request and t - # he request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateCertificateRevocationListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_reusable_config CertificateAuthorityService.GetReusableConfig}. - # @!attribute [rw] name - # @return [::String] - # Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. - class GetReusableConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_reusable_configs CertificateAuthorityService.ListReusableConfigs}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the location associated with the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}, in the format - # `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Limit on the number of - # {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} to include in the response. - # Further {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs} can subsequently be - # obtained by including the - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token} in a subsequent request. If - # unspecified, the server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Pagination token, returned earlier via - # {::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse#next_page_token ListReusableConfigsResponse.next_page_token}. - # @!attribute [rw] filter - # @return [::String] - # Optional. Only include resources that match the filter in the response. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specify how the results should be sorted. - class ListReusableConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_reusable_configs CertificateAuthorityService.ListReusableConfigs}. - # @!attribute [rw] reusable_configs - # @return [::Array<::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig>] - # The list of {::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig ReusableConfigs}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. Pass this value in - # [ListReusableConfigsRequest.next_page_token][] to retrieve - # the next page of results. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations (e.g. "us-west1") that could not be reached. - class ListReusableConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/Gemfile deleted file mode 100644 index adf37d01f04f..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-security-private_ca-v1beta1", path: "../" -else - gem "google-cloud-security-private_ca-v1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.rb deleted file mode 100644 index ab8a12841445..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/activate_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the activate_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#activate_certificate_authority. -# -def activate_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new - - # Call the activate_certificate_authority method. - result = client.activate_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.rb deleted file mode 100644 index f6c5d439434c..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the create_certificate call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate. -# -def create_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new - - # Call the create_certificate method. - result = client.create_certificate request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - p result -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.rb deleted file mode 100644 index b2fe7f84db0b..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/create_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the create_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate_authority. -# -def create_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new - - # Call the create_certificate_authority method. - result = client.create_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.rb deleted file mode 100644 index 6613651f079c..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/disable_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the disable_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#disable_certificate_authority. -# -def disable_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new - - # Call the disable_certificate_authority method. - result = client.disable_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.rb deleted file mode 100644 index 156ab4130e0f..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/enable_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the enable_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#enable_certificate_authority. -# -def enable_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new - - # Call the enable_certificate_authority method. - result = client.enable_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb deleted file mode 100644 index bce7583a24ab..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/fetch_certificate_authority_csr.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the fetch_certificate_authority_csr call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr. -# -def fetch_certificate_authority_csr - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new - - # Call the fetch_certificate_authority_csr method. - result = client.fetch_certificate_authority_csr request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse. - p result -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.rb deleted file mode 100644 index 962f824a4495..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the get_certificate call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate. -# -def get_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new - - # Call the get_certificate method. - result = client.get_certificate request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - p result -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.rb deleted file mode 100644 index b9a58c2a9ff6..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_authority.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the get_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_authority. -# -def get_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new - - # Call the get_certificate_authority method. - result = client.get_certificate_authority request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. - p result -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.rb deleted file mode 100644 index a380979a1c64..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_certificate_revocation_list.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the get_certificate_revocation_list call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_revocation_list. -# -def get_certificate_revocation_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new - - # Call the get_certificate_revocation_list method. - result = client.get_certificate_revocation_list request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. - p result -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.rb deleted file mode 100644 index 6a7a96769e22..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/get_reusable_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the get_reusable_config call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_reusable_config. -# -def get_reusable_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new - - # Call the get_reusable_config method. - result = client.get_reusable_config request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. - p result -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.rb deleted file mode 100644 index fdb7607043c0..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_authorities.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the list_certificate_authorities call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_authorities. -# -def list_certificate_authorities - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new - - # Call the list_certificate_authorities method. - result = client.list_certificate_authorities request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority. - p item - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb deleted file mode 100644 index 158024198454..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificate_revocation_lists.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the list_certificate_revocation_lists call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_revocation_lists. -# -def list_certificate_revocation_lists - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new - - # Call the list_certificate_revocation_lists method. - result = client.list_certificate_revocation_lists request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList. - p item - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.rb deleted file mode 100644 index 2b396f505408..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_certificates.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the list_certificates call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificates. -# -def list_certificates - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new - - # Call the list_certificates method. - result = client.list_certificates request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - p item - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.rb deleted file mode 100644 index d437b3c44dc1..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/list_reusable_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the list_reusable_configs call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_reusable_configs. -# -def list_reusable_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new - - # Call the list_reusable_configs method. - result = client.list_reusable_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig. - p item - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.rb deleted file mode 100644 index e19de799588b..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/restore_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the restore_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#restore_certificate_authority. -# -def restore_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new - - # Call the restore_certificate_authority method. - result = client.restore_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.rb deleted file mode 100644 index 08d0bd7161b6..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/revoke_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the revoke_certificate call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#revoke_certificate. -# -def revoke_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new - - # Call the revoke_certificate method. - result = client.revoke_certificate request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - p result -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.rb deleted file mode 100644 index 2b22da6654c9..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/schedule_delete_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the schedule_delete_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#schedule_delete_certificate_authority. -# -def schedule_delete_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new - - # Call the schedule_delete_certificate_authority method. - result = client.schedule_delete_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.rb deleted file mode 100644 index eb82a46e2dc6..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the update_certificate call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate. -# -def update_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new - - # Call the update_certificate method. - result = client.update_certificate request - - # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate. - p result -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.rb deleted file mode 100644 index 62a552d0ae19..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_authority.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the update_certificate_authority call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_authority. -# -def update_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new - - # Call the update_certificate_authority method. - result = client.update_certificate_authority request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.rb deleted file mode 100644 index 2755200a457d..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/certificate_authority_service/update_certificate_revocation_list.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] -require "google/cloud/security/private_ca/v1beta1" - -## -# Snippet for the update_certificate_revocation_list call in the CertificateAuthorityService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_revocation_list. -# -def update_certificate_revocation_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new - - # Call the update_certificate_revocation_list method. - result = client.update_certificate_revocation_list request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/snippet_metadata_google.cloud.security.privateca.v1beta1.json b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/snippet_metadata_google.cloud.security.privateca.v1beta1.json deleted file mode 100644 index 78cd94bd4302..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/snippets/snippet_metadata_google.cloud.security.privateca.v1beta1.json +++ /dev/null @@ -1,815 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-security-private_ca-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.security.privateca.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_sync", - "title": "Snippet for the create_certificate call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate.", - "file": "certificate_authority_service/create_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_certificate", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::Certificate", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "CreateCertificate", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_sync", - "title": "Snippet for the get_certificate call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate.", - "file": "certificate_authority_service/get_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::Certificate", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "GetCertificate", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_sync", - "title": "Snippet for the list_certificates call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificates.", - "file": "certificate_authority_service/list_certificates.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_certificates", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificates", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ListCertificates", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_sync", - "title": "Snippet for the revoke_certificate call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#revoke_certificate.", - "file": "certificate_authority_service/revoke_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "revoke_certificate", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#revoke_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::Certificate", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "RevokeCertificate", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_sync", - "title": "Snippet for the update_certificate call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate.", - "file": "certificate_authority_service/update_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_certificate", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::Certificate", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "UpdateCertificate", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync", - "title": "Snippet for the activate_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#activate_certificate_authority.", - "file": "certificate_authority_service/activate_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "activate_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#activate_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ActivateCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync", - "title": "Snippet for the create_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate_authority.", - "file": "certificate_authority_service/create_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#create_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "CreateCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync", - "title": "Snippet for the disable_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#disable_certificate_authority.", - "file": "certificate_authority_service/disable_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#disable_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "DisableCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync", - "title": "Snippet for the enable_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#enable_certificate_authority.", - "file": "certificate_authority_service/enable_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#enable_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "EnableCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync", - "title": "Snippet for the fetch_certificate_authority_csr call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr.", - "file": "certificate_authority_service/fetch_certificate_authority_csr.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_certificate_authority_csr", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#fetch_certificate_authority_csr", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "FetchCertificateAuthorityCsr", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_sync", - "title": "Snippet for the get_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_authority.", - "file": "certificate_authority_service/get_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "GetCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync", - "title": "Snippet for the list_certificate_authorities call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_authorities.", - "file": "certificate_authority_service/list_certificate_authorities.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_certificate_authorities", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_authorities", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ListCertificateAuthorities", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_sync", - "title": "Snippet for the restore_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#restore_certificate_authority.", - "file": "certificate_authority_service/restore_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "restore_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#restore_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "RestoreCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_sync", - "title": "Snippet for the schedule_delete_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#schedule_delete_certificate_authority.", - "file": "certificate_authority_service/schedule_delete_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "schedule_delete_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#schedule_delete_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ScheduleDeleteCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync", - "title": "Snippet for the update_certificate_authority call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_authority.", - "file": "certificate_authority_service/update_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_certificate_authority", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "UpdateCertificateAuthority", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync", - "title": "Snippet for the get_certificate_revocation_list call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_revocation_list.", - "file": "certificate_authority_service/get_certificate_revocation_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate_revocation_list", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_certificate_revocation_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "GetCertificateRevocationList", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync", - "title": "Snippet for the list_certificate_revocation_lists call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_revocation_lists.", - "file": "certificate_authority_service/list_certificate_revocation_lists.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_certificate_revocation_lists", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_certificate_revocation_lists", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ListCertificateRevocationLists", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync", - "title": "Snippet for the update_certificate_revocation_list call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_revocation_list.", - "file": "certificate_authority_service/update_certificate_revocation_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_certificate_revocation_list", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#update_certificate_revocation_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "UpdateCertificateRevocationList", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_sync", - "title": "Snippet for the get_reusable_config call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_reusable_config.", - "file": "certificate_authority_service/get_reusable_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_reusable_config", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#get_reusable_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "GetReusableConfig", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_sync", - "title": "Snippet for the list_reusable_configs call in the CertificateAuthorityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_reusable_configs.", - "file": "certificate_authority_service/list_reusable_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_reusable_configs", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client#list_reusable_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse", - "client": { - "short_name": "CertificateAuthorityService::Client", - "full_name": "::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client" - }, - "method": { - "short_name": "ListReusableConfigs", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs", - "service": { - "short_name": "CertificateAuthorityService", - "full_name": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_test.rb deleted file mode 100644 index 6654ab235241..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/security/privateca/v1beta1/service_pb" -require "google/cloud/security/privateca/v1beta1/service_services_pb" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service" - -class ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_test.rb deleted file mode 100644 index 7c0d1c542ef3..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_paths_test.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service" - -class ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_certificate_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_path project: "value0", location: "value1", certificate_authority: "value2", certificate: "value3" - assert_equal "projects/value0/locations/value1/certificateAuthorities/value2/certificates/value3", path - end - end - - def test_certificate_authority_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_authority_path project: "value0", location: "value1", certificate_authority: "value2" - assert_equal "projects/value0/locations/value1/certificateAuthorities/value2", path - end - end - - def test_certificate_revocation_list_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_revocation_list_path project: "value0", location: "value1", certificate_authority: "value2", certificate_revocation_list: "value3" - assert_equal "projects/value0/locations/value1/certificateAuthorities/value2/certificateRevocationLists/value3", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_reusable_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reusable_config_path project: "value0", location: "value1", reusable_config: "value2" - assert_equal "projects/value0/locations/value1/reusableConfigs/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_test.rb deleted file mode 100644 index b0a4a632973e..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_rest_test.rb +++ /dev/null @@ -1,1216 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/security/privateca/v1beta1/service_pb" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service/rest" - - -class ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_certificate - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate_id = "hello world" - certificate = {} - request_id = "hello world" - - create_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_certificate parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_certificate_client_stub.call_count - end - end - end - - def test_get_certificate - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_certificate({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_certificate name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_certificate({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_client_stub.call_count - end - end - end - - def test_list_certificates - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificates_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificates_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_certificates_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_certificates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_certificates ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_certificates(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_certificates_client_stub.call_count - end - end - end - - def test_revoke_certificate - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - reason = :REVOCATION_REASON_UNSPECIFIED - request_id = "hello world" - - revoke_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_revoke_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, revoke_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.revoke_certificate({ name: name, reason: reason, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.revoke_certificate name: name, reason: reason, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.revoke_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.revoke_certificate({ name: name, reason: reason, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.revoke_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, revoke_certificate_client_stub.call_count - end - end - end - - def test_update_certificate - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - certificate = {} - update_mask = {} - request_id = "hello world" - - update_certificate_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_certificate certificate: certificate, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_certificate_client_stub.call_count - end - end - end - - def test_activate_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - pem_ca_certificate = "hello world" - subordinate_config = {} - request_id = "hello world" - - activate_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_activate_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, activate_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.activate_certificate_authority name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.activate_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.activate_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, activate_certificate_authority_client_stub.call_count - end - end - end - - def test_create_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate_authority_id = "hello world" - certificate_authority = {} - request_id = "hello world" - - create_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_create_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_certificate_authority parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_certificate_authority_client_stub.call_count - end - end - end - - def test_disable_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - disable_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_disable_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.disable_certificate_authority({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.disable_certificate_authority name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.disable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.disable_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.disable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_certificate_authority_client_stub.call_count - end - end - end - - def test_enable_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - enable_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_enable_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.enable_certificate_authority({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.enable_certificate_authority name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.enable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.enable_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.enable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_certificate_authority_client_stub.call_count - end - end - end - - def test_fetch_certificate_authority_csr - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - fetch_certificate_authority_csr_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_fetch_certificate_authority_csr_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_certificate_authority_csr_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.fetch_certificate_authority_csr({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.fetch_certificate_authority_csr name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.fetch_certificate_authority_csr ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.fetch_certificate_authority_csr({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.fetch_certificate_authority_csr(::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_certificate_authority_csr_client_stub.call_count - end - end - end - - def test_get_certificate_authority - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_certificate_authority({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_certificate_authority name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_certificate_authority({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_authority_client_stub.call_count - end - end - end - - def test_list_certificate_authorities - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificate_authorities_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificate_authorities_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_certificate_authorities_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_certificate_authorities parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_certificate_authorities ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_certificate_authorities(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_certificate_authorities_client_stub.call_count - end - end - end - - def test_restore_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - restore_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_restore_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restore_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.restore_certificate_authority({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.restore_certificate_authority name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.restore_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.restore_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.restore_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restore_certificate_authority_client_stub.call_count - end - end - end - - def test_schedule_delete_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - schedule_delete_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_schedule_delete_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, schedule_delete_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.schedule_delete_certificate_authority({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.schedule_delete_certificate_authority name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.schedule_delete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.schedule_delete_certificate_authority({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.schedule_delete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, schedule_delete_certificate_authority_client_stub.call_count - end - end - end - - def test_update_certificate_authority - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - certificate_authority = {} - update_mask = {} - request_id = "hello world" - - update_certificate_authority_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_certificate_authority certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_certificate_authority_client_stub.call_count - end - end - end - - def test_get_certificate_revocation_list - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_revocation_list_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_certificate_revocation_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_revocation_list_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_certificate_revocation_list({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_certificate_revocation_list name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_certificate_revocation_list({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_revocation_list_client_stub.call_count - end - end - end - - def test_list_certificate_revocation_lists - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificate_revocation_lists_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_certificate_revocation_lists_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_certificate_revocation_lists_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_certificate_revocation_lists parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_certificate_revocation_lists ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_certificate_revocation_lists(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_certificate_revocation_lists_client_stub.call_count - end - end - end - - def test_update_certificate_revocation_list - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - certificate_revocation_list = {} - update_mask = {} - request_id = "hello world" - - update_certificate_revocation_list_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_update_certificate_revocation_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_certificate_revocation_list_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_certificate_revocation_list certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_certificate_revocation_list_client_stub.call_count - end - end - end - - def test_get_reusable_config - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_reusable_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_get_reusable_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_reusable_config_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_reusable_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_reusable_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_reusable_config ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_reusable_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_reusable_config(::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_reusable_config_client_stub.call_count - end - end - end - - def test_list_reusable_configs - # Create test objects. - client_result = ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_reusable_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::ServiceStub.stub :transcode_list_reusable_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_reusable_configs_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_reusable_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_reusable_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_reusable_configs ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_reusable_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_reusable_configs(::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_reusable_configs_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_test.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_test.rb deleted file mode 100644 index e36ce9642f13..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/google/cloud/security/private_ca/v1beta1/certificate_authority_service_test.rb +++ /dev/null @@ -1,1412 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/security/privateca/v1beta1/service_pb" -require "google/cloud/security/private_ca/v1beta1/certificate_authority_service" - -class ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate_id = "hello world" - certificate = {} - request_id = "hello world" - - create_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_certificate, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["certificate_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate), request["certificate"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_certificate parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate, request_id: request_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_certificate_client_stub.call_rpc_count - end - end - - def test_get_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_certificate, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_certificate({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_certificate name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_certificate({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_certificate_client_stub.call_rpc_count - end - end - - def test_list_certificates - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_certificates, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_certificates_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_certificates parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_certificates ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_certificates({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_certificates(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_certificates_client_stub.call_rpc_count - end - end - - def test_revoke_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - reason = :REVOCATION_REASON_UNSPECIFIED - request_id = "hello world" - - revoke_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :revoke_certificate, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest, request - assert_equal "hello world", request["name"] - assert_equal :REVOCATION_REASON_UNSPECIFIED, request["reason"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, revoke_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.revoke_certificate({ name: name, reason: reason, request_id: request_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.revoke_certificate name: name, reason: reason, request_id: request_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.revoke_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.revoke_certificate({ name: name, reason: reason, request_id: request_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.revoke_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new(name: name, reason: reason, request_id: request_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, revoke_certificate_client_stub.call_rpc_count - end - end - - def test_update_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - certificate = {} - update_mask = {} - request_id = "hello world" - - update_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_certificate, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate), request["certificate"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_certificate_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_certificate certificate: certificate, update_mask: update_mask, request_id: request_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_certificate ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_certificate({ certificate: certificate, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_certificate(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_certificate_client_stub.call_rpc_count - end - end - - def test_activate_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - pem_ca_certificate = "hello world" - subordinate_config = {} - request_id = "hello world" - - activate_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :activate_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["pem_ca_certificate"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::SubordinateConfig), request["subordinate_config"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, activate_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.activate_certificate_authority name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.activate_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.activate_certificate_authority({ name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.activate_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new(name: name, pem_ca_certificate: pem_ca_certificate, subordinate_config: subordinate_config, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, activate_certificate_authority_client_stub.call_rpc_count - end - end - - def test_create_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - certificate_authority_id = "hello world" - certificate_authority = {} - request_id = "hello world" - - create_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["certificate_authority_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority), request["certificate_authority"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_certificate_authority parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_certificate_authority({ parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new(parent: parent, certificate_authority_id: certificate_authority_id, certificate_authority: certificate_authority, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_certificate_authority_client_stub.call_rpc_count - end - end - - def test_disable_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - disable_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.disable_certificate_authority({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.disable_certificate_authority name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.disable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.disable_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.disable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, disable_certificate_authority_client_stub.call_rpc_count - end - end - - def test_enable_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - enable_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.enable_certificate_authority({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.enable_certificate_authority name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.enable_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.enable_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.enable_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enable_certificate_authority_client_stub.call_rpc_count - end - end - - def test_fetch_certificate_authority_csr - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - fetch_certificate_authority_csr_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_certificate_authority_csr, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_certificate_authority_csr_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_certificate_authority_csr({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.fetch_certificate_authority_csr name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.fetch_certificate_authority_csr ::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.fetch_certificate_authority_csr({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.fetch_certificate_authority_csr(::Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_certificate_authority_csr_client_stub.call_rpc_count - end - end - - def test_get_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_certificate_authority({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_certificate_authority name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_certificate_authority({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_certificate_authority_client_stub.call_rpc_count - end - end - - def test_list_certificate_authorities - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificate_authorities_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_certificate_authorities, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_certificate_authorities_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_certificate_authorities parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_certificate_authorities ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_certificate_authorities({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_certificate_authorities(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_certificate_authorities_client_stub.call_rpc_count - end - end - - def test_restore_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - restore_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restore_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, restore_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.restore_certificate_authority({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.restore_certificate_authority name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.restore_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.restore_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.restore_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, restore_certificate_authority_client_stub.call_rpc_count - end - end - - def test_schedule_delete_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - schedule_delete_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :schedule_delete_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, schedule_delete_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.schedule_delete_certificate_authority({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.schedule_delete_certificate_authority name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.schedule_delete_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.schedule_delete_certificate_authority({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.schedule_delete_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, schedule_delete_certificate_authority_client_stub.call_rpc_count - end - end - - def test_update_certificate_authority - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - certificate_authority = {} - update_mask = {} - request_id = "hello world" - - update_certificate_authority_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_certificate_authority, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority), request["certificate_authority"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_certificate_authority_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_certificate_authority certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_certificate_authority ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_certificate_authority({ certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_certificate_authority(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new(certificate_authority: certificate_authority, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_certificate_authority_client_stub.call_rpc_count - end - end - - def test_get_certificate_revocation_list - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_revocation_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_certificate_revocation_list, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_certificate_revocation_list_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_certificate_revocation_list({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_certificate_revocation_list name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_certificate_revocation_list({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_certificate_revocation_list_client_stub.call_rpc_count - end - end - - def test_list_certificate_revocation_lists - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_certificate_revocation_lists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_certificate_revocation_lists, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_certificate_revocation_lists_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_certificate_revocation_lists parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_certificate_revocation_lists ::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_certificate_revocation_lists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_certificate_revocation_lists(::Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_certificate_revocation_lists_client_stub.call_rpc_count - end - end - - def test_update_certificate_revocation_list - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - certificate_revocation_list = {} - update_mask = {} - request_id = "hello world" - - update_certificate_revocation_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_certificate_revocation_list, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList), request["certificate_revocation_list"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_certificate_revocation_list_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_certificate_revocation_list certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_certificate_revocation_list ::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_certificate_revocation_list({ certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_certificate_revocation_list(::Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new(certificate_revocation_list: certificate_revocation_list, update_mask: update_mask, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_certificate_revocation_list_client_stub.call_rpc_count - end - end - - def test_get_reusable_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_reusable_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_reusable_config, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_reusable_config_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_reusable_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_reusable_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_reusable_config ::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_reusable_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_reusable_config(::Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_reusable_config_client_stub.call_rpc_count - end - end - - def test_list_reusable_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_reusable_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_reusable_configs, name - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_reusable_configs_client_stub do - # Create client - c = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_reusable_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_reusable_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_reusable_configs ::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_reusable_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_reusable_configs(::Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_reusable_configs_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-security-private_ca-v1beta1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-security-private_ca-v1beta1/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-v1/.gitignore b/owl-bot-staging/google-cloud-security_center-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/.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-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center-v1/.repo-metadata.json deleted file mode 100644 index 1db7926905f8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/.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-v1/latest", - "distribution_name": "google-cloud-security_center-v1", - "is_cloud": true, - "language": "ruby", - "name": "securitycenter", - "name_pretty": "Cloud Security Command Center V1 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. Note that google-cloud-security_center-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details.", - "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-v1/.rubocop.yml b/owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml deleted file mode 100644 index cd91eea56b45..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security_center-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-security_center-v1.rb" diff --git a/owl-bot-staging/google-cloud-security_center-v1/.toys.rb b/owl-bot-staging/google-cloud-security_center-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/.yardopts b/owl-bot-staging/google-cloud-security_center-v1/.yardopts deleted file mode 100644 index 1a401945abab..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Security Command Center V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md deleted file mode 100644 index ba9af184f351..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security_center-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-security_center-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/security_center/v1" - -client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/security_center/v1" - -::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-security_center-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/security_center/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security_center-v1/Gemfile b/owl-bot-staging/google-cloud-security_center-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-v1/LICENSE.md b/owl-bot-staging/google-cloud-security_center-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-security_center-v1/README.md b/owl-bot-staging/google-cloud-security_center-v1/README.md deleted file mode 100644 index cfc90100104f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Security Command Center V1 API - -Security Command Center API provides access to temporal views of assets and findings within an organization. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Security Command Center V1 API. Most users should consider using -the main client gem, -[google-cloud-security_center](https://rubygems.org/gems/google-cloud-security_center). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-security_center-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/securitycenter.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/security_center/v1" - -client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new -request = ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new # (request fields as keyword arguments...) -response = client.bulk_mute_findings request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/security-command-center) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/security_center/v1" -require "logger" - -client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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-v1/Rakefile b/owl-bot-staging/google-cloud-security_center-v1/Rakefile deleted file mode 100644 index 11860dec5013..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-security_center-v1 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/v1/security_center/credentials" - ::Google::Cloud::SecurityCenter::V1::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-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security_center-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security_center-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-security_center-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security_center-v1" - header "google-cloud-security_center-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security_center-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security_center-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-security_center-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-security_center-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json deleted file mode 100644 index 2a9d62ebb4ad..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/gapic_metadata.json +++ /dev/null @@ -1,333 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.securitycenter.v1", - "libraryPackage": "::Google::Cloud::SecurityCenter::V1", - "services": { - "SecurityCenter": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client", - "rpcs": { - "BulkMuteFindings": { - "methods": [ - "bulk_mute_findings" - ] - }, - "CreateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "create_security_health_analytics_custom_module" - ] - }, - "CreateSource": { - "methods": [ - "create_source" - ] - }, - "CreateFinding": { - "methods": [ - "create_finding" - ] - }, - "CreateMuteConfig": { - "methods": [ - "create_mute_config" - ] - }, - "CreateNotificationConfig": { - "methods": [ - "create_notification_config" - ] - }, - "DeleteMuteConfig": { - "methods": [ - "delete_mute_config" - ] - }, - "DeleteNotificationConfig": { - "methods": [ - "delete_notification_config" - ] - }, - "DeleteSecurityHealthAnalyticsCustomModule": { - "methods": [ - "delete_security_health_analytics_custom_module" - ] - }, - "GetSimulation": { - "methods": [ - "get_simulation" - ] - }, - "GetValuedResource": { - "methods": [ - "get_valued_resource" - ] - }, - "GetBigQueryExport": { - "methods": [ - "get_big_query_export" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "GetMuteConfig": { - "methods": [ - "get_mute_config" - ] - }, - "GetNotificationConfig": { - "methods": [ - "get_notification_config" - ] - }, - "GetOrganizationSettings": { - "methods": [ - "get_organization_settings" - ] - }, - "GetEffectiveSecurityHealthAnalyticsCustomModule": { - "methods": [ - "get_effective_security_health_analytics_custom_module" - ] - }, - "GetSecurityHealthAnalyticsCustomModule": { - "methods": [ - "get_security_health_analytics_custom_module" - ] - }, - "GetSource": { - "methods": [ - "get_source" - ] - }, - "GroupAssets": { - "methods": [ - "group_assets" - ] - }, - "GroupFindings": { - "methods": [ - "group_findings" - ] - }, - "ListAssets": { - "methods": [ - "list_assets" - ] - }, - "ListDescendantSecurityHealthAnalyticsCustomModules": { - "methods": [ - "list_descendant_security_health_analytics_custom_modules" - ] - }, - "ListFindings": { - "methods": [ - "list_findings" - ] - }, - "ListMuteConfigs": { - "methods": [ - "list_mute_configs" - ] - }, - "ListNotificationConfigs": { - "methods": [ - "list_notification_configs" - ] - }, - "ListEffectiveSecurityHealthAnalyticsCustomModules": { - "methods": [ - "list_effective_security_health_analytics_custom_modules" - ] - }, - "ListSecurityHealthAnalyticsCustomModules": { - "methods": [ - "list_security_health_analytics_custom_modules" - ] - }, - "ListSources": { - "methods": [ - "list_sources" - ] - }, - "RunAssetDiscovery": { - "methods": [ - "run_asset_discovery" - ] - }, - "SetFindingState": { - "methods": [ - "set_finding_state" - ] - }, - "SetMute": { - "methods": [ - "set_mute" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "SimulateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "simulate_security_health_analytics_custom_module" - ] - }, - "UpdateExternalSystem": { - "methods": [ - "update_external_system" - ] - }, - "UpdateFinding": { - "methods": [ - "update_finding" - ] - }, - "UpdateMuteConfig": { - "methods": [ - "update_mute_config" - ] - }, - "UpdateNotificationConfig": { - "methods": [ - "update_notification_config" - ] - }, - "UpdateOrganizationSettings": { - "methods": [ - "update_organization_settings" - ] - }, - "UpdateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "update_security_health_analytics_custom_module" - ] - }, - "UpdateSource": { - "methods": [ - "update_source" - ] - }, - "UpdateSecurityMarks": { - "methods": [ - "update_security_marks" - ] - }, - "CreateBigQueryExport": { - "methods": [ - "create_big_query_export" - ] - }, - "DeleteBigQueryExport": { - "methods": [ - "delete_big_query_export" - ] - }, - "UpdateBigQueryExport": { - "methods": [ - "update_big_query_export" - ] - }, - "ListBigQueryExports": { - "methods": [ - "list_big_query_exports" - ] - }, - "CreateEventThreatDetectionCustomModule": { - "methods": [ - "create_event_threat_detection_custom_module" - ] - }, - "DeleteEventThreatDetectionCustomModule": { - "methods": [ - "delete_event_threat_detection_custom_module" - ] - }, - "GetEventThreatDetectionCustomModule": { - "methods": [ - "get_event_threat_detection_custom_module" - ] - }, - "ListDescendantEventThreatDetectionCustomModules": { - "methods": [ - "list_descendant_event_threat_detection_custom_modules" - ] - }, - "ListEventThreatDetectionCustomModules": { - "methods": [ - "list_event_threat_detection_custom_modules" - ] - }, - "UpdateEventThreatDetectionCustomModule": { - "methods": [ - "update_event_threat_detection_custom_module" - ] - }, - "ValidateEventThreatDetectionCustomModule": { - "methods": [ - "validate_event_threat_detection_custom_module" - ] - }, - "GetEffectiveEventThreatDetectionCustomModule": { - "methods": [ - "get_effective_event_threat_detection_custom_module" - ] - }, - "ListEffectiveEventThreatDetectionCustomModules": { - "methods": [ - "list_effective_event_threat_detection_custom_modules" - ] - }, - "BatchCreateResourceValueConfigs": { - "methods": [ - "batch_create_resource_value_configs" - ] - }, - "DeleteResourceValueConfig": { - "methods": [ - "delete_resource_value_config" - ] - }, - "GetResourceValueConfig": { - "methods": [ - "get_resource_value_config" - ] - }, - "ListResourceValueConfigs": { - "methods": [ - "list_resource_value_configs" - ] - }, - "UpdateResourceValueConfig": { - "methods": [ - "update_resource_value_config" - ] - }, - "ListValuedResources": { - "methods": [ - "list_valued_resources" - ] - }, - "ListAttackPaths": { - "methods": [ - "list_attack_paths" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec b/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec deleted file mode 100644 index 2ea96cde071b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/google-cloud-security_center-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security_center/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security_center-v1" - gem.version = Google::Cloud::SecurityCenter::V1::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. Note that google-cloud-security_center-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details." - gem.summary = "Security Command Center API provides access to temporal views of assets and findings within an organization." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb deleted file mode 100644 index b1f8c90a70d9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google-cloud-security_center-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/security_center/v1" diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb deleted file mode 100644 index 64e25fbd3ded..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center/v1/security_center" -require "google/cloud/security_center/v1/version" - -module Google - module Cloud - module SecurityCenter - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/security_center/v1" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/security_center/v1" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/security_center/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb deleted file mode 100644 index c11148195761..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center/v1/security_center/rest" -require "google/cloud/security_center/v1/version" - -module Google - module Cloud - module SecurityCenter - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/security_center/v1/rest" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb deleted file mode 100644 index 20883d6fbc43..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security_center/v1/version" - -require "google/cloud/security_center/v1/security_center/credentials" -require "google/cloud/security_center/v1/security_center/paths" -require "google/cloud/security_center/v1/security_center/operations" -require "google/cloud/security_center/v1/security_center/client" -require "google/cloud/security_center/v1/security_center/rest" - -module Google - module Cloud - module SecurityCenter - module V1 - ## - # V1 APIs for Security Center service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/security_center/v1/security_center" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/security_center/v1/security_center/rest" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - module SecurityCenter - end - end - end - end -end - -helper_path = ::File.join __dir__, "security_center", "helpers.rb" -require "google/cloud/security_center/v1/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb deleted file mode 100644 index 23fb68a1046e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/client.rb +++ /dev/null @@ -1,7460 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securitycenter/v1/securitycenter_service_pb" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - ## - # Client for the SecurityCenter service. - # - # V1 APIs for Security Center service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :security_center_stub - - ## - # Configure the SecurityCenter Client class. - # - # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenter clients - # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecurityCenter", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.create_source.timeout = 60.0 - - default_config.rpcs.create_finding.timeout = 60.0 - - default_config.rpcs.create_notification_config.timeout = 60.0 - - default_config.rpcs.delete_notification_config.timeout = 60.0 - - default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_notification_config.timeout = 60.0 - default_config.rpcs.get_notification_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_organization_settings.timeout = 60.0 - default_config.rpcs.get_organization_settings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_source.timeout = 60.0 - default_config.rpcs.get_source.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_assets.timeout = 480.0 - default_config.rpcs.group_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_findings.timeout = 480.0 - default_config.rpcs.group_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_assets.timeout = 480.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_findings.timeout = 480.0 - default_config.rpcs.list_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_notification_configs.timeout = 60.0 - default_config.rpcs.list_notification_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_sources.timeout = 60.0 - default_config.rpcs.list_sources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.run_asset_discovery.timeout = 60.0 - - default_config.rpcs.set_finding_state.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_finding.timeout = 60.0 - - default_config.rpcs.update_notification_config.timeout = 60.0 - - default_config.rpcs.update_organization_settings.timeout = 60.0 - - default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.update_source.timeout = 60.0 - - default_config.rpcs.update_security_marks.timeout = 480.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @security_center_stub.universe_domain - end - - ## - # Create a new SecurityCenter client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecurityCenter client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/securitycenter/v1/securitycenter_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @security_center_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @security_center_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @security_center_stub.logger - end - - # Service calls - - ## - # Kicks off an LRO to bulk mute findings for a parent based on a filter. The - # parent can be either an organization, folder or project. The findings - # matched by the filter will be muted after the LRO is done. - # - # @overload bulk_mute_findings(request, options = nil) - # Pass arguments to `bulk_mute_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil, mute_state: nil) - # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, at which bulk action needs to be applied. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param filter [::String] - # Expression that identifies findings that should be updated. - # The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @param mute_annotation [::String] - # This can be a mute configuration name or any identifier for mute/unmute - # of findings based on the filter. - # @param mute_state [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] - # Optional. All findings matching the given filter will have their mute state - # set to this value. The default value is `MUTED`. Setting this to - # `UNDEFINED` will clear the mute state on all matching findings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new - # - # # Call the bulk_mute_findings method. - # result = client.bulk_mute_findings request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def bulk_mute_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.bulk_mute_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_mute_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :bulk_mute_findings, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the - # given CRM parent, and also creates inherited - # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given - # parent. These modules are enabled by default. - # - # @overload create_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil) - # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new custom module's parent. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. SecurityHealthAnalytics custom module to create. The provided - # name is ignored and reset with provided parent information and - # server-generated ID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the create_security_health_analytics_custom_module method. - # result = client.create_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def create_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a source. - # - # @overload create_source(request, options = nil) - # Pass arguments to `create_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_source(parent: nil, source: nil) - # Pass arguments to `create_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new source's parent. Its format should be - # `organizations/[organization_id]`. - # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] - # Required. The Source being created, only the display_name and description - # will be used. All other fields will be ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new - # - # # Call the create_source method. - # result = client.create_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def create_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a finding. The corresponding source must exist for finding creation - # to succeed. - # - # @overload create_finding(request, options = nil) - # Pass arguments to `create_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_finding(parent: nil, finding_id: nil, finding: nil) - # Pass arguments to `create_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new finding's parent. Its format should be - # `organizations/[organization_id]/sources/[source_id]`. - # @param finding_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be alphanumeric and less than or equal to 32 characters and - # greater than 0 characters in length. - # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] - # Required. The Finding being created. The name and security_marks will be - # ignored as they are both output only fields on this resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new - # - # # Call the create_finding method. - # result = client.create_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def create_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_finding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_finding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a mute config. - # - # @overload create_mute_config(request, options = nil) - # Pass arguments to `create_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) - # Pass arguments to `create_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new mute configs's parent. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] - # Required. The mute config being created. - # @param mute_config_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new - # - # # Call the create_mute_config method. - # result = client.create_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def create_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a notification config. - # - # @overload create_notification_config(request, options = nil) - # Pass arguments to `create_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) - # Pass arguments to `create_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new notification config's parent. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param config_id [::String] - # Required. - # Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters and contain alphanumeric - # characters, underscores, or hyphens only. - # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] - # Required. The notification config being created. The name and the service - # account will be ignored as they are both output only fields on this - # resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new - # - # # Call the create_notification_config method. - # result = client.create_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def create_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing mute config. - # - # @overload delete_mute_config(request, options = nil) - # Pass arguments to `delete_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_mute_config(name: nil) - # Pass arguments to `delete_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to delete. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new - # - # # Call the delete_mute_config method. - # result = client.delete_mute_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a notification config. - # - # @overload delete_notification_config(request, options = nil) - # Pass arguments to `delete_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_notification_config(name: nil) - # Pass arguments to `delete_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to delete. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new - # - # # Call the delete_notification_config method. - # result = client.delete_notification_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its - # descendants in the CRM hierarchy. This method is only supported for - # resident custom modules. - # - # @overload delete_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_security_health_analytics_custom_module(name: nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to delete. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the delete_security_health_analytics_custom_module method. - # result = client.delete_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the simulation by name or the latest simulation for the given - # organization. - # - # @overload get_simulation(request, options = nil) - # Pass arguments to `get_simulation` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSimulationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_simulation(name: nil) - # Pass arguments to `get_simulation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The organization name or simulation name of this simulation - # - # Valid format: - # `organizations/{organization}/simulations/latest` - # `organizations/{organization}/simulations/{simulation}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Simulation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Simulation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new - # - # # Call the get_simulation method. - # result = client.get_simulation request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. - # p result - # - def get_simulation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_simulation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_simulation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_simulation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the valued resource by name - # - # @overload get_valued_resource(request, options = nil) - # Pass arguments to `get_valued_resource` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_valued_resource(name: nil) - # Pass arguments to `get_valued_resource` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of this valued resource - # - # Valid format: - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new - # - # # Call the get_valued_resource method. - # result = client.get_valued_resource request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. - # p result - # - def get_valued_resource request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_valued_resource.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_valued_resource.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_valued_resource, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a BigQuery export. - # - # @overload get_big_query_export(request, options = nil) - # Pass arguments to `get_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_big_query_export(name: nil) - # Pass arguments to `get_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the BigQuery export to retrieve. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new - # - # # Call the get_big_query_export method. - # result = client.get_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def get_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy on the specified Source. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a mute config. - # - # @overload get_mute_config(request, options = nil) - # Pass arguments to `get_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_mute_config(name: nil) - # Pass arguments to `get_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to retrieve. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new - # - # # Call the get_mute_config method. - # result = client.get_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def get_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a notification config. - # - # @overload get_notification_config(request, options = nil) - # Pass arguments to `get_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_notification_config(name: nil) - # Pass arguments to `get_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to get. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new - # - # # Call the get_notification_config method. - # result = client.get_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def get_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the settings for an organization. - # - # @overload get_organization_settings(request, options = nil) - # Pass arguments to `get_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_organization_settings(name: nil) - # Pass arguments to `get_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the organization to get organization settings for. Its - # format is `organizations/[organization_id]/organizationSettings`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new - # - # # Call the get_organization_settings method. - # result = client.get_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - # p result - # - def get_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_organization_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. - # - # @overload get_effective_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_effective_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the effective custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_effective_security_health_analytics_custom_module method. - # result = client.get_effective_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p result - # - def get_effective_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_effective_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a SecurityHealthAnalyticsCustomModule. - # - # @overload get_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_security_health_analytics_custom_module method. - # result = client.get_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def get_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a source. - # - # @overload get_source(request, options = nil) - # Pass arguments to `get_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_source(name: nil) - # Pass arguments to `get_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Relative resource name of the source. Its format is - # `organizations/[organization_id]/source/[source_id]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new - # - # # Call the get_source method. - # result = client.get_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def get_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization's assets and groups them by their specified - # properties. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload group_assets(request, options = nil) - # Pass arguments to `group_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent to group the assets by. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: - # "security_center_properties.resource_project,security_center_properties.project". - # - # The following fields are supported when compare_duration is not set: - # - # * security_center_properties.resource_project - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_type - # * security_center_properties.resource_parent - # * security_center_properties.resource_parent_display_name - # - # The following fields are supported when compare_duration is set: - # - # * security_center_properties.resource_type - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_parent_display_name - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" property is - # updated to indicate whether the asset was added, removed, or remained - # present during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at reference_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at reference_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and reference_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param page_token [::String] - # The value returned by the last `GroupAssetsResponse`; indicates - # that this is a continuation of a prior `GroupAssets` call, and that the - # system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new - # - # # Call the group_assets method. - # result = client.group_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - # p item - # end - # - def group_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.group_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.group_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.group_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :group_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_assets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization or source's findings and groups them by their - # specified properties. - # - # To group across all sources provide a `-` as the source id. - # Example: /v1/organizations/\\{organization_id}/sources/-/findings, - # /v1/folders/\\{folder_id}/sources/-/findings, - # /v1/projects/\\{project_id}/sources/-/findings - # - # @overload group_findings(request, options = nil) - # Pass arguments to `group_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source to groupBy. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, - # or `projects/{project_id}/sources/-` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping - # (including `state_change`). The string value should follow SQL syntax: - # comma separated list of fields. For example: "parent,resource_name". - # - # The following fields are supported when compare_duration is set: - # - # * state_change - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" attribute is - # updated to indicate whether the finding had its state changed, the - # finding's state remained unchanged, or if the finding was added during the - # compare_duration period of time that precedes the read_time. This is the - # time between (read_time - compare_duration) and read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present - # at read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param page_token [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new - # - # # Call the group_findings method. - # result = client.group_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - # p item - # end - # - def group_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.group_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.group_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.group_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :group_findings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_findings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization's assets. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource that contains the assets. The - # value that you can specify on parent depends on the method in which you - # specify parent. You can specify one of the following values: - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following are the allowed field and operator combinations: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,resource_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,resource_properties.a_property" and " - # name desc , resource_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # update_time - # resource_properties - # security_marks.marks - # security_center_properties.resource_name - # security_center_properties.resource_display_name - # security_center_properties.resource_parent - # security_center_properties.resource_parent_display_name - # security_center_properties.resource_project - # security_center_properties.resource_project_display_name - # security_center_properties.resource_type - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListAssetsResult's "state_change" - # attribute is updated to indicate whether the asset was added, removed, or - # remained present during the compare_duration period of time that precedes - # the read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at read_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at read_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the ListAssetsResult fields to be listed in the - # response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListAssetsResponse`; indicates - # that this is a continuation of a prior `ListAssets` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_assets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all resident SecurityHealthAnalyticsCustomModules under - # the given CRM parent and all of the parent’s CRM descendants. - # - # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list descendant custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_descendant_security_health_analytics_custom_modules method. - # result = client.list_descendant_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_descendant_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_descendant_security_health_analytics_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_descendant_security_health_analytics_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization or source's findings. - # - # To list across all sources provide a `-` as the source id. - # Example: /v1/organizations/\\{organization_id}/sources/-/findings - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source the findings belong to. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To list across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-`, - # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.display_name: `=`, `:` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,source_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,source_properties.a_property" and " - # name desc , source_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # source_properties - # security_marks.marks - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListFindingsResult's "state_change" - # attribute is updated to indicate whether the finding had its state changed, - # the finding's state remained unchanged, or if the finding was added in any - # state during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_findings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_findings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists mute configs. - # - # @overload list_mute_configs(request, options = nil) - # Pass arguments to `list_mute_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_mute_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of mute configs. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListMuteConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMuteConfigs` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new - # - # # Call the list_mute_configs method. - # result = client.list_mute_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. - # p item - # end - # - def list_mute_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_mute_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_mute_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_mute_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_mute_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists notification configs. - # - # @overload list_notification_configs(request, options = nil) - # Pass arguments to `list_notification_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_notification_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent in which to list the notification - # configurations. Its format is "organizations/[organization_id]", - # "folders/[folder_id]", or "projects/[project_id]". - # @param page_token [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new - # - # # Call the list_notification_configs method. - # result = client.list_notification_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p item - # end - # - def list_notification_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_notification_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_notification_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_notification_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_notification_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the - # given parent. This includes resident modules defined at the scope of the - # parent, and inherited modules, inherited from CRM ancestors. - # - # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list effective custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_effective_security_health_analytics_custom_modules method. - # result = client.list_effective_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_effective_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_effective_security_health_analytics_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_effective_security_health_analytics_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all SecurityHealthAnalyticsCustomModules for the given - # parent. This includes resident modules defined at the scope of the parent, - # and inherited modules, inherited from CRM ancestors. - # - # @overload list_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_security_health_analytics_custom_modules method. - # result = client.list_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_security_health_analytics_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_security_health_analytics_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all sources belonging to an organization. - # - # @overload list_sources(request, options = nil) - # Pass arguments to `list_sources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent of sources to list. Its format should - # be `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param page_token [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new - # - # # Call the list_sources method. - # result = client.list_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. - # p item - # end - # - def list_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs asset discovery. The discovery is tracked with a long-running - # operation. - # - # This API can only be called with limited frequency for an organization. If - # it is called too frequently the caller will receive a TOO_MANY_REQUESTS - # error. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload run_asset_discovery(request, options = nil) - # Pass arguments to `run_asset_discovery` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_asset_discovery(parent: nil) - # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization to run asset discovery for. Its format - # is `organizations/[organization_id]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new - # - # # Call the run_asset_discovery method. - # result = client.run_asset_discovery request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_asset_discovery request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_asset_discovery.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_asset_discovery.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :run_asset_discovery, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the state of a finding. - # - # @overload set_finding_state(request, options = nil) - # Pass arguments to `set_finding_state` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_finding_state(name: nil, state: nil, start_time: nil) - # Pass arguments to `set_finding_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @param state [::Google::Cloud::SecurityCenter::V1::Finding::State] - # Required. The desired State of the finding. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The time at which the updated state takes effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new - # - # # Call the set_finding_state method. - # result = client.set_finding_state request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def set_finding_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_finding_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_finding_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :set_finding_state, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the mute state of a finding. - # - # @overload set_mute(request, options = nil) - # Pass arguments to `set_mute` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SetMuteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_mute(name: nil, mute: nil) - # Pass arguments to `set_mute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute] - # Required. The desired state of the Mute. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new - # - # # Call the set_mute method. - # result = client.set_mute request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def set_mute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetMuteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_mute.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_mute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_mute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :set_mute, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified Source. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has on the specified source. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. - # - # @overload simulate_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative resource name of the organization, project, or - # folder. For more information about relative resource names, see [Relative - # Resource - # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # Example: `organizations/{organization_id}` - # @param custom_config [::Google::Cloud::SecurityCenter::V1::CustomConfig, ::Hash] - # Required. The custom configuration that you need to test. - # @param resource [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] - # Required. Resource data to simulate custom module against. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the simulate_security_health_analytics_custom_module method. - # result = client.simulate_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. - # p result - # - def simulate_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :simulate_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates external system. This is for a given finding. - # - # @overload update_external_system(request, options = nil) - # Pass arguments to `update_external_system` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_external_system(external_system: nil, update_mask: nil) - # Pass arguments to `update_external_system` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param external_system [::Google::Cloud::SecurityCenter::V1::ExternalSystem, ::Hash] - # Required. The external system resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the external system resource. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new - # - # # Call the update_external_system method. - # result = client.update_external_system request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. - # p result - # - def update_external_system request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_external_system.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.external_system&.name - header_params["external_system.name"] = request.external_system.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_external_system.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_external_system, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a finding. The corresponding source must exist for a - # finding creation to succeed. - # - # @overload update_finding(request, options = nil) - # Pass arguments to `update_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_finding(finding: nil, update_mask: nil) - # Pass arguments to `update_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] - # Required. The finding resource to update or create if it does not already - # exist. parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new - # - # # Call the update_finding method. - # result = client.update_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def update_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.finding&.name - header_params["finding.name"] = request.finding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_finding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_finding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a mute config. - # - # @overload update_mute_config(request, options = nil) - # Pass arguments to `update_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_mute_config(mute_config: nil, update_mask: nil) - # Pass arguments to `update_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] - # Required. The mute config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new - # - # # Call the update_mute_config method. - # result = client.update_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def update_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.mute_config&.name - header_params["mute_config.name"] = request.mute_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - # - # @overload update_notification_config(request, options = nil) - # Pass arguments to `update_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_notification_config(notification_config: nil, update_mask: nil) - # Pass arguments to `update_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] - # Required. The notification config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new - # - # # Call the update_notification_config method. - # result = client.update_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def update_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.notification_config&.name - header_params["notification_config.name"] = request.notification_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an organization's settings. - # - # @overload update_organization_settings(request, options = nil) - # Pass arguments to `update_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_organization_settings(organization_settings: nil, update_mask: nil) - # Pass arguments to `update_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param organization_settings [::Google::Cloud::SecurityCenter::V1::OrganizationSettings, ::Hash] - # Required. The organization settings resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the settings resource. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new - # - # # Call the update_organization_settings method. - # result = client.update_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - # p result - # - def update_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.organization_settings&.name - header_params["organization_settings.name"] = request.organization_settings.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_organization_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the SecurityHealthAnalyticsCustomModule under the given name based - # on the given update mask. Updating the enablement state is supported on - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name and custom - # config of a module is supported on resident modules only. - # - # @overload update_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_security_health_analytics_custom_module(security_health_analytics_custom_module: nil, update_mask: nil) - # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. The SecurityHealthAnalytics custom module to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. The only fields that can be updated are - # `enablement_state` and `custom_config`. If empty or set to the wildcard - # value `*`, both `enablement_state` and `custom_config` are updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the update_security_health_analytics_custom_module method. - # result = client.update_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def update_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.security_health_analytics_custom_module&.name - header_params["security_health_analytics_custom_module.name"] = request.security_health_analytics_custom_module.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a source. - # - # @overload update_source(request, options = nil) - # Pass arguments to `update_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_source(source: nil, update_mask: nil) - # Pass arguments to `update_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] - # Required. The source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new - # - # # Call the update_source method. - # result = client.update_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def update_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.source&.name - header_params["source.name"] = request.source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates security marks. - # - # @overload update_security_marks(request, options = nil) - # Pass arguments to `update_security_marks` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) - # Pass arguments to `update_security_marks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_marks [::Google::Cloud::SecurityCenter::V1::SecurityMarks, ::Hash] - # Required. The security marks resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # The time at which the updated SecurityMarks take effect. - # If not set uses current server time. Updates will be applied to the - # SecurityMarks that are active immediately preceding this time. Must be - # earlier or equal to the server time. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new - # - # # Call the update_security_marks method. - # result = client.update_security_marks request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. - # p result - # - def update_security_marks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_security_marks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.security_marks&.name - header_params["security_marks.name"] = request.security_marks.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_security_marks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_security_marks, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a BigQuery export. - # - # @overload create_big_query_export(request, options = nil) - # Pass arguments to `create_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) - # Pass arguments to `create_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource of the new BigQuery export. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] - # Required. The BigQuery export being created. - # @param big_query_export_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new - # - # # Call the create_big_query_export method. - # result = client.create_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def create_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing BigQuery export. - # - # @overload delete_big_query_export(request, options = nil) - # Pass arguments to `delete_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_big_query_export(name: nil) - # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the BigQuery export to delete. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new - # - # # Call the delete_big_query_export method. - # result = client.delete_big_query_export request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a BigQuery export. - # - # @overload update_big_query_export(request, options = nil) - # Pass arguments to `update_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_big_query_export(big_query_export: nil, update_mask: nil) - # Pass arguments to `update_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] - # Required. The BigQuery export being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new - # - # # Call the update_big_query_export method. - # result = client.update_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def update_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.big_query_export&.name - header_params["big_query_export.name"] = request.big_query_export.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BigQuery exports. Note that when requesting BigQuery exports at a - # given level all exports under that level are also returned e.g. if - # requesting BigQuery exports under a folder, then all BigQuery exports - # immediately under the folder plus the ones created under the projects - # within the folder are returned. - # - # @overload list_big_query_exports(request, options = nil) - # Pass arguments to `list_big_query_exports` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of BigQuery exports. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListBigQueryExports` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListBigQueryExports` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new - # - # # Call the list_big_query_exports method. - # result = client.list_big_query_exports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p item - # end - # - def list_big_query_exports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_big_query_exports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_big_query_exports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_big_query_exports, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_big_query_exports, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident Event Threat Detection custom module at the scope of the - # given Resource Manager parent, and also creates inherited custom modules - # for all descendants of the given parent. These modules are enabled by - # default. - # - # @overload create_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil) - # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The new custom module's parent. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module to create. The - # event_threat_detection_custom_module.name will be ignored and server - # generated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new - # - # # Call the create_event_threat_detection_custom_module method. - # result = client.create_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def create_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified Event Threat Detection custom module and all of its - # descendants in the Resource Manager hierarchy. This method is only - # supported for resident custom modules. - # - # @overload delete_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_event_threat_detection_custom_module(name: nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to delete. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new - # - # # Call the delete_event_threat_detection_custom_module method. - # result = client.delete_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an Event Threat Detection custom module. - # - # @overload get_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to get. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_event_threat_detection_custom_module method. - # result = client.get_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def get_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all resident Event Threat Detection custom modules under the - # given Resource Manager parent and its descendants. - # - # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDescendantEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_descendant_event_threat_detection_custom_modules method. - # result = client.list_descendant_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_descendant_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_descendant_event_threat_detection_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_descendant_event_threat_detection_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all Event Threat Detection custom modules for the given - # Resource Manager parent. This includes resident modules defined at the - # scope of the parent along with modules inherited from ancestors. - # - # @overload list_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListEventThreatDetectionCustomModules` must match the call that provided - # the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_event_threat_detection_custom_modules method. - # result = client.list_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_event_threat_detection_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_event_threat_detection_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Event Threat Detection custom module with the given name based - # on the given update mask. Updating the enablement state is supported for - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name or - # configuration of a module is supported for resident modules only. The type - # of a module cannot be changed. - # - # @overload update_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_event_threat_detection_custom_module(event_threat_detection_custom_module: nil, update_mask: nil) - # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new - # - # # Call the update_event_threat_detection_custom_module method. - # result = client.update_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def update_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.event_threat_detection_custom_module&.name - header_params["event_threat_detection_custom_module.name"] = request.event_threat_detection_custom_module.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Validates the given Event Threat Detection custom module. - # - # @overload validate_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent to validate the Custom Module under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param raw_text [::String] - # Required. The raw text of the module's contents. Used to generate error - # messages. - # @param type [::String] - # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new - # - # # Call the validate_event_threat_detection_custom_module method. - # result = client.validate_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. - # p result - # - def validate_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :validate_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an effective Event Threat Detection custom module at the given level. - # - # @overload get_effective_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_effective_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the effective Event Threat Detection custom - # module. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_effective_event_threat_detection_custom_module method. - # result = client.get_effective_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - # p result - # - def get_effective_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_effective_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all effective Event Threat Detection custom modules for the - # given parent. This includes resident modules defined at the scope of the - # parent along with modules inherited from its ancestors. - # - # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules for. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListEffectiveEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_effective_event_threat_detection_custom_modules method. - # result = client.list_effective_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - # p item - # end - # - def list_effective_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_effective_event_threat_detection_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_effective_event_threat_detection_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a ResourceValueConfig for an organization. Maps user's tags to - # difference resource values for use by the attack path simulation. - # - # @overload batch_create_resource_value_configs(request, options = nil) - # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_create_resource_value_configs(parent: nil, requests: nil) - # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # The parent field in the CreateResourceValueConfigRequest - # messages must either be empty or match this field. - # @param requests [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, ::Hash>] - # Required. The resource value configs to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new - # - # # Call the batch_create_resource_value_configs method. - # result = client.batch_create_resource_value_configs request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. - # p result - # - def batch_create_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :batch_create_resource_value_configs, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a ResourceValueConfig. - # - # @overload delete_resource_value_config(request, options = nil) - # Pass arguments to `delete_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_resource_value_config(name: nil) - # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the ResourceValueConfig to delete - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new - # - # # Call the delete_resource_value_config method. - # result = client.delete_resource_value_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_resource_value_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a ResourceValueConfig. - # - # @overload get_resource_value_config(request, options = nil) - # Pass arguments to `get_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_resource_value_config(name: nil) - # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource value config to retrieve. Its format is - # `organizations/{organization}/resourceValueConfigs/{config_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new - # - # # Call the get_resource_value_config method. - # result = client.get_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p result - # - def get_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_resource_value_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all ResourceValueConfigs. - # - # @overload list_resource_value_configs(request, options = nil) - # Pass arguments to `list_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of resource value configs. - # Its format is - # `organizations/[organization_id]` - # @param page_size [::Integer] - # The number of results to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListResourceValueConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListResourceValueConfigs` must match the call that provided the - # page token. - # - # page_size can be specified, and the new page_size will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new - # - # # Call the list_resource_value_configs method. - # result = client.list_resource_value_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p item - # end - # - def list_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_resource_value_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing ResourceValueConfigs with new rules. - # - # @overload update_resource_value_config(request, options = nil) - # Pass arguments to `update_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) - # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource_value_config [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig, ::Hash] - # Required. The resource value config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new - # - # # Call the update_resource_value_config method. - # result = client.update_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p result - # - def update_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource_value_config&.name - header_params["resource_value_config.name"] = request.resource_value_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_resource_value_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the valued resources for a set of simulation results and filter. - # - # @overload list_valued_resources(request, options = nil) - # Pass arguments to `list_valued_resources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) - # Pass arguments to `list_valued_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list valued resources. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # @param filter [::String] - # The filter expression that filters the valued resources in the response. - # Supported fields: - # - # * `resource_value` supports = - # * `resource_type` supports = - # @param page_token [::String] - # The value returned by the last `ListValuedResourcesResponse`; indicates - # that this is a continuation of a prior `ListValuedResources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param order_by [::String] - # Optional. The fields by which to order the valued resources response. - # - # Supported fields: - # - # * `exposed_score` - # - # * `resource_value` - # - # * `resource_type` - # - # * `resource` - # - # * `display_name` - # - # Values should be a comma separated list of fields. For example: - # `exposed_score,resource_value`. - # - # The default sorting order is descending. To specify ascending or descending - # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for - # example: `exposed_score DESC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new - # - # # Call the list_valued_resources method. - # result = client.list_valued_resources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. - # p item - # end - # - def list_valued_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_valued_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_valued_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_valued_resources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_valued_resources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the attack paths for a set of simulation results or valued resources - # and filter. - # - # @overload list_attack_paths(request, options = nil) - # Pass arguments to `list_attack_paths` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_attack_paths` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list attack paths. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @param filter [::String] - # The filter expression that filters the attack path in the response. - # Supported fields: - # - # * `valued_resources` supports = - # @param page_token [::String] - # The value returned by the last `ListAttackPathsResponse`; indicates - # that this is a continuation of a prior `ListAttackPaths` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new - # - # # Call the list_attack_paths method. - # result = client.list_attack_paths request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. - # p item - # end - # - def list_attack_paths request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_attack_paths.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_attack_paths.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_attack_paths, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_attack_paths, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecurityCenter API. - # - # This class represents the configuration for SecurityCenter, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # bulk_mute_findings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.bulk_mute_findings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.bulk_mute_findings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the SecurityCenter API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `bulk_mute_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_mute_findings - ## - # RPC-specific configuration for `create_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_security_health_analytics_custom_module - ## - # RPC-specific configuration for `create_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_source - ## - # RPC-specific configuration for `create_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_finding - ## - # RPC-specific configuration for `create_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_mute_config - ## - # RPC-specific configuration for `create_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_config - ## - # RPC-specific configuration for `delete_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_mute_config - ## - # RPC-specific configuration for `delete_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_config - ## - # RPC-specific configuration for `delete_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_simulation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_simulation - ## - # RPC-specific configuration for `get_valued_resource` - # @return [::Gapic::Config::Method] - # - attr_reader :get_valued_resource - ## - # RPC-specific configuration for `get_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :get_big_query_export - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `get_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mute_config - ## - # RPC-specific configuration for `get_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_config - ## - # RPC-specific configuration for `get_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_organization_settings - ## - # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_source - ## - # RPC-specific configuration for `group_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :group_assets - ## - # RPC-specific configuration for `group_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :group_findings - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_mute_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_mute_configs - ## - # RPC-specific configuration for `list_notification_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_configs - ## - # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sources - ## - # RPC-specific configuration for `run_asset_discovery` - # @return [::Gapic::Config::Method] - # - attr_reader :run_asset_discovery - ## - # RPC-specific configuration for `set_finding_state` - # @return [::Gapic::Config::Method] - # - attr_reader :set_finding_state - ## - # RPC-specific configuration for `set_mute` - # @return [::Gapic::Config::Method] - # - attr_reader :set_mute - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `simulate_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :simulate_security_health_analytics_custom_module - ## - # RPC-specific configuration for `update_external_system` - # @return [::Gapic::Config::Method] - # - attr_reader :update_external_system - ## - # RPC-specific configuration for `update_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_finding - ## - # RPC-specific configuration for `update_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_mute_config - ## - # RPC-specific configuration for `update_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_config - ## - # RPC-specific configuration for `update_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_organization_settings - ## - # RPC-specific configuration for `update_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_health_analytics_custom_module - ## - # RPC-specific configuration for `update_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_source - ## - # RPC-specific configuration for `update_security_marks` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_marks - ## - # RPC-specific configuration for `create_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :create_big_query_export - ## - # RPC-specific configuration for `delete_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_big_query_export - ## - # RPC-specific configuration for `update_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :update_big_query_export - ## - # RPC-specific configuration for `list_big_query_exports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_big_query_exports - ## - # RPC-specific configuration for `create_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_event_threat_detection_custom_module - ## - # RPC-specific configuration for `delete_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_event_threat_detection_custom_module - ## - # RPC-specific configuration for `get_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_event_threat_detection_custom_module - ## - # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `list_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `update_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_event_threat_detection_custom_module - ## - # RPC-specific configuration for `validate_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :validate_event_threat_detection_custom_module - ## - # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_event_threat_detection_custom_module - ## - # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `batch_create_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_resource_value_configs - ## - # RPC-specific configuration for `delete_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_resource_value_config - ## - # RPC-specific configuration for `get_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_resource_value_config - ## - # RPC-specific configuration for `list_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_value_configs - ## - # RPC-specific configuration for `update_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_resource_value_config - ## - # RPC-specific configuration for `list_valued_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_valued_resources - ## - # RPC-specific configuration for `list_attack_paths` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attack_paths - - # @private - def initialize parent_rpcs = nil - bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings - @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config - create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module - @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config - create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source - @create_source = ::Gapic::Config::Method.new create_source_config - create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding - @create_finding = ::Gapic::Config::Method.new create_finding_config - create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config - @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config - create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config - @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config - delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config - @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config - delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config - @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config - delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module - @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config - get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation - @get_simulation = ::Gapic::Config::Method.new get_simulation_config - get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource - @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config - get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export - @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config - @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config - get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config - @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config - get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings - @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config - get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module - @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config - get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module - @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config - get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source - @get_source = ::Gapic::Config::Method.new get_source_config - group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets - @group_assets = ::Gapic::Config::Method.new group_assets_config - group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings - @group_findings = ::Gapic::Config::Method.new group_findings_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules - @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs - @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config - list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs - @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config - list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules - @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config - list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules - @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config - list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources - @list_sources = ::Gapic::Config::Method.new list_sources_config - run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery - @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config - set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state - @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config - set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute - @set_mute = ::Gapic::Config::Method.new set_mute_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module - @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config - update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system - @update_external_system = ::Gapic::Config::Method.new update_external_system_config - update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding - @update_finding = ::Gapic::Config::Method.new update_finding_config - update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config - @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config - update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config - @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config - update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings - @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config - update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module - @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config - update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source - @update_source = ::Gapic::Config::Method.new update_source_config - update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks - @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config - create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export - @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config - delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export - @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config - update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export - @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config - list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports - @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config - create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module - @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config - delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module - @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config - get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module - @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config - list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules - @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config - list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules - @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config - update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module - @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config - validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module - @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config - get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module - @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config - list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules - @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config - batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs - @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config - delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config - @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config - get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config - @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config - list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs - @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config - update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config - @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config - list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources - @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config - list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths - @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb deleted file mode 100644 index 4bb0187caca1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - # Credentials for the SecurityCenter API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SECURITY_CENTER_CREDENTIALS", - "SECURITY_CENTER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SECURITY_CENTER_CREDENTIALS_JSON", - "SECURITY_CENTER_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb deleted file mode 100644 index 178841746c30..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the SecurityCenter Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb deleted file mode 100644 index 74f6066a7b65..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/paths.rb +++ /dev/null @@ -1,1127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - module SecurityCenter - # Path helper methods for the SecurityCenter API. - module Paths - ## - # Create a fully-qualified BigQueryExport resource string. - # - # @overload big_query_export_path(organization:, export:) - # The resource will be in the following format: - # - # `organizations/{organization}/bigQueryExports/{export}` - # - # @param organization [String] - # @param export [String] - # - # @overload big_query_export_path(folder:, export:) - # The resource will be in the following format: - # - # `folders/{folder}/bigQueryExports/{export}` - # - # @param folder [String] - # @param export [String] - # - # @overload big_query_export_path(project:, export:) - # The resource will be in the following format: - # - # `projects/{project}/bigQueryExports/{export}` - # - # @param project [String] - # @param export [String] - # - # @return [::String] - def big_query_export_path **args - resources = { - "export:organization" => (proc do |organization:, export:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/bigQueryExports/#{export}" - end), - "export:folder" => (proc do |folder:, export:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/bigQueryExports/#{export}" - end), - "export:project" => (proc do |project:, export:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/bigQueryExports/#{export}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified DlpJob resource string. - # - # @overload dlp_job_path(project:, dlp_job:) - # The resource will be in the following format: - # - # `projects/{project}/dlpJobs/{dlp_job}` - # - # @param project [String] - # @param dlp_job [String] - # - # @overload dlp_job_path(project:, location:, dlp_job:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dlpJobs/{dlp_job}` - # - # @param project [String] - # @param location [String] - # @param dlp_job [String] - # - # @return [::String] - def dlp_job_path **args - resources = { - "dlp_job:project" => (proc do |project:, dlp_job:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/dlpJobs/#{dlp_job}" - end), - "dlp_job:location:project" => (proc do |project:, location:, dlp_job:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dlpJobs/#{dlp_job}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified EffectiveEventThreatDetectionCustomModule resource string. - # - # @overload effective_event_threat_detection_custom_module_path(organization:, module:) - # The resource will be in the following format: - # - # `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}` - # - # @param organization [String] - # @param module [String] - # - # @overload effective_event_threat_detection_custom_module_path(folder:, module:) - # The resource will be in the following format: - # - # `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}` - # - # @param folder [String] - # @param module [String] - # - # @overload effective_event_threat_detection_custom_module_path(project:, module:) - # The resource will be in the following format: - # - # `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}` - # - # @param project [String] - # @param module [String] - # - # @return [::String] - def effective_event_threat_detection_custom_module_path **args - resources = { - "module:organization" => (proc do |organization:, module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" - end), - "folder:module" => (proc do |folder:, module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" - end), - "module:project" => (proc do |project:, module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified EffectiveSecurityHealthAnalyticsCustomModule resource string. - # - # @overload effective_security_health_analytics_custom_module_path(organization:, effective_custom_module:) - # The resource will be in the following format: - # - # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` - # - # @param organization [String] - # @param effective_custom_module [String] - # - # @overload effective_security_health_analytics_custom_module_path(folder:, effective_custom_module:) - # The resource will be in the following format: - # - # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` - # - # @param folder [String] - # @param effective_custom_module [String] - # - # @overload effective_security_health_analytics_custom_module_path(project:, effective_custom_module:) - # The resource will be in the following format: - # - # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}` - # - # @param project [String] - # @param effective_custom_module [String] - # - # @return [::String] - def effective_security_health_analytics_custom_module_path **args - resources = { - "effective_custom_module:organization" => (proc do |organization:, effective_custom_module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" - end), - "effective_custom_module:folder" => (proc do |folder:, effective_custom_module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" - end), - "effective_custom_module:project" => (proc do |project:, effective_custom_module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/securityHealthAnalyticsSettings/effectiveCustomModules/#{effective_custom_module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified EventThreatDetectionCustomModule resource string. - # - # @overload event_threat_detection_custom_module_path(organization:, module:) - # The resource will be in the following format: - # - # `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}` - # - # @param organization [String] - # @param module [String] - # - # @overload event_threat_detection_custom_module_path(folder:, module:) - # The resource will be in the following format: - # - # `folders/{folder}/eventThreatDetectionSettings/customModules/{module}` - # - # @param folder [String] - # @param module [String] - # - # @overload event_threat_detection_custom_module_path(project:, module:) - # The resource will be in the following format: - # - # `projects/{project}/eventThreatDetectionSettings/customModules/{module}` - # - # @param project [String] - # @param module [String] - # - # @return [::String] - def event_threat_detection_custom_module_path **args - resources = { - "module:organization" => (proc do |organization:, module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" - end), - "folder:module" => (proc do |folder:, module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" - end), - "module:project" => (proc do |project:, module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified EventThreatDetectionSettings resource string. - # - # @overload event_threat_detection_settings_path(organization:) - # The resource will be in the following format: - # - # `organizations/{organization}/eventThreatDetectionSettings` - # - # @param organization [String] - # - # @overload event_threat_detection_settings_path(folder:) - # The resource will be in the following format: - # - # `folders/{folder}/eventThreatDetectionSettings` - # - # @param folder [String] - # - # @overload event_threat_detection_settings_path(project:) - # The resource will be in the following format: - # - # `projects/{project}/eventThreatDetectionSettings` - # - # @param project [String] - # - # @return [::String] - def event_threat_detection_settings_path **args - resources = { - "organization" => (proc do |organization:| - "organizations/#{organization}/eventThreatDetectionSettings" - end), - "folder" => (proc do |folder:| - "folders/#{folder}/eventThreatDetectionSettings" - end), - "project" => (proc do |project:| - "projects/#{project}/eventThreatDetectionSettings" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified ExternalSystem resource string. - # - # @overload external_system_path(organization:, source:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param organization [String] - # @param source [String] - # @param finding [String] - # @param externalsystem [String] - # - # @overload external_system_path(folder:, source:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param folder [String] - # @param source [String] - # @param finding [String] - # @param externalsystem [String] - # - # @overload external_system_path(project:, source:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param project [String] - # @param source [String] - # @param finding [String] - # @param externalsystem [String] - # - # @return [::String] - def external_system_path **args - resources = { - "externalsystem:finding:organization:source" => (proc do |organization:, source:, finding:, externalsystem:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" - end), - "externalsystem:finding:folder:source" => (proc do |folder:, source:, finding:, externalsystem:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" - end), - "externalsystem:finding:project:source" => (proc do |project:, source:, finding:, externalsystem:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "projects/#{project}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Finding resource string. - # - # @overload finding_path(organization:, source:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/findings/{finding}` - # - # @param organization [String] - # @param source [String] - # @param finding [String] - # - # @overload finding_path(folder:, source:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/findings/{finding}` - # - # @param folder [String] - # @param source [String] - # @param finding [String] - # - # @overload finding_path(project:, source:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/findings/{finding}` - # - # @param project [String] - # @param source [String] - # @param finding [String] - # - # @return [::String] - def finding_path **args - resources = { - "finding:organization:source" => (proc do |organization:, source:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/findings/#{finding}" - end), - "finding:folder:source" => (proc do |folder:, source:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/findings/#{finding}" - end), - "finding:project:source" => (proc do |project:, source:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "projects/#{project}/sources/#{source}/findings/#{finding}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Folder resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}` - # - # @param folder [String] - # - # @return [::String] - def folder_path folder: - "folders/#{folder}" - end - - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified MuteConfig resource string. - # - # @overload mute_config_path(organization:, mute_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/muteConfigs/{mute_config}` - # - # @param organization [String] - # @param mute_config [String] - # - # @overload mute_config_path(folder:, mute_config:) - # The resource will be in the following format: - # - # `folders/{folder}/muteConfigs/{mute_config}` - # - # @param folder [String] - # @param mute_config [String] - # - # @overload mute_config_path(project:, mute_config:) - # The resource will be in the following format: - # - # `projects/{project}/muteConfigs/{mute_config}` - # - # @param project [String] - # @param mute_config [String] - # - # @overload mute_config_path(organization:, location:, mute_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/muteConfigs/{mute_config}` - # - # @param organization [String] - # @param location [String] - # @param mute_config [String] - # - # @overload mute_config_path(folder:, location:, mute_config:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` - # - # @param folder [String] - # @param location [String] - # @param mute_config [String] - # - # @overload mute_config_path(project:, location:, mute_config:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/muteConfigs/{mute_config}` - # - # @param project [String] - # @param location [String] - # @param mute_config [String] - # - # @return [::String] - def mute_config_path **args - resources = { - "mute_config:organization" => (proc do |organization:, mute_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/muteConfigs/#{mute_config}" - end), - "folder:mute_config" => (proc do |folder:, mute_config:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/muteConfigs/#{mute_config}" - end), - "mute_config:project" => (proc do |project:, mute_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/muteConfigs/#{mute_config}" - end), - "location:mute_config:organization" => (proc do |organization:, location:, mute_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/muteConfigs/#{mute_config}" - end), - "folder:location:mute_config" => (proc do |folder:, location:, mute_config:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/muteConfigs/#{mute_config}" - end), - "location:mute_config:project" => (proc do |project:, location:, mute_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/muteConfigs/#{mute_config}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified NotificationConfig resource string. - # - # @overload notification_config_path(organization:, notification_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/notificationConfigs/{notification_config}` - # - # @param organization [String] - # @param notification_config [String] - # - # @overload notification_config_path(folder:, notification_config:) - # The resource will be in the following format: - # - # `folders/{folder}/notificationConfigs/{notification_config}` - # - # @param folder [String] - # @param notification_config [String] - # - # @overload notification_config_path(project:, notification_config:) - # The resource will be in the following format: - # - # `projects/{project}/notificationConfigs/{notification_config}` - # - # @param project [String] - # @param notification_config [String] - # - # @return [::String] - def notification_config_path **args - resources = { - "notification_config:organization" => (proc do |organization:, notification_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/notificationConfigs/#{notification_config}" - end), - "folder:notification_config" => (proc do |folder:, notification_config:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/notificationConfigs/#{notification_config}" - end), - "notification_config:project" => (proc do |project:, notification_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/notificationConfigs/#{notification_config}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Organization resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}` - # - # @param organization [String] - # - # @return [::String] - def organization_path organization: - "organizations/#{organization}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationSettings resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/organizationSettings` - # - # @param organization [String] - # - # @return [::String] - def organization_settings_path organization: - "organizations/#{organization}/organizationSettings" - end - - ## - # Create a fully-qualified OrganizationSimulation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/simulations/{simulation}` - # - # @param organization [String] - # @param simulation [String] - # - # @return [::String] - def organization_simulation_path organization:, simulation: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/simulations/#{simulation}" - end - - ## - # Create a fully-qualified Policy resource string. - # - # @overload policy_path(organization:, constraint_name:) - # The resource will be in the following format: - # - # `organizations/{organization}/policies/{constraint_name}` - # - # @param organization [String] - # @param constraint_name [String] - # - # @overload policy_path(folder:, constraint_name:) - # The resource will be in the following format: - # - # `folders/{folder}/policies/{constraint_name}` - # - # @param folder [String] - # @param constraint_name [String] - # - # @overload policy_path(project:, constraint_name:) - # The resource will be in the following format: - # - # `projects/{project}/policies/{constraint_name}` - # - # @param project [String] - # @param constraint_name [String] - # - # @return [::String] - def policy_path **args - resources = { - "constraint_name:organization" => (proc do |organization:, constraint_name:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/policies/#{constraint_name}" - end), - "constraint_name:folder" => (proc do |folder:, constraint_name:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/policies/#{constraint_name}" - end), - "constraint_name:project" => (proc do |project:, constraint_name:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/policies/#{constraint_name}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified ResourceValueConfig resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/resourceValueConfigs/{resource_value_config}` - # - # @param organization [String] - # @param resource_value_config [String] - # - # @return [::String] - def resource_value_config_path organization:, resource_value_config: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/resourceValueConfigs/#{resource_value_config}" - end - - ## - # Create a fully-qualified SecurityHealthAnalyticsCustomModule resource string. - # - # @overload security_health_analytics_custom_module_path(organization:, custom_module:) - # The resource will be in the following format: - # - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{custom_module}` - # - # @param organization [String] - # @param custom_module [String] - # - # @overload security_health_analytics_custom_module_path(folder:, custom_module:) - # The resource will be in the following format: - # - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{custom_module}` - # - # @param folder [String] - # @param custom_module [String] - # - # @overload security_health_analytics_custom_module_path(project:, custom_module:) - # The resource will be in the following format: - # - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{custom_module}` - # - # @param project [String] - # @param custom_module [String] - # - # @return [::String] - def security_health_analytics_custom_module_path **args - resources = { - "custom_module:organization" => (proc do |organization:, custom_module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/securityHealthAnalyticsSettings/customModules/#{custom_module}" - end), - "custom_module:folder" => (proc do |folder:, custom_module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/securityHealthAnalyticsSettings/customModules/#{custom_module}" - end), - "custom_module:project" => (proc do |project:, custom_module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/securityHealthAnalyticsSettings/customModules/#{custom_module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified SecurityHealthAnalyticsSettings resource string. - # - # @overload security_health_analytics_settings_path(organization:) - # The resource will be in the following format: - # - # `organizations/{organization}/securityHealthAnalyticsSettings` - # - # @param organization [String] - # - # @overload security_health_analytics_settings_path(folder:) - # The resource will be in the following format: - # - # `folders/{folder}/securityHealthAnalyticsSettings` - # - # @param folder [String] - # - # @overload security_health_analytics_settings_path(project:) - # The resource will be in the following format: - # - # `projects/{project}/securityHealthAnalyticsSettings` - # - # @param project [String] - # - # @return [::String] - def security_health_analytics_settings_path **args - resources = { - "organization" => (proc do |organization:| - "organizations/#{organization}/securityHealthAnalyticsSettings" - end), - "folder" => (proc do |folder:| - "folders/#{folder}/securityHealthAnalyticsSettings" - end), - "project" => (proc do |project:| - "projects/#{project}/securityHealthAnalyticsSettings" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified SecurityMarks resource string. - # - # @overload security_marks_path(organization:, asset:) - # The resource will be in the following format: - # - # `organizations/{organization}/assets/{asset}/securityMarks` - # - # @param organization [String] - # @param asset [String] - # - # @overload security_marks_path(organization:, source:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/findings/{finding}/securityMarks` - # - # @param organization [String] - # @param source [String] - # @param finding [String] - # - # @overload security_marks_path(folder:, asset:) - # The resource will be in the following format: - # - # `folders/{folder}/assets/{asset}/securityMarks` - # - # @param folder [String] - # @param asset [String] - # - # @overload security_marks_path(project:, asset:) - # The resource will be in the following format: - # - # `projects/{project}/assets/{asset}/securityMarks` - # - # @param project [String] - # @param asset [String] - # - # @overload security_marks_path(folder:, source:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/findings/{finding}/securityMarks` - # - # @param folder [String] - # @param source [String] - # @param finding [String] - # - # @overload security_marks_path(project:, source:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/findings/{finding}/securityMarks` - # - # @param project [String] - # @param source [String] - # @param finding [String] - # - # @return [::String] - def security_marks_path **args - resources = { - "asset:organization" => (proc do |organization:, asset:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/assets/#{asset}/securityMarks" - end), - "finding:organization:source" => (proc do |organization:, source:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/findings/#{finding}/securityMarks" - end), - "asset:folder" => (proc do |folder:, asset:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/assets/#{asset}/securityMarks" - end), - "asset:project" => (proc do |project:, asset:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/assets/#{asset}/securityMarks" - end), - "finding:folder:source" => (proc do |folder:, source:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/findings/#{finding}/securityMarks" - end), - "finding:project:source" => (proc do |project:, source:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "projects/#{project}/sources/#{source}/findings/#{finding}/securityMarks" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Simulation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/simulations/{simulation}` - # - # @param organization [String] - # @param simulation [String] - # - # @return [::String] - def simulation_path organization:, simulation: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/simulations/#{simulation}" - end - - ## - # Create a fully-qualified Source resource string. - # - # @overload source_path(organization:, source:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}` - # - # @param organization [String] - # @param source [String] - # - # @overload source_path(folder:, source:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}` - # - # @param folder [String] - # @param source [String] - # - # @overload source_path(project:, source:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}` - # - # @param project [String] - # @param source [String] - # - # @return [::String] - def source_path **args - resources = { - "organization:source" => (proc do |organization:, source:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}" - end), - "folder:source" => (proc do |folder:, source:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/sources/#{source}" - end), - "project:source" => (proc do |project:, source:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/sources/#{source}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified TableDataProfile resource string. - # - # @overload table_data_profile_path(project:, table_profile:) - # The resource will be in the following format: - # - # `projects/{project}/tableProfiles/{table_profile}` - # - # @param project [String] - # @param table_profile [String] - # - # @overload table_data_profile_path(project:, location:, table_profile:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/tableProfiles/{table_profile}` - # - # @param project [String] - # @param location [String] - # @param table_profile [String] - # - # @return [::String] - def table_data_profile_path **args - resources = { - "project:table_profile" => (proc do |project:, table_profile:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/tableProfiles/#{table_profile}" - end), - "location:project:table_profile" => (proc do |project:, location:, table_profile:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/tableProfiles/#{table_profile}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Topic resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/topics/{topic}` - # - # @param project [String] - # @param topic [String] - # - # @return [::String] - def topic_path project:, topic: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/topics/#{topic}" - end - - ## - # Create a fully-qualified ValuedResource resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # - # @param organization [String] - # @param simulation [String] - # @param valued_resource [String] - # - # @return [::String] - def valued_resource_path organization:, simulation:, valued_resource: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" - - "organizations/#{organization}/simulations/#{simulation}/valuedResources/#{valued_resource}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb deleted file mode 100644 index 9148bffe706d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security_center/v1/version" - -require "google/cloud/security_center/v1/security_center/credentials" -require "google/cloud/security_center/v1/security_center/paths" -require "google/cloud/security_center/v1/security_center/rest/operations" -require "google/cloud/security_center/v1/security_center/rest/client" - -module Google - module Cloud - module SecurityCenter - module V1 - ## - # V1 APIs for Security Center service. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/security_center/v1/security_center/rest" - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - module SecurityCenter - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/security_center/v1/security_center/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb deleted file mode 100644 index f6a0a8b930bb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/client.rb +++ /dev/null @@ -1,6970 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securitycenter/v1/securitycenter_service_pb" -require "google/cloud/security_center/v1/security_center/rest/service_stub" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - module Rest - ## - # REST client for the SecurityCenter service. - # - # V1 APIs for Security Center service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :security_center_stub - - ## - # Configure the SecurityCenter Client class. - # - # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenter clients - # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecurityCenter", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.create_source.timeout = 60.0 - - default_config.rpcs.create_finding.timeout = 60.0 - - default_config.rpcs.create_notification_config.timeout = 60.0 - - default_config.rpcs.delete_notification_config.timeout = 60.0 - - default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_notification_config.timeout = 60.0 - default_config.rpcs.get_notification_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_organization_settings.timeout = 60.0 - default_config.rpcs.get_organization_settings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_source.timeout = 60.0 - default_config.rpcs.get_source.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_assets.timeout = 480.0 - default_config.rpcs.group_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_findings.timeout = 480.0 - default_config.rpcs.group_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_assets.timeout = 480.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_findings.timeout = 480.0 - default_config.rpcs.list_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_notification_configs.timeout = 60.0 - default_config.rpcs.list_notification_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_sources.timeout = 60.0 - default_config.rpcs.list_sources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.run_asset_discovery.timeout = 60.0 - - default_config.rpcs.set_finding_state.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_finding.timeout = 60.0 - - default_config.rpcs.update_notification_config.timeout = 60.0 - - default_config.rpcs.update_organization_settings.timeout = 60.0 - - default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.update_source.timeout = 60.0 - - default_config.rpcs.update_security_marks.timeout = 480.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @security_center_stub.universe_domain - end - - ## - # Create a new SecurityCenter REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecurityCenter client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @security_center_stub = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @security_center_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @security_center_stub.logger - end - - # Service calls - - ## - # Kicks off an LRO to bulk mute findings for a parent based on a filter. The - # parent can be either an organization, folder or project. The findings - # matched by the filter will be muted after the LRO is done. - # - # @overload bulk_mute_findings(request, options = nil) - # Pass arguments to `bulk_mute_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload bulk_mute_findings(parent: nil, filter: nil, mute_annotation: nil, mute_state: nil) - # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, at which bulk action needs to be applied. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param filter [::String] - # Expression that identifies findings that should be updated. - # The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @param mute_annotation [::String] - # This can be a mute configuration name or any identifier for mute/unmute - # of findings based on the filter. - # @param mute_state [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] - # Optional. All findings matching the given filter will have their mute state - # set to this value. The default value is `MUTED`. Setting this to - # `UNDEFINED` will clear the mute state on all matching findings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new - # - # # Call the bulk_mute_findings method. - # result = client.bulk_mute_findings request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def bulk_mute_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.bulk_mute_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_mute_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.bulk_mute_findings request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the - # given CRM parent, and also creates inherited - # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given - # parent. These modules are enabled by default. - # - # @overload create_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil) - # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new custom module's parent. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. SecurityHealthAnalytics custom module to create. The provided - # name is ignored and reset with provided parent information and - # server-generated ID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the create_security_health_analytics_custom_module method. - # result = client.create_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def create_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a source. - # - # @overload create_source(request, options = nil) - # Pass arguments to `create_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_source(parent: nil, source: nil) - # Pass arguments to `create_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new source's parent. Its format should be - # `organizations/[organization_id]`. - # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] - # Required. The Source being created, only the display_name and description - # will be used. All other fields will be ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new - # - # # Call the create_source method. - # result = client.create_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def create_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a finding. The corresponding source must exist for finding creation - # to succeed. - # - # @overload create_finding(request, options = nil) - # Pass arguments to `create_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_finding(parent: nil, finding_id: nil, finding: nil) - # Pass arguments to `create_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new finding's parent. Its format should be - # `organizations/[organization_id]/sources/[source_id]`. - # @param finding_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be alphanumeric and less than or equal to 32 characters and - # greater than 0 characters in length. - # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] - # Required. The Finding being created. The name and security_marks will be - # ignored as they are both output only fields on this resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new - # - # # Call the create_finding method. - # result = client.create_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def create_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_finding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_finding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a mute config. - # - # @overload create_mute_config(request, options = nil) - # Pass arguments to `create_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) - # Pass arguments to `create_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new mute configs's parent. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] - # Required. The mute config being created. - # @param mute_config_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new - # - # # Call the create_mute_config method. - # result = client.create_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def create_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a notification config. - # - # @overload create_notification_config(request, options = nil) - # Pass arguments to `create_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) - # Pass arguments to `create_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new notification config's parent. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param config_id [::String] - # Required. - # Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters and contain alphanumeric - # characters, underscores, or hyphens only. - # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] - # Required. The notification config being created. The name and the service - # account will be ignored as they are both output only fields on this - # resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new - # - # # Call the create_notification_config method. - # result = client.create_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def create_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing mute config. - # - # @overload delete_mute_config(request, options = nil) - # Pass arguments to `delete_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_mute_config(name: nil) - # Pass arguments to `delete_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to delete. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new - # - # # Call the delete_mute_config method. - # result = client.delete_mute_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a notification config. - # - # @overload delete_notification_config(request, options = nil) - # Pass arguments to `delete_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_notification_config(name: nil) - # Pass arguments to `delete_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to delete. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new - # - # # Call the delete_notification_config method. - # result = client.delete_notification_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its - # descendants in the CRM hierarchy. This method is only supported for - # resident custom modules. - # - # @overload delete_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_security_health_analytics_custom_module(name: nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to delete. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the delete_security_health_analytics_custom_module method. - # result = client.delete_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the simulation by name or the latest simulation for the given - # organization. - # - # @overload get_simulation(request, options = nil) - # Pass arguments to `get_simulation` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSimulationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_simulation(name: nil) - # Pass arguments to `get_simulation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The organization name or simulation name of this simulation - # - # Valid format: - # `organizations/{organization}/simulations/latest` - # `organizations/{organization}/simulations/{simulation}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Simulation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Simulation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new - # - # # Call the get_simulation method. - # result = client.get_simulation request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. - # p result - # - def get_simulation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_simulation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_simulation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_simulation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the valued resource by name - # - # @overload get_valued_resource(request, options = nil) - # Pass arguments to `get_valued_resource` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_valued_resource(name: nil) - # Pass arguments to `get_valued_resource` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of this valued resource - # - # Valid format: - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new - # - # # Call the get_valued_resource method. - # result = client.get_valued_resource request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. - # p result - # - def get_valued_resource request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_valued_resource.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_valued_resource.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_valued_resource request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a BigQuery export. - # - # @overload get_big_query_export(request, options = nil) - # Pass arguments to `get_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_big_query_export(name: nil) - # Pass arguments to `get_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the BigQuery export to retrieve. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new - # - # # Call the get_big_query_export method. - # result = client.get_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def get_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy on the specified Source. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a mute config. - # - # @overload get_mute_config(request, options = nil) - # Pass arguments to `get_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_mute_config(name: nil) - # Pass arguments to `get_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to retrieve. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new - # - # # Call the get_mute_config method. - # result = client.get_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def get_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a notification config. - # - # @overload get_notification_config(request, options = nil) - # Pass arguments to `get_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_notification_config(name: nil) - # Pass arguments to `get_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to get. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new - # - # # Call the get_notification_config method. - # result = client.get_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def get_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the settings for an organization. - # - # @overload get_organization_settings(request, options = nil) - # Pass arguments to `get_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_organization_settings(name: nil) - # Pass arguments to `get_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the organization to get organization settings for. Its - # format is `organizations/[organization_id]/organizationSettings`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new - # - # # Call the get_organization_settings method. - # result = client.get_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - # p result - # - def get_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_organization_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. - # - # @overload get_effective_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_effective_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the effective custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_effective_security_health_analytics_custom_module method. - # result = client.get_effective_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p result - # - def get_effective_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_effective_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a SecurityHealthAnalyticsCustomModule. - # - # @overload get_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_security_health_analytics_custom_module method. - # result = client.get_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def get_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a source. - # - # @overload get_source(request, options = nil) - # Pass arguments to `get_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_source(name: nil) - # Pass arguments to `get_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Relative resource name of the source. Its format is - # `organizations/[organization_id]/source/[source_id]`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new - # - # # Call the get_source method. - # result = client.get_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def get_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization's assets and groups them by their specified - # properties. - # - # @overload group_assets(request, options = nil) - # Pass arguments to `group_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent to group the assets by. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: - # "security_center_properties.resource_project,security_center_properties.project". - # - # The following fields are supported when compare_duration is not set: - # - # * security_center_properties.resource_project - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_type - # * security_center_properties.resource_parent - # * security_center_properties.resource_parent_display_name - # - # The following fields are supported when compare_duration is set: - # - # * security_center_properties.resource_type - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_parent_display_name - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" property is - # updated to indicate whether the asset was added, removed, or remained - # present during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at reference_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at reference_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and reference_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param page_token [::String] - # The value returned by the last `GroupAssetsResponse`; indicates - # that this is a continuation of a prior `GroupAssets` call, and that the - # system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new - # - # # Call the group_assets method. - # result = client.group_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - # p item - # end - # - def group_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.group_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.group_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.group_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.group_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_assets, "group_by_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization or source's findings and groups them by their - # specified properties. - # - # To group across all sources provide a `-` as the source id. - # Example: /v1/organizations/\\{organization_id}/sources/-/findings, - # /v1/folders/\\{folder_id}/sources/-/findings, - # /v1/projects/\\{project_id}/sources/-/findings - # - # @overload group_findings(request, options = nil) - # Pass arguments to `group_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source to groupBy. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, - # or `projects/{project_id}/sources/-` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping - # (including `state_change`). The string value should follow SQL syntax: - # comma separated list of fields. For example: "parent,resource_name". - # - # The following fields are supported when compare_duration is set: - # - # * state_change - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" attribute is - # updated to indicate whether the finding had its state changed, the - # finding's state remained unchanged, or if the finding was added during the - # compare_duration period of time that precedes the read_time. This is the - # time between (read_time - compare_duration) and read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present - # at read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param page_token [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new - # - # # Call the group_findings method. - # result = client.group_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - # p item - # end - # - def group_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.group_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.group_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.group_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.group_findings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization's assets. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource that contains the assets. The - # value that you can specify on parent depends on the method in which you - # specify parent. You can specify one of the following values: - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following are the allowed field and operator combinations: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,resource_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,resource_properties.a_property" and " - # name desc , resource_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # update_time - # resource_properties - # security_marks.marks - # security_center_properties.resource_name - # security_center_properties.resource_display_name - # security_center_properties.resource_parent - # security_center_properties.resource_parent_display_name - # security_center_properties.resource_project - # security_center_properties.resource_project_display_name - # security_center_properties.resource_type - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListAssetsResult's "state_change" - # attribute is updated to indicate whether the asset was added, removed, or - # remained present during the compare_duration period of time that precedes - # the read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at read_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at read_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the ListAssetsResult fields to be listed in the - # response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListAssetsResponse`; indicates - # that this is a continuation of a prior `ListAssets` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_assets, "list_assets_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all resident SecurityHealthAnalyticsCustomModules under - # the given CRM parent and all of the parent’s CRM descendants. - # - # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list descendant custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_descendant_security_health_analytics_custom_modules method. - # result = client.list_descendant_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_descendant_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_descendant_security_health_analytics_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization or source's findings. - # - # To list across all sources provide a `-` as the source id. - # Example: /v1/organizations/\\{organization_id}/sources/-/findings - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source the findings belong to. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To list across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-`, - # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.display_name: `=`, `:` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,source_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,source_properties.a_property" and " - # name desc , source_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # source_properties - # security_marks.marks - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListFindingsResult's "state_change" - # attribute is updated to indicate whether the finding had its state changed, - # the finding's state remained unchanged, or if the finding was added in any - # state during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_findings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists mute configs. - # - # @overload list_mute_configs(request, options = nil) - # Pass arguments to `list_mute_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_mute_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of mute configs. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListMuteConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMuteConfigs` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::MuteConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new - # - # # Call the list_mute_configs method. - # result = client.list_mute_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. - # p item - # end - # - def list_mute_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_mute_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_mute_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_mute_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_mute_configs, "mute_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists notification configs. - # - # @overload list_notification_configs(request, options = nil) - # Pass arguments to `list_notification_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_notification_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent in which to list the notification - # configurations. Its format is "organizations/[organization_id]", - # "folders/[folder_id]", or "projects/[project_id]". - # @param page_token [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new - # - # # Call the list_notification_configs method. - # result = client.list_notification_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p item - # end - # - def list_notification_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_notification_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_notification_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_notification_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the - # given parent. This includes resident modules defined at the scope of the - # parent, and inherited modules, inherited from CRM ancestors. - # - # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list effective custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_effective_security_health_analytics_custom_modules method. - # result = client.list_effective_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_effective_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_effective_security_health_analytics_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_security_health_analytics_custom_modules, "effective_security_health_analytics_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all SecurityHealthAnalyticsCustomModules for the given - # parent. This includes resident modules defined at the scope of the parent, - # and inherited modules, inherited from CRM ancestors. - # - # @overload list_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # The value returned by the last call indicating a continuation - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_security_health_analytics_custom_modules method. - # result = client.list_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_security_health_analytics_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all sources belonging to an organization. - # - # @overload list_sources(request, options = nil) - # Pass arguments to `list_sources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent of sources to list. Its format should - # be `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param page_token [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::Source>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new - # - # # Call the list_sources method. - # result = client.list_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. - # p item - # end - # - def list_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs asset discovery. The discovery is tracked with a long-running - # operation. - # - # This API can only be called with limited frequency for an organization. If - # it is called too frequently the caller will receive a TOO_MANY_REQUESTS - # error. - # - # @overload run_asset_discovery(request, options = nil) - # Pass arguments to `run_asset_discovery` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_asset_discovery(parent: nil) - # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization to run asset discovery for. Its format - # is `organizations/[organization_id]`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new - # - # # Call the run_asset_discovery method. - # result = client.run_asset_discovery request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_asset_discovery request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_asset_discovery.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_asset_discovery.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.run_asset_discovery request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the state of a finding. - # - # @overload set_finding_state(request, options = nil) - # Pass arguments to `set_finding_state` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_finding_state(name: nil, state: nil, start_time: nil) - # Pass arguments to `set_finding_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @param state [::Google::Cloud::SecurityCenter::V1::Finding::State] - # Required. The desired State of the finding. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The time at which the updated state takes effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new - # - # # Call the set_finding_state method. - # result = client.set_finding_state request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def set_finding_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_finding_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_finding_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.set_finding_state request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the mute state of a finding. - # - # @overload set_mute(request, options = nil) - # Pass arguments to `set_mute` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SetMuteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_mute(name: nil, mute: nil) - # Pass arguments to `set_mute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @param mute [::Google::Cloud::SecurityCenter::V1::Finding::Mute] - # Required. The desired state of the Mute. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new - # - # # Call the set_mute method. - # result = client.set_mute request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def set_mute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SetMuteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_mute.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_mute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_mute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.set_mute request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified Source. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has on the specified source. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. - # - # @overload simulate_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative resource name of the organization, project, or - # folder. For more information about relative resource names, see [Relative - # Resource - # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # Example: `organizations/{organization_id}` - # @param custom_config [::Google::Cloud::SecurityCenter::V1::CustomConfig, ::Hash] - # Required. The custom configuration that you need to test. - # @param resource [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] - # Required. Resource data to simulate custom module against. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the simulate_security_health_analytics_custom_module method. - # result = client.simulate_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. - # p result - # - def simulate_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.simulate_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates external system. This is for a given finding. - # - # @overload update_external_system(request, options = nil) - # Pass arguments to `update_external_system` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_external_system(external_system: nil, update_mask: nil) - # Pass arguments to `update_external_system` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param external_system [::Google::Cloud::SecurityCenter::V1::ExternalSystem, ::Hash] - # Required. The external system resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the external system resource. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new - # - # # Call the update_external_system method. - # result = client.update_external_system request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. - # p result - # - def update_external_system request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_external_system.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_external_system.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_external_system request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a finding. The corresponding source must exist for a - # finding creation to succeed. - # - # @overload update_finding(request, options = nil) - # Pass arguments to `update_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_finding(finding: nil, update_mask: nil) - # Pass arguments to `update_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash] - # Required. The finding resource to update or create if it does not already - # exist. parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new - # - # # Call the update_finding method. - # result = client.update_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - # p result - # - def update_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_finding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_finding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a mute config. - # - # @overload update_mute_config(request, options = nil) - # Pass arguments to `update_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_mute_config(mute_config: nil, update_mask: nil) - # Pass arguments to `update_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param mute_config [::Google::Cloud::SecurityCenter::V1::MuteConfig, ::Hash] - # Required. The mute config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new - # - # # Call the update_mute_config method. - # result = client.update_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - # p result - # - def update_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - # - # @overload update_notification_config(request, options = nil) - # Pass arguments to `update_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_notification_config(notification_config: nil, update_mask: nil) - # Pass arguments to `update_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash] - # Required. The notification config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new - # - # # Call the update_notification_config method. - # result = client.update_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - # p result - # - def update_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an organization's settings. - # - # @overload update_organization_settings(request, options = nil) - # Pass arguments to `update_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_organization_settings(organization_settings: nil, update_mask: nil) - # Pass arguments to `update_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param organization_settings [::Google::Cloud::SecurityCenter::V1::OrganizationSettings, ::Hash] - # Required. The organization settings resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the settings resource. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new - # - # # Call the update_organization_settings method. - # result = client.update_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - # p result - # - def update_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_organization_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the SecurityHealthAnalyticsCustomModule under the given name based - # on the given update mask. Updating the enablement state is supported on - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name and custom - # config of a module is supported on resident modules only. - # - # @overload update_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_security_health_analytics_custom_module(security_health_analytics_custom_module: nil, update_mask: nil) - # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. The SecurityHealthAnalytics custom module to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. The only fields that can be updated are - # `enablement_state` and `custom_config`. If empty or set to the wildcard - # value `*`, both `enablement_state` and `custom_config` are updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the update_security_health_analytics_custom_module method. - # result = client.update_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def update_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a source. - # - # @overload update_source(request, options = nil) - # Pass arguments to `update_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_source(source: nil, update_mask: nil) - # Pass arguments to `update_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash] - # Required. The source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new - # - # # Call the update_source method. - # result = client.update_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - # p result - # - def update_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates security marks. - # - # @overload update_security_marks(request, options = nil) - # Pass arguments to `update_security_marks` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) - # Pass arguments to `update_security_marks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_marks [::Google::Cloud::SecurityCenter::V1::SecurityMarks, ::Hash] - # Required. The security marks resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # The time at which the updated SecurityMarks take effect. - # If not set uses current server time. Updates will be applied to the - # SecurityMarks that are active immediately preceding this time. Must be - # earlier or equal to the server time. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new - # - # # Call the update_security_marks method. - # result = client.update_security_marks request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. - # p result - # - def update_security_marks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_security_marks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_security_marks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_security_marks request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a BigQuery export. - # - # @overload create_big_query_export(request, options = nil) - # Pass arguments to `create_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) - # Pass arguments to `create_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource of the new BigQuery export. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] - # Required. The BigQuery export being created. - # @param big_query_export_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new - # - # # Call the create_big_query_export method. - # result = client.create_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def create_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing BigQuery export. - # - # @overload delete_big_query_export(request, options = nil) - # Pass arguments to `delete_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_big_query_export(name: nil) - # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the BigQuery export to delete. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new - # - # # Call the delete_big_query_export method. - # result = client.delete_big_query_export request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a BigQuery export. - # - # @overload update_big_query_export(request, options = nil) - # Pass arguments to `update_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_big_query_export(big_query_export: nil, update_mask: nil) - # Pass arguments to `update_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param big_query_export [::Google::Cloud::SecurityCenter::V1::BigQueryExport, ::Hash] - # Required. The BigQuery export being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new - # - # # Call the update_big_query_export method. - # result = client.update_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p result - # - def update_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BigQuery exports. Note that when requesting BigQuery exports at a - # given level all exports under that level are also returned e.g. if - # requesting BigQuery exports under a folder, then all BigQuery exports - # immediately under the folder plus the ones created under the projects - # within the folder are returned. - # - # @overload list_big_query_exports(request, options = nil) - # Pass arguments to `list_big_query_exports` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of BigQuery exports. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListBigQueryExports` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListBigQueryExports` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new - # - # # Call the list_big_query_exports method. - # result = client.list_big_query_exports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. - # p item - # end - # - def list_big_query_exports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_big_query_exports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_big_query_exports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_big_query_exports request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_big_query_exports, "big_query_exports", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident Event Threat Detection custom module at the scope of the - # given Resource Manager parent, and also creates inherited custom modules - # for all descendants of the given parent. These modules are enabled by - # default. - # - # @overload create_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil) - # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The new custom module's parent. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module to create. The - # event_threat_detection_custom_module.name will be ignored and server - # generated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new - # - # # Call the create_event_threat_detection_custom_module method. - # result = client.create_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def create_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified Event Threat Detection custom module and all of its - # descendants in the Resource Manager hierarchy. This method is only - # supported for resident custom modules. - # - # @overload delete_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_event_threat_detection_custom_module(name: nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to delete. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new - # - # # Call the delete_event_threat_detection_custom_module method. - # result = client.delete_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an Event Threat Detection custom module. - # - # @overload get_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the custom module to get. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_event_threat_detection_custom_module method. - # result = client.get_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def get_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all resident Event Threat Detection custom modules under the - # given Resource Manager parent and its descendants. - # - # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDescendantEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_descendant_event_threat_detection_custom_modules method. - # result = client.list_descendant_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_descendant_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_descendant_event_threat_detection_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all Event Threat Detection custom modules for the given - # Resource Manager parent. This includes resident modules defined at the - # scope of the parent along with modules inherited from ancestors. - # - # @overload list_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListEventThreatDetectionCustomModules` must match the call that provided - # the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_event_threat_detection_custom_modules method. - # result = client.list_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_event_threat_detection_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Event Threat Detection custom module with the given name based - # on the given update mask. Updating the enablement state is supported for - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name or - # configuration of a module is supported for resident modules only. The type - # of a module cannot be changed. - # - # @overload update_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_event_threat_detection_custom_module(event_threat_detection_custom_module: nil, update_mask: nil) - # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new - # - # # Call the update_event_threat_detection_custom_module method. - # result = client.update_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - # p result - # - def update_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Validates the given Event Threat Detection custom module. - # - # @overload validate_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent to validate the Custom Module under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param raw_text [::String] - # Required. The raw text of the module's contents. Used to generate error - # messages. - # @param type [::String] - # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new - # - # # Call the validate_event_threat_detection_custom_module method. - # result = client.validate_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. - # p result - # - def validate_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.validate_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an effective Event Threat Detection custom module at the given level. - # - # @overload get_effective_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_effective_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the effective Event Threat Detection custom - # module. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_effective_event_threat_detection_custom_module method. - # result = client.get_effective_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - # p result - # - def get_effective_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_effective_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all effective Event Threat Detection custom modules for the - # given parent. This includes resident modules defined at the scope of the - # parent along with modules inherited from its ancestors. - # - # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent to list custom modules for. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @param page_token [::String] - # A page token, received from a previous - # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListEffectiveEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @param page_size [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_effective_event_threat_detection_custom_modules method. - # result = client.list_effective_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - # p item - # end - # - def list_effective_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_effective_event_threat_detection_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_event_threat_detection_custom_modules, "effective_event_threat_detection_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a ResourceValueConfig for an organization. Maps user's tags to - # difference resource values for use by the attack path simulation. - # - # @overload batch_create_resource_value_configs(request, options = nil) - # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_create_resource_value_configs(parent: nil, requests: nil) - # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # The parent field in the CreateResourceValueConfigRequest - # messages must either be empty or match this field. - # @param requests [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, ::Hash>] - # Required. The resource value configs to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new - # - # # Call the batch_create_resource_value_configs method. - # result = client.batch_create_resource_value_configs request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. - # p result - # - def batch_create_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.batch_create_resource_value_configs request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a ResourceValueConfig. - # - # @overload delete_resource_value_config(request, options = nil) - # Pass arguments to `delete_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_resource_value_config(name: nil) - # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the ResourceValueConfig to delete - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new - # - # # Call the delete_resource_value_config method. - # result = client.delete_resource_value_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_resource_value_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a ResourceValueConfig. - # - # @overload get_resource_value_config(request, options = nil) - # Pass arguments to `get_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_resource_value_config(name: nil) - # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource value config to retrieve. Its format is - # `organizations/{organization}/resourceValueConfigs/{config_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new - # - # # Call the get_resource_value_config method. - # result = client.get_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p result - # - def get_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_resource_value_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all ResourceValueConfigs. - # - # @overload list_resource_value_configs(request, options = nil) - # Pass arguments to `list_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of resource value configs. - # Its format is - # `organizations/[organization_id]` - # @param page_size [::Integer] - # The number of results to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListResourceValueConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListResourceValueConfigs` must match the call that provided the - # page token. - # - # page_size can be specified, and the new page_size will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new - # - # # Call the list_resource_value_configs method. - # result = client.list_resource_value_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p item - # end - # - def list_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_resource_value_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, "resource_value_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing ResourceValueConfigs with new rules. - # - # @overload update_resource_value_config(request, options = nil) - # Pass arguments to `update_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) - # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource_value_config [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig, ::Hash] - # Required. The resource value config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new - # - # # Call the update_resource_value_config method. - # result = client.update_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - # p result - # - def update_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_resource_value_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the valued resources for a set of simulation results and filter. - # - # @overload list_valued_resources(request, options = nil) - # Pass arguments to `list_valued_resources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) - # Pass arguments to `list_valued_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list valued resources. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # @param filter [::String] - # The filter expression that filters the valued resources in the response. - # Supported fields: - # - # * `resource_value` supports = - # * `resource_type` supports = - # @param page_token [::String] - # The value returned by the last `ListValuedResourcesResponse`; indicates - # that this is a continuation of a prior `ListValuedResources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param order_by [::String] - # Optional. The fields by which to order the valued resources response. - # - # Supported fields: - # - # * `exposed_score` - # - # * `resource_value` - # - # * `resource_type` - # - # * `resource` - # - # * `display_name` - # - # Values should be a comma separated list of fields. For example: - # `exposed_score,resource_value`. - # - # The default sorting order is descending. To specify ascending or descending - # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for - # example: `exposed_score DESC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::ValuedResource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new - # - # # Call the list_valued_resources method. - # result = client.list_valued_resources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. - # p item - # end - # - def list_valued_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_valued_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_valued_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_valued_resources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_valued_resources, "valued_resources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the attack paths for a set of simulation results or valued resources - # and filter. - # - # @overload list_attack_paths(request, options = nil) - # Pass arguments to `list_attack_paths` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_attack_paths` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list attack paths. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @param filter [::String] - # The filter expression that filters the attack path in the response. - # Supported fields: - # - # * `valued_resources` supports = - # @param page_token [::String] - # The value returned by the last `ListAttackPathsResponse`; indicates - # that this is a continuation of a prior `ListAttackPaths` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1::AttackPath>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new - # - # # Call the list_attack_paths method. - # result = client.list_attack_paths request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. - # p item - # end - # - def list_attack_paths request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_attack_paths.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_attack_paths.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_attack_paths request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_attack_paths, "attack_paths", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecurityCenter REST API. - # - # This class represents the configuration for SecurityCenter REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # bulk_mute_findings to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.bulk_mute_findings.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.bulk_mute_findings.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the SecurityCenter API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `bulk_mute_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_mute_findings - ## - # RPC-specific configuration for `create_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_security_health_analytics_custom_module - ## - # RPC-specific configuration for `create_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_source - ## - # RPC-specific configuration for `create_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_finding - ## - # RPC-specific configuration for `create_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_mute_config - ## - # RPC-specific configuration for `create_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_config - ## - # RPC-specific configuration for `delete_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_mute_config - ## - # RPC-specific configuration for `delete_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_config - ## - # RPC-specific configuration for `delete_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_simulation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_simulation - ## - # RPC-specific configuration for `get_valued_resource` - # @return [::Gapic::Config::Method] - # - attr_reader :get_valued_resource - ## - # RPC-specific configuration for `get_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :get_big_query_export - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `get_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mute_config - ## - # RPC-specific configuration for `get_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_config - ## - # RPC-specific configuration for `get_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_organization_settings - ## - # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_security_health_analytics_custom_module - ## - # RPC-specific configuration for `get_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_source - ## - # RPC-specific configuration for `group_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :group_assets - ## - # RPC-specific configuration for `group_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :group_findings - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_mute_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_mute_configs - ## - # RPC-specific configuration for `list_notification_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_configs - ## - # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sources - ## - # RPC-specific configuration for `run_asset_discovery` - # @return [::Gapic::Config::Method] - # - attr_reader :run_asset_discovery - ## - # RPC-specific configuration for `set_finding_state` - # @return [::Gapic::Config::Method] - # - attr_reader :set_finding_state - ## - # RPC-specific configuration for `set_mute` - # @return [::Gapic::Config::Method] - # - attr_reader :set_mute - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `simulate_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :simulate_security_health_analytics_custom_module - ## - # RPC-specific configuration for `update_external_system` - # @return [::Gapic::Config::Method] - # - attr_reader :update_external_system - ## - # RPC-specific configuration for `update_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_finding - ## - # RPC-specific configuration for `update_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_mute_config - ## - # RPC-specific configuration for `update_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_config - ## - # RPC-specific configuration for `update_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_organization_settings - ## - # RPC-specific configuration for `update_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_health_analytics_custom_module - ## - # RPC-specific configuration for `update_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_source - ## - # RPC-specific configuration for `update_security_marks` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_marks - ## - # RPC-specific configuration for `create_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :create_big_query_export - ## - # RPC-specific configuration for `delete_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_big_query_export - ## - # RPC-specific configuration for `update_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :update_big_query_export - ## - # RPC-specific configuration for `list_big_query_exports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_big_query_exports - ## - # RPC-specific configuration for `create_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_event_threat_detection_custom_module - ## - # RPC-specific configuration for `delete_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_event_threat_detection_custom_module - ## - # RPC-specific configuration for `get_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_event_threat_detection_custom_module - ## - # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `list_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `update_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_event_threat_detection_custom_module - ## - # RPC-specific configuration for `validate_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :validate_event_threat_detection_custom_module - ## - # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_event_threat_detection_custom_module - ## - # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `batch_create_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_resource_value_configs - ## - # RPC-specific configuration for `delete_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_resource_value_config - ## - # RPC-specific configuration for `get_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_resource_value_config - ## - # RPC-specific configuration for `list_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_value_configs - ## - # RPC-specific configuration for `update_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_resource_value_config - ## - # RPC-specific configuration for `list_valued_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_valued_resources - ## - # RPC-specific configuration for `list_attack_paths` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attack_paths - - # @private - def initialize parent_rpcs = nil - bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings - @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config - create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module - @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config - create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source - @create_source = ::Gapic::Config::Method.new create_source_config - create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding - @create_finding = ::Gapic::Config::Method.new create_finding_config - create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config - @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config - create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config - @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config - delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config - @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config - delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config - @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config - delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module - @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config - get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation - @get_simulation = ::Gapic::Config::Method.new get_simulation_config - get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource - @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config - get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export - @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config - @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config - get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config - @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config - get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings - @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config - get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module - @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config - get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module - @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config - get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source - @get_source = ::Gapic::Config::Method.new get_source_config - group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets - @group_assets = ::Gapic::Config::Method.new group_assets_config - group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings - @group_findings = ::Gapic::Config::Method.new group_findings_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules - @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs - @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config - list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs - @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config - list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules - @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config - list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules - @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config - list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources - @list_sources = ::Gapic::Config::Method.new list_sources_config - run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery - @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config - set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state - @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config - set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute - @set_mute = ::Gapic::Config::Method.new set_mute_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module - @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config - update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system - @update_external_system = ::Gapic::Config::Method.new update_external_system_config - update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding - @update_finding = ::Gapic::Config::Method.new update_finding_config - update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config - @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config - update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config - @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config - update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings - @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config - update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module - @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config - update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source - @update_source = ::Gapic::Config::Method.new update_source_config - update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks - @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config - create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export - @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config - delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export - @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config - update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export - @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config - list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports - @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config - create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module - @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config - delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module - @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config - get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module - @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config - list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules - @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config - list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules - @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config - update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module - @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config - validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module - @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config - get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module - @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config - list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules - @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config - batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs - @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config - delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config - @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config - get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config - @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config - list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs - @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config - update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config - @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config - list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources - @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config - list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths - @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb deleted file mode 100644 index dd74065d2724..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/operations.rb +++ /dev/null @@ -1,926 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the SecurityCenter Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb deleted file mode 100644 index 6b84754bb951..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/security_center/rest/service_stub.rb +++ /dev/null @@ -1,4766 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/securitycenter/v1/securitycenter_service_pb" - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - module Rest - ## - # REST service stub for the SecurityCenter service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the bulk_mute_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def bulk_mute_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_mute_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "bulk_mute_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def create_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # A result object deserialized from the server's reply - def create_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # A result object deserialized from the server's reply - def create_finding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_finding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_finding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # A result object deserialized from the server's reply - def create_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # A result object deserialized from the server's reply - def create_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_simulation REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Simulation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Simulation] - # A result object deserialized from the server's reply - def get_simulation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_simulation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_simulation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Simulation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_valued_resource REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource] - # A result object deserialized from the server's reply - def get_valued_resource request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_valued_resource_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_valued_resource", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ValuedResource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # A result object deserialized from the server's reply - def get_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # A result object deserialized from the server's reply - def get_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # A result object deserialized from the server's reply - def get_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # A result object deserialized from the server's reply - def get_organization_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_organization_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_organization_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_effective_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def get_effective_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_effective_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def get_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # A result object deserialized from the server's reply - def get_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the group_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse] - # A result object deserialized from the server's reply - def group_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_group_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "group_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the group_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse] - # A result object deserialized from the server's reply - def group_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_group_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "group_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse] - # A result object deserialized from the server's reply - def list_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_descendant_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] - # A result object deserialized from the server's reply - def list_descendant_security_health_analytics_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_descendant_security_health_analytics_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse] - # A result object deserialized from the server's reply - def list_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_mute_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse] - # A result object deserialized from the server's reply - def list_mute_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_mute_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_mute_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_notification_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse] - # A result object deserialized from the server's reply - def list_notification_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_notification_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_effective_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] - # A result object deserialized from the server's reply - def list_effective_security_health_analytics_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_security_health_analytics_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_effective_security_health_analytics_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse] - # A result object deserialized from the server's reply - def list_security_health_analytics_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_security_health_analytics_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_security_health_analytics_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_sources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListSourcesResponse] - # A result object deserialized from the server's reply - def list_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the run_asset_discovery REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def run_asset_discovery request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_asset_discovery_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_asset_discovery", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_finding_state REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # A result object deserialized from the server's reply - def set_finding_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_finding_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_finding_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_mute REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetMuteRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # A result object deserialized from the server's reply - def set_mute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_mute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_mute", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the simulate_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # A result object deserialized from the server's reply - def simulate_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_simulate_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "simulate_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_external_system REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # A result object deserialized from the server's reply - def update_external_system request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_external_system_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_external_system", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # A result object deserialized from the server's reply - def update_finding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_finding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_finding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # A result object deserialized from the server's reply - def update_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # A result object deserialized from the server's reply - def update_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # A result object deserialized from the server's reply - def update_organization_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_organization_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_organization_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def update_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # A result object deserialized from the server's reply - def update_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_security_marks REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # A result object deserialized from the server's reply - def update_security_marks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_security_marks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_security_marks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # A result object deserialized from the server's reply - def create_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # A result object deserialized from the server's reply - def update_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_big_query_exports REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse] - # A result object deserialized from the server's reply - def list_big_query_exports request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_big_query_exports_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_big_query_exports", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def create_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def get_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_descendant_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse] - # A result object deserialized from the server's reply - def list_descendant_event_threat_detection_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_descendant_event_threat_detection_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse] - # A result object deserialized from the server's reply - def list_event_threat_detection_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_event_threat_detection_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_event_threat_detection_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def update_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the validate_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse] - # A result object deserialized from the server's reply - def validate_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_validate_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "validate_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_effective_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def get_effective_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_effective_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_effective_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] - # A result object deserialized from the server's reply - def list_effective_event_threat_detection_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_event_threat_detection_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_effective_event_threat_detection_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_create_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse] - # A result object deserialized from the server's reply - def batch_create_resource_value_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_resource_value_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_create_resource_value_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_resource_value_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_resource_value_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_resource_value_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # A result object deserialized from the server's reply - def get_resource_value_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_value_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_resource_value_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse] - # A result object deserialized from the server's reply - def list_resource_value_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_value_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_resource_value_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # A result object deserialized from the server's reply - def update_resource_value_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_resource_value_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_resource_value_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_valued_resources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse] - # A result object deserialized from the server's reply - def list_valued_resources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_valued_resources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_valued_resources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_attack_paths REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse] - # A result object deserialized from the server's reply - def list_attack_paths request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_attack_paths_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_attack_paths", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_mute_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_mute_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "security_health_analytics_custom_module", - matches: [ - ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "security_health_analytics_custom_module", - matches: [ - ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "security_health_analytics_custom_module", - matches: [ - ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/sources", - body: "source", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateFindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_finding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings", - body: "finding", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_simulation REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSimulationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_simulation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_valued_resource REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_valued_resource_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_organization_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/organizationSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_effective_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_effective_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the group_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_group_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets:group", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets:group", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets:group", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the group_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_group_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assets", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assets", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assets", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_descendant_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/findings", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/findings", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/findings", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_mute_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_mute_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/muteConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/muteConfigs", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/muteConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_notification_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_notification_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_effective_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_effective_security_health_analytics_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_security_health_analytics_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/sources", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/sources", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/sources", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_asset_discovery REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_asset_discovery_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assets:runDiscovery", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_finding_state REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_finding_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setState", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setState", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setState", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_mute REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SetMuteRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_mute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the simulate_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_simulate_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules:simulate", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules:simulate", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules:simulate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/securityHealthAnalyticsSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_external_system REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_external_system_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_finding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^folders/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^projects/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_organization_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{organization_settings.name}", - body: "organization_settings", - matches: [ - ["organization_settings.name", %r{^organizations/[^/]+/organizationSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_health_analytics_custom_module.name}", - body: "security_health_analytics_custom_module", - matches: [ - ["security_health_analytics_custom_module.name", %r{^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_health_analytics_custom_module.name}", - body: "security_health_analytics_custom_module", - matches: [ - ["security_health_analytics_custom_module.name", %r{^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_health_analytics_custom_module.name}", - body: "security_health_analytics_custom_module", - matches: [ - ["security_health_analytics_custom_module.name", %r{^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{source.name}", - body: "source", - matches: [ - ["source.name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_security_marks REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_security_marks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^organizations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^folders/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^projects/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_big_query_exports REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_big_query_exports_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "event_threat_detection_custom_module", - matches: [ - ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "event_threat_detection_custom_module", - matches: [ - ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customModules", - body: "event_threat_detection_custom_module", - matches: [ - ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_descendant_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules:listDescendant", - matches: [ - ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_event_threat_detection_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customModules", - matches: [ - ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{event_threat_detection_custom_module.name}", - body: "event_threat_detection_custom_module", - matches: [ - ["event_threat_detection_custom_module.name", %r{^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{event_threat_detection_custom_module.name}", - body: "event_threat_detection_custom_module", - matches: [ - ["event_threat_detection_custom_module.name", %r{^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{event_threat_detection_custom_module.name}", - body: "event_threat_detection_custom_module", - matches: [ - ["event_threat_detection_custom_module.name", %r{^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the validate_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_validate_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:validateCustomModule", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:validateCustomModule", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:validateCustomModule", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_effective_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_effective_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_effective_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_effective_event_threat_detection_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^organizations/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^folders/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveCustomModules", - matches: [ - ["parent", %r{^projects/[^/]+/eventThreatDetectionSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_create_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_create_resource_value_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/resourceValueConfigs:batchCreate", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_resource_value_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_resource_value_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_resource_value_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/resourceValueConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_resource_value_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{resource_value_config.name}", - body: "resource_value_config", - matches: [ - ["resource_value_config.name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_valued_resources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_valued_resources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/valuedResources", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/valuedResources", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_attack_paths REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_attack_paths_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb deleted file mode 100644 index 1c19ab7f4c05..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/security_center/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb deleted file mode 100644 index 65cfc17f9bbb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/access_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/access.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/securitycenter/v1/access.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x89\x03\n\x06\x41\x63\x63\x65ss\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x11\n\tcaller_ip\x18\x02 \x01(\t\x12\x42\n\rcaller_ip_geo\x18\x03 \x01(\x0b\x32+.google.cloud.securitycenter.v1.Geolocation\x12\x19\n\x11user_agent_family\x18\x04 \x01(\t\x12\x12\n\nuser_agent\x18\x0c \x01(\t\x12\x14\n\x0cservice_name\x18\x05 \x01(\t\x12\x13\n\x0bmethod_name\x18\x06 \x01(\t\x12\x19\n\x11principal_subject\x18\x07 \x01(\t\x12 \n\x18service_account_key_name\x18\x08 \x01(\t\x12\x65\n\x1fservice_account_delegation_info\x18\t \x03(\x0b\x32<.google.cloud.securitycenter.v1.ServiceAccountDelegationInfo\x12\x11\n\tuser_name\x18\x0b \x01(\t\"R\n\x1cServiceAccountDelegationInfo\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x19\n\x11principal_subject\x18\x02 \x01(\t\"\"\n\x0bGeolocation\x12\x13\n\x0bregion_code\x18\x01 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v1B\x0b\x41\x63\x63\x65ssProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Access = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Access").msgclass - ServiceAccountDelegationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ServiceAccountDelegationInfo").msgclass - Geolocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Geolocation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb deleted file mode 100644 index 4798bdd4a508..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_anomaly_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/agent_anomaly.proto - -require 'google/protobuf' - - -descriptor_data = "\n2google/cloud/securitycenter/v1/agent_anomaly.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xcc\x01\n\x0c\x41gentAnomaly\x12\x18\n\x10\x63onfidence_score\x18\x01 \x01(\x01\x12N\n\x13\x64\x65tector_references\x18\x02 \x03(\x0b\x32\x31.google.cloud.securitycenter.v1.DetectorReference\x12R\n\x15invocation_references\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v1.InvocationReference\"\x8c\x02\n\x11\x44\x65tectorReference\x12L\n\x08severity\x18\x01 \x01(\x0e\x32:.google.cloud.securitycenter.v1.DetectorReference.Severity\x12\x13\n\x0b\x64\x65tector_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x65xplanation\x18\x04 \x01(\t\x12\x16\n\x0erecommendation\x18\x05 \x01(\t\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\",\n\x13InvocationReference\x12\x15\n\rinvocation_id\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11\x41gentAnomalyProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - AgentAnomaly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AgentAnomaly").msgclass - DetectorReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DetectorReference").msgclass - DetectorReference::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DetectorReference.Severity").enummodule - InvocationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.InvocationReference").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb deleted file mode 100644 index 8663de889b80..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/agent.proto - -require 'google/protobuf' - - -descriptor_data = "\n*google/cloud/securitycenter/v1/agent.proto\x12\x1egoogle.cloud.securitycenter.v1\")\n\x05\x41gent\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\tB\xe4\x01\n\"com.google.cloud.securitycenter.v1B\nAgentProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Agent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Agent").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb deleted file mode 100644 index a342edc533b8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/agent_session_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/agent_session.proto - -require 'google/protobuf' - - -descriptor_data = "\n2google/cloud/securitycenter/v1/agent_session.proto\x12\x1egoogle.cloud.securitycenter.v1\"\"\n\x0c\x41gentSession\x12\x12\n\nsession_id\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11\x41gentSessionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - AgentSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AgentSession").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb deleted file mode 100644 index 716a87e5400a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/application_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/application.proto - -require 'google/protobuf' - - -descriptor_data = "\n0google/cloud/securitycenter/v1/application.proto\x12\x1egoogle.cloud.securitycenter.v1\"1\n\x0b\x41pplication\x12\x10\n\x08\x62\x61se_uri\x18\x01 \x01(\t\x12\x10\n\x08\x66ull_uri\x18\x02 \x01(\tB\xea\x01\n\"com.google.cloud.securitycenter.v1B\x10\x41pplicationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Application = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Application").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb deleted file mode 100644 index 7bbe0a82baf9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/asset_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/asset.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v1/folder_pb' -require 'google/cloud/securitycenter/v1/security_marks_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/cloud/securitycenter/v1/asset.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v1/folder.proto\x1a\x33google/cloud/securitycenter/v1/security_marks.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb8\x08\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x62\n\x1asecurity_center_properties\x18\x02 \x01(\x0b\x32>.google.cloud.securitycenter.v1.Asset.SecurityCenterProperties\x12Z\n\x13resource_properties\x18\x07 \x03(\x0b\x32=.google.cloud.securitycenter.v1.Asset.ResourcePropertiesEntry\x12\x45\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarks\x12/\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\niam_policy\x18\x0b \x01(\x0b\x32/.google.cloud.securitycenter.v1.Asset.IamPolicy\x12\x16\n\x0e\x63\x61nonical_name\x18\r \x01(\t\x1a\xb9\x02\n\x18SecurityCenterProperties\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x17\n\x0fresource_parent\x18\x03 \x01(\t\x12\x18\n\x10resource_project\x18\x04 \x01(\t\x12\x17\n\x0fresource_owners\x18\x05 \x03(\t\x12\x1d\n\x15resource_display_name\x18\x06 \x01(\t\x12$\n\x1cresource_parent_display_name\x18\x07 \x01(\t\x12%\n\x1dresource_project_display_name\x18\x08 \x01(\t\x12\x37\n\x07\x66olders\x18\n \x03(\x0b\x32&.google.cloud.securitycenter.v1.Folder\x1a \n\tIamPolicy\x12\x13\n\x0bpolicy_blob\x18\x01 \x01(\t\x1aQ\n\x17ResourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01:\xa9\x01\xea\x41\xa5\x01\n#securitycenter.googleapis.com/Asset\x12+organizations/{organization}/assets/{asset}\x12\x1f\x66olders/{folder}/assets/{asset}\x12!projects/{project}/assets/{asset}*\x06\x61ssets2\x05\x61ssetB\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset").msgclass - Asset::SecurityCenterProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset.SecurityCenterProperties").msgclass - Asset::IamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Asset.IamPolicy").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb deleted file mode 100644 index 874c9ce74d43..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_exposure_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/attack_exposure.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v1/attack_exposure.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8a\x03\n\x0e\x41ttackExposure\x12\r\n\x05score\x18\x01 \x01(\x01\x12;\n\x17latest_calculation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1e\n\x16\x61ttack_exposure_result\x18\x03 \x01(\t\x12\x43\n\x05state\x18\x04 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.AttackExposure.State\x12*\n\"exposed_high_value_resources_count\x18\x05 \x01(\x05\x12,\n$exposed_medium_value_resources_count\x18\x06 \x01(\x05\x12)\n!exposed_low_value_resources_count\x18\x07 \x01(\x05\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nCALCULATED\x10\x01\x12\x12\n\x0eNOT_CALCULATED\x10\x02\x42\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x41ttackExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - AttackExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackExposure").msgclass - AttackExposure::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackExposure.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb deleted file mode 100644 index 9a0cc9065451..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/attack_path_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/attack_path.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n0google/cloud/securitycenter/v1/attack_path.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xe7\t\n\nAttackPath\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\npath_nodes\x18\x02 \x03(\x0b\x32\x39.google.cloud.securitycenter.v1.AttackPath.AttackPathNode\x12H\n\x05\x65\x64ges\x18\x03 \x03(\x0b\x32\x39.google.cloud.securitycenter.v1.AttackPath.AttackPathEdge\x1a\xbd\x06\n\x0e\x41ttackPathNode\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12p\n\x13\x61ssociated_findings\x18\x04 \x03(\x0b\x32S.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding\x12\x0c\n\x04uuid\x18\x05 \x01(\t\x12^\n\x0c\x61ttack_steps\x18\x06 \x03(\x0b\x32H.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode\x1a^\n\x19PathNodeAssociatedFinding\x12\x19\n\x11\x63\x61nonical_finding\x18\x01 \x01(\t\x12\x18\n\x10\x66inding_category\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x1a\xb0\x02\n\x0e\x41ttackStepNode\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12P\n\x04type\x18\x02 \x01(\x0e\x32\x42.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x64\n\x06labels\x18\x04 \x03(\x0b\x32T.google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"y\n\x08NodeType\x12\x19\n\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rNODE_TYPE_AND\x10\x01\x12\x10\n\x0cNODE_TYPE_OR\x10\x02\x12\x15\n\x11NODE_TYPE_DEFENSE\x10\x03\x12\x16\n\x12NODE_TYPE_ATTACKER\x10\x04\x1a\x35\n\x0e\x41ttackPathEdge\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x02 \x01(\t:\xba\x01\xea\x41\xb6\x01\n(securitycenter.googleapis.com/AttackPath\x12qorganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}*\x0b\x61ttackPaths2\nattackPathB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x41ttackPathProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - AttackPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath").msgclass - AttackPath::AttackPathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode").msgclass - AttackPath::AttackPathNode::PathNodeAssociatedFinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.PathNodeAssociatedFinding").msgclass - AttackPath::AttackPathNode::AttackStepNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.AttackStepNode").msgclass - AttackPath::AttackPathNode::NodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathNode.NodeType").enummodule - AttackPath::AttackPathEdge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AttackPath.AttackPathEdge").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb deleted file mode 100644 index 0e004d7fc559..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/backup_disaster_recovery_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/backup_disaster_recovery.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n=google/cloud/securitycenter/v1/backup_disaster_recovery.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x86\x02\n\x16\x42\x61\x63kupDisasterRecovery\x12\x17\n\x0f\x62\x61\x63kup_template\x18\x01 \x01(\t\x12\x10\n\x08policies\x18\x02 \x03(\t\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x14\n\x0c\x61pplications\x18\x04 \x03(\t\x12\x14\n\x0cstorage_pool\x18\x05 \x01(\t\x12\x16\n\x0epolicy_options\x18\x06 \x03(\t\x12\x0f\n\x07profile\x18\x07 \x01(\t\x12\x11\n\tappliance\x18\x08 \x01(\t\x12\x13\n\x0b\x62\x61\x63kup_type\x18\t \x01(\t\x12\x36\n\x12\x62\x61\x63kup_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xf5\x01\n\"com.google.cloud.securitycenter.v1B\x1b\x42\x61\x63kupDisasterRecoveryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - BackupDisasterRecovery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BackupDisasterRecovery").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb deleted file mode 100644 index dd2586de3962..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/bigquery_export_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/bigquery_export.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v1/bigquery_export.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xde\x03\n\x0e\x42igQueryExport\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x04 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tprincipal\x18\x08 \x01(\tB\x03\xe0\x41\x03:\xe2\x01\xea\x41\xde\x01\n,securitycenter.googleapis.com/BigQueryExport\x12\x35organizations/{organization}/bigQueryExports/{export}\x12)folders/{folder}/bigQueryExports/{export}\x12+projects/{project}/bigQueryExports/{export}*\x0f\x62igQueryExports2\x0e\x62igQueryExportB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x42igQueryExportProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BigQueryExport").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb deleted file mode 100644 index bcdd9d0754f3..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/chokepoint_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/chokepoint.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v1/chokepoint.proto\x12\x1egoogle.cloud.securitycenter.v1\"&\n\nChokepoint\x12\x18\n\x10related_findings\x18\x01 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43hokepointProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Chokepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Chokepoint").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb deleted file mode 100644 index 5d2aca35a2a8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_armor_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/cloud_armor.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n0google/cloud/securitycenter/v1/cloud_armor.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1egoogle/protobuf/duration.proto\"\xde\x02\n\nCloudArmor\x12G\n\x0fsecurity_policy\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.SecurityPolicy\x12:\n\x08requests\x18\x02 \x01(\x0b\x32(.google.cloud.securitycenter.v1.Requests\x12O\n\x13\x61\x64\x61ptive_protection\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.AdaptiveProtection\x12\x36\n\x06\x61ttack\x18\x04 \x01(\x0b\x32&.google.cloud.securitycenter.v1.Attack\x12\x15\n\rthreat_vector\x18\x05 \x01(\t\x12+\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\"=\n\x0eSecurityPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x07preview\x18\x03 \x01(\x08\"j\n\x08Requests\x12\r\n\x05ratio\x18\x01 \x01(\x01\x12\x1a\n\x12short_term_allowed\x18\x02 \x01(\x05\x12\x19\n\x11long_term_allowed\x18\x03 \x01(\x05\x12\x18\n\x10long_term_denied\x18\x04 \x01(\x05\"(\n\x12\x41\x64\x61ptiveProtection\x12\x12\n\nconfidence\x18\x01 \x01(\x01\"H\n\x06\x41ttack\x12\x12\n\nvolume_pps\x18\x01 \x01(\x05\x12\x12\n\nvolume_bps\x18\x02 \x01(\x05\x12\x16\n\x0e\x63lassification\x18\x03 \x01(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43loudArmorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - CloudArmor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudArmor").msgclass - SecurityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SecurityPolicy").msgclass - Requests = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Requests").msgclass - AdaptiveProtection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.AdaptiveProtection").msgclass - Attack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Attack").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb deleted file mode 100644 index 96dd00769215..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n;google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xb2\x02\n\x13\x43loudDlpDataProfile\x12>\n\x0c\x64\x61ta_profile\x18\x01 \x01(\tB(\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\x12S\n\x0bparent_type\x18\x02 \x01(\x0e\x32>.google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType\x12<\n\ninfo_types\x18\x03 \x03(\x0b\x32(.google.cloud.securitycenter.v1.InfoType\"H\n\nParentType\x12\x1b\n\x17PARENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cORGANIZATION\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\"v\n\x08InfoType\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12K\n\x11sensitivity_score\x18\x03 \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.SensitivityScore\"\x8a\x02\n\x10SensitivityScore\x12U\n\x05score\x18\x01 \x01(\x0e\x32\x46.google.cloud.securitycenter.v1.SensitivityScore.SensitivityScoreLevel\"\x9e\x01\n\x15SensitivityScoreLevel\x12\'\n#SENSITIVITY_SCORE_LEVEL_UNSPECIFIED\x10\x00\x12\x13\n\x0fSENSITIVITY_LOW\x10\n\x12\x17\n\x13SENSITIVITY_UNKNOWN\x10\x0c\x12\x18\n\x14SENSITIVITY_MODERATE\x10\x14\x12\x14\n\x10SENSITIVITY_HIGH\x10\x1e\x42\x94\x03\n\"com.google.cloud.securitycenter.v1B\x18\x43loudDlpDataProfileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41\x9e\x01\n#dlp.googleapis.com/TableDataProfile\x12\x30projects/{project}/tableProfiles/{table_profile}\x12\x45projects/{project}/locations/{location}/tableProfiles/{table_profile}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - CloudDlpDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpDataProfile").msgclass - CloudDlpDataProfile::ParentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpDataProfile.ParentType").enummodule - InfoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.InfoType").msgclass - SensitivityScore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SensitivityScore").msgclass - SensitivityScore::SensitivityScoreLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SensitivityScore.SensitivityScoreLevel").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb deleted file mode 100644 index 6908abf33a2c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/cloud_dlp_inspection_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/cloud_dlp_inspection.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n9google/cloud/securitycenter/v1/cloud_dlp_inspection.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\x88\x01\n\x12\x43loudDlpInspection\x12\x33\n\x0binspect_job\x18\x01 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x11\n\tinfo_type\x18\x02 \x01(\t\x12\x17\n\x0finfo_type_count\x18\x03 \x01(\x03\x12\x11\n\tfull_scan\x18\x04 \x01(\x08\x42\xf0\x02\n\"com.google.cloud.securitycenter.v1B\x17\x43loudDlpInspectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - CloudDlpInspection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudDlpInspection").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb deleted file mode 100644 index db60def7251c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/compliance_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/compliance.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v1/compliance.proto\x12\x1egoogle.cloud.securitycenter.v1\"<\n\nCompliance\x12\x10\n\x08standard\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x0b\n\x03ids\x18\x03 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43omplianceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Compliance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Compliance").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb deleted file mode 100644 index eb0b9ee52115..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/connection_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/connection.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v1/connection.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x81\x02\n\nConnection\x12\x16\n\x0e\x64\x65stination_ip\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_port\x18\x02 \x01(\x05\x12\x11\n\tsource_ip\x18\x03 \x01(\t\x12\x13\n\x0bsource_port\x18\x04 \x01(\x05\x12\x45\n\x08protocol\x18\x05 \x01(\x0e\x32\x33.google.cloud.securitycenter.v1.Connection.Protocol\"R\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x08\n\x04ICMP\x10\x01\x12\x07\n\x03TCP\x10\x06\x12\x07\n\x03UDP\x10\x11\x12\x07\n\x03GRE\x10/\x12\x07\n\x03\x45SP\x10\x32\x42\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0f\x43onnectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Connection").msgclass - Connection::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Connection.Protocol").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb deleted file mode 100644 index 82b5fea649e6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/contact_details_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/contact_details.proto - -require 'google/protobuf' - - -descriptor_data = "\n4google/cloud/securitycenter/v1/contact_details.proto\x12\x1egoogle.cloud.securitycenter.v1\"K\n\x0e\x43ontactDetails\x12\x39\n\x08\x63ontacts\x18\x01 \x03(\x0b\x32\'.google.cloud.securitycenter.v1.Contact\"\x18\n\x07\x43ontact\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x43ontactDetailsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - ContactDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ContactDetails").msgclass - Contact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Contact").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb deleted file mode 100644 index 114721a06e25..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/container_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/container.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v1/label_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/securitycenter/v1/container.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a*google/cloud/securitycenter/v1/label.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\x01\n\tContainer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08image_id\x18\x03 \x01(\t\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.google.cloud.securitycenter.v1.Label\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe8\x01\n\"com.google.cloud.securitycenter.v1B\x0e\x43ontainerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Container").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb deleted file mode 100644 index 14a2d4b30426..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/database_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/database.proto - -require 'google/protobuf' - - -descriptor_data = "\n-google/cloud/securitycenter/v1/database.proto\x12\x1egoogle.cloud.securitycenter.v1\"s\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x11\n\tuser_name\x18\x03 \x01(\t\x12\r\n\x05query\x18\x04 \x01(\t\x12\x10\n\x08grantees\x18\x05 \x03(\t\x12\x0f\n\x07version\x18\x06 \x01(\tB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rDatabaseProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Database").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb deleted file mode 100644 index b7cff88c9276..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\nSgoogle/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xc9\x05\n)EffectiveEventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12,\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12x\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32Y.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\xc8\x02\xea\x41\xc4\x02\nGsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12Yorganizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}\x12Mfolders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}\x12Oprojects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}B\x88\x02\n\"com.google.cloud.securitycenter.v1B.EffectiveEventThreatDetectionCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - EffectiveEventThreatDetectionCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule").msgclass - EffectiveEventThreatDetectionCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule.EnablementState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb deleted file mode 100644 index 398d13b78b09..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v1/security_health_analytics_custom_config_pb' - - -descriptor_data = "\nVgoogle/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aLgoogle/cloud/securitycenter/v1/security_health_analytics_custom_config.proto\"\xfd\x05\n,EffectiveSecurityHealthAnalyticsCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12H\n\rcustom_config\x18\x02 \x01(\x0b\x32,.google.cloud.securitycenter.v1.CustomConfigB\x03\xe0\x41\x03\x12{\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32\\.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\x87\x03\xea\x41\x83\x03\nJsecuritycenter.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\x12morganizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}\x12\x61\x66olders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}\x12\x63projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{effective_custom_module}B\x8b\x02\n\"com.google.cloud.securitycenter.v1B1EffectiveSecurityHealthAnalyticsCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - EffectiveSecurityHealthAnalyticsCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule").msgclass - EffectiveSecurityHealthAnalyticsCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb deleted file mode 100644 index 2b24bf1f56c4..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/event_threat_detection_custom_module.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nIgoogle/cloud/securitycenter/v1/event_threat_detection_custom_module.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x06\n EventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\'\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12_\n\x0f\x61ncestor_module\x18\x03 \x01(\tBF\xe0\x41\x03\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12j\n\x10\x65nablement_state\x18\x04 \x01(\x0e\x32P.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState\x12\x0c\n\x04type\x18\x05 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\t \x01(\tB\x03\xe0\x41\x03\"]\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tINHERITED\x10\x03:\xa4\x02\xea\x41\xa0\x02\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12Porganizations/{organization}/eventThreatDetectionSettings/customModules/{module}\x12\x44\x66olders/{folder}/eventThreatDetectionSettings/customModules/{module}\x12\x46projects/{project}/eventThreatDetectionSettings/customModules/{module}B\xff\x01\n\"com.google.cloud.securitycenter.v1B%EventThreatDetectionCustomModuleProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - EventThreatDetectionCustomModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EventThreatDetectionCustomModule").msgclass - EventThreatDetectionCustomModule::EnablementState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.EventThreatDetectionCustomModule.EnablementState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb deleted file mode 100644 index d900e952525b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto - -require 'google/protobuf' - - -descriptor_data = "\n[google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.proto\x12\x1egoogle.cloud.securitycenter.v1\"k\n\x1c\x43ustomModuleValidationErrors\x12K\n\x06\x65rrors\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v1.CustomModuleValidationError\"\xd2\x01\n\x1b\x43ustomModuleValidationError\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x12\n\nfield_path\x18\x02 \x01(\t\x12<\n\x05start\x18\x03 \x01(\x0b\x32(.google.cloud.securitycenter.v1.PositionH\x00\x88\x01\x01\x12:\n\x03\x65nd\x18\x04 \x01(\x0b\x32(.google.cloud.securitycenter.v1.PositionH\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\"6\n\x08Position\x12\x13\n\x0bline_number\x18\x01 \x01(\x05\x12\x15\n\rcolumn_number\x18\x02 \x01(\x05\x42\x8f\x02\n\"com.google.cloud.securitycenter.v1B5EventThreatDetectionCustomModuleValidationErrorsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - CustomModuleValidationErrors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CustomModuleValidationErrors").msgclass - CustomModuleValidationError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CustomModuleValidationError").msgclass - Position = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Position").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb deleted file mode 100644 index f444b911b8fd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/exfiltration_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/exfiltration.proto - -require 'google/protobuf' - - -descriptor_data = "\n1google/cloud/securitycenter/v1/exfiltration.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xaf\x01\n\x0c\x45xfiltration\x12>\n\x07sources\x18\x01 \x03(\x0b\x32-.google.cloud.securitycenter.v1.ExfilResource\x12>\n\x07targets\x18\x02 \x03(\x0b\x32-.google.cloud.securitycenter.v1.ExfilResource\x12\x1f\n\x17total_exfiltrated_bytes\x18\x03 \x01(\x03\"1\n\rExfilResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ncomponents\x18\x02 \x03(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11\x45xfiltrationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Exfiltration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Exfiltration").msgclass - ExfilResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExfilResource").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb deleted file mode 100644 index 637251a7df01..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_exposure_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/external_exposure.proto - -require 'google/protobuf' - -require 'google/api/field_info_pb' - - -descriptor_data = "\n6google/cloud/securitycenter/v1/external_exposure.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1bgoogle/api/field_info.proto\"\xed\x02\n\x10\x45xternalExposure\x12$\n\x12private_ip_address\x18\x01 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x14\n\x0cprivate_port\x18\x02 \x01(\t\x12\x17\n\x0f\x65xposed_service\x18\x03 \x01(\t\x12#\n\x11public_ip_address\x18\x04 \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04\x12\x13\n\x0bpublic_port\x18\x05 \x01(\t\x12\x18\n\x10\x65xposed_endpoint\x18\x06 \x01(\t\x12%\n\x1dload_balancer_firewall_policy\x18\x07 \x01(\t\x12\x1f\n\x17service_firewall_policy\x18\x08 \x01(\t\x12\x17\n\x0f\x66orwarding_rule\x18\t \x01(\t\x12\x17\n\x0f\x62\x61\x63kend_service\x18\n \x01(\t\x12\x16\n\x0einstance_group\x18\x0b \x01(\t\x12\x1e\n\x16network_endpoint_group\x18\x0c \x01(\tB\xef\x01\n\"com.google.cloud.securitycenter.v1B\x15\x45xternalExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - ExternalExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalExposure").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb deleted file mode 100644 index 6b43636594f3..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/external_system_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/external_system.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v1/external_system.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa3\x07\n\x0e\x45xternalSystem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tassignees\x18\x02 \x03(\t\x12\x14\n\x0c\x65xternal_uid\x18\x03 \x01(\t\x12\x0e\n\x06status\x18\x04 \x01(\t\x12?\n\x1b\x65xternal_system_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x63\x61se_uri\x18\x06 \x01(\t\x12\x15\n\rcase_priority\x18\x07 \x01(\t\x12,\n\x08\x63\x61se_sla\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10\x63\x61se_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63\x61se_close_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\x0bticket_info\x18\x08 \x01(\x0b\x32\x39.google.cloud.securitycenter.v1.ExternalSystem.TicketInfo\x1a\x8d\x01\n\nTicketInfo\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61ssignee\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0b\n\x03uri\x18\x04 \x01(\t\x12\x0e\n\x06status\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xe6\x02\xea\x41\xe2\x02\n,securitycenter.googleapis.com/ExternalSystem\x12\x61organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12Ufolders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12Wprojects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}*\x0f\x65xternalSystems2\x0e\x65xternalSystemB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13\x45xternalSystemProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - ExternalSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalSystem").msgclass - ExternalSystem::TicketInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ExternalSystem.TicketInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb deleted file mode 100644 index 1b28cd79a63b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/file_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/file.proto - -require 'google/protobuf' - - -descriptor_data = "\n)google/cloud/securitycenter/v1/file.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xf0\x01\n\x04\x46ile\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x03\x12\x0e\n\x06sha256\x18\x03 \x01(\t\x12\x13\n\x0bhashed_size\x18\x04 \x01(\x03\x12\x18\n\x10partially_hashed\x18\x05 \x01(\x08\x12\x10\n\x08\x63ontents\x18\x06 \x01(\t\x12@\n\tdisk_path\x18\x07 \x01(\x0b\x32-.google.cloud.securitycenter.v1.File.DiskPath\x1a\x39\n\x08\x44iskPath\x12\x16\n\x0epartition_uuid\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\tB\xe3\x01\n\"com.google.cloud.securitycenter.v1B\tFileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.File").msgclass - File::DiskPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.File.DiskPath").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb deleted file mode 100644 index d83c4821a3ab..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/finding_pb.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/finding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v1/access_pb' -require 'google/cloud/securitycenter/v1/agent_pb' -require 'google/cloud/securitycenter/v1/agent_anomaly_pb' -require 'google/cloud/securitycenter/v1/agent_session_pb' -require 'google/cloud/securitycenter/v1/application_pb' -require 'google/cloud/securitycenter/v1/attack_exposure_pb' -require 'google/cloud/securitycenter/v1/backup_disaster_recovery_pb' -require 'google/cloud/securitycenter/v1/chokepoint_pb' -require 'google/cloud/securitycenter/v1/cloud_armor_pb' -require 'google/cloud/securitycenter/v1/cloud_dlp_data_profile_pb' -require 'google/cloud/securitycenter/v1/cloud_dlp_inspection_pb' -require 'google/cloud/securitycenter/v1/compliance_pb' -require 'google/cloud/securitycenter/v1/connection_pb' -require 'google/cloud/securitycenter/v1/contact_details_pb' -require 'google/cloud/securitycenter/v1/container_pb' -require 'google/cloud/securitycenter/v1/database_pb' -require 'google/cloud/securitycenter/v1/exfiltration_pb' -require 'google/cloud/securitycenter/v1/external_exposure_pb' -require 'google/cloud/securitycenter/v1/external_system_pb' -require 'google/cloud/securitycenter/v1/file_pb' -require 'google/cloud/securitycenter/v1/group_membership_pb' -require 'google/cloud/securitycenter/v1/iam_binding_pb' -require 'google/cloud/securitycenter/v1/indicator_pb' -require 'google/cloud/securitycenter/v1/kernel_rootkit_pb' -require 'google/cloud/securitycenter/v1/kubernetes_pb' -require 'google/cloud/securitycenter/v1/load_balancer_pb' -require 'google/cloud/securitycenter/v1/log_entry_pb' -require 'google/cloud/securitycenter/v1/mitre_attack_pb' -require 'google/cloud/securitycenter/v1/notebook_pb' -require 'google/cloud/securitycenter/v1/org_policy_pb' -require 'google/cloud/securitycenter/v1/process_pb' -require 'google/cloud/securitycenter/v1/security_marks_pb' -require 'google/cloud/securitycenter/v1/security_posture_pb' -require 'google/cloud/securitycenter/v1/toxic_combination_pb' -require 'google/cloud/securitycenter/v1/vulnerability_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/securitycenter/v1/finding.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v1/access.proto\x1a*google/cloud/securitycenter/v1/agent.proto\x1a\x32google/cloud/securitycenter/v1/agent_anomaly.proto\x1a\x32google/cloud/securitycenter/v1/agent_session.proto\x1a\x30google/cloud/securitycenter/v1/application.proto\x1a\x34google/cloud/securitycenter/v1/attack_exposure.proto\x1a=google/cloud/securitycenter/v1/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v1/chokepoint.proto\x1a\x30google/cloud/securitycenter/v1/cloud_armor.proto\x1a;google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v1/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v1/compliance.proto\x1a/google/cloud/securitycenter/v1/connection.proto\x1a\x34google/cloud/securitycenter/v1/contact_details.proto\x1a.google/cloud/securitycenter/v1/container.proto\x1a-google/cloud/securitycenter/v1/database.proto\x1a\x31google/cloud/securitycenter/v1/exfiltration.proto\x1a\x36google/cloud/securitycenter/v1/external_exposure.proto\x1a\x34google/cloud/securitycenter/v1/external_system.proto\x1a)google/cloud/securitycenter/v1/file.proto\x1a\x35google/cloud/securitycenter/v1/group_membership.proto\x1a\x30google/cloud/securitycenter/v1/iam_binding.proto\x1a.google/cloud/securitycenter/v1/indicator.proto\x1a\x33google/cloud/securitycenter/v1/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v1/kubernetes.proto\x1a\x32google/cloud/securitycenter/v1/load_balancer.proto\x1a.google/cloud/securitycenter/v1/log_entry.proto\x1a\x31google/cloud/securitycenter/v1/mitre_attack.proto\x1a-google/cloud/securitycenter/v1/notebook.proto\x1a/google/cloud/securitycenter/v1/org_policy.proto\x1a,google/cloud/securitycenter/v1/process.proto\x1a\x33google/cloud/securitycenter/v1/security_marks.proto\x1a\x35google/cloud/securitycenter/v1/security_posture.proto\x1a\x36google/cloud/securitycenter/v1/toxic_combination.proto\x1a\x32google/cloud/securitycenter/v1/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99$\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\t\x12<\n\x05state\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v1.Finding.State\x12\x10\n\x08\x63\x61tegory\x18\x05 \x01(\t\x12\x14\n\x0c\x65xternal_uri\x18\x06 \x01(\t\x12X\n\x11source_properties\x18\x07 \x03(\x0b\x32=.google.cloud.securitycenter.v1.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x08severity\x18\x0c \x01(\x0e\x32\x30.google.cloud.securitycenter.v1.Finding.Severity\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12K\n\rfinding_class\x18\x11 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.Finding.FindingClass\x12<\n\tindicator\x18\x12 \x01(\x0b\x32).google.cloud.securitycenter.v1.Indicator\x12\x44\n\rvulnerability\x18\x14 \x01(\x0b\x32-.google.cloud.securitycenter.v1.Vulnerability\x12\x39\n\x10mute_update_time\x18\x15 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x16 \x03(\x0b\x32<.google.cloud.securitycenter.v1.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x19 \x01(\x0b\x32+.google.cloud.securitycenter.v1.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x1a \x01(\x0b\x32&.google.cloud.securitycenter.v1.Access\x12?\n\x0b\x63onnections\x18\x1f \x03(\x0b\x32*.google.cloud.securitycenter.v1.Connection\x12\x16\n\x0emute_initiator\x18\x1c \x01(\t\x12H\n\tmute_info\x18= \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.Finding.MuteInfoB\x03\xe0\x41\x03\x12:\n\tprocesses\x18\x1e \x03(\x0b\x32\'.google.cloud.securitycenter.v1.Process\x12L\n\x08\x63ontacts\x18! \x03(\x0b\x32\x35.google.cloud.securitycenter.v1.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\" \x03(\x0b\x32*.google.cloud.securitycenter.v1.Compliance\x12 \n\x13parent_display_name\x18$ \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18% \x01(\t\x12\x42\n\x0c\x65xfiltration\x18& \x01(\x0b\x32,.google.cloud.securitycenter.v1.Exfiltration\x12@\n\x0ciam_bindings\x18\' \x03(\x0b\x32*.google.cloud.securitycenter.v1.IamBinding\x12\x12\n\nnext_steps\x18( \x01(\t\x12\x13\n\x0bmodule_name\x18) \x01(\t\x12=\n\ncontainers\x18* \x03(\x0b\x32).google.cloud.securitycenter.v1.Container\x12>\n\nkubernetes\x18+ \x01(\x0b\x32*.google.cloud.securitycenter.v1.Kubernetes\x12:\n\x08\x64\x61tabase\x18, \x01(\x0b\x32(.google.cloud.securitycenter.v1.Database\x12G\n\x0f\x61ttack_exposure\x18- \x01(\x0b\x32..google.cloud.securitycenter.v1.AttackExposure\x12\x33\n\x05\x66iles\x18. \x03(\x0b\x32$.google.cloud.securitycenter.v1.File\x12P\n\x14\x63loud_dlp_inspection\x18\x30 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18\x31 \x01(\x0b\x32\x33.google.cloud.securitycenter.v1.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18\x32 \x01(\x0b\x32-.google.cloud.securitycenter.v1.KernelRootkit\x12?\n\x0corg_policies\x18\x33 \x03(\x0b\x32).google.cloud.securitycenter.v1.OrgPolicy\x12@\n\x0b\x61pplication\x18\x35 \x01(\x0b\x32+.google.cloud.securitycenter.v1.Application\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18\x37 \x01(\x0b\x32\x36.google.cloud.securitycenter.v1.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x38 \x01(\x0b\x32/.google.cloud.securitycenter.v1.SecurityPosture\x12=\n\x0blog_entries\x18\x39 \x03(\x0b\x32(.google.cloud.securitycenter.v1.LogEntry\x12\x44\n\x0eload_balancers\x18: \x03(\x0b\x32,.google.cloud.securitycenter.v1.LoadBalancer\x12?\n\x0b\x63loud_armor\x18; \x01(\x0b\x32*.google.cloud.securitycenter.v1.CloudArmor\x12:\n\x08notebook\x18? \x01(\x0b\x32(.google.cloud.securitycenter.v1.Notebook\x12K\n\x11toxic_combination\x18@ \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ToxicCombination\x12J\n\x11group_memberships\x18\x41 \x03(\x0b\x32/.google.cloud.securitycenter.v1.GroupMembership\x12>\n\nchokepoint\x18M \x01(\x0b\x32*.google.cloud.securitycenter.v1.Chokepoint\x12K\n\x11\x65xternal_exposure\x18T \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.ExternalExposure\x12\x34\n\x05\x61gent\x18X \x01(\x0b\x32%.google.cloud.securitycenter.v1.Agent\x12\x44\n\x0e\x61gent_sessions\x18Y \x03(\x0b\x32,.google.cloud.securitycenter.v1.AgentSession\x12\x43\n\ragent_anomaly\x18Z \x01(\x0b\x32,.google.cloud.securitycenter.v1.AgentAnomaly\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.Mute\x12.\n\napply_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aX\n\x11\x44ynamicMuteRecord\x12\x13\n\x0bmute_config\x18\x01 \x01(\t\x12.\n\nmatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x66\n\x14\x45xternalSystemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ExternalSystem:\x02\x38\x01\x1a_\n\rContactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.ContactDetails:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"C\n\x04Mute\x12\x14\n\x10MUTE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\x0b\n\x07UNMUTED\x10\x02\x12\r\n\tUNDEFINED\x10\x04\"\xf0\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t\x12\x15\n\x11\x45XTERNAL_EXPOSURE\x10\n:\xee\x01\xea\x41\xea\x01\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding").msgclass - Finding::MuteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo").msgclass - Finding::MuteInfo::StaticMute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo.StaticMute").msgclass - Finding::MuteInfo::DynamicMuteRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.MuteInfo.DynamicMuteRecord").msgclass - Finding::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.State").enummodule - Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.Severity").enummodule - Finding::Mute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.Mute").enummodule - Finding::FindingClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Finding.FindingClass").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb deleted file mode 100644 index e25a1821948f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/folder_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/folder.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/securitycenter/v1/folder.proto\x12\x1egoogle.cloud.securitycenter.v1\"G\n\x06\x46older\x12\x17\n\x0fresource_folder\x18\x01 \x01(\t\x12$\n\x1cresource_folder_display_name\x18\x02 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v1B\x0b\x46olderProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Folder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Folder").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb deleted file mode 100644 index 1f47d17f32d9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/group_membership_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/group_membership.proto - -require 'google/protobuf' - - -descriptor_data = "\n5google/cloud/securitycenter/v1/group_membership.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd8\x01\n\x0fGroupMembership\x12M\n\ngroup_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.GroupMembership.GroupType\x12\x10\n\x08group_id\x18\x02 \x01(\t\"d\n\tGroupType\x12\x1a\n\x16GROUP_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cGROUP_TYPE_TOXIC_COMBINATION\x10\x01\x12\x19\n\x15GROUP_TYPE_CHOKEPOINT\x10\x03\x42\xee\x01\n\"com.google.cloud.securitycenter.v1B\x14GroupMembershipProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - GroupMembership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupMembership").msgclass - GroupMembership::GroupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupMembership.GroupType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb deleted file mode 100644 index 7a11d5d9ab1f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/iam_binding_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/iam_binding.proto - -require 'google/protobuf' - - -descriptor_data = "\n0google/cloud/securitycenter/v1/iam_binding.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xa4\x01\n\nIamBinding\x12\x41\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v1.IamBinding.Action\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x0e\n\x06member\x18\x03 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x42\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fIamBindingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - IamBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.IamBinding").msgclass - IamBinding::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.IamBinding.Action").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb deleted file mode 100644 index 6fd4289eea6b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/indicator_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/indicator.proto - -require 'google/protobuf' - - -descriptor_data = "\n.google/cloud/securitycenter/v1/indicator.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd9\x06\n\tIndicator\x12\x14\n\x0cip_addresses\x18\x01 \x03(\t\x12\x0f\n\x07\x64omains\x18\x02 \x03(\t\x12N\n\nsignatures\x18\x03 \x03(\x0b\x32:.google.cloud.securitycenter.v1.Indicator.ProcessSignature\x12\x0c\n\x04uris\x18\x04 \x03(\t\x1a\xc6\x05\n\x10ProcessSignature\x12o\n\x15memory_hash_signature\x18\x06 \x01(\x0b\x32N.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureH\x00\x12k\n\x13yara_rule_signature\x18\x07 \x01(\x0b\x32L.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureH\x00\x12`\n\x0esignature_type\x18\x08 \x01(\x0e\x32H.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType\x1a\xd6\x01\n\x13MemoryHashSignature\x12\x15\n\rbinary_family\x18\x01 \x01(\t\x12l\n\ndetections\x18\x04 \x03(\x0b\x32X.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection\x1a:\n\tDetection\x12\x0e\n\x06\x62inary\x18\x02 \x01(\t\x12\x1d\n\x15percent_pages_matched\x18\x03 \x01(\x01\x1a&\n\x11YaraRuleSignature\x12\x11\n\tyara_rule\x18\x05 \x01(\t\"d\n\rSignatureType\x12\x1e\n\x1aSIGNATURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SIGNATURE_TYPE_PROCESS\x10\x01\x12\x17\n\x13SIGNATURE_TYPE_FILE\x10\x02\x42\x0b\n\tsignatureB\xe8\x01\n\"com.google.cloud.securitycenter.v1B\x0eIndicatorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Indicator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator").msgclass - Indicator::ProcessSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature").msgclass - Indicator::ProcessSignature::MemoryHashSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature").msgclass - Indicator::ProcessSignature::MemoryHashSignature::Detection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection").msgclass - Indicator::ProcessSignature::YaraRuleSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature").msgclass - Indicator::ProcessSignature::SignatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb deleted file mode 100644 index 20e8cb2e66b9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kernel_rootkit_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/kernel_rootkit.proto - -require 'google/protobuf' - - -descriptor_data = "\n3google/cloud/securitycenter/v1/kernel_rootkit.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xd7\x02\n\rKernelRootkit\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x1cunexpected_code_modification\x18\x02 \x01(\x08\x12.\n&unexpected_read_only_data_modification\x18\x03 \x01(\x08\x12!\n\x19unexpected_ftrace_handler\x18\x04 \x01(\x08\x12!\n\x19unexpected_kprobe_handler\x18\x05 \x01(\x08\x12$\n\x1cunexpected_kernel_code_pages\x18\x06 \x01(\x08\x12&\n\x1eunexpected_system_call_handler\x18\x07 \x01(\x08\x12$\n\x1cunexpected_interrupt_handler\x18\x08 \x01(\x08\x12(\n unexpected_processes_in_runqueue\x18\t \x01(\x08\x42\xec\x01\n\"com.google.cloud.securitycenter.v1B\x12KernelRootkitProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - KernelRootkit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.KernelRootkit").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb deleted file mode 100644 index 469575235393..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/kubernetes_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/kubernetes.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v1/container_pb' -require 'google/cloud/securitycenter/v1/label_pb' - - -descriptor_data = "\n/google/cloud/securitycenter/v1/kubernetes.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a.google/cloud/securitycenter/v1/container.proto\x1a*google/cloud/securitycenter/v1/label.proto\"\x82\x0c\n\nKubernetes\x12<\n\x04pods\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.Kubernetes.Pod\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Node\x12G\n\nnode_pools\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v1.Kubernetes.NodePool\x12>\n\x05roles\x18\x04 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Role\x12\x44\n\x08\x62indings\x18\x05 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.Kubernetes.Binding\x12O\n\x0e\x61\x63\x63\x65ss_reviews\x18\x06 \x03(\x0b\x32\x37.google.cloud.securitycenter.v1.Kubernetes.AccessReview\x12\x42\n\x07objects\x18\x07 \x03(\x0b\x32\x31.google.cloud.securitycenter.v1.Kubernetes.Object\x1a\x95\x01\n\x03Pod\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x35\n\x06labels\x18\x03 \x03(\x0b\x32%.google.cloud.securitycenter.v1.Label\x12=\n\ncontainers\x18\x04 \x03(\x0b\x32).google.cloud.securitycenter.v1.Container\x1a\x14\n\x04Node\x12\x0c\n\x04name\x18\x01 \x01(\t\x1aX\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Node\x1a\x9e\x01\n\x04Role\x12\x42\n\x04kind\x18\x01 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1.Kubernetes.Role.Kind\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"8\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x08\n\x04ROLE\x10\x01\x12\x10\n\x0c\x43LUSTER_ROLE\x10\x02\x1a\xa8\x01\n\x07\x42inding\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12=\n\x04role\x18\x03 \x01(\x0b\x32/.google.cloud.securitycenter.v1.Kubernetes.Role\x12\x44\n\x08subjects\x18\x04 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.Kubernetes.Subject\x1a\xbe\x01\n\x07Subject\x12I\n\x04kind\x18\x01 \x01(\x0e\x32;.google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"N\n\x08\x41uthType\x12\x19\n\x15\x41UTH_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x12\n\x0eSERVICEACCOUNT\x10\x02\x12\t\n\x05GROUP\x10\x03\x1a}\n\x0c\x41\x63\x63\x65ssReview\x12\r\n\x05group\x18\x01 \x01(\t\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x13\n\x0bsubresource\x18\x05 \x01(\t\x12\x0c\n\x04verb\x18\x06 \x01(\t\x12\x0f\n\x07version\x18\x07 \x01(\t\x1a~\n\x06Object\x12\r\n\x05group\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\n\n\x02ns\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12=\n\ncontainers\x18\x05 \x03(\x0b\x32).google.cloud.securitycenter.v1.ContainerB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fKubernetesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Kubernetes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes").msgclass - Kubernetes::Pod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Pod").msgclass - Kubernetes::Node = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Node").msgclass - Kubernetes::NodePool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.NodePool").msgclass - Kubernetes::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Role").msgclass - Kubernetes::Role::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Role.Kind").enummodule - Kubernetes::Binding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Binding").msgclass - Kubernetes::Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Subject").msgclass - Kubernetes::Subject::AuthType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType").enummodule - Kubernetes::AccessReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.AccessReview").msgclass - Kubernetes::Object = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Kubernetes.Object").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb deleted file mode 100644 index 814fe4dfd80b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/label_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/label.proto - -require 'google/protobuf' - - -descriptor_data = "\n*google/cloud/securitycenter/v1/label.proto\x12\x1egoogle.cloud.securitycenter.v1\"$\n\x05Label\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB\xe4\x01\n\"com.google.cloud.securitycenter.v1B\nLabelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Label").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb deleted file mode 100644 index 486b320844ef..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/load_balancer_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/load_balancer.proto - -require 'google/protobuf' - - -descriptor_data = "\n2google/cloud/securitycenter/v1/load_balancer.proto\x12\x1egoogle.cloud.securitycenter.v1\"\x1c\n\x0cLoadBalancer\x12\x0c\n\x04name\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v1B\x11LoadBalancerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - LoadBalancer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.LoadBalancer").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb deleted file mode 100644 index edec9da51f37..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/log_entry_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/log_entry.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/securitycenter/v1/log_entry.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"i\n\x08LogEntry\x12P\n\x13\x63loud_logging_entry\x18\x01 \x01(\x0b\x32\x31.google.cloud.securitycenter.v1.CloudLoggingEntryH\x00\x42\x0b\n\tlog_entry\"\x81\x01\n\x11\x43loudLoggingEntry\x12\x11\n\tinsert_id\x18\x01 \x01(\t\x12\x0e\n\x06log_id\x18\x02 \x01(\t\x12\x1a\n\x12resource_container\x18\x03 \x01(\t\x12-\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rLogEntryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.LogEntry").msgclass - CloudLoggingEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CloudLoggingEntry").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb deleted file mode 100644 index 76a147892b01..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mitre_attack_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/mitre_attack.proto - -require 'google/protobuf' - - -descriptor_data = "\n1google/cloud/securitycenter/v1/mitre_attack.proto\x12\x1egoogle.cloud.securitycenter.v1\"\xbc\x13\n\x0bMitreAttack\x12J\n\x0eprimary_tactic\x18\x01 \x01(\x0e\x32\x32.google.cloud.securitycenter.v1.MitreAttack.Tactic\x12Q\n\x12primary_techniques\x18\x02 \x03(\x0e\x32\x35.google.cloud.securitycenter.v1.MitreAttack.Technique\x12N\n\x12\x61\x64\x64itional_tactics\x18\x03 \x03(\x0e\x32\x32.google.cloud.securitycenter.v1.MitreAttack.Tactic\x12T\n\x15\x61\x64\x64itional_techniques\x18\x04 \x03(\x0e\x32\x35.google.cloud.securitycenter.v1.MitreAttack.Technique\x12\x0f\n\x07version\x18\x05 \x01(\t\"\xb4\x02\n\x06Tactic\x12\x16\n\x12TACTIC_UNSPECIFIED\x10\x00\x12\x12\n\x0eRECONNAISSANCE\x10\x01\x12\x18\n\x14RESOURCE_DEVELOPMENT\x10\x02\x12\x12\n\x0eINITIAL_ACCESS\x10\x05\x12\r\n\tEXECUTION\x10\x03\x12\x0f\n\x0bPERSISTENCE\x10\x06\x12\x18\n\x14PRIVILEGE_ESCALATION\x10\x08\x12\x13\n\x0f\x44\x45\x46\x45NSE_EVASION\x10\x07\x12\x15\n\x11\x43REDENTIAL_ACCESS\x10\t\x12\r\n\tDISCOVERY\x10\n\x12\x14\n\x10LATERAL_MOVEMENT\x10\x0b\x12\x0e\n\nCOLLECTION\x10\x0c\x12\x17\n\x13\x43OMMAND_AND_CONTROL\x10\x04\x12\x10\n\x0c\x45XFILTRATION\x10\r\x12\n\n\x06IMPACT\x10\x0e\"\x9f\x0e\n\tTechnique\x12\x19\n\x15TECHNIQUE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMASQUERADING\x10\x31\x12%\n!MATCH_LEGITIMATE_NAME_OR_LOCATION\x10\x32\x12(\n$BOOT_OR_LOGON_INITIALIZATION_SCRIPTS\x10%\x12\x11\n\rSTARTUP_ITEMS\x10&\x12\x1d\n\x19NETWORK_SERVICE_DISCOVERY\x10 \x12\x15\n\x11PROCESS_DISCOVERY\x10\x38\x12%\n!COMMAND_AND_SCRIPTING_INTERPRETER\x10\x06\x12\x0e\n\nUNIX_SHELL\x10\x07\x12\n\n\x06PYTHON\x10;\x12)\n%EXPLOITATION_FOR_PRIVILEGE_ESCALATION\x10?\x12\x1f\n\x1bPERMISSION_GROUPS_DISCOVERY\x10\x12\x12\x10\n\x0c\x43LOUD_GROUPS\x10\x13\x12#\n\x1fINDICATOR_REMOVAL_FILE_DELETION\x10@\x12\x1e\n\x1a\x41PPLICATION_LAYER_PROTOCOL\x10-\x12\x07\n\x03\x44NS\x10.\x12\x1d\n\x19SOFTWARE_DEPLOYMENT_TOOLS\x10/\x12\x12\n\x0eVALID_ACCOUNTS\x10\x0e\x12\x14\n\x10\x44\x45\x46\x41ULT_ACCOUNTS\x10#\x12\x12\n\x0eLOCAL_ACCOUNTS\x10\x0f\x12\x12\n\x0e\x43LOUD_ACCOUNTS\x10\x10\x12\t\n\x05PROXY\x10\t\x12\x12\n\x0e\x45XTERNAL_PROXY\x10\n\x12\x13\n\x0fMULTI_HOP_PROXY\x10\x0b\x12\x18\n\x14\x41\x43\x43OUNT_MANIPULATION\x10\x16\x12 \n\x1c\x41\x44\x44ITIONAL_CLOUD_CREDENTIALS\x10(\x12\x17\n\x13SSH_AUTHORIZED_KEYS\x10\x17\x12&\n\"ADDITIONAL_CONTAINER_CLUSTER_ROLES\x10:\x12\x19\n\x15INGRESS_TOOL_TRANSFER\x10\x03\x12\x0e\n\nNATIVE_API\x10\x04\x12\x0f\n\x0b\x42RUTE_FORCE\x10,\x12\x12\n\x0eSHARED_MODULES\x10\x05\x12\x1d\n\x19\x41\x43\x43\x45SS_TOKEN_MANIPULATION\x10!\x12 \n\x1cTOKEN_IMPERSONATION_OR_THEFT\x10\'\x12%\n!EXPLOIT_PUBLIC_FACING_APPLICATION\x10\x1b\x12\x1e\n\x1a\x44OMAIN_POLICY_MODIFICATION\x10\x1e\x12\x14\n\x10\x44\x41TA_DESTRUCTION\x10\x1d\x12\x10\n\x0cSERVICE_STOP\x10\x34\x12\x1b\n\x17INHIBIT_SYSTEM_RECOVERY\x10$\x12\x16\n\x12RESOURCE_HIJACKING\x10\x08\x12\x1d\n\x19NETWORK_DENIAL_OF_SERVICE\x10\x11\x12\x1b\n\x17\x43LOUD_SERVICE_DISCOVERY\x10\x30\x12\"\n\x1eSTEAL_APPLICATION_ACCESS_TOKEN\x10*\x12\x1a\n\x16\x41\x43\x43OUNT_ACCESS_REMOVAL\x10\x33\x12\x1c\n\x18STEAL_WEB_SESSION_COOKIE\x10\x19\x12#\n\x1f\x43REATE_OR_MODIFY_SYSTEM_PROCESS\x10\x18\x12%\n!ABUSE_ELEVATION_CONTROL_MECHANISM\x10\"\x12\x19\n\x15UNSECURED_CREDENTIALS\x10\r\x12!\n\x1dMODIFY_AUTHENTICATION_PROCESS\x10\x1c\x12\x13\n\x0fIMPAIR_DEFENSES\x10\x1f\x12\x1b\n\x17\x44ISABLE_OR_MODIFY_TOOLS\x10\x37\x12!\n\x1d\x45XFILTRATION_OVER_WEB_SERVICE\x10\x14\x12!\n\x1d\x45XFILTRATION_TO_CLOUD_STORAGE\x10\x15\x12\x16\n\x12\x44YNAMIC_RESOLUTION\x10\x0c\x12\x19\n\x15LATERAL_TOOL_TRANSFER\x10)\x12\'\n#MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE\x10\x1a\x12\x13\n\x0f\x43REATE_SNAPSHOT\x10\x36\x12\"\n\x1e\x43LOUD_INFRASTRUCTURE_DISCOVERY\x10\x35\x12\x17\n\x13OBTAIN_CAPABILITIES\x10+\x12\x13\n\x0f\x41\x43TIVE_SCANNING\x10\x01\x12\x16\n\x12SCANNING_IP_BLOCKS\x10\x02\x12$\n CONTAINER_ADMINISTRATION_COMMAND\x10<\x12\x12\n\x0e\x45SCAPE_TO_HOST\x10=\x12$\n CONTAINER_AND_RESOURCE_DISCOVERY\x10\x39\x12.\n*STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES\x10>B\xea\x01\n\"com.google.cloud.securitycenter.v1B\x10MitreAttackProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - MitreAttack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack").msgclass - MitreAttack::Tactic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack.Tactic").enummodule - MitreAttack::Technique = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MitreAttack.Technique").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb deleted file mode 100644 index 6f270729b563..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/mute_config_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/mute_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/cloud/securitycenter/v1/mute_config.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x06\n\nMuteConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x02\x18\x01\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12L\n\x04type\x18\x08 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.MuteConfig.MuteConfigTypeB\x03\xe0\x41\x01\x12\x34\n\x0b\x65xpiry_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"K\n\x0eMuteConfigType\x12 \n\x1cMUTE_CONFIG_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STATIC\x10\x01\x12\x0b\n\x07\x44YNAMIC\x10\x02:\xaa\x03\xea\x41\xa6\x03\n(securitycenter.googleapis.com/MuteConfig\x12\x36organizations/{organization}/muteConfigs/{mute_config}\x12*folders/{folder}/muteConfigs/{mute_config}\x12,projects/{project}/muteConfigs/{mute_config}\x12Korganizations/{organization}/locations/{location}/muteConfigs/{mute_config}\x12?folders/{folder}/locations/{location}/muteConfigs/{mute_config}\x12\x41projects/{project}/locations/{location}/muteConfigs/{mute_config}*\x0bmuteConfigs2\nmuteConfigB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fMuteConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - MuteConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MuteConfig").msgclass - MuteConfig::MuteConfigType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.MuteConfig.MuteConfigType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb deleted file mode 100644 index f8cc3f85eb77..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notebook_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/notebook.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/securitycenter/v1/notebook.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"x\n\x08Notebook\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x13\n\x0blast_author\x18\x03 \x01(\t\x12\x38\n\x14notebook_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v1B\rNotebookProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Notebook").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb deleted file mode 100644 index df0bb0cecc79..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/notification_config_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/notification_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n8google/cloud/securitycenter/v1/notification_config.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc5\x04\n\x12NotificationConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x36\n\x0cpubsub_topic\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x1c\n\x0fservice_account\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x10streaming_config\x18\x05 \x01(\x0b\x32\x42.google.cloud.securitycenter.v1.NotificationConfig.StreamingConfigH\x00\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t:\xa1\x02\xea\x41\x9d\x02\n0securitycenter.googleapis.com/NotificationConfig\x12\x46organizations/{organization}/notificationConfigs/{notification_config}\x12:folders/{folder}/notificationConfigs/{notification_config}\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"i\n\x1f\x44\x65leteNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"\x8b\x01\n0DeleteSecurityHealthAnalyticsCustomModuleRequest\x12W\n\x04name\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\nAsecuritycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\"^\n\x18GetBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"V\n\x14GetMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"f\n\x1cGetNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"j\n\x1eGetOrganizationSettingsRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2securitycenter.googleapis.com/OrganizationSettings\"\x9a\x01\n6GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x12`\n\x04name\x18\x01 \x01(\tBR\xe0\x41\x02\xfa\x41L\nJsecuritycenter.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\"\x88\x01\n-GetSecurityHealthAnalyticsCustomModuleRequest\x12W\n\x04name\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\nAsecuritycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\x83\x02\n\x12GroupAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x10\x63ompare_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xb8\x01\n\x13GroupAssetsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\x86\x02\n\x14GroupFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xba\x01\n\x15GroupFindingsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\xb8\x01\n\x0bGroupResult\x12O\n\nproperties\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v1.GroupResult.PropertiesEntry\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x1aI\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"\xbd\x01\n9ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xcc\x01\n:ListDescendantSecurityHealthAnalyticsCustomModulesResponse\x12u\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb0\x01\n\x1aListValuedResourcesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/ValuedResource\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x1bListValuedResourcesResponse\x12H\n\x10valued_resources\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.ValuedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x91\x01\n\x16ListAttackPathsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/AttackPath\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"t\n\x17ListAttackPathsResponse\x12@\n\x0c\x61ttack_paths\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v1.AttackPath\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x14GetSimulationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/Simulation\"^\n\x18GetValuedResourceRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/ValuedResource\"\x81\x01\n\x16ListMuteConfigsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x17ListMuteConfigsResponse\x12@\n\x0cmute_configs\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v1.MuteConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x91\x01\n\x1eListNotificationConfigsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x8c\x01\n\x1fListNotificationConfigsResponse\x12P\n\x14notification_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbc\x01\n8ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xdf\x01\n9ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\x12\x88\x01\n2effective_security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32L.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb3\x01\n/ListSecurityHealthAnalyticsCustomModulesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41securitycenter.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xc2\x01\n0ListSecurityHealthAnalyticsCustomModulesResponse\x12u\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x12ListSourcesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$securitycenter.googleapis.com/Source\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x07 \x01(\x05\"g\n\x13ListSourcesResponse\x12\x37\n\x07sources\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v1.Source\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x02\n\x11ListAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xc3\x03\n\x12ListAssetsResponse\x12`\n\x13list_assets_results\x18\x01 \x03(\x0b\x32\x43.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xee\x01\n\x10ListAssetsResult\x12\x34\n\x05\x61sset\x18\x01 \x01(\x0b\x32%.google.cloud.securitycenter.v1.Asset\x12\x65\n\x0cstate_change\x18\x02 \x01(\x0e\x32O.google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange\"=\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x01\x12\x0b\n\x07REMOVED\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\"\xb0\x02\n\x13ListFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xb8\t\n\x14ListFindingsResponse\x12\x66\n\x15list_findings_results\x18\x01 \x03(\x0b\x32G.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xdb\x07\n\x12ListFindingsResult\x12\x38\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Finding\x12i\n\x0cstate_change\x18\x02 \x01(\x0e\x32S.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange\x12g\n\x08resource\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xe7\x04\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x08 \x01(\t\x12\x0c\n\x04type\x18\x06 \x01(\t\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x1c\n\x14project_display_name\x18\x03 \x01(\t\x12\x13\n\x0bparent_name\x18\x04 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x05 \x01(\t\x12\x37\n\x07\x66olders\x18\x07 \x03(\x0b\x32&.google.cloud.securitycenter.v1.Folder\x12\x45\n\x0e\x63loud_provider\x18\t \x01(\x0e\x32-.google.cloud.securitycenter.v1.CloudProvider\x12\x14\n\x0corganization\x18\n \x01(\t\x12\x0f\n\x07service\x18\x0b \x01(\t\x12\x10\n\x08location\x18\x0c \x01(\t\x12\x43\n\x0c\x61ws_metadata\x18\x10 \x01(\x0b\x32+.google.cloud.securitycenter.v1.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\x11 \x01(\x0b\x32-.google.cloud.securitycenter.v1.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\x12 \x01(\x0b\x32,.google.cloud.securitycenter.v1.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x13 \x01(\tB\x19\n\x17\x63loud_provider_metadata\"M\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\x0b\n\x07\x43HANGED\x10\x01\x12\r\n\tUNCHANGED\x10\x02\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x03\x12\x0b\n\x07REMOVED\x10\x04\"\xcd\x01\n\x16SetFindingStateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v1.Finding.StateB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\x8e\x01\n\x0eSetMuteRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12?\n\x04mute\x18\x02 \x01(\x0e\x32,.google.cloud.securitycenter.v1.Finding.MuteB\x03\xe0\x41\x02\"d\n\x18RunAssetDiscoveryRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\"\xac\x03\n2SimulateSecurityHealthAnalyticsCustomModuleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\rcustom_config\x18\x02 \x01(\x0b\x32,.google.cloud.securitycenter.v1.CustomConfigB\x03\xe0\x41\x02\x12{\n\x08resource\x18\x03 \x01(\x0b\x32\x64.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResourceB\x03\xe0\x41\x02\x1a\x99\x01\n\x11SimulatedResource\x12\x1a\n\rresource_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\rresource_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x33\n\x0fiam_policy_data\x18\x03 \x01(\x0b\x32\x15.google.iam.v1.PolicyB\x03\xe0\x41\x01\"\xd9\x02\n3SimulateSecurityHealthAnalyticsCustomModuleResponse\x12s\n\x06result\x18\x01 \x01(\x0b\x32\x63.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult\x1a\xac\x01\n\x0fSimulatedResult\x12:\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.FindingH\x00\x12.\n\x0cno_violation\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12#\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42\x08\n\x06result\"\x9c\x01\n\x1bUpdateExternalSystemRequest\x12L\n\x0f\x65xternal_system\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.ExternalSystemB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x86\x01\n\x14UpdateFindingRequest\x12=\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.FindingB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x90\x01\n\x17UpdateMuteConfigRequest\x12\x44\n\x0bmute_config\x18\x01 \x01(\x0b\x32*.google.cloud.securitycenter.v1.MuteConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa8\x01\n\x1fUpdateNotificationConfigRequest\x12T\n\x13notification_config\x18\x01 \x01(\x0b\x32\x32.google.cloud.securitycenter.v1.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xae\x01\n!UpdateOrganizationSettingsRequest\x12X\n\x15organization_settings\x18\x01 \x01(\x0b\x32\x34.google.cloud.securitycenter.v1.OrganizationSettingsB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xde\x01\n0UpdateSecurityHealthAnalyticsCustomModuleRequest\x12y\n\'security_health_analytics_custom_module\x18\x01 \x01(\x0b\x32\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x83\x01\n\x13UpdateSourceRequest\x12;\n\x06source\x18\x01 \x01(\x0b\x32&.google.cloud.securitycenter.v1.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xc9\x01\n\x1aUpdateSecurityMarksRequest\x12J\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v1.SecurityMarksB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd4\x01\n\x1b\x43reateBigQueryExportRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12M\n\x10\x62ig_query_export\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExportB\x03\xe0\x41\x02\x12 \n\x13\x62ig_query_export_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9d\x01\n\x1bUpdateBigQueryExportRequest\x12M\n\x10\x62ig_query_export\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExportB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x89\x01\n\x1aListBigQueryExportsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x1bListBigQueryExportsResponse\x12I\n\x11\x62ig_query_exports\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v1.BigQueryExport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x1b\x44\x65leteBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"\xfc\x01\n-CreateEventThreatDetectionCustomModuleRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12s\n$event_threat_detection_custom_module\x18\x02 \x01(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\"\xb3\x01\n/ValidateEventThreatDetectionCustomModuleRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x15\n\x08raw_text\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x80\x01\n0ValidateEventThreatDetectionCustomModuleResponse\x12L\n\x06\x65rrors\x18\x02 \x01(\x0b\x32<.google.cloud.securitycenter.v1.CustomModuleValidationErrors\"\x85\x01\n-DeleteEventThreatDetectionCustomModuleRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\"\x82\x01\n*GetEventThreatDetectionCustomModuleRequest\x12T\n\x04name\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\n>securitycenter.googleapis.com/EventThreatDetectionCustomModule\"\xb7\x01\n6ListDescendantEventThreatDetectionCustomModulesRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xc3\x01\n7ListDescendantEventThreatDetectionCustomModulesResponse\x12o\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n,ListEventThreatDetectionCustomModulesRequest\x12V\n\x06parent\x18\x01 \x01(\tBF\xe0\x41\x02\xfa\x41@\x12>securitycenter.googleapis.com/EventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xb9\x01\n-ListEventThreatDetectionCustomModulesResponse\x12o\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd5\x01\n-UpdateEventThreatDetectionCustomModuleRequest\x12s\n$event_threat_detection_custom_module\x18\x01 \x01(\x0b\x32@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x94\x01\n3GetEffectiveEventThreatDetectionCustomModuleRequest\x12]\n\x04name\x18\x01 \x01(\tBO\xe0\x41\x02\xfa\x41I\nGsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\"\xbf\x01\n5ListEffectiveEventThreatDetectionCustomModulesRequest\x12_\n\x06parent\x18\x01 \x01(\tBO\xe0\x41\x02\xfa\x41I\x12Gsecuritycenter.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\xd6\x01\n6ListEffectiveEventThreatDetectionCustomModulesResponse\x12\x82\x01\n/effective_event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32I.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xf7\xb2\x01\n\x0eSecurityCenter\x12\xe2\x02\n\x10\x42ulkMuteFindings\x12\x37.google.cloud.securitycenter.v1.BulkMuteFindingsRequest\x1a\x1d.google.longrunning.Operation\"\xf5\x01\xca\x41P\n7google.cloud.securitycenter.v1.BulkMuteFindingsResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x92\x01\"./v1/{parent=organizations/*}/findings:bulkMute:\x01*Z-\"(/v1/{parent=folders/*}/findings:bulkMute:\x01*Z.\")/v1/{parent=projects/*}/findings:bulkMute:\x01*\x12\xd5\x04\n)CreateSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\x90\x03\xda\x41.parent,security_health_analytics_custom_module\x82\xd3\xe4\x93\x02\xd8\x02\"J/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_moduleZo\"D/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_moduleZp\"E/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:\'security_health_analytics_custom_module\x12\xb1\x01\n\x0c\x43reateSource\x12\x33.google.cloud.securitycenter.v1.CreateSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"D\xda\x41\rparent,source\x82\xd3\xe4\x93\x02.\"$/v1/{parent=organizations/*}/sources:\x06source\x12\xcc\x01\n\rCreateFinding\x12\x34.google.cloud.securitycenter.v1.CreateFindingRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\\\xda\x41\x19parent,finding_id,finding\x82\xd3\xe4\x93\x02:\"//v1/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\x9c\x04\n\x10\x43reateMuteConfig\x12\x37.google.cloud.securitycenter.v1.CreateMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xa2\x03\xda\x41\x12parent,mute_config\xda\x41!parent,mute_config,mute_config_id\x82\xd3\xe4\x93\x02\xe2\x02\"(/v1/{parent=organizations/*}/muteConfigs:\x0bmute_configZC\"4/v1/{parent=organizations/*/locations/*}/muteConfigs:\x0bmute_configZ1\"\"/v1/{parent=folders/*}/muteConfigs:\x0bmute_configZ=\"./v1/{parent=folders/*/locations/*}/muteConfigs:\x0bmute_configZ2\"#/v1/{parent=projects/*}/muteConfigs:\x0bmute_configZ>\"//v1/{parent=projects/*/locations/*}/muteConfigs:\x0bmute_config\x12\xab\x03\n\x18\x43reateNotificationConfig\x12?.google.cloud.securitycenter.v1.CreateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\x99\x02\xda\x41$parent,config_id,notification_config\xda\x41\x1aparent,notification_config\x82\xd3\xe4\x93\x02\xce\x01\"0/v1/{parent=organizations/*}/notificationConfigs:\x13notification_configZA\"*/v1/{parent=folders/*}/notificationConfigs:\x13notification_configZB\"+/v1/{parent=projects/*}/notificationConfigs:\x13notification_config\x12\x88\x03\n\x10\x44\x65leteMuteConfig\x12\x37.google.cloud.securitycenter.v1.DeleteMuteConfigRequest\x1a\x16.google.protobuf.Empty\"\xa2\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x02*(/v1/{name=organizations/*/muteConfigs/*}Z$*\"/v1/{name=folders/*/muteConfigs/*}Z%*#/v1/{name=projects/*/muteConfigs/*}Z6*4/v1/{name=organizations/*/locations/*/muteConfigs/*}Z0*./v1/{name=folders/*/locations/*/muteConfigs/*}Z1*//v1/{name=projects/*/locations/*/muteConfigs/*}\x12\x93\x02\n\x18\x44\x65leteNotificationConfig\x12?.google.cloud.securitycenter.v1.DeleteNotificationConfigRequest\x1a\x16.google.protobuf.Empty\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01*0/v1/{name=organizations/*/notificationConfigs/*}Z,**/v1/{name=folders/*/notificationConfigs/*}Z-*+/v1/{name=projects/*/notificationConfigs/*}\x12\x83\x03\n)DeleteSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01*J/v1/{name=organizations/*/securityHealthAnalyticsSettings/customModules/*}ZF*D/v1/{name=folders/*/securityHealthAnalyticsSettings/customModules/*}ZG*E/v1/{name=projects/*/securityHealthAnalyticsSettings/customModules/*}\x12\xaa\x01\n\rGetSimulation\x12\x34.google.cloud.securitycenter.v1.GetSimulationRequest\x1a*.google.cloud.securitycenter.v1.Simulation\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=organizations/*/simulations/*}\x12\xc8\x01\n\x11GetValuedResource\x12\x38.google.cloud.securitycenter.v1.GetValuedResourceRequest\x1a..google.cloud.securitycenter.v1.ValuedResource\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=organizations/*/simulations/*/valuedResources/*}\x12\x91\x02\n\x11GetBigQueryExport\x12\x38.google.cloud.securitycenter.v1.GetBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\x91\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x83\x01\x12,/v1/{name=organizations/*/bigQueryExports/*}Z(\x12&/v1/{name=folders/*/bigQueryExports/*}Z)\x12\'/v1/{name=projects/*/bigQueryExports/*}\x12\x96\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"K\xda\x41\x08resource\x82\xd3\xe4\x93\x02:\"5/v1/{resource=organizations/*/sources/*}:getIamPolicy:\x01*\x12\x96\x03\n\rGetMuteConfig\x12\x34.google.cloud.securitycenter.v1.GetMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xa2\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\x94\x02\x12(/v1/{name=organizations/*/muteConfigs/*}Z$\x12\"/v1/{name=folders/*/muteConfigs/*}Z%\x12#/v1/{name=projects/*/muteConfigs/*}Z6\x12\x34/v1/{name=organizations/*/locations/*/muteConfigs/*}Z0\x12./v1/{name=folders/*/locations/*/muteConfigs/*}Z1\x12//v1/{name=projects/*/locations/*/muteConfigs/*}\x12\xa9\x02\n\x15GetNotificationConfig\x12<.google.cloud.securitycenter.v1.GetNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\x9d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x8f\x01\x12\x30/v1/{name=organizations/*/notificationConfigs/*}Z,\x12*/v1/{name=folders/*/notificationConfigs/*}Z-\x12+/v1/{name=projects/*/notificationConfigs/*}\x12\xcf\x01\n\x17GetOrganizationSettings\x12>.google.cloud.securitycenter.v1.GetOrganizationSettingsRequest\x1a\x34.google.cloud.securitycenter.v1.OrganizationSettings\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=organizations/*/organizationSettings}\x12\xe0\x03\n/GetEffectiveSecurityHealthAnalyticsCustomModule\x12V.google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x1aL.google.cloud.securitycenter.v1.EffectiveSecurityHealthAnalyticsCustomModule\"\x86\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xf8\x01\x12S/v1/{name=organizations/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}ZO\x12M/v1/{name=folders/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}ZP\x12N/v1/{name=projects/*/securityHealthAnalyticsSettings/effectiveCustomModules/*}\x12\xaa\x03\n&GetSecurityHealthAnalyticsCustomModule\x12M.google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01\x12J/v1/{name=organizations/*/securityHealthAnalyticsSettings/customModules/*}ZF\x12\x44/v1/{name=folders/*/securityHealthAnalyticsSettings/customModules/*}ZG\x12\x45/v1/{name=projects/*/securityHealthAnalyticsSettings/customModules/*}\x12\x9a\x01\n\tGetSource\x12\x30.google.cloud.securitycenter.v1.GetSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"3\xda\x41\x04name\x82\xd3\xe4\x93\x02&\x12$/v1/{name=organizations/*/sources/*}\x12\x86\x02\n\x0bGroupAssets\x12\x32.google.cloud.securitycenter.v1.GroupAssetsRequest\x1a\x33.google.cloud.securitycenter.v1.GroupAssetsResponse\"\x8d\x01\x88\x02\x01\x82\xd3\xe4\x93\x02\x83\x01\")/v1/{parent=organizations/*}/assets:group:\x01*Z(\"#/v1/{parent=folders/*}/assets:group:\x01*Z)\"$/v1/{parent=projects/*}/assets:group:\x01*\x12\xbf\x02\n\rGroupFindings\x12\x34.google.cloud.securitycenter.v1.GroupFindingsRequest\x1a\x35.google.cloud.securitycenter.v1.GroupFindingsResponse\"\xc0\x01\xda\x41\x0fparent,group_by\x82\xd3\xe4\x93\x02\xa7\x01\"5/v1/{parent=organizations/*/sources/*}/findings:group:\x01*Z4\"//v1/{parent=folders/*/sources/*}/findings:group:\x01*Z5\"0/v1/{parent=projects/*/sources/*}/findings:group:\x01*\x12\xe6\x01\n\nListAssets\x12\x31.google.cloud.securitycenter.v1.ListAssetsRequest\x1a\x32.google.cloud.securitycenter.v1.ListAssetsResponse\"q\x88\x02\x01\x82\xd3\xe4\x93\x02h\x12#/v1/{parent=organizations/*}/assetsZ\x1f\x12\x1d/v1/{parent=folders/*}/assetsZ \x12\x1e/v1/{parent=projects/*}/assets\x12\x88\x04\n2ListDescendantSecurityHealthAnalyticsCustomModules\x12Y.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x1aZ.google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse\"\x9a\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8a\x02\x12Y/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:listDescendantZU\x12S/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:listDescendantZV\x12T/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:listDescendant\x12\x8f\x02\n\x0cListFindings\x12\x33.google.cloud.securitycenter.v1.ListFindingsRequest\x1a\x34.google.cloud.securitycenter.v1.ListFindingsResponse\"\x93\x01\x82\xd3\xe4\x93\x02\x8c\x01\x12//v1/{parent=organizations/*/sources/*}/findingsZ+\x12)/v1/{parent=folders/*/sources/*}/findingsZ,\x12*/v1/{parent=projects/*/sources/*}/findings\x12\xa9\x03\n\x0fListMuteConfigs\x12\x36.google.cloud.securitycenter.v1.ListMuteConfigsRequest\x1a\x37.google.cloud.securitycenter.v1.ListMuteConfigsResponse\"\xa4\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x94\x02\x12(/v1/{parent=organizations/*}/muteConfigsZ$\x12\"/v1/{parent=folders/*}/muteConfigsZ%\x12#/v1/{parent=projects/*}/muteConfigsZ6\x12\x34/v1/{parent=organizations/*/locations/*/muteConfigs}Z0\x12./v1/{parent=folders/*/locations/*/muteConfigs}Z1\x12//v1/{parent=projects/*/locations/*/muteConfigs}\x12\xbc\x02\n\x17ListNotificationConfigs\x12>.google.cloud.securitycenter.v1.ListNotificationConfigsRequest\x1a?.google.cloud.securitycenter.v1.ListNotificationConfigsResponse\"\x9f\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8f\x01\x12\x30/v1/{parent=organizations/*}/notificationConfigsZ,\x12*/v1/{parent=folders/*}/notificationConfigsZ-\x12+/v1/{parent=projects/*}/notificationConfigs\x12\xf3\x03\n1ListEffectiveSecurityHealthAnalyticsCustomModules\x12X.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x1aY.google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\"\x88\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xf8\x01\x12S/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/effectiveCustomModulesZO\x12M/v1/{parent=folders/*/securityHealthAnalyticsSettings}/effectiveCustomModulesZP\x12N/v1/{parent=projects/*/securityHealthAnalyticsSettings}/effectiveCustomModules\x12\xbd\x03\n(ListSecurityHealthAnalyticsCustomModules\x12O.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest\x1aP.google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse\"\xed\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xdd\x01\x12J/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModulesZF\x12\x44/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModulesZG\x12\x45/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules\x12\xf2\x01\n\x0bListSources\x12\x32.google.cloud.securitycenter.v1.ListSourcesRequest\x1a\x33.google.cloud.securitycenter.v1.ListSourcesResponse\"z\xda\x41\x06parent\x82\xd3\xe4\x93\x02k\x12$/v1/{parent=organizations/*}/sourcesZ \x12\x1e/v1/{parent=folders/*}/sourcesZ!\x12\x1f/v1/{parent=projects/*}/sources\x12\x8a\x02\n\x11RunAssetDiscovery\x12\x38.google.cloud.securitycenter.v1.RunAssetDiscoveryRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\x88\x02\x01\xca\x41Q\n8google.cloud.securitycenter.v1.RunAssetDiscoveryResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\"0/v1/{parent=organizations/*}/assets:runDiscovery:\x01*\x12\xc4\x02\n\x0fSetFindingState\x12\x36.google.cloud.securitycenter.v1.SetFindingStateRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xcf\x01\xda\x41\x15name,state,start_time\x82\xd3\xe4\x93\x02\xb0\x01\"8/v1/{name=organizations/*/sources/*/findings/*}:setState:\x01*Z7\"2/v1/{name=folders/*/sources/*/findings/*}:setState:\x01*Z8\"3/v1/{name=projects/*/sources/*/findings/*}:setState:\x01*\x12\xa5\x02\n\x07SetMute\x12..google.cloud.securitycenter.v1.SetMuteRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xc0\x01\xda\x41\tname,mute\x82\xd3\xe4\x93\x02\xad\x01\"7/v1/{name=organizations/*/sources/*/findings/*}:setMute:\x01*Z6\"1/v1/{name=folders/*/sources/*/findings/*}:setMute:\x01*Z7\"2/v1/{name=projects/*/sources/*/findings/*}:setMute:\x01*\x12\x9d\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"R\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02:\"5/v1/{resource=organizations/*/sources/*}:setIamPolicy:\x01*\x12\xc8\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02@\";/v1/{resource=organizations/*/sources/*}:testIamPermissions:\x01*\x12\x81\x04\n+SimulateSecurityHealthAnalyticsCustomModule\x12R.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest\x1aS.google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse\"\xa8\x02\xda\x41\x1dparent,custom_config,resource\x82\xd3\xe4\x93\x02\x81\x02\"S/v1/{parent=organizations/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*ZR\"M/v1/{parent=folders/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*ZS\"N/v1/{parent=projects/*/securityHealthAnalyticsSettings}/customModules:simulate:\x01*\x12\xd0\x03\n\x14UpdateExternalSystem\x12;.google.cloud.securitycenter.v1.UpdateExternalSystemRequest\x1a..google.cloud.securitycenter.v1.ExternalSystem\"\xca\x02\xda\x41\x1b\x65xternal_system,update_mask\x82\xd3\xe4\x93\x02\xa5\x02\x32Q/v1/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ^2K/v1/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ_2L/v1/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_system\x12\xc1\x02\n\rUpdateFinding\x12\x34.google.cloud.securitycenter.v1.UpdateFindingRequest\x1a\'.google.cloud.securitycenter.v1.Finding\"\xd0\x01\xda\x41\x07\x66inding\x82\xd3\xe4\x93\x02\xbf\x01\x32\x37/v1/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZ<21/v1/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZ=22/v1/{finding.name=projects/*/sources/*/findings/*}:\x07\x66inding\x12\xc5\x04\n\x10UpdateMuteConfig\x12\x37.google.cloud.securitycenter.v1.UpdateMuteConfigRequest\x1a*.google.cloud.securitycenter.v1.MuteConfig\"\xcb\x03\xda\x41\x17mute_config,update_mask\x82\xd3\xe4\x93\x02\xaa\x03\x32\x34/v1/{mute_config.name=organizations/*/muteConfigs/*}:\x0bmute_configZ=2./v1/{mute_config.name=folders/*/muteConfigs/*}:\x0bmute_configZ>2//v1/{mute_config.name=projects/*/muteConfigs/*}:\x0bmute_configZO2@/v1/{mute_config.name=organizations/*/locations/*/muteConfigs/*}:\x0bmute_configZI2:/v1/{mute_config.name=folders/*/locations/*/muteConfigs/*}:\x0bmute_configZJ2;/v1/{mute_config.name=projects/*/locations/*/muteConfigs/*}:\x0bmute_config\x12\xdb\x03\n\x18UpdateNotificationConfig\x12?.google.cloud.securitycenter.v1.UpdateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v1.NotificationConfig\"\xc9\x02\xda\x41\x13notification_config\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\x8a\x02\x32\x44/v1/{notification_config.name=organizations/*/notificationConfigs/*}:\x13notification_configZU2>/v1/{notification_config.name=folders/*/notificationConfigs/*}:\x13notification_configZV2?/v1/{notification_config.name=projects/*/notificationConfigs/*}:\x13notification_config\x12\x93\x02\n\x1aUpdateOrganizationSettings\x12\x41.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest\x1a\x34.google.cloud.securitycenter.v1.OrganizationSettings\"|\xda\x41\x15organization_settings\x82\xd3\xe4\x93\x02^2E/v1/{organization_settings.name=organizations/*/organizationSettings}:\x15organization_settings\x12\xd4\x05\n)UpdateSecurityHealthAnalyticsCustomModule\x12P.google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest\x1a\x43.google.cloud.securitycenter.v1.SecurityHealthAnalyticsCustomModule\"\x8f\x04\xda\x41\x33security_health_analytics_custom_module,update_mask\x82\xd3\xe4\x93\x02\xd2\x03\x32r/v1/{security_health_analytics_custom_module.name=organizations/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_moduleZ\x97\x01\x32l/v1/{security_health_analytics_custom_module.name=folders/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_moduleZ\x98\x01\x32m/v1/{security_health_analytics_custom_module.name=projects/*/securityHealthAnalyticsSettings/customModules/*}:\'security_health_analytics_custom_module\x12\xb1\x01\n\x0cUpdateSource\x12\x33.google.cloud.securitycenter.v1.UpdateSourceRequest\x1a&.google.cloud.securitycenter.v1.Source\"D\xda\x41\x06source\x82\xd3\xe4\x93\x02\x35\x32+/v1/{source.name=organizations/*/sources/*}:\x06source\x12\x9f\x05\n\x13UpdateSecurityMarks\x12:.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest\x1a-.google.cloud.securitycenter.v1.SecurityMarks\"\x9c\x04\xda\x41\x0esecurity_marks\x82\xd3\xe4\x93\x02\x84\x04\x32@/v1/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZL2:/v1/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZM2;/v1/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZ^2L/v1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZX2F/v1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZY2G/v1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marks\x12\xf4\x02\n\x14\x43reateBigQueryExport\x12;.google.cloud.securitycenter.v1.CreateBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\xee\x01\xda\x41+parent,big_query_export,big_query_export_id\x82\xd3\xe4\x93\x02\xb9\x01\",/v1/{parent=organizations/*}/bigQueryExports:\x10\x62ig_query_exportZ:\"&/v1/{parent=folders/*}/bigQueryExports:\x10\x62ig_query_exportZ;\"\'/v1/{parent=projects/*}/bigQueryExports:\x10\x62ig_query_export\x12\xff\x01\n\x14\x44\x65leteBigQueryExport\x12;.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest\x1a\x16.google.protobuf.Empty\"\x91\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x83\x01*,/v1/{name=organizations/*/bigQueryExports/*}Z(*&/v1/{name=folders/*/bigQueryExports/*}Z)*\'/v1/{name=projects/*/bigQueryExports/*}\x12\x98\x03\n\x14UpdateBigQueryExport\x12;.google.cloud.securitycenter.v1.UpdateBigQueryExportRequest\x1a..google.cloud.securitycenter.v1.BigQueryExport\"\x92\x02\xda\x41\x1c\x62ig_query_export,update_mask\x82\xd3\xe4\x93\x02\xec\x01\x32=/v1/{big_query_export.name=organizations/*/bigQueryExports/*}:\x10\x62ig_query_exportZK27/v1/{big_query_export.name=folders/*/bigQueryExports/*}:\x10\x62ig_query_exportZL28/v1/{big_query_export.name=projects/*/bigQueryExports/*}:\x10\x62ig_query_export\x12\xa4\x02\n\x13ListBigQueryExports\x12:.google.cloud.securitycenter.v1.ListBigQueryExportsRequest\x1a;.google.cloud.securitycenter.v1.ListBigQueryExportsResponse\"\x93\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x83\x01\x12,/v1/{parent=organizations/*}/bigQueryExportsZ(\x12&/v1/{parent=folders/*}/bigQueryExportsZ)\x12\'/v1/{parent=projects/*}/bigQueryExports\x12\xb7\x04\n&CreateEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xfb\x02\xda\x41+parent,event_threat_detection_custom_module\x82\xd3\xe4\x93\x02\xc6\x02\"G/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_moduleZi\"A/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_moduleZj\"B/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules:$event_threat_detection_custom_module\x12\xf4\x02\n&DeleteEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xe2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd4\x01*G/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}ZC*A/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}ZD*B/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}\x12\x98\x03\n#GetEventThreatDetectionCustomModule\x12J.google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xe2\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xd4\x01\x12G/v1/{name=organizations/*/eventThreatDetectionSettings/customModules/*}ZC\x12\x41/v1/{name=folders/*/eventThreatDetectionSettings/customModules/*}ZD\x12\x42/v1/{name=projects/*/eventThreatDetectionSettings/customModules/*}\x12\xf6\x03\n/ListDescendantEventThreatDetectionCustomModules\x12V.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest\x1aW.google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse\"\x91\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x81\x02\x12V/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModules:listDescendantZR\x12P/v1/{parent=folders/*/eventThreatDetectionSettings}/customModules:listDescendantZS\x12Q/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules:listDescendant\x12\xab\x03\n%ListEventThreatDetectionCustomModules\x12L.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest\x1aM.google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse\"\xe4\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd4\x01\x12G/v1/{parent=organizations/*/eventThreatDetectionSettings}/customModulesZC\x12\x41/v1/{parent=folders/*/eventThreatDetectionSettings}/customModulesZD\x12\x42/v1/{parent=projects/*/eventThreatDetectionSettings}/customModules\x12\xad\x05\n&UpdateEventThreatDetectionCustomModule\x12M.google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest\x1a@.google.cloud.securitycenter.v1.EventThreatDetectionCustomModule\"\xf1\x03\xda\x41\x30\x65vent_threat_detection_custom_module,update_mask\x82\xd3\xe4\x93\x02\xb7\x03\x32l/v1/{event_threat_detection_custom_module.name=organizations/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_moduleZ\x8e\x01\x32\x66/v1/{event_threat_detection_custom_module.name=folders/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_moduleZ\x8f\x01\x32g/v1/{event_threat_detection_custom_module.name=projects/*/eventThreatDetectionSettings/customModules/*}:$event_threat_detection_custom_module\x12\xc9\x03\n(ValidateEventThreatDetectionCustomModule\x12O.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest\x1aP.google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse\"\xf9\x01\x82\xd3\xe4\x93\x02\xf2\x01\"N/v1/{parent=organizations/*/eventThreatDetectionSettings}:validateCustomModule:\x01*ZM\"H/v1/{parent=folders/*/eventThreatDetectionSettings}:validateCustomModule:\x01*ZN\"I/v1/{parent=projects/*/eventThreatDetectionSettings}:validateCustomModule:\x01*\x12\xce\x03\n,GetEffectiveEventThreatDetectionCustomModule\x12S.google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest\x1aI.google.cloud.securitycenter.v1.EffectiveEventThreatDetectionCustomModule\"\xfd\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xef\x01\x12P/v1/{name=organizations/*/eventThreatDetectionSettings/effectiveCustomModules/*}ZL\x12J/v1/{name=folders/*/eventThreatDetectionSettings/effectiveCustomModules/*}ZM\x12K/v1/{name=projects/*/eventThreatDetectionSettings/effectiveCustomModules/*}\x12\xe1\x03\n.ListEffectiveEventThreatDetectionCustomModules\x12U.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest\x1aV.google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse\"\xff\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xef\x01\x12P/v1/{parent=organizations/*/eventThreatDetectionSettings}/effectiveCustomModulesZL\x12J/v1/{parent=folders/*/eventThreatDetectionSettings}/effectiveCustomModulesZM\x12K/v1/{parent=projects/*/eventThreatDetectionSettings}/effectiveCustomModules\x12\x8e\x02\n\x1f\x42\x61tchCreateResourceValueConfigs\x12\x46.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest\x1aG.google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse\"Z\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x42\"=/v1/{parent=organizations/*}/resourceValueConfigs:batchCreate:\x01*\x12\xb7\x01\n\x19\x44\x65leteResourceValueConfig\x12@.google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest\x1a\x16.google.protobuf.Empty\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=organizations/*/resourceValueConfigs/*}\x12\xce\x01\n\x16GetResourceValueConfig\x12=.google.cloud.securitycenter.v1.GetResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v1.ResourceValueConfig\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=organizations/*/resourceValueConfigs/*}\x12\xe1\x01\n\x18ListResourceValueConfigs\x12?.google.cloud.securitycenter.v1.ListResourceValueConfigsRequest\x1a@.google.cloud.securitycenter.v1.ListResourceValueConfigsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=organizations/*}/resourceValueConfigs\x12\x9f\x02\n\x19UpdateResourceValueConfig\x12@.google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v1.ResourceValueConfig\"\x8a\x01\xda\x41!resource_value_config,update_mask\x82\xd3\xe4\x93\x02`2G/v1/{resource_value_config.name=organizations/*/resourceValueConfigs/*}:\x15resource_value_config\x12\xb3\x02\n\x13ListValuedResources\x12:.google.cloud.securitycenter.v1.ListValuedResourcesRequest\x1a;.google.cloud.securitycenter.v1.ListValuedResourcesResponse\"\xa2\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x92\x01\x12:/v1/{parent=organizations/*/simulations/*}/valuedResourcesZT\x12R/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/valuedResources\x12\xeb\x02\n\x0fListAttackPaths\x12\x36.google.cloud.securitycenter.v1.ListAttackPathsRequest\x1a\x37.google.cloud.securitycenter.v1.ListAttackPathsResponse\"\xe6\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xd6\x01\x12\x36/v1/{parent=organizations/*/simulations/*}/attackPathsZJ\x12H/v1/{parent=organizations/*/simulations/*/valuedResources/*}/attackPathsZP\x12N/v1/{parent=organizations/*/simulations/*/attackExposureResults/*}/attackPaths\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe5\x05\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1\xea\x41g\n2securitycenter.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41U\n,securitycenter.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41m\n4securitycenter.googleapis.com/OrganizationSimulation\x12\x35organizations/{organization}/simulations/{simulation}\xea\x41\xd7\x01\n:securitycenter.googleapis.com/EventThreatDetectionSettings\x12\x39organizations/{organization}/eventThreatDetectionSettings\x12-folders/{folder}/eventThreatDetectionSettings\x12/projects/{project}/eventThreatDetectionSettingsb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - BulkMuteFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsRequest").msgclass - BulkMuteFindingsRequest::MuteState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsRequest.MuteState").enummodule - BulkMuteFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BulkMuteFindingsResponse").msgclass - CreateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateFindingRequest").msgclass - CreateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateMuteConfigRequest").msgclass - CreateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateResourceValueConfigRequest").msgclass - BatchCreateResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsRequest").msgclass - BatchCreateResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.BatchCreateResourceValueConfigsResponse").msgclass - DeleteResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteResourceValueConfigRequest").msgclass - GetResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetResourceValueConfigRequest").msgclass - ListResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListResourceValueConfigsRequest").msgclass - ListResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListResourceValueConfigsResponse").msgclass - UpdateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateResourceValueConfigRequest").msgclass - CreateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateNotificationConfigRequest").msgclass - CreateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateSecurityHealthAnalyticsCustomModuleRequest").msgclass - CreateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateSourceRequest").msgclass - DeleteMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteMuteConfigRequest").msgclass - DeleteNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteNotificationConfigRequest").msgclass - DeleteSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest").msgclass - GetBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetBigQueryExportRequest").msgclass - GetMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetMuteConfigRequest").msgclass - GetNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetNotificationConfigRequest").msgclass - GetOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetOrganizationSettingsRequest").msgclass - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest").msgclass - GetSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSecurityHealthAnalyticsCustomModuleRequest").msgclass - GetSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSourceRequest").msgclass - GroupAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupAssetsRequest").msgclass - GroupAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupAssetsResponse").msgclass - GroupFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupFindingsRequest").msgclass - GroupFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupFindingsResponse").msgclass - GroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GroupResult").msgclass - ListDescendantSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest").msgclass - ListDescendantSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse").msgclass - ListValuedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListValuedResourcesRequest").msgclass - ListValuedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListValuedResourcesResponse").msgclass - ListAttackPathsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAttackPathsRequest").msgclass - ListAttackPathsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAttackPathsResponse").msgclass - GetSimulationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetSimulationRequest").msgclass - GetValuedResourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetValuedResourceRequest").msgclass - ListMuteConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListMuteConfigsRequest").msgclass - ListMuteConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListMuteConfigsResponse").msgclass - ListNotificationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListNotificationConfigsRequest").msgclass - ListNotificationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListNotificationConfigsResponse").msgclass - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest").msgclass - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse").msgclass - ListSecurityHealthAnalyticsCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesRequest").msgclass - ListSecurityHealthAnalyticsCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSecurityHealthAnalyticsCustomModulesResponse").msgclass - ListSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSourcesRequest").msgclass - ListSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListSourcesResponse").msgclass - ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsRequest").msgclass - ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse").msgclass - ListAssetsResponse::ListAssetsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult").msgclass - ListAssetsResponse::ListAssetsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange").enummodule - ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsRequest").msgclass - ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse").msgclass - ListFindingsResponse::ListFindingsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult").msgclass - ListFindingsResponse::ListFindingsResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource").msgclass - ListFindingsResponse::ListFindingsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange").enummodule - SetFindingStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SetFindingStateRequest").msgclass - SetMuteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SetMuteRequest").msgclass - RunAssetDiscoveryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.RunAssetDiscoveryRequest").msgclass - SimulateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest").msgclass - SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource").msgclass - SimulateSecurityHealthAnalyticsCustomModuleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse").msgclass - SimulateSecurityHealthAnalyticsCustomModuleResponse::SimulatedResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult").msgclass - UpdateExternalSystemRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateExternalSystemRequest").msgclass - UpdateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateFindingRequest").msgclass - UpdateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateMuteConfigRequest").msgclass - UpdateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateNotificationConfigRequest").msgclass - UpdateOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest").msgclass - UpdateSecurityHealthAnalyticsCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest").msgclass - UpdateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSourceRequest").msgclass - UpdateSecurityMarksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateSecurityMarksRequest").msgclass - CreateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateBigQueryExportRequest").msgclass - UpdateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateBigQueryExportRequest").msgclass - ListBigQueryExportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListBigQueryExportsRequest").msgclass - ListBigQueryExportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListBigQueryExportsResponse").msgclass - DeleteBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteBigQueryExportRequest").msgclass - CreateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.CreateEventThreatDetectionCustomModuleRequest").msgclass - ValidateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleRequest").msgclass - ValidateEventThreatDetectionCustomModuleResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValidateEventThreatDetectionCustomModuleResponse").msgclass - DeleteEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.DeleteEventThreatDetectionCustomModuleRequest").msgclass - GetEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEventThreatDetectionCustomModuleRequest").msgclass - ListDescendantEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesRequest").msgclass - ListDescendantEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListDescendantEventThreatDetectionCustomModulesResponse").msgclass - ListEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesRequest").msgclass - ListEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEventThreatDetectionCustomModulesResponse").msgclass - UpdateEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.UpdateEventThreatDetectionCustomModuleRequest").msgclass - GetEffectiveEventThreatDetectionCustomModuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.GetEffectiveEventThreatDetectionCustomModuleRequest").msgclass - ListEffectiveEventThreatDetectionCustomModulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesRequest").msgclass - ListEffectiveEventThreatDetectionCustomModulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ListEffectiveEventThreatDetectionCustomModulesResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb deleted file mode 100644 index 0d62cc122298..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb +++ /dev/null @@ -1,226 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/securitycenter/v1/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/securitycenter/v1/securitycenter_service_pb' - -module Google - module Cloud - module SecurityCenter - module V1 - module SecurityCenter - # V1 APIs for Security Center service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.securitycenter.v1.SecurityCenter' - - # Kicks off an LRO to bulk mute findings for a parent based on a filter. The - # parent can be either an organization, folder or project. The findings - # matched by the filter will be muted after the LRO is done. - rpc :BulkMuteFindings, ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, ::Google::Longrunning::Operation - # Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the - # given CRM parent, and also creates inherited - # SecurityHealthAnalyticsCustomModules for all CRM descendants of the given - # parent. These modules are enabled by default. - rpc :CreateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule - # Creates a source. - rpc :CreateSource, ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source - # Creates a finding. The corresponding source must exist for finding creation - # to succeed. - rpc :CreateFinding, ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, ::Google::Cloud::SecurityCenter::V1::Finding - # Creates a mute config. - rpc :CreateMuteConfig, ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig - # Creates a notification config. - rpc :CreateNotificationConfig, ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig - # Deletes an existing mute config. - rpc :DeleteMuteConfig, ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, ::Google::Protobuf::Empty - # Deletes a notification config. - rpc :DeleteNotificationConfig, ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, ::Google::Protobuf::Empty - # Deletes the specified SecurityHealthAnalyticsCustomModule and all of its - # descendants in the CRM hierarchy. This method is only supported for - # resident custom modules. - rpc :DeleteSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Google::Protobuf::Empty - # Get the simulation by name or the latest simulation for the given - # organization. - rpc :GetSimulation, ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, ::Google::Cloud::SecurityCenter::V1::Simulation - # Get the valued resource by name - rpc :GetValuedResource, ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, ::Google::Cloud::SecurityCenter::V1::ValuedResource - # Gets a BigQuery export. - rpc :GetBigQueryExport, ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport - # Gets the access control policy on the specified Source. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets a mute config. - rpc :GetMuteConfig, ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig - # Gets a notification config. - rpc :GetNotificationConfig, ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig - # Gets the settings for an organization. - rpc :GetOrganizationSettings, ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1::OrganizationSettings - # Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. - rpc :GetEffectiveSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule - # Retrieves a SecurityHealthAnalyticsCustomModule. - rpc :GetSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule - # Gets a source. - rpc :GetSource, ::Google::Cloud::SecurityCenter::V1::GetSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source - # Filters an organization's assets and groups them by their specified - # properties. - rpc :GroupAssets, ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse - # Filters an organization or source's findings and groups them by their - # specified properties. - # - # To group across all sources provide a `-` as the source id. - # Example: /v1/organizations/{organization_id}/sources/-/findings, - # /v1/folders/{folder_id}/sources/-/findings, - # /v1/projects/{project_id}/sources/-/findings - rpc :GroupFindings, ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse - # Lists an organization's assets. - rpc :ListAssets, ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse - # Returns a list of all resident SecurityHealthAnalyticsCustomModules under - # the given CRM parent and all of the parent’s CRM descendants. - rpc :ListDescendantSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse - # Lists an organization or source's findings. - # - # To list across all sources provide a `-` as the source id. - # Example: /v1/organizations/{organization_id}/sources/-/findings - rpc :ListFindings, ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse - # Lists mute configs. - rpc :ListMuteConfigs, ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse - # Lists notification configs. - rpc :ListNotificationConfigs, ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse - # Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the - # given parent. This includes resident modules defined at the scope of the - # parent, and inherited modules, inherited from CRM ancestors. - rpc :ListEffectiveSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - # Returns a list of all SecurityHealthAnalyticsCustomModules for the given - # parent. This includes resident modules defined at the scope of the parent, - # and inherited modules, inherited from CRM ancestors. - rpc :ListSecurityHealthAnalyticsCustomModules, ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse - # Lists all sources belonging to an organization. - rpc :ListSources, ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse - # Runs asset discovery. The discovery is tracked with a long-running - # operation. - # - # This API can only be called with limited frequency for an organization. If - # it is called too frequently the caller will receive a TOO_MANY_REQUESTS - # error. - rpc :RunAssetDiscovery, ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, ::Google::Longrunning::Operation - # Updates the state of a finding. - rpc :SetFindingState, ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, ::Google::Cloud::SecurityCenter::V1::Finding - # Updates the mute state of a finding. - rpc :SetMute, ::Google::Cloud::SecurityCenter::V1::SetMuteRequest, ::Google::Cloud::SecurityCenter::V1::Finding - # Sets the access control policy on the specified Source. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the permissions that a caller has on the specified source. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Simulates a given SecurityHealthAnalyticsCustomModule and Resource. - rpc :SimulateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse - # Updates external system. This is for a given finding. - rpc :UpdateExternalSystem, ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, ::Google::Cloud::SecurityCenter::V1::ExternalSystem - # Creates or updates a finding. The corresponding source must exist for a - # finding creation to succeed. - rpc :UpdateFinding, ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, ::Google::Cloud::SecurityCenter::V1::Finding - # Updates a mute config. - rpc :UpdateMuteConfig, ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V1::MuteConfig - # - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - rpc :UpdateNotificationConfig, ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1::NotificationConfig - # Updates an organization's settings. - rpc :UpdateOrganizationSettings, ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1::OrganizationSettings - # Updates the SecurityHealthAnalyticsCustomModule under the given name based - # on the given update mask. Updating the enablement state is supported on - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name and custom - # config of a module is supported on resident modules only. - rpc :UpdateSecurityHealthAnalyticsCustomModule, ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule - # Updates a source. - rpc :UpdateSource, ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, ::Google::Cloud::SecurityCenter::V1::Source - # Updates security marks. - rpc :UpdateSecurityMarks, ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, ::Google::Cloud::SecurityCenter::V1::SecurityMarks - # Creates a BigQuery export. - rpc :CreateBigQueryExport, ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport - # Deletes an existing BigQuery export. - rpc :DeleteBigQueryExport, ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, ::Google::Protobuf::Empty - # Updates a BigQuery export. - rpc :UpdateBigQueryExport, ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V1::BigQueryExport - # Lists BigQuery exports. Note that when requesting BigQuery exports at a - # given level all exports under that level are also returned e.g. if - # requesting BigQuery exports under a folder, then all BigQuery exports - # immediately under the folder plus the ones created under the projects - # within the folder are returned. - rpc :ListBigQueryExports, ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse - # Creates a resident Event Threat Detection custom module at the scope of the - # given Resource Manager parent, and also creates inherited custom modules - # for all descendants of the given parent. These modules are enabled by - # default. - rpc :CreateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule - # Deletes the specified Event Threat Detection custom module and all of its - # descendants in the Resource Manager hierarchy. This method is only - # supported for resident custom modules. - rpc :DeleteEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Google::Protobuf::Empty - # Gets an Event Threat Detection custom module. - rpc :GetEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule - # Lists all resident Event Threat Detection custom modules under the - # given Resource Manager parent and its descendants. - rpc :ListDescendantEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse - # Lists all Event Threat Detection custom modules for the given - # Resource Manager parent. This includes resident modules defined at the - # scope of the parent along with modules inherited from ancestors. - rpc :ListEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse - # Updates the Event Threat Detection custom module with the given name based - # on the given update mask. Updating the enablement state is supported for - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name or - # configuration of a module is supported for resident modules only. The type - # of a module cannot be changed. - rpc :UpdateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule - # Validates the given Event Threat Detection custom module. - rpc :ValidateEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse - # Gets an effective Event Threat Detection custom module at the given level. - rpc :GetEffectiveEventThreatDetectionCustomModule, ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule - # Lists all effective Event Threat Detection custom modules for the - # given parent. This includes resident modules defined at the scope of the - # parent along with modules inherited from its ancestors. - rpc :ListEffectiveEventThreatDetectionCustomModules, ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse - # Creates a ResourceValueConfig for an organization. Maps user's tags to - # difference resource values for use by the attack path simulation. - rpc :BatchCreateResourceValueConfigs, ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse - # Deletes a ResourceValueConfig. - rpc :DeleteResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, ::Google::Protobuf::Empty - # Gets a ResourceValueConfig. - rpc :GetResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig - # Lists all ResourceValueConfigs. - rpc :ListResourceValueConfigs, ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse - # Updates an existing ResourceValueConfigs with new rules. - rpc :UpdateResourceValueConfig, ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig - # Lists the valued resources for a set of simulation results and filter. - rpc :ListValuedResources, ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse - # Lists the attack paths for a set of simulation results or valued resources - # and filter. - rpc :ListAttackPaths, ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb deleted file mode 100644 index 577a4d977a3a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/simulation_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/simulation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v1/resource_pb' -require 'google/cloud/securitycenter/v1/valued_resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/cloud/securitycenter/v1/simulation.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v1/resource.proto\x1a\x34google/cloud/securitycenter/v1/valued_resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfc\x02\n\nSimulation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x64\n\x1fresource_value_configs_metadata\x18\x03 \x03(\x0b\x32;.google.cloud.securitycenter.v1.ResourceValueConfigMetadata\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v1.CloudProvider:}\xea\x41z\n(securitycenter.googleapis.com/Simulation\x12\x35organizations/{organization}/simulations/{simulation}*\x0bsimulations2\nsimulationB\xe9\x01\n\"com.google.cloud.securitycenter.v1B\x0fSimulationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Simulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Simulation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb deleted file mode 100644 index 2f7921ed6f0b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/source_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/source.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n+google/cloud/securitycenter/v1/source.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xfd\x01\n\x06Source\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t:\xa1\x01\xea\x41\x9d\x01\n$securitycenter.googleapis.com/Source\x12-organizations/{organization}/sources/{source}\x12!folders/{folder}/sources/{source}\x12#projects/{project}/sources/{source}B\xd8\x01\n\"com.google.cloud.securitycenter.v1P\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Source").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb deleted file mode 100644 index 78da4c94159e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/toxic_combination_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/toxic_combination.proto - -require 'google/protobuf' - - -descriptor_data = "\n6google/cloud/securitycenter/v1/toxic_combination.proto\x12\x1egoogle.cloud.securitycenter.v1\"K\n\x10ToxicCombination\x12\x1d\n\x15\x61ttack_exposure_score\x18\x01 \x01(\x01\x12\x18\n\x10related_findings\x18\x02 \x03(\tB\xef\x01\n\"com.google.cloud.securitycenter.v1B\x15ToxicCombinationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - ToxicCombination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ToxicCombination").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb deleted file mode 100644 index c0a8708958bb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/valued_resource_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/valued_resource.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v1/valued_resource.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x19google/api/resource.proto\"\xd8\x04\n\x0eValuedResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08resource\x18\x02 \x01(\t\x12\x15\n\rresource_type\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12T\n\x0eresource_value\x18\x05 \x01(\x0e\x32<.google.cloud.securitycenter.v1.ValuedResource.ResourceValue\x12\x15\n\rexposed_score\x18\x06 \x01(\x01\x12`\n\x1bresource_value_configs_used\x18\x07 \x03(\x0b\x32;.google.cloud.securitycenter.v1.ResourceValueConfigMetadata\"{\n\rResourceValue\x12\x1e\n\x1aRESOURCE_VALUE_UNSPECIFIED\x10\x00\x12\x16\n\x12RESOURCE_VALUE_LOW\x10\x01\x12\x19\n\x15RESOURCE_VALUE_MEDIUM\x10\x02\x12\x17\n\x13RESOURCE_VALUE_HIGH\x10\x03:\xac\x01\xea\x41\xa8\x01\n,securitycenter.googleapis.com/ValuedResource\x12Worganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}*\x0fvaluedResources2\x0evaluedResource\"+\n\x1bResourceValueConfigMetadata\x12\x0c\n\x04name\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v1B\x13ValuedResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - ValuedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValuedResource").msgclass - ValuedResource::ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ValuedResource.ResourceValue").enummodule - ResourceValueConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.ResourceValueConfigMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb b/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb deleted file mode 100644 index 64dcf8c6b5f7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1/vulnerability.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/securitycenter/v1/vulnerability.proto\x12\x1egoogle.cloud.securitycenter.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x02\n\rVulnerability\x12\x30\n\x03\x63ve\x18\x01 \x01(\x0b\x32#.google.cloud.securitycenter.v1.Cve\x12\x42\n\x11offending_package\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Package\x12>\n\rfixed_package\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v1.Package\x12K\n\x11security_bulletin\x18\x04 \x01(\x0b\x32\x30.google.cloud.securitycenter.v1.SecurityBulletin\"\x8a\x05\n\x03\x43ve\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v1.Reference\x12\x36\n\x06\x63vssv3\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v1.Cvssv3\x12\x1e\n\x16upstream_fix_available\x18\x04 \x01(\x08\x12>\n\x06impact\x18\x05 \x01(\x0e\x32..google.cloud.securitycenter.v1.Cve.RiskRating\x12W\n\x15\x65xploitation_activity\x18\x06 \x01(\x0e\x32\x38.google.cloud.securitycenter.v1.Cve.ExploitationActivity\x12\x1c\n\x14observed_in_the_wild\x18\x07 \x01(\x08\x12\x10\n\x08zero_day\x18\x08 \x01(\x08\x12\x38\n\x14\x65xploit_release_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"V\n\nRiskRating\x12\x1b\n\x17RISK_RATING_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04\"\x84\x01\n\x14\x45xploitationActivity\x12%\n!EXPLOITATION_ACTIVITY_UNSPECIFIED\x10\x00\x12\x08\n\x04WIDE\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\r\n\tAVAILABLE\x10\x03\x12\x0f\n\x0b\x41NTICIPATED\x10\x04\x12\x0c\n\x08NO_KNOWN\x10\x05\"(\n\tReference\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xb1\n\n\x06\x43vssv3\x12\x12\n\nbase_score\x18\x01 \x01(\x01\x12J\n\rattack_vector\x18\x05 \x01(\x0e\x32\x33.google.cloud.securitycenter.v1.Cvssv3.AttackVector\x12R\n\x11\x61ttack_complexity\x18\x06 \x01(\x0e\x32\x37.google.cloud.securitycenter.v1.Cvssv3.AttackComplexity\x12V\n\x13privileges_required\x18\x07 \x01(\x0e\x32\x39.google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired\x12P\n\x10user_interaction\x18\x08 \x01(\x0e\x32\x36.google.cloud.securitycenter.v1.Cvssv3.UserInteraction\x12;\n\x05scope\x18\t \x01(\x0e\x32,.google.cloud.securitycenter.v1.Cvssv3.Scope\x12M\n\x16\x63onfidentiality_impact\x18\n \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\x12G\n\x10integrity_impact\x18\x0b \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\x12J\n\x13\x61vailability_impact\x18\x0c \x01(\x0e\x32-.google.cloud.securitycenter.v1.Cvssv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\"_\n\x07Package\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0f\n\x07\x63pe_uri\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x17\n\x0fpackage_version\x18\x04 \x01(\t\"\x7f\n\x10SecurityBulletin\x12\x13\n\x0b\x62ulletin_id\x18\x01 \x01(\t\x12\x33\n\x0fsubmission_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x19suggested_upgrade_version\x18\x03 \x01(\tB\xec\x01\n\"com.google.cloud.securitycenter.v1B\x12VulnerabilityProtoP\x01ZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V1\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V1\xea\x02!Google::Cloud::SecurityCenter::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1 - Vulnerability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Vulnerability").msgclass - Cve = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve").msgclass - Cve::RiskRating = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve.RiskRating").enummodule - Cve::ExploitationActivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve.ExploitationActivity").enummodule - Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Reference").msgclass - Cvssv3 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3").msgclass - Cvssv3::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.AttackVector").enummodule - Cvssv3::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.AttackComplexity").enummodule - Cvssv3::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired").enummodule - Cvssv3::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.UserInteraction").enummodule - Cvssv3::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.Scope").enummodule - Cvssv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.Impact").enummodule - Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Package").msgclass - SecurityBulletin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.SecurityBulletin").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md deleted file mode 100644 index 2477ff9d487e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Security Command Center V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb deleted file mode 100644 index 31e390d3f8a1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/access.rb +++ /dev/null @@ -1,120 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Represents an access event. - # @!attribute [rw] principal_email - # @return [::String] - # Associated email, such as "foo@google.com". - # - # The email address of the authenticated user or a service account acting on - # behalf of a third party principal making the request. For third party - # identity callers, the `principal_subject` field is populated instead of - # this field. For privacy reasons, the principal email address is sometimes - # redacted. For more information, see [Caller identities in audit - # logs](https://cloud.google.com/logging/docs/audit#user-id). - # @!attribute [rw] caller_ip - # @return [::String] - # Caller's IP address, such as "1.1.1.1". - # @!attribute [rw] caller_ip_geo - # @return [::Google::Cloud::SecurityCenter::V1::Geolocation] - # The caller IP's geolocation, which identifies where the call came from. - # @!attribute [rw] user_agent_family - # @return [::String] - # Type of user agent associated with the finding. For example, an operating - # system shell or an embedded or standalone application. - # @!attribute [rw] user_agent - # @return [::String] - # The caller's user agent string associated with the finding. - # @!attribute [rw] service_name - # @return [::String] - # This is the API service that the service account made a call to, e.g. - # "iam.googleapis.com" - # @!attribute [rw] method_name - # @return [::String] - # The method that the service account called, e.g. "SetIamPolicy". - # @!attribute [rw] principal_subject - # @return [::String] - # A string that represents the principal_subject that is associated with the - # identity. Unlike `principal_email`, `principal_subject` supports principals - # that aren't associated with email addresses, such as third party - # principals. For most identities, the format is - # `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. - # Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, - # still use the legacy format `serviceAccount:{identity pool - # name}[\\{subject}]`. - # @!attribute [rw] service_account_key_name - # @return [::String] - # The name of the service account key that was used to create or exchange - # credentials when authenticating the service account that made the request. - # This is a scheme-less URI full resource name. For example: - # - # "//iam.googleapis.com/projects/\\{PROJECT_ID}/serviceAccounts/\\{ACCOUNT}/keys/\\{key}". - # @!attribute [rw] service_account_delegation_info - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ServiceAccountDelegationInfo>] - # The identity delegation history of an authenticated service account that - # made the request. The `serviceAccountDelegationInfo[]` object contains - # information about the real authorities that try to access Google Cloud - # resources by delegating on a service account. When multiple authorities are - # present, they are guaranteed to be sorted based on the original ordering of - # the identity delegation events. - # @!attribute [rw] user_name - # @return [::String] - # A string that represents a username. The username provided depends on the - # type of the finding and is likely not an IAM principal. For example, this - # can be a system username if the finding is related to a virtual machine, or - # it can be an application login username. - class Access - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Identity delegation history of an authenticated service account. - # @!attribute [rw] principal_email - # @return [::String] - # The email address of a Google account. - # @!attribute [rw] principal_subject - # @return [::String] - # A string representing the principal_subject associated with the identity. - # As compared to `principal_email`, supports principals that aren't - # associated with email addresses, such as third party principals. For most - # identities, the format will be `principal://iam.googleapis.com/{identity - # pool name}/subjects/\\{subject}` except for some GKE identities - # (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - # format `serviceAccount:{identity pool name}[{subject}]` - class ServiceAccountDelegationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a geographical location for a given access. - # @!attribute [rw] region_code - # @return [::String] - # A CLDR. - class Geolocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb deleted file mode 100644 index a3af9a6b18af..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents a monitored AI Agent. - # @!attribute [rw] id - # @return [::String] - # Identifier of the agent. - # @!attribute [rw] display_name - # @return [::String] - # The user friendly name of the specific agent instance where the finding was - # detected, for example, "Banking Agent". - class Agent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb deleted file mode 100644 index 00775041de5b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_anomaly.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents details about an anomaly detected in an AI agent's behavior. - # @!attribute [rw] confidence_score - # @return [::Float] - # The overall confidence score indicating the likelihood that this session - # contains a true anomaly. The score ranges from 0.0 to 1.0, where 1.0 - # signifies 100% confidence in the presence of an anomaly and 0.0 signifies - # 0% confidence. - # @!attribute [rw] detector_references - # @return [::Array<::Google::Cloud::SecurityCenter::V1::DetectorReference>] - # The list of references to specific detectors that identified anomalies - # within this session. - # @!attribute [rw] invocation_references - # @return [::Array<::Google::Cloud::SecurityCenter::V1::InvocationReference>] - # References to the OpenTelemetry invocations. - class AgentAnomaly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a reference to a specific anomaly detector. - # @!attribute [rw] severity - # @return [::Google::Cloud::SecurityCenter::V1::DetectorReference::Severity] - # The severity of the detector. - # @!attribute [rw] detector_id - # @return [::String] - # The unique identifier of the detector. - # @!attribute [rw] display_name - # @return [::String] - # A human readable name for the detector, providing context on its purpose. - # For example, "ASI02: Tool Misuse", or "Excessive API Calls". - # @!attribute [rw] explanation - # @return [::String] - # A detailed explanation generated by an LLM or the detector itself, - # describing why this specific anomaly was flagged. This provides rationale - # and context for the detection. - # @!attribute [rw] recommendation - # @return [::String] - # Recommended steps or actions to remediate or investigate the anomaly - # flagged by this detector. These could include configuration changes, code - # adjustments, or further diagnostic procedures. - class DetectorReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Severity levels for detectors. - module Severity - # Unspecified severity. - SEVERITY_UNSPECIFIED = 0 - - # Critical severity. - CRITICAL = 1 - - # High severity. - HIGH = 2 - - # Medium severity. - MEDIUM = 3 - - # Low severity. - LOW = 4 - end - end - - # Represents a reference to a specific OpenTelemetry invocation. - # @!attribute [rw] invocation_id - # @return [::String] - # The unique identifier of the invocation. - class InvocationReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.rb deleted file mode 100644 index 53426497c9e0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/agent_session.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! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents a conversational session where the finding occurred. - # @!attribute [rw] session_id - # @return [::String] - # The session ID of a conversation. - class AgentSession - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb deleted file mode 100644 index 219bf34fde42..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/application.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents an application associated with a finding. - # @!attribute [rw] base_uri - # @return [::String] - # The base URI that identifies the network location of the application in - # which the vulnerability was detected. For example, `http://example.com`. - # @!attribute [rw] full_uri - # @return [::String] - # The full URI with payload that can be used to reproduce the - # vulnerability. For example, `http://example.com?p=aMmYgI6H`. - class Application - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb deleted file mode 100644 index d04b5a46cc91..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/asset.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Security Command Center representation of a Google Cloud - # resource. - # - # The Asset is a Security Command Center resource that captures information - # about a single Google Cloud resource. All modifications to an Asset are only - # within the context of Security Command Center and don't affect the referenced - # Google Cloud resource. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this asset. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/assets/\\{asset_id}". - # @!attribute [rw] security_center_properties - # @return [::Google::Cloud::SecurityCenter::V1::Asset::SecurityCenterProperties] - # Security Command Center managed properties. These properties are managed by - # Security Command Center and cannot be modified by the user. - # @!attribute [rw] resource_properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Resource managed properties. These properties are managed and defined by - # the Google Cloud resource and cannot be modified by the user. - # @!attribute [rw] security_marks - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # User specified security marks. These marks are entirely managed by the user - # and come from the SecurityMarks resource that belongs to the asset. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the asset was created in Security Command Center. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the asset was last updated or added in Cloud SCC. - # @!attribute [rw] iam_policy - # @return [::Google::Cloud::SecurityCenter::V1::Asset::IamPolicy] - # Cloud IAM Policy information associated with the Google Cloud resource - # described by the Security Command Center asset. This information is managed - # and defined by the Google Cloud resource and cannot be modified by the - # user. - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the resource. It's either - # "organizations/\\{organization_id}/assets/\\{asset_id}", - # "folders/\\{folder_id}/assets/\\{asset_id}" or - # "projects/\\{project_number}/assets/\\{asset_id}", depending on the closest CRM - # ancestor of the resource. - class Asset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Security Command Center managed properties. These properties are managed by - # Security Command Center and cannot be modified by the user. - # @!attribute [rw] resource_name - # @return [::String] - # The full resource name of the Google Cloud resource this asset - # represents. This field is immutable after create time. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_type - # @return [::String] - # The type of the Google Cloud resource. Examples include: APPLICATION, - # PROJECT, and ORGANIZATION. This is a case insensitive field defined by - # Security Command Center and/or the producer of the resource and is - # immutable after create time. - # @!attribute [rw] resource_parent - # @return [::String] - # The full resource name of the immediate parent of the resource. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_project - # @return [::String] - # The full resource name of the project the resource belongs to. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_owners - # @return [::Array<::String>] - # Owners of the Google Cloud resource. - # @!attribute [rw] resource_display_name - # @return [::String] - # The user defined display name for this resource. - # @!attribute [rw] resource_parent_display_name - # @return [::String] - # The user defined display name for the parent of this resource. - # @!attribute [rw] resource_project_display_name - # @return [::String] - # The user defined display name for the project of this resource. - # @!attribute [rw] folders - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] - # Contains a Folder message for each folder in the assets ancestry. - # The first folder is the deepest nested folder, and the last folder is the - # folder directly under the Organization. - class SecurityCenterProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Cloud IAM Policy information associated with the Google Cloud resource - # described by the Security Command Center asset. This information is managed - # and defined by the Google Cloud resource and cannot be modified by the - # user. - # @!attribute [rw] policy_blob - # @return [::String] - # The JSON representation of the Policy associated with the asset. - # See https://cloud.google.com/iam/reference/rest/v1/Policy for format - # details. - class IamPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class ResourcePropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb deleted file mode 100644 index 51bd94f1fd18..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_exposure.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # An attack exposure contains the results of an attack path simulation run. - # @!attribute [rw] score - # @return [::Float] - # A number between 0 (inclusive) and infinity that represents how important - # this finding is to remediate. The higher the score, the more important it - # is to remediate. - # @!attribute [rw] latest_calculation_time - # @return [::Google::Protobuf::Timestamp] - # The most recent time the attack exposure was updated on this finding. - # @!attribute [rw] attack_exposure_result - # @return [::String] - # The resource name of the attack path simulation result that contains the - # details regarding this attack exposure score. - # Example: `organizations/123/simulations/456/attackExposureResults/789` - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1::AttackExposure::State] - # What state this AttackExposure is in. This captures whether or not an - # attack exposure has been calculated or not. - # @!attribute [rw] exposed_high_value_resources_count - # @return [::Integer] - # The number of high value resources that are exposed as a result of this - # finding. - # @!attribute [rw] exposed_medium_value_resources_count - # @return [::Integer] - # The number of medium value resources that are exposed as a result of this - # finding. - # @!attribute [rw] exposed_low_value_resources_count - # @return [::Integer] - # The number of high value resources that are exposed as a result of this - # finding. - class AttackExposure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This enum defines the various states an AttackExposure can be in. - module State - # The state is not specified. - STATE_UNSPECIFIED = 0 - - # The attack exposure has been calculated. - CALCULATED = 1 - - # The attack exposure has not been calculated. - NOT_CALCULATED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb deleted file mode 100644 index 9a78a90341b5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/attack_path.rb +++ /dev/null @@ -1,147 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # A path that an attacker could take to reach an exposed resource. - # @!attribute [rw] name - # @return [::String] - # The attack path name, for example, - # `organizations/12/simulation/34/valuedResources/56/attackPaths/78` - # @!attribute [rw] path_nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode>] - # A list of nodes that exist in this attack path. - # @!attribute [rw] edges - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathEdge>] - # A list of the edges between nodes in this attack path. - class AttackPath - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents one point that an attacker passes through in this attack path. - # @!attribute [rw] resource - # @return [::String] - # The name of the resource at this point in the attack path. - # The format of the name follows the Cloud Asset Inventory [resource - # name - # format](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # @!attribute [rw] resource_type - # @return [::String] - # The [supported resource - # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # @!attribute [rw] display_name - # @return [::String] - # Human-readable name of this resource. - # @!attribute [rw] associated_findings - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::PathNodeAssociatedFinding>] - # The findings associated with this node in the attack path. - # @!attribute [rw] uuid - # @return [::String] - # Unique id of the attack path node. - # @!attribute [rw] attack_steps - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::AttackStepNode>] - # A list of attack step nodes that exist in this attack path node. - class AttackPathNode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A finding that is associated with this node in the attack path. - # @!attribute [rw] canonical_finding - # @return [::String] - # Canonical name of the associated findings. Example: - # `organizations/123/sources/456/findings/789` - # @!attribute [rw] finding_category - # @return [::String] - # The additional taxonomy group within findings from a given source. - # @!attribute [rw] name - # @return [::String] - # Full resource name of the finding. - class PathNodeAssociatedFinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Detailed steps the attack can take between path nodes. - # @!attribute [rw] uuid - # @return [::String] - # Unique ID for one Node - # @!attribute [rw] type - # @return [::Google::Cloud::SecurityCenter::V1::AttackPath::AttackPathNode::NodeType] - # Attack step type. Can be either AND, OR or DEFENSE - # @!attribute [rw] display_name - # @return [::String] - # User friendly name of the attack step - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Attack step labels for metadata - # @!attribute [rw] description - # @return [::String] - # Attack step description - class AttackStepNode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The type of the incoming attack step node. - module NodeType - # Type not specified - NODE_TYPE_UNSPECIFIED = 0 - - # Incoming edge joined with AND - NODE_TYPE_AND = 1 - - # Incoming edge joined with OR - NODE_TYPE_OR = 2 - - # Incoming edge is defense - NODE_TYPE_DEFENSE = 3 - - # Incoming edge is attacker - NODE_TYPE_ATTACKER = 4 - end - end - - # Represents a connection between a source node and a destination node in - # this attack path. - # @!attribute [rw] source - # @return [::String] - # The attack node uuid of the source node. - # @!attribute [rw] destination - # @return [::String] - # The attack node uuid of the destination node. - class AttackPathEdge - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb deleted file mode 100644 index 8f4297aa756e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/backup_disaster_recovery.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Information related to Google Cloud Backup and DR Service findings. - # @!attribute [rw] backup_template - # @return [::String] - # The name of a Backup and DR template which comprises one or more backup - # policies. See the [Backup and DR - # documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) - # for more information. For example, `snap-ov`. - # @!attribute [rw] policies - # @return [::Array<::String>] - # The names of Backup and DR policies that are associated with a template - # and that define when to run a backup, how frequently to run a backup, and - # how long to retain the backup image. For example, `onvaults`. - # @!attribute [rw] host - # @return [::String] - # The name of a Backup and DR host, which is managed by the backup and - # recovery appliance and known to the management console. The host can be of - # type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file - # system, etc.), vCenter, or an ESX server. See the [Backup and DR - # documentation on - # hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) - # for more information. For example, `centos7-01`. - # @!attribute [rw] applications - # @return [::Array<::String>] - # The names of Backup and DR applications. An application is a VM, database, - # or file system on a managed host monitored by a backup and recovery - # appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, - # `centos7-01-vol02`. - # @!attribute [rw] storage_pool - # @return [::String] - # The name of the Backup and DR storage pool that the backup and recovery - # appliance is storing data in. The storage pool could be of type Cloud, - # Primary, Snapshot, or OnVault. See the [Backup and DR documentation on - # storage - # pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). - # For example, `DiskPoolOne`. - # @!attribute [rw] policy_options - # @return [::Array<::String>] - # The names of Backup and DR advanced policy options of a policy applying to - # an application. See the [Backup and DR documentation on policy - # options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). - # For example, `skipofflineappsincongrp, nounmap`. - # @!attribute [rw] profile - # @return [::String] - # The name of the Backup and DR resource profile that specifies the storage - # media for backups of application and VM data. See the [Backup and DR - # documentation on - # profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). - # For example, `GCP`. - # @!attribute [rw] appliance - # @return [::String] - # The name of the Backup and DR appliance that captures, moves, and manages - # the lifecycle of backup data. For example, `backup-server-57137`. - # @!attribute [rw] backup_type - # @return [::String] - # The backup type of the Backup and DR image. - # For example, `Snapshot`, `Remote Snapshot`, `OnVault`. - # @!attribute [rw] backup_create_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp at which the Backup and DR backup was created. - class BackupDisasterRecovery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb deleted file mode 100644 index f558699d1218..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/bigquery_export.rb +++ /dev/null @@ -1,92 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Configures how to deliver Findings to BigQuery Instance. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this export. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name. - # Example format: - # "organizations/\\{organization_id}/bigQueryExports/\\{export_id}" Example - # format: "folders/\\{folder_id}/bigQueryExports/\\{export_id}" Example format: - # "projects/\\{project_id}/bigQueryExports/\\{export_id}" - # This field is provided in responses, and is ignored when provided in create - # requests. - # @!attribute [rw] description - # @return [::String] - # The description of the export (max of 1024 characters). - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across create/update events - # of findings. The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @!attribute [rw] dataset - # @return [::String] - # The dataset to write findings' updates to. Its format is - # "projects/[project_id]/datasets/[bigquery_dataset_id]". - # BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers - # (0-9), or underscores (_). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the BigQuery export was created. - # This field is set by the server and will be ignored if provided on export - # on creation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent time at which the BigQuery export was updated. - # This field is set by the server and will be ignored if provided on export - # creation or update. - # @!attribute [r] most_recent_editor - # @return [::String] - # Output only. Email address of the user who last edited the BigQuery export. - # This field is set by the server and will be ignored if provided on export - # creation or update. - # @!attribute [r] principal - # @return [::String] - # Output only. The service account that needs permission to create table and - # upload data to the BigQuery dataset. - class BigQueryExport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb deleted file mode 100644 index d16907c3f4b8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/chokepoint.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains details about a chokepoint, which is a resource or resource group - # where high-risk attack paths converge, based on [attack path simulations] - # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). - # @!attribute [rw] related_findings - # @return [::Array<::String>] - # List of resource names of findings associated with this chokepoint. - # For example, organizations/123/sources/456/findings/789. - # This list will have at most 100 findings. - class Chokepoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb deleted file mode 100644 index 589ad76bf248..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_armor.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Fields related to Google Cloud Armor findings. - # @!attribute [rw] security_policy - # @return [::Google::Cloud::SecurityCenter::V1::SecurityPolicy] - # Information about the [Google Cloud Armor security - # policy](https://cloud.google.com/armor/docs/security-policy-overview) - # relevant to the finding. - # @!attribute [rw] requests - # @return [::Google::Cloud::SecurityCenter::V1::Requests] - # Information about incoming requests evaluated by [Google Cloud Armor - # security - # policies](https://cloud.google.com/armor/docs/security-policy-overview). - # @!attribute [rw] adaptive_protection - # @return [::Google::Cloud::SecurityCenter::V1::AdaptiveProtection] - # Information about potential Layer 7 DDoS attacks identified by [Google - # Cloud Armor Adaptive - # Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). - # @!attribute [rw] attack - # @return [::Google::Cloud::SecurityCenter::V1::Attack] - # Information about DDoS attack volume and classification. - # @!attribute [rw] threat_vector - # @return [::String] - # Distinguish between volumetric & protocol DDoS attack and - # application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS - # attacks, or "L_7" for Layer 7 DDoS attacks. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Duration of attack from the start until the current moment (updated every 5 - # minutes). - class CloudArmor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the [Google Cloud Armor security - # policy](https://cloud.google.com/armor/docs/security-policy-overview) - # relevant to the finding. - # @!attribute [rw] name - # @return [::String] - # The name of the Google Cloud Armor security policy, for example, - # "my-security-policy". - # @!attribute [rw] type - # @return [::String] - # The type of Google Cloud Armor security policy for example, 'backend - # security policy', 'edge security policy', 'network edge security policy', - # or 'always-on DDoS protection'. - # @!attribute [rw] preview - # @return [::Boolean] - # Whether or not the associated rule or policy is in preview mode. - class SecurityPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the requests relevant to the finding. - # @!attribute [rw] ratio - # @return [::Float] - # For 'Increasing deny ratio', the ratio is the denied traffic divided by the - # allowed traffic. For 'Allowed traffic spike', the ratio is the allowed - # traffic in the short term divided by allowed traffic in the long term. - # @!attribute [rw] short_term_allowed - # @return [::Integer] - # Allowed RPS (requests per second) in the short term. - # @!attribute [rw] long_term_allowed - # @return [::Integer] - # Allowed RPS (requests per second) over the long term. - # @!attribute [rw] long_term_denied - # @return [::Integer] - # Denied RPS (requests per second) over the long term. - class Requests - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about [Google Cloud Armor Adaptive - # Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection). - # @!attribute [rw] confidence - # @return [::Float] - # A score of 0 means that there is low confidence that the detected event is - # an actual attack. A score of 1 means that there is high confidence that the - # detected event is an attack. See the [Adaptive Protection - # documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) - # for further explanation. - class AdaptiveProtection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about DDoS attack volume and classification. - # @!attribute [rw] volume_pps - # @return [::Integer] - # Total PPS (packets per second) volume of attack. - # @!attribute [rw] volume_bps - # @return [::Integer] - # Total BPS (bytes per second) volume of attack. - # @!attribute [rw] classification - # @return [::String] - # Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'. - class Attack - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb deleted file mode 100644 index 83d9ad22a479..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_data_profile.rb +++ /dev/null @@ -1,114 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # The [data profile](https://cloud.google.com/dlp/docs/data-profiles) - # associated with the finding. - # @!attribute [rw] data_profile - # @return [::String] - # Name of the data profile, for example, - # `projects/123/locations/europe/tableProfiles/8383929`. - # @!attribute [rw] parent_type - # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpDataProfile::ParentType] - # The resource hierarchy level at which the data profile was generated. - # @!attribute [rw] info_types - # @return [::Array<::Google::Cloud::SecurityCenter::V1::InfoType>] - # Type of information detected by SDP. - # Info type includes name, version and sensitivity of the detected - # information type. - class CloudDlpDataProfile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Parents for configurations that produce data profile findings. - module ParentType - # Unspecified parent type. - PARENT_TYPE_UNSPECIFIED = 0 - - # Organization-level configurations. - ORGANIZATION = 1 - - # Project-level configurations. - PROJECT = 2 - end - end - - # Type of information detected by the API. - # @!attribute [rw] name - # @return [::String] - # Name of the information type. Either a name of your choosing when - # creating a CustomInfoType, or one of the names listed - # at - # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference - # when specifying a built-in type. When sending Cloud DLP results to Data - # Catalog, infoType names should conform to the pattern - # `[A-Za-z0-9$_-]{1,64}`. - # @!attribute [rw] version - # @return [::String] - # Optional version name for this InfoType. - # @!attribute [rw] sensitivity_score - # @return [::Google::Cloud::SecurityCenter::V1::SensitivityScore] - # Optional custom sensitivity for this InfoType. - # This only applies to data profiling. - class InfoType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Score is calculated from of all elements in the data profile. - # A higher level means the data is more sensitive. - # @!attribute [rw] score - # @return [::Google::Cloud::SecurityCenter::V1::SensitivityScore::SensitivityScoreLevel] - # The sensitivity score applied to the resource. - class SensitivityScore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Various sensitivity score levels for resources. - module SensitivityScoreLevel - # Unused. - SENSITIVITY_SCORE_LEVEL_UNSPECIFIED = 0 - - # No sensitive information detected. The resource isn't publicly - # accessible. - SENSITIVITY_LOW = 10 - - # Unable to determine sensitivity. - SENSITIVITY_UNKNOWN = 12 - - # Medium risk. Contains personally identifiable information (PII), - # potentially sensitive data, or fields with free-text data that are at a - # higher risk of having intermittent sensitive data. Consider limiting - # access. - SENSITIVITY_MODERATE = 20 - - # High risk. Sensitive personally identifiable information (SPII) can be - # present. Exfiltration of data can lead to user data loss. - # Re-identification of users might be possible. Consider limiting usage and - # or removing SPII. - SENSITIVITY_HIGH = 30 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb deleted file mode 100644 index 9faad618c6f4..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/cloud_dlp_inspection.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection - # job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced - # the finding. - # @!attribute [rw] inspect_job - # @return [::String] - # Name of the inspection job, for example, - # `projects/123/locations/europe/dlpJobs/i-8383929`. - # @!attribute [rw] info_type - # @return [::String] - # The type of information (or - # *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, - # for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. - # @!attribute [rw] info_type_count - # @return [::Integer] - # The number of times Cloud DLP found this infoType within this job - # and resource. - # @!attribute [rw] full_scan - # @return [::Boolean] - # Whether Cloud DLP scanned the complete resource or a sampled subset. - class CloudDlpInspection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb deleted file mode 100644 index 158ef2e388fe..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/compliance.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains compliance information about a security standard indicating unmet - # recommendations. - # @!attribute [rw] standard - # @return [::String] - # Industry-wide compliance standards or benchmarks, such as CIS, PCI, and - # OWASP. - # @!attribute [rw] version - # @return [::String] - # Version of the standard or benchmark, for example, 1.1 - # @!attribute [rw] ids - # @return [::Array<::String>] - # Policies within the standard or benchmark, for example, A.12.4.1 - class Compliance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb deleted file mode 100644 index b44d3c237ea7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/connection.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Contains information about the IP connection associated with the finding. - # @!attribute [rw] destination_ip - # @return [::String] - # Destination IP address. Not present for sockets that are listening and not - # connected. - # @!attribute [rw] destination_port - # @return [::Integer] - # Destination port. Not present for sockets that are listening and not - # connected. - # @!attribute [rw] source_ip - # @return [::String] - # Source IP address. - # @!attribute [rw] source_port - # @return [::Integer] - # Source port. - # @!attribute [rw] protocol - # @return [::Google::Cloud::SecurityCenter::V1::Connection::Protocol] - # IANA Internet Protocol Number such as TCP(6) and UDP(17). - class Connection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # IANA Internet Protocol Number such as TCP(6) and UDP(17). - module Protocol - # Unspecified protocol (not HOPOPT). - PROTOCOL_UNSPECIFIED = 0 - - # Internet Control Message Protocol. - ICMP = 1 - - # Transmission Control Protocol. - TCP = 6 - - # User Datagram Protocol. - UDP = 17 - - # Generic Routing Encapsulation. - GRE = 47 - - # Encap Security Payload. - ESP = 50 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb deleted file mode 100644 index de91713678d6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/contact_details.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Details about specific contacts - # @!attribute [rw] contacts - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Contact>] - # A list of contacts - class ContactDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The email address of a contact. - # @!attribute [rw] email - # @return [::String] - # An email address. For example, "`person123@company.com`". - class Contact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb deleted file mode 100644 index acc0a1015fa9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/container.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Container associated with the finding. - # @!attribute [rw] name - # @return [::String] - # Name of the container. - # @!attribute [rw] uri - # @return [::String] - # Container image URI provided when configuring a pod or container. This - # string can identify a container image version using mutable tags. - # @!attribute [rw] image_id - # @return [::String] - # Optional container image ID, if provided by the container runtime. Uniquely - # identifies the container image launched using a container image digest. - # @!attribute [rw] labels - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Label>] - # Container labels, as provided by the container runtime. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time that the container was created. - class Container - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb deleted file mode 100644 index 2294178aef6c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/database.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents database access information, such as queries. A database may be a - # sub-resource of an instance (as in the case of Cloud SQL instances or Cloud - # Spanner instances), or the database instance itself. Some database resources - # might not have the [full resource - # name](https://google.aip.dev/122#full-resource-names) populated because these - # resource types, such as Cloud SQL databases, are not yet supported by Cloud - # Asset Inventory. In these cases only the display name is provided. - # @!attribute [rw] name - # @return [::String] - # Some database resources may not have the [full resource - # name](https://google.aip.dev/122#full-resource-names) populated because - # these resource types are not yet supported by Cloud Asset Inventory (e.g. - # Cloud SQL databases). In these cases only the display name will be - # provided. - # The [full resource name](https://google.aip.dev/122#full-resource-names) of - # the database that the user connected to, if it is supported by Cloud Asset - # Inventory. - # @!attribute [rw] display_name - # @return [::String] - # The human-readable name of the database that the user connected to. - # @!attribute [rw] user_name - # @return [::String] - # The username used to connect to the database. The username might not be an - # IAM principal and does not have a set format. - # @!attribute [rw] query - # @return [::String] - # The SQL statement that is associated with the database access. - # @!attribute [rw] grantees - # @return [::Array<::String>] - # The target usernames, roles, or groups of an SQL privilege grant, which is - # not an IAM policy change. - # @!attribute [rw] version - # @return [::String] - # The version of the database, for example, POSTGRES_14. - # See [the complete - # list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). - class Database - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb deleted file mode 100644 index 06a03cf035f5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # An EffectiveEventThreatDetectionCustomModule is the representation of - # an Event Threat Detection custom module at a specified level of the - # resource hierarchy: organization, folder, or project. If a custom module is - # inherited from a parent organization or folder, the value of the - # `enablement_state` property in EffectiveEventThreatDetectionCustomModule is - # set to the value that is effective in the parent, instead of `INHERITED`. - # For example, if the module is enabled in a parent organization or folder, the - # effective `enablement_state` for the module in all child folders or projects - # is also `enabled`. EffectiveEventThreatDetectionCustomModule is read-only. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the effective ETD custom module. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # @!attribute [r] config - # @return [::Google::Protobuf::Struct] - # Output only. Config for the effective module. - # @!attribute [r] enablement_state - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule::EnablementState] - # Output only. The effective state of enablement for the module at the given - # level of the hierarchy. - # @!attribute [r] type - # @return [::String] - # Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. - # @!attribute [r] display_name - # @return [::String] - # Output only. The human readable name to be displayed for the module. - # @!attribute [r] description - # @return [::String] - # Output only. The description for the module. - class EffectiveEventThreatDetectionCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The enablement state of the module. - module EnablementState - # Unspecified enablement state. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given level. - ENABLED = 1 - - # The module is disabled at the given level. - DISABLED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb deleted file mode 100644 index 83aab7af710b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/effective_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # An EffectiveSecurityHealthAnalyticsCustomModule is the representation of - # a Security Health Analytics custom module at a specified level of the - # resource hierarchy: organization, folder, or project. If a custom module is - # inherited from a parent organization or folder, the value of the - # `enablementState` property in EffectiveSecurityHealthAnalyticsCustomModule is - # set to the value that is effective in the parent, instead of `INHERITED`. - # For example, if the module is enabled in a parent organization or folder, the - # effective enablement_state for the module in all child folders or projects is - # also `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the custom module. - # Its format is - # "organizations/\\{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}", - # or - # "folders/\\{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}", - # or - # "projects/\\{project}/securityHealthAnalyticsSettings/effectiveCustomModules/\\{customModule}" - # @!attribute [r] custom_config - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] - # Output only. The user-specified configuration for the module. - # @!attribute [r] enablement_state - # @return [::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule::EnablementState] - # Output only. The effective state of enablement for the module at the given - # level of the hierarchy. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name for the custom module. The name must be - # between 1 and 128 characters, start with a lowercase letter, and contain - # alphanumeric characters or underscores only. - class EffectiveSecurityHealthAnalyticsCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The enablement state of the module. - module EnablementState - # Unspecified enablement state. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given level. - ENABLED = 1 - - # The module is disabled at the given level. - DISABLED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb deleted file mode 100644 index e5b28d560c27..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents an instance of an Event Threat Detection custom module, - # including its full module name, display name, enablement state, and last - # updated time. You can create a custom module at the organization, folder, or - # project level. Custom modules that you create at the organization or folder - # level are inherited by child folders and projects. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name of the Event Threat Detection custom module. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - # @!attribute [rw] config - # @return [::Google::Protobuf::Struct] - # Config for the module. For the resident module, its config value is defined - # at this level. For the inherited module, its config value is inherited from - # the ancestor module. - # @!attribute [r] ancestor_module - # @return [::String] - # Output only. The closest ancestor module that this module inherits the - # enablement state from. The format is the same as the - # EventThreatDetectionCustomModule resource name. - # @!attribute [rw] enablement_state - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule::EnablementState] - # The state of enablement for the module at the given level of the hierarchy. - # @!attribute [rw] type - # @return [::String] - # Type for the module. e.g. CONFIGURABLE_BAD_IP. - # @!attribute [rw] display_name - # @return [::String] - # The human readable name to be displayed for the module. - # @!attribute [rw] description - # @return [::String] - # The description for the module. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the module was last updated. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The editor the module was last updated by. - class EventThreatDetectionCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The enablement state of the module. - module EnablementState - # Unspecified enablement state. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given level. - ENABLED = 1 - - # The module is disabled at the given level. - DISABLED = 2 - - # When the enablement state is inherited. - INHERITED = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb deleted file mode 100644 index 0751dbe51e9a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/event_threat_detection_custom_module_validation_errors.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # A list of zero or more errors encountered while validating the uploaded - # configuration of an Event Threat Detection Custom Module. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::SecurityCenter::V1::CustomModuleValidationError>] - class CustomModuleValidationErrors - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An error encountered while validating the uploaded configuration of an - # Event Threat Detection Custom Module. - # @!attribute [rw] description - # @return [::String] - # A description of the error, suitable for human consumption. Required. - # @!attribute [rw] field_path - # @return [::String] - # The path, in RFC 8901 JSON Pointer format, to the field that failed - # validation. This may be left empty if no specific field is affected. - # @!attribute [rw] start - # @return [::Google::Cloud::SecurityCenter::V1::Position] - # The initial position of the error in the uploaded text version of the - # module. This field may be omitted if no specific position applies, or if - # one could not be computed. - # @!attribute [rw] end - # @return [::Google::Cloud::SecurityCenter::V1::Position] - # The end position of the error in the uploaded text version of the - # module. This field may be omitted if no specific position applies, or if - # one could not be computed.. - class CustomModuleValidationError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A position in the uploaded text version of a module. - # @!attribute [rw] line_number - # @return [::Integer] - # @!attribute [rw] column_number - # @return [::Integer] - class Position - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb deleted file mode 100644 index 718388b29179..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/exfiltration.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Exfiltration represents a data exfiltration attempt from one or more sources - # to one or more targets. The `sources` attribute lists the sources of the - # exfiltrated data. The `targets` attribute lists the destinations the data was - # copied to. - # @!attribute [rw] sources - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ExfilResource>] - # If there are multiple sources, then the data is considered "joined" between - # them. For instance, BigQuery can join multiple tables, and each - # table would be considered a source. - # @!attribute [rw] targets - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ExfilResource>] - # If there are multiple targets, each target would get a complete copy of the - # "joined" source data. - # @!attribute [rw] total_exfiltrated_bytes - # @return [::Integer] - # Total exfiltrated bytes processed for the entire job. - class Exfiltration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Resource where data was exfiltrated from or exfiltrated to. - # @!attribute [rw] name - # @return [::String] - # The resource's [full resource - # name](https://cloud.google.com/apis/design/resource_names#full_resource_name). - # @!attribute [rw] components - # @return [::Array<::String>] - # Subcomponents of the asset that was exfiltrated, like URIs used during - # exfiltration, table names, databases, and filenames. For example, multiple - # tables might have been exfiltrated from the same Cloud SQL instance, or - # multiple files might have been exfiltrated from the same Cloud Storage - # bucket. - class ExfilResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb deleted file mode 100644 index 8b10d2880776..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_exposure.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Details about the externally exposed resource associated with the finding. - # @!attribute [rw] private_ip_address - # @return [::String] - # Private IP address of the exposed endpoint. - # @!attribute [rw] private_port - # @return [::String] - # Port number associated with private IP address. - # @!attribute [rw] exposed_service - # @return [::String] - # The name and version of the service, for example, "Jupyter - # Notebook 6.14.0". - # @!attribute [rw] public_ip_address - # @return [::String] - # Public IP address of the exposed endpoint. - # @!attribute [rw] public_port - # @return [::String] - # Public port number of the exposed endpoint. - # @!attribute [rw] exposed_endpoint - # @return [::String] - # The resource which is running the exposed service, for example, - # "//compute.googleapis.com/projects/\\{project-id}/zones/\\{zone}/instances/\\{instance}.” - # @!attribute [rw] load_balancer_firewall_policy - # @return [::String] - # The full resource name of the load balancer firewall policy, for example, - # "//compute.googleapis.com/projects/\\{project-id}/global/firewallPolicies/\\{policy-name}". - # @!attribute [rw] service_firewall_policy - # @return [::String] - # The full resource name of the firewall policy of the exposed service, for - # example, - # "//compute.googleapis.com/projects/\\{project-id}/global/firewallPolicies/\\{policy-name}". - # @!attribute [rw] forwarding_rule - # @return [::String] - # The full resource name of the forwarding rule, for example, - # "//compute.googleapis.com/projects/\\{project-id}/global/forwardingRules/\\{forwarding-rule-name}". - # @!attribute [rw] backend_service - # @return [::String] - # The full resource name of load balancer backend service, for example, - # "//compute.googleapis.com/projects/\\{project-id}/global/backendServices/\\{name}". - # @!attribute [rw] instance_group - # @return [::String] - # The full resource name of the instance group, for example, - # "//compute.googleapis.com/projects/\\{project-id}/global/instanceGroups/\\{name}". - # @!attribute [rw] network_endpoint_group - # @return [::String] - # The full resource name of the network endpoint group, for example, - # "//compute.googleapis.com/projects/\\{project-id}/global/networkEndpointGroups/\\{name}". - class ExternalExposure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb deleted file mode 100644 index 9a0f33c8a79a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/external_system.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Representation of third party SIEM/SOAR fields within SCC. - # @!attribute [rw] name - # @return [::String] - # Full resource name of the external system, for example: - # "organizations/1234/sources/5678/findings/123456/externalSystems/jira", - # "folders/1234/sources/5678/findings/123456/externalSystems/jira", - # "projects/1234/sources/5678/findings/123456/externalSystems/jira" - # @!attribute [rw] assignees - # @return [::Array<::String>] - # References primary/secondary etc assignees in the external system. - # @!attribute [rw] external_uid - # @return [::String] - # The identifier that's used to track the finding's corresponding case in the - # external system. - # @!attribute [rw] status - # @return [::String] - # The most recent status of the finding's corresponding case, as reported by - # the external system. - # @!attribute [rw] external_system_update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the case was last updated, as reported by the external - # system. - # @!attribute [rw] case_uri - # @return [::String] - # The link to the finding's corresponding case in the external system. - # @!attribute [rw] case_priority - # @return [::String] - # The priority of the finding's corresponding case in the external system. - # @!attribute [rw] case_sla - # @return [::Google::Protobuf::Timestamp] - # The SLA of the finding's corresponding case in the external system. - # @!attribute [rw] case_create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the case was created, as reported by the external system. - # @!attribute [rw] case_close_time - # @return [::Google::Protobuf::Timestamp] - # The time when the case was closed, as reported by the external system. - # @!attribute [rw] ticket_info - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem::TicketInfo] - # Information about the ticket, if any, that is being used to track the - # resolution of the issue that is identified by this finding. - class ExternalSystem - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about the ticket, if any, that is being used to track the - # resolution of the issue that is identified by this finding. - # @!attribute [rw] id - # @return [::String] - # The identifier of the ticket in the ticket system. - # @!attribute [rw] assignee - # @return [::String] - # The assignee of the ticket in the ticket system. - # @!attribute [rw] description - # @return [::String] - # The description of the ticket in the ticket system. - # @!attribute [rw] uri - # @return [::String] - # The link to the ticket in the ticket system. - # @!attribute [rw] status - # @return [::String] - # The latest status of the ticket, as reported by the ticket system. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the ticket was last updated, as reported by the ticket - # system. - class TicketInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb deleted file mode 100644 index 7e7468407e6a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/file.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # File information about the related binary/library used by an executable, or - # the script used by a script interpreter - # @!attribute [rw] path - # @return [::String] - # Absolute path of the file as a JSON encoded string. - # @!attribute [rw] size - # @return [::Integer] - # Size of the file in bytes. - # @!attribute [rw] sha256 - # @return [::String] - # SHA256 hash of the first hashed_size bytes of the file encoded as a - # hex string. If hashed_size == size, sha256 represents the SHA256 hash - # of the entire file. - # @!attribute [rw] hashed_size - # @return [::Integer] - # The length in bytes of the file prefix that was hashed. If - # hashed_size == size, any hashes reported represent the entire - # file. - # @!attribute [rw] partially_hashed - # @return [::Boolean] - # True when the hash covers only a prefix of the file. - # @!attribute [rw] contents - # @return [::String] - # Prefix of the file contents as a JSON-encoded string. - # @!attribute [rw] disk_path - # @return [::Google::Cloud::SecurityCenter::V1::File::DiskPath] - # Path of the file in terms of underlying disk/partition identifiers. - class File - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Path of the file in terms of underlying disk/partition identifiers. - # @!attribute [rw] partition_uuid - # @return [::String] - # UUID of the partition (format - # https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) - # @!attribute [rw] relative_path - # @return [::String] - # Relative path of the file in the partition as a JSON encoded string. - # Example: /home/user1/executable_file.sh - class DiskPath - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb deleted file mode 100644 index d4cb1b117d7c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/finding.rb +++ /dev/null @@ -1,486 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Security Command Center finding. - # - # A finding is a record of assessment data like security, risk, health, or - # privacy, that is ingested into Security Command Center for presentation, - # notification, analysis, policy testing, and enforcement. For example, a - # cross-site scripting (XSS) vulnerability in an App Engine application is a - # finding. - # @!attribute [rw] name - # @return [::String] - # The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}", - # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}", - # "projects/\\{project_id}/sources/\\{source_id}/findings/\\{finding_id}". - # @!attribute [rw] parent - # @return [::String] - # The relative resource name of the source the finding belongs to. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # This field is immutable after creation time. - # For example: - # "organizations/\\{organization_id}/sources/\\{source_id}" - # @!attribute [rw] resource_name - # @return [::String] - # For findings on Google Cloud resources, the full resource - # name of the Google Cloud resource this finding is for. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # When the finding is for a non-Google Cloud resource, the resourceName can - # be a customer or partner defined string. This field is immutable after - # creation time. - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1::Finding::State] - # The state of the finding. - # @!attribute [rw] category - # @return [::String] - # The additional taxonomy group within findings from a given source. - # This field is immutable after creation time. - # Example: "XSS_FLASH_INJECTION" - # @!attribute [rw] external_uri - # @return [::String] - # The URI that, if available, points to a web page outside of Security - # Command Center where additional information about the finding can be found. - # This field is guaranteed to be either empty or a well formed URL. - # @!attribute [rw] source_properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Source specific properties. These properties are managed by the source - # that writes the finding. The key names in the source_properties map must be - # between 1 and 255 characters, and must start with a letter and contain - # alphanumeric characters or underscores only. - # @!attribute [r] security_marks - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # Output only. User specified security marks. These marks are entirely - # managed by the user and come from the SecurityMarks resource that belongs - # to the finding. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # The time the finding was first detected. If an existing finding is updated, - # then this is the time the update occurred. - # For example, if the finding represents an open firewall, this property - # captures the time the detector believes the firewall became open. The - # accuracy is determined by the detector. If the finding is later resolved, - # then this time reflects when the finding was resolved. This must not - # be set to a value greater than the current timestamp. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the finding was created in Security Command Center. - # @!attribute [rw] severity - # @return [::Google::Cloud::SecurityCenter::V1::Finding::Severity] - # The severity of the finding. This field is managed by the source that - # writes the finding. - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the finding. It's either - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}", - # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}" or - # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}", - # depending on the closest CRM ancestor of the resource associated with the - # finding. - # @!attribute [rw] mute - # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] - # Indicates the mute state of a finding (either muted, unmuted - # or undefined). Unlike other attributes of a finding, a finding provider - # shouldn't set the value of mute. - # @!attribute [rw] finding_class - # @return [::Google::Cloud::SecurityCenter::V1::Finding::FindingClass] - # The class of the finding. - # @!attribute [rw] indicator - # @return [::Google::Cloud::SecurityCenter::V1::Indicator] - # Represents what's commonly known as an *indicator of compromise* (IoC) in - # computer forensics. This is an artifact observed on a network or in an - # operating system that, with high confidence, indicates a computer - # intrusion. For more information, see [Indicator of - # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). - # @!attribute [rw] vulnerability - # @return [::Google::Cloud::SecurityCenter::V1::Vulnerability] - # Represents vulnerability-specific fields like CVE and CVSS scores. - # CVE stands for Common Vulnerabilities and Exposures - # (https://cve.mitre.org/about/) - # @!attribute [r] mute_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent time this finding was muted or unmuted. - # @!attribute [r] external_systems - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V1::ExternalSystem}] - # Output only. Third party SIEM/SOAR fields within SCC, contains external - # system information and external system finding fields. - # @!attribute [rw] mitre_attack - # @return [::Google::Cloud::SecurityCenter::V1::MitreAttack] - # MITRE ATT&CK tactics and techniques related to this finding. - # See: https://attack.mitre.org - # @!attribute [rw] access - # @return [::Google::Cloud::SecurityCenter::V1::Access] - # Access details associated with the finding, such as more information on the - # caller, which method was accessed, and from where. - # @!attribute [rw] connections - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Connection>] - # Contains information about the IP connection associated with the finding. - # @!attribute [rw] mute_initiator - # @return [::String] - # Records additional information about the mute operation, for example, the - # [mute configuration](/security-command-center/docs/how-to-mute-findings) - # that muted the finding and the user who muted the finding. - # @!attribute [r] mute_info - # @return [::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo] - # Output only. The mute information regarding this finding. - # @!attribute [rw] processes - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Process>] - # Represents operating system processes associated with the Finding. - # @!attribute [r] contacts - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V1::ContactDetails}] - # Output only. Map containing the points of contact for the given finding. - # The key represents the type of contact, while the value contains a list of - # all the contacts that pertain. Please refer to: - # https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories - # - # { - # "security": { - # "contacts": [ - # { - # "email": "person1@company.com" - # }, - # { - # "email": "person2@company.com" - # } - # ] - # } - # } - # @!attribute [rw] compliances - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Compliance>] - # Contains compliance information for security standards associated to the - # finding. - # @!attribute [r] parent_display_name - # @return [::String] - # Output only. The human readable display name of the finding source such as - # "Event Threat Detection" or "Security Health Analytics". - # @!attribute [rw] description - # @return [::String] - # Contains more details about the finding. - # @!attribute [rw] exfiltration - # @return [::Google::Cloud::SecurityCenter::V1::Exfiltration] - # Represents exfiltrations associated with the finding. - # @!attribute [rw] iam_bindings - # @return [::Array<::Google::Cloud::SecurityCenter::V1::IamBinding>] - # Represents IAM bindings associated with the finding. - # @!attribute [rw] next_steps - # @return [::String] - # Steps to address the finding. - # @!attribute [rw] module_name - # @return [::String] - # Unique identifier of the module which generated the finding. - # Example: - # folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 - # @!attribute [rw] containers - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] - # Containers associated with the finding. This field provides information for - # both Kubernetes and non-Kubernetes containers. - # @!attribute [rw] kubernetes - # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes] - # Kubernetes resources associated with the finding. - # @!attribute [rw] database - # @return [::Google::Cloud::SecurityCenter::V1::Database] - # Database associated with the finding. - # @!attribute [rw] attack_exposure - # @return [::Google::Cloud::SecurityCenter::V1::AttackExposure] - # The results of an attack path simulation relevant to this finding. - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::SecurityCenter::V1::File>] - # File associated with the finding. - # @!attribute [rw] cloud_dlp_inspection - # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpInspection] - # Cloud Data Loss Prevention (Cloud DLP) inspection results that are - # associated with the finding. - # @!attribute [rw] cloud_dlp_data_profile - # @return [::Google::Cloud::SecurityCenter::V1::CloudDlpDataProfile] - # Cloud DLP data profile that is associated with the finding. - # @!attribute [rw] kernel_rootkit - # @return [::Google::Cloud::SecurityCenter::V1::KernelRootkit] - # Signature of the kernel rootkit. - # @!attribute [rw] org_policies - # @return [::Array<::Google::Cloud::SecurityCenter::V1::OrgPolicy>] - # Contains information about the org policies associated with the finding. - # @!attribute [rw] application - # @return [::Google::Cloud::SecurityCenter::V1::Application] - # Represents an application associated with the finding. - # @!attribute [rw] backup_disaster_recovery - # @return [::Google::Cloud::SecurityCenter::V1::BackupDisasterRecovery] - # Fields related to Backup and DR findings. - # @!attribute [rw] security_posture - # @return [::Google::Cloud::SecurityCenter::V1::SecurityPosture] - # The security posture associated with the finding. - # @!attribute [rw] log_entries - # @return [::Array<::Google::Cloud::SecurityCenter::V1::LogEntry>] - # Log entries that are relevant to the finding. - # @!attribute [rw] load_balancers - # @return [::Array<::Google::Cloud::SecurityCenter::V1::LoadBalancer>] - # The load balancers associated with the finding. - # @!attribute [rw] cloud_armor - # @return [::Google::Cloud::SecurityCenter::V1::CloudArmor] - # Fields related to Cloud Armor findings. - # @!attribute [rw] notebook - # @return [::Google::Cloud::SecurityCenter::V1::Notebook] - # Notebook associated with the finding. - # @!attribute [rw] toxic_combination - # @return [::Google::Cloud::SecurityCenter::V1::ToxicCombination] - # Contains details about a group of security issues that, when the issues - # occur together, represent a greater risk than when the issues occur - # independently. A group of such issues is referred to as a toxic - # combination. - # This field cannot be updated. Its value is ignored in all update requests. - # @!attribute [rw] group_memberships - # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupMembership>] - # Contains details about groups of which this finding is a member. A group is - # a collection of findings that are related in some way. - # This field cannot be updated. Its value is ignored in all update requests. - # @!attribute [rw] chokepoint - # @return [::Google::Cloud::SecurityCenter::V1::Chokepoint] - # Contains details about a chokepoint, which is a resource or resource group - # where high-risk attack paths converge, based on [attack path simulations] - # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). - # This field cannot be updated. Its value is ignored in all update requests. - # @!attribute [rw] external_exposure - # @return [::Google::Cloud::SecurityCenter::V1::ExternalExposure] - # External exposure associated with the finding. - # @!attribute [rw] agent - # @return [::Google::Cloud::SecurityCenter::V1::Agent] - # Primary Agent that the specified finding was flagged for - # @!attribute [rw] agent_sessions - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AgentSession>] - # Conversational session(s) where the finding occurred. - # @!attribute [rw] agent_anomaly - # @return [::Google::Cloud::SecurityCenter::V1::AgentAnomaly] - # Details about behavior anomalies detected in AI agents. - class Finding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Mute information about the finding, including whether the finding has a - # static mute or any matching dynamic mute rules. - # @!attribute [rw] static_mute - # @return [::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo::StaticMute] - # If set, the static mute applied to this finding. Static mutes override - # dynamic mutes. If unset, there is no static mute. - # @!attribute [rw] dynamic_mute_records - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Finding::MuteInfo::DynamicMuteRecord>] - # The list of dynamic mute rules that currently match the finding. - class MuteInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about the static mute state. A static mute state overrides - # any dynamic mute rules that apply to this finding. The static mute state - # can be set by a static mute rule or by muting the finding directly. - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] - # The static mute state. If the value is `MUTED` or `UNMUTED`, then the - # finding's overall mute state will have the same value. - # @!attribute [rw] apply_time - # @return [::Google::Protobuf::Timestamp] - # When the static mute was applied. - class StaticMute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The record of a dynamic mute rule that matches the finding. - # @!attribute [rw] mute_config - # @return [::String] - # The relative resource name of the mute rule, represented by a mute - # config, that created this record, for example - # `organizations/123/muteConfigs/mymuteconfig` or - # `organizations/123/locations/global/muteConfigs/mymuteconfig`. - # @!attribute [rw] match_time - # @return [::Google::Protobuf::Timestamp] - # When the dynamic mute rule first matched the finding. - class DynamicMuteRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class SourcePropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - class ExternalSystemsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::SecurityCenter::V1::ContactDetails] - class ContactsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of the finding. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The finding requires attention and has not been addressed yet. - ACTIVE = 1 - - # The finding has been fixed, triaged as a non-issue or otherwise addressed - # and is no longer active. - INACTIVE = 2 - end - - # The severity of the finding. - module Severity - # This value is used for findings when a source doesn't write a severity - # value. - SEVERITY_UNSPECIFIED = 0 - - # Vulnerability: - # A critical vulnerability is easily discoverable by an external actor, - # exploitable, and results in the direct ability to execute arbitrary code, - # exfiltrate data, and otherwise gain additional access and privileges to - # cloud resources and workloads. Examples include publicly accessible - # unprotected user data and public SSH access with weak or no - # passwords. - # - # Threat: - # Indicates a threat that is able to access, modify, or delete data or - # execute unauthorized code within existing resources. - CRITICAL = 1 - - # Vulnerability: - # A high risk vulnerability can be easily discovered and exploited in - # combination with other vulnerabilities in order to gain direct access and - # the ability to execute arbitrary code, exfiltrate data, and otherwise - # gain additional access and privileges to cloud resources and workloads. - # An example is a database with weak or no passwords that is only - # accessible internally. This database could easily be compromised by an - # actor that had access to the internal network. - # - # Threat: - # Indicates a threat that is able to create new computational resources in - # an environment but not able to access data or execute code in existing - # resources. - HIGH = 2 - - # Vulnerability: - # A medium risk vulnerability could be used by an actor to gain access to - # resources or privileges that enable them to eventually (through multiple - # steps or a complex exploit) gain access and the ability to execute - # arbitrary code or exfiltrate data. An example is a service account with - # access to more projects than it should have. If an actor gains access to - # the service account, they could potentially use that access to manipulate - # a project the service account was not intended to. - # - # Threat: - # Indicates a threat that is able to cause operational impact but may not - # access data or execute unauthorized code. - MEDIUM = 3 - - # Vulnerability: - # A low risk vulnerability hampers a security organization's ability to - # detect vulnerabilities or active threats in their deployment, or prevents - # the root cause investigation of security issues. An example is monitoring - # and logs being disabled for resource configurations and access. - # - # Threat: - # Indicates a threat that has obtained minimal access to an environment but - # is not able to access data, execute code, or create resources. - LOW = 4 - end - - # Mute state a finding can be in. - module Mute - # Unspecified. - MUTE_UNSPECIFIED = 0 - - # Finding has been muted. - MUTED = 1 - - # Finding has been unmuted. - UNMUTED = 2 - - # Finding has never been muted/unmuted. - UNDEFINED = 4 - end - - # Represents what kind of Finding it is. - module FindingClass - # Unspecified finding class. - FINDING_CLASS_UNSPECIFIED = 0 - - # Describes unwanted or malicious activity. - THREAT = 1 - - # Describes a potential weakness in software that increases risk to - # Confidentiality & Integrity & Availability. - VULNERABILITY = 2 - - # Describes a potential weakness in cloud resource/asset configuration that - # increases risk. - MISCONFIGURATION = 3 - - # Describes a security observation that is for informational purposes. - OBSERVATION = 4 - - # Describes an error that prevents some SCC functionality. - SCC_ERROR = 5 - - # Describes a potential security risk due to a change in the security - # posture. - POSTURE_VIOLATION = 6 - - # Describes a group of security issues that, when the issues - # occur together, represent a greater risk than when the issues occur - # independently. A group of such issues is referred to as a toxic - # combination. - TOXIC_COMBINATION = 7 - - # Describes a potential security risk to data assets that contain sensitive - # data. - SENSITIVE_DATA_RISK = 8 - - # Describes a resource or resource group where high risk attack paths - # converge, based on attack path simulations (APS). - CHOKEPOINT = 9 - - # Describes a potential security risk due to the resource being exposed to - # the internet. - EXTERNAL_EXPOSURE = 10 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb deleted file mode 100644 index 18f745ec7791..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/folder.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Message that contains the resource name and display name of a folder - # resource. - # @!attribute [rw] resource_folder - # @return [::String] - # Full resource name of this folder. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_folder_display_name - # @return [::String] - # The user defined display name for this folder. - class Folder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb deleted file mode 100644 index 78f19b012cf5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/group_membership.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains details about groups of which this finding is a member. A group is a - # collection of findings that are related in some way. - # @!attribute [rw] group_type - # @return [::Google::Cloud::SecurityCenter::V1::GroupMembership::GroupType] - # Type of group. - # @!attribute [rw] group_id - # @return [::String] - # ID of the group. - class GroupMembership - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible types of groups. - module GroupType - # Default value. - GROUP_TYPE_UNSPECIFIED = 0 - - # Group represents a toxic combination. - GROUP_TYPE_TOXIC_COMBINATION = 1 - - # Group represents a chokepoint. - GROUP_TYPE_CHOKEPOINT = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb deleted file mode 100644 index 0444b9de78dc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/iam_binding.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents a particular IAM binding, which captures a member's role addition, - # removal, or state. - # @!attribute [rw] action - # @return [::Google::Cloud::SecurityCenter::V1::IamBinding::Action] - # The action that was performed on a Binding. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to "members". - # For example, "roles/viewer", "roles/editor", or "roles/owner". - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Cloud Platform resource, for - # example, "foo@google.com". - class IamBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb deleted file mode 100644 index 518ba2e5451a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/indicator.rb +++ /dev/null @@ -1,116 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Represents what's commonly known as an _indicator of compromise_ (IoC) in - # computer forensics. This is an artifact observed on a network or in an - # operating system that, with high confidence, indicates a computer intrusion. - # For more information, see [Indicator of - # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). - # @!attribute [rw] ip_addresses - # @return [::Array<::String>] - # The list of IP addresses that are associated with the finding. - # @!attribute [rw] domains - # @return [::Array<::String>] - # List of domains associated to the Finding. - # @!attribute [rw] signatures - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature>] - # The list of matched signatures indicating that the given - # process is present in the environment. - # @!attribute [rw] uris - # @return [::Array<::String>] - # The list of URIs associated to the Findings. - class Indicator - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates what signature matched this process. - # @!attribute [rw] memory_hash_signature - # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::MemoryHashSignature] - # Signature indicating that a binary family was matched. - # - # Note: The following fields are mutually exclusive: `memory_hash_signature`, `yara_rule_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] yara_rule_signature - # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::YaraRuleSignature] - # Signature indicating that a YARA rule was matched. - # - # Note: The following fields are mutually exclusive: `yara_rule_signature`, `memory_hash_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] signature_type - # @return [::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::SignatureType] - # Describes the type of resource associated with the signature. - class ProcessSignature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A signature corresponding to memory page hashes. - # @!attribute [rw] binary_family - # @return [::String] - # The binary family. - # @!attribute [rw] detections - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Indicator::ProcessSignature::MemoryHashSignature::Detection>] - # The list of memory hash detections contributing to the binary family - # match. - class MemoryHashSignature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Memory hash detection contributing to the binary family match. - # @!attribute [rw] binary - # @return [::String] - # The name of the binary associated with the memory hash - # signature detection. - # @!attribute [rw] percent_pages_matched - # @return [::Float] - # The percentage of memory page hashes in the signature - # that were matched. - class Detection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A signature corresponding to a YARA rule. - # @!attribute [rw] yara_rule - # @return [::String] - # The name of the YARA rule. - class YaraRuleSignature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible resource types to be associated with a signature. - module SignatureType - # The default signature type. - SIGNATURE_TYPE_UNSPECIFIED = 0 - - # Used for signatures concerning processes. - SIGNATURE_TYPE_PROCESS = 1 - - # Used for signatures concerning disks. - SIGNATURE_TYPE_FILE = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb deleted file mode 100644 index 9fc2809838c2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kernel_rootkit.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Kernel mode rootkit signatures. - # @!attribute [rw] name - # @return [::String] - # Rootkit name, when available. - # @!attribute [rw] unexpected_code_modification - # @return [::Boolean] - # True if unexpected modifications of kernel code memory are present. - # @!attribute [rw] unexpected_read_only_data_modification - # @return [::Boolean] - # True if unexpected modifications of kernel read-only data memory are - # present. - # @!attribute [rw] unexpected_ftrace_handler - # @return [::Boolean] - # True if `ftrace` points are present with callbacks pointing to regions - # that are not in the expected kernel or module code range. - # @!attribute [rw] unexpected_kprobe_handler - # @return [::Boolean] - # True if `kprobe` points are present with callbacks pointing to regions - # that are not in the expected kernel or module code range. - # @!attribute [rw] unexpected_kernel_code_pages - # @return [::Boolean] - # True if kernel code pages that are not in the expected kernel or module - # code regions are present. - # @!attribute [rw] unexpected_system_call_handler - # @return [::Boolean] - # True if system call handlers that are are not in the expected kernel or - # module code regions are present. - # @!attribute [rw] unexpected_interrupt_handler - # @return [::Boolean] - # True if interrupt handlers that are are not in the expected kernel or - # module code regions are present. - # @!attribute [rw] unexpected_processes_in_runqueue - # @return [::Boolean] - # True if unexpected processes in the scheduler run queue are present. Such - # processes are in the run queue, but not in the process task list. - class KernelRootkit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb deleted file mode 100644 index 6286084901a9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/kubernetes.rb +++ /dev/null @@ -1,241 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Kubernetes-related attributes. - # @!attribute [rw] pods - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Pod>] - # Kubernetes - # [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) - # associated with the finding. This field contains Pod records for each - # container that is owned by a Pod. - # @!attribute [rw] nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Node>] - # Provides Kubernetes - # [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) - # information. - # @!attribute [rw] node_pools - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::NodePool>] - # GKE [node - # pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) - # associated with the finding. This field contains node pool information for - # each node, when it is available. - # @!attribute [rw] roles - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Role>] - # Provides Kubernetes role information for findings that involve [Roles or - # ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). - # @!attribute [rw] bindings - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Binding>] - # Provides Kubernetes role binding information for findings that involve - # [RoleBindings or - # ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). - # @!attribute [rw] access_reviews - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::AccessReview>] - # Provides information on any Kubernetes access reviews (privilege checks) - # relevant to the finding. - # @!attribute [rw] objects - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Object>] - # Kubernetes objects related to the finding. - class Kubernetes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A Kubernetes Pod. - # @!attribute [rw] ns - # @return [::String] - # Kubernetes Pod namespace. - # @!attribute [rw] name - # @return [::String] - # Kubernetes Pod name. - # @!attribute [rw] labels - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Label>] - # Pod labels. For Kubernetes containers, these are applied to the - # container. - # @!attribute [rw] containers - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] - # Pod containers associated with this finding, if any. - class Pod - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Kubernetes nodes associated with the finding. - # @!attribute [rw] name - # @return [::String] - # [Full resource name](https://google.aip.dev/122#full-resource-names) of - # the Compute Engine VM running the cluster node. - class Node - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides GKE node pool information. - # @!attribute [rw] name - # @return [::String] - # Kubernetes node pool name. - # @!attribute [rw] nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Node>] - # Nodes associated with the finding. - class NodePool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Kubernetes Role or ClusterRole. - # @!attribute [rw] kind - # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Role::Kind] - # Role type. - # @!attribute [rw] ns - # @return [::String] - # Role namespace. - # @!attribute [rw] name - # @return [::String] - # Role name. - class Role - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of Kubernetes roles. - module Kind - # Role type is not specified. - KIND_UNSPECIFIED = 0 - - # Kubernetes Role. - ROLE = 1 - - # Kubernetes ClusterRole. - CLUSTER_ROLE = 2 - end - end - - # Represents a Kubernetes RoleBinding or ClusterRoleBinding. - # @!attribute [rw] ns - # @return [::String] - # Namespace for the binding. - # @!attribute [rw] name - # @return [::String] - # Name for the binding. - # @!attribute [rw] role - # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Role] - # The Role or ClusterRole referenced by the binding. - # @!attribute [rw] subjects - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Kubernetes::Subject>] - # Represents one or more subjects that are bound to the role. Not always - # available for PATCH requests. - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Kubernetes subject. - # @!attribute [rw] kind - # @return [::Google::Cloud::SecurityCenter::V1::Kubernetes::Subject::AuthType] - # Authentication type for the subject. - # @!attribute [rw] ns - # @return [::String] - # Namespace for the subject. - # @!attribute [rw] name - # @return [::String] - # Name for the subject. - class Subject - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Auth types that can be used for the subject's kind field. - module AuthType - # Authentication is not specified. - AUTH_TYPE_UNSPECIFIED = 0 - - # User with valid certificate. - USER = 1 - - # Users managed by Kubernetes API with credentials stored as secrets. - SERVICEACCOUNT = 2 - - # Collection of users. - GROUP = 3 - end - end - - # Conveys information about a Kubernetes access review (such as one returned - # by a [`kubectl auth - # can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) - # command) that was involved in a finding. - # @!attribute [rw] group - # @return [::String] - # The API group of the resource. "*" means all. - # @!attribute [rw] ns - # @return [::String] - # Namespace of the action being requested. Currently, there is no - # distinction between no namespace and all namespaces. Both - # are represented by "" (empty). - # @!attribute [rw] name - # @return [::String] - # The name of the resource being requested. Empty means all. - # @!attribute [rw] resource - # @return [::String] - # The optional resource type requested. "*" means all. - # @!attribute [rw] subresource - # @return [::String] - # The optional subresource type. - # @!attribute [rw] verb - # @return [::String] - # A Kubernetes resource API verb, like get, list, watch, create, update, - # delete, proxy. "*" means all. - # @!attribute [rw] version - # @return [::String] - # The API version of the resource. "*" means all. - class AccessReview - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Kubernetes object related to the finding, uniquely identified by GKNN. - # Used if the object Kind is not one of Pod, Node, NodePool, Binding, or - # AccessReview. - # @!attribute [rw] group - # @return [::String] - # Kubernetes object group, such as "policy.k8s.io/v1". - # @!attribute [rw] kind - # @return [::String] - # Kubernetes object kind, such as "Namespace". - # @!attribute [rw] ns - # @return [::String] - # Kubernetes object namespace. Must be a valid DNS label. Named - # "ns" to avoid collision with C++ namespace keyword. For details see - # https://kubernetes.io/docs/tasks/administer-cluster/namespaces/. - # @!attribute [rw] name - # @return [::String] - # Kubernetes object name. For details see - # https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. - # @!attribute [rw] containers - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Container>] - # Pod containers associated with this finding, if any. - class Object - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb deleted file mode 100644 index d3887e4fc185..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/label.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents a generic name-value label. A label has separate name and value - # fields to support filtering with the `contains()` function. For more - # information, see [Filtering on array-type - # fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering). - # @!attribute [rw] name - # @return [::String] - # Name of the label. - # @!attribute [rw] value - # @return [::String] - # Value that corresponds to the label's name. - class Label - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb deleted file mode 100644 index be5ec1bb5606..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/load_balancer.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Contains information related to the load balancer associated with the - # finding. - # @!attribute [rw] name - # @return [::String] - # The name of the load balancer associated with the finding. - class LoadBalancer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb deleted file mode 100644 index 6f028cba55b8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/log_entry.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # An individual entry in a log. - # @!attribute [rw] cloud_logging_entry - # @return [::Google::Cloud::SecurityCenter::V1::CloudLoggingEntry] - # An individual entry in a log stored in Cloud Logging. - class LogEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata taken from a [Cloud Logging - # LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) - # @!attribute [rw] insert_id - # @return [::String] - # A unique identifier for the log entry. - # @!attribute [rw] log_id - # @return [::String] - # The type of the log (part of `log_name`. `log_name` is the resource name of - # the log to which this log entry belongs). For example: - # `cloudresourcemanager.googleapis.com/activity`. Note that this field is not - # URL-encoded, unlike the `LOG_ID` field in `LogEntry`. - # @!attribute [rw] resource_container - # @return [::String] - # The organization, folder, or project of the monitored resource that - # produced this log entry. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # The time the event described by the log entry occurred. - class CloudLoggingEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb deleted file mode 100644 index 6e17500226e7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mitre_attack.rb +++ /dev/null @@ -1,303 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # MITRE ATT&CK tactics and techniques related to this finding. - # See: https://attack.mitre.org - # @!attribute [rw] primary_tactic - # @return [::Google::Cloud::SecurityCenter::V1::MitreAttack::Tactic] - # The MITRE ATT&CK tactic most closely represented by this finding, if any. - # @!attribute [rw] primary_techniques - # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Technique>] - # The MITRE ATT&CK technique most closely represented by this finding, if - # any. primary_techniques is a repeated field because there are multiple - # levels of MITRE ATT&CK techniques. If the technique most closely - # represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), - # both the sub-technique and its parent technique(s) will be listed (e.g. - # `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). - # @!attribute [rw] additional_tactics - # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Tactic>] - # Additional MITRE ATT&CK tactics related to this finding, if any. - # @!attribute [rw] additional_techniques - # @return [::Array<::Google::Cloud::SecurityCenter::V1::MitreAttack::Technique>] - # Additional MITRE ATT&CK techniques related to this finding, if any, along - # with any of their respective parent techniques. - # @!attribute [rw] version - # @return [::String] - # The MITRE ATT&CK version referenced by the above fields. E.g. "8". - class MitreAttack - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # MITRE ATT&CK tactics that can be referenced by SCC findings. - # See: https://attack.mitre.org/tactics/enterprise/ - module Tactic - # Unspecified value. - TACTIC_UNSPECIFIED = 0 - - # TA0043 - RECONNAISSANCE = 1 - - # TA0042 - RESOURCE_DEVELOPMENT = 2 - - # TA0001 - INITIAL_ACCESS = 5 - - # TA0002 - EXECUTION = 3 - - # TA0003 - PERSISTENCE = 6 - - # TA0004 - PRIVILEGE_ESCALATION = 8 - - # TA0005 - DEFENSE_EVASION = 7 - - # TA0006 - CREDENTIAL_ACCESS = 9 - - # TA0007 - DISCOVERY = 10 - - # TA0008 - LATERAL_MOVEMENT = 11 - - # TA0009 - COLLECTION = 12 - - # TA0011 - COMMAND_AND_CONTROL = 4 - - # TA0010 - EXFILTRATION = 13 - - # TA0040 - IMPACT = 14 - end - - # MITRE ATT&CK techniques that can be referenced by SCC findings. - # See: https://attack.mitre.org/techniques/enterprise/ - # Next ID: 65 - module Technique - # Unspecified value. - TECHNIQUE_UNSPECIFIED = 0 - - # T1036 - MASQUERADING = 49 - - # T1036.005 - MATCH_LEGITIMATE_NAME_OR_LOCATION = 50 - - # T1037 - BOOT_OR_LOGON_INITIALIZATION_SCRIPTS = 37 - - # T1037.005 - STARTUP_ITEMS = 38 - - # T1046 - NETWORK_SERVICE_DISCOVERY = 32 - - # T1057 - PROCESS_DISCOVERY = 56 - - # T1059 - COMMAND_AND_SCRIPTING_INTERPRETER = 6 - - # T1059.004 - UNIX_SHELL = 7 - - # T1059.006 - PYTHON = 59 - - # T1068 - EXPLOITATION_FOR_PRIVILEGE_ESCALATION = 63 - - # T1069 - PERMISSION_GROUPS_DISCOVERY = 18 - - # T1069.003 - CLOUD_GROUPS = 19 - - # T1070.004 - INDICATOR_REMOVAL_FILE_DELETION = 64 - - # T1071 - APPLICATION_LAYER_PROTOCOL = 45 - - # T1071.004 - DNS = 46 - - # T1072 - SOFTWARE_DEPLOYMENT_TOOLS = 47 - - # T1078 - VALID_ACCOUNTS = 14 - - # T1078.001 - DEFAULT_ACCOUNTS = 35 - - # T1078.003 - LOCAL_ACCOUNTS = 15 - - # T1078.004 - CLOUD_ACCOUNTS = 16 - - # T1090 - PROXY = 9 - - # T1090.002 - EXTERNAL_PROXY = 10 - - # T1090.003 - MULTI_HOP_PROXY = 11 - - # T1098 - ACCOUNT_MANIPULATION = 22 - - # T1098.001 - ADDITIONAL_CLOUD_CREDENTIALS = 40 - - # T1098.004 - SSH_AUTHORIZED_KEYS = 23 - - # T1098.006 - ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58 - - # T1105 - INGRESS_TOOL_TRANSFER = 3 - - # T1106 - NATIVE_API = 4 - - # T1110 - BRUTE_FORCE = 44 - - # T1129 - SHARED_MODULES = 5 - - # T1134 - ACCESS_TOKEN_MANIPULATION = 33 - - # T1134.001 - TOKEN_IMPERSONATION_OR_THEFT = 39 - - # T1190 - EXPLOIT_PUBLIC_FACING_APPLICATION = 27 - - # T1484 - DOMAIN_POLICY_MODIFICATION = 30 - - # T1485 - DATA_DESTRUCTION = 29 - - # T1489 - SERVICE_STOP = 52 - - # T1490 - INHIBIT_SYSTEM_RECOVERY = 36 - - # T1496 - RESOURCE_HIJACKING = 8 - - # T1498 - NETWORK_DENIAL_OF_SERVICE = 17 - - # T1526 - CLOUD_SERVICE_DISCOVERY = 48 - - # T1528 - STEAL_APPLICATION_ACCESS_TOKEN = 42 - - # T1531 - ACCOUNT_ACCESS_REMOVAL = 51 - - # T1539 - STEAL_WEB_SESSION_COOKIE = 25 - - # T1543 - CREATE_OR_MODIFY_SYSTEM_PROCESS = 24 - - # T1548 - ABUSE_ELEVATION_CONTROL_MECHANISM = 34 - - # T1552 - UNSECURED_CREDENTIALS = 13 - - # T1556 - MODIFY_AUTHENTICATION_PROCESS = 28 - - # T1562 - IMPAIR_DEFENSES = 31 - - # T1562.001 - DISABLE_OR_MODIFY_TOOLS = 55 - - # T1567 - EXFILTRATION_OVER_WEB_SERVICE = 20 - - # T1567.002 - EXFILTRATION_TO_CLOUD_STORAGE = 21 - - # T1568 - DYNAMIC_RESOLUTION = 12 - - # T1570 - LATERAL_TOOL_TRANSFER = 41 - - # T1578 - MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26 - - # T1578.001 - CREATE_SNAPSHOT = 54 - - # T1580 - CLOUD_INFRASTRUCTURE_DISCOVERY = 53 - - # T1588 - OBTAIN_CAPABILITIES = 43 - - # T1595 - ACTIVE_SCANNING = 1 - - # T1595.001 - SCANNING_IP_BLOCKS = 2 - - # T1609 - CONTAINER_ADMINISTRATION_COMMAND = 60 - - # T1611 - ESCAPE_TO_HOST = 61 - - # T1613 - CONTAINER_AND_RESOURCE_DISCOVERY = 57 - - # T1649 - STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb deleted file mode 100644 index ef639857ed11..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/mute_config.rb +++ /dev/null @@ -1,116 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # A mute config is a Cloud SCC resource that contains the configuration - # to mute create/update events of findings. - # @!attribute [rw] name - # @return [::String] - # This field will be ignored if provided on config creation. Format - # `organizations/{organization}/muteConfigs/{mute_config}` - # `folders/{folder}/muteConfigs/{mute_config}` - # `projects/{project}/muteConfigs/{mute_config}` - # `organizations/{organization}/locations/global/muteConfigs/{mute_config}` - # `folders/{folder}/locations/global/muteConfigs/{mute_config}` - # `projects/{project}/locations/global/muteConfigs/{mute_config}` - # @!attribute [rw] display_name - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # The human readable name to be displayed for the mute config. - # @!attribute [rw] description - # @return [::String] - # A description of the mute config. - # @!attribute [rw] filter - # @return [::String] - # Required. An expression that defines the filter to apply across - # create/update events of findings. While creating a filter string, be - # mindful of the scope in which the mute configuration is being created. - # E.g., If a filter contains project = X but is created under the project = Y - # scope, it might not match any findings. - # - # The following field and operator combinations are supported: - # - # * severity: `=`, `:` - # * category: `=`, `:` - # * resource.name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * finding_class: `=`, `:` - # * indicator.ip_addresses: `=`, `:` - # * indicator.domains: `=`, `:` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the mute config was created. - # This field is set by the server and will be ignored if provided on config - # creation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent time at which the mute config was updated. - # This field is set by the server and will be ignored if provided on config - # creation or update. - # @!attribute [r] most_recent_editor - # @return [::String] - # Output only. Email address of the user who last edited the mute config. - # This field is set by the server and will be ignored if provided on config - # creation or update. - # @!attribute [rw] type - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig::MuteConfigType] - # Optional. The type of the mute config, which determines what type of mute - # state the config affects. The static mute state takes precedence over the - # dynamic mute state. Immutable after creation. STATIC by default if not set - # during creation. - # @!attribute [rw] expiry_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The expiry of the mute config. Only applicable for dynamic - # configs. If the expiry is set, when the config expires, it is removed from - # all findings. - class MuteConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of MuteConfig. - module MuteConfigType - # Unused. - MUTE_CONFIG_TYPE_UNSPECIFIED = 0 - - # A static mute config, which sets the static mute state of future matching - # findings to muted. Once the static mute state has been set, finding or - # config modifications will not affect the state. - STATIC = 1 - - # A dynamic mute config, which is applied to existing and future matching - # findings, setting their dynamic mute state to "muted". If the config is - # updated or deleted, or a matching finding is updated, such that the - # finding doesn't match the config, the config will be removed from the - # finding, and the finding's dynamic mute state may become "unmuted" - # (unless other configs still match). - DYNAMIC = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb deleted file mode 100644 index c1a520b911b6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notebook.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise - # notebook](https://cloud.google.com/colab/docs/introduction) file, that is - # associated with a finding. - # @!attribute [rw] name - # @return [::String] - # The name of the notebook. - # @!attribute [rw] service - # @return [::String] - # The source notebook service, for example, "Colab Enterprise". - # @!attribute [rw] last_author - # @return [::String] - # The user ID of the latest author to modify the notebook. - # @!attribute [rw] notebook_update_time - # @return [::Google::Protobuf::Timestamp] - # The most recent time the notebook was updated. - class Notebook - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb deleted file mode 100644 index 76042f526f38..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_config.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Cloud Security Command Center (Cloud SCC) notification configs. - # - # A notification config is a Cloud SCC resource that contains the configuration - # to send notifications for create/update events of findings, assets and etc. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this notification config. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/notificationConfigs/notify_public_bucket", - # "folders/\\{folder_id}/notificationConfigs/notify_public_bucket", - # or "projects/\\{project_id}/notificationConfigs/notify_public_bucket". - # @!attribute [rw] description - # @return [::String] - # The description of the notification config (max of 1024 characters). - # @!attribute [rw] pubsub_topic - # @return [::String] - # The Pub/Sub topic to send notifications to. Its format is - # "projects/[project_id]/topics/[topic]". - # @!attribute [r] service_account - # @return [::String] - # Output only. The service account that needs "pubsub.topics.publish" - # permission to publish to the Pub/Sub topic. - # @!attribute [rw] streaming_config - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig::StreamingConfig] - # The config for triggering streaming-based notifications. - class NotificationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The config for streaming-based notifications, which send each event as soon - # as it is detected. - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across create/update events - # of assets or findings as specified by the event type. The expression is a - # list of zero or more restrictions combined via logical operators `AND` - # and `OR`. Parentheses are supported, and `OR` has higher precedence than - # `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - class StreamingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb deleted file mode 100644 index 117cc8daf4cc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/notification_message.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Cloud SCC's Notification - # @!attribute [rw] notification_config_name - # @return [::String] - # Name of the notification config that generated current notification. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # If it's a Finding based notification config, this field will be - # populated. - # @!attribute [rw] resource - # @return [::Google::Cloud::SecurityCenter::V1::Resource] - # The Cloud resource tied to this notification's Finding. - class NotificationMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb deleted file mode 100644 index dd2663301322..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/org_policy.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains information about the org policies associated with the finding. - # @!attribute [rw] name - # @return [::String] - # The resource name of the org policy. - # Example: - # "organizations/\\{organization_id}/policies/\\{constraint_name}" - class OrgPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb deleted file mode 100644 index d75d60b378de..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # User specified settings that are attached to the Security Command - # Center organization. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of the settings. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/organizationSettings". - # @!attribute [rw] enable_asset_discovery - # @return [::Boolean] - # A flag that indicates if Asset Discovery should be enabled. If the flag is - # set to `true`, then discovery of assets will occur. If it is set to - # `false`, all historical assets will remain, but discovery of future assets - # will not occur. - # @!attribute [rw] asset_discovery_config - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings::AssetDiscoveryConfig] - # The configuration used for Asset Discovery runs. - class OrganizationSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration used for Asset Discovery runs. - # @!attribute [rw] project_ids - # @return [::Array<::String>] - # The project ids to use for filtering asset discovery. - # @!attribute [rw] inclusion_mode - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings::AssetDiscoveryConfig::InclusionMode] - # The mode to use for filtering asset discovery. - # @!attribute [rw] folder_ids - # @return [::Array<::String>] - # The folder ids to use for filtering asset discovery. - # It consists of only digits, e.g., 756619654966. - class AssetDiscoveryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The mode of inclusion when running Asset Discovery. - # Asset discovery can be limited by explicitly identifying projects to be - # included or excluded. If INCLUDE_ONLY is set, then only those projects - # within the organization and their children are discovered during asset - # discovery. If EXCLUDE is set, then projects that don't match those - # projects are discovered during asset discovery. If neither are set, then - # all projects within the organization are discovered during asset - # discovery. - module InclusionMode - # Unspecified. Setting the mode with this value will disable - # inclusion/exclusion filtering for Asset Discovery. - INCLUSION_MODE_UNSPECIFIED = 0 - - # Asset Discovery will capture only the resources within the projects - # specified. All other resources will be ignored. - INCLUDE_ONLY = 1 - - # Asset Discovery will ignore all resources under the projects specified. - # All other resources will be retrieved. - EXCLUDE = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb deleted file mode 100644 index 7c14c9d1baf2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/process.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Represents an operating system process. - # @!attribute [rw] name - # @return [::String] - # The process name, as displayed in utilities like `top` and `ps`. This name - # can be accessed through `/proc/[pid]/comm` and changed with - # `prctl(PR_SET_NAME)`. - # @!attribute [rw] binary - # @return [::Google::Cloud::SecurityCenter::V1::File] - # File information for the process executable. - # @!attribute [rw] libraries - # @return [::Array<::Google::Cloud::SecurityCenter::V1::File>] - # File information for libraries loaded by the process. - # @!attribute [rw] script - # @return [::Google::Cloud::SecurityCenter::V1::File] - # When the process represents the invocation of a script, `binary` provides - # information about the interpreter, while `script` provides information - # about the script file provided to the interpreter. - # @!attribute [rw] args - # @return [::Array<::String>] - # Process arguments as JSON encoded strings. - # @!attribute [rw] arguments_truncated - # @return [::Boolean] - # True if `args` is incomplete. - # @!attribute [rw] env_variables - # @return [::Array<::Google::Cloud::SecurityCenter::V1::EnvironmentVariable>] - # Process environment variables. - # @!attribute [rw] env_variables_truncated - # @return [::Boolean] - # True if `env_variables` is incomplete. - # @!attribute [rw] pid - # @return [::Integer] - # The process ID. - # @!attribute [rw] parent_pid - # @return [::Integer] - # The parent process ID. - class Process - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A name-value pair representing an environment variable used in an operating - # system process. - # @!attribute [rw] name - # @return [::String] - # Environment variable name as a JSON encoded string. - # @!attribute [rw] val - # @return [::String] - # Environment variable value as a JSON encoded string. - class EnvironmentVariable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb deleted file mode 100644 index 5783203927c7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource.rb +++ /dev/null @@ -1,286 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Information related to the Google Cloud resource. - # @!attribute [rw] name - # @return [::String] - # The full resource name of the resource. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] display_name - # @return [::String] - # The human readable name of the resource. - # @!attribute [rw] type - # @return [::String] - # The full resource type of the resource. - # @!attribute [rw] project - # @return [::String] - # The full resource name of project that the resource belongs to. - # @!attribute [rw] project_display_name - # @return [::String] - # The project ID that the resource belongs to. - # @!attribute [rw] parent - # @return [::String] - # The full resource name of resource's parent. - # @!attribute [rw] parent_display_name - # @return [::String] - # The human readable name of resource's parent. - # @!attribute [r] folders - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] - # Output only. Contains a Folder message for each folder in the assets - # ancestry. The first folder is the deepest nested folder, and the last - # folder is the folder directly under the Organization. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] - # Indicates which cloud provider the resource resides in. - # @!attribute [rw] organization - # @return [::String] - # Indicates which organization or tenant in the cloud provider the finding - # applies to. - # @!attribute [rw] service - # @return [::String] - # The parent service or product from which the resource is provided, for - # example, GKE or SNS. - # @!attribute [rw] location - # @return [::String] - # The region or location of the service (if applicable). - # @!attribute [rw] aws_metadata - # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata] - # The AWS metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] azure_metadata - # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata] - # The Azure metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `azure_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource_path - # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath] - # Provides the path to the resource within the resource hierarchy. - # @!attribute [rw] resource_path_string - # @return [::String] - # A string representation of the resource path. - # For Google Cloud, it has the format of - # `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` - # where there can be any number of folders. - # For AWS, it has the format of - # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` - # where there can be any number of organizational units. - # For Azure, it has the format of - # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` - # where there can be any number of management groups. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AWS metadata associated with the resource, only applicable if the finding's - # cloud provider is Amazon Web Services. - # @!attribute [rw] organization - # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsOrganization] - # The AWS organization associated with the resource. - # @!attribute [rw] organizational_units - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsOrganizationalUnit>] - # A list of AWS organizational units associated with the resource, ordered - # from lowest level (closest to the account) to highest level. - # @!attribute [rw] account - # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata::AwsAccount] - # The AWS account associated with the resource. - class AwsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An organization is a collection of accounts that are centrally managed - # together using consolidated billing, organized hierarchically with - # organizational units (OUs), and controlled with policies. - # @!attribute [rw] id - # @return [::String] - # The unique identifier (ID) for the organization. The regex pattern for an - # organization ID string requires "o-" followed by from 10 to 32 lowercase - # letters or digits. - class AwsOrganization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An Organizational Unit (OU) is a container of AWS accounts within a root of - # an organization. Policies that are attached to an OU apply to all accounts - # contained in that OU and in any child OUs. - # @!attribute [rw] id - # @return [::String] - # The unique identifier (ID) associated with this OU. The regex pattern for - # an organizational unit ID string requires "ou-" followed by from 4 to 32 - # lowercase letters or digits (the ID of the root that contains the OU). - # This string is followed by a second "-" dash and from 8 to 32 additional - # lowercase letters or digits. For example, "ou-ab12-cd34ef56". - # @!attribute [rw] name - # @return [::String] - # The friendly name of the OU. - class AwsOrganizationalUnit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An AWS account that is a member of an organization. - # @!attribute [rw] id - # @return [::String] - # The unique identifier (ID) of the account, containing exactly 12 digits. - # @!attribute [rw] name - # @return [::String] - # The friendly name of this account. - class AwsAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Azure metadata associated with the resource, only applicable if the finding's - # cloud provider is Microsoft Azure. - # @!attribute [rw] management_groups - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureManagementGroup>] - # A list of Azure management groups associated with the resource, ordered - # from lowest level (closest to the subscription) to highest level. - # @!attribute [rw] subscription - # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureSubscription] - # The Azure subscription associated with the resource. - # @!attribute [rw] resource_group - # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata::AzureResourceGroup] - # The Azure resource group associated with the resource. - class AzureMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents an Azure management group. - # @!attribute [rw] id - # @return [::String] - # The UUID of the Azure management group, for example, - # `20000000-0001-0000-0000-000000000000`. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the Azure management group. - class AzureManagementGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an Azure subscription. - # @!attribute [rw] id - # @return [::String] - # The UUID of the Azure subscription, for example, - # `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the Azure subscription. - class AzureSubscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an Azure resource group. - # @!attribute [rw] name - # @return [::String] - # The name of the Azure resource group. This is not a UUID. - class AzureResourceGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents the path of resources leading up to the resource this finding is - # about. - # @!attribute [rw] nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourcePath::ResourcePathNode>] - # The list of nodes that make the up resource path, ordered from lowest - # level to highest level. - class ResourcePath - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A node within the resource path. Each node represents a resource within the - # resource hierarchy. - # @!attribute [rw] node_type - # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath::ResourcePathNodeType] - # The type of resource this node represents. - # @!attribute [rw] id - # @return [::String] - # The ID of the resource this node represents. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the resource this node represents. - class ResourcePathNode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of resource the node represents. - module ResourcePathNodeType - # Node type is unspecified. - RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0 - - # The node represents a Google Cloud organization. - GCP_ORGANIZATION = 1 - - # The node represents a Google Cloud folder. - GCP_FOLDER = 2 - - # The node represents a Google Cloud project. - GCP_PROJECT = 3 - - # The node represents an AWS organization. - AWS_ORGANIZATION = 4 - - # The node represents an AWS organizational unit. - AWS_ORGANIZATIONAL_UNIT = 5 - - # The node represents an AWS account. - AWS_ACCOUNT = 6 - - # The node represents an Azure management group. - AZURE_MANAGEMENT_GROUP = 7 - - # The node represents an Azure subscription. - AZURE_SUBSCRIPTION = 8 - - # The node represents an Azure resource group. - AZURE_RESOURCE_GROUP = 9 - end - end - - # Enumeration representing the various cloud providers a finding's resource - # could reside in. - module CloudProvider - # The cloud provider is unspecified. - CLOUD_PROVIDER_UNSPECIFIED = 0 - - # The cloud provider is Google Cloud Platform. - GOOGLE_CLOUD_PLATFORM = 1 - - # The cloud provider is Amazon Web Services. - AMAZON_WEB_SERVICES = 2 - - # The cloud provider is Microsoft Azure. - MICROSOFT_AZURE = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb deleted file mode 100644 index f231fe97ed46..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/resource_value_config.rb +++ /dev/null @@ -1,125 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # A resource value configuration (RVC) is a mapping configuration of user's - # resources to resource values. Used in Attack path simulations. - # @!attribute [rw] name - # @return [::String] - # Name for the resource value configuration - # @!attribute [rw] resource_value - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] - # Required. Resource value level this expression represents - # @!attribute [rw] tag_values - # @return [::Array<::String>] - # Required. Tag values combined with `AND` to check against. - # Values in the form "tagValues/123" - # Example: `[ "tagValues/123", "tagValues/456", "tagValues/789" ]` - # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing - # @!attribute [rw] resource_type - # @return [::String] - # Apply resource_value only to resources that match resource_type. - # resource_type will be checked with `AND` of other resources. - # For example, "storage.googleapis.com/Bucket" with resource_value "HIGH" - # will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. - # @!attribute [rw] scope - # @return [::String] - # Project or folder to scope this configuration to. - # For example, "project/456" would apply this configuration only to resources - # in "project/456" scope will be checked with `AND` of other - # resources. - # @!attribute [rw] resource_labels_selector - # @return [::Google::Protobuf::Map{::String => ::String}] - # List of resource labels to search for, evaluated with `AND`. - # For example, `"resource_labels_selector": {"key": "value", "env": "prod"}` - # will match resources with labels "key": "value" `AND` "env": - # "prod" - # https://cloud.google.com/resource-manager/docs/creating-managing-labels - # @!attribute [rw] description - # @return [::String] - # Description of the resource value configuration. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp this resource value configuration was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp this resource value configuration was last updated. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] - # Cloud provider this configuration applies to - # @!attribute [rw] sensitive_data_protection_mapping - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig::SensitiveDataProtectionMapping] - # A mapping of the sensitivity on Sensitive Data Protection finding to - # resource values. This mapping can only be used in combination with a - # resource_type that is related to BigQuery, e.g. - # "bigquery.googleapis.com/Dataset". - class ResourceValueConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Resource value mapping for Sensitive Data Protection findings. - # If any of these mappings have a resource value that is not unspecified, - # the resource_value field will be ignored when reading this configuration. - # @!attribute [rw] high_sensitivity_mapping - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] - # Resource value mapping for high-sensitivity Sensitive Data Protection - # findings - # @!attribute [rw] medium_sensitivity_mapping - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValue] - # Resource value mapping for medium-sensitivity Sensitive Data Protection - # findings - class SensitiveDataProtectionMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ResourceLabelsSelectorEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Value enum to map to a resource - module ResourceValue - # Unspecific value - RESOURCE_VALUE_UNSPECIFIED = 0 - - # High resource value - HIGH = 1 - - # Medium resource value - MEDIUM = 2 - - # Low resource value - LOW = 3 - - # No resource value, e.g. ignore these resources - NONE = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb deleted file mode 100644 index c00c755d2726..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/run_asset_discovery_response.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Response of asset discovery run - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryResponse::State] - # The state of an asset discovery run. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # The duration between asset discovery run start and end - class RunAssetDiscoveryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of an asset discovery run. - module State - # Asset discovery run state was unspecified. - STATE_UNSPECIFIED = 0 - - # Asset discovery run completed successfully. - COMPLETED = 1 - - # Asset discovery run was cancelled with tasks still pending, as another - # run for the same organization was started with a higher priority. - SUPERSEDED = 2 - - # Asset discovery run was killed and terminated. - TERMINATED = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb deleted file mode 100644 index 042d8ac3a7b6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_config.rb +++ /dev/null @@ -1,112 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Defines the properties in a custom module configuration for Security - # Health Analytics. Use the custom module configuration to create custom - # detectors that generate custom findings for resources that you specify. - # @!attribute [rw] predicate - # @return [::Google::Type::Expr] - # The CEL expression to evaluate to produce findings. When the expression - # evaluates to true against a resource, a finding is generated. - # @!attribute [rw] custom_output - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::CustomOutputSpec] - # Custom output properties. - # @!attribute [rw] resource_selector - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::ResourceSelector] - # The resource types that the custom module operates on. Each custom module - # can specify up to 5 resource types. - # @!attribute [rw] severity - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig::Severity] - # The severity to assign to findings generated by the module. - # @!attribute [rw] description - # @return [::String] - # Text that describes the vulnerability or misconfiguration that the custom - # module detects. This explanation is returned with each finding instance to - # help investigators understand the detected issue. The text must be enclosed - # in quotation marks. - # @!attribute [rw] recommendation - # @return [::String] - # An explanation of the recommended steps that security teams can take to - # resolve the detected issue. This explanation is returned with each finding - # generated by this module in the `nextSteps` property of the finding JSON. - class CustomConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A set of optional name-value pairs that define custom source properties to - # return with each finding that is generated by the custom module. The custom - # source properties that are defined here are included in the finding JSON - # under `sourceProperties`. - # @!attribute [rw] properties - # @return [::Array<::Google::Cloud::SecurityCenter::V1::CustomConfig::CustomOutputSpec::Property>] - # A list of custom output properties to add to the finding. - class CustomOutputSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An individual name-value pair that defines a custom source property. - # @!attribute [rw] name - # @return [::String] - # Name of the property for the custom output. - # @!attribute [rw] value_expression - # @return [::Google::Type::Expr] - # The CEL expression for the custom output. A resource property can be - # specified to return the value of the property or a text string enclosed - # in quotation marks. - class Property - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Resource for selecting resource type. - # @!attribute [rw] resource_types - # @return [::Array<::String>] - # The resource types to run the detector on. - class ResourceSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the valid value options for the severity of a finding. - module Severity - # Unspecified severity. - SEVERITY_UNSPECIFIED = 0 - - # Critical severity. - CRITICAL = 1 - - # High severity. - HIGH = 2 - - # Medium severity. - MEDIUM = 3 - - # Low severity. - LOW = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb deleted file mode 100644 index 0b327125cfc6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_health_analytics_custom_module.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Represents an instance of a Security Health Analytics custom module, - # including its full module name, display name, enablement state, and last - # updated time. You can create a custom module at the organization, folder, or - # project level. Custom modules that you create at the organization or folder - # level are inherited by the child folders and projects. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name of the custom module. - # Its format is - # "organizations/\\{organization}/securityHealthAnalyticsSettings/customModules/\\{customModule}", - # or - # "folders/\\{folder}/securityHealthAnalyticsSettings/customModules/\\{customModule}", - # or - # "projects/\\{project}/securityHealthAnalyticsSettings/customModules/\\{customModule}" - # - # The id \\{customModule} is server-generated and is not user settable. - # It will be a numeric id containing 1-20 digits. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the Security Health Analytics custom module. This - # display name becomes the finding category for all findings that are - # returned by this custom module. The display name must be between 1 and - # 128 characters, start with a lowercase letter, and contain alphanumeric - # characters or underscores only. - # @!attribute [rw] enablement_state - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule::EnablementState] - # The enablement state of the custom module. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the custom module was last updated. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The editor that last updated the custom module. - # @!attribute [r] ancestor_module - # @return [::String] - # Output only. If empty, indicates that the custom module was created in the - # organization, folder, or project in which you are viewing the custom - # module. Otherwise, `ancestor_module` specifies the organization or folder - # from which the custom module is inherited. - # @!attribute [rw] custom_config - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] - # The user specified custom configuration for the module. - class SecurityHealthAnalyticsCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible enablement states of a custom module. - module EnablementState - # Unspecified enablement state. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given CRM resource. - ENABLED = 1 - - # The module is disabled at the given CRM resource. - DISABLED = 2 - - # State is inherited from an ancestor module. The module will either - # be effectively ENABLED or DISABLED based on its closest non-inherited - # ancestor module in the CRM hierarchy. - INHERITED = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb deleted file mode 100644 index 0fd162583773..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_marks.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # User specified security marks that are attached to the parent Security - # Command Center resource. Security marks are scoped within a Security Command - # Center organization -- they can be modified and viewed by all users who have - # proper permissions on the organization. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of the SecurityMarks. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Examples: - # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks". - # @!attribute [rw] marks - # @return [::Google::Protobuf::Map{::String => ::String}] - # Mutable user specified security marks belonging to the parent resource. - # Constraints are as follows: - # - # * Keys and values are treated as case insensitive - # * Keys must be between 1 - 256 characters (inclusive) - # * Keys must be letters, numbers, underscores, or dashes - # * Values have leading and trailing whitespace trimmed, remaining - # characters must be between 1 - 4096 characters (inclusive) - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the marks. - # Examples: - # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" - # "folders/\\{folder_id}/assets/\\{asset_id}/securityMarks" - # "projects/\\{project_number}/assets/\\{asset_id}/securityMarks" - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" - # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" - # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" - class SecurityMarks - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MarksEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb deleted file mode 100644 index fb8f89c609e0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/security_posture.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Represents a posture that is deployed on Google Cloud by the - # Security Command Center Posture Management service. - # A posture contains one or more policy sets. A policy set is a - # group of policies that enforce a set of security rules on Google - # Cloud. - # @!attribute [rw] name - # @return [::String] - # Name of the posture, for example, `CIS-Posture`. - # @!attribute [rw] revision_id - # @return [::String] - # The version of the posture, for example, `c7cfa2a8`. - # @!attribute [rw] posture_deployment_resource - # @return [::String] - # The project, folder, or organization on which the posture is deployed, - # for example, `projects/{project_number}`. - # @!attribute [rw] posture_deployment - # @return [::String] - # The name of the posture deployment, for example, - # `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. - # @!attribute [rw] changed_policy - # @return [::String] - # The name of the updated policy, for example, - # `projects/{project_id}/policies/{constraint_name}`. - # @!attribute [rw] policy_set - # @return [::String] - # The name of the updated policyset, for example, `cis-policyset`. - # @!attribute [rw] policy - # @return [::String] - # The ID of the updated policy, for example, `compute-policy-1`. - # @!attribute [rw] policy_drift_details - # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityPosture::PolicyDriftDetails>] - # The details about a change in an updated policy that violates the deployed - # posture. - class SecurityPosture - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The policy field that violates the deployed posture and its expected and - # detected values. - # @!attribute [rw] field - # @return [::String] - # The name of the updated field, for example - # constraint.implementation.policy_rules[0].enforce - # @!attribute [rw] expected_value - # @return [::String] - # The value of this field that was configured in a posture, for example, - # `true` or `allowed_values={"projects/29831892"}`. - # @!attribute [rw] detected_value - # @return [::String] - # The detected value that violates the deployed posture, for example, - # `false` or `allowed_values={"projects/22831892"}`. - class PolicyDriftDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb deleted file mode 100644 index 6b9045050b73..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +++ /dev/null @@ -1,2146 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Request message for bulk findings update. - # - # Note: - # 1. If multiple bulk update requests match the same resource, the order in - # which they get executed is not defined. - # 2. Once a bulk operation is started, there is no way to stop it. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, at which bulk action needs to be applied. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @!attribute [rw] filter - # @return [::String] - # Expression that identifies findings that should be updated. - # The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @!attribute [rw] mute_annotation - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # This can be a mute configuration name or any identifier for mute/unmute - # of findings based on the filter. - # @!attribute [rw] mute_state - # @return [::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest::MuteState] - # Optional. All findings matching the given filter will have their mute state - # set to this value. The default value is `MUTED`. Setting this to - # `UNDEFINED` will clear the mute state on all matching findings. - class BulkMuteFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The mute state. - module MuteState - # Unused. - MUTE_STATE_UNSPECIFIED = 0 - - # Matching findings will be muted (default). - MUTED = 1 - - # Matching findings will have their mute state cleared. - UNDEFINED = 2 - end - end - - # The response to a BulkMute request. Contains the LRO information. - class BulkMuteFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a finding. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new finding's parent. Its format should be - # `organizations/[organization_id]/sources/[source_id]`. - # @!attribute [rw] finding_id - # @return [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be alphanumeric and less than or equal to 32 characters and - # greater than 0 characters in length. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # Required. The Finding being created. The name and security_marks will be - # ignored as they are both output only fields on this resource. - class CreateFindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a mute config. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new mute configs's parent. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] mute_config - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # Required. The mute config being created. - # @!attribute [rw] mute_config_id - # @return [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - class CreateMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to create single resource value config - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # @!attribute [rw] resource_value_config - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # Required. The resource value config being created. - class CreateResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to create multiple resource value configs - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # The parent field in the CreateResourceValueConfigRequest - # messages must either be empty or match this field. - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest>] - # Required. The resource value configs to be created. - class BatchCreateResourceValueConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BatchCreateResourceValueConfigs - # @!attribute [rw] resource_value_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # The resource value configs created - class BatchCreateResourceValueConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to delete resource value config - # @!attribute [rw] name - # @return [::String] - # Required. Name of the ResourceValueConfig to delete - class DeleteResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to get resource value config - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource value config to retrieve. Its format is - # `organizations/{organization}/resourceValueConfigs/{config_id}`. - class GetResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to list resource value configs of a parent - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns the collection of resource value configs. - # Its format is - # `organizations/[organization_id]` - # @!attribute [rw] page_size - # @return [::Integer] - # The number of results to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListResourceValueConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListResourceValueConfigs` must match the call that provided the - # page token. - # - # page_size can be specified, and the new page_size will be used. - class ListResourceValueConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message to list resource value configs - # @!attribute [rw] resource_value_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfig>] - # The resource value configs from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is empty, there are no subsequent pages. - class ListResourceValueConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to update resource value config - # @!attribute [rw] resource_value_config - # @return [::Google::Cloud::SecurityCenter::V1::ResourceValueConfig] - # Required. The resource value config being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - class UpdateResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a notification config. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new notification config's parent. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] config_id - # @return [::String] - # Required. - # Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters and contain alphanumeric - # characters, underscores, or hyphens only. - # @!attribute [rw] notification_config - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # Required. The notification config being created. The name and the service - # account will be ignored as they are both output only fields on this - # resource. - class CreateNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating Security Health Analytics custom modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new custom module's parent. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @!attribute [rw] security_health_analytics_custom_module - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # Required. SecurityHealthAnalytics custom module to create. The provided - # name is ignored and reset with provided parent information and - # server-generated ID. - class CreateSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a source. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new source's parent. Its format should be - # `organizations/[organization_id]`. - # @!attribute [rw] source - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # Required. The Source being created, only the display_name and description - # will be used. All other fields will be ignored. - class CreateSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a mute config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the mute config to delete. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - class DeleteMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a notification config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the notification config to delete. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - class DeleteNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting Security Health Analytics custom modules. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the custom module to delete. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - class DeleteSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for retrieving a BigQuery export. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the BigQuery export to retrieve. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - class GetBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for retrieving a mute config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the mute config to retrieve. Its format is - # `organizations/{organization}/muteConfigs/{config_id}`, - # `folders/{folder}/muteConfigs/{config_id}`, - # `projects/{project}/muteConfigs/{config_id}`, - # `organizations/{organization}/locations/global/muteConfigs/{config_id}`, - # `folders/{folder}/locations/global/muteConfigs/{config_id}`, or - # `projects/{project}/locations/global/muteConfigs/{config_id}`. - class GetMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a notification config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the notification config to get. Its format is - # `organizations/[organization_id]/notificationConfigs/[config_id]`, - # `folders/[folder_id]/notificationConfigs/[config_id]`, - # or `projects/[project_id]/notificationConfigs/[config_id]`. - class GetNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting organization settings. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the organization to get organization settings for. Its - # format is `organizations/[organization_id]/organizationSettings`. - class GetOrganizationSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting effective Security Health Analytics custom - # modules. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the effective custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}` - class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting Security Health Analytics custom modules. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the custom module to get. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, - # or - # `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}` - class GetSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a source. - # @!attribute [rw] name - # @return [::String] - # Required. Relative resource name of the source. Its format is - # `organizations/[organization_id]/source/[source_id]`. - class GetSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for grouping by assets. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent to group the assets by. Its format is - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @!attribute [rw] group_by - # @return [::String] - # Required. Expression that defines what assets fields to use for grouping. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: - # "security_center_properties.resource_project,security_center_properties.project". - # - # The following fields are supported when compare_duration is not set: - # - # * security_center_properties.resource_project - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_type - # * security_center_properties.resource_parent - # * security_center_properties.resource_parent_display_name - # - # The following fields are supported when compare_duration is set: - # - # * security_center_properties.resource_type - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_parent_display_name - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the GroupResult's "state_change" property is - # updated to indicate whether the asset was added, removed, or remained - # present during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at reference_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at reference_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and reference_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `GroupAssetsResponse`; indicates - # that this is a continuation of a prior `GroupAssets` call, and that the - # system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class GroupAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for grouping by assets. - # @!attribute [rw] group_by_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # Group results. There exists an element for each existing unique - # combination of property/values. The element contains a count for the number - # of times those specific property/values appear. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the groupBy request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of results matching the query. - class GroupAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for grouping by findings. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the source to groupBy. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To groupBy across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, - # or `projects/{project_id}/sources/-` - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # @!attribute [rw] group_by - # @return [::String] - # Required. Expression that defines what assets fields to use for grouping - # (including `state_change`). The string value should follow SQL syntax: - # comma separated list of fields. For example: "parent,resource_name". - # - # The following fields are supported when compare_duration is set: - # - # * state_change - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the GroupResult's "state_change" attribute is - # updated to indicate whether the finding had its state changed, the - # finding's state remained unchanged, or if the finding was added during the - # compare_duration period of time that precedes the read_time. This is the - # time between (read_time - compare_duration) and read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present - # at read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class GroupFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for group by findings. - # @!attribute [rw] group_by_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1::GroupResult>] - # Group results. There exists an element for each existing unique - # combination of property/values. The element contains a count for the number - # of times those specific property/values appear. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the groupBy request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of results matching the query. - class GroupFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Result containing the properties and count of a groupBy request. - # @!attribute [rw] properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Properties matching the groupBy fields in the request. - # @!attribute [rw] count - # @return [::Integer] - # Total count of resources for the given properties. - class GroupResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class PropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for listing descendant Security Health Analytics custom - # modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list descendant custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last call indicating a continuation - class ListDescendantSecurityHealthAnalyticsCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing descendant Security Health Analytics custom - # modules. - # @!attribute [rw] security_health_analytics_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # Custom modules belonging to the requested parent and its descendants. - # @!attribute [rw] next_page_token - # @return [::String] - # If not empty, indicates that there may be more custom modules to be - # returned. - class ListDescendantSecurityHealthAnalyticsCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing the valued resources for a given simulation. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list valued resources. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # @!attribute [rw] filter - # @return [::String] - # The filter expression that filters the valued resources in the response. - # Supported fields: - # - # * `resource_value` supports = - # * `resource_type` supports = - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListValuedResourcesResponse`; indicates - # that this is a continuation of a prior `ListValuedResources` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The fields by which to order the valued resources response. - # - # Supported fields: - # - # * `exposed_score` - # - # * `resource_value` - # - # * `resource_type` - # - # * `resource` - # - # * `display_name` - # - # Values should be a comma separated list of fields. For example: - # `exposed_score,resource_value`. - # - # The default sorting order is descending. To specify ascending or descending - # order for a field, append a ` ASC` or a ` DESC` suffix, respectively; for - # example: `exposed_score DESC`. - class ListValuedResourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing the valued resources for a given simulation. - # @!attribute [rw] valued_resources - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ValuedResource>] - # The valued resources that the attack path simulation identified. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The estimated total number of results matching the query. - class ListValuedResourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing the attack paths for a given simulation or valued - # resource. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list attack paths. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @!attribute [rw] filter - # @return [::String] - # The filter expression that filters the attack path in the response. - # Supported fields: - # - # * `valued_resources` supports = - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListAttackPathsResponse`; indicates - # that this is a continuation of a prior `ListAttackPaths` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListAttackPathsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing the attack paths for a given simulation or - # valued resource. - # @!attribute [rw] attack_paths - # @return [::Array<::Google::Cloud::SecurityCenter::V1::AttackPath>] - # The attack paths that the attack path simulation identified. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - class ListAttackPathsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting simulation. - # Simulation name can include "latest" to retrieve the latest simulation - # For example, "organizations/123/simulations/latest" - # @!attribute [rw] name - # @return [::String] - # Required. The organization name or simulation name of this simulation - # - # Valid format: - # `organizations/{organization}/simulations/latest` - # `organizations/{organization}/simulations/{simulation}` - class GetSimulationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a valued resource. - # @!attribute [rw] name - # @return [::String] - # Required. The name of this valued resource - # - # Valid format: - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - class GetValuedResourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing mute configs at a given scope e.g. organization, - # folder or project. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns the collection of mute configs. Its format - # is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListMuteConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMuteConfigs` must - # match the call that provided the page token. - class ListMuteConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing mute configs. - # @!attribute [rw] mute_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V1::MuteConfig>] - # The mute configs from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListMuteConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing notification configs. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent in which to list the notification - # configurations. Its format is "organizations/[organization_id]", - # "folders/[folder_id]", or "projects/[project_id]". - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListNotificationConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing notification configs. - # @!attribute [rw] notification_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V1::NotificationConfig>] - # Notification configs belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - class ListNotificationConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing effective Security Health Analytics custom - # modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list effective custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last call indicating a continuation - class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing effective Security Health Analytics custom - # modules. - # @!attribute [rw] effective_security_health_analytics_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # Effective custom modules belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # If not empty, indicates that there may be more effective custom modules to - # be returned. - class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing Security Health Analytics custom modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list custom modules. Its format is - # `organizations/{organization}/securityHealthAnalyticsSettings`, - # `folders/{folder}/securityHealthAnalyticsSettings`, or - # `projects/{project}/securityHealthAnalyticsSettings` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last call indicating a continuation - class ListSecurityHealthAnalyticsCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing Security Health Analytics custom modules. - # @!attribute [rw] security_health_analytics_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule>] - # Custom modules belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # If not empty, indicates that there may be more custom modules to be - # returned. - class ListSecurityHealthAnalyticsCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing sources. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent of sources to list. Its format should - # be `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing sources. - # @!attribute [rw] sources - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Source>] - # Sources belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - class ListSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing assets. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource that contains the assets. The - # value that you can specify on parent depends on the method in which you - # specify parent. You can specify one of the following values: - # `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following are the allowed field and operator combinations: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @!attribute [rw] order_by - # @return [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,resource_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,resource_properties.a_property" and " - # name desc , resource_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # update_time - # resource_properties - # security_marks.marks - # security_center_properties.resource_name - # security_center_properties.resource_display_name - # security_center_properties.resource_parent - # security_center_properties.resource_parent_display_name - # security_center_properties.resource_project - # security_center_properties.resource_project_display_name - # security_center_properties.resource_type - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the ListAssetsResult's "state_change" - # attribute is updated to indicate whether the asset was added, removed, or - # remained present during the compare_duration period of time that precedes - # the read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at read_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at read_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # A field mask to specify the ListAssetsResult fields to be listed in the - # response. - # An empty field mask will list all fields. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListAssetsResponse`; indicates - # that this is a continuation of a prior `ListAssets` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing assets. - # @!attribute [rw] list_assets_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult>] - # Assets matching the list request. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the list request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of assets matching the query. - class ListAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Result containing the Asset and its State. - # @!attribute [rw] asset - # @return [::Google::Cloud::SecurityCenter::V1::Asset] - # Asset matching the search request. - # @!attribute [rw] state_change - # @return [::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult::StateChange] - # State change of the asset between the points in time. - class ListAssetsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The change in state of the asset. - # - # When querying across two points in time this describes - # the change between the two points: ADDED, REMOVED, or ACTIVE. - # If there was no compare_duration supplied in the request the state change - # will be: UNUSED - module StateChange - # State change is unused, this is the canonical default for this enum. - UNUSED = 0 - - # Asset was added between the points in time. - ADDED = 1 - - # Asset was removed between the points in time. - REMOVED = 2 - - # Asset was present at both point(s) in time. - ACTIVE = 3 - end - end - end - - # Request message for listing findings. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the source the findings belong to. Its format is - # `organizations/[organization_id]/sources/[source_id]`, - # `folders/[folder_id]/sources/[source_id]`, or - # `projects/[project_id]/sources/[source_id]`. To list across all sources - # provide a source_id of `-`. For example: - # `organizations/{organization_id}/sources/-`, - # `folders/{folder_id}/sources/-` or `projects/{projects_id}/sources/-` - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * workflow_state: `=`, `:` - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.display_name: `=`, `:` - # @!attribute [rw] order_by - # @return [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,source_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,source_properties.a_property" and " - # name desc , source_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # source_properties - # security_marks.marks - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the ListFindingsResult's "state_change" - # attribute is updated to indicate whether the finding had its state changed, - # the finding's state remained unchanged, or if the finding was added in any - # state during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present at - # read_time. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing findings. - # @!attribute [rw] list_findings_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult>] - # Findings matching the list request. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the list request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of findings matching the query. - class ListFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Result containing the Finding and its StateChange. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # Finding matching the search request. - # @!attribute [rw] state_change - # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult::StateChange] - # State change of the finding between the points in time. - # @!attribute [r] resource - # @return [::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult::Resource] - # Output only. Resource that is associated with this finding. - class ListFindingsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information related to the Google Cloud resource that is - # associated with this finding. - # @!attribute [rw] name - # @return [::String] - # The full resource name of the resource. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] display_name - # @return [::String] - # The human readable name of the resource. - # @!attribute [rw] type - # @return [::String] - # The full resource type of the resource. - # @!attribute [rw] project_name - # @return [::String] - # The full resource name of project that the resource belongs to. - # @!attribute [rw] project_display_name - # @return [::String] - # The project ID that the resource belongs to. - # @!attribute [rw] parent_name - # @return [::String] - # The full resource name of resource's parent. - # @!attribute [rw] parent_display_name - # @return [::String] - # The human readable name of resource's parent. - # @!attribute [rw] folders - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>] - # Contains a Folder message for each folder in the assets ancestry. - # The first folder is the deepest nested folder, and the last folder is - # the folder directly under the Organization. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] - # Indicates which cloud provider the finding is from. - # @!attribute [rw] organization - # @return [::String] - # Indicates which organization / tenant the finding is for. - # @!attribute [rw] service - # @return [::String] - # The service or resource provider associated with the resource. - # @!attribute [rw] location - # @return [::String] - # The region or location of the service (if applicable). - # @!attribute [rw] aws_metadata - # @return [::Google::Cloud::SecurityCenter::V1::AwsMetadata] - # The AWS metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] azure_metadata - # @return [::Google::Cloud::SecurityCenter::V1::AzureMetadata] - # The Azure metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `azure_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource_path - # @return [::Google::Cloud::SecurityCenter::V1::ResourcePath] - # Provides the path to the resource within the resource hierarchy. - # @!attribute [rw] resource_path_string - # @return [::String] - # A string representation of the resource path. - # For Google Cloud, it has the format of - # `org/{organization_id}/folder/{folder_id}/folder/{folder_id}/project/{project_id}` - # where there can be any number of folders. - # For AWS, it has the format of - # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` - # where there can be any number of organizational units. - # For Azure, it has the format of - # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` - # where there can be any number of management groups. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The change in state of the finding. - # - # When querying across two points in time this describes - # the change in the finding between the two points: CHANGED, UNCHANGED, - # ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that - # the finding at timestamp does not match the filter specified, but it did - # at timestamp - compare_duration. If there was no compare_duration - # supplied in the request the state change will be: UNUSED - module StateChange - # State change is unused, this is the canonical default for this enum. - UNUSED = 0 - - # The finding has changed state in some way between the points in time - # and existed at both points. - CHANGED = 1 - - # The finding has not changed state between the points in time and - # existed at both points. - UNCHANGED = 2 - - # The finding was created between the points in time. - ADDED = 3 - - # The finding at timestamp does not match the filter specified, but it - # did at timestamp - compare_duration. - REMOVED = 4 - end - end - end - - # Request message for updating a finding's state. - # @!attribute [rw] name - # @return [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1::Finding::State] - # Required. The desired State of the finding. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Required. The time at which the updated state takes effect. - class SetFindingStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a finding's mute status. - # @!attribute [rw] name - # @return [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. Example: - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - # `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. - # @!attribute [rw] mute - # @return [::Google::Cloud::SecurityCenter::V1::Finding::Mute] - # Required. The desired state of the Mute. - class SetMuteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for running asset discovery for an organization. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the organization to run asset discovery for. Its format - # is `organizations/[organization_id]`. - class RunAssetDiscoveryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to simulate a CustomConfig against a given test resource. - # Maximum size of the request is 4 MB by default. - # @!attribute [rw] parent - # @return [::String] - # Required. The relative resource name of the organization, project, or - # folder. For more information about relative resource names, see [Relative - # Resource - # Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # Example: `organizations/{organization_id}` - # @!attribute [rw] custom_config - # @return [::Google::Cloud::SecurityCenter::V1::CustomConfig] - # Required. The custom configuration that you need to test. - # @!attribute [rw] resource - # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource] - # Required. Resource data to simulate custom module against. - class SimulateSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Manually constructed resource name. If the custom module evaluates against - # only the resource data, you can omit the `iam_policy_data` field. If it - # evaluates only the `iam_policy_data` field, you can omit the resource data. - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the resource, for example, - # `compute.googleapis.com/Disk`. - # @!attribute [rw] resource_data - # @return [::Google::Protobuf::Struct] - # Optional. A representation of the Google Cloud resource. Should match the - # Google Cloud resource JSON format. - # @!attribute [rw] iam_policy_data - # @return [::Google::Iam::V1::Policy] - # Optional. A representation of the IAM policy. - class SimulatedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for simulating a `SecurityHealthAnalyticsCustomModule` - # against a given resource. - # @!attribute [rw] result - # @return [::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse::SimulatedResult] - # Result for test case in the corresponding request. - class SimulateSecurityHealthAnalyticsCustomModuleResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible test result. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # Finding that would be published for the test case, - # if a violation is detected. - # - # Note: The following fields are mutually exclusive: `finding`, `no_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] no_violation - # @return [::Google::Protobuf::Empty] - # Indicates that the test case does not trigger any violation. - # - # Note: The following fields are mutually exclusive: `no_violation`, `finding`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Error encountered during the test. - # - # Note: The following fields are mutually exclusive: `error`, `finding`, `no_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SimulatedResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for updating a ExternalSystem resource. - # @!attribute [rw] external_system - # @return [::Google::Cloud::SecurityCenter::V1::ExternalSystem] - # Required. The external system resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the external system resource. - # - # If empty all mutable fields will be updated. - class UpdateExternalSystemRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating or creating a finding. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1::Finding] - # Required. The finding resource to update or create if it does not already - # exist. parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - class UpdateFindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a mute config. - # @!attribute [rw] mute_config - # @return [::Google::Cloud::SecurityCenter::V1::MuteConfig] - # Required. The mute config being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - class UpdateMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a notification config. - # @!attribute [rw] notification_config - # @return [::Google::Cloud::SecurityCenter::V1::NotificationConfig] - # Required. The notification config to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - class UpdateNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating an organization's settings. - # @!attribute [rw] organization_settings - # @return [::Google::Cloud::SecurityCenter::V1::OrganizationSettings] - # Required. The organization settings resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the settings resource. - # - # If empty all mutable fields will be updated. - class UpdateOrganizationSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating Security Health Analytics custom modules. - # @!attribute [rw] security_health_analytics_custom_module - # @return [::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule] - # Required. The SecurityHealthAnalytics custom module to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. The only fields that can be updated are - # `enablement_state` and `custom_config`. If empty or set to the wildcard - # value `*`, both `enablement_state` and `custom_config` are updated. - class UpdateSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a source. - # @!attribute [rw] source - # @return [::Google::Cloud::SecurityCenter::V1::Source] - # Required. The source resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - class UpdateSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a SecurityMarks resource. - # @!attribute [rw] security_marks - # @return [::Google::Cloud::SecurityCenter::V1::SecurityMarks] - # Required. The security marks resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the updated SecurityMarks take effect. - # If not set uses current server time. Updates will be applied to the - # SecurityMarks that are active immediately preceding this time. Must be - # earlier or equal to the server time. - class UpdateSecurityMarksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a BigQuery export. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource of the new BigQuery export. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] big_query_export - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # Required. The BigQuery export being created. - # @!attribute [rw] big_query_export_id - # @return [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - class CreateBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a BigQuery export. - # @!attribute [rw] big_query_export - # @return [::Google::Cloud::SecurityCenter::V1::BigQueryExport] - # Required. The BigQuery export being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - class UpdateBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing BigQuery exports at a given scope e.g. - # organization, folder or project. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns the collection of BigQuery exports. Its - # format is `organizations/[organization_id]`, `folders/[folder_id]`, - # `projects/[project_id]`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListBigQueryExports` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListBigQueryExports` - # must match the call that provided the page token. - class ListBigQueryExportsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing BigQuery exports. - # @!attribute [rw] big_query_exports - # @return [::Array<::Google::Cloud::SecurityCenter::V1::BigQueryExport>] - # The BigQuery exports from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListBigQueryExportsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a BigQuery export. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the BigQuery export to delete. Its format is - # `organizations/{organization}/bigQueryExports/{export_id}`, - # `folders/{folder}/bigQueryExports/{export_id}`, or - # `projects/{project}/bigQueryExports/{export_id}` - class DeleteBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create an Event Threat Detection custom module. - # @!attribute [rw] parent - # @return [::String] - # Required. The new custom module's parent. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @!attribute [rw] event_threat_detection_custom_module - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # Required. The module to create. The - # event_threat_detection_custom_module.name will be ignored and server - # generated. - class CreateEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to validate an Event Threat Detection custom module. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent to validate the Custom Module under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @!attribute [rw] raw_text - # @return [::String] - # Required. The raw text of the module's contents. Used to generate error - # messages. - # @!attribute [rw] type - # @return [::String] - # Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). - class ValidateEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to validating an Event Threat Detection custom module. - # @!attribute [rw] errors - # @return [::Google::Cloud::SecurityCenter::V1::CustomModuleValidationErrors] - # A list of errors returned by the validator. If the list is empty, there - # were no errors. - class ValidateEventThreatDetectionCustomModuleResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete an Event Threat Detection custom module. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the custom module to delete. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - class DeleteEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get an Event Threat Detection custom module. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the custom module to get. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. - class GetEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list current and descendant resident Event Threat Detection custom - # modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous - # `ListDescendantEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListDescendantEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - class ListDescendantEventThreatDetectionCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for listing current and descendant resident - # Event Threat Detection custom modules. - # @!attribute [rw] event_threat_detection_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # Custom modules belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDescendantEventThreatDetectionCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list Event Threat Detection custom modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent to list custom modules under. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous - # `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListEventThreatDetectionCustomModules` must match the call that provided - # the page token. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - class ListEventThreatDetectionCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for listing Event Threat Detection custom modules. - # @!attribute [rw] event_threat_detection_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule>] - # Custom modules belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListEventThreatDetectionCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update an Event Threat Detection custom module. - # @!attribute [rw] event_threat_detection_custom_module - # @return [::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule] - # Required. The module being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - class UpdateEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get an EffectiveEventThreatDetectionCustomModule. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the effective Event Threat Detection custom - # module. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - # * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. - class GetEffectiveEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list effective Event Threat Detection custom modules. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent to list custom modules for. - # - # Its format is: - # - # * `organizations/{organization}/eventThreatDetectionSettings`. - # * `folders/{folder}/eventThreatDetectionSettings`. - # * `projects/{project}/eventThreatDetectionSettings`. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous - # `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to - # retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListEffectiveEventThreatDetectionCustomModules` must match the call that - # provided the page token. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of modules to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - class ListEffectiveEventThreatDetectionCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for listing EffectiveEventThreatDetectionCustomModules. - # @!attribute [rw] effective_event_threat_detection_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule>] - # Effective custom modules belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListEffectiveEventThreatDetectionCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb deleted file mode 100644 index 63924f12b411..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/simulation.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Attack path simulation - # @!attribute [rw] name - # @return [::String] - # Full resource name of the Simulation: - # `organizations/123/simulations/456` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time simulation was created - # @!attribute [rw] resource_value_configs_metadata - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfigMetadata>] - # Resource value configurations' metadata used in this simulation. Maximum of - # 100. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V1::CloudProvider] - # Indicates which cloud provider was used in this simulation. - class Simulation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb deleted file mode 100644 index 4ccbdd08fd29..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/source.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Security Command Center finding source. A finding source - # is an entity or a mechanism that can produce a finding. A source is like a - # container of findings that come from the same scanner, logger, monitor, and - # other tools. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this source. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/sources/\\{source_id}" - # @!attribute [rw] display_name - # @return [::String] - # The source's display name. - # A source's display name must be unique amongst its siblings, for example, - # two sources with the same parent can't share the same display name. - # The display name must have a length between 1 and 64 characters - # (inclusive). - # @!attribute [rw] description - # @return [::String] - # The description of the source (max of 1024 characters). - # Example: - # "Web Security Scanner is a web security scanner for common - # vulnerabilities in App Engine applications. It can automatically - # scan and detect four common vulnerabilities, including cross-site-scripting - # (XSS), Flash injection, mixed content (HTTP in HTTPS), and - # outdated or insecure libraries." - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the finding source. It's either - # "organizations/\\{organization_id}/sources/\\{source_id}", - # "folders/\\{folder_id}/sources/\\{source_id}", or - # "projects/\\{project_number}/sources/\\{source_id}", - # depending on the closest CRM ancestor of the resource associated with the - # finding. - class Source - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb deleted file mode 100644 index 4ad02b3ce5f0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/toxic_combination.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1 - # Contains details about a group of security issues that, when the issues - # occur together, represent a greater risk than when the issues occur - # independently. A group of such issues is referred to as a toxic combination. - # @!attribute [rw] attack_exposure_score - # @return [::Float] - # The - # [Attack exposure - # score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) - # of this toxic combination. The score is a measure of how much this toxic - # combination exposes one or more high-value resources to potential attack. - # @!attribute [rw] related_findings - # @return [::Array<::String>] - # List of resource names of findings associated with this toxic combination. - # For example, `organizations/123/sources/456/findings/789`. - class ToxicCombination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb deleted file mode 100644 index 1cd95d5b43f1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/valued_resource.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # A resource that is determined to have value to a user's system - # @!attribute [rw] name - # @return [::String] - # Valued resource name, for example, - # e.g.: - # `organizations/123/simulations/456/valuedResources/789` - # @!attribute [rw] resource - # @return [::String] - # The - # [full resource - # name](https://cloud.google.com/apis/design/resource_names#full_resource_name) - # of the valued resource. - # @!attribute [rw] resource_type - # @return [::String] - # The [resource - # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # of the valued resource. - # @!attribute [rw] display_name - # @return [::String] - # Human-readable name of the valued resource. - # @!attribute [rw] resource_value - # @return [::Google::Cloud::SecurityCenter::V1::ValuedResource::ResourceValue] - # How valuable this resource is. - # @!attribute [rw] exposed_score - # @return [::Float] - # Exposed score for this valued resource. A value of 0 means no exposure was - # detected exposure. - # @!attribute [rw] resource_value_configs_used - # @return [::Array<::Google::Cloud::SecurityCenter::V1::ResourceValueConfigMetadata>] - # List of resource value configurations' metadata used to determine the value - # of this resource. Maximum of 100. - class ValuedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # How valuable the resource is. - module ResourceValue - # The resource value isn't specified. - RESOURCE_VALUE_UNSPECIFIED = 0 - - # This is a low-value resource. - RESOURCE_VALUE_LOW = 1 - - # This is a medium-value resource. - RESOURCE_VALUE_MEDIUM = 2 - - # This is a high-value resource. - RESOURCE_VALUE_HIGH = 3 - end - end - - # Metadata about a ResourceValueConfig. For example, id and name. - # @!attribute [rw] name - # @return [::String] - # Resource value config name - class ResourceValueConfigMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb deleted file mode 100644 index aadd507c0a50..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb +++ /dev/null @@ -1,336 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Refers to common vulnerability fields e.g. cve, cvss, cwe etc. - # @!attribute [rw] cve - # @return [::Google::Cloud::SecurityCenter::V1::Cve] - # CVE stands for Common Vulnerabilities and Exposures - # (https://cve.mitre.org/about/) - # @!attribute [rw] offending_package - # @return [::Google::Cloud::SecurityCenter::V1::Package] - # The offending package is relevant to the finding. - # @!attribute [rw] fixed_package - # @return [::Google::Cloud::SecurityCenter::V1::Package] - # The fixed package is relevant to the finding. - # @!attribute [rw] security_bulletin - # @return [::Google::Cloud::SecurityCenter::V1::SecurityBulletin] - # The security bulletin is relevant to this finding. - class Vulnerability - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CVE stands for Common Vulnerabilities and Exposures. - # Information from the [CVE - # record](https://www.cve.org/ResourcesSupport/Glossary) that describes this - # vulnerability. - # @!attribute [rw] id - # @return [::String] - # The unique identifier for the vulnerability. e.g. CVE-2021-34527 - # @!attribute [rw] references - # @return [::Array<::Google::Cloud::SecurityCenter::V1::Reference>] - # Additional information about the CVE. - # e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 - # @!attribute [rw] cvssv3 - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3] - # Describe Common Vulnerability Scoring System specified at - # https://www.first.org/cvss/v3.1/specification-document - # @!attribute [rw] upstream_fix_available - # @return [::Boolean] - # Whether upstream fix is available for the CVE. - # @!attribute [rw] impact - # @return [::Google::Cloud::SecurityCenter::V1::Cve::RiskRating] - # The potential impact of the vulnerability if it was to be exploited. - # @!attribute [rw] exploitation_activity - # @return [::Google::Cloud::SecurityCenter::V1::Cve::ExploitationActivity] - # The exploitation activity of the vulnerability in the wild. - # @!attribute [rw] observed_in_the_wild - # @return [::Boolean] - # Whether or not the vulnerability has been observed in the wild. - # @!attribute [rw] zero_day - # @return [::Boolean] - # Whether or not the vulnerability was zero day when the finding was - # published. - # @!attribute [rw] exploit_release_date - # @return [::Google::Protobuf::Timestamp] - # Date the first publicly available exploit or PoC was released. - class Cve - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible values of impact of the vulnerability if it was to be - # exploited. - module RiskRating - # Invalid or empty value. - RISK_RATING_UNSPECIFIED = 0 - - # Exploitation would have little to no security impact. - LOW = 1 - - # Exploitation would enable attackers to perform activities, or could allow - # attackers to have a direct impact, but would require additional steps. - MEDIUM = 2 - - # Exploitation would enable attackers to have a notable direct impact - # without needing to overcome any major mitigating factors. - HIGH = 3 - - # Exploitation would fundamentally undermine the security of affected - # systems, enable actors to perform significant attacks with minimal - # effort, with little to no mitigating factors to overcome. - CRITICAL = 4 - end - - # The possible values of exploitation activity of the vulnerability in the - # wild. - module ExploitationActivity - # Invalid or empty value. - EXPLOITATION_ACTIVITY_UNSPECIFIED = 0 - - # Exploitation has been reported or confirmed to widely occur. - WIDE = 1 - - # Limited reported or confirmed exploitation activities. - CONFIRMED = 2 - - # Exploit is publicly available. - AVAILABLE = 3 - - # No known exploitation activity, but has a high potential for - # exploitation. - ANTICIPATED = 4 - - # No known exploitation activity. - NO_KNOWN = 5 - end - end - - # Additional Links - # @!attribute [rw] source - # @return [::String] - # Source of the reference e.g. NVD - # @!attribute [rw] uri - # @return [::String] - # Uri for the mentioned source e.g. - # https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. - class Reference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Common Vulnerability Scoring System version 3. - # @!attribute [rw] base_score - # @return [::Float] - # The base score is a function of the base metric scores. - # @!attribute [rw] attack_vector - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::AttackVector] - # Base Metrics - # Represents the intrinsic characteristics of a vulnerability that are - # constant over time and across user environments. - # This metric reflects the context by which vulnerability exploitation is - # possible. - # @!attribute [rw] attack_complexity - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::AttackComplexity] - # This metric describes the conditions beyond the attacker's control that - # must exist in order to exploit the vulnerability. - # @!attribute [rw] privileges_required - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::PrivilegesRequired] - # This metric describes the level of privileges an attacker must possess - # before successfully exploiting the vulnerability. - # @!attribute [rw] user_interaction - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::UserInteraction] - # This metric captures the requirement for a human user, other than the - # attacker, to participate in the successful compromise of the vulnerable - # component. - # @!attribute [rw] scope - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Scope] - # The Scope metric captures whether a vulnerability in one vulnerable - # component impacts resources in components beyond its security scope. - # @!attribute [rw] confidentiality_impact - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] - # This metric measures the impact to the confidentiality of the information - # resources managed by a software component due to a successfully exploited - # vulnerability. - # @!attribute [rw] integrity_impact - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] - # This metric measures the impact to integrity of a successfully exploited - # vulnerability. - # @!attribute [rw] availability_impact - # @return [::Google::Cloud::SecurityCenter::V1::Cvssv3::Impact] - # This metric measures the impact to the availability of the impacted - # component resulting from a successfully exploited vulnerability. - class Cvssv3 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This metric reflects the context by which vulnerability exploitation is - # possible. - module AttackVector - # Invalid value. - ATTACK_VECTOR_UNSPECIFIED = 0 - - # The vulnerable component is bound to the network stack and the set of - # possible attackers extends beyond the other options listed below, up to - # and including the entire Internet. - ATTACK_VECTOR_NETWORK = 1 - - # The vulnerable component is bound to the network stack, but the attack is - # limited at the protocol level to a logically adjacent topology. - ATTACK_VECTOR_ADJACENT = 2 - - # The vulnerable component is not bound to the network stack and the - # attacker's path is via read/write/execute capabilities. - ATTACK_VECTOR_LOCAL = 3 - - # The attack requires the attacker to physically touch or manipulate the - # vulnerable component. - ATTACK_VECTOR_PHYSICAL = 4 - end - - # This metric describes the conditions beyond the attacker's control that - # must exist in order to exploit the vulnerability. - module AttackComplexity - # Invalid value. - ATTACK_COMPLEXITY_UNSPECIFIED = 0 - - # Specialized access conditions or extenuating circumstances do not exist. - # An attacker can expect repeatable success when attacking the vulnerable - # component. - ATTACK_COMPLEXITY_LOW = 1 - - # A successful attack depends on conditions beyond the attacker's control. - # That is, a successful attack cannot be accomplished at will, but requires - # the attacker to invest in some measurable amount of effort in preparation - # or execution against the vulnerable component before a successful attack - # can be expected. - ATTACK_COMPLEXITY_HIGH = 2 - end - - # This metric describes the level of privileges an attacker must possess - # before successfully exploiting the vulnerability. - module PrivilegesRequired - # Invalid value. - PRIVILEGES_REQUIRED_UNSPECIFIED = 0 - - # The attacker is unauthorized prior to attack, and therefore does not - # require any access to settings or files of the vulnerable system to - # carry out an attack. - PRIVILEGES_REQUIRED_NONE = 1 - - # The attacker requires privileges that provide basic user capabilities - # that could normally affect only settings and files owned by a user. - # Alternatively, an attacker with Low privileges has the ability to access - # only non-sensitive resources. - PRIVILEGES_REQUIRED_LOW = 2 - - # The attacker requires privileges that provide significant (e.g., - # administrative) control over the vulnerable component allowing access to - # component-wide settings and files. - PRIVILEGES_REQUIRED_HIGH = 3 - end - - # This metric captures the requirement for a human user, other than the - # attacker, to participate in the successful compromise of the vulnerable - # component. - module UserInteraction - # Invalid value. - USER_INTERACTION_UNSPECIFIED = 0 - - # The vulnerable system can be exploited without interaction from any user. - USER_INTERACTION_NONE = 1 - - # Successful exploitation of this vulnerability requires a user to take - # some action before the vulnerability can be exploited. - USER_INTERACTION_REQUIRED = 2 - end - - # The Scope metric captures whether a vulnerability in one vulnerable - # component impacts resources in components beyond its security scope. - module Scope - # Invalid value. - SCOPE_UNSPECIFIED = 0 - - # An exploited vulnerability can only affect resources managed by the same - # security authority. - SCOPE_UNCHANGED = 1 - - # An exploited vulnerability can affect resources beyond the security scope - # managed by the security authority of the vulnerable component. - SCOPE_CHANGED = 2 - end - - # The Impact metrics capture the effects of a successfully exploited - # vulnerability on the component that suffers the worst outcome that is most - # directly and predictably associated with the attack. - module Impact - # Invalid value. - IMPACT_UNSPECIFIED = 0 - - # High impact. - IMPACT_HIGH = 1 - - # Low impact. - IMPACT_LOW = 2 - - # No impact. - IMPACT_NONE = 3 - end - end - - # Package is a generic definition of a package. - # @!attribute [rw] package_name - # @return [::String] - # The name of the package where the vulnerability was detected. - # @!attribute [rw] cpe_uri - # @return [::String] - # The CPE URI where the vulnerability was detected. - # @!attribute [rw] package_type - # @return [::String] - # Type of package, for example, os, maven, or go. - # @!attribute [rw] package_version - # @return [::String] - # The version of the package. - class Package - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SecurityBulletin are notifications of vulnerabilities of Google products. - # @!attribute [rw] bulletin_id - # @return [::String] - # ID of the bulletin corresponding to the vulnerability. - # @!attribute [rw] submission_time - # @return [::Google::Protobuf::Timestamp] - # Submission time of this Security Bulletin. - # @!attribute [rw] suggested_upgrade_version - # @return [::String] - # This represents a version that the cluster receiving this notification - # should be upgraded to, based on its current version. For example, 1.15.0 - class SecurityBulletin - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile deleted file mode 100644 index f16288a177ba..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-security_center-v1", path: "../" -else - gem "google-cloud-security_center-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb deleted file mode 100644 index 62423aec31af..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/batch_create_resource_value_configs.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the batch_create_resource_value_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs. -# -def batch_create_resource_value_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new - - # Call the batch_create_resource_value_configs method. - result = client.batch_create_resource_value_configs request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb deleted file mode 100644 index 93db8d1e0876..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/bulk_mute_findings.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the bulk_mute_findings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings. -# -def bulk_mute_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new - - # Call the bulk_mute_findings method. - result = client.bulk_mute_findings request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb deleted file mode 100644 index be92178bf7b4..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export. -# -def create_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new - - # Call the create_big_query_export method. - result = client.create_big_query_export request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb deleted file mode 100644 index 08036d256638..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module. -# -def create_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new - - # Call the create_event_threat_detection_custom_module method. - result = client.create_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb deleted file mode 100644 index 0b195fb59e80..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_finding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_finding call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding. -# -def create_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new - - # Call the create_finding method. - result = client.create_finding request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb deleted file mode 100644 index 7c91c84d013c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config. -# -def create_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new - - # Call the create_mute_config method. - result = client.create_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb deleted file mode 100644 index 9d25cf280532..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config. -# -def create_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new - - # Call the create_notification_config method. - result = client.create_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb deleted file mode 100644 index 5de06ad0e47b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module. -# -def create_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the create_security_health_analytics_custom_module method. - result = client.create_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb deleted file mode 100644 index 426ebeba8ec5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/create_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_CreateSource_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the create_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source. -# -def create_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new - - # Call the create_source method. - result = client.create_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb deleted file mode 100644 index e549c6d67597..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export. -# -def delete_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new - - # Call the delete_big_query_export method. - result = client.delete_big_query_export request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb deleted file mode 100644 index 9da872ba42f6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module. -# -def delete_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new - - # Call the delete_event_threat_detection_custom_module method. - result = client.delete_event_threat_detection_custom_module request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb deleted file mode 100644 index ea8a60533934..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config. -# -def delete_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new - - # Call the delete_mute_config method. - result = client.delete_mute_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb deleted file mode 100644 index 6bc88e7ff81e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config. -# -def delete_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new - - # Call the delete_notification_config method. - result = client.delete_notification_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb deleted file mode 100644 index a39d9a23c8fd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_resource_value_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_resource_value_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config. -# -def delete_resource_value_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new - - # Call the delete_resource_value_config method. - result = client.delete_resource_value_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb deleted file mode 100644 index 946a821c16e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/delete_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module. -# -def delete_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the delete_security_health_analytics_custom_module method. - result = client.delete_security_health_analytics_custom_module request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb deleted file mode 100644 index 1c58bd5b0d78..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export. -# -def get_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new - - # Call the get_big_query_export method. - result = client.get_big_query_export request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb deleted file mode 100644 index be112113b672..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module. -# -def get_effective_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new - - # Call the get_effective_event_threat_detection_custom_module method. - result = client.get_effective_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb deleted file mode 100644 index 7db2ddb3ecfc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_effective_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module. -# -def get_effective_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the get_effective_security_health_analytics_custom_module method. - result = client.get_effective_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb deleted file mode 100644 index ec5742081391..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module. -# -def get_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new - - # Call the get_event_threat_detection_custom_module method. - result = client.get_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb deleted file mode 100644 index 2b9a6db77e1e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_iam_policy call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb deleted file mode 100644 index 48df3fdf3201..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config. -# -def get_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new - - # Call the get_mute_config method. - result = client.get_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb deleted file mode 100644 index 6b5a3b4c0d68..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config. -# -def get_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new - - # Call the get_notification_config method. - result = client.get_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb deleted file mode 100644 index b4b9f24ba65c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_organization_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_organization_settings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings. -# -def get_organization_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new - - # Call the get_organization_settings method. - result = client.get_organization_settings request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb deleted file mode 100644 index d40c67a9eba0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_resource_value_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_resource_value_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config. -# -def get_resource_value_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new - - # Call the get_resource_value_config method. - result = client.get_resource_value_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb deleted file mode 100644 index a4f9f8ef3f19..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module. -# -def get_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the get_security_health_analytics_custom_module method. - result = client.get_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb deleted file mode 100644 index c0a1d22fa00d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_simulation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetSimulation_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_simulation call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation. -# -def get_simulation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new - - # Call the get_simulation method. - result = client.get_simulation request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Simulation. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetSimulation_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb deleted file mode 100644 index bd7c16821102..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetSource_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source. -# -def get_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetSourceRequest.new - - # Call the get_source method. - result = client.get_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb deleted file mode 100644 index 8c1d07bdc6de..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/get_valued_resource.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the get_valued_resource call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource. -# -def get_valued_resource - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new - - # Call the get_valued_resource method. - result = client.get_valued_resource request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::ValuedResource. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb deleted file mode 100644 index ae956d56813e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the group_assets call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets. -# -def group_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new - - # Call the group_assets method. - result = client.group_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb deleted file mode 100644 index c4786c15f09b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/group_findings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the group_findings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings. -# -def group_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new - - # Call the group_findings method. - result = client.group_findings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::GroupResult. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb deleted file mode 100644 index ceeaebf8d86d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListAssets_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_assets call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets. -# -def list_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new - - # Call the list_assets method. - result = client.list_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse::ListAssetsResult. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb deleted file mode 100644 index 5862a15cff4a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_attack_paths.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_attack_paths call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths. -# -def list_attack_paths - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new - - # Call the list_attack_paths method. - result = client.list_attack_paths request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::AttackPath. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb deleted file mode 100644 index 3746c178ec2f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_big_query_exports.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_big_query_exports call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports. -# -def list_big_query_exports - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new - - # Call the list_big_query_exports method. - result = client.list_big_query_exports request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::BigQueryExport. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb deleted file mode 100644 index 5dacc91c28be..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_event_threat_detection_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules. -# -def list_descendant_event_threat_detection_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new - - # Call the list_descendant_event_threat_detection_custom_modules method. - result = client.list_descendant_event_threat_detection_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb deleted file mode 100644 index 5f821c75b303..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_descendant_security_health_analytics_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules. -# -def list_descendant_security_health_analytics_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new - - # Call the list_descendant_security_health_analytics_custom_modules method. - result = client.list_descendant_security_health_analytics_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb deleted file mode 100644 index 39414a8834dd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_event_threat_detection_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules. -# -def list_effective_event_threat_detection_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new - - # Call the list_effective_event_threat_detection_custom_modules method. - result = client.list_effective_event_threat_detection_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb deleted file mode 100644 index 964e57448ce6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_effective_security_health_analytics_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules. -# -def list_effective_security_health_analytics_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new - - # Call the list_effective_security_health_analytics_custom_modules method. - result = client.list_effective_security_health_analytics_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb deleted file mode 100644 index 41b6dd7a76c0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_event_threat_detection_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules. -# -def list_event_threat_detection_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new - - # Call the list_event_threat_detection_custom_modules method. - result = client.list_event_threat_detection_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb deleted file mode 100644 index 57fb4cae4392..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_findings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListFindings_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_findings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings. -# -def list_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new - - # Call the list_findings method. - result = client.list_findings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse::ListFindingsResult. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb deleted file mode 100644 index eb1fdb03d97d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_mute_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_mute_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs. -# -def list_mute_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new - - # Call the list_mute_configs method. - result = client.list_mute_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::MuteConfig. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb deleted file mode 100644 index b7b5eee3314f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_notification_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_notification_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs. -# -def list_notification_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new - - # Call the list_notification_configs method. - result = client.list_notification_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::NotificationConfig. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb deleted file mode 100644 index 251454a75ea0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_resource_value_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_resource_value_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs. -# -def list_resource_value_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new - - # Call the list_resource_value_configs method. - result = client.list_resource_value_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb deleted file mode 100644 index 1c67c25b10d3..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_security_health_analytics_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules. -# -def list_security_health_analytics_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new - - # Call the list_security_health_analytics_custom_modules method. - result = client.list_security_health_analytics_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb deleted file mode 100644 index c97a5da2a253..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListSources_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_sources call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources. -# -def list_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new - - # Call the list_sources method. - result = client.list_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::Source. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb deleted file mode 100644 index 2dfc8bf0281c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/list_valued_resources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the list_valued_resources call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources. -# -def list_valued_resources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new - - # Call the list_valued_resources method. - result = client.list_valued_resources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1::ValuedResource. - p item - end -end -# [END securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb deleted file mode 100644 index b4992daa0dfc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/run_asset_discovery.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the run_asset_discovery call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery. -# -def run_asset_discovery - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new - - # Call the run_asset_discovery method. - result = client.run_asset_discovery request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb deleted file mode 100644 index 46ec0d32e12b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_finding_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the set_finding_state call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state. -# -def set_finding_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new - - # Call the set_finding_state method. - result = client.set_finding_state request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb deleted file mode 100644 index 61c6f0c2658c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the set_iam_policy call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb deleted file mode 100644 index 0d8d48794099..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/set_mute.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_SetMute_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the set_mute call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute. -# -def set_mute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::SetMuteRequest.new - - # Call the set_mute method. - result = client.set_mute request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_SetMute_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb deleted file mode 100644 index 6573cca21b08..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/simulate_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module. -# -def simulate_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the simulate_security_health_analytics_custom_module method. - result = client.simulate_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb deleted file mode 100644 index 2beb6f525829..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the test_iam_permissions call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb deleted file mode 100644 index 64a07908fd64..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export. -# -def update_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new - - # Call the update_big_query_export method. - result = client.update_big_query_export request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::BigQueryExport. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb deleted file mode 100644 index 20ba7f0b690c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module. -# -def update_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new - - # Call the update_event_threat_detection_custom_module method. - result = client.update_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb deleted file mode 100644 index 4ec047a6fb39..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_external_system.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_external_system call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system. -# -def update_external_system - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new - - # Call the update_external_system method. - result = client.update_external_system request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::ExternalSystem. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb deleted file mode 100644 index 39355b256e0d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_finding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_finding call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding. -# -def update_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new - - # Call the update_finding method. - result = client.update_finding request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Finding. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb deleted file mode 100644 index aa233b884d74..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config. -# -def update_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new - - # Call the update_mute_config method. - result = client.update_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::MuteConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb deleted file mode 100644 index f976002b3515..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config. -# -def update_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new - - # Call the update_notification_config method. - result = client.update_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::NotificationConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb deleted file mode 100644 index a4f402013e90..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_organization_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_organization_settings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings. -# -def update_organization_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new - - # Call the update_organization_settings method. - result = client.update_organization_settings request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::OrganizationSettings. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb deleted file mode 100644 index 40a21d5efc16..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_resource_value_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_resource_value_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config. -# -def update_resource_value_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new - - # Call the update_resource_value_config method. - result = client.update_resource_value_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::ResourceValueConfig. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb deleted file mode 100644 index 8e83edf227ea..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_security_health_analytics_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module. -# -def update_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the update_security_health_analytics_custom_module method. - result = client.update_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb deleted file mode 100644 index 04da82c1a94b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_security_marks.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_security_marks call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks. -# -def update_security_marks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new - - # Call the update_security_marks method. - result = client.update_security_marks request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::SecurityMarks. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb deleted file mode 100644 index 6f0ba52cd6f1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/update_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the update_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source. -# -def update_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new - - # Call the update_source method. - result = client.update_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::Source. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb deleted file mode 100644 index 31919bb29465..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/security_center/validate_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center/v1" - -## -# Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module. -# -def validate_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new - - # Call the validate_event_threat_detection_custom_module method. - result = client.validate_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse. - p result -end -# [END securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json b/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json deleted file mode 100644 index 97ec18a5449f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/snippets/snippet_metadata_google.cloud.securitycenter.v1.json +++ /dev/null @@ -1,2535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-security_center-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.securitycenter.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync", - "title": "Snippet for the bulk_mute_findings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings.", - "file": "security_center/bulk_mute_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_mute_findings", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#bulk_mute_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "BulkMuteFindings", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.BulkMuteFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the create_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module.", - "file": "security_center/create_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateSource_sync", - "title": "Snippet for the create_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source.", - "file": "security_center/create_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_source", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateSource", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateFinding_sync", - "title": "Snippet for the create_finding call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding.", - "file": "security_center/create_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_finding", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateFinding", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateFinding", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync", - "title": "Snippet for the create_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config.", - "file": "security_center/create_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateMuteConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync", - "title": "Snippet for the create_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config.", - "file": "security_center/create_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateNotificationConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync", - "title": "Snippet for the delete_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config.", - "file": "security_center/delete_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteMuteConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync", - "title": "Snippet for the delete_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config.", - "file": "security_center/delete_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteNotificationConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module.", - "file": "security_center/delete_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSimulation_sync", - "title": "Snippet for the get_simulation call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation.", - "file": "security_center/get_simulation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_simulation", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_simulation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetSimulationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Simulation", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetSimulation", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSimulation", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetValuedResource_sync", - "title": "Snippet for the get_valued_resource call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource.", - "file": "security_center/get_valued_resource.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_valued_resource", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_valued_resource", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ValuedResource", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetValuedResource", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetValuedResource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync", - "title": "Snippet for the get_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export.", - "file": "security_center/get_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetBigQueryExport", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy.", - "file": "security_center/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetIamPolicy", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync", - "title": "Snippet for the get_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config.", - "file": "security_center/get_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetMuteConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync", - "title": "Snippet for the get_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config.", - "file": "security_center/get_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetNotificationConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync", - "title": "Snippet for the get_organization_settings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings.", - "file": "security_center/get_organization_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_organization_settings", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_organization_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::OrganizationSettings", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetOrganizationSettings", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetOrganizationSettings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEffectiveSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module.", - "file": "security_center/get_effective_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_effective_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetEffectiveSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the get_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module.", - "file": "security_center/get_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetSource_sync", - "title": "Snippet for the get_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source.", - "file": "security_center/get_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_source", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetSource", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GroupAssets_sync", - "title": "Snippet for the group_assets call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets.", - "file": "security_center/group_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "group_assets", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GroupAssets", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GroupAssets", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GroupFindings_sync", - "title": "Snippet for the group_findings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings.", - "file": "security_center/group_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "group_findings", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#group_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GroupFindings", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GroupFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListAssets_sync", - "title": "Snippet for the list_assets call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets.", - "file": "security_center/list_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_assets", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListAssetsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListAssets", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListAssets", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListDescendantSecurityHealthAnalyticsCustomModules_sync", - "title": "Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules.", - "file": "security_center/list_descendant_security_health_analytics_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_descendant_security_health_analytics_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_security_health_analytics_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListDescendantSecurityHealthAnalyticsCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListDescendantSecurityHealthAnalyticsCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListFindings_sync", - "title": "Snippet for the list_findings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings.", - "file": "security_center/list_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_findings", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListFindingsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListFindings", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync", - "title": "Snippet for the list_mute_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs.", - "file": "security_center/list_mute_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_mute_configs", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_mute_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListMuteConfigs", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListMuteConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync", - "title": "Snippet for the list_notification_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs.", - "file": "security_center/list_notification_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_notification_configs", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_notification_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListNotificationConfigs", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListNotificationConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEffectiveSecurityHealthAnalyticsCustomModules_sync", - "title": "Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules.", - "file": "security_center/list_effective_security_health_analytics_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_effective_security_health_analytics_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_security_health_analytics_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListEffectiveSecurityHealthAnalyticsCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveSecurityHealthAnalyticsCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListSecurityHealthAnalyticsCustomModules_sync", - "title": "Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules.", - "file": "security_center/list_security_health_analytics_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_security_health_analytics_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_security_health_analytics_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListSecurityHealthAnalyticsCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListSecurityHealthAnalyticsCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListSources_sync", - "title": "Snippet for the list_sources call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources.", - "file": "security_center/list_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sources", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListSourcesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListSources", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListSources", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync", - "title": "Snippet for the run_asset_discovery call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery.", - "file": "security_center/run_asset_discovery.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_asset_discovery", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#run_asset_discovery", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "RunAssetDiscovery", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.RunAssetDiscovery", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_SetFindingState_sync", - "title": "Snippet for the set_finding_state call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state.", - "file": "security_center/set_finding_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_finding_state", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_finding_state", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "SetFindingState", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetFindingState", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_SetMute_sync", - "title": "Snippet for the set_mute call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute.", - "file": "security_center/set_mute.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_mute", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_mute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::SetMuteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "SetMute", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetMute", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy.", - "file": "security_center/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SetIamPolicy", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions.", - "file": "security_center/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.TestIamPermissions", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_SimulateSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module.", - "file": "security_center/simulate_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "simulate_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#simulate_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "SimulateSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.SimulateSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync", - "title": "Snippet for the update_external_system call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system.", - "file": "security_center/update_external_system.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_external_system", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_external_system", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ExternalSystem", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateExternalSystem", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateExternalSystem", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync", - "title": "Snippet for the update_finding call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding.", - "file": "security_center/update_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_finding", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateFinding", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateFinding", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync", - "title": "Snippet for the update_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config.", - "file": "security_center/update_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateMuteConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync", - "title": "Snippet for the update_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config.", - "file": "security_center/update_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateNotificationConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync", - "title": "Snippet for the update_organization_settings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings.", - "file": "security_center/update_organization_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_organization_settings", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_organization_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::OrganizationSettings", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateOrganizationSettings", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateOrganizationSettings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the update_security_health_analytics_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module.", - "file": "security_center/update_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSource_sync", - "title": "Snippet for the update_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source.", - "file": "security_center/update_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_source", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSource", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync", - "title": "Snippet for the update_security_marks call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks.", - "file": "security_center/update_security_marks.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_security_marks", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_security_marks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::SecurityMarks", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSecurityMarks", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateSecurityMarks", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync", - "title": "Snippet for the create_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export.", - "file": "security_center/create_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateBigQueryExport", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync", - "title": "Snippet for the delete_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export.", - "file": "security_center/delete_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteBigQueryExport", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync", - "title": "Snippet for the update_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export.", - "file": "security_center/update_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateBigQueryExport", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync", - "title": "Snippet for the list_big_query_exports call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports.", - "file": "security_center/list_big_query_exports.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_big_query_exports", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_big_query_exports", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListBigQueryExports", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListBigQueryExports", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_CreateEventThreatDetectionCustomModule_sync", - "title": "Snippet for the create_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module.", - "file": "security_center/create_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#create_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.CreateEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteEventThreatDetectionCustomModule_sync", - "title": "Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module.", - "file": "security_center/delete_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEventThreatDetectionCustomModule_sync", - "title": "Snippet for the get_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module.", - "file": "security_center/get_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListDescendantEventThreatDetectionCustomModules_sync", - "title": "Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules.", - "file": "security_center/list_descendant_event_threat_detection_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_descendant_event_threat_detection_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_descendant_event_threat_detection_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListDescendantEventThreatDetectionCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListDescendantEventThreatDetectionCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEventThreatDetectionCustomModules_sync", - "title": "Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules.", - "file": "security_center/list_event_threat_detection_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_event_threat_detection_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_event_threat_detection_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListEventThreatDetectionCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEventThreatDetectionCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateEventThreatDetectionCustomModule_sync", - "title": "Snippet for the update_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module.", - "file": "security_center/update_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ValidateEventThreatDetectionCustomModule_sync", - "title": "Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module.", - "file": "security_center/validate_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "validate_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#validate_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ValidateEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ValidateEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetEffectiveEventThreatDetectionCustomModule_sync", - "title": "Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module.", - "file": "security_center/get_effective_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_effective_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_effective_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetEffectiveEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetEffectiveEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListEffectiveEventThreatDetectionCustomModules_sync", - "title": "Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules.", - "file": "security_center/list_effective_event_threat_detection_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_effective_event_threat_detection_custom_modules", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_effective_event_threat_detection_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListEffectiveEventThreatDetectionCustomModules", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListEffectiveEventThreatDetectionCustomModules", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync", - "title": "Snippet for the batch_create_resource_value_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs.", - "file": "security_center/batch_create_resource_value_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_resource_value_configs", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#batch_create_resource_value_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "BatchCreateResourceValueConfigs", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.BatchCreateResourceValueConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_DeleteResourceValueConfig_sync", - "title": "Snippet for the delete_resource_value_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config.", - "file": "security_center/delete_resource_value_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_resource_value_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#delete_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteResourceValueConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.DeleteResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_GetResourceValueConfig_sync", - "title": "Snippet for the get_resource_value_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config.", - "file": "security_center/get_resource_value_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_resource_value_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#get_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ResourceValueConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetResourceValueConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.GetResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListResourceValueConfigs_sync", - "title": "Snippet for the list_resource_value_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs.", - "file": "security_center/list_resource_value_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_resource_value_configs", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_resource_value_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListResourceValueConfigs", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListResourceValueConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_UpdateResourceValueConfig_sync", - "title": "Snippet for the update_resource_value_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config.", - "file": "security_center/update_resource_value_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_resource_value_config", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#update_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ResourceValueConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateResourceValueConfig", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.UpdateResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListValuedResources_sync", - "title": "Snippet for the list_valued_resources call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources.", - "file": "security_center/list_valued_resources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_valued_resources", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_valued_resources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListValuedResources", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListValuedResources", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1_generated_SecurityCenter_ListAttackPaths_sync", - "title": "Snippet for the list_attack_paths call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths.", - "file": "security_center/list_attack_paths.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_attack_paths", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client#list_attack_paths", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListAttackPaths", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter.ListAttackPaths", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb deleted file mode 100644 index 650ae5647c63..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/securitycenter/v1/securitycenter_service_pb" -require "google/cloud/securitycenter/v1/securitycenter_service_services_pb" -require "google/cloud/security_center/v1/security_center" - -class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb deleted file mode 100644 index 25ac2a34d4cc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_paths_test.rb +++ /dev/null @@ -1,487 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/security_center/v1/security_center" - -class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_big_query_export_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.big_query_export_path organization: "value0", export: "value1" - assert_equal "organizations/value0/bigQueryExports/value1", path - - path = client.big_query_export_path folder: "value0", export: "value1" - assert_equal "folders/value0/bigQueryExports/value1", path - - path = client.big_query_export_path project: "value0", export: "value1" - assert_equal "projects/value0/bigQueryExports/value1", path - end - end - - def test_dlp_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dlp_job_path project: "value0", dlp_job: "value1" - assert_equal "projects/value0/dlpJobs/value1", path - - path = client.dlp_job_path project: "value0", location: "value1", dlp_job: "value2" - assert_equal "projects/value0/locations/value1/dlpJobs/value2", path - end - end - - def test_effective_event_threat_detection_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.effective_event_threat_detection_custom_module_path organization: "value0", module: "value1" - assert_equal "organizations/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path - - path = client.effective_event_threat_detection_custom_module_path folder: "value0", module: "value1" - assert_equal "folders/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path - - path = client.effective_event_threat_detection_custom_module_path project: "value0", module: "value1" - assert_equal "projects/value0/eventThreatDetectionSettings/effectiveCustomModules/value1", path - end - end - - def test_effective_security_health_analytics_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.effective_security_health_analytics_custom_module_path organization: "value0", effective_custom_module: "value1" - assert_equal "organizations/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path - - path = client.effective_security_health_analytics_custom_module_path folder: "value0", effective_custom_module: "value1" - assert_equal "folders/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path - - path = client.effective_security_health_analytics_custom_module_path project: "value0", effective_custom_module: "value1" - assert_equal "projects/value0/securityHealthAnalyticsSettings/effectiveCustomModules/value1", path - end - end - - def test_event_threat_detection_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.event_threat_detection_custom_module_path organization: "value0", module: "value1" - assert_equal "organizations/value0/eventThreatDetectionSettings/customModules/value1", path - - path = client.event_threat_detection_custom_module_path folder: "value0", module: "value1" - assert_equal "folders/value0/eventThreatDetectionSettings/customModules/value1", path - - path = client.event_threat_detection_custom_module_path project: "value0", module: "value1" - assert_equal "projects/value0/eventThreatDetectionSettings/customModules/value1", path - end - end - - def test_event_threat_detection_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.event_threat_detection_settings_path organization: "value0" - assert_equal "organizations/value0/eventThreatDetectionSettings", path - - path = client.event_threat_detection_settings_path folder: "value0" - assert_equal "folders/value0/eventThreatDetectionSettings", path - - path = client.event_threat_detection_settings_path project: "value0" - assert_equal "projects/value0/eventThreatDetectionSettings", path - end - end - - def test_external_system_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.external_system_path organization: "value0", source: "value1", finding: "value2", externalsystem: "value3" - assert_equal "organizations/value0/sources/value1/findings/value2/externalSystems/value3", path - - path = client.external_system_path folder: "value0", source: "value1", finding: "value2", externalsystem: "value3" - assert_equal "folders/value0/sources/value1/findings/value2/externalSystems/value3", path - - path = client.external_system_path project: "value0", source: "value1", finding: "value2", externalsystem: "value3" - assert_equal "projects/value0/sources/value1/findings/value2/externalSystems/value3", path - end - end - - def test_finding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.finding_path organization: "value0", source: "value1", finding: "value2" - assert_equal "organizations/value0/sources/value1/findings/value2", path - - path = client.finding_path folder: "value0", source: "value1", finding: "value2" - assert_equal "folders/value0/sources/value1/findings/value2", path - - path = client.finding_path project: "value0", source: "value1", finding: "value2" - assert_equal "projects/value0/sources/value1/findings/value2", path - end - end - - def test_folder_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_path folder: "value0" - assert_equal "folders/value0", path - end - end - - def test_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_mute_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.mute_config_path organization: "value0", mute_config: "value1" - assert_equal "organizations/value0/muteConfigs/value1", path - - path = client.mute_config_path folder: "value0", mute_config: "value1" - assert_equal "folders/value0/muteConfigs/value1", path - - path = client.mute_config_path project: "value0", mute_config: "value1" - assert_equal "projects/value0/muteConfigs/value1", path - - path = client.mute_config_path organization: "value0", location: "value1", mute_config: "value2" - assert_equal "organizations/value0/locations/value1/muteConfigs/value2", path - - path = client.mute_config_path folder: "value0", location: "value1", mute_config: "value2" - assert_equal "folders/value0/locations/value1/muteConfigs/value2", path - - path = client.mute_config_path project: "value0", location: "value1", mute_config: "value2" - assert_equal "projects/value0/locations/value1/muteConfigs/value2", path - end - end - - def test_notification_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.notification_config_path organization: "value0", notification_config: "value1" - assert_equal "organizations/value0/notificationConfigs/value1", path - - path = client.notification_config_path folder: "value0", notification_config: "value1" - assert_equal "folders/value0/notificationConfigs/value1", path - - path = client.notification_config_path project: "value0", notification_config: "value1" - assert_equal "projects/value0/notificationConfigs/value1", path - end - end - - def test_organization_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_path organization: "value0" - assert_equal "organizations/value0", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_organization_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_settings_path organization: "value0" - assert_equal "organizations/value0/organizationSettings", path - end - end - - def test_organization_simulation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_simulation_path organization: "value0", simulation: "value1" - assert_equal "organizations/value0/simulations/value1", path - end - end - - def test_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_path organization: "value0", constraint_name: "value1" - assert_equal "organizations/value0/policies/value1", path - - path = client.policy_path folder: "value0", constraint_name: "value1" - assert_equal "folders/value0/policies/value1", path - - path = client.policy_path project: "value0", constraint_name: "value1" - assert_equal "projects/value0/policies/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_resource_value_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.resource_value_config_path organization: "value0", resource_value_config: "value1" - assert_equal "organizations/value0/resourceValueConfigs/value1", path - end - end - - def test_security_health_analytics_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.security_health_analytics_custom_module_path organization: "value0", custom_module: "value1" - assert_equal "organizations/value0/securityHealthAnalyticsSettings/customModules/value1", path - - path = client.security_health_analytics_custom_module_path folder: "value0", custom_module: "value1" - assert_equal "folders/value0/securityHealthAnalyticsSettings/customModules/value1", path - - path = client.security_health_analytics_custom_module_path project: "value0", custom_module: "value1" - assert_equal "projects/value0/securityHealthAnalyticsSettings/customModules/value1", path - end - end - - def test_security_health_analytics_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.security_health_analytics_settings_path organization: "value0" - assert_equal "organizations/value0/securityHealthAnalyticsSettings", path - - path = client.security_health_analytics_settings_path folder: "value0" - assert_equal "folders/value0/securityHealthAnalyticsSettings", path - - path = client.security_health_analytics_settings_path project: "value0" - assert_equal "projects/value0/securityHealthAnalyticsSettings", path - end - end - - def test_security_marks_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.security_marks_path organization: "value0", asset: "value1" - assert_equal "organizations/value0/assets/value1/securityMarks", path - - path = client.security_marks_path organization: "value0", source: "value1", finding: "value2" - assert_equal "organizations/value0/sources/value1/findings/value2/securityMarks", path - - path = client.security_marks_path folder: "value0", asset: "value1" - assert_equal "folders/value0/assets/value1/securityMarks", path - - path = client.security_marks_path project: "value0", asset: "value1" - assert_equal "projects/value0/assets/value1/securityMarks", path - - path = client.security_marks_path folder: "value0", source: "value1", finding: "value2" - assert_equal "folders/value0/sources/value1/findings/value2/securityMarks", path - - path = client.security_marks_path project: "value0", source: "value1", finding: "value2" - assert_equal "projects/value0/sources/value1/findings/value2/securityMarks", path - end - end - - def test_simulation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.simulation_path organization: "value0", simulation: "value1" - assert_equal "organizations/value0/simulations/value1", path - end - end - - def test_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.source_path organization: "value0", source: "value1" - assert_equal "organizations/value0/sources/value1", path - - path = client.source_path folder: "value0", source: "value1" - assert_equal "folders/value0/sources/value1", path - - path = client.source_path project: "value0", source: "value1" - assert_equal "projects/value0/sources/value1", path - end - end - - def test_table_data_profile_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_data_profile_path project: "value0", table_profile: "value1" - assert_equal "projects/value0/tableProfiles/value1", path - - path = client.table_data_profile_path project: "value0", location: "value1", table_profile: "value2" - assert_equal "projects/value0/locations/value1/tableProfiles/value2", path - end - end - - def test_topic_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.topic_path project: "value0", topic: "value1" - assert_equal "projects/value0/topics/value1", path - end - end - - def test_valued_resource_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.valued_resource_path organization: "value0", simulation: "value1", valued_resource: "value2" - assert_equal "organizations/value0/simulations/value1/valuedResources/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb deleted file mode 100644 index d85963f8c45d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_rest_test.rb +++ /dev/null @@ -1,3594 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/securitycenter/v1/securitycenter_service_pb" -require "google/cloud/security_center/v1/security_center/rest" - - -class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_bulk_mute_findings - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - mute_annotation = "hello world" - mute_state = :MUTE_STATE_UNSPECIFIED - - bulk_mute_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_bulk_mute_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_mute_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.bulk_mute_findings parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_mute_findings_client_stub.call_count - end - end - end - - def test_create_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - security_health_analytics_custom_module = {} - - create_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_create_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source = {} - - create_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_source({ parent: parent, source: source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_source parent: parent, source: source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_source ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_source({ parent: parent, source: source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_source(::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_source_client_stub.call_count - end - end - end - - def test_create_finding - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - finding_id = "hello world" - finding = {} - - create_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_finding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_finding parent: parent, finding_id: finding_id, finding: finding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_finding ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_finding(::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_finding_client_stub.call_count - end - end - end - - def test_create_mute_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - mute_config = {} - mute_config_id = "hello world" - - create_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_mute_config ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_mute_config(::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_mute_config_client_stub.call_count - end - end - end - - def test_create_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - config_id = "hello world" - notification_config = {} - - create_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_notification_config ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_notification_config(::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_notification_config_client_stub.call_count - end - end - end - - def test_delete_mute_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_mute_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_mute_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_mute_config ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_mute_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_mute_config(::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_mute_config_client_stub.call_count - end - end - end - - def test_delete_notification_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_notification_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_notification_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_notification_config ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_notification_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_notification_config(::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_notification_config_client_stub.call_count - end - end - end - - def test_delete_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_security_health_analytics_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_security_health_analytics_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_get_simulation - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Simulation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_simulation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_simulation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_simulation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_simulation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_simulation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_simulation ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_simulation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_simulation(::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_simulation_client_stub.call_count - end - end - end - - def test_get_valued_resource - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ValuedResource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_valued_resource_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_valued_resource_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_valued_resource_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_valued_resource({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_valued_resource name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_valued_resource ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_valued_resource({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_valued_resource(::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_valued_resource_client_stub.call_count - end - end - end - - def test_get_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_big_query_export({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_big_query_export name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_big_query_export ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_big_query_export({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_big_query_export(::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_big_query_export_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_get_mute_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_mute_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_mute_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_mute_config ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_mute_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_mute_config(::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_mute_config_client_stub.call_count - end - end - end - - def test_get_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_notification_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_notification_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_notification_config ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_notification_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_notification_config(::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_notification_config_client_stub.call_count - end - end - end - - def test_get_organization_settings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_organization_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_organization_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_organization_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_organization_settings ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_organization_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_organization_settings(::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_organization_settings_client_stub.call_count - end - end - end - - def test_get_effective_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_effective_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_effective_security_health_analytics_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_effective_security_health_analytics_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_effective_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_get_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_security_health_analytics_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_security_health_analytics_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_get_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_source ::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_source(::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_source_client_stub.call_count - end - end - end - - def test_group_assets - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - compare_duration = {} - read_time = {} - page_token = "hello world" - page_size = 42 - - group_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, group_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.group_assets ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.group_assets(::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, group_assets_client_stub.call_count - end - end - end - - def test_group_findings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - read_time = {} - compare_duration = {} - page_token = "hello world" - page_size = 42 - - group_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, group_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.group_findings ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.group_findings(::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, group_findings_client_stub.call_count - end - end - end - - def test_list_assets - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_assets ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_assets(::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_count - end - end - end - - def test_list_descendant_security_health_analytics_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_descendant_security_health_analytics_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_count - end - end - end - - def test_list_findings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_findings ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_findings(::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_count - end - end - end - - def test_list_mute_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_mute_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_mute_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_mute_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_mute_configs ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_mute_configs(::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_mute_configs_client_stub.call_count - end - end - end - - def test_list_notification_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_notification_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_notification_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_notification_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_notification_configs ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_notification_configs(::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_notification_configs_client_stub.call_count - end - end - end - - def test_list_effective_security_health_analytics_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_effective_security_health_analytics_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_count - end - end - end - - def test_list_security_health_analytics_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_security_health_analytics_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_count - end - end - end - - def test_list_sources - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_sources parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_sources ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_sources(::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_sources_client_stub.call_count - end - end - end - - def test_run_asset_discovery - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - run_asset_discovery_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_run_asset_discovery_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_asset_discovery_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.run_asset_discovery({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.run_asset_discovery parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.run_asset_discovery({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_asset_discovery_client_stub.call_count - end - end - end - - def test_set_finding_state - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - state = :STATE_UNSPECIFIED - start_time = {} - - set_finding_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_finding_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_finding_state_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_finding_state({ name: name, state: state, start_time: start_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_finding_state name: name, state: state, start_time: start_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_finding_state ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_finding_state({ name: name, state: state, start_time: start_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_finding_state(::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_finding_state_client_stub.call_count - end - end - end - - def test_set_mute - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - mute = :MUTE_UNSPECIFIED - - set_mute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_mute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_mute_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_mute({ name: name, mute: mute }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_mute name: name, mute: mute do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_mute ::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_mute({ name: name, mute: mute }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_mute(::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_mute_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_simulate_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - custom_config = {} - resource = {} - - simulate_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_simulate_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_update_external_system - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - external_system = {} - update_mask = {} - - update_external_system_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_external_system_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_external_system_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_external_system external_system: external_system, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_external_system ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_external_system({ external_system: external_system, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_external_system(::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_external_system_client_stub.call_count - end - end - end - - def test_update_finding - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - finding = {} - update_mask = {} - - update_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_finding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_finding({ finding: finding, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_finding finding: finding, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_finding ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_finding({ finding: finding, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_finding(::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_finding_client_stub.call_count - end - end - end - - def test_update_mute_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - mute_config = {} - update_mask = {} - - update_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_mute_config mute_config: mute_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_mute_config ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_mute_config(::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_mute_config_client_stub.call_count - end - end - end - - def test_update_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - notification_config = {} - update_mask = {} - - update_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_notification_config notification_config: notification_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_notification_config ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_notification_config(::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_notification_config_client_stub.call_count - end - end - end - - def test_update_organization_settings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - organization_settings = {} - update_mask = {} - - update_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_organization_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_organization_settings ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_organization_settings(::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_organization_settings_client_stub.call_count - end - end - end - - def test_update_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - security_health_analytics_custom_module = {} - update_mask = {} - - update_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_security_health_analytics_custom_module security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_update_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - source = {} - update_mask = {} - - update_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_source({ source: source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_source source: source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_source ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_source({ source: source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_source(::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_source_client_stub.call_count - end - end - end - - def test_update_security_marks - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - security_marks = {} - update_mask = {} - start_time = {} - - update_security_marks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_marks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_security_marks_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_security_marks ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_security_marks(::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_security_marks_client_stub.call_count - end - end - end - - def test_create_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - big_query_export = {} - big_query_export_id = "hello world" - - create_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_big_query_export ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_big_query_export(::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_big_query_export_client_stub.call_count - end - end - end - - def test_delete_big_query_export - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_big_query_export({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_big_query_export name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_big_query_export ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_big_query_export({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_big_query_export(::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_big_query_export_client_stub.call_count - end - end - end - - def test_update_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - big_query_export = {} - update_mask = {} - - update_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_big_query_export ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_big_query_export(::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_big_query_export_client_stub.call_count - end - end - end - - def test_list_big_query_exports - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_big_query_exports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_big_query_exports_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_big_query_exports_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_big_query_exports ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_big_query_exports(::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_big_query_exports_client_stub.call_count - end - end - end - - def test_create_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - event_threat_detection_custom_module = {} - - create_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_delete_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_event_threat_detection_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_event_threat_detection_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_get_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_event_threat_detection_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_event_threat_detection_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_list_descendant_event_threat_detection_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_descendant_event_threat_detection_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_descendant_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_count - end - end - end - - def test_list_event_threat_detection_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_event_threat_detection_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_count - end - end - end - - def test_update_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - event_threat_detection_custom_module = {} - update_mask = {} - - update_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_event_threat_detection_custom_module event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_validate_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - raw_text = "hello world" - type = "hello world" - - validate_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_validate_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, validate_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_get_effective_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_effective_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_effective_event_threat_detection_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_effective_event_threat_detection_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_effective_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_list_effective_event_threat_detection_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_effective_event_threat_detection_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_effective_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_count - end - end - end - - def test_batch_create_resource_value_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_create_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_batch_create_resource_value_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_create_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_create_resource_value_configs parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_create_resource_value_configs({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_create_resource_value_configs_client_stub.call_count - end - end - end - - def test_delete_resource_value_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_resource_value_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_resource_value_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_resource_value_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_resource_value_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_resource_value_config_client_stub.call_count - end - end - end - - def test_get_resource_value_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_resource_value_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_resource_value_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_resource_value_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_resource_value_config ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_resource_value_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_resource_value_config(::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_resource_value_config_client_stub.call_count - end - end - end - - def test_list_resource_value_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_resource_value_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_resource_value_configs_client_stub.call_count - end - end - end - - def test_update_resource_value_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource_value_config = {} - update_mask = {} - - update_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_resource_value_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_resource_value_config ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_resource_value_config(::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_resource_value_config_client_stub.call_count - end - end - end - - def test_list_valued_resources - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - - list_valued_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_valued_resources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_valued_resources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_valued_resources ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_valued_resources(::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_valued_resources_client_stub.call_count - end - end - end - - def test_list_attack_paths - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - - list_attack_paths_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_attack_paths_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_attack_paths_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_attack_paths ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_attack_paths(::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_attack_paths_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb b/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb deleted file mode 100644 index f949190ff600..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/test/google/cloud/security_center/v1/security_center_test.rb +++ /dev/null @@ -1,4053 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/securitycenter/v1/securitycenter_service_pb" -require "google/cloud/security_center/v1/security_center" - -class ::Google::Cloud::SecurityCenter::V1::SecurityCenter::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_bulk_mute_findings - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - mute_annotation = "hello world" - mute_state = :MUTE_STATE_UNSPECIFIED - - bulk_mute_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_mute_findings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["mute_annotation"] - assert_equal :MUTE_STATE_UNSPECIFIED, request["mute_state"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_mute_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.bulk_mute_findings parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.bulk_mute_findings({ parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V1::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_annotation: mute_annotation, mute_state: mute_state), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_mute_findings_client_stub.call_rpc_count - end - end - - def test_create_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - security_health_analytics_custom_module = {} - - create_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_create_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source = {} - - create_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Source), request["source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_source({ parent: parent, source: source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_source parent: parent, source: source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_source ::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_source({ parent: parent, source: source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_source(::Google::Cloud::SecurityCenter::V1::CreateSourceRequest.new(parent: parent, source: source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_source_client_stub.call_rpc_count - end - end - - def test_create_finding - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - finding_id = "hello world" - finding = {} - - create_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_finding, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["finding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Finding), request["finding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_finding parent: parent, finding_id: finding_id, finding: finding do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_finding ::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_finding(::Google::Cloud::SecurityCenter::V1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_finding_client_stub.call_rpc_count - end - end - - def test_create_mute_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - mute_config = {} - mute_config_id = "hello world" - - create_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::MuteConfig), request["mute_config"] - assert_equal "hello world", request["mute_config_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_mute_config ::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_mute_config(::Google::Cloud::SecurityCenter::V1::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_mute_config_client_stub.call_rpc_count - end - end - - def test_create_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - config_id = "hello world" - notification_config = {} - - create_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::NotificationConfig), request["notification_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_notification_config ::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_notification_config(::Google::Cloud::SecurityCenter::V1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_notification_config_client_stub.call_rpc_count - end - end - - def test_delete_mute_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_mute_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_mute_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_mute_config ::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_mute_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_mute_config(::Google::Cloud::SecurityCenter::V1::DeleteMuteConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_mute_config_client_stub.call_rpc_count - end - end - - def test_delete_notification_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_notification_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_notification_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_notification_config ::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_notification_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_notification_config(::Google::Cloud::SecurityCenter::V1::DeleteNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_notification_config_client_stub.call_rpc_count - end - end - - def test_delete_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_security_health_analytics_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_security_health_analytics_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_get_simulation - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Simulation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_simulation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_simulation, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_simulation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_simulation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_simulation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_simulation ::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_simulation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_simulation(::Google::Cloud::SecurityCenter::V1::GetSimulationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_simulation_client_stub.call_rpc_count - end - end - - def test_get_valued_resource - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ValuedResource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_valued_resource_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_valued_resource, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_valued_resource_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_valued_resource({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_valued_resource name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_valued_resource ::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_valued_resource({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_valued_resource(::Google::Cloud::SecurityCenter::V1::GetValuedResourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_valued_resource_client_stub.call_rpc_count - end - end - - def test_get_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_big_query_export({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_big_query_export name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_big_query_export ::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_big_query_export({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_big_query_export(::Google::Cloud::SecurityCenter::V1::GetBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_big_query_export_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_get_mute_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_mute_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_mute_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_mute_config ::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_mute_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_mute_config(::Google::Cloud::SecurityCenter::V1::GetMuteConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_mute_config_client_stub.call_rpc_count - end - end - - def test_get_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_notification_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_notification_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_notification_config ::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_notification_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_notification_config(::Google::Cloud::SecurityCenter::V1::GetNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_notification_config_client_stub.call_rpc_count - end - end - - def test_get_organization_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_organization_settings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_organization_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_organization_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_organization_settings ::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_organization_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_organization_settings(::Google::Cloud::SecurityCenter::V1::GetOrganizationSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_organization_settings_client_stub.call_rpc_count - end - end - - def test_get_effective_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::EffectiveSecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_effective_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_effective_security_health_analytics_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_effective_security_health_analytics_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_effective_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_get_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_security_health_analytics_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_security_health_analytics_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_get_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_source ::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_source(::Google::Cloud::SecurityCenter::V1::GetSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_source_client_stub.call_rpc_count - end - end - - def test_group_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::GroupAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - compare_duration = {} - read_time = {} - page_token = "hello world" - page_size = 42 - - group_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :group_assets, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["group_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, group_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.group_assets ::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.group_assets(::Google::Cloud::SecurityCenter::V1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, group_assets_client_stub.call_rpc_count - end - end - - def test_group_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::GroupFindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - read_time = {} - compare_duration = {} - page_token = "hello world" - page_size = 42 - - group_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :group_findings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["group_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, group_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.group_findings ::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.group_findings(::Google::Cloud::SecurityCenter::V1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, group_findings_client_stub.call_rpc_count - end - end - - def test_list_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_assets, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_assets ::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_assets(::Google::Cloud::SecurityCenter::V1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_rpc_count - end - end - - def test_list_descendant_security_health_analytics_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_descendant_security_health_analytics_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_rpc_count - end - end - - def test_list_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListFindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_findings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_findings ::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_findings(::Google::Cloud::SecurityCenter::V1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_rpc_count - end - end - - def test_list_mute_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_mute_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_mute_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_mute_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_mute_configs ::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_mute_configs(::Google::Cloud::SecurityCenter::V1::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_mute_configs_client_stub.call_rpc_count - end - end - - def test_list_notification_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_notification_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_notification_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_notification_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_notification_configs ::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_notification_configs(::Google::Cloud::SecurityCenter::V1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_notification_configs_client_stub.call_rpc_count - end - end - - def test_list_effective_security_health_analytics_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_effective_security_health_analytics_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_rpc_count - end - end - - def test_list_security_health_analytics_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_security_health_analytics_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenter::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_rpc_count - end - end - - def test_list_sources - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sources, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_sources parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_sources ::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_sources(::Google::Cloud::SecurityCenter::V1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_sources_client_stub.call_rpc_count - end - end - - def test_run_asset_discovery - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - run_asset_discovery_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_asset_discovery, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_asset_discovery_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.run_asset_discovery({ parent: parent }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.run_asset_discovery parent: parent do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.run_asset_discovery({ parent: parent }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1::RunAssetDiscoveryRequest.new(parent: parent), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_asset_discovery_client_stub.call_rpc_count - end - end - - def test_set_finding_state - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - state = :STATE_UNSPECIFIED - start_time = {} - - set_finding_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_finding_state, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest, request - assert_equal "hello world", request["name"] - assert_equal :STATE_UNSPECIFIED, request["state"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_finding_state_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_finding_state({ name: name, state: state, start_time: start_time }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_finding_state name: name, state: state, start_time: start_time do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_finding_state ::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_finding_state({ name: name, state: state, start_time: start_time }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_finding_state(::Google::Cloud::SecurityCenter::V1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_finding_state_client_stub.call_rpc_count - end - end - - def test_set_mute - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - mute = :MUTE_UNSPECIFIED - - set_mute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_mute, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SetMuteRequest, request - assert_equal "hello world", request["name"] - assert_equal :MUTE_UNSPECIFIED, request["mute"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_mute_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_mute({ name: name, mute: mute }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_mute name: name, mute: mute do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_mute ::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_mute({ name: name, mute: mute }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_mute(::Google::Cloud::SecurityCenter::V1::SetMuteRequest.new(name: name, mute: mute), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_mute_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_simulate_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - custom_config = {} - resource = {} - - simulate_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :simulate_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::CustomConfig), request["custom_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource), request["resource"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_update_external_system - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ExternalSystem.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - external_system = {} - update_mask = {} - - update_external_system_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_external_system, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::ExternalSystem), request["external_system"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_external_system_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_external_system external_system: external_system, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_external_system ::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_external_system({ external_system: external_system, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_external_system(::Google::Cloud::SecurityCenter::V1::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_external_system_client_stub.call_rpc_count - end - end - - def test_update_finding - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - finding = {} - update_mask = {} - - update_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_finding, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Finding), request["finding"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_finding({ finding: finding, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_finding finding: finding, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_finding ::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_finding({ finding: finding, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_finding(::Google::Cloud::SecurityCenter::V1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_finding_client_stub.call_rpc_count - end - end - - def test_update_mute_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::MuteConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - mute_config = {} - update_mask = {} - - update_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::MuteConfig), request["mute_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_mute_config mute_config: mute_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_mute_config ::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_mute_config(::Google::Cloud::SecurityCenter::V1::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_mute_config_client_stub.call_rpc_count - end - end - - def test_update_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - notification_config = {} - update_mask = {} - - update_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::NotificationConfig), request["notification_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_notification_config notification_config: notification_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_notification_config ::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_notification_config(::Google::Cloud::SecurityCenter::V1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_notification_config_client_stub.call_rpc_count - end - end - - def test_update_organization_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::OrganizationSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - organization_settings = {} - update_mask = {} - - update_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_organization_settings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::OrganizationSettings), request["organization_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_organization_settings ::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_organization_settings(::Google::Cloud::SecurityCenter::V1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_organization_settings_client_stub.call_rpc_count - end - end - - def test_update_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - security_health_analytics_custom_module = {} - update_mask = {} - - update_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_security_health_analytics_custom_module security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_security_health_analytics_custom_module({ security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(security_health_analytics_custom_module: security_health_analytics_custom_module, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_update_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - source = {} - update_mask = {} - - update_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::Source), request["source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_source({ source: source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_source source: source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_source ::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_source({ source: source, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_source(::Google::Cloud::SecurityCenter::V1::UpdateSourceRequest.new(source: source, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_source_client_stub.call_rpc_count - end - end - - def test_update_security_marks - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::SecurityMarks.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - security_marks = {} - update_mask = {} - start_time = {} - - update_security_marks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_security_marks, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::SecurityMarks), request["security_marks"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_security_marks_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_security_marks ::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_security_marks(::Google::Cloud::SecurityCenter::V1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_security_marks_client_stub.call_rpc_count - end - end - - def test_create_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - big_query_export = {} - big_query_export_id = "hello world" - - create_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::BigQueryExport), request["big_query_export"] - assert_equal "hello world", request["big_query_export_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_big_query_export ::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_big_query_export(::Google::Cloud::SecurityCenter::V1::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_big_query_export_client_stub.call_rpc_count - end - end - - def test_delete_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_big_query_export({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_big_query_export name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_big_query_export ::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_big_query_export({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_big_query_export(::Google::Cloud::SecurityCenter::V1::DeleteBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_big_query_export_client_stub.call_rpc_count - end - end - - def test_update_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::BigQueryExport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - big_query_export = {} - update_mask = {} - - update_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::BigQueryExport), request["big_query_export"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_big_query_export ::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_big_query_export(::Google::Cloud::SecurityCenter::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_big_query_export_client_stub.call_rpc_count - end - end - - def test_list_big_query_exports - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_big_query_exports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_big_query_exports, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_big_query_exports_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_big_query_exports ::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_big_query_exports(::Google::Cloud::SecurityCenter::V1::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_big_query_exports_client_stub.call_rpc_count - end - end - - def test_create_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - event_threat_detection_custom_module = {} - - create_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_delete_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_event_threat_detection_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_event_threat_detection_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_get_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_event_threat_detection_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_event_threat_detection_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_list_descendant_event_threat_detection_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_descendant_event_threat_detection_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_descendant_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_rpc_count - end - end - - def test_list_event_threat_detection_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_event_threat_detection_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_rpc_count - end - end - - def test_update_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - event_threat_detection_custom_module = {} - update_mask = {} - - update_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_event_threat_detection_custom_module event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_event_threat_detection_custom_module({ event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::UpdateEventThreatDetectionCustomModuleRequest.new(event_threat_detection_custom_module: event_threat_detection_custom_module, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_validate_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - raw_text = "hello world" - type = "hello world" - - validate_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :validate_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["raw_text"] - assert_equal "hello world", request["type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, validate_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_get_effective_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::EffectiveEventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_effective_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_effective_event_threat_detection_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_effective_event_threat_detection_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_effective_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenter::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_list_effective_event_threat_detection_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_effective_event_threat_detection_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_effective_event_threat_detection_custom_modules parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenter::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_rpc_count - end - end - - def test_batch_create_resource_value_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_create_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_resource_value_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::SecurityCenter::V1::CreateResourceValueConfigRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_create_resource_value_configs parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_create_resource_value_configs({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V1::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_resource_value_configs_client_stub.call_rpc_count - end - end - - def test_delete_resource_value_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_resource_value_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_resource_value_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_resource_value_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_resource_value_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V1::DeleteResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_resource_value_config_client_stub.call_rpc_count - end - end - - def test_get_resource_value_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_resource_value_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_resource_value_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_resource_value_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_resource_value_config ::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_resource_value_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_resource_value_config(::Google::Cloud::SecurityCenter::V1::GetResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_resource_value_config_client_stub.call_rpc_count - end - end - - def test_list_resource_value_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_resource_value_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V1::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_resource_value_configs_client_stub.call_rpc_count - end - end - - def test_update_resource_value_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource_value_config = {} - update_mask = {} - - update_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_resource_value_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1::ResourceValueConfig), request["resource_value_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_resource_value_config ::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_resource_value_config(::Google::Cloud::SecurityCenter::V1::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_resource_value_config_client_stub.call_rpc_count - end - end - - def test_list_valued_resources - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - - list_valued_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_valued_resources, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_valued_resources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_valued_resources ::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_valued_resources(::Google::Cloud::SecurityCenter::V1::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_valued_resources_client_stub.call_rpc_count - end - end - - def test_list_attack_paths - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1::ListAttackPathsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - - list_attack_paths_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_attack_paths, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_attack_paths_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_attack_paths ::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_attack_paths(::Google::Cloud::SecurityCenter::V1::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_attack_paths_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::SecurityCenter::V1::SecurityCenter::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1/test/helper.rb b/owl-bot-staging/google-cloud-security_center-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1/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-v1p1beta1/.gitignore b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/.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-v1p1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.repo-metadata.json deleted file mode 100644 index a20578f7275e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/.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-v1p1beta1/latest", - "distribution_name": "google-cloud-security_center-v1p1beta1", - "is_cloud": true, - "language": "ruby", - "name": "securitycenter", - "name_pretty": "Cloud Security Command Center V1p1beta1 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. Note that google-cloud-security_center-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details.", - "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-v1p1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.rubocop.yml deleted file mode 100644 index 83496958be62..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security_center-v1p1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-security_center-v1p1beta1.rb" diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/.toys.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/.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-v1p1beta1/.yardopts b/owl-bot-staging/google-cloud-security_center-v1p1beta1/.yardopts deleted file mode 100644 index ebd7730f355a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Security Command Center V1p1beta1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center-v1p1beta1/AUTHENTICATION.md deleted file mode 100644 index 3e145a9570e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security_center-v1p1beta1 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-v1p1beta1 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/v1p1beta1" - -client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/security_center/v1p1beta1" - -::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-security_center-v1p1beta1 -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/v1p1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center-v1p1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/Gemfile b/owl-bot-staging/google-cloud-security_center-v1p1beta1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-v1p1beta1/LICENSE.md b/owl-bot-staging/google-cloud-security_center-v1p1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/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-v1p1beta1/README.md b/owl-bot-staging/google-cloud-security_center-v1p1beta1/README.md deleted file mode 100644 index a4f1e8673649..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Security Command Center V1p1beta1 API - -Security Command Center API provides access to temporal views of assets and findings within an organization. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Security Command Center V1p1beta1 API. Most users should consider using -the main client gem, -[google-cloud-security_center](https://rubygems.org/gems/google-cloud-security_center). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-security_center-v1p1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/securitycenter.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/security_center/v1p1beta1" - -client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new -request = ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new # (request fields as keyword arguments...) -response = client.create_source request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v1p1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/security-command-center) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/security_center/v1p1beta1" -require "logger" - -client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-security_center`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-security_center-v1p1beta1`. -_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-v1p1beta1`. - -### 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-v1p1beta1/Rakefile b/owl-bot-staging/google-cloud-security_center-v1p1beta1/Rakefile deleted file mode 100644 index 4edac3b83170..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-security_center-v1p1beta1 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/v1p1beta1/security_center/credentials" - ::Google::Cloud::SecurityCenter::V1p1beta1::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-v1p1beta1 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-v1p1beta1 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-v1p1beta1 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-v1p1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security_center-v1p1beta1" - header "google-cloud-security_center-v1p1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security_center-v1p1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security_center-v1p1beta1 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-v1p1beta1 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-v1p1beta1 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-v1p1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center-v1p1beta1/gapic_metadata.json deleted file mode 100644 index 429bc0c97eac..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/gapic_metadata.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.securitycenter.v1p1beta1", - "libraryPackage": "::Google::Cloud::SecurityCenter::V1p1beta1", - "services": { - "SecurityCenter": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client", - "rpcs": { - "CreateSource": { - "methods": [ - "create_source" - ] - }, - "CreateFinding": { - "methods": [ - "create_finding" - ] - }, - "CreateNotificationConfig": { - "methods": [ - "create_notification_config" - ] - }, - "DeleteNotificationConfig": { - "methods": [ - "delete_notification_config" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "GetNotificationConfig": { - "methods": [ - "get_notification_config" - ] - }, - "GetOrganizationSettings": { - "methods": [ - "get_organization_settings" - ] - }, - "GetSource": { - "methods": [ - "get_source" - ] - }, - "GroupAssets": { - "methods": [ - "group_assets" - ] - }, - "GroupFindings": { - "methods": [ - "group_findings" - ] - }, - "ListAssets": { - "methods": [ - "list_assets" - ] - }, - "ListFindings": { - "methods": [ - "list_findings" - ] - }, - "ListNotificationConfigs": { - "methods": [ - "list_notification_configs" - ] - }, - "ListSources": { - "methods": [ - "list_sources" - ] - }, - "RunAssetDiscovery": { - "methods": [ - "run_asset_discovery" - ] - }, - "SetFindingState": { - "methods": [ - "set_finding_state" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "UpdateFinding": { - "methods": [ - "update_finding" - ] - }, - "UpdateNotificationConfig": { - "methods": [ - "update_notification_config" - ] - }, - "UpdateOrganizationSettings": { - "methods": [ - "update_organization_settings" - ] - }, - "UpdateSource": { - "methods": [ - "update_source" - ] - }, - "UpdateSecurityMarks": { - "methods": [ - "update_security_marks" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/google-cloud-security_center-v1p1beta1.gemspec b/owl-bot-staging/google-cloud-security_center-v1p1beta1/google-cloud-security_center-v1p1beta1.gemspec deleted file mode 100644 index fc15187be561..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/google-cloud-security_center-v1p1beta1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security_center/v1p1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security_center-v1p1beta1" - gem.version = Google::Cloud::SecurityCenter::V1p1beta1::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. Note that google-cloud-security_center-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details." - gem.summary = "Security Command Center API provides access to temporal views of assets and findings within an organization." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.rb deleted file mode 100644 index 1e7ec4c542f6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google-cloud-security_center-v1p1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/security_center/v1p1beta1" diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.rb deleted file mode 100644 index 60f6b23b8bbb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center/v1p1beta1/security_center" -require "google/cloud/security_center/v1p1beta1/version" - -module Google - module Cloud - module SecurityCenter - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/security_center/v1p1beta1" - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/security_center/v1p1beta1" - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - module V1p1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1p1beta1", "_helpers.rb" -require "google/cloud/security_center/v1p1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.rb deleted file mode 100644 index 33c18366ecf2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center/v1p1beta1/security_center/rest" -require "google/cloud/security_center/v1p1beta1/version" - -module Google - module Cloud - module SecurityCenter - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/security_center/v1p1beta1/rest" - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - module V1p1beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center.rb deleted file mode 100644 index 77d09feb2118..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security_center/v1p1beta1/version" - -require "google/cloud/security_center/v1p1beta1/security_center/credentials" -require "google/cloud/security_center/v1p1beta1/security_center/paths" -require "google/cloud/security_center/v1p1beta1/security_center/operations" -require "google/cloud/security_center/v1p1beta1/security_center/client" -require "google/cloud/security_center/v1p1beta1/security_center/rest" - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - ## - # V1p1Beta1 APIs for Security Center service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/security_center/v1p1beta1/security_center" - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/security_center/v1p1beta1/security_center/rest" - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - module SecurityCenter - end - end - end - end -end - -helper_path = ::File.join __dir__, "security_center", "helpers.rb" -require "google/cloud/security_center/v1p1beta1/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb deleted file mode 100644 index 3a6e0cf3a6fb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/client.rb +++ /dev/null @@ -1,3252 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - module SecurityCenter - ## - # Client for the SecurityCenter service. - # - # V1p1Beta1 APIs for Security Center service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :security_center_stub - - ## - # Configure the SecurityCenter Client class. - # - # See {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenter clients - # ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecurityCenter", "V1p1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_source.timeout = 60.0 - - default_config.rpcs.create_finding.timeout = 60.0 - - default_config.rpcs.create_notification_config.timeout = 60.0 - - default_config.rpcs.delete_notification_config.timeout = 60.0 - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_notification_config.timeout = 60.0 - default_config.rpcs.get_notification_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_organization_settings.timeout = 60.0 - default_config.rpcs.get_organization_settings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_source.timeout = 60.0 - default_config.rpcs.get_source.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_assets.timeout = 480.0 - default_config.rpcs.group_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_findings.timeout = 480.0 - default_config.rpcs.group_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_assets.timeout = 480.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_findings.timeout = 480.0 - default_config.rpcs.list_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_notification_configs.timeout = 60.0 - default_config.rpcs.list_notification_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_sources.timeout = 60.0 - default_config.rpcs.list_sources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.run_asset_discovery.timeout = 60.0 - - default_config.rpcs.set_finding_state.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_finding.timeout = 60.0 - - default_config.rpcs.update_notification_config.timeout = 60.0 - - default_config.rpcs.update_organization_settings.timeout = 60.0 - - default_config.rpcs.update_source.timeout = 60.0 - - default_config.rpcs.update_security_marks.timeout = 480.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @security_center_stub.universe_domain - end - - ## - # Create a new SecurityCenter client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecurityCenter client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @security_center_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @security_center_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @security_center_stub.logger - end - - # Service calls - - ## - # Creates a source. - # - # @overload create_source(request, options = nil) - # Pass arguments to `create_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_source(parent: nil, source: nil) - # Pass arguments to `create_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new source's parent. Its format should be - # "organizations/[organization_id]". - # @param source [::Google::Cloud::SecurityCenter::V1p1beta1::Source, ::Hash] - # Required. The Source being created, only the display_name and description will be - # used. All other fields will be ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new - # - # # Call the create_source method. - # result = client.create_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. - # p result - # - def create_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a finding. The corresponding source must exist for finding - # creation to succeed. - # - # @overload create_finding(request, options = nil) - # Pass arguments to `create_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_finding(parent: nil, finding_id: nil, finding: nil) - # Pass arguments to `create_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new finding's parent. Its format should be - # "organizations/[organization_id]/sources/[source_id]". - # @param finding_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # @param finding [::Google::Cloud::SecurityCenter::V1p1beta1::Finding, ::Hash] - # Required. The Finding being created. The name and security_marks will be ignored as - # they are both output only fields on this resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new - # - # # Call the create_finding method. - # result = client.create_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. - # p result - # - def create_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_finding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_finding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a notification config. - # - # @overload create_notification_config(request, options = nil) - # Pass arguments to `create_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) - # Pass arguments to `create_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new notification config's parent. Its format is - # "organizations/[organization_id]". - # @param config_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters, and contains alphanumeric - # characters, underscores or hyphens only. - # @param notification_config [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig, ::Hash] - # Required. The notification config being created. The name and the service account - # will be ignored as they are both output only fields on this resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new - # - # # Call the create_notification_config method. - # result = client.create_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - # p result - # - def create_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a notification config. - # - # @overload delete_notification_config(request, options = nil) - # Pass arguments to `delete_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_notification_config(name: nil) - # Pass arguments to `delete_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to delete. Its format is - # "organizations/[organization_id]/notificationConfigs/[config_id]". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new - # - # # Call the delete_notification_config method. - # result = client.delete_notification_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy on the specified Source. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a notification config. - # - # @overload get_notification_config(request, options = nil) - # Pass arguments to `get_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_notification_config(name: nil) - # Pass arguments to `get_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to get. Its format is - # "organizations/[organization_id]/notificationConfigs/[config_id]". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new - # - # # Call the get_notification_config method. - # result = client.get_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - # p result - # - def get_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the settings for an organization. - # - # @overload get_organization_settings(request, options = nil) - # Pass arguments to `get_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_organization_settings(name: nil) - # Pass arguments to `get_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the organization to get organization settings for. Its format is - # "organizations/[organization_id]/organizationSettings". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new - # - # # Call the get_organization_settings method. - # result = client.get_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. - # p result - # - def get_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_organization_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a source. - # - # @overload get_source(request, options = nil) - # Pass arguments to `get_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_source(name: nil) - # Pass arguments to `get_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Relative resource name of the source. Its format is - # "organizations/[organization_id]/source/[source_id]". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new - # - # # Call the get_source method. - # result = client.get_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. - # p result - # - def get_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization's assets and groups them by their specified - # properties. - # - # @overload group_assets(request, options = nil) - # Pass arguments to `group_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization to groupBy. Its format is - # "organizations/[organization_id], folders/[folder_id], or - # projects/[project_id]". - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_name_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping. The string - # value should follow SQL syntax: comma separated list of fields. For - # example: - # "security_center_properties.resource_project,security_center_properties.project". - # - # The following fields are supported when compare_duration is not set: - # - # * security_center_properties.resource_project - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_type - # * security_center_properties.resource_parent - # * security_center_properties.resource_parent_display_name - # - # The following fields are supported when compare_duration is set: - # - # * security_center_properties.resource_type - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_parent_display_name - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" property is - # updated to indicate whether the asset was added, removed, or remained - # present during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at reference_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at reference_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and reference_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param page_token [::String] - # The value returned by the last `GroupAssetsResponse`; indicates - # that this is a continuation of a prior `GroupAssets` call, and that the - # system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new - # - # # Call the group_assets method. - # result = client.group_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. - # p item - # end - # - def group_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.group_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.group_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.group_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :group_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_assets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization or source's findings and groups them by their - # specified properties. - # - # To group across all sources provide a `-` as the source id. - # Example: /v1/organizations/\\{organization_id}/sources/-/findings, - # /v1/folders/\\{folder_id}/sources/-/findings, - # /v1/projects/\\{project_id}/sources/-/findings - # - # @overload group_findings(request, options = nil) - # Pass arguments to `group_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source to groupBy. Its format is - # "organizations/[organization_id]/sources/[source_id]", - # folders/[folder_id]/sources/[source_id], or - # projects/[project_id]/sources/[source_id]. To groupBy across all sources - # provide a source_id of `-`. For example: - # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/-, - # or projects/\\{project_id}/sources/- - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # * severity: `=`, `:` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping (including - # `state_change`). The string value should follow SQL syntax: comma separated - # list of fields. For example: "parent,resource_name". - # - # The following fields are supported: - # - # * resource_name - # * category - # * state - # * parent - # * severity - # - # The following fields are supported when compare_duration is set: - # - # * state_change - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" attribute is - # updated to indicate whether the finding had its state changed, the - # finding's state remained unchanged, or if the finding was added during the - # compare_duration period of time that precedes the read_time. This is the - # time between (read_time - compare_duration) and read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present - # at read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param page_token [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new - # - # # Call the group_findings method. - # result = client.group_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. - # p item - # end - # - def group_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.group_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.group_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.group_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :group_findings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_findings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization's assets. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization assets should belong to. Its format is - # "organizations/[organization_id], folders/[folder_id], or - # projects/[project_id]". - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following are the allowed field and operator combinations: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,resource_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,resource_properties.a_property" and " - # name desc , resource_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # update_time - # resource_properties - # security_marks.marks - # security_center_properties.resource_name - # security_center_properties.resource_display_name - # security_center_properties.resource_parent - # security_center_properties.resource_parent_display_name - # security_center_properties.resource_project - # security_center_properties.resource_project_display_name - # security_center_properties.resource_type - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListAssetsResult's "state_change" - # attribute is updated to indicate whether the asset was added, removed, or - # remained present during the compare_duration period of time that precedes - # the read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at read_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at read_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the ListAssetsResult fields to be listed in the - # response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListAssetsResponse`; indicates - # that this is a continuation of a prior `ListAssets` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_assets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_assets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization or source's findings. - # - # To list across all sources provide a `-` as the source id. - # Example: /v1p1beta1/organizations/\\{organization_id}/sources/-/findings - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source the findings belong to. Its format is - # "organizations/[organization_id]/sources/[source_id], - # folders/[folder_id]/sources/[source_id], or - # projects/[project_id]/sources/[source_id]". To list across all sources - # provide a source_id of `-`. For example: - # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/- or - # projects/\\{projects_id}/sources/- - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # * severity: `=`, `:` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # security_marks.marks: `=`, `:` - # source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,source_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,source_properties.a_property" and " - # name desc , source_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # source_properties - # security_marks.marks - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListFindingsResult's "state_change" - # attribute is updated to indicate whether the finding had its state changed, - # the finding's state remained unchanged, or if the finding was added in any - # state during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_findings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_findings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists notification configs. - # - # @overload list_notification_configs(request, options = nil) - # Pass arguments to `list_notification_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_notification_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization to list notification configs. - # Its format is "organizations/[organization_id]". - # @param page_token [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new - # - # # Call the list_notification_configs method. - # result = client.list_notification_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - # p item - # end - # - def list_notification_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_notification_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_notification_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_notification_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_notification_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all sources belonging to an organization. - # - # @overload list_sources(request, options = nil) - # Pass arguments to `list_sources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent of sources to list. Its format should be - # "organizations/[organization_id], folders/[folder_id], or - # projects/[project_id]". - # @param page_token [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::Source>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::Source>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new - # - # # Call the list_sources method. - # result = client.list_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::Source. - # p item - # end - # - def list_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs asset discovery. The discovery is tracked with a long-running - # operation. - # - # This API can only be called with limited frequency for an organization. If - # it is called too frequently the caller will receive a TOO_MANY_REQUESTS - # error. - # - # @overload run_asset_discovery(request, options = nil) - # Pass arguments to `run_asset_discovery` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_asset_discovery(parent: nil) - # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization to run asset discovery for. Its format is - # "organizations/[organization_id]". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new - # - # # Call the run_asset_discovery method. - # result = client.run_asset_discovery request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_asset_discovery request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_asset_discovery.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_asset_discovery.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :run_asset_discovery, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the state of a finding. - # - # @overload set_finding_state(request, options = nil) - # Pass arguments to `set_finding_state` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_finding_state(name: nil, state: nil, start_time: nil) - # Pass arguments to `set_finding_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The relative resource name of the finding. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/sources/\\{source_id}/finding/\\{finding_id}". - # @param state [::Google::Cloud::SecurityCenter::V1p1beta1::Finding::State] - # Required. The desired State of the finding. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The time at which the updated state takes effect. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new - # - # # Call the set_finding_state method. - # result = client.set_finding_state request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. - # p result - # - def set_finding_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_finding_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_finding_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :set_finding_state, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified Source. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has on the specified source. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a finding. The corresponding source must exist for a - # finding creation to succeed. - # - # @overload update_finding(request, options = nil) - # Pass arguments to `update_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_finding(finding: nil, update_mask: nil) - # Pass arguments to `update_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param finding [::Google::Cloud::SecurityCenter::V1p1beta1::Finding, ::Hash] - # Required. The finding resource to update or create if it does not already exist. - # parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new - # - # # Call the update_finding method. - # result = client.update_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. - # p result - # - def update_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.finding&.name - header_params["finding.name"] = request.finding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_finding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_finding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - # - # @overload update_notification_config(request, options = nil) - # Pass arguments to `update_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_notification_config(notification_config: nil, update_mask: nil) - # Pass arguments to `update_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_config [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig, ::Hash] - # Required. The notification config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new - # - # # Call the update_notification_config method. - # result = client.update_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - # p result - # - def update_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.notification_config&.name - header_params["notification_config.name"] = request.notification_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an organization's settings. - # - # @overload update_organization_settings(request, options = nil) - # Pass arguments to `update_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_organization_settings(organization_settings: nil, update_mask: nil) - # Pass arguments to `update_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param organization_settings [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings, ::Hash] - # Required. The organization settings resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the settings resource. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new - # - # # Call the update_organization_settings method. - # result = client.update_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. - # p result - # - def update_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.organization_settings&.name - header_params["organization_settings.name"] = request.organization_settings.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_organization_settings, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a source. - # - # @overload update_source(request, options = nil) - # Pass arguments to `update_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_source(source: nil, update_mask: nil) - # Pass arguments to `update_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param source [::Google::Cloud::SecurityCenter::V1p1beta1::Source, ::Hash] - # Required. The source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new - # - # # Call the update_source method. - # result = client.update_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. - # p result - # - def update_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.source&.name - header_params["source.name"] = request.source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates security marks. - # - # @overload update_security_marks(request, options = nil) - # Pass arguments to `update_security_marks` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) - # Pass arguments to `update_security_marks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_marks [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks, ::Hash] - # Required. The security marks resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # The time at which the updated SecurityMarks take effect. - # If not set uses current server time. Updates will be applied to the - # SecurityMarks that are active immediately preceding this time. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new - # - # # Call the update_security_marks method. - # result = client.update_security_marks request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks. - # p result - # - def update_security_marks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_security_marks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.security_marks&.name - header_params["security_marks.name"] = request.security_marks.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_security_marks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_security_marks, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecurityCenter API. - # - # This class represents the configuration for SecurityCenter, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the SecurityCenter API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_source - ## - # RPC-specific configuration for `create_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_finding - ## - # RPC-specific configuration for `create_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_config - ## - # RPC-specific configuration for `delete_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_config - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `get_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_config - ## - # RPC-specific configuration for `get_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_organization_settings - ## - # RPC-specific configuration for `get_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_source - ## - # RPC-specific configuration for `group_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :group_assets - ## - # RPC-specific configuration for `group_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :group_findings - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_notification_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_configs - ## - # RPC-specific configuration for `list_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sources - ## - # RPC-specific configuration for `run_asset_discovery` - # @return [::Gapic::Config::Method] - # - attr_reader :run_asset_discovery - ## - # RPC-specific configuration for `set_finding_state` - # @return [::Gapic::Config::Method] - # - attr_reader :set_finding_state - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `update_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_finding - ## - # RPC-specific configuration for `update_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_config - ## - # RPC-specific configuration for `update_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_organization_settings - ## - # RPC-specific configuration for `update_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_source - ## - # RPC-specific configuration for `update_security_marks` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_marks - - # @private - def initialize parent_rpcs = nil - create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source - @create_source = ::Gapic::Config::Method.new create_source_config - create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding - @create_finding = ::Gapic::Config::Method.new create_finding_config - create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config - @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config - delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config - @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config - @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config - get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings - @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config - get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source - @get_source = ::Gapic::Config::Method.new get_source_config - group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets - @group_assets = ::Gapic::Config::Method.new group_assets_config - group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings - @group_findings = ::Gapic::Config::Method.new group_findings_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs - @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config - list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources - @list_sources = ::Gapic::Config::Method.new list_sources_config - run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery - @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config - set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state - @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding - @update_finding = ::Gapic::Config::Method.new update_finding_config - update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config - @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config - update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings - @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config - update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source - @update_source = ::Gapic::Config::Method.new update_source_config - update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks - @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.rb deleted file mode 100644 index cff88a0ffb4f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - module SecurityCenter - # Credentials for the SecurityCenter API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SECURITY_CENTER_CREDENTIALS", - "SECURITY_CENTER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SECURITY_CENTER_CREDENTIALS_JSON", - "SECURITY_CENTER_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb deleted file mode 100644 index 3e582dfdb7f9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - module SecurityCenter - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the SecurityCenter Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.rb deleted file mode 100644 index 7551d4c8776c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/paths.rb +++ /dev/null @@ -1,330 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1p1beta1 - module SecurityCenter - # Path helper methods for the SecurityCenter API. - module Paths - ## - # Create a fully-qualified Finding resource string. - # - # @overload finding_path(organization:, source:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/findings/{finding}` - # - # @param organization [String] - # @param source [String] - # @param finding [String] - # - # @overload finding_path(folder:, source:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/findings/{finding}` - # - # @param folder [String] - # @param source [String] - # @param finding [String] - # - # @overload finding_path(project:, source:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/findings/{finding}` - # - # @param project [String] - # @param source [String] - # @param finding [String] - # - # @return [::String] - def finding_path **args - resources = { - "finding:organization:source" => (proc do |organization:, source:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/findings/#{finding}" - end), - "finding:folder:source" => (proc do |folder:, source:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/findings/#{finding}" - end), - "finding:project:source" => (proc do |project:, source:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "projects/#{project}/sources/#{source}/findings/#{finding}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Folder resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}` - # - # @param folder [String] - # - # @return [::String] - def folder_path folder: - "folders/#{folder}" - end - - ## - # Create a fully-qualified NotificationConfig resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/notificationConfigs/{notification_config}` - # - # @param organization [String] - # @param notification_config [String] - # - # @return [::String] - def notification_config_path organization:, notification_config: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/notificationConfigs/#{notification_config}" - end - - ## - # Create a fully-qualified Organization resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}` - # - # @param organization [String] - # - # @return [::String] - def organization_path organization: - "organizations/#{organization}" - end - - ## - # Create a fully-qualified OrganizationSettings resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/organizationSettings` - # - # @param organization [String] - # - # @return [::String] - def organization_settings_path organization: - "organizations/#{organization}/organizationSettings" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified SecurityMarks resource string. - # - # @overload security_marks_path(organization:, asset:) - # The resource will be in the following format: - # - # `organizations/{organization}/assets/{asset}/securityMarks` - # - # @param organization [String] - # @param asset [String] - # - # @overload security_marks_path(organization:, source:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/findings/{finding}/securityMarks` - # - # @param organization [String] - # @param source [String] - # @param finding [String] - # - # @overload security_marks_path(folder:, asset:) - # The resource will be in the following format: - # - # `folders/{folder}/assets/{asset}/securityMarks` - # - # @param folder [String] - # @param asset [String] - # - # @overload security_marks_path(project:, asset:) - # The resource will be in the following format: - # - # `projects/{project}/assets/{asset}/securityMarks` - # - # @param project [String] - # @param asset [String] - # - # @overload security_marks_path(folder:, source:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/findings/{finding}/securityMarks` - # - # @param folder [String] - # @param source [String] - # @param finding [String] - # - # @overload security_marks_path(project:, source:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/findings/{finding}/securityMarks` - # - # @param project [String] - # @param source [String] - # @param finding [String] - # - # @return [::String] - def security_marks_path **args - resources = { - "asset:organization" => (proc do |organization:, asset:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/assets/#{asset}/securityMarks" - end), - "finding:organization:source" => (proc do |organization:, source:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/findings/#{finding}/securityMarks" - end), - "asset:folder" => (proc do |folder:, asset:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/assets/#{asset}/securityMarks" - end), - "asset:project" => (proc do |project:, asset:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/assets/#{asset}/securityMarks" - end), - "finding:folder:source" => (proc do |folder:, source:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/findings/#{finding}/securityMarks" - end), - "finding:project:source" => (proc do |project:, source:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "projects/#{project}/sources/#{source}/findings/#{finding}/securityMarks" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Source resource string. - # - # @overload source_path(organization:, source:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}` - # - # @param organization [String] - # @param source [String] - # - # @overload source_path(folder:, source:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}` - # - # @param folder [String] - # @param source [String] - # - # @overload source_path(project:, source:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}` - # - # @param project [String] - # @param source [String] - # - # @return [::String] - def source_path **args - resources = { - "organization:source" => (proc do |organization:, source:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}" - end), - "folder:source" => (proc do |folder:, source:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/sources/#{source}" - end), - "project:source" => (proc do |project:, source:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/sources/#{source}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Topic resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/topics/{topic}` - # - # @param project [String] - # @param topic [String] - # - # @return [::String] - def topic_path project:, topic: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/topics/#{topic}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.rb deleted file mode 100644 index 942518e93e2c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security_center/v1p1beta1/version" - -require "google/cloud/security_center/v1p1beta1/security_center/credentials" -require "google/cloud/security_center/v1p1beta1/security_center/paths" -require "google/cloud/security_center/v1p1beta1/security_center/rest/operations" -require "google/cloud/security_center/v1p1beta1/security_center/rest/client" - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - ## - # V1p1Beta1 APIs for Security Center service. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/security_center/v1p1beta1/security_center/rest" - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - module SecurityCenter - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/security_center/v1p1beta1/security_center/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.rb deleted file mode 100644 index 4856205779aa..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/client.rb +++ /dev/null @@ -1,3048 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" -require "google/cloud/security_center/v1p1beta1/security_center/rest/service_stub" - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - module SecurityCenter - module Rest - ## - # REST client for the SecurityCenter service. - # - # V1p1Beta1 APIs for Security Center service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :security_center_stub - - ## - # Configure the SecurityCenter Client class. - # - # See {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenter clients - # ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecurityCenter", "V1p1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_source.timeout = 60.0 - - default_config.rpcs.create_finding.timeout = 60.0 - - default_config.rpcs.create_notification_config.timeout = 60.0 - - default_config.rpcs.delete_notification_config.timeout = 60.0 - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_notification_config.timeout = 60.0 - default_config.rpcs.get_notification_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_organization_settings.timeout = 60.0 - default_config.rpcs.get_organization_settings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_source.timeout = 60.0 - default_config.rpcs.get_source.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_assets.timeout = 480.0 - default_config.rpcs.group_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.group_findings.timeout = 480.0 - default_config.rpcs.group_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_assets.timeout = 480.0 - default_config.rpcs.list_assets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_findings.timeout = 480.0 - default_config.rpcs.list_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_notification_configs.timeout = 60.0 - default_config.rpcs.list_notification_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_sources.timeout = 60.0 - default_config.rpcs.list_sources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.run_asset_discovery.timeout = 60.0 - - default_config.rpcs.set_finding_state.timeout = 60.0 - - default_config.rpcs.set_iam_policy.timeout = 60.0 - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_finding.timeout = 60.0 - - default_config.rpcs.update_notification_config.timeout = 60.0 - - default_config.rpcs.update_organization_settings.timeout = 60.0 - - default_config.rpcs.update_source.timeout = 60.0 - - default_config.rpcs.update_security_marks.timeout = 480.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @security_center_stub.universe_domain - end - - ## - # Create a new SecurityCenter REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecurityCenter client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @security_center_stub = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @security_center_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @security_center_stub.logger - end - - # Service calls - - ## - # Creates a source. - # - # @overload create_source(request, options = nil) - # Pass arguments to `create_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_source(parent: nil, source: nil) - # Pass arguments to `create_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new source's parent. Its format should be - # "organizations/[organization_id]". - # @param source [::Google::Cloud::SecurityCenter::V1p1beta1::Source, ::Hash] - # Required. The Source being created, only the display_name and description will be - # used. All other fields will be ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new - # - # # Call the create_source method. - # result = client.create_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. - # p result - # - def create_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a finding. The corresponding source must exist for finding - # creation to succeed. - # - # @overload create_finding(request, options = nil) - # Pass arguments to `create_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_finding(parent: nil, finding_id: nil, finding: nil) - # Pass arguments to `create_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new finding's parent. Its format should be - # "organizations/[organization_id]/sources/[source_id]". - # @param finding_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # @param finding [::Google::Cloud::SecurityCenter::V1p1beta1::Finding, ::Hash] - # Required. The Finding being created. The name and security_marks will be ignored as - # they are both output only fields on this resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new - # - # # Call the create_finding method. - # result = client.create_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. - # p result - # - def create_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_finding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_finding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a notification config. - # - # @overload create_notification_config(request, options = nil) - # Pass arguments to `create_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) - # Pass arguments to `create_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new notification config's parent. Its format is - # "organizations/[organization_id]". - # @param config_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters, and contains alphanumeric - # characters, underscores or hyphens only. - # @param notification_config [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig, ::Hash] - # Required. The notification config being created. The name and the service account - # will be ignored as they are both output only fields on this resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new - # - # # Call the create_notification_config method. - # result = client.create_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - # p result - # - def create_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a notification config. - # - # @overload delete_notification_config(request, options = nil) - # Pass arguments to `delete_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_notification_config(name: nil) - # Pass arguments to `delete_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to delete. Its format is - # "organizations/[organization_id]/notificationConfigs/[config_id]". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new - # - # # Call the delete_notification_config method. - # result = client.delete_notification_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy on the specified Source. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a notification config. - # - # @overload get_notification_config(request, options = nil) - # Pass arguments to `get_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_notification_config(name: nil) - # Pass arguments to `get_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to get. Its format is - # "organizations/[organization_id]/notificationConfigs/[config_id]". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new - # - # # Call the get_notification_config method. - # result = client.get_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - # p result - # - def get_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the settings for an organization. - # - # @overload get_organization_settings(request, options = nil) - # Pass arguments to `get_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_organization_settings(name: nil) - # Pass arguments to `get_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the organization to get organization settings for. Its format is - # "organizations/[organization_id]/organizationSettings". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new - # - # # Call the get_organization_settings method. - # result = client.get_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. - # p result - # - def get_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_organization_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_organization_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a source. - # - # @overload get_source(request, options = nil) - # Pass arguments to `get_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_source(name: nil) - # Pass arguments to `get_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Relative resource name of the source. Its format is - # "organizations/[organization_id]/source/[source_id]". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new - # - # # Call the get_source method. - # result = client.get_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. - # p result - # - def get_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization's assets and groups them by their specified - # properties. - # - # @overload group_assets(request, options = nil) - # Pass arguments to `group_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload group_assets(parent: nil, filter: nil, group_by: nil, compare_duration: nil, read_time: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization to groupBy. Its format is - # "organizations/[organization_id], folders/[folder_id], or - # projects/[project_id]". - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_name_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping. The string - # value should follow SQL syntax: comma separated list of fields. For - # example: - # "security_center_properties.resource_project,security_center_properties.project". - # - # The following fields are supported when compare_duration is not set: - # - # * security_center_properties.resource_project - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_type - # * security_center_properties.resource_parent - # * security_center_properties.resource_parent_display_name - # - # The following fields are supported when compare_duration is set: - # - # * security_center_properties.resource_type - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_parent_display_name - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" property is - # updated to indicate whether the asset was added, removed, or remained - # present during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at reference_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at reference_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and reference_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param page_token [::String] - # The value returned by the last `GroupAssetsResponse`; indicates - # that this is a continuation of a prior `GroupAssets` call, and that the - # system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new - # - # # Call the group_assets method. - # result = client.group_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. - # p item - # end - # - def group_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.group_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.group_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.group_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.group_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_assets, "group_by_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization or source's findings and groups them by their - # specified properties. - # - # To group across all sources provide a `-` as the source id. - # Example: /v1/organizations/\\{organization_id}/sources/-/findings, - # /v1/folders/\\{folder_id}/sources/-/findings, - # /v1/projects/\\{project_id}/sources/-/findings - # - # @overload group_findings(request, options = nil) - # Pass arguments to `group_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload group_findings(parent: nil, filter: nil, group_by: nil, read_time: nil, compare_duration: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source to groupBy. Its format is - # "organizations/[organization_id]/sources/[source_id]", - # folders/[folder_id]/sources/[source_id], or - # projects/[project_id]/sources/[source_id]. To groupBy across all sources - # provide a source_id of `-`. For example: - # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/-, - # or projects/\\{project_id}/sources/- - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # * severity: `=`, `:` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping (including - # `state_change`). The string value should follow SQL syntax: comma separated - # list of fields. For example: "parent,resource_name". - # - # The following fields are supported: - # - # * resource_name - # * category - # * state - # * parent - # * severity - # - # The following fields are supported when compare_duration is set: - # - # * state_change - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the GroupResult's "state_change" attribute is - # updated to indicate whether the finding had its state changed, the - # finding's state remained unchanged, or if the finding was added during the - # compare_duration period of time that precedes the read_time. This is the - # time between (read_time - compare_duration) and read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present - # at read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @param page_token [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new - # - # # Call the group_findings method. - # result = client.group_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. - # p item - # end - # - def group_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.group_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.group_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.group_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.group_findings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization's assets. - # - # @overload list_assets(request, options = nil) - # Pass arguments to `list_assets` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_assets(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_assets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization assets should belong to. Its format is - # "organizations/[organization_id], folders/[folder_id], or - # projects/[project_id]". - # @param filter [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following are the allowed field and operator combinations: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,resource_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,resource_properties.a_property" and " - # name desc , resource_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # update_time - # resource_properties - # security_marks.marks - # security_center_properties.resource_name - # security_center_properties.resource_display_name - # security_center_properties.resource_parent - # security_center_properties.resource_parent_display_name - # security_center_properties.resource_project - # security_center_properties.resource_project_display_name - # security_center_properties.resource_type - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListAssetsResult's "state_change" - # attribute is updated to indicate whether the asset was added, removed, or - # remained present during the compare_duration period of time that precedes - # the read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at read_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at read_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the ListAssetsResult fields to be listed in the - # response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListAssetsResponse`; indicates - # that this is a continuation of a prior `ListAssets` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new - # - # # Call the list_assets method. - # result = client.list_assets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult. - # p item - # end - # - def list_assets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_assets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_assets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_assets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_assets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_assets, "list_assets_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization or source's findings. - # - # To list across all sources provide a `-` as the source id. - # Example: /v1p1beta1/organizations/\\{organization_id}/sources/-/findings - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, order_by: nil, read_time: nil, compare_duration: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source the findings belong to. Its format is - # "organizations/[organization_id]/sources/[source_id], - # folders/[folder_id]/sources/[source_id], or - # projects/[project_id]/sources/[source_id]". To list across all sources - # provide a source_id of `-`. For example: - # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/- or - # projects/\\{projects_id}/sources/- - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # * severity: `=`, `:` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # security_marks.marks: `=`, `:` - # source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,source_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,source_properties.a_property" and " - # name desc , source_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # source_properties - # security_marks.marks - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @param compare_duration [::Google::Protobuf::Duration, ::Hash] - # When compare_duration is set, the ListFindingsResult's "state_change" - # attribute is updated to indicate whether the finding had its state changed, - # the finding's state remained unchanged, or if the finding was added in any - # state during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present at - # read_time. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_findings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists notification configs. - # - # @overload list_notification_configs(request, options = nil) - # Pass arguments to `list_notification_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_notification_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization to list notification configs. - # Its format is "organizations/[organization_id]". - # @param page_token [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new - # - # # Call the list_notification_configs method. - # result = client.list_notification_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - # p item - # end - # - def list_notification_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_notification_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_notification_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_notification_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all sources belonging to an organization. - # - # @overload list_sources(request, options = nil) - # Pass arguments to `list_sources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent of sources to list. Its format should be - # "organizations/[organization_id], folders/[folder_id], or - # projects/[project_id]". - # @param page_token [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::Source>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V1p1beta1::Source>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new - # - # # Call the list_sources method. - # result = client.list_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::Source. - # p item - # end - # - def list_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs asset discovery. The discovery is tracked with a long-running - # operation. - # - # This API can only be called with limited frequency for an organization. If - # it is called too frequently the caller will receive a TOO_MANY_REQUESTS - # error. - # - # @overload run_asset_discovery(request, options = nil) - # Pass arguments to `run_asset_discovery` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_asset_discovery(parent: nil) - # Pass arguments to `run_asset_discovery` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the organization to run asset discovery for. Its format is - # "organizations/[organization_id]". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new - # - # # Call the run_asset_discovery method. - # result = client.run_asset_discovery request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_asset_discovery request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_asset_discovery.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_asset_discovery.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_asset_discovery.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.run_asset_discovery request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the state of a finding. - # - # @overload set_finding_state(request, options = nil) - # Pass arguments to `set_finding_state` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_finding_state(name: nil, state: nil, start_time: nil) - # Pass arguments to `set_finding_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The relative resource name of the finding. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/sources/\\{source_id}/finding/\\{finding_id}". - # @param state [::Google::Cloud::SecurityCenter::V1p1beta1::Finding::State] - # Required. The desired State of the finding. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The time at which the updated state takes effect. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new - # - # # Call the set_finding_state method. - # result = client.set_finding_state request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. - # p result - # - def set_finding_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_finding_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_finding_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.set_finding_state request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified Source. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has on the specified source. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a finding. The corresponding source must exist for a - # finding creation to succeed. - # - # @overload update_finding(request, options = nil) - # Pass arguments to `update_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_finding(finding: nil, update_mask: nil) - # Pass arguments to `update_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param finding [::Google::Cloud::SecurityCenter::V1p1beta1::Finding, ::Hash] - # Required. The finding resource to update or create if it does not already exist. - # parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new - # - # # Call the update_finding method. - # result = client.update_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. - # p result - # - def update_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_finding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_finding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - # - # @overload update_notification_config(request, options = nil) - # Pass arguments to `update_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_notification_config(notification_config: nil, update_mask: nil) - # Pass arguments to `update_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_config [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig, ::Hash] - # Required. The notification config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new - # - # # Call the update_notification_config method. - # result = client.update_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - # p result - # - def update_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an organization's settings. - # - # @overload update_organization_settings(request, options = nil) - # Pass arguments to `update_organization_settings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_organization_settings(organization_settings: nil, update_mask: nil) - # Pass arguments to `update_organization_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param organization_settings [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings, ::Hash] - # Required. The organization settings resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the settings resource. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new - # - # # Call the update_organization_settings method. - # result = client.update_organization_settings request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. - # p result - # - def update_organization_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_organization_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_organization_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_organization_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_organization_settings request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a source. - # - # @overload update_source(request, options = nil) - # Pass arguments to `update_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_source(source: nil, update_mask: nil) - # Pass arguments to `update_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param source [::Google::Cloud::SecurityCenter::V1p1beta1::Source, ::Hash] - # Required. The source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new - # - # # Call the update_source method. - # result = client.update_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. - # p result - # - def update_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates security marks. - # - # @overload update_security_marks(request, options = nil) - # Pass arguments to `update_security_marks` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_security_marks(security_marks: nil, update_mask: nil, start_time: nil) - # Pass arguments to `update_security_marks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_marks [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks, ::Hash] - # Required. The security marks resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # The time at which the updated SecurityMarks take effect. - # If not set uses current server time. Updates will be applied to the - # SecurityMarks that are active immediately preceding this time. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new - # - # # Call the update_security_marks method. - # result = client.update_security_marks request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks. - # p result - # - def update_security_marks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_security_marks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_security_marks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_security_marks request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecurityCenter REST API. - # - # This class represents the configuration for SecurityCenter REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_source.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the SecurityCenter API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_source - ## - # RPC-specific configuration for `create_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_finding - ## - # RPC-specific configuration for `create_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_config - ## - # RPC-specific configuration for `delete_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_config - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `get_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_config - ## - # RPC-specific configuration for `get_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :get_organization_settings - ## - # RPC-specific configuration for `get_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_source - ## - # RPC-specific configuration for `group_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :group_assets - ## - # RPC-specific configuration for `group_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :group_findings - ## - # RPC-specific configuration for `list_assets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assets - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_notification_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_configs - ## - # RPC-specific configuration for `list_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sources - ## - # RPC-specific configuration for `run_asset_discovery` - # @return [::Gapic::Config::Method] - # - attr_reader :run_asset_discovery - ## - # RPC-specific configuration for `set_finding_state` - # @return [::Gapic::Config::Method] - # - attr_reader :set_finding_state - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `update_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_finding - ## - # RPC-specific configuration for `update_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_config - ## - # RPC-specific configuration for `update_organization_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :update_organization_settings - ## - # RPC-specific configuration for `update_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_source - ## - # RPC-specific configuration for `update_security_marks` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_marks - - # @private - def initialize parent_rpcs = nil - create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source - @create_source = ::Gapic::Config::Method.new create_source_config - create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding - @create_finding = ::Gapic::Config::Method.new create_finding_config - create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config - @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config - delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config - @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config - @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config - get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings - @get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config - get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source - @get_source = ::Gapic::Config::Method.new get_source_config - group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets - @group_assets = ::Gapic::Config::Method.new group_assets_config - group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings - @group_findings = ::Gapic::Config::Method.new group_findings_config - list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets - @list_assets = ::Gapic::Config::Method.new list_assets_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs - @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config - list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources - @list_sources = ::Gapic::Config::Method.new list_sources_config - run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery - @run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config - set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state - @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding - @update_finding = ::Gapic::Config::Method.new update_finding_config - update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config - @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config - update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings - @update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config - update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source - @update_source = ::Gapic::Config::Method.new update_source_config - update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks - @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.rb deleted file mode 100644 index 6de3f7437ac2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - module SecurityCenter - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the SecurityCenter Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.rb deleted file mode 100644 index 8b4fcab1731e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/security_center/rest/service_stub.rb +++ /dev/null @@ -1,1645 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - module SecurityCenter - module Rest - ## - # REST service stub for the SecurityCenter service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # A result object deserialized from the server's reply - def create_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # A result object deserialized from the server's reply - def create_finding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_finding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_finding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # A result object deserialized from the server's reply - def create_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # A result object deserialized from the server's reply - def get_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # A result object deserialized from the server's reply - def get_organization_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_organization_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_organization_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # A result object deserialized from the server's reply - def get_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the group_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse] - # A result object deserialized from the server's reply - def group_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_group_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "group_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the group_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse] - # A result object deserialized from the server's reply - def group_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_group_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "group_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse] - # A result object deserialized from the server's reply - def list_assets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_assets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_assets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse] - # A result object deserialized from the server's reply - def list_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_notification_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse] - # A result object deserialized from the server's reply - def list_notification_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_notification_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_sources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse] - # A result object deserialized from the server's reply - def list_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the run_asset_discovery REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def run_asset_discovery request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_asset_discovery_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_asset_discovery", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_finding_state REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # A result object deserialized from the server's reply - def set_finding_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_finding_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_finding_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # A result object deserialized from the server's reply - def update_finding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_finding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_finding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # A result object deserialized from the server's reply - def update_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # A result object deserialized from the server's reply - def update_organization_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_organization_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_organization_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # A result object deserialized from the server's reply - def update_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_security_marks REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] - # A result object deserialized from the server's reply - def update_security_marks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_security_marks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_security_marks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/sources", - body: "source", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_finding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/findings", - body: "finding", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_organization_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/organizationSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the group_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_group_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/assets:group", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/assets:group", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/assets:group", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the group_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_group_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_assets REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_assets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/assets", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/assets", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/assets", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/findings", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/findings", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/findings", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_notification_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_notification_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/sources", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/sources", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/sources", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_asset_discovery REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_asset_discovery_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/assets:runDiscovery", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_finding_state REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_finding_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{name}:setState", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{name}:setState", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{name}:setState", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_finding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^organizations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_organization_settings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_organization_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{organization_settings.name}", - body: "organization_settings", - matches: [ - ["organization_settings.name", %r{^organizations/[^/]+/organizationSettings/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{source.name}", - body: "source", - matches: [ - ["source.name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_security_marks REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_security_marks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/version.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/version.rb deleted file mode 100644 index 55106c9006d5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/security_center/v1p1beta1/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 SecurityCenter - module V1p1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/asset_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/asset_pb.rb deleted file mode 100644 index 9a12931a6f98..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/asset_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1p1beta1/asset.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v1p1beta1/folder_pb' -require 'google/cloud/securitycenter/v1p1beta1/security_marks_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/cloud/securitycenter/v1p1beta1/asset.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x19google/api/resource.proto\x1a\x32google/cloud/securitycenter/v1p1beta1/folder.proto\x1a:google/cloud/securitycenter/v1p1beta1/security_marks.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\x08\n\x05\x41sset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12i\n\x1asecurity_center_properties\x18\x02 \x01(\x0b\x32\x45.google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties\x12\x61\n\x13resource_properties\x18\x07 \x03(\x0b\x32\x44.google.cloud.securitycenter.v1p1beta1.Asset.ResourcePropertiesEntry\x12L\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32\x34.google.cloud.securitycenter.v1p1beta1.SecurityMarks\x12/\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12J\n\niam_policy\x18\x0b \x01(\x0b\x32\x36.google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy\x12\x16\n\x0e\x63\x61nonical_name\x18\r \x01(\t\x1a\xc0\x02\n\x18SecurityCenterProperties\x12\x15\n\rresource_name\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x17\n\x0fresource_parent\x18\x03 \x01(\t\x12\x18\n\x10resource_project\x18\x04 \x01(\t\x12\x17\n\x0fresource_owners\x18\x05 \x03(\t\x12\x1d\n\x15resource_display_name\x18\x06 \x01(\t\x12$\n\x1cresource_parent_display_name\x18\x07 \x01(\t\x12%\n\x1dresource_project_display_name\x18\x08 \x01(\t\x12>\n\x07\x66olders\x18\n \x03(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.Folder\x1a \n\tIamPolicy\x12\x13\n\x0bpolicy_blob\x18\x01 \x01(\t\x1aQ\n\x17ResourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01:\x9a\x01\xea\x41\x96\x01\n#securitycenter.googleapis.com/Asset\x12+organizations/{organization}/assets/{asset}\x12\x1f\x66olders/{folder}/assets/{asset}\x12!projects/{project}/assets/{asset}B\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Asset").msgclass - Asset::SecurityCenterProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties").msgclass - Asset::IamPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/finding_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/finding_pb.rb deleted file mode 100644 index 050e7b68bfff..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/finding_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1p1beta1/finding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v1p1beta1/security_marks_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/securitycenter/v1p1beta1/finding.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a:google/cloud/securitycenter/v1p1beta1/security_marks.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdf\x07\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\t\x12\x43\n\x05state\x18\x04 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1p1beta1.Finding.State\x12\x10\n\x08\x63\x61tegory\x18\x05 \x01(\t\x12\x14\n\x0c\x65xternal_uri\x18\x06 \x01(\t\x12_\n\x11source_properties\x18\x07 \x03(\x0b\x32\x44.google.cloud.securitycenter.v1p1beta1.Finding.SourcePropertiesEntry\x12Q\n\x0esecurity_marks\x18\x08 \x01(\x0b\x32\x34.google.cloud.securitycenter.v1p1beta1.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x08severity\x18\r \x01(\x0e\x32\x37.google.cloud.securitycenter.v1p1beta1.Finding.Severity\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04:\xdb\x01\xea\x41\xd7\x01\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}B\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Finding").msgclass - Finding::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Finding.State").enummodule - Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Finding.Severity").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/folder_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/folder_pb.rb deleted file mode 100644 index 2a78935f850c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/folder_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1p1beta1/folder.proto - -require 'google/protobuf' - - -descriptor_data = "\n2google/cloud/securitycenter/v1p1beta1/folder.proto\x12%google.cloud.securitycenter.v1p1beta1\"G\n\x06\x46older\x12\x17\n\x0fresource_folder\x18\x01 \x01(\t\x12$\n\x1cresource_folder_display_name\x18\x02 \x01(\tB\x88\x02\n)com.google.cloud.securitycenter.v1p1beta1B\x0b\x46olderProtoP\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1Beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1p1Beta1 - Folder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Folder").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_config_pb.rb deleted file mode 100644 index f08fde86beee..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_config_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1p1beta1/notification_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n?google/cloud/securitycenter/v1p1beta1/notification_config.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb6\x04\n\x12NotificationConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12W\n\nevent_type\x18\x03 \x01(\x0e\x32\x43.google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType\x12\x36\n\x0cpubsub_topic\x18\x04 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x1c\n\x0fservice_account\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x65\n\x10streaming_config\x18\x06 \x01(\x0b\x32I.google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfigH\x00\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\"4\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46INDING\x10\x01:}\xea\x41z\n0securitycenter.googleapis.com/NotificationConfig\x12\x46organizations/{organization}/notificationConfigs/{notification_config}B\x0f\n\rnotify_configB\xbe\x02\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - NotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.NotificationConfig").msgclass - NotificationConfig::StreamingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig").msgclass - NotificationConfig::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_message_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_message_pb.rb deleted file mode 100644 index c696cbc0af35..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/notification_message_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1p1beta1/notification_message.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v1p1beta1/finding_pb' -require 'google/cloud/securitycenter/v1p1beta1/resource_pb' - - -descriptor_data = "\n@google/cloud/securitycenter/v1p1beta1/notification_message.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x33google/cloud/securitycenter/v1p1beta1/finding.proto\x1a\x34google/cloud/securitycenter/v1p1beta1/resource.proto\"\xc6\x01\n\x13NotificationMessage\x12 \n\x18notification_config_name\x18\x01 \x01(\t\x12\x41\n\x07\x66inding\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v1p1beta1.FindingH\x00\x12\x41\n\x08resource\x18\x03 \x01(\x0b\x32/.google.cloud.securitycenter.v1p1beta1.ResourceB\x07\n\x05\x65ventB\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - NotificationMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.NotificationMessage").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/organization_settings_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/organization_settings_pb.rb deleted file mode 100644 index d97b8888bc15..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/organization_settings_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1p1beta1/organization_settings.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\nAgoogle/cloud/securitycenter/v1p1beta1/organization_settings.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x19google/api/resource.proto\"\xac\x04\n\x14OrganizationSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1e\n\x16\x65nable_asset_discovery\x18\x02 \x01(\x08\x12p\n\x16\x61sset_discovery_config\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig\x1a\x87\x02\n\x14\x41ssetDiscoveryConfig\x12\x13\n\x0bproject_ids\x18\x01 \x03(\t\x12v\n\x0einclusion_mode\x18\x02 \x01(\x0e\x32^.google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode\x12\x12\n\nfolder_ids\x18\x03 \x03(\t\"N\n\rInclusionMode\x12\x1e\n\x1aINCLUSION_MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINCLUDE_ONLY\x10\x01\x12\x0b\n\x07\x45XCLUDE\x10\x02:j\xea\x41g\n2securitycenter.googleapis.com/OrganizationSettings\x12\x31organizations/{organization}/organizationSettingsB\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - OrganizationSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.OrganizationSettings").msgclass - OrganizationSettings::AssetDiscoveryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig").msgclass - OrganizationSettings::AssetDiscoveryConfig::InclusionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/resource_pb.rb deleted file mode 100644 index 74eac8cc1a2c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/resource_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1p1beta1/resource.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/securitycenter/v1p1beta1/folder_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v1p1beta1/resource.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x32google/cloud/securitycenter/v1p1beta1/folder.proto\"\xb9\x01\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07project\x18\x02 \x01(\t\x12\x1c\n\x14project_display_name\x18\x03 \x01(\t\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x05 \x01(\t\x12\x43\n\x07\x66olders\x18\x07 \x03(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.FolderB\x03\xe0\x41\x03\x42\x8a\x02\n)com.google.cloud.securitycenter.v1p1beta1B\rResourceProtoP\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Resource").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response_pb.rb deleted file mode 100644 index b8264e7a8867..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\nHgoogle/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x1egoogle/protobuf/duration.proto\"\xee\x01\n\x19RunAssetDiscoveryResponse\x12U\n\x05state\x18\x01 \x01(\x0e\x32\x46.google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"M\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tCOMPLETED\x10\x01\x12\x0e\n\nSUPERSEDED\x10\x02\x12\x0e\n\nTERMINATED\x10\x03\x42\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - RunAssetDiscoveryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse").msgclass - RunAssetDiscoveryResponse::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/security_marks_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/security_marks_pb.rb deleted file mode 100644 index e31759178cca..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/security_marks_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1p1beta1/security_marks.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n:google/cloud/securitycenter/v1p1beta1/security_marks.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x19google/api/resource.proto\"\xdc\x04\n\rSecurityMarks\x12\x0c\n\x04name\x18\x01 \x01(\t\x12N\n\x05marks\x18\x02 \x03(\x0b\x32?.google.cloud.securitycenter.v1p1beta1.SecurityMarks.MarksEntry\x12\x16\n\x0e\x63\x61nonical_name\x18\x03 \x01(\t\x1a,\n\nMarksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa6\x03\xea\x41\xa2\x03\n+securitycenter.googleapis.com/SecurityMarks\x12\x39organizations/{organization}/assets/{asset}/securityMarks\x12Norganizations/{organization}/sources/{source}/findings/{finding}/securityMarks\x12-folders/{folder}/assets/{asset}/securityMarks\x12/projects/{project}/assets/{asset}/securityMarks\x12\x42\x66olders/{folder}/sources/{source}/findings/{finding}/securityMarks\x12\x44projects/{project}/sources/{source}/findings/{finding}/securityMarksB\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - SecurityMarks = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.SecurityMarks").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb.rb deleted file mode 100644 index fb06f85622aa..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v1p1beta1/notification_message_pb' -require 'google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response_pb' -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v1p1beta1/asset_pb' -require 'google/cloud/securitycenter/v1p1beta1/finding_pb' -require 'google/cloud/securitycenter/v1p1beta1/folder_pb' -require 'google/cloud/securitycenter/v1p1beta1/notification_config_pb' -require 'google/cloud/securitycenter/v1p1beta1/organization_settings_pb' -require 'google/cloud/securitycenter/v1p1beta1/security_marks_pb' -require 'google/cloud/securitycenter/v1p1beta1/source_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nBgoogle/cloud/securitycenter/v1p1beta1/securitycenter_service.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a@google/cloud/securitycenter/v1p1beta1/notification_message.proto\x1aHgoogle/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x31google/cloud/securitycenter/v1p1beta1/asset.proto\x1a\x33google/cloud/securitycenter/v1p1beta1/finding.proto\x1a\x32google/cloud/securitycenter/v1p1beta1/folder.proto\x1a?google/cloud/securitycenter/v1p1beta1/notification_config.proto\x1a\x41google/cloud/securitycenter/v1p1beta1/organization_settings.proto\x1a:google/cloud/securitycenter/v1p1beta1/security_marks.proto\x1a\x32google/cloud/securitycenter/v1p1beta1/source.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x01\n\x14\x43reateFindingRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x17\n\nfinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x07\x66inding\x18\x03 \x01(\x0b\x32..google.cloud.securitycenter.v1p1beta1.FindingB\x03\xe0\x41\x02\"\xe0\x01\n\x1f\x43reateNotificationConfigRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x16\n\tconfig_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12[\n\x13notification_config\x18\x03 \x01(\x0b\x32\x39.google.cloud.securitycenter.v1p1beta1.NotificationConfigB\x03\xe0\x41\x02\"\xa3\x01\n\x13\x43reateSourceRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x42\n\x06source\x18\x02 \x01(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.SourceB\x03\xe0\x41\x02\"i\n\x1f\x44\x65leteNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"f\n\x1cGetNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"j\n\x1eGetOrganizationSettingsRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2securitycenter.googleapis.com/OrganizationSettings\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\x83\x02\n\x12GroupAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x10\x63ompare_duration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\tread_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xbf\x01\n\x13GroupAssetsResponse\x12L\n\x10group_by_results\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1p1beta1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\x86\x02\n\x14GroupFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\xc1\x01\n\x15GroupFindingsResponse\x12L\n\x10group_by_results\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v1p1beta1.GroupResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\xbf\x01\n\x0bGroupResult\x12V\n\nproperties\x18\x01 \x03(\x0b\x32\x42.google.cloud.securitycenter.v1p1beta1.GroupResult.PropertiesEntry\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x1aI\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"\x91\x01\n\x1eListNotificationConfigsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x93\x01\n\x1fListNotificationConfigsResponse\x12W\n\x14notification_configs\x18\x01 \x03(\x0b\x32\x39.google.cloud.securitycenter.v1p1beta1.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x12ListSourcesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$securitycenter.googleapis.com/Source\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x07 \x01(\x05\"n\n\x13ListSourcesResponse\x12>\n\x07sources\x18\x01 \x03(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.Source\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x02\n\x11ListAssetsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#securitycenter.googleapis.com/Asset\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xd8\x03\n\x12ListAssetsResponse\x12g\n\x13list_assets_results\x18\x01 \x03(\x0b\x32J.google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xfc\x01\n\x10ListAssetsResult\x12;\n\x05\x61sset\x18\x01 \x01(\x0b\x32,.google.cloud.securitycenter.v1p1beta1.Asset\x12l\n\x0cstate_change\x18\x02 \x01(\x0e\x32V.google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange\"=\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x01\x12\x0b\n\x07REMOVED\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\"\xb0\x02\n\x13ListFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x10\x63ompare_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xab\x06\n\x14ListFindingsResponse\x12m\n\x15list_findings_results\x18\x01 \x03(\x0b\x32N.google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult\x12-\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xc7\x04\n\x12ListFindingsResult\x12?\n\x07\x66inding\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1p1beta1.Finding\x12p\n\x0cstate_change\x18\x02 \x01(\x0e\x32Z.google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange\x12n\n\x08resource\x18\x03 \x01(\x0b\x32W.google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xbe\x01\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x1c\n\x14project_display_name\x18\x03 \x01(\t\x12\x13\n\x0bparent_name\x18\x04 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x05 \x01(\t\x12>\n\x07\x66olders\x18\n \x03(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.Folder\"M\n\x0bStateChange\x12\n\n\x06UNUSED\x10\x00\x12\x0b\n\x07\x43HANGED\x10\x01\x12\r\n\tUNCHANGED\x10\x02\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x03\x12\x0b\n\x07REMOVED\x10\x04\"\xd4\x01\n\x16SetFindingStateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x34.google.cloud.securitycenter.v1p1beta1.Finding.StateB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"d\n\x18RunAssetDiscoveryRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\"\x8d\x01\n\x14UpdateFindingRequest\x12\x44\n\x07\x66inding\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v1p1beta1.FindingB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xaf\x01\n\x1fUpdateNotificationConfigRequest\x12[\n\x13notification_config\x18\x01 \x01(\x0b\x32\x39.google.cloud.securitycenter.v1p1beta1.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb5\x01\n!UpdateOrganizationSettingsRequest\x12_\n\x15organization_settings\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v1p1beta1.OrganizationSettingsB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x8a\x01\n\x13UpdateSourceRequest\x12\x42\n\x06source\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v1p1beta1.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xd0\x01\n\x1aUpdateSecurityMarksRequest\x12Q\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32\x34.google.cloud.securitycenter.v1p1beta1.SecurityMarksB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xf8\x33\n\x0eSecurityCenter\x12\xc6\x01\n\x0c\x43reateSource\x12:.google.cloud.securitycenter.v1p1beta1.CreateSourceRequest\x1a-.google.cloud.securitycenter.v1p1beta1.Source\"K\xda\x41\rparent,source\x82\xd3\xe4\x93\x02\x35\"+/v1p1beta1/{parent=organizations/*}/sources:\x06source\x12\xfd\x01\n\rCreateFinding\x12;.google.cloud.securitycenter.v1p1beta1.CreateFindingRequest\x1a..google.cloud.securitycenter.v1p1beta1.Finding\"\x7f\xda\x41\x19parent,finding_id,finding\xda\x41\x19parent,finding,finding_id\x82\xd3\xe4\x93\x02\x41\"6/v1p1beta1/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\xb8\x02\n\x18\x43reateNotificationConfig\x12\x46.google.cloud.securitycenter.v1p1beta1.CreateNotificationConfigRequest\x1a\x39.google.cloud.securitycenter.v1p1beta1.NotificationConfig\"\x98\x01\xda\x41$parent,config_id,notification_config\xda\x41\x1aparent,notification_config\x82\xd3\xe4\x93\x02N\"7/v1p1beta1/{parent=organizations/*}/notificationConfigs:\x13notification_config\x12\xc2\x01\n\x18\x44\x65leteNotificationConfig\x12\x46.google.cloud.securitycenter.v1p1beta1.DeleteNotificationConfigRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1p1beta1/{name=organizations/*/notificationConfigs/*}\x12\x9d\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"R\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x41\"\"9/v1p1beta1/{name=folders/*/sources/*/findings/*}:setState:\x01*Z?\":/v1p1beta1/{name=projects/*/sources/*/findings/*}:setState:\x01*\x12\xa4\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Y\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x41\"/v1p1beta1/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZC28/v1p1beta1/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZD29/v1p1beta1/{finding.name=projects/*/sources/*/findings/*}:\x07\x66inding\x12\xc0\x02\n\x18UpdateNotificationConfig\x12\x46.google.cloud.securitycenter.v1p1beta1.UpdateNotificationConfigRequest\x1a\x39.google.cloud.securitycenter.v1p1beta1.NotificationConfig\"\xa0\x01\xda\x41\x13notification_config\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\x62\x32K/v1p1beta1/{notification_config.name=organizations/*/notificationConfigs/*}:\x13notification_config\x12\xa9\x02\n\x1aUpdateOrganizationSettings\x12H.google.cloud.securitycenter.v1p1beta1.UpdateOrganizationSettingsRequest\x1a;.google.cloud.securitycenter.v1p1beta1.OrganizationSettings\"\x83\x01\xda\x41\x15organization_settings\x82\xd3\xe4\x93\x02\x65\x32L/v1p1beta1/{organization_settings.name=organizations/*/organizationSettings}:\x15organization_settings\x12\xdb\x01\n\x0cUpdateSource\x12:.google.cloud.securitycenter.v1p1beta1.UpdateSourceRequest\x1a-.google.cloud.securitycenter.v1p1beta1.Source\"`\xda\x41\x06source\xda\x41\x12source,update_mask\x82\xd3\xe4\x93\x02<22/v1p1beta1/{source.name=organizations/*/sources/*}:\x06source\x12\xf4\x05\n\x13UpdateSecurityMarks\x12\x41.google.cloud.securitycenter.v1p1beta1.UpdateSecurityMarksRequest\x1a\x34.google.cloud.securitycenter.v1p1beta1.SecurityMarks\"\xe3\x04\xda\x41\x0esecurity_marks\xda\x41\x1asecurity_marks,update_mask\x82\xd3\xe4\x93\x02\xae\x04\x32G/v1p1beta1/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZS2A/v1p1beta1/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZT2B/v1p1beta1/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZe2S/v1p1beta1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZ_2M/v1p1beta1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZ`2N/v1p1beta1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marks\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1P\x00P\x01\x62\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - CreateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.CreateFindingRequest").msgclass - CreateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.CreateNotificationConfigRequest").msgclass - CreateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.CreateSourceRequest").msgclass - DeleteNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.DeleteNotificationConfigRequest").msgclass - GetNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GetNotificationConfigRequest").msgclass - GetOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GetOrganizationSettingsRequest").msgclass - GetSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GetSourceRequest").msgclass - GroupAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest").msgclass - GroupAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GroupAssetsResponse").msgclass - GroupFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest").msgclass - GroupFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GroupFindingsResponse").msgclass - GroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.GroupResult").msgclass - ListNotificationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsRequest").msgclass - ListNotificationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsResponse").msgclass - ListSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListSourcesRequest").msgclass - ListSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListSourcesResponse").msgclass - ListAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListAssetsRequest").msgclass - ListAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListAssetsResponse").msgclass - ListAssetsResponse::ListAssetsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult").msgclass - ListAssetsResponse::ListAssetsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange").enummodule - ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListFindingsRequest").msgclass - ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListFindingsResponse").msgclass - ListFindingsResponse::ListFindingsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult").msgclass - ListFindingsResponse::ListFindingsResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.Resource").msgclass - ListFindingsResponse::ListFindingsResult::StateChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange").enummodule - SetFindingStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.SetFindingStateRequest").msgclass - RunAssetDiscoveryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryRequest").msgclass - UpdateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.UpdateFindingRequest").msgclass - UpdateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.UpdateNotificationConfigRequest").msgclass - UpdateOrganizationSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.UpdateOrganizationSettingsRequest").msgclass - UpdateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.UpdateSourceRequest").msgclass - UpdateSecurityMarksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.UpdateSecurityMarksRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb deleted file mode 100644 index 76c57914966b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb.rb +++ /dev/null @@ -1,107 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/securitycenter/v1p1beta1/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V1p1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb' - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - module SecurityCenter - # V1p1Beta1 APIs for Security Center service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.securitycenter.v1p1beta1.SecurityCenter' - - # Creates a source. - rpc :CreateSource, ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Source - # Creates a finding. The corresponding source must exist for finding - # creation to succeed. - rpc :CreateFinding, ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Finding - # Creates a notification config. - rpc :CreateNotificationConfig, ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig - # Deletes a notification config. - rpc :DeleteNotificationConfig, ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest, ::Google::Protobuf::Empty - # Gets the access control policy on the specified Source. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets a notification config. - rpc :GetNotificationConfig, ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig - # Gets the settings for an organization. - rpc :GetOrganizationSettings, ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings - # Gets a source. - rpc :GetSource, ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Source - # Filters an organization's assets and groups them by their specified - # properties. - rpc :GroupAssets, ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse - # Filters an organization or source's findings and groups them by their - # specified properties. - # - # To group across all sources provide a `-` as the source id. - # Example: /v1/organizations/{organization_id}/sources/-/findings, - # /v1/folders/{folder_id}/sources/-/findings, - # /v1/projects/{project_id}/sources/-/findings - rpc :GroupFindings, ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse - # Lists an organization's assets. - rpc :ListAssets, ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse - # Lists an organization or source's findings. - # - # To list across all sources provide a `-` as the source id. - # Example: /v1p1beta1/organizations/{organization_id}/sources/-/findings - rpc :ListFindings, ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse - # Lists notification configs. - rpc :ListNotificationConfigs, ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse - # Lists all sources belonging to an organization. - rpc :ListSources, ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse - # Runs asset discovery. The discovery is tracked with a long-running - # operation. - # - # This API can only be called with limited frequency for an organization. If - # it is called too frequently the caller will receive a TOO_MANY_REQUESTS - # error. - rpc :RunAssetDiscovery, ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest, ::Google::Longrunning::Operation - # Updates the state of a finding. - rpc :SetFindingState, ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Finding - # Sets the access control policy on the specified Source. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the permissions that a caller has on the specified source. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Creates or updates a finding. The corresponding source must exist for a - # finding creation to succeed. - rpc :UpdateFinding, ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Finding - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - rpc :UpdateNotificationConfig, ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig - # Updates an organization's settings. - rpc :UpdateOrganizationSettings, ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings - # Updates a source. - rpc :UpdateSource, ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::Source - # Updates security marks. - rpc :UpdateSecurityMarks, ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest, ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/source_pb.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/source_pb.rb deleted file mode 100644 index 4315dc444ba5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/lib/google/cloud/securitycenter/v1p1beta1/source_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v1p1beta1/source.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n2google/cloud/securitycenter/v1p1beta1/source.proto\x12%google.cloud.securitycenter.v1p1beta1\x1a\x19google/api/resource.proto\"\xfd\x01\n\x06Source\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x16\n\x0e\x63\x61nonical_name\x18\x0e \x01(\t:\xa1\x01\xea\x41\x9d\x01\n$securitycenter.googleapis.com/Source\x12-organizations/{organization}/sources/{source}\x12!folders/{folder}/sources/{source}\x12#projects/{project}/sources/{source}B\xfb\x01\n)com.google.cloud.securitycenter.v1p1beta1P\x01ZQcloud.google.com/go/securitycenter/apiv1p1beta1/securitycenterpb;securitycenterpb\xaa\x02%Google.Cloud.SecurityCenter.V1P1Beta1\xca\x02%Google\\Cloud\\SecurityCenter\\V1p1beta1\xea\x02(Google::Cloud::SecurityCenter::V1p1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1p1beta1.Source").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/README.md deleted file mode 100644 index a4968e1aaa4d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Security Command Center V1p1beta1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.rb deleted file mode 100644 index 84c95aa10132..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/asset.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1p1beta1 - # Security Command Center representation of a Google Cloud - # resource. - # - # The Asset is a Security Command Center resource that captures information - # about a single Google Cloud resource. All modifications to an Asset are only - # within the context of Security Command Center and don't affect the referenced - # Google Cloud resource. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this asset. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/assets/\\{asset_id}". - # @!attribute [rw] security_center_properties - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Asset::SecurityCenterProperties] - # Security Command Center managed properties. These properties are managed by - # Security Command Center and cannot be modified by the user. - # @!attribute [rw] resource_properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Resource managed properties. These properties are managed and defined by - # the Google Cloud resource and cannot be modified by the user. - # @!attribute [rw] security_marks - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] - # User specified security marks. These marks are entirely managed by the user - # and come from the SecurityMarks resource that belongs to the asset. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the asset was created in Security Command Center. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the asset was last updated or added in Cloud SCC. - # @!attribute [rw] iam_policy - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Asset::IamPolicy] - # Cloud IAM Policy information associated with the Google Cloud resource - # described by the Security Command Center asset. This information is managed - # and defined by the Google Cloud resource and cannot be modified by the - # user. - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the resource. It's either - # "organizations/\\{organization_id}/assets/\\{asset_id}", - # "folders/\\{folder_id}/assets/\\{asset_id}" or - # "projects/\\{project_number}/assets/\\{asset_id}", depending on the closest CRM - # ancestor of the resource. - class Asset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Security Command Center managed properties. These properties are managed by - # Security Command Center and cannot be modified by the user. - # @!attribute [rw] resource_name - # @return [::String] - # The full resource name of the Google Cloud resource this asset - # represents. This field is immutable after create time. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_type - # @return [::String] - # The type of the Google Cloud resource. Examples include: APPLICATION, - # PROJECT, and ORGANIZATION. This is a case insensitive field defined by - # Security Command Center and/or the producer of the resource and is - # immutable after create time. - # @!attribute [rw] resource_parent - # @return [::String] - # The full resource name of the immediate parent of the resource. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_project - # @return [::String] - # The full resource name of the project the resource belongs to. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_owners - # @return [::Array<::String>] - # Owners of the Google Cloud resource. - # @!attribute [rw] resource_display_name - # @return [::String] - # The user defined display name for this resource. - # @!attribute [rw] resource_parent_display_name - # @return [::String] - # The user defined display name for the parent of this resource. - # @!attribute [rw] resource_project_display_name - # @return [::String] - # The user defined display name for the project of this resource. - # @!attribute [rw] folders - # @return [::Array<::Google::Cloud::SecurityCenter::V1p1Beta1::Folder>] - # Contains a Folder message for each folder in the assets ancestry. - # The first folder is the deepest nested folder, and the last folder is the - # folder directly under the Organization. - class SecurityCenterProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Cloud IAM Policy information associated with the Google Cloud resource - # described by the Security Command Center asset. This information is managed - # and defined by the Google Cloud resource and cannot be modified by the - # user. - # @!attribute [rw] policy_blob - # @return [::String] - # The JSON representation of the Policy associated with the asset. - # See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for - # format details. - class IamPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class ResourcePropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.rb deleted file mode 100644 index 9308757027de..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/finding.rb +++ /dev/null @@ -1,146 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1p1beta1 - # Security Command Center finding. - # - # A finding is a record of assessment data (security, risk, health or privacy) - # ingested into Security Command Center for presentation, notification, - # analysis, policy testing, and enforcement. For example, an XSS vulnerability - # in an App Engine application is a finding. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this finding. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}" - # @!attribute [rw] parent - # @return [::String] - # The relative resource name of the source the finding belongs to. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # This field is immutable after creation time. - # For example: - # "organizations/\\{organization_id}/sources/\\{source_id}" - # @!attribute [rw] resource_name - # @return [::String] - # For findings on Google Cloud resources, the full resource - # name of the Google Cloud resource this finding is for. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # When the finding is for a non-Google Cloud resource, the resourceName can - # be a customer or partner defined string. This field is immutable after - # creation time. - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding::State] - # The state of the finding. - # @!attribute [rw] category - # @return [::String] - # The additional taxonomy group within findings from a given source. - # This field is immutable after creation time. - # Example: "XSS_FLASH_INJECTION" - # @!attribute [rw] external_uri - # @return [::String] - # The URI that, if available, points to a web page outside of Security - # Command Center where additional information about the finding can be found. - # This field is guaranteed to be either empty or a well formed URL. - # @!attribute [rw] source_properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Source specific properties. These properties are managed by the source - # that writes the finding. The key names in the source_properties map must be - # between 1 and 255 characters, and must start with a letter and contain - # alphanumeric characters or underscores only. - # @!attribute [r] security_marks - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] - # Output only. User specified security marks. These marks are entirely - # managed by the user and come from the SecurityMarks resource that belongs - # to the finding. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the event took place, or when an update to the finding - # occurred. For example, if the finding represents an open firewall it would - # capture the time the detector believes the firewall became open. The - # accuracy is determined by the detector. If the finding were to be resolved - # afterward, this time would reflect when the finding was resolved. Must not - # be set to a value greater than the current timestamp. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the finding was created in Security Command Center. - # @!attribute [rw] severity - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding::Severity] - # The severity of the finding. This field is managed by the source that - # writes the finding. - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the finding. It's either - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}", - # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}" or - # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}", - # depending on the closest CRM ancestor of the resource associated with the - # finding. - class Finding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class SourcePropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of the finding. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The finding requires attention and has not been addressed yet. - ACTIVE = 1 - - # The finding has been fixed, triaged as a non-issue or otherwise addressed - # and is no longer active. - INACTIVE = 2 - end - - # The severity of the finding. This field is managed by the source that - # writes the finding. - module Severity - # No severity specified. The default value. - SEVERITY_UNSPECIFIED = 0 - - # Critical severity. - CRITICAL = 1 - - # High severity. - HIGH = 2 - - # Medium severity. - MEDIUM = 3 - - # Low severity. - LOW = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.rb deleted file mode 100644 index f816affff89c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/folder.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1p1Beta1 - # Message that contains the resource name and display name of a folder - # resource. - # @!attribute [rw] resource_folder - # @return [::String] - # Full resource name of this folder. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_folder_display_name - # @return [::String] - # The user defined display name for this folder. - class Folder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.rb deleted file mode 100644 index 5062c0b8e520..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_config.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - # Security Command Center notification configs. - # - # A notification config is a Security Command Center resource that contains the - # configuration to send notifications for create/update events of findings, - # assets and etc. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this notification config. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/notificationConfigs/notify_public_bucket". - # @!attribute [rw] description - # @return [::String] - # The description of the notification config (max of 1024 characters). - # @!attribute [rw] event_type - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig::EventType] - # The type of events the config is for, e.g. FINDING. - # @!attribute [rw] pubsub_topic - # @return [::String] - # The Pub/Sub topic to send notifications to. Its format is - # "projects/[project_id]/topics/[topic]". - # @!attribute [r] service_account - # @return [::String] - # Output only. The service account that needs "pubsub.topics.publish" - # permission to publish to the Pub/Sub topic. - # @!attribute [rw] streaming_config - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig::StreamingConfig] - # The config for triggering streaming-based notifications. - class NotificationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The config for streaming-based notifications, which send each event as soon - # as it is detected. - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across create/update events - # of assets or findings as specified by the event type. The expression is a - # list of zero or more restrictions combined via logical operators `AND` - # and `OR`. Parentheses are supported, and `OR` has higher precedence than - # `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - class StreamingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of events. - module EventType - # Unspecified event type. - EVENT_TYPE_UNSPECIFIED = 0 - - # Events for findings. - FINDING = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.rb deleted file mode 100644 index 6948b659b221..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/notification_message.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - # Security Command Center's Notification - # @!attribute [rw] notification_config_name - # @return [::String] - # Name of the notification config that generated current notification. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # If it's a Finding based notification config, this field will be - # populated. - # @!attribute [rw] resource - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Resource] - # The Cloud resource tied to the notification. - class NotificationMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.rb deleted file mode 100644 index c69cb73d05e1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/organization_settings.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1p1beta1 - # User specified settings that are attached to the Security Command - # Center organization. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of the settings. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/organizationSettings". - # @!attribute [rw] enable_asset_discovery - # @return [::Boolean] - # A flag that indicates if Asset Discovery should be enabled. If the flag is - # set to `true`, then discovery of assets will occur. If it is set to `false, - # all historical assets will remain, but discovery of future assets will not - # occur. - # @!attribute [rw] asset_discovery_config - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings::AssetDiscoveryConfig] - # The configuration used for Asset Discovery runs. - class OrganizationSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration used for Asset Discovery runs. - # @!attribute [rw] project_ids - # @return [::Array<::String>] - # The project ids to use for filtering asset discovery. - # @!attribute [rw] inclusion_mode - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings::AssetDiscoveryConfig::InclusionMode] - # The mode to use for filtering asset discovery. - # @!attribute [rw] folder_ids - # @return [::Array<::String>] - # The folder ids to use for filtering asset discovery. - # It consists of only digits, e.g., 756619654966. - class AssetDiscoveryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The mode of inclusion when running Asset Discovery. - # Asset discovery can be limited by explicitly identifying projects to be - # included or excluded. If INCLUDE_ONLY is set, then only those projects - # within the organization and their children are discovered during asset - # discovery. If EXCLUDE is set, then projects that don't match those - # projects are discovered during asset discovery. If neither are set, then - # all projects within the organization are discovered during asset - # discovery. - module InclusionMode - # Unspecified. Setting the mode with this value will disable - # inclusion/exclusion filtering for Asset Discovery. - INCLUSION_MODE_UNSPECIFIED = 0 - - # Asset Discovery will capture only the resources within the projects - # specified. All other resources will be ignored. - INCLUDE_ONLY = 1 - - # Asset Discovery will ignore all resources under the projects specified. - # All other resources will be retrieved. - EXCLUDE = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.rb deleted file mode 100644 index 0fe81011a51b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/resource.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - # Information related to the Google Cloud resource. - # @!attribute [rw] name - # @return [::String] - # The full resource name of the resource. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] project - # @return [::String] - # The full resource name of project that the resource belongs to. - # @!attribute [rw] project_display_name - # @return [::String] - # The human readable name of project that the resource belongs to. - # @!attribute [rw] parent - # @return [::String] - # The full resource name of resource's parent. - # @!attribute [rw] parent_display_name - # @return [::String] - # The human readable name of resource's parent. - # @!attribute [r] folders - # @return [::Array<::Google::Cloud::SecurityCenter::V1p1Beta1::Folder>] - # Output only. Contains a Folder message for each folder in the assets ancestry. - # The first folder is the deepest nested folder, and the last folder is the - # folder directly under the Organization. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.rb deleted file mode 100644 index ed38b84c1d65..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/run_asset_discovery_response.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - # Response of asset discovery run - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryResponse::State] - # The state of an asset discovery run. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # The duration between asset discovery run start and end - class RunAssetDiscoveryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of an asset discovery run. - module State - # Asset discovery run state was unspecified. - STATE_UNSPECIFIED = 0 - - # Asset discovery run completed successfully. - COMPLETED = 1 - - # Asset discovery run was cancelled with tasks still pending, as another - # run for the same organization was started with a higher priority. - SUPERSEDED = 2 - - # Asset discovery run was killed and terminated. - TERMINATED = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.rb deleted file mode 100644 index db78ba561912..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/security_marks.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - # User specified security marks that are attached to the parent Security - # Command Center resource. Security marks are scoped within a Security Command - # Center organization -- they can be modified and viewed by all users who have - # proper permissions on the organization. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of the SecurityMarks. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Examples: - # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks". - # @!attribute [rw] marks - # @return [::Google::Protobuf::Map{::String => ::String}] - # Mutable user specified security marks belonging to the parent resource. - # Constraints are as follows: - # - # * Keys and values are treated as case insensitive - # * Keys must be between 1 - 256 characters (inclusive) - # * Keys must be letters, numbers, underscores, or dashes - # * Values have leading and trailing whitespace trimmed, remaining - # characters must be between 1 - 4096 characters (inclusive) - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the marks. - # Examples: - # "organizations/\\{organization_id}/assets/\\{asset_id}/securityMarks" - # "folders/\\{folder_id}/assets/\\{asset_id}/securityMarks" - # "projects/\\{project_number}/assets/\\{asset_id}/securityMarks" - # "organizations/\\{organization_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" - # "folders/\\{folder_id}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" - # "projects/\\{project_number}/sources/\\{source_id}/findings/\\{finding_id}/securityMarks" - class SecurityMarks - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MarksEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb deleted file mode 100644 index a2252480add8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/securitycenter_service.rb +++ /dev/null @@ -1,1053 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1p1beta1 - # Request message for creating a finding. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new finding's parent. Its format should be - # "organizations/[organization_id]/sources/[source_id]". - # @!attribute [rw] finding_id - # @return [::String] - # Required. Unique identifier provided by the client within the parent scope. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # Required. The Finding being created. The name and security_marks will be ignored as - # they are both output only fields on this resource. - class CreateFindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a notification config. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new notification config's parent. Its format is - # "organizations/[organization_id]". - # @!attribute [rw] config_id - # @return [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters, and contains alphanumeric - # characters, underscores or hyphens only. - # @!attribute [rw] notification_config - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # Required. The notification config being created. The name and the service account - # will be ignored as they are both output only fields on this resource. - class CreateNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a source. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new source's parent. Its format should be - # "organizations/[organization_id]". - # @!attribute [rw] source - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # Required. The Source being created, only the display_name and description will be - # used. All other fields will be ignored. - class CreateSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a notification config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the notification config to delete. Its format is - # "organizations/[organization_id]/notificationConfigs/[config_id]". - class DeleteNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a notification config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the notification config to get. Its format is - # "organizations/[organization_id]/notificationConfigs/[config_id]". - class GetNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting organization settings. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the organization to get organization settings for. Its format is - # "organizations/[organization_id]/organizationSettings". - class GetOrganizationSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a source. - # @!attribute [rw] name - # @return [::String] - # Required. Relative resource name of the source. Its format is - # "organizations/[organization_id]/source/[source_id]". - class GetSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for grouping by assets. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the organization to groupBy. Its format is - # "organizations/[organization_id], folders/[folder_id], or - # projects/[project_id]". - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_name_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @!attribute [rw] group_by - # @return [::String] - # Required. Expression that defines what assets fields to use for grouping. The string - # value should follow SQL syntax: comma separated list of fields. For - # example: - # "security_center_properties.resource_project,security_center_properties.project". - # - # The following fields are supported when compare_duration is not set: - # - # * security_center_properties.resource_project - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_type - # * security_center_properties.resource_parent - # * security_center_properties.resource_parent_display_name - # - # The following fields are supported when compare_duration is set: - # - # * security_center_properties.resource_type - # * security_center_properties.resource_project_display_name - # * security_center_properties.resource_parent_display_name - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the GroupResult's "state_change" property is - # updated to indicate whether the asset was added, removed, or remained - # present during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at reference_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at reference_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and reference_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `GroupAssetsResponse`; indicates - # that this is a continuation of a prior `GroupAssets` call, and that the - # system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class GroupAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for grouping by assets. - # @!attribute [rw] group_by_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] - # Group results. There exists an element for each existing unique - # combination of property/values. The element contains a count for the number - # of times those specific property/values appear. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the groupBy request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of results matching the query. - class GroupAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for grouping by findings. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the source to groupBy. Its format is - # "organizations/[organization_id]/sources/[source_id]", - # folders/[folder_id]/sources/[source_id], or - # projects/[project_id]/sources/[source_id]. To groupBy across all sources - # provide a source_id of `-`. For example: - # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/-, - # or projects/\\{project_id}/sources/- - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # * severity: `=`, `:` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * security_marks.marks: `=`, `:` - # * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # @!attribute [rw] group_by - # @return [::String] - # Required. Expression that defines what assets fields to use for grouping (including - # `state_change`). The string value should follow SQL syntax: comma separated - # list of fields. For example: "parent,resource_name". - # - # The following fields are supported: - # - # * resource_name - # * category - # * state - # * parent - # * severity - # - # The following fields are supported when compare_duration is set: - # - # * state_change - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the GroupResult's "state_change" attribute is - # updated to indicate whether the finding had its state changed, the - # finding's state remained unchanged, or if the finding was added during the - # compare_duration period of time that precedes the read_time. This is the - # time between (read_time - compare_duration) and read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present - # at read_time. - # - # If this field is set then `state_change` must be a specified field in - # `group_by`. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class GroupFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for group by findings. - # @!attribute [rw] group_by_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult>] - # Group results. There exists an element for each existing unique - # combination of property/values. The element contains a count for the number - # of times those specific property/values appear. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the groupBy request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of results matching the query. - class GroupFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Result containing the properties and count of a groupBy request. - # @!attribute [rw] properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Properties matching the groupBy fields in the request. - # @!attribute [rw] count - # @return [::Integer] - # Total count of resources for the given properties. - class GroupResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class PropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for listing notification configs. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the organization to list notification configs. - # Its format is "organizations/[organization_id]". - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListNotificationConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing notification configs. - # @!attribute [rw] notification_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig>] - # Notification configs belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - class ListNotificationConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing sources. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent of sources to list. Its format should be - # "organizations/[organization_id], folders/[folder_id], or - # projects/[project_id]". - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing sources. - # @!attribute [rw] sources - # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::Source>] - # Sources belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - class ListSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing assets. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the organization assets should belong to. Its format is - # "organizations/[organization_id], folders/[folder_id], or - # projects/[project_id]". - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across assets. - # The expression is a list of zero or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. The fields map to those - # defined in the Asset resource. Examples include: - # - # * name - # * security_center_properties.resource_name - # * resource_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following are the allowed field and operator combinations: - # - # * name: `=` - # * update_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `update_time = "2019-06-10T16:07:18-07:00"` - # `update_time = 1560208038000` - # - # * create_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `create_time = "2019-06-10T16:07:18-07:00"` - # `create_time = 1560208038000` - # - # * iam_policy.policy_blob: `=`, `:` - # * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # * security_marks.marks: `=`, `:` - # * security_center_properties.resource_name: `=`, `:` - # * security_center_properties.resource_display_name: `=`, `:` - # * security_center_properties.resource_type: `=`, `:` - # * security_center_properties.resource_parent: `=`, `:` - # * security_center_properties.resource_parent_display_name: `=`, `:` - # * security_center_properties.resource_project: `=`, `:` - # * security_center_properties.resource_project_display_name: `=`, `:` - # * security_center_properties.resource_owners: `=`, `:` - # - # For example, `resource_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `resource_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-resource_properties.my_property : ""` - # @!attribute [rw] order_by - # @return [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,resource_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,resource_properties.a_property" and " - # name desc , resource_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # update_time - # resource_properties - # security_marks.marks - # security_center_properties.resource_name - # security_center_properties.resource_display_name - # security_center_properties.resource_parent - # security_center_properties.resource_parent_display_name - # security_center_properties.resource_project - # security_center_properties.resource_project_display_name - # security_center_properties.resource_type - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering assets. The filter is limited - # to assets existing at the supplied time and their values are those at that - # specific time. Absence of this field will default to the API's version of - # NOW. - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the ListAssetsResult's "state_change" - # attribute is updated to indicate whether the asset was added, removed, or - # remained present during the compare_duration period of time that precedes - # the read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence of the asset at the - # two points in time. Intermediate state changes between the two times don't - # affect the result. For example, the results aren't affected if the asset is - # removed and re-created again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "ADDED": indicates that the asset was not present at the start of - # compare_duration, but present at read_time. - # * "REMOVED": indicates that the asset was present at the start of - # compare_duration, but not present at read_time. - # * "ACTIVE": indicates that the asset was present at both the - # start and the end of the time period defined by - # compare_duration and read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all assets present at - # read_time. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # A field mask to specify the ListAssetsResult fields to be listed in the - # response. - # An empty field mask will list all fields. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListAssetsResponse`; indicates - # that this is a continuation of a prior `ListAssets` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListAssetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing assets. - # @!attribute [rw] list_assets_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult>] - # Assets matching the list request. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the list request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of assets matching the query. - class ListAssetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Result containing the Asset and its State. - # @!attribute [rw] asset - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Asset] - # Asset matching the search request. - # @!attribute [rw] state_change - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult::StateChange] - # State change of the asset between the points in time. - class ListAssetsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The change in state of the asset. - # - # When querying across two points in time this describes - # the change between the two points: ADDED, REMOVED, or ACTIVE. - # If there was no compare_duration supplied in the request the state change - # will be: UNUSED - module StateChange - # State change is unused, this is the canonical default for this enum. - UNUSED = 0 - - # Asset was added between the points in time. - ADDED = 1 - - # Asset was removed between the points in time. - REMOVED = 2 - - # Asset was present at both point(s) in time. - ACTIVE = 3 - end - end - end - - # Request message for listing findings. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the source the findings belong to. Its format is - # "organizations/[organization_id]/sources/[source_id], - # folders/[folder_id]/sources/[source_id], or - # projects/[project_id]/sources/[source_id]". To list across all sources - # provide a source_id of `-`. For example: - # organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/- or - # projects/\\{projects_id}/sources/- - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * source_properties.a_property - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # * severity: `=`, `:` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # security_marks.marks: `=`, `:` - # source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - # - # For example, `source_properties.size = 100` is a valid filter string. - # - # Use a partial match on the empty string to filter based on a property - # existing: `source_properties.my_property : ""` - # - # Use a negated partial match on the empty string to filter based on a - # property not existing: `-source_properties.my_property : ""` - # @!attribute [rw] order_by - # @return [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,resource_properties.a_property". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,source_properties.a_property". Redundant space characters in the - # syntax are insignificant. "name desc,source_properties.a_property" and " - # name desc , source_properties.a_property " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # source_properties - # security_marks.marks - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used as a reference point when filtering findings. The filter is - # limited to findings existing at the supplied time and their values are - # those at that specific time. Absence of this field will default to the - # API's version of NOW. - # @!attribute [rw] compare_duration - # @return [::Google::Protobuf::Duration] - # When compare_duration is set, the ListFindingsResult's "state_change" - # attribute is updated to indicate whether the finding had its state changed, - # the finding's state remained unchanged, or if the finding was added in any - # state during the compare_duration period of time that precedes the - # read_time. This is the time between (read_time - compare_duration) and - # read_time. - # - # The state_change value is derived based on the presence and state of the - # finding at the two points in time. Intermediate state changes between the - # two times don't affect the result. For example, the results aren't affected - # if the finding is made inactive and then active again. - # - # Possible "state_change" values when compare_duration is specified: - # - # * "CHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration, but changed its - # state at read_time. - # * "UNCHANGED": indicates that the finding was present and matched the given - # filter at the start of compare_duration and did not change - # state at read_time. - # * "ADDED": indicates that the finding did not match the given filter or - # was not present at the start of compare_duration, but was - # present at read_time. - # * "REMOVED": indicates that the finding was present and matched the - # filter at the start of compare_duration, but did not match - # the filter at read_time. - # - # If compare_duration is not specified, then the only possible state_change - # is "UNUSED", which will be the state_change set for all findings present at - # read_time. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing findings. - # @!attribute [rw] list_findings_results - # @return [::Array<::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult>] - # Findings matching the list request. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Time used for executing the list request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of findings matching the query. - class ListFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Result containing the Finding and its StateChange. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # Finding matching the search request. - # @!attribute [rw] state_change - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult::StateChange] - # State change of the finding between the points in time. - # @!attribute [r] resource - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult::Resource] - # Output only. Resource that is associated with this finding. - class ListFindingsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information related to the Google Cloud resource that is - # associated with this finding. - # @!attribute [rw] name - # @return [::String] - # The full resource name of the resource. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] project_name - # @return [::String] - # The full resource name of project that the resource belongs to. - # @!attribute [rw] project_display_name - # @return [::String] - # The human readable name of project that the resource belongs to. - # @!attribute [rw] parent_name - # @return [::String] - # The full resource name of resource's parent. - # @!attribute [rw] parent_display_name - # @return [::String] - # The human readable name of resource's parent. - # @!attribute [rw] folders - # @return [::Array<::Google::Cloud::SecurityCenter::V1p1Beta1::Folder>] - # Contains a Folder message for each folder in the assets ancestry. - # The first folder is the deepest nested folder, and the last folder is - # the folder directly under the Organization. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The change in state of the finding. - # - # When querying across two points in time this describes - # the change in the finding between the two points: CHANGED, UNCHANGED, - # ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that - # the finding at timestamp does not match the filter specified, but it did - # at timestamp - compare_duration. If there was no compare_duration - # supplied in the request the state change will be: UNUSED - module StateChange - # State change is unused, this is the canonical default for this enum. - UNUSED = 0 - - # The finding has changed state in some way between the points in time - # and existed at both points. - CHANGED = 1 - - # The finding has not changed state between the points in time and - # existed at both points. - UNCHANGED = 2 - - # The finding was created between the points in time. - ADDED = 3 - - # The finding at timestamp does not match the filter specified, but it - # did at timestamp - compare_duration. - REMOVED = 4 - end - end - end - - # Request message for updating a finding's state. - # @!attribute [rw] name - # @return [::String] - # Required. The relative resource name of the finding. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/sources/\\{source_id}/finding/\\{finding_id}". - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding::State] - # Required. The desired State of the finding. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Required. The time at which the updated state takes effect. - class SetFindingStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for running asset discovery for an organization. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the organization to run asset discovery for. Its format is - # "organizations/[organization_id]". - class RunAssetDiscoveryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating or creating a finding. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Finding] - # Required. The finding resource to update or create if it does not already exist. - # parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - class UpdateFindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a notification config. - # @!attribute [rw] notification_config - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig] - # Required. The notification config to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - class UpdateNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating an organization's settings. - # @!attribute [rw] organization_settings - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings] - # Required. The organization settings resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the settings resource. - # - # If empty all mutable fields will be updated. - class UpdateOrganizationSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a source. - # @!attribute [rw] source - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::Source] - # Required. The source resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - class UpdateSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a SecurityMarks resource. - # @!attribute [rw] security_marks - # @return [::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks] - # Required. The security marks resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the updated SecurityMarks take effect. - # If not set uses current server time. Updates will be applied to the - # SecurityMarks that are active immediately preceding this time. - class UpdateSecurityMarksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.rb deleted file mode 100644 index 72b49b0fe90a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/cloud/securitycenter/v1p1beta1/source.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V1p1beta1 - # Security Command Center finding source. A finding source - # is an entity or a mechanism that can produce a finding. A source is like a - # container of findings that come from the same scanner, logger, monitor, etc. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this source. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/sources/\\{source_id}" - # @!attribute [rw] display_name - # @return [::String] - # The source's display name. - # A source's display name must be unique amongst its siblings, for example, - # two sources with the same parent can't share the same display name. - # The display name must have a length between 1 and 64 characters - # (inclusive). - # @!attribute [rw] description - # @return [::String] - # The description of the source (max of 1024 characters). - # Example: - # "Web Security Scanner is a web security scanner for common - # vulnerabilities in App Engine applications. It can automatically - # scan and detect four common vulnerabilities, including cross-site-scripting - # (XSS), Flash injection, mixed content (HTTP in HTTPS), and - # outdated/insecure libraries." - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the finding. It's either - # "organizations/\\{organization_id}/sources/\\{source_id}", - # "folders/\\{folder_id}/sources/\\{source_id}" or - # "projects/\\{project_number}/sources/\\{source_id}", - # depending on the closest CRM ancestor of the resource associated with the - # finding. - class Source - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/Gemfile deleted file mode 100644 index a24351ce9260..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-security_center-v1p1beta1", path: "../" -else - gem "google-cloud-security_center-v1p1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_finding.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_finding.rb deleted file mode 100644 index c000d93ed341..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_finding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_CreateFinding_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the create_finding call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_finding. -# -def create_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new - - # Call the create_finding method. - result = client.create_finding request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_notification_config.rb deleted file mode 100644 index acdc0989906e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_CreateNotificationConfig_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the create_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_notification_config. -# -def create_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new - - # Call the create_notification_config method. - result = client.create_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_source.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_source.rb deleted file mode 100644 index 9bcf68679623..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/create_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_CreateSource_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the create_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_source. -# -def create_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new - - # Call the create_source method. - result = client.create_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/delete_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/delete_notification_config.rb deleted file mode 100644 index 442fcdf71d1b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/delete_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_DeleteNotificationConfig_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the delete_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#delete_notification_config. -# -def delete_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new - - # Call the delete_notification_config method. - result = client.delete_notification_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_iam_policy.rb deleted file mode 100644 index 88f1888b1521..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_GetIamPolicy_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the get_iam_policy call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_notification_config.rb deleted file mode 100644 index feaf9ce7665a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_GetNotificationConfig_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the get_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_notification_config. -# -def get_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new - - # Call the get_notification_config method. - result = client.get_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_organization_settings.rb deleted file mode 100644 index 7bed3a6a574a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_organization_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_GetOrganizationSettings_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the get_organization_settings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_organization_settings. -# -def get_organization_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new - - # Call the get_organization_settings method. - result = client.get_organization_settings request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_source.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_source.rb deleted file mode 100644 index 9616dc30e5e4..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/get_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_GetSource_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the get_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_source. -# -def get_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new - - # Call the get_source method. - result = client.get_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_assets.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_assets.rb deleted file mode 100644 index fba016390793..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_GroupAssets_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the group_assets call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_assets. -# -def group_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new - - # Call the group_assets method. - result = client.group_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. - p item - end -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_GroupAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_findings.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_findings.rb deleted file mode 100644 index 6357692d3a5b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/group_findings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_GroupFindings_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the group_findings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_findings. -# -def group_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new - - # Call the group_findings method. - result = client.group_findings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::GroupResult. - p item - end -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_assets.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_assets.rb deleted file mode 100644 index 9b4cfc34f62b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_assets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_ListAssets_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the list_assets call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_assets. -# -def list_assets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new - - # Call the list_assets method. - result = client.list_assets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse::ListAssetsResult. - p item - end -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_ListAssets_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_findings.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_findings.rb deleted file mode 100644 index 9c8bc97942e4..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_findings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_ListFindings_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the list_findings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_findings. -# -def list_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new - - # Call the list_findings method. - result = client.list_findings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse::ListFindingsResult. - p item - end -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_notification_configs.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_notification_configs.rb deleted file mode 100644 index ea961a24d957..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_notification_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_ListNotificationConfigs_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the list_notification_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_notification_configs. -# -def list_notification_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new - - # Call the list_notification_configs method. - result = client.list_notification_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - p item - end -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_sources.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_sources.rb deleted file mode 100644 index d87dee47b0ed..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/list_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_ListSources_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the list_sources call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_sources. -# -def list_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new - - # Call the list_sources method. - result = client.list_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V1p1beta1::Source. - p item - end -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.rb deleted file mode 100644 index 2065af062b64..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/run_asset_discovery.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_RunAssetDiscovery_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the run_asset_discovery call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#run_asset_discovery. -# -def run_asset_discovery - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new - - # Call the run_asset_discovery method. - result = client.run_asset_discovery request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_finding_state.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_finding_state.rb deleted file mode 100644 index 915284737f2e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_finding_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_SetFindingState_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the set_finding_state call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_finding_state. -# -def set_finding_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new - - # Call the set_finding_state method. - result = client.set_finding_state request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_iam_policy.rb deleted file mode 100644 index 984368e397b1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_SetIamPolicy_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the set_iam_policy call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.rb deleted file mode 100644 index 279ca1f58995..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_TestIamPermissions_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the test_iam_permissions call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_finding.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_finding.rb deleted file mode 100644 index 7a803d222ecc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_finding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateFinding_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the update_finding call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_finding. -# -def update_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new - - # Call the update_finding method. - result = client.update_finding request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Finding. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_notification_config.rb deleted file mode 100644 index 6b814475d958..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateNotificationConfig_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the update_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_notification_config. -# -def update_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new - - # Call the update_notification_config method. - result = client.update_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_organization_settings.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_organization_settings.rb deleted file mode 100644 index e16bd81a9532..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_organization_settings.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the update_organization_settings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_organization_settings. -# -def update_organization_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new - - # Call the update_organization_settings method. - result = client.update_organization_settings request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_security_marks.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_security_marks.rb deleted file mode 100644 index 1eb75d7733ee..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_security_marks.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the update_security_marks call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_security_marks. -# -def update_security_marks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new - - # Call the update_security_marks method. - result = client.update_security_marks request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_source.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_source.rb deleted file mode 100644 index 7bc0b249e94c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/security_center/update_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSource_sync] -require "google/cloud/security_center/v1p1beta1" - -## -# Snippet for the update_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_source. -# -def update_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new - - # Call the update_source method. - result = client.update_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V1p1beta1::Source. - p result -end -# [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json b/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json deleted file mode 100644 index ea07c1b867ac..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/snippets/snippet_metadata_google.cloud.securitycenter.v1p1beta1.json +++ /dev/null @@ -1,935 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-security_center-v1p1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.securitycenter.v1p1beta1", - "version": "v1p1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_CreateSource_sync", - "title": "Snippet for the create_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_source.", - "file": "security_center/create_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_source", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateSource", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.CreateSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_CreateFinding_sync", - "title": "Snippet for the create_finding call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_finding.", - "file": "security_center/create_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_finding", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateFinding", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.CreateFinding", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_CreateNotificationConfig_sync", - "title": "Snippet for the create_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_notification_config.", - "file": "security_center/create_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#create_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateNotificationConfig", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.CreateNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_DeleteNotificationConfig_sync", - "title": "Snippet for the delete_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#delete_notification_config.", - "file": "security_center/delete_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#delete_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteNotificationConfig", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.DeleteNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_iam_policy.", - "file": "security_center/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GetIamPolicy", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GetNotificationConfig_sync", - "title": "Snippet for the get_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_notification_config.", - "file": "security_center/get_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetNotificationConfig", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GetNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GetOrganizationSettings_sync", - "title": "Snippet for the get_organization_settings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_organization_settings.", - "file": "security_center/get_organization_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_organization_settings", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_organization_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetOrganizationSettings", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GetOrganizationSettings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GetSource_sync", - "title": "Snippet for the get_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_source.", - "file": "security_center/get_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_source", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#get_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "GetSource", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GetSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GroupAssets_sync", - "title": "Snippet for the group_assets call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_assets.", - "file": "security_center/group_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "group_assets", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "GroupAssets", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GroupAssets", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_GroupFindings_sync", - "title": "Snippet for the group_findings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_findings.", - "file": "security_center/group_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "group_findings", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#group_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "GroupFindings", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.GroupFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_ListAssets_sync", - "title": "Snippet for the list_assets call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_assets.", - "file": "security_center/list_assets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_assets", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_assets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListAssets", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.ListAssets", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_ListFindings_sync", - "title": "Snippet for the list_findings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_findings.", - "file": "security_center/list_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_findings", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListFindings", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.ListFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_ListNotificationConfigs_sync", - "title": "Snippet for the list_notification_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_notification_configs.", - "file": "security_center/list_notification_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_notification_configs", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_notification_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListNotificationConfigs", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.ListNotificationConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_ListSources_sync", - "title": "Snippet for the list_sources call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_sources.", - "file": "security_center/list_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sources", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#list_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "ListSources", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.ListSources", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_RunAssetDiscovery_sync", - "title": "Snippet for the run_asset_discovery call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#run_asset_discovery.", - "file": "security_center/run_asset_discovery.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_asset_discovery", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#run_asset_discovery", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "RunAssetDiscovery", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.RunAssetDiscovery", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_SetFindingState_sync", - "title": "Snippet for the set_finding_state call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_finding_state.", - "file": "security_center/set_finding_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_finding_state", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_finding_state", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "SetFindingState", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.SetFindingState", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_iam_policy.", - "file": "security_center/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.SetIamPolicy", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#test_iam_permissions.", - "file": "security_center/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.TestIamPermissions", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_UpdateFinding_sync", - "title": "Snippet for the update_finding call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_finding.", - "file": "security_center/update_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_finding", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateFinding", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.UpdateFinding", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_UpdateNotificationConfig_sync", - "title": "Snippet for the update_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_notification_config.", - "file": "security_center/update_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateNotificationConfig", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.UpdateNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync", - "title": "Snippet for the update_organization_settings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_organization_settings.", - "file": "security_center/update_organization_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_organization_settings", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_organization_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateOrganizationSettings", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.UpdateOrganizationSettings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSource_sync", - "title": "Snippet for the update_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_source.", - "file": "security_center/update_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_source", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSource", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.UpdateSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync", - "title": "Snippet for the update_security_marks call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_security_marks.", - "file": "security_center/update_security_marks.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_security_marks", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client#update_security_marks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSecurityMarks", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter.UpdateSecurityMarks", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v1p1beta1.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_test.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_test.rb deleted file mode 100644 index 9a2eeefc4022..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" -require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_services_pb" -require "google/cloud/security_center/v1p1beta1/security_center" - -class ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_test.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_test.rb deleted file mode 100644 index 346d4e4ee6d3..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_paths_test.rb +++ /dev/null @@ -1,178 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/security_center/v1p1beta1/security_center" - -class ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_finding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.finding_path organization: "value0", source: "value1", finding: "value2" - assert_equal "organizations/value0/sources/value1/findings/value2", path - - path = client.finding_path folder: "value0", source: "value1", finding: "value2" - assert_equal "folders/value0/sources/value1/findings/value2", path - - path = client.finding_path project: "value0", source: "value1", finding: "value2" - assert_equal "projects/value0/sources/value1/findings/value2", path - end - end - - def test_folder_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_path folder: "value0" - assert_equal "folders/value0", path - end - end - - def test_notification_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.notification_config_path organization: "value0", notification_config: "value1" - assert_equal "organizations/value0/notificationConfigs/value1", path - end - end - - def test_organization_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_path organization: "value0" - assert_equal "organizations/value0", path - end - end - - def test_organization_settings_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_settings_path organization: "value0" - assert_equal "organizations/value0/organizationSettings", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_security_marks_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.security_marks_path organization: "value0", asset: "value1" - assert_equal "organizations/value0/assets/value1/securityMarks", path - - path = client.security_marks_path organization: "value0", source: "value1", finding: "value2" - assert_equal "organizations/value0/sources/value1/findings/value2/securityMarks", path - - path = client.security_marks_path folder: "value0", asset: "value1" - assert_equal "folders/value0/assets/value1/securityMarks", path - - path = client.security_marks_path project: "value0", asset: "value1" - assert_equal "projects/value0/assets/value1/securityMarks", path - - path = client.security_marks_path folder: "value0", source: "value1", finding: "value2" - assert_equal "folders/value0/sources/value1/findings/value2/securityMarks", path - - path = client.security_marks_path project: "value0", source: "value1", finding: "value2" - assert_equal "projects/value0/sources/value1/findings/value2/securityMarks", path - end - end - - def test_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.source_path organization: "value0", source: "value1" - assert_equal "organizations/value0/sources/value1", path - - path = client.source_path folder: "value0", source: "value1" - assert_equal "folders/value0/sources/value1", path - - path = client.source_path project: "value0", source: "value1" - assert_equal "projects/value0/sources/value1", path - end - end - - def test_topic_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.topic_path project: "value0", topic: "value1" - assert_equal "projects/value0/topics/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_test.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_test.rb deleted file mode 100644 index b12585f440f8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_rest_test.rb +++ /dev/null @@ -1,1388 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" -require "google/cloud/security_center/v1p1beta1/security_center/rest" - - -class ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source = {} - - create_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_source({ parent: parent, source: source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_source parent: parent, source: source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_source ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new(parent: parent, source: source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_source({ parent: parent, source: source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_source(::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new(parent: parent, source: source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_source_client_stub.call_count - end - end - end - - def test_create_finding - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - finding_id = "hello world" - finding = {} - - create_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_finding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_finding parent: parent, finding_id: finding_id, finding: finding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_finding ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_finding(::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_finding_client_stub.call_count - end - end - end - - def test_create_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - config_id = "hello world" - notification_config = {} - - create_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_create_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_notification_config_client_stub.call_count - end - end - end - - def test_delete_notification_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_notification_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_notification_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_notification_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_notification_config_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_get_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_notification_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_notification_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_notification_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_notification_config_client_stub.call_count - end - end - end - - def test_get_organization_settings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_organization_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_organization_settings({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_organization_settings name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_organization_settings ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_organization_settings({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_organization_settings(::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_organization_settings_client_stub.call_count - end - end - end - - def test_get_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_get_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_source ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_source(::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_source_client_stub.call_count - end - end - end - - def test_group_assets - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - compare_duration = {} - read_time = {} - page_token = "hello world" - page_size = 42 - - group_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, group_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.group_assets ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.group_assets(::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, group_assets_client_stub.call_count - end - end - end - - def test_group_findings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - read_time = {} - compare_duration = {} - page_token = "hello world" - page_size = 42 - - group_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_group_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, group_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.group_findings ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.group_findings(::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, group_findings_client_stub.call_count - end - end - end - - def test_list_assets - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_assets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_assets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_assets ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_assets(::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_count - end - end - end - - def test_list_findings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_findings ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_findings(::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_count - end - end - end - - def test_list_notification_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_notification_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_notification_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_notification_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_notification_configs ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_notification_configs(::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_notification_configs_client_stub.call_count - end - end - end - - def test_list_sources - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_list_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_sources parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_sources ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_sources(::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_sources_client_stub.call_count - end - end - end - - def test_run_asset_discovery - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - run_asset_discovery_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_run_asset_discovery_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_asset_discovery_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.run_asset_discovery({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.run_asset_discovery parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.run_asset_discovery({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_asset_discovery_client_stub.call_count - end - end - end - - def test_set_finding_state - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - state = :STATE_UNSPECIFIED - start_time = {} - - set_finding_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_finding_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_finding_state_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_finding_state({ name: name, state: state, start_time: start_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_finding_state name: name, state: state, start_time: start_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_finding_state ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_finding_state({ name: name, state: state, start_time: start_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_finding_state(::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_finding_state_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_update_finding - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - finding = {} - update_mask = {} - - update_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_finding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_finding({ finding: finding, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_finding finding: finding, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_finding ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_finding({ finding: finding, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_finding(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_finding_client_stub.call_count - end - end - end - - def test_update_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - notification_config = {} - update_mask = {} - - update_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_notification_config notification_config: notification_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_notification_config_client_stub.call_count - end - end - end - - def test_update_organization_settings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - organization_settings = {} - update_mask = {} - - update_organization_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_organization_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_organization_settings ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_organization_settings(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_organization_settings_client_stub.call_count - end - end - end - - def test_update_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - source = {} - update_mask = {} - - update_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_source({ source: source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_source source: source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_source ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_source({ source: source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_source(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new(source: source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_source_client_stub.call_count - end - end - end - - def test_update_security_marks - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - security_marks = {} - update_mask = {} - start_time = {} - - update_security_marks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_marks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_security_marks_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_security_marks ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_security_marks(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_security_marks_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_test.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_test.rb deleted file mode 100644 index 6ea47e6b8453..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/google/cloud/security_center/v1p1beta1/security_center_test.rb +++ /dev/null @@ -1,1581 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/securitycenter/v1p1beta1/securitycenter_service_pb" -require "google/cloud/security_center/v1p1beta1/security_center" - -class ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source = {} - - create_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::Source), request["source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_source({ parent: parent, source: source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_source parent: parent, source: source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_source ::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new(parent: parent, source: source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_source({ parent: parent, source: source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_source(::Google::Cloud::SecurityCenter::V1p1beta1::CreateSourceRequest.new(parent: parent, source: source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_source_client_stub.call_rpc_count - end - end - - def test_create_finding - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - finding_id = "hello world" - finding = {} - - create_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_finding, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["finding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::Finding), request["finding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_finding parent: parent, finding_id: finding_id, finding: finding do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_finding ::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_finding(::Google::Cloud::SecurityCenter::V1p1beta1::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_finding_client_stub.call_rpc_count - end - end - - def test_create_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - config_id = "hello world" - notification_config = {} - - create_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig), request["notification_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_notification_config_client_stub.call_rpc_count - end - end - - def test_delete_notification_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_notification_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_notification_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_notification_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::DeleteNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_notification_config_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_get_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_notification_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_notification_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_notification_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::GetNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_notification_config_client_stub.call_rpc_count - end - end - - def test_get_organization_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_organization_settings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_organization_settings({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_organization_settings name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_organization_settings ::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_organization_settings({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_organization_settings(::Google::Cloud::SecurityCenter::V1p1beta1::GetOrganizationSettingsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_organization_settings_client_stub.call_rpc_count - end - end - - def test_get_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_source ::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_source(::Google::Cloud::SecurityCenter::V1p1beta1::GetSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_source_client_stub.call_rpc_count - end - end - - def test_group_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - compare_duration = {} - read_time = {} - page_token = "hello world" - page_size = 42 - - group_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :group_assets, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["group_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, group_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.group_assets parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.group_assets ::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.group_assets({ parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.group_assets(::Google::Cloud::SecurityCenter::V1p1beta1::GroupAssetsRequest.new(parent: parent, filter: filter, group_by: group_by, compare_duration: compare_duration, read_time: read_time, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, group_assets_client_stub.call_rpc_count - end - end - - def test_group_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - read_time = {} - compare_duration = {} - page_token = "hello world" - page_size = 42 - - group_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :group_findings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["group_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, group_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.group_findings parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.group_findings ::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.group_findings({ parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.group_findings(::Google::Cloud::SecurityCenter::V1p1beta1::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, read_time: read_time, compare_duration: compare_duration, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, group_findings_client_stub.call_rpc_count - end - end - - def test_list_assets - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_assets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_assets, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_assets_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_assets parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_assets ::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_assets({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_assets(::Google::Cloud::SecurityCenter::V1p1beta1::ListAssetsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_assets_client_stub.call_rpc_count - end - end - - def test_list_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - read_time = {} - compare_duration = {} - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_findings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["compare_duration"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_findings parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_findings ::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_findings({ parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_findings(::Google::Cloud::SecurityCenter::V1p1beta1::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, read_time: read_time, compare_duration: compare_duration, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_rpc_count - end - end - - def test_list_notification_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_notification_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_notification_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_notification_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_notification_configs ::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_notification_configs(::Google::Cloud::SecurityCenter::V1p1beta1::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_notification_configs_client_stub.call_rpc_count - end - end - - def test_list_sources - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sources, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_sources parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_sources ::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_sources(::Google::Cloud::SecurityCenter::V1p1beta1::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_sources_client_stub.call_rpc_count - end - end - - def test_run_asset_discovery - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - run_asset_discovery_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_asset_discovery, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_asset_discovery_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.run_asset_discovery({ parent: parent }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.run_asset_discovery parent: parent do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.run_asset_discovery ::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new(parent: parent) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.run_asset_discovery({ parent: parent }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.run_asset_discovery(::Google::Cloud::SecurityCenter::V1p1beta1::RunAssetDiscoveryRequest.new(parent: parent), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_asset_discovery_client_stub.call_rpc_count - end - end - - def test_set_finding_state - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - state = :STATE_UNSPECIFIED - start_time = {} - - set_finding_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_finding_state, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest, request - assert_equal "hello world", request["name"] - assert_equal :STATE_UNSPECIFIED, request["state"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_finding_state_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_finding_state({ name: name, state: state, start_time: start_time }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_finding_state name: name, state: state, start_time: start_time do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_finding_state ::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_finding_state({ name: name, state: state, start_time: start_time }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_finding_state(::Google::Cloud::SecurityCenter::V1p1beta1::SetFindingStateRequest.new(name: name, state: state, start_time: start_time), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_finding_state_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_update_finding - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - finding = {} - update_mask = {} - - update_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_finding, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::Finding), request["finding"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_finding({ finding: finding, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_finding finding: finding, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_finding ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_finding({ finding: finding, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_finding(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_finding_client_stub.call_rpc_count - end - end - - def test_update_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - notification_config = {} - update_mask = {} - - update_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::NotificationConfig), request["notification_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_notification_config notification_config: notification_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_notification_config ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_notification_config(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_notification_config_client_stub.call_rpc_count - end - end - - def test_update_organization_settings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - organization_settings = {} - update_mask = {} - - update_organization_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_organization_settings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::OrganizationSettings), request["organization_settings"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_organization_settings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_organization_settings organization_settings: organization_settings, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_organization_settings ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_organization_settings({ organization_settings: organization_settings, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_organization_settings(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateOrganizationSettingsRequest.new(organization_settings: organization_settings, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_organization_settings_client_stub.call_rpc_count - end - end - - def test_update_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - source = {} - update_mask = {} - - update_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::Source), request["source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_source({ source: source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_source source: source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_source ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_source({ source: source, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_source(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSourceRequest.new(source: source, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_source_client_stub.call_rpc_count - end - end - - def test_update_security_marks - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - security_marks = {} - update_mask = {} - start_time = {} - - update_security_marks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_security_marks, name - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityMarks), request["security_marks"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_security_marks_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_security_marks security_marks: security_marks, update_mask: update_mask, start_time: start_time do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_security_marks ::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask, start_time: start_time }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_security_marks(::Google::Cloud::SecurityCenter::V1p1beta1::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask, start_time: start_time), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_security_marks_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::SecurityCenter::V1p1beta1::SecurityCenter::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/helper.rb b/owl-bot-staging/google-cloud-security_center-v1p1beta1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v1p1beta1/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-v2/.gitignore b/owl-bot-staging/google-cloud-security_center-v2/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/.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-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center-v2/.repo-metadata.json deleted file mode 100644 index 0473cc4ee50a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/.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-v2/latest", - "distribution_name": "google-cloud-security_center-v2", - "is_cloud": true, - "language": "ruby", - "name": "securitycenter", - "name_pretty": "Security Command Center V2 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. Note that google-cloud-security_center-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details.", - "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-v2/.rubocop.yml b/owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml deleted file mode 100644 index ca95d31c752a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security_center-v2.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-security_center-v2.rb" diff --git a/owl-bot-staging/google-cloud-security_center-v2/.toys.rb b/owl-bot-staging/google-cloud-security_center-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/.yardopts b/owl-bot-staging/google-cloud-security_center-v2/.yardopts deleted file mode 100644 index ce63c0dd16df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Security Command Center V2 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md deleted file mode 100644 index f1313afe9378..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security_center-v2 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-security_center-v2 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/security_center/v2" - -client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/security_center/v2" - -::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-security_center-v2 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/security_center/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security_center-v2/Gemfile b/owl-bot-staging/google-cloud-security_center-v2/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-v2/LICENSE.md b/owl-bot-staging/google-cloud-security_center-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-security_center-v2/README.md b/owl-bot-staging/google-cloud-security_center-v2/README.md deleted file mode 100644 index c2224047d696..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Security Command Center V2 API - -Security Command Center API provides access to temporal views of assets and findings within an organization. - -Security Command Center API provides access to temporal views of assets and findings within an organization. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Security Command Center V2 API. Most users should consider using -the main client gem, -[google-cloud-security_center](https://rubygems.org/gems/google-cloud-security_center). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-security_center-v2 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/securitycenter.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/security_center/v2" - -client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new -request = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new # (request fields as keyword arguments...) -response = client.batch_create_resource_value_configs request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/security-command-center) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/security_center/v2" -require "logger" - -client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-security_center`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-security_center-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-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-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-security_center-v2/Rakefile b/owl-bot-staging/google-cloud-security_center-v2/Rakefile deleted file mode 100644 index 3f3dda612226..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-security_center-v2 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-v2 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security_center-v2 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security_center-v2 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-security_center-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security_center-v2" - header "google-cloud-security_center-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security_center-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security_center-v2 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-security_center-v2 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-security_center-v2 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json deleted file mode 100644 index 8859452b344a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.securitycenter.v2", - "libraryPackage": "::Google::Cloud::SecurityCenter::V2", - "services": { - "SecurityCenter": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client", - "rpcs": { - "BatchCreateResourceValueConfigs": { - "methods": [ - "batch_create_resource_value_configs" - ] - }, - "BulkMuteFindings": { - "methods": [ - "bulk_mute_findings" - ] - }, - "CreateBigQueryExport": { - "methods": [ - "create_big_query_export" - ] - }, - "CreateFinding": { - "methods": [ - "create_finding" - ] - }, - "CreateMuteConfig": { - "methods": [ - "create_mute_config" - ] - }, - "CreateNotificationConfig": { - "methods": [ - "create_notification_config" - ] - }, - "CreateSource": { - "methods": [ - "create_source" - ] - }, - "DeleteBigQueryExport": { - "methods": [ - "delete_big_query_export" - ] - }, - "DeleteMuteConfig": { - "methods": [ - "delete_mute_config" - ] - }, - "DeleteNotificationConfig": { - "methods": [ - "delete_notification_config" - ] - }, - "DeleteResourceValueConfig": { - "methods": [ - "delete_resource_value_config" - ] - }, - "GetBigQueryExport": { - "methods": [ - "get_big_query_export" - ] - }, - "GetSimulation": { - "methods": [ - "get_simulation" - ] - }, - "GetValuedResource": { - "methods": [ - "get_valued_resource" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "GetMuteConfig": { - "methods": [ - "get_mute_config" - ] - }, - "GetNotificationConfig": { - "methods": [ - "get_notification_config" - ] - }, - "GetResourceValueConfig": { - "methods": [ - "get_resource_value_config" - ] - }, - "GetSource": { - "methods": [ - "get_source" - ] - }, - "GroupFindings": { - "methods": [ - "group_findings" - ] - }, - "ListAttackPaths": { - "methods": [ - "list_attack_paths" - ] - }, - "ListBigQueryExports": { - "methods": [ - "list_big_query_exports" - ] - }, - "ListFindings": { - "methods": [ - "list_findings" - ] - }, - "ListMuteConfigs": { - "methods": [ - "list_mute_configs" - ] - }, - "ListNotificationConfigs": { - "methods": [ - "list_notification_configs" - ] - }, - "ListResourceValueConfigs": { - "methods": [ - "list_resource_value_configs" - ] - }, - "ListSources": { - "methods": [ - "list_sources" - ] - }, - "ListValuedResources": { - "methods": [ - "list_valued_resources" - ] - }, - "SetFindingState": { - "methods": [ - "set_finding_state" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "SetMute": { - "methods": [ - "set_mute" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "UpdateBigQueryExport": { - "methods": [ - "update_big_query_export" - ] - }, - "UpdateExternalSystem": { - "methods": [ - "update_external_system" - ] - }, - "UpdateFinding": { - "methods": [ - "update_finding" - ] - }, - "UpdateMuteConfig": { - "methods": [ - "update_mute_config" - ] - }, - "UpdateNotificationConfig": { - "methods": [ - "update_notification_config" - ] - }, - "UpdateResourceValueConfig": { - "methods": [ - "update_resource_value_config" - ] - }, - "UpdateSecurityMarks": { - "methods": [ - "update_security_marks" - ] - }, - "UpdateSource": { - "methods": [ - "update_source" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec b/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec deleted file mode 100644 index 8cb5140c90c7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security_center/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security_center-v2" - gem.version = Google::Cloud::SecurityCenter::V2::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. Note that google-cloud-security_center-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center instead. See the readme for more details." - gem.summary = "Security Command Center API provides access to temporal views of assets and findings within an organization." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb deleted file mode 100644 index fbfebf50a08d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/security_center/v2" diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb deleted file mode 100644 index cb448baa8c34..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center/v2/security_center" -require "google/cloud/security_center/v2/version" - -module Google - module Cloud - module SecurityCenter - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/security_center/v2" - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/security_center/v2" - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - module V2 - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/security_center/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb deleted file mode 100644 index 25ca637b14ef..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center/v2/security_center/rest" -require "google/cloud/security_center/v2/version" - -module Google - module Cloud - module SecurityCenter - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/security_center/v2/rest" - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - module V2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb deleted file mode 100644 index b2e61e4933b2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security_center/v2/version" - -require "google/cloud/security_center/v2/security_center/credentials" -require "google/cloud/security_center/v2/security_center/paths" -require "google/cloud/security_center/v2/security_center/operations" -require "google/cloud/security_center/v2/security_center/client" -require "google/cloud/security_center/v2/security_center/rest" - -module Google - module Cloud - module SecurityCenter - module V2 - ## - # V2 APIs for Security Center service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/security_center/v2/security_center" - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/security_center/v2/security_center/rest" - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - module SecurityCenter - end - end - end - end -end - -helper_path = ::File.join __dir__, "security_center", "helpers.rb" -require "google/cloud/security_center/v2/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb deleted file mode 100644 index e1de0b6ba7ae..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb +++ /dev/null @@ -1,4793 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securitycenter/v2/securitycenter_service_pb" - -module Google - module Cloud - module SecurityCenter - module V2 - module SecurityCenter - ## - # Client for the SecurityCenter service. - # - # V2 APIs for Security Center service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :security_center_stub - - ## - # Configure the SecurityCenter Client class. - # - # See {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenter clients - # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecurityCenter", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @security_center_stub.universe_domain - end - - ## - # Create a new SecurityCenter client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecurityCenter client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/securitycenter/v2/securitycenter_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @security_center_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @security_center_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @security_center_stub.logger - end - - # Service calls - - ## - # Creates a ResourceValueConfig for an organization. Maps user's tags to - # difference resource values for use by the attack path simulation. - # - # @overload batch_create_resource_value_configs(request, options = nil) - # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_create_resource_value_configs(parent: nil, requests: nil) - # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # The parent field in the CreateResourceValueConfigRequest - # messages must either be empty or match this field. - # @param requests [::Array<::Google::Cloud::SecurityCenter::V2::CreateResourceValueConfigRequest, ::Hash>] - # Required. The resource value configs to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new - # - # # Call the batch_create_resource_value_configs method. - # result = client.batch_create_resource_value_configs request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse. - # p result - # - def batch_create_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :batch_create_resource_value_configs, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Kicks off an LRO to bulk mute findings for a parent based on a filter. If - # no location is specified, findings are muted in global. The parent - # can be either an organization, folder, or project. The findings matched by - # the filter will be muted after the LRO is done. - # - # @overload bulk_mute_findings(request, options = nil) - # Pass arguments to `bulk_mute_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload bulk_mute_findings(parent: nil, filter: nil, mute_state: nil) - # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, at which bulk action needs to be applied. If no - # location is specified, findings are updated in global. The following list - # shows some examples: - # - # + `organizations/[organization_id]` - # + `organizations/[organization_id]/locations/[location_id]` - # + `folders/[folder_id]` - # + `folders/[folder_id]/locations/[location_id]` - # + `projects/[project_id]` - # + `projects/[project_id]/locations/[location_id]` - # @param filter [::String] - # Expression that identifies findings that should be updated. - # The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @param mute_state [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest::MuteState] - # Optional. All findings matching the given filter will have their mute state - # set to this value. The default value is `MUTED`. Setting this to - # `UNDEFINED` will clear the mute state on all matching findings. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new - # - # # Call the bulk_mute_findings method. - # result = client.bulk_mute_findings request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def bulk_mute_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.bulk_mute_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_mute_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :bulk_mute_findings, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a BigQuery export. - # - # @overload create_big_query_export(request, options = nil) - # Pass arguments to `create_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) - # Pass arguments to `create_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource of the new BigQuery export. Its - # format is `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param big_query_export [::Google::Cloud::SecurityCenter::V2::BigQueryExport, ::Hash] - # Required. The BigQuery export being created. - # @param big_query_export_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new - # - # # Call the create_big_query_export method. - # result = client.create_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. - # p result - # - def create_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a finding in a location. The corresponding source must exist for - # finding creation to succeed. - # - # @overload create_finding(request, options = nil) - # Pass arguments to `create_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::CreateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_finding(parent: nil, finding_id: nil, finding: nil) - # Pass arguments to `create_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new finding's parent. The following list - # shows some examples of the format: - # + - # `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # @param finding_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be alphanumeric and less than or equal to 32 characters and - # greater than 0 characters in length. - # @param finding [::Google::Cloud::SecurityCenter::V2::Finding, ::Hash] - # Required. The Finding being created. The name and security_marks will be - # ignored as they are both output only fields on this resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new - # - # # Call the create_finding method. - # result = client.create_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - # p result - # - def create_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_finding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_finding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a mute config. - # - # @overload create_mute_config(request, options = nil) - # Pass arguments to `create_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) - # Pass arguments to `create_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new mute configs's parent. Its format is - # `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param mute_config [::Google::Cloud::SecurityCenter::V2::MuteConfig, ::Hash] - # Required. The mute config being created. - # @param mute_config_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new - # - # # Call the create_mute_config method. - # result = client.create_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - # p result - # - def create_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.parent - regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.parent - regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a notification config. - # - # @overload create_notification_config(request, options = nil) - # Pass arguments to `create_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) - # Pass arguments to `create_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new notification config's parent. Its format - # is `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param config_id [::String] - # Required. - # Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters and contain alphanumeric - # characters, underscores, or hyphens only. - # @param notification_config [::Google::Cloud::SecurityCenter::V2::NotificationConfig, ::Hash] - # Required. The notification config being created. The name and the service - # account will be ignored as they are both output only fields on this - # resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new - # - # # Call the create_notification_config method. - # result = client.create_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - # p result - # - def create_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a source. - # - # @overload create_source(request, options = nil) - # Pass arguments to `create_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::CreateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_source(parent: nil, source: nil) - # Pass arguments to `create_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new source's parent. Its format should be - # `organizations/[organization_id]`. - # @param source [::Google::Cloud::SecurityCenter::V2::Source, ::Hash] - # Required. The Source being created, only the display_name and description - # will be used. All other fields will be ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new - # - # # Call the create_source method. - # result = client.create_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - # p result - # - def create_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :create_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing BigQuery export. - # - # @overload delete_big_query_export(request, options = nil) - # Pass arguments to `delete_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_big_query_export(name: nil) - # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the BigQuery export to delete. The following list - # shows some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}/locations/{location}/bigQueryExports/{export_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new - # - # # Call the delete_big_query_export method. - # result = client.delete_big_query_export request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing mute config. If no location is specified, default is - # global. - # - # @overload delete_mute_config(request, options = nil) - # Pass arguments to `delete_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_mute_config(name: nil) - # Pass arguments to `delete_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to delete. The following list shows some - # examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new - # - # # Call the delete_mute_config method. - # result = client.delete_mute_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.name - regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.name - regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a notification config. - # - # @overload delete_notification_config(request, options = nil) - # Pass arguments to `delete_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_notification_config(name: nil) - # Pass arguments to `delete_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to delete. The following list - # shows some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new - # - # # Call the delete_notification_config method. - # result = client.delete_notification_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a ResourceValueConfig. - # - # @overload delete_resource_value_config(request, options = nil) - # Pass arguments to `delete_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_resource_value_config(name: nil) - # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the ResourceValueConfig to delete - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new - # - # # Call the delete_resource_value_config method. - # result = client.delete_resource_value_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :delete_resource_value_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a BigQuery export. - # - # @overload get_big_query_export(request, options = nil) - # Pass arguments to `get_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_big_query_export(name: nil) - # Pass arguments to `get_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the BigQuery export to retrieve. The following list shows - # some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new - # - # # Call the get_big_query_export method. - # result = client.get_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. - # p result - # - def get_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the simulation by name or the latest simulation for the given - # organization. - # - # @overload get_simulation(request, options = nil) - # Pass arguments to `get_simulation` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetSimulationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetSimulationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_simulation(name: nil) - # Pass arguments to `get_simulation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The organization name or simulation name of this simulation - # - # Valid format: - # `organizations/{organization}/simulations/latest` - # `organizations/{organization}/simulations/{simulation}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Simulation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Simulation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new - # - # # Call the get_simulation method. - # result = client.get_simulation request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Simulation. - # p result - # - def get_simulation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_simulation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_simulation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_simulation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the valued resource by name - # - # @overload get_valued_resource(request, options = nil) - # Pass arguments to `get_valued_resource` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_valued_resource(name: nil) - # Pass arguments to `get_valued_resource` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of this valued resource - # - # Valid format: - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::ValuedResource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new - # - # # Call the get_valued_resource method. - # result = client.get_valued_resource request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::ValuedResource. - # p result - # - def get_valued_resource request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_valued_resource.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_valued_resource.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_valued_resource, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy on the specified Source. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a mute config. If no location is specified, default is - # global. - # - # @overload get_mute_config(request, options = nil) - # Pass arguments to `get_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_mute_config(name: nil) - # Pass arguments to `get_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to retrieve. The following list shows - # some examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new - # - # # Call the get_mute_config method. - # result = client.get_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - # p result - # - def get_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.name - regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.name - regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a notification config. - # - # @overload get_notification_config(request, options = nil) - # Pass arguments to `get_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_notification_config(name: nil) - # Pass arguments to `get_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to get. The following list shows - # some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new - # - # # Call the get_notification_config method. - # result = client.get_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - # p result - # - def get_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a ResourceValueConfig. - # - # @overload get_resource_value_config(request, options = nil) - # Pass arguments to `get_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_resource_value_config(name: nil) - # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource value config to retrieve. Its format is - # organizations/\\{organization}/resourceValueConfigs/\\{config_id}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new - # - # # Call the get_resource_value_config method. - # result = client.get_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. - # p result - # - def get_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_resource_value_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a source. - # - # @overload get_source(request, options = nil) - # Pass arguments to `get_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_source(name: nil) - # Pass arguments to `get_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Relative resource name of the source. Its format is - # `organizations/[organization_id]/source/[source_id]`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new - # - # # Call the get_source method. - # result = client.get_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - # p result - # - def get_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :get_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization or source's findings and groups them by their - # specified properties in a location. If no location is specified, findings - # are assumed to be in global - # - # To group across all sources provide a `-` as the source id. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - # + `/v2/folders/{folder_id}/sources/-/findings` - # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` - # + `/v2/projects/{project_id}/sources/-/findings` - # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` - # - # @overload group_findings(request, options = nil) - # Pass arguments to `group_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload group_findings(parent: nil, filter: nil, group_by: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source to groupBy. If no location is specified, - # finding is assumed to be in global. - # The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To groupBy across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/[location_id]` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-/locations/[location_id]` - # + `projects/{project_id}/sources/-` - # + `projects/{project_id}/sources/-/locations/[location_id]` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * security_marks.marks: `=`, `:` - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: "parent,resource_name". - # @param page_token [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new - # - # # Call the group_findings method. - # result = client.group_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::GroupResult. - # p item - # end - # - def group_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.group_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.group_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.group_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :group_findings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :group_findings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the attack paths for a set of simulation results or valued resources - # and filter. - # - # @overload list_attack_paths(request, options = nil) - # Pass arguments to `list_attack_paths` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_attack_paths` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list attack paths. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @param filter [::String] - # The filter expression that filters the attack path in the response. - # Supported fields: - # - # * `valued_resources` supports = - # @param page_token [::String] - # The value returned by the last `ListAttackPathsResponse`; indicates - # that this is a continuation of a prior `ListAttackPaths` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new - # - # # Call the list_attack_paths method. - # result = client.list_attack_paths request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::AttackPath. - # p item - # end - # - def list_attack_paths request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_attack_paths.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_attack_paths.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_attack_paths, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_attack_paths, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BigQuery exports. Note that when requesting BigQuery exports at a - # given level all exports under that level are also returned e.g. if - # requesting BigQuery exports under a folder, then all BigQuery exports - # immediately under the folder plus the ones created under the projects - # within the folder are returned. - # - # @overload list_big_query_exports(request, options = nil) - # Pass arguments to `list_big_query_exports` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of BigQuery exports. Its - # format is `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListBigQueryExports` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListBigQueryExports` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new - # - # # Call the list_big_query_exports method. - # result = client.list_big_query_exports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::BigQueryExport. - # p item - # end - # - def list_big_query_exports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_big_query_exports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_big_query_exports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_big_query_exports, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_big_query_exports, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization or source's findings. - # - # To list across all sources for a given location provide a `-` as the source - # id. If no location is specified, finding are assumed to be in global. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, order_by: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source the findings belong to. If no location is - # specified, the default is global. The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To list across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/{location_id}` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-locations/{location_id}` - # + `projects/{projects_id}/sources/-` - # + `projects/{projects_id}/sources/-/locations/{location_id}` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * security_marks.marks: `=`, `:` - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.display_name: `=`, `:` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,parent". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,parent". Redundant space characters in the - # syntax are insignificant. "name desc,parent" and " - # name desc , parent " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # security_marks.marks - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_findings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_findings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists mute configs. If no location is specified, default is - # global. - # - # @overload list_mute_configs(request, options = nil) - # Pass arguments to `list_mute_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_mute_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of mute configs. Its format - # is `organizations/[organization_id]", "folders/[folder_id]`, - # `projects/[project_id]`, - # `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, - # `projects/[project_id]/locations/[location_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListMuteConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMuteConfigs` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new - # - # # Call the list_mute_configs method. - # result = client.list_mute_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::MuteConfig. - # p item - # end - # - def list_mute_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_mute_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.parent - regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.parent - regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_mute_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_mute_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_mute_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists notification configs. - # - # @overload list_notification_configs(request, options = nil) - # Pass arguments to `list_notification_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_notification_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent in which to list the notification - # configurations. Its format is - # "organizations/[organization_id]/locations/[location_id]", - # "folders/[folder_id]/locations/[location_id]", or - # "projects/[project_id]/locations/[location_id]". - # @param page_token [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new - # - # # Call the list_notification_configs method. - # result = client.list_notification_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::NotificationConfig. - # p item - # end - # - def list_notification_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_notification_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_notification_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_notification_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_notification_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all ResourceValueConfigs. - # - # @overload list_resource_value_configs(request, options = nil) - # Pass arguments to `list_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of resource value configs. - # Its format is - # `organizations/[organization_id]` - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListResourceValueConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListResourceValueConfigs` must match the call that provided the - # page token. - # - # page_size can be specified, and the new page_size will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new - # - # # Call the list_resource_value_configs method. - # result = client.list_resource_value_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig. - # p item - # end - # - def list_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_resource_value_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all sources belonging to an organization. - # - # @overload list_sources(request, options = nil) - # Pass arguments to `list_sources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent of sources to list. Its format should - # be `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param page_token [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new - # - # # Call the list_sources method. - # result = client.list_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::Source. - # p item - # end - # - def list_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_sources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the valued resources for a set of simulation results and filter. - # - # @overload list_valued_resources(request, options = nil) - # Pass arguments to `list_valued_resources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) - # Pass arguments to `list_valued_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list exposed resources. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # @param filter [::String] - # The filter expression that filters the valued resources in the response. - # Supported fields: - # - # * `resource_value` supports = - # * `resource_type` supports = - # @param page_token [::String] - # The value returned by the last `ListValuedResourcesResponse`; indicates - # that this is a continuation of a prior `ListValuedResources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param order_by [::String] - # Optional. The fields by which to order the valued resources response. - # - # Supported fields: - # - # * `exposed_score` - # - # * `resource_value` - # - # * `resource_type` - # - # Values should be a comma separated list of fields. For example: - # `exposed_score,resource_value`. - # - # The default sorting order is descending. To specify ascending or descending - # order for a field, append a " ASC" or a " DESC" suffix, respectively; for - # example: `exposed_score DESC`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new - # - # # Call the list_valued_resources method. - # result = client.list_valued_resources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ValuedResource. - # p item - # end - # - def list_valued_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_valued_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_valued_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :list_valued_resources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_stub, :list_valued_resources, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the state of a finding. If no location is specified, finding is - # assumed to be in global - # - # @overload set_finding_state(request, options = nil) - # Pass arguments to `set_finding_state` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_finding_state(name: nil, state: nil) - # Pass arguments to `set_finding_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @param state [::Google::Cloud::SecurityCenter::V2::Finding::State] - # Required. The desired State of the finding. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new - # - # # Call the set_finding_state method. - # result = client.set_finding_state request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - # p result - # - def set_finding_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_finding_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_finding_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :set_finding_state, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified Source. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the mute state of a finding. If no location is specified, finding - # is assumed to be in global - # - # @overload set_mute(request, options = nil) - # Pass arguments to `set_mute` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::SetMuteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::SetMuteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_mute(name: nil, mute: nil) - # Pass arguments to `set_mute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @param mute [::Google::Cloud::SecurityCenter::V2::Finding::Mute] - # Required. The desired state of the Mute. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new - # - # # Call the set_mute method. - # result = client.set_mute request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - # p result - # - def set_mute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::SetMuteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_mute.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_mute.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_mute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :set_mute, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has on the specified source. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a BigQuery export. - # - # @overload update_big_query_export(request, options = nil) - # Pass arguments to `update_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_big_query_export(big_query_export: nil, update_mask: nil) - # Pass arguments to `update_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param big_query_export [::Google::Cloud::SecurityCenter::V2::BigQueryExport, ::Hash] - # Required. The BigQuery export being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new - # - # # Call the update_big_query_export method. - # result = client.update_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. - # p result - # - def update_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.big_query_export&.name - header_params["big_query_export.name"] = request.big_query_export.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_big_query_export, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates external system. This is for a given finding. If no location is - # specified, finding is assumed to be in global - # - # @overload update_external_system(request, options = nil) - # Pass arguments to `update_external_system` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_external_system(external_system: nil, update_mask: nil) - # Pass arguments to `update_external_system` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param external_system [::Google::Cloud::SecurityCenter::V2::ExternalSystem, ::Hash] - # Required. The external system resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the external system resource. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::ExternalSystem] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new - # - # # Call the update_external_system method. - # result = client.update_external_system request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::ExternalSystem. - # p result - # - def update_external_system request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_external_system.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.external_system&.name - header_params["external_system.name"] = request.external_system.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_external_system.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_external_system, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a finding. If no location is specified, finding is - # assumed to be in global. The corresponding source must exist for a finding - # creation to succeed. - # - # @overload update_finding(request, options = nil) - # Pass arguments to `update_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_finding(finding: nil, update_mask: nil) - # Pass arguments to `update_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param finding [::Google::Cloud::SecurityCenter::V2::Finding, ::Hash] - # Required. The finding resource to update or create if it does not already - # exist. parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new - # - # # Call the update_finding method. - # result = client.update_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - # p result - # - def update_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.finding&.name - header_params["finding.name"] = request.finding.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_finding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_finding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a mute config. If no location is specified, default is - # global. - # - # @overload update_mute_config(request, options = nil) - # Pass arguments to `update_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_mute_config(mute_config: nil, update_mask: nil) - # Pass arguments to `update_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param mute_config [::Google::Cloud::SecurityCenter::V2::MuteConfig, ::Hash] - # Required. The mute config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new - # - # # Call the update_mute_config method. - # result = client.update_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - # p result - # - def update_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.mute_config&.name - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.mute_config&.name - regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.mute_config&.name - regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_mute_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - # - # @overload update_notification_config(request, options = nil) - # Pass arguments to `update_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_notification_config(notification_config: nil, update_mask: nil) - # Pass arguments to `update_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_config [::Google::Cloud::SecurityCenter::V2::NotificationConfig, ::Hash] - # Required. The notification config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new - # - # # Call the update_notification_config method. - # result = client.update_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - # p result - # - def update_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.notification_config&.name - header_params["notification_config.name"] = request.notification_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_notification_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing ResourceValueConfigs with new rules. - # - # @overload update_resource_value_config(request, options = nil) - # Pass arguments to `update_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) - # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource_value_config [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig, ::Hash] - # Required. The resource value config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # To update nested fields, include the top level field in the mask - # For example, to update gcp_metadata.resource_type, include the - # "gcp_metadata" field mask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new - # - # # Call the update_resource_value_config method. - # result = client.update_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. - # p result - # - def update_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource_value_config&.name - header_params["resource_value_config.name"] = request.resource_value_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_resource_value_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates security marks. For Finding Security marks, if no location is - # specified, finding is assumed to be in global. Assets Security Marks can - # only be accessed through global endpoint. - # - # @overload update_security_marks(request, options = nil) - # Pass arguments to `update_security_marks` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_security_marks(security_marks: nil, update_mask: nil) - # Pass arguments to `update_security_marks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_marks [::Google::Cloud::SecurityCenter::V2::SecurityMarks, ::Hash] - # Required. The security marks resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new - # - # # Call the update_security_marks method. - # result = client.update_security_marks request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::SecurityMarks. - # p result - # - def update_security_marks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_security_marks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.security_marks&.name - header_params["security_marks.name"] = request.security_marks.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_security_marks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_security_marks, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a source. - # - # @overload update_source(request, options = nil) - # Pass arguments to `update_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_source(source: nil, update_mask: nil) - # Pass arguments to `update_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param source [::Google::Cloud::SecurityCenter::V2::Source, ::Hash] - # Required. The source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new - # - # # Call the update_source method. - # result = client.update_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - # p result - # - def update_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.source&.name - header_params["source.name"] = request.source.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.call_rpc :update_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecurityCenter API. - # - # This class represents the configuration for SecurityCenter, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # batch_create_resource_value_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the SecurityCenter API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `batch_create_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_resource_value_configs - ## - # RPC-specific configuration for `bulk_mute_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_mute_findings - ## - # RPC-specific configuration for `create_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :create_big_query_export - ## - # RPC-specific configuration for `create_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_finding - ## - # RPC-specific configuration for `create_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_mute_config - ## - # RPC-specific configuration for `create_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_config - ## - # RPC-specific configuration for `create_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_source - ## - # RPC-specific configuration for `delete_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_big_query_export - ## - # RPC-specific configuration for `delete_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_mute_config - ## - # RPC-specific configuration for `delete_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_config - ## - # RPC-specific configuration for `delete_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_resource_value_config - ## - # RPC-specific configuration for `get_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :get_big_query_export - ## - # RPC-specific configuration for `get_simulation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_simulation - ## - # RPC-specific configuration for `get_valued_resource` - # @return [::Gapic::Config::Method] - # - attr_reader :get_valued_resource - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `get_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mute_config - ## - # RPC-specific configuration for `get_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_config - ## - # RPC-specific configuration for `get_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_resource_value_config - ## - # RPC-specific configuration for `get_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_source - ## - # RPC-specific configuration for `group_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :group_findings - ## - # RPC-specific configuration for `list_attack_paths` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attack_paths - ## - # RPC-specific configuration for `list_big_query_exports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_big_query_exports - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_mute_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_mute_configs - ## - # RPC-specific configuration for `list_notification_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_configs - ## - # RPC-specific configuration for `list_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_value_configs - ## - # RPC-specific configuration for `list_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sources - ## - # RPC-specific configuration for `list_valued_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_valued_resources - ## - # RPC-specific configuration for `set_finding_state` - # @return [::Gapic::Config::Method] - # - attr_reader :set_finding_state - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `set_mute` - # @return [::Gapic::Config::Method] - # - attr_reader :set_mute - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `update_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :update_big_query_export - ## - # RPC-specific configuration for `update_external_system` - # @return [::Gapic::Config::Method] - # - attr_reader :update_external_system - ## - # RPC-specific configuration for `update_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_finding - ## - # RPC-specific configuration for `update_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_mute_config - ## - # RPC-specific configuration for `update_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_config - ## - # RPC-specific configuration for `update_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_resource_value_config - ## - # RPC-specific configuration for `update_security_marks` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_marks - ## - # RPC-specific configuration for `update_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_source - - # @private - def initialize parent_rpcs = nil - batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs - @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config - bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings - @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config - create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export - @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config - create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding - @create_finding = ::Gapic::Config::Method.new create_finding_config - create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config - @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config - create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config - @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config - create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source - @create_source = ::Gapic::Config::Method.new create_source_config - delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export - @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config - delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config - @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config - delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config - @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config - delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config - @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config - get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export - @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config - get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation - @get_simulation = ::Gapic::Config::Method.new get_simulation_config - get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource - @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config - @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config - get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config - @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config - get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config - @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config - get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source - @get_source = ::Gapic::Config::Method.new get_source_config - group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings - @group_findings = ::Gapic::Config::Method.new group_findings_config - list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths - @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config - list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports - @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs - @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config - list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs - @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config - list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs - @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config - list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources - @list_sources = ::Gapic::Config::Method.new list_sources_config - list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources - @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config - set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state - @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute - @set_mute = ::Gapic::Config::Method.new set_mute_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export - @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config - update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system - @update_external_system = ::Gapic::Config::Method.new update_external_system_config - update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding - @update_finding = ::Gapic::Config::Method.new update_finding_config - update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config - @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config - update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config - @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config - update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config - @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config - update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks - @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config - update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source - @update_source = ::Gapic::Config::Method.new update_source_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb deleted file mode 100644 index a53a263683eb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module SecurityCenter - module V2 - module SecurityCenter - # Credentials for the SecurityCenter API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SECURITY_CENTER_CREDENTIALS", - "SECURITY_CENTER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SECURITY_CENTER_CREDENTIALS_JSON", - "SECURITY_CENTER_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb deleted file mode 100644 index 2b55ca838dc8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module SecurityCenter - module V2 - module SecurityCenter - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the SecurityCenter Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb deleted file mode 100644 index 680b1675791d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb +++ /dev/null @@ -1,1068 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - module SecurityCenter - # Path helper methods for the SecurityCenter API. - module Paths - ## - # Create a fully-qualified BigQueryExport resource string. - # - # @overload big_query_export_path(organization:, location:, export:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/bigQueryExports/{export}` - # - # @param organization [String] - # @param location [String] - # @param export [String] - # - # @overload big_query_export_path(folder:, location:, export:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/bigQueryExports/{export}` - # - # @param folder [String] - # @param location [String] - # @param export [String] - # - # @overload big_query_export_path(project:, location:, export:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/bigQueryExports/{export}` - # - # @param project [String] - # @param location [String] - # @param export [String] - # - # @return [::String] - def big_query_export_path **args - resources = { - "export:location:organization" => (proc do |organization:, location:, export:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/bigQueryExports/#{export}" - end), - "export:folder:location" => (proc do |folder:, location:, export:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/bigQueryExports/#{export}" - end), - "export:location:project" => (proc do |project:, location:, export:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/bigQueryExports/#{export}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified DlpJob resource string. - # - # @overload dlp_job_path(project:, dlp_job:) - # The resource will be in the following format: - # - # `projects/{project}/dlpJobs/{dlp_job}` - # - # @param project [String] - # @param dlp_job [String] - # - # @overload dlp_job_path(project:, location:, dlp_job:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dlpJobs/{dlp_job}` - # - # @param project [String] - # @param location [String] - # @param dlp_job [String] - # - # @return [::String] - def dlp_job_path **args - resources = { - "dlp_job:project" => (proc do |project:, dlp_job:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/dlpJobs/#{dlp_job}" - end), - "dlp_job:location:project" => (proc do |project:, location:, dlp_job:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dlpJobs/#{dlp_job}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified ExternalSystem resource string. - # - # @overload external_system_path(organization:, source:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param organization [String] - # @param source [String] - # @param finding [String] - # @param externalsystem [String] - # - # @overload external_system_path(organization:, source:, location:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param organization [String] - # @param source [String] - # @param location [String] - # @param finding [String] - # @param externalsystem [String] - # - # @overload external_system_path(folder:, source:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param folder [String] - # @param source [String] - # @param finding [String] - # @param externalsystem [String] - # - # @overload external_system_path(folder:, source:, location:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param folder [String] - # @param source [String] - # @param location [String] - # @param finding [String] - # @param externalsystem [String] - # - # @overload external_system_path(project:, source:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param project [String] - # @param source [String] - # @param finding [String] - # @param externalsystem [String] - # - # @overload external_system_path(project:, source:, location:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param project [String] - # @param source [String] - # @param location [String] - # @param finding [String] - # @param externalsystem [String] - # - # @return [::String] - def external_system_path **args - resources = { - "externalsystem:finding:organization:source" => (proc do |organization:, source:, finding:, externalsystem:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" - end), - "externalsystem:finding:location:organization:source" => (proc do |organization:, source:, location:, finding:, externalsystem:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}" - end), - "externalsystem:finding:folder:source" => (proc do |folder:, source:, finding:, externalsystem:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" - end), - "externalsystem:finding:folder:location:source" => (proc do |folder:, source:, location:, finding:, externalsystem:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}" - end), - "externalsystem:finding:project:source" => (proc do |project:, source:, finding:, externalsystem:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "projects/#{project}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}" - end), - "externalsystem:finding:location:project:source" => (proc do |project:, source:, location:, finding:, externalsystem:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Finding resource string. - # - # @overload finding_path(organization:, source:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/findings/{finding}` - # - # @param organization [String] - # @param source [String] - # @param finding [String] - # - # @overload finding_path(organization:, source:, location:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}` - # - # @param organization [String] - # @param source [String] - # @param location [String] - # @param finding [String] - # - # @overload finding_path(folder:, source:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/findings/{finding}` - # - # @param folder [String] - # @param source [String] - # @param finding [String] - # - # @overload finding_path(folder:, source:, location:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}` - # - # @param folder [String] - # @param source [String] - # @param location [String] - # @param finding [String] - # - # @overload finding_path(project:, source:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/findings/{finding}` - # - # @param project [String] - # @param source [String] - # @param finding [String] - # - # @overload finding_path(project:, source:, location:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}` - # - # @param project [String] - # @param source [String] - # @param location [String] - # @param finding [String] - # - # @return [::String] - def finding_path **args - resources = { - "finding:organization:source" => (proc do |organization:, source:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/findings/#{finding}" - end), - "finding:location:organization:source" => (proc do |organization:, source:, location:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}" - end), - "finding:folder:source" => (proc do |folder:, source:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/findings/#{finding}" - end), - "finding:folder:location:source" => (proc do |folder:, source:, location:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}" - end), - "finding:project:source" => (proc do |project:, source:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "projects/#{project}/sources/#{source}/findings/#{finding}" - end), - "finding:location:project:source" => (proc do |project:, source:, location:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Folder resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}` - # - # @param folder [String] - # - # @return [::String] - def folder_path folder: - "folders/#{folder}" - end - - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified MuteConfig resource string. - # - # @overload mute_config_path(organization:, mute_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/muteConfigs/{mute_config}` - # - # @param organization [String] - # @param mute_config [String] - # - # @overload mute_config_path(organization:, location:, mute_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/muteConfigs/{mute_config}` - # - # @param organization [String] - # @param location [String] - # @param mute_config [String] - # - # @overload mute_config_path(folder:, mute_config:) - # The resource will be in the following format: - # - # `folders/{folder}/muteConfigs/{mute_config}` - # - # @param folder [String] - # @param mute_config [String] - # - # @overload mute_config_path(folder:, location:, mute_config:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` - # - # @param folder [String] - # @param location [String] - # @param mute_config [String] - # - # @overload mute_config_path(project:, mute_config:) - # The resource will be in the following format: - # - # `projects/{project}/muteConfigs/{mute_config}` - # - # @param project [String] - # @param mute_config [String] - # - # @overload mute_config_path(project:, location:, mute_config:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/muteConfigs/{mute_config}` - # - # @param project [String] - # @param location [String] - # @param mute_config [String] - # - # @return [::String] - def mute_config_path **args - resources = { - "mute_config:organization" => (proc do |organization:, mute_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/muteConfigs/#{mute_config}" - end), - "location:mute_config:organization" => (proc do |organization:, location:, mute_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/muteConfigs/#{mute_config}" - end), - "folder:mute_config" => (proc do |folder:, mute_config:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/muteConfigs/#{mute_config}" - end), - "folder:location:mute_config" => (proc do |folder:, location:, mute_config:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/muteConfigs/#{mute_config}" - end), - "mute_config:project" => (proc do |project:, mute_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/muteConfigs/#{mute_config}" - end), - "location:mute_config:project" => (proc do |project:, location:, mute_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/muteConfigs/#{mute_config}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified NotificationConfig resource string. - # - # @overload notification_config_path(organization:, location:, notification_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}` - # - # @param organization [String] - # @param location [String] - # @param notification_config [String] - # - # @overload notification_config_path(folder:, location:, notification_config:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/notificationConfigs/{notification_config}` - # - # @param folder [String] - # @param location [String] - # @param notification_config [String] - # - # @overload notification_config_path(project:, location:, notification_config:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/notificationConfigs/{notification_config}` - # - # @param project [String] - # @param location [String] - # @param notification_config [String] - # - # @return [::String] - def notification_config_path **args - resources = { - "location:notification_config:organization" => (proc do |organization:, location:, notification_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/notificationConfigs/#{notification_config}" - end), - "folder:location:notification_config" => (proc do |folder:, location:, notification_config:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/notificationConfigs/#{notification_config}" - end), - "location:notification_config:project" => (proc do |project:, location:, notification_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/notificationConfigs/#{notification_config}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Organization resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}` - # - # @param organization [String] - # - # @return [::String] - def organization_path organization: - "organizations/#{organization}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationValuedResource resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}` - # - # @param organization [String] - # @param location [String] - # @param simulation [String] - # @param valued_resource [String] - # - # @return [::String] - def organization_valued_resource_path organization:, location:, simulation:, valued_resource: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/simulations/#{simulation}/valuedResources/#{valued_resource}" - end - - ## - # Create a fully-qualified Policy resource string. - # - # @overload policy_path(organization:, constraint_name:) - # The resource will be in the following format: - # - # `organizations/{organization}/policies/{constraint_name}` - # - # @param organization [String] - # @param constraint_name [String] - # - # @overload policy_path(folder:, constraint_name:) - # The resource will be in the following format: - # - # `folders/{folder}/policies/{constraint_name}` - # - # @param folder [String] - # @param constraint_name [String] - # - # @overload policy_path(project:, constraint_name:) - # The resource will be in the following format: - # - # `projects/{project}/policies/{constraint_name}` - # - # @param project [String] - # @param constraint_name [String] - # - # @return [::String] - def policy_path **args - resources = { - "constraint_name:organization" => (proc do |organization:, constraint_name:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/policies/#{constraint_name}" - end), - "constraint_name:folder" => (proc do |folder:, constraint_name:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/policies/#{constraint_name}" - end), - "constraint_name:project" => (proc do |project:, constraint_name:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/policies/#{constraint_name}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified ResourceValueConfig resource string. - # - # @overload resource_value_config_path(organization:, resource_value_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/resourceValueConfigs/{resource_value_config}` - # - # @param organization [String] - # @param resource_value_config [String] - # - # @overload resource_value_config_path(organization:, location:, resource_value_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/resourceValueConfigs/{resource_value_config}` - # - # @param organization [String] - # @param location [String] - # @param resource_value_config [String] - # - # @return [::String] - def resource_value_config_path **args - resources = { - "organization:resource_value_config" => (proc do |organization:, resource_value_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/resourceValueConfigs/#{resource_value_config}" - end), - "location:organization:resource_value_config" => (proc do |organization:, location:, resource_value_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/resourceValueConfigs/#{resource_value_config}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified SecurityMarks resource string. - # - # @overload security_marks_path(organization:, asset:) - # The resource will be in the following format: - # - # `organizations/{organization}/assets/{asset}/securityMarks` - # - # @param organization [String] - # @param asset [String] - # - # @overload security_marks_path(organization:, source:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/findings/{finding}/securityMarks` - # - # @param organization [String] - # @param source [String] - # @param finding [String] - # - # @overload security_marks_path(organization:, source:, location:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` - # - # @param organization [String] - # @param source [String] - # @param location [String] - # @param finding [String] - # - # @overload security_marks_path(folder:, asset:) - # The resource will be in the following format: - # - # `folders/{folder}/assets/{asset}/securityMarks` - # - # @param folder [String] - # @param asset [String] - # - # @overload security_marks_path(folder:, source:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/findings/{finding}/securityMarks` - # - # @param folder [String] - # @param source [String] - # @param finding [String] - # - # @overload security_marks_path(folder:, source:, location:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` - # - # @param folder [String] - # @param source [String] - # @param location [String] - # @param finding [String] - # - # @overload security_marks_path(project:, asset:) - # The resource will be in the following format: - # - # `projects/{project}/assets/{asset}/securityMarks` - # - # @param project [String] - # @param asset [String] - # - # @overload security_marks_path(project:, source:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/findings/{finding}/securityMarks` - # - # @param project [String] - # @param source [String] - # @param finding [String] - # - # @overload security_marks_path(project:, source:, location:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` - # - # @param project [String] - # @param source [String] - # @param location [String] - # @param finding [String] - # - # @return [::String] - def security_marks_path **args - resources = { - "asset:organization" => (proc do |organization:, asset:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/assets/#{asset}/securityMarks" - end), - "finding:organization:source" => (proc do |organization:, source:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/findings/#{finding}/securityMarks" - end), - "finding:location:organization:source" => (proc do |organization:, source:, location:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks" - end), - "asset:folder" => (proc do |folder:, asset:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/assets/#{asset}/securityMarks" - end), - "finding:folder:source" => (proc do |folder:, source:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/findings/#{finding}/securityMarks" - end), - "finding:folder:location:source" => (proc do |folder:, source:, location:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks" - end), - "asset:project" => (proc do |project:, asset:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/assets/#{asset}/securityMarks" - end), - "finding:project:source" => (proc do |project:, source:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - - "projects/#{project}/sources/#{source}/findings/#{finding}/securityMarks" - end), - "finding:location:project:source" => (proc do |project:, source:, location:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Simulation resource string. - # - # @overload simulation_path(organization:, simulation:) - # The resource will be in the following format: - # - # `organizations/{organization}/simulations/{simulation}` - # - # @param organization [String] - # @param simulation [String] - # - # @overload simulation_path(organization:, location:, simluation:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/simulations/{simluation}` - # - # @param organization [String] - # @param location [String] - # @param simluation [String] - # - # @return [::String] - def simulation_path **args - resources = { - "organization:simulation" => (proc do |organization:, simulation:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/simulations/#{simulation}" - end), - "location:organization:simluation" => (proc do |organization:, location:, simluation:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/simulations/#{simluation}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Source resource string. - # - # @overload source_path(organization:, source:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}` - # - # @param organization [String] - # @param source [String] - # - # @overload source_path(folder:, source:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}` - # - # @param folder [String] - # @param source [String] - # - # @overload source_path(project:, source:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}` - # - # @param project [String] - # @param source [String] - # - # @return [::String] - def source_path **args - resources = { - "organization:source" => (proc do |organization:, source:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}" - end), - "folder:source" => (proc do |folder:, source:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/sources/#{source}" - end), - "project:source" => (proc do |project:, source:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/sources/#{source}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified TableDataProfile resource string. - # - # @overload table_data_profile_path(project:, table_profile:) - # The resource will be in the following format: - # - # `projects/{project}/tableProfiles/{table_profile}` - # - # @param project [String] - # @param table_profile [String] - # - # @overload table_data_profile_path(project:, location:, table_profile:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/tableProfiles/{table_profile}` - # - # @param project [String] - # @param location [String] - # @param table_profile [String] - # - # @return [::String] - def table_data_profile_path **args - resources = { - "project:table_profile" => (proc do |project:, table_profile:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/tableProfiles/#{table_profile}" - end), - "location:project:table_profile" => (proc do |project:, location:, table_profile:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/tableProfiles/#{table_profile}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Topic resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/topics/{topic}` - # - # @param project [String] - # @param topic [String] - # - # @return [::String] - def topic_path project:, topic: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/topics/#{topic}" - end - - ## - # Create a fully-qualified ValuedResource resource string. - # - # @overload valued_resource_path(organization:, simulation:, valued_resource:) - # The resource will be in the following format: - # - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # - # @param organization [String] - # @param simulation [String] - # @param valued_resource [String] - # - # @overload valued_resource_path(organization:, location:, simluation:, valued_resource:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/simulations/{simluation}/valuedResources/{valued_resource}` - # - # @param organization [String] - # @param location [String] - # @param simluation [String] - # @param valued_resource [String] - # - # @return [::String] - def valued_resource_path **args - resources = { - "organization:simulation:valued_resource" => (proc do |organization:, simulation:, valued_resource:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" - - "organizations/#{organization}/simulations/#{simulation}/valuedResources/#{valued_resource}" - end), - "location:organization:simluation:valued_resource" => (proc do |organization:, location:, simluation:, valued_resource:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "simluation cannot contain /" if simluation.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/simulations/#{simluation}/valuedResources/#{valued_resource}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb deleted file mode 100644 index f11c34c53b84..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security_center/v2/version" - -require "google/cloud/security_center/v2/security_center/credentials" -require "google/cloud/security_center/v2/security_center/paths" -require "google/cloud/security_center/v2/security_center/rest/operations" -require "google/cloud/security_center/v2/security_center/rest/client" - -module Google - module Cloud - module SecurityCenter - module V2 - ## - # V2 APIs for Security Center service. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/security_center/v2/security_center/rest" - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - module SecurityCenter - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/security_center/v2/security_center/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb deleted file mode 100644 index 6109ce4de572..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb +++ /dev/null @@ -1,4395 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securitycenter/v2/securitycenter_service_pb" -require "google/cloud/security_center/v2/security_center/rest/service_stub" - -module Google - module Cloud - module SecurityCenter - module V2 - module SecurityCenter - module Rest - ## - # REST client for the SecurityCenter service. - # - # V2 APIs for Security Center service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :security_center_stub - - ## - # Configure the SecurityCenter Client class. - # - # See {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenter clients - # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecurityCenter", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @security_center_stub.universe_domain - end - - ## - # Create a new SecurityCenter REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecurityCenter client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @security_center_stub = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @security_center_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @security_center_stub.logger - end - - # Service calls - - ## - # Creates a ResourceValueConfig for an organization. Maps user's tags to - # difference resource values for use by the attack path simulation. - # - # @overload batch_create_resource_value_configs(request, options = nil) - # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_create_resource_value_configs(parent: nil, requests: nil) - # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # The parent field in the CreateResourceValueConfigRequest - # messages must either be empty or match this field. - # @param requests [::Array<::Google::Cloud::SecurityCenter::V2::CreateResourceValueConfigRequest, ::Hash>] - # Required. The resource value configs to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new - # - # # Call the batch_create_resource_value_configs method. - # result = client.batch_create_resource_value_configs request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse. - # p result - # - def batch_create_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.batch_create_resource_value_configs request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Kicks off an LRO to bulk mute findings for a parent based on a filter. If - # no location is specified, findings are muted in global. The parent - # can be either an organization, folder, or project. The findings matched by - # the filter will be muted after the LRO is done. - # - # @overload bulk_mute_findings(request, options = nil) - # Pass arguments to `bulk_mute_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload bulk_mute_findings(parent: nil, filter: nil, mute_state: nil) - # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, at which bulk action needs to be applied. If no - # location is specified, findings are updated in global. The following list - # shows some examples: - # - # + `organizations/[organization_id]` - # + `organizations/[organization_id]/locations/[location_id]` - # + `folders/[folder_id]` - # + `folders/[folder_id]/locations/[location_id]` - # + `projects/[project_id]` - # + `projects/[project_id]/locations/[location_id]` - # @param filter [::String] - # Expression that identifies findings that should be updated. - # The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @param mute_state [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest::MuteState] - # Optional. All findings matching the given filter will have their mute state - # set to this value. The default value is `MUTED`. Setting this to - # `UNDEFINED` will clear the mute state on all matching findings. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new - # - # # Call the bulk_mute_findings method. - # result = client.bulk_mute_findings request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def bulk_mute_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.bulk_mute_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_mute_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.bulk_mute_findings request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a BigQuery export. - # - # @overload create_big_query_export(request, options = nil) - # Pass arguments to `create_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil) - # Pass arguments to `create_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent resource of the new BigQuery export. Its - # format is `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param big_query_export [::Google::Cloud::SecurityCenter::V2::BigQueryExport, ::Hash] - # Required. The BigQuery export being created. - # @param big_query_export_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new - # - # # Call the create_big_query_export method. - # result = client.create_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. - # p result - # - def create_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a finding in a location. The corresponding source must exist for - # finding creation to succeed. - # - # @overload create_finding(request, options = nil) - # Pass arguments to `create_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::CreateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_finding(parent: nil, finding_id: nil, finding: nil) - # Pass arguments to `create_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new finding's parent. The following list - # shows some examples of the format: - # + - # `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # @param finding_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be alphanumeric and less than or equal to 32 characters and - # greater than 0 characters in length. - # @param finding [::Google::Cloud::SecurityCenter::V2::Finding, ::Hash] - # Required. The Finding being created. The name and security_marks will be - # ignored as they are both output only fields on this resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new - # - # # Call the create_finding method. - # result = client.create_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - # p result - # - def create_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_finding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_finding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a mute config. - # - # @overload create_mute_config(request, options = nil) - # Pass arguments to `create_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil) - # Pass arguments to `create_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new mute configs's parent. Its format is - # `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param mute_config [::Google::Cloud::SecurityCenter::V2::MuteConfig, ::Hash] - # Required. The mute config being created. - # @param mute_config_id [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new - # - # # Call the create_mute_config method. - # result = client.create_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - # p result - # - def create_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a notification config. - # - # @overload create_notification_config(request, options = nil) - # Pass arguments to `create_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil) - # Pass arguments to `create_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new notification config's parent. Its format - # is `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param config_id [::String] - # Required. - # Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters and contain alphanumeric - # characters, underscores, or hyphens only. - # @param notification_config [::Google::Cloud::SecurityCenter::V2::NotificationConfig, ::Hash] - # Required. The notification config being created. The name and the service - # account will be ignored as they are both output only fields on this - # resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new - # - # # Call the create_notification_config method. - # result = client.create_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - # p result - # - def create_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a source. - # - # @overload create_source(request, options = nil) - # Pass arguments to `create_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::CreateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_source(parent: nil, source: nil) - # Pass arguments to `create_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the new source's parent. Its format should be - # `organizations/[organization_id]`. - # @param source [::Google::Cloud::SecurityCenter::V2::Source, ::Hash] - # Required. The Source being created, only the display_name and description - # will be used. All other fields will be ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new - # - # # Call the create_source method. - # result = client.create_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - # p result - # - def create_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.create_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing BigQuery export. - # - # @overload delete_big_query_export(request, options = nil) - # Pass arguments to `delete_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_big_query_export(name: nil) - # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the BigQuery export to delete. The following list - # shows some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}/locations/{location}/bigQueryExports/{export_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new - # - # # Call the delete_big_query_export method. - # result = client.delete_big_query_export request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing mute config. If no location is specified, default is - # global. - # - # @overload delete_mute_config(request, options = nil) - # Pass arguments to `delete_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_mute_config(name: nil) - # Pass arguments to `delete_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to delete. The following list shows some - # examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new - # - # # Call the delete_mute_config method. - # result = client.delete_mute_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a notification config. - # - # @overload delete_notification_config(request, options = nil) - # Pass arguments to `delete_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_notification_config(name: nil) - # Pass arguments to `delete_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to delete. The following list - # shows some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new - # - # # Call the delete_notification_config method. - # result = client.delete_notification_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a ResourceValueConfig. - # - # @overload delete_resource_value_config(request, options = nil) - # Pass arguments to `delete_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_resource_value_config(name: nil) - # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the ResourceValueConfig to delete - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new - # - # # Call the delete_resource_value_config method. - # result = client.delete_resource_value_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.delete_resource_value_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a BigQuery export. - # - # @overload get_big_query_export(request, options = nil) - # Pass arguments to `get_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_big_query_export(name: nil) - # Pass arguments to `get_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the BigQuery export to retrieve. The following list shows - # some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new - # - # # Call the get_big_query_export method. - # result = client.get_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. - # p result - # - def get_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the simulation by name or the latest simulation for the given - # organization. - # - # @overload get_simulation(request, options = nil) - # Pass arguments to `get_simulation` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetSimulationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetSimulationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_simulation(name: nil) - # Pass arguments to `get_simulation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The organization name or simulation name of this simulation - # - # Valid format: - # `organizations/{organization}/simulations/latest` - # `organizations/{organization}/simulations/{simulation}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Simulation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Simulation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new - # - # # Call the get_simulation method. - # result = client.get_simulation request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Simulation. - # p result - # - def get_simulation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_simulation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_simulation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_simulation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_simulation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get the valued resource by name - # - # @overload get_valued_resource(request, options = nil) - # Pass arguments to `get_valued_resource` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_valued_resource(name: nil) - # Pass arguments to `get_valued_resource` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of this valued resource - # - # Valid format: - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ValuedResource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new - # - # # Call the get_valued_resource method. - # result = client.get_valued_resource request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::ValuedResource. - # p result - # - def get_valued_resource request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_valued_resource.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_valued_resource.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_valued_resource request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy on the specified Source. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a mute config. If no location is specified, default is - # global. - # - # @overload get_mute_config(request, options = nil) - # Pass arguments to `get_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_mute_config(name: nil) - # Pass arguments to `get_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the mute config to retrieve. The following list shows - # some examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new - # - # # Call the get_mute_config method. - # result = client.get_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - # p result - # - def get_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a notification config. - # - # @overload get_notification_config(request, options = nil) - # Pass arguments to `get_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_notification_config(name: nil) - # Pass arguments to `get_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the notification config to get. The following list shows - # some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new - # - # # Call the get_notification_config method. - # result = client.get_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - # p result - # - def get_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a ResourceValueConfig. - # - # @overload get_resource_value_config(request, options = nil) - # Pass arguments to `get_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_resource_value_config(name: nil) - # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource value config to retrieve. Its format is - # organizations/\\{organization}/resourceValueConfigs/\\{config_id}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new - # - # # Call the get_resource_value_config method. - # result = client.get_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. - # p result - # - def get_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_resource_value_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a source. - # - # @overload get_source(request, options = nil) - # Pass arguments to `get_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GetSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_source(name: nil) - # Pass arguments to `get_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Relative resource name of the source. Its format is - # `organizations/[organization_id]/source/[source_id]`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new - # - # # Call the get_source method. - # result = client.get_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - # p result - # - def get_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.get_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Filters an organization or source's findings and groups them by their - # specified properties in a location. If no location is specified, findings - # are assumed to be in global - # - # To group across all sources provide a `-` as the source id. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - # + `/v2/folders/{folder_id}/sources/-/findings` - # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` - # + `/v2/projects/{project_id}/sources/-/findings` - # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` - # - # @overload group_findings(request, options = nil) - # Pass arguments to `group_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload group_findings(parent: nil, filter: nil, group_by: nil, page_token: nil, page_size: nil) - # Pass arguments to `group_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source to groupBy. If no location is specified, - # finding is assumed to be in global. - # The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To groupBy across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/[location_id]` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-/locations/[location_id]` - # + `projects/{project_id}/sources/-` - # + `projects/{project_id}/sources/-/locations/[location_id]` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * security_marks.marks: `=`, `:` - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # @param group_by [::String] - # Required. Expression that defines what assets fields to use for grouping. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: "parent,resource_name". - # @param page_token [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new - # - # # Call the group_findings method. - # result = client.group_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::GroupResult. - # p item - # end - # - def group_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.group_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.group_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.group_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.group_findings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the attack paths for a set of simulation results or valued resources - # and filter. - # - # @overload list_attack_paths(request, options = nil) - # Pass arguments to `list_attack_paths` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_attack_paths` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list attack paths. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @param filter [::String] - # The filter expression that filters the attack path in the response. - # Supported fields: - # - # * `valued_resources` supports = - # @param page_token [::String] - # The value returned by the last `ListAttackPathsResponse`; indicates - # that this is a continuation of a prior `ListAttackPaths` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new - # - # # Call the list_attack_paths method. - # result = client.list_attack_paths request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::AttackPath. - # p item - # end - # - def list_attack_paths request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_attack_paths.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_attack_paths.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_attack_paths request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_attack_paths, "attack_paths", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists BigQuery exports. Note that when requesting BigQuery exports at a - # given level all exports under that level are also returned e.g. if - # requesting BigQuery exports under a folder, then all BigQuery exports - # immediately under the folder plus the ones created under the projects - # within the folder are returned. - # - # @overload list_big_query_exports(request, options = nil) - # Pass arguments to `list_big_query_exports` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of BigQuery exports. Its - # format is `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListBigQueryExports` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListBigQueryExports` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new - # - # # Call the list_big_query_exports method. - # result = client.list_big_query_exports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::BigQueryExport. - # p item - # end - # - def list_big_query_exports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_big_query_exports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_big_query_exports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_big_query_exports request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_big_query_exports, "big_query_exports", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists an organization or source's findings. - # - # To list across all sources for a given location provide a `-` as the source - # id. If no location is specified, finding are assumed to be in global. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, order_by: nil, field_mask: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the source the findings belong to. If no location is - # specified, the default is global. The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To list across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/{location_id}` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-locations/{location_id}` - # + `projects/{projects_id}/sources/-` - # + `projects/{projects_id}/sources/-/locations/{location_id}` - # @param filter [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * security_marks.marks: `=`, `:` - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.display_name: `=`, `:` - # @param order_by [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,parent". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,parent". Redundant space characters in the - # syntax are insignificant. "name desc,parent" and " - # name desc , parent " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # security_marks.marks - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @param page_token [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_findings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists mute configs. If no location is specified, default is - # global. - # - # @overload list_mute_configs(request, options = nil) - # Pass arguments to `list_mute_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_mute_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of mute configs. Its format - # is `organizations/[organization_id]", "folders/[folder_id]`, - # `projects/[project_id]`, - # `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, - # `projects/[project_id]/locations/[location_id]`. - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListMuteConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMuteConfigs` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new - # - # # Call the list_mute_configs method. - # result = client.list_mute_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::MuteConfig. - # p item - # end - # - def list_mute_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_mute_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_mute_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_mute_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_mute_configs, "mute_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists notification configs. - # - # @overload list_notification_configs(request, options = nil) - # Pass arguments to `list_notification_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_notification_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent in which to list the notification - # configurations. Its format is - # "organizations/[organization_id]/locations/[location_id]", - # "folders/[folder_id]/locations/[location_id]", or - # "projects/[project_id]/locations/[location_id]". - # @param page_token [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new - # - # # Call the list_notification_configs method. - # result = client.list_notification_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::NotificationConfig. - # p item - # end - # - def list_notification_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_notification_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_notification_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_notification_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all ResourceValueConfigs. - # - # @overload list_resource_value_configs(request, options = nil) - # Pass arguments to `list_resource_value_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns the collection of resource value configs. - # Its format is - # `organizations/[organization_id]` - # @param page_size [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListResourceValueConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListResourceValueConfigs` must match the call that provided the - # page token. - # - # page_size can be specified, and the new page_size will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new - # - # # Call the list_resource_value_configs method. - # result = client.list_resource_value_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig. - # p item - # end - # - def list_resource_value_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_resource_value_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_resource_value_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_resource_value_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, "resource_value_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all sources belonging to an organization. - # - # @overload list_sources(request, options = nil) - # Pass arguments to `list_sources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent of sources to list. Its format should - # be `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @param page_token [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new - # - # # Call the list_sources method. - # result = client.list_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::Source. - # p item - # end - # - def list_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the valued resources for a set of simulation results and filter. - # - # @overload list_valued_resources(request, options = nil) - # Pass arguments to `list_valued_resources` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil) - # Pass arguments to `list_valued_resources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list exposed resources. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # @param filter [::String] - # The filter expression that filters the valued resources in the response. - # Supported fields: - # - # * `resource_value` supports = - # * `resource_type` supports = - # @param page_token [::String] - # The value returned by the last `ListValuedResourcesResponse`; indicates - # that this is a continuation of a prior `ListValuedResources` call, and - # that the system should return the next page of data. - # @param page_size [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @param order_by [::String] - # Optional. The fields by which to order the valued resources response. - # - # Supported fields: - # - # * `exposed_score` - # - # * `resource_value` - # - # * `resource_type` - # - # Values should be a comma separated list of fields. For example: - # `exposed_score,resource_value`. - # - # The default sorting order is descending. To specify ascending or descending - # order for a field, append a " ASC" or a " DESC" suffix, respectively; for - # example: `exposed_score DESC`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new - # - # # Call the list_valued_resources method. - # result = client.list_valued_resources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ValuedResource. - # p item - # end - # - def list_valued_resources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_valued_resources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_valued_resources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.list_valued_resources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_valued_resources, "valued_resources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the state of a finding. If no location is specified, finding is - # assumed to be in global - # - # @overload set_finding_state(request, options = nil) - # Pass arguments to `set_finding_state` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_finding_state(name: nil, state: nil) - # Pass arguments to `set_finding_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @param state [::Google::Cloud::SecurityCenter::V2::Finding::State] - # Required. The desired State of the finding. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new - # - # # Call the set_finding_state method. - # result = client.set_finding_state request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - # p result - # - def set_finding_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_finding_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_finding_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.set_finding_state request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on the specified Source. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the mute state of a finding. If no location is specified, finding - # is assumed to be in global - # - # @overload set_mute(request, options = nil) - # Pass arguments to `set_mute` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::SetMuteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::SetMuteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_mute(name: nil, mute: nil) - # Pass arguments to `set_mute` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @param mute [::Google::Cloud::SecurityCenter::V2::Finding::Mute] - # Required. The desired state of the Mute. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new - # - # # Call the set_mute method. - # result = client.set_mute request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - # p result - # - def set_mute request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::SetMuteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_mute.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_mute.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_mute.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.set_mute request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has on the specified source. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a BigQuery export. - # - # @overload update_big_query_export(request, options = nil) - # Pass arguments to `update_big_query_export` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_big_query_export(big_query_export: nil, update_mask: nil) - # Pass arguments to `update_big_query_export` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param big_query_export [::Google::Cloud::SecurityCenter::V2::BigQueryExport, ::Hash] - # Required. The BigQuery export being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new - # - # # Call the update_big_query_export method. - # result = client.update_big_query_export request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. - # p result - # - def update_big_query_export request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_big_query_export.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_big_query_export.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_big_query_export request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates external system. This is for a given finding. If no location is - # specified, finding is assumed to be in global - # - # @overload update_external_system(request, options = nil) - # Pass arguments to `update_external_system` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_external_system(external_system: nil, update_mask: nil) - # Pass arguments to `update_external_system` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param external_system [::Google::Cloud::SecurityCenter::V2::ExternalSystem, ::Hash] - # Required. The external system resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the external system resource. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ExternalSystem] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new - # - # # Call the update_external_system method. - # result = client.update_external_system request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::ExternalSystem. - # p result - # - def update_external_system request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_external_system.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_external_system.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_external_system.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_external_system request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a finding. If no location is specified, finding is - # assumed to be in global. The corresponding source must exist for a finding - # creation to succeed. - # - # @overload update_finding(request, options = nil) - # Pass arguments to `update_finding` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_finding(finding: nil, update_mask: nil) - # Pass arguments to `update_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param finding [::Google::Cloud::SecurityCenter::V2::Finding, ::Hash] - # Required. The finding resource to update or create if it does not already - # exist. parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new - # - # # Call the update_finding method. - # result = client.update_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - # p result - # - def update_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_finding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_finding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a mute config. If no location is specified, default is - # global. - # - # @overload update_mute_config(request, options = nil) - # Pass arguments to `update_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_mute_config(mute_config: nil, update_mask: nil) - # Pass arguments to `update_mute_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param mute_config [::Google::Cloud::SecurityCenter::V2::MuteConfig, ::Hash] - # Required. The mute config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new - # - # # Call the update_mute_config method. - # result = client.update_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - # p result - # - def update_mute_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_mute_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_mute_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_mute_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - # - # @overload update_notification_config(request, options = nil) - # Pass arguments to `update_notification_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_notification_config(notification_config: nil, update_mask: nil) - # Pass arguments to `update_notification_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param notification_config [::Google::Cloud::SecurityCenter::V2::NotificationConfig, ::Hash] - # Required. The notification config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new - # - # # Call the update_notification_config method. - # result = client.update_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - # p result - # - def update_notification_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_notification_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_notification_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_notification_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing ResourceValueConfigs with new rules. - # - # @overload update_resource_value_config(request, options = nil) - # Pass arguments to `update_resource_value_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil) - # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource_value_config [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig, ::Hash] - # Required. The resource value config being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # To update nested fields, include the top level field in the mask - # For example, to update gcp_metadata.resource_type, include the - # "gcp_metadata" field mask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new - # - # # Call the update_resource_value_config method. - # result = client.update_resource_value_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. - # p result - # - def update_resource_value_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_resource_value_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_resource_value_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_resource_value_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates security marks. For Finding Security marks, if no location is - # specified, finding is assumed to be in global. Assets Security Marks can - # only be accessed through global endpoint. - # - # @overload update_security_marks(request, options = nil) - # Pass arguments to `update_security_marks` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_security_marks(security_marks: nil, update_mask: nil) - # Pass arguments to `update_security_marks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_marks [::Google::Cloud::SecurityCenter::V2::SecurityMarks, ::Hash] - # Required. The security marks resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new - # - # # Call the update_security_marks method. - # result = client.update_security_marks request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::SecurityMarks. - # p result - # - def update_security_marks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_security_marks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_security_marks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_security_marks request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a source. - # - # @overload update_source(request, options = nil) - # Pass arguments to `update_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_source(source: nil, update_mask: nil) - # Pass arguments to `update_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param source [::Google::Cloud::SecurityCenter::V2::Source, ::Hash] - # Required. The source resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new - # - # # Call the update_source method. - # result = client.update_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - # p result - # - def update_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_stub.update_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecurityCenter REST API. - # - # This class represents the configuration for SecurityCenter REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # batch_create_resource_value_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the SecurityCenter API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `batch_create_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_resource_value_configs - ## - # RPC-specific configuration for `bulk_mute_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_mute_findings - ## - # RPC-specific configuration for `create_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :create_big_query_export - ## - # RPC-specific configuration for `create_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_finding - ## - # RPC-specific configuration for `create_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_mute_config - ## - # RPC-specific configuration for `create_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_notification_config - ## - # RPC-specific configuration for `create_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_source - ## - # RPC-specific configuration for `delete_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_big_query_export - ## - # RPC-specific configuration for `delete_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_mute_config - ## - # RPC-specific configuration for `delete_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_notification_config - ## - # RPC-specific configuration for `delete_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_resource_value_config - ## - # RPC-specific configuration for `get_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :get_big_query_export - ## - # RPC-specific configuration for `get_simulation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_simulation - ## - # RPC-specific configuration for `get_valued_resource` - # @return [::Gapic::Config::Method] - # - attr_reader :get_valued_resource - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `get_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_mute_config - ## - # RPC-specific configuration for `get_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_notification_config - ## - # RPC-specific configuration for `get_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_resource_value_config - ## - # RPC-specific configuration for `get_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_source - ## - # RPC-specific configuration for `group_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :group_findings - ## - # RPC-specific configuration for `list_attack_paths` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attack_paths - ## - # RPC-specific configuration for `list_big_query_exports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_big_query_exports - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_mute_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_mute_configs - ## - # RPC-specific configuration for `list_notification_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_notification_configs - ## - # RPC-specific configuration for `list_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_value_configs - ## - # RPC-specific configuration for `list_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sources - ## - # RPC-specific configuration for `list_valued_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_valued_resources - ## - # RPC-specific configuration for `set_finding_state` - # @return [::Gapic::Config::Method] - # - attr_reader :set_finding_state - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `set_mute` - # @return [::Gapic::Config::Method] - # - attr_reader :set_mute - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `update_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :update_big_query_export - ## - # RPC-specific configuration for `update_external_system` - # @return [::Gapic::Config::Method] - # - attr_reader :update_external_system - ## - # RPC-specific configuration for `update_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_finding - ## - # RPC-specific configuration for `update_mute_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_mute_config - ## - # RPC-specific configuration for `update_notification_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_notification_config - ## - # RPC-specific configuration for `update_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_resource_value_config - ## - # RPC-specific configuration for `update_security_marks` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_marks - ## - # RPC-specific configuration for `update_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_source - - # @private - def initialize parent_rpcs = nil - batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs - @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config - bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings - @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config - create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export - @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config - create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding - @create_finding = ::Gapic::Config::Method.new create_finding_config - create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config - @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config - create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config - @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config - create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source - @create_source = ::Gapic::Config::Method.new create_source_config - delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export - @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config - delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config - @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config - delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config - @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config - delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config - @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config - get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export - @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config - get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation - @get_simulation = ::Gapic::Config::Method.new get_simulation_config - get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource - @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config - @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config - get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config - @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config - get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config - @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config - get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source - @get_source = ::Gapic::Config::Method.new get_source_config - group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings - @group_findings = ::Gapic::Config::Method.new group_findings_config - list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths - @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config - list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports - @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs - @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config - list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs - @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config - list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs - @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config - list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources - @list_sources = ::Gapic::Config::Method.new list_sources_config - list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources - @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config - set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state - @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute - @set_mute = ::Gapic::Config::Method.new set_mute_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export - @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config - update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system - @update_external_system = ::Gapic::Config::Method.new update_external_system_config - update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding - @update_finding = ::Gapic::Config::Method.new update_finding_config - update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config - @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config - update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config - @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config - update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config - @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config - update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks - @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config - update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source - @update_source = ::Gapic::Config::Method.new update_source_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb deleted file mode 100644 index 76b36a0a23ac..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb +++ /dev/null @@ -1,926 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module SecurityCenter - module V2 - module SecurityCenter - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the SecurityCenter Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenter Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycenter.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:cancel", - matches: [ - ["name", %r{^organizations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb deleted file mode 100644 index 49be184914d1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb +++ /dev/null @@ -1,3336 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/securitycenter/v2/securitycenter_service_pb" - -module Google - module Cloud - module SecurityCenter - module V2 - module SecurityCenter - module Rest - ## - # REST service stub for the SecurityCenter service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the batch_create_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] - # A result object deserialized from the server's reply - def batch_create_resource_value_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_resource_value_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_create_resource_value_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the bulk_mute_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def bulk_mute_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_mute_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "bulk_mute_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # A result object deserialized from the server's reply - def create_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateFindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # A result object deserialized from the server's reply - def create_finding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_finding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_finding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # A result object deserialized from the server's reply - def create_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # A result object deserialized from the server's reply - def create_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # A result object deserialized from the server's reply - def create_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_resource_value_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_resource_value_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_resource_value_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # A result object deserialized from the server's reply - def get_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_simulation REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSimulationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Simulation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Simulation] - # A result object deserialized from the server's reply - def get_simulation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_simulation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_simulation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::Simulation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_valued_resource REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ValuedResource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource] - # A result object deserialized from the server's reply - def get_valued_resource request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_valued_resource_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_valued_resource", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ValuedResource.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # A result object deserialized from the server's reply - def get_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # A result object deserialized from the server's reply - def get_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # A result object deserialized from the server's reply - def get_resource_value_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_resource_value_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_resource_value_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # A result object deserialized from the server's reply - def get_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the group_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse] - # A result object deserialized from the server's reply - def group_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_group_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "group_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_attack_paths REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse] - # A result object deserialized from the server's reply - def list_attack_paths request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_attack_paths_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_attack_paths", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_big_query_exports REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse] - # A result object deserialized from the server's reply - def list_big_query_exports request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_big_query_exports_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_big_query_exports", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ListFindingsResponse] - # A result object deserialized from the server's reply - def list_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_mute_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse] - # A result object deserialized from the server's reply - def list_mute_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_mute_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_mute_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_notification_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse] - # A result object deserialized from the server's reply - def list_notification_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_notification_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse] - # A result object deserialized from the server's reply - def list_resource_value_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_resource_value_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_resource_value_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_sources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ListSourcesResponse] - # A result object deserialized from the server's reply - def list_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ListSourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_valued_resources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse] - # A result object deserialized from the server's reply - def list_valued_resources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_valued_resources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_valued_resources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_finding_state REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # A result object deserialized from the server's reply - def set_finding_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_finding_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_finding_state", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_mute REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetMuteRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # A result object deserialized from the server's reply - def set_mute request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_mute_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_mute", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # A result object deserialized from the server's reply - def update_big_query_export request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_big_query_export_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_big_query_export", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_external_system REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ExternalSystem] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] - # A result object deserialized from the server's reply - def update_external_system request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_external_system_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_external_system", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ExternalSystem.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # A result object deserialized from the server's reply - def update_finding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_finding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_finding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # A result object deserialized from the server's reply - def update_mute_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_mute_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_mute_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # A result object deserialized from the server's reply - def update_notification_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_notification_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # A result object deserialized from the server's reply - def update_resource_value_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_resource_value_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_resource_value_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_security_marks REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # A result object deserialized from the server's reply - def update_security_marks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_security_marks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_security_marks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::SecurityMarks.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # A result object deserialized from the server's reply - def update_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenter::V2::Source.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_create_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_create_resource_value_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/resourceValueConfigs:batchCreate", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/resourceValueConfigs:batchCreate", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_mute_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_mute_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateFindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_finding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings", - body: "finding", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings", - body: "finding", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::CreateSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/sources", - body: "source", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_resource_value_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_simulation REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSimulationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_simulation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_valued_resource REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_valued_resource_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_resource_value_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GetSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the group_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_group_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_attack_paths REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_attack_paths_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_big_query_exports REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_big_query_exports_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_mute_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_mute_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_notification_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_notification_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_resource_value_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/resourceValueConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/resourceValueConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/sources", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/sources", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/sources", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_valued_resources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_valued_resources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/valuedResources", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/valuedResources", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/valuedResources", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_finding_state REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_finding_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_mute REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::SetMuteRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_mute_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_big_query_export_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_external_system REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_external_system_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_finding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_mute_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_notification_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_resource_value_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{resource_value_config.name}", - body: "resource_value_config", - matches: [ - ["resource_value_config.name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{resource_value_config.name}", - body: "resource_value_config", - matches: [ - ["resource_value_config.name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_security_marks REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_security_marks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{source.name}", - body: "source", - matches: [ - ["source.name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb deleted file mode 100644 index 543e0946f0de..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb deleted file mode 100644 index 626f8a57d25d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/access.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/securitycenter/v2/access.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x89\x03\n\x06\x41\x63\x63\x65ss\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x11\n\tcaller_ip\x18\x02 \x01(\t\x12\x42\n\rcaller_ip_geo\x18\x03 \x01(\x0b\x32+.google.cloud.securitycenter.v2.Geolocation\x12\x19\n\x11user_agent_family\x18\x04 \x01(\t\x12\x12\n\nuser_agent\x18\x05 \x01(\t\x12\x14\n\x0cservice_name\x18\x06 \x01(\t\x12\x13\n\x0bmethod_name\x18\x07 \x01(\t\x12\x19\n\x11principal_subject\x18\x08 \x01(\t\x12 \n\x18service_account_key_name\x18\t \x01(\t\x12\x65\n\x1fservice_account_delegation_info\x18\n \x03(\x0b\x32<.google.cloud.securitycenter.v2.ServiceAccountDelegationInfo\x12\x11\n\tuser_name\x18\x0b \x01(\t\"R\n\x1cServiceAccountDelegationInfo\x12\x17\n\x0fprincipal_email\x18\x01 \x01(\t\x12\x19\n\x11principal_subject\x18\x02 \x01(\t\"\"\n\x0bGeolocation\x12\x13\n\x0bregion_code\x18\x01 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v2B\x0b\x41\x63\x63\x65ssProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Access = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Access").msgclass - ServiceAccountDelegationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ServiceAccountDelegationInfo").msgclass - Geolocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Geolocation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb deleted file mode 100644 index b2ded5cca4eb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/affected_resources.proto - -require 'google/protobuf' - - -descriptor_data = "\n7google/cloud/securitycenter/v2/affected_resources.proto\x12\x1egoogle.cloud.securitycenter.v2\"\"\n\x11\x41\x66\x66\x65\x63tedResources\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x42\xf0\x01\n\"com.google.cloud.securitycenter.v2B\x16\x41\x66\x66\x65\x63tedResourcesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - AffectedResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AffectedResources").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb deleted file mode 100644 index 01a07022c2fe..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/agent_anomaly.proto - -require 'google/protobuf' - - -descriptor_data = "\n2google/cloud/securitycenter/v2/agent_anomaly.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xcc\x01\n\x0c\x41gentAnomaly\x12\x18\n\x10\x63onfidence_score\x18\x01 \x01(\x01\x12N\n\x13\x64\x65tector_references\x18\x02 \x03(\x0b\x32\x31.google.cloud.securitycenter.v2.DetectorReference\x12R\n\x15invocation_references\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.InvocationReference\"\x8c\x02\n\x11\x44\x65tectorReference\x12L\n\x08severity\x18\x01 \x01(\x0e\x32:.google.cloud.securitycenter.v2.DetectorReference.Severity\x12\x13\n\x0b\x64\x65tector_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x65xplanation\x18\x04 \x01(\t\x12\x16\n\x0erecommendation\x18\x05 \x01(\t\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\",\n\x13InvocationReference\x12\x15\n\rinvocation_id\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v2B\x11\x41gentAnomalyProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - AgentAnomaly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AgentAnomaly").msgclass - DetectorReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DetectorReference").msgclass - DetectorReference::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DetectorReference.Severity").enummodule - InvocationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.InvocationReference").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb deleted file mode 100644 index 109bb02aa5a0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/agent.proto - -require 'google/protobuf' - - -descriptor_data = "\n*google/cloud/securitycenter/v2/agent.proto\x12\x1egoogle.cloud.securitycenter.v2\")\n\x05\x41gent\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\tB\xe4\x01\n\"com.google.cloud.securitycenter.v2B\nAgentProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Agent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Agent").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb deleted file mode 100644 index d708ada7a87f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/agent_session.proto - -require 'google/protobuf' - - -descriptor_data = "\n2google/cloud/securitycenter/v2/agent_session.proto\x12\x1egoogle.cloud.securitycenter.v2\"\"\n\x0c\x41gentSession\x12\x12\n\nsession_id\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v2B\x11\x41gentSessionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - AgentSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AgentSession").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb deleted file mode 100644 index e0d357ddd795..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/ai_model.proto - -require 'google/protobuf' - - -descriptor_data = "\n-google/cloud/securitycenter/v2/ai_model.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xbe\x02\n\x07\x41iModel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x64omain\x18\x02 \x01(\t\x12\x0f\n\x07library\x18\x03 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x11\n\tpublisher\x18\x05 \x01(\t\x12W\n\x13\x64\x65ployment_platform\x18\x06 \x01(\x0e\x32:.google.cloud.securitycenter.v2.AiModel.DeploymentPlatform\x12\x14\n\x0c\x64isplay_name\x18\x07 \x01(\t\"p\n\x12\x44\x65ploymentPlatform\x12#\n\x1f\x44\x45PLOYMENT_PLATFORM_UNSPECIFIED\x10\x00\x12\r\n\tVERTEX_AI\x10\x01\x12\x07\n\x03GKE\x10\x02\x12\x07\n\x03GCE\x10\x03\x12\x14\n\x10\x46INE_TUNED_MODEL\x10\x04\x42\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x41iModelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - AiModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AiModel").msgclass - AiModel::DeploymentPlatform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AiModel.DeploymentPlatform").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb deleted file mode 100644 index 3adcac6a59b9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/application.proto - -require 'google/protobuf' - - -descriptor_data = "\n0google/cloud/securitycenter/v2/application.proto\x12\x1egoogle.cloud.securitycenter.v2\"1\n\x0b\x41pplication\x12\x10\n\x08\x62\x61se_uri\x18\x01 \x01(\t\x12\x10\n\x08\x66ull_uri\x18\x02 \x01(\tB\xea\x01\n\"com.google.cloud.securitycenter.v2B\x10\x41pplicationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Application = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Application").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb deleted file mode 100644 index 2455e60ba1f7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/attack_exposure.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v2/attack_exposure.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x03\n\x0e\x41ttackExposure\x12\r\n\x05score\x18\x01 \x01(\x01\x12;\n\x17latest_calculation_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1e\n\x16\x61ttack_exposure_result\x18\x03 \x01(\t\x12H\n\x05state\x18\x04 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.AttackExposure.StateB\x03\xe0\x41\x03\x12*\n\"exposed_high_value_resources_count\x18\x05 \x01(\x05\x12,\n$exposed_medium_value_resources_count\x18\x06 \x01(\x05\x12)\n!exposed_low_value_resources_count\x18\x07 \x01(\x05\"B\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nCALCULATED\x10\x01\x12\x12\n\x0eNOT_CALCULATED\x10\x02\x42\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x41ttackExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - AttackExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackExposure").msgclass - AttackExposure::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackExposure.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb deleted file mode 100644 index 29d28dc5bf3c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/attack_path.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n0google/cloud/securitycenter/v2/attack_path.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xf0\n\n\nAttackPath\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\npath_nodes\x18\x02 \x03(\x0b\x32\x39.google.cloud.securitycenter.v2.AttackPath.AttackPathNode\x12H\n\x05\x65\x64ges\x18\x03 \x03(\x0b\x32\x39.google.cloud.securitycenter.v2.AttackPath.AttackPathEdge\x1a\xbd\x06\n\x0e\x41ttackPathNode\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12p\n\x13\x61ssociated_findings\x18\x04 \x03(\x0b\x32S.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding\x12\x0c\n\x04uuid\x18\x05 \x01(\t\x12^\n\x0c\x61ttack_steps\x18\x06 \x03(\x0b\x32H.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode\x1a^\n\x19PathNodeAssociatedFinding\x12\x19\n\x11\x63\x61nonical_finding\x18\x01 \x01(\t\x12\x18\n\x10\x66inding_category\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x1a\xb0\x02\n\x0e\x41ttackStepNode\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12P\n\x04type\x18\x02 \x01(\x0e\x32\x42.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x64\n\x06labels\x18\x04 \x03(\x0b\x32T.google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"y\n\x08NodeType\x12\x19\n\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rNODE_TYPE_AND\x10\x01\x12\x10\n\x0cNODE_TYPE_OR\x10\x02\x12\x15\n\x11NODE_TYPE_DEFENSE\x10\x03\x12\x16\n\x12NODE_TYPE_ATTACKER\x10\x04\x1a\x35\n\x0e\x41ttackPathEdge\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65stination\x18\x02 \x01(\t:\xc3\x02\xea\x41\xbf\x02\n(securitycenter.googleapis.com/AttackPath\x12qorganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}\x12\x86\x01organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}*\x0b\x61ttackPaths2\nattackPathB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x41ttackPathProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - AttackPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath").msgclass - AttackPath::AttackPathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode").msgclass - AttackPath::AttackPathNode::PathNodeAssociatedFinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding").msgclass - AttackPath::AttackPathNode::AttackStepNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode").msgclass - AttackPath::AttackPathNode::NodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType").enummodule - AttackPath::AttackPathEdge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathEdge").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb deleted file mode 100644 index 1d0185074970..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/backup_disaster_recovery.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x86\x02\n\x16\x42\x61\x63kupDisasterRecovery\x12\x17\n\x0f\x62\x61\x63kup_template\x18\x01 \x01(\t\x12\x10\n\x08policies\x18\x02 \x03(\t\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x14\n\x0c\x61pplications\x18\x04 \x03(\t\x12\x14\n\x0cstorage_pool\x18\x05 \x01(\t\x12\x16\n\x0epolicy_options\x18\x06 \x03(\t\x12\x0f\n\x07profile\x18\x07 \x01(\t\x12\x11\n\tappliance\x18\x08 \x01(\t\x12\x13\n\x0b\x62\x61\x63kup_type\x18\t \x01(\t\x12\x36\n\x12\x62\x61\x63kup_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xf5\x01\n\"com.google.cloud.securitycenter.v2B\x1b\x42\x61\x63kupDisasterRecoveryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - BackupDisasterRecovery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BackupDisasterRecovery").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb deleted file mode 100644 index c0ea27ff0b00..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/bigquery_export.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v2/bigquery_export.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa2\x04\n\x0e\x42igQueryExport\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x04 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tprincipal\x18\x08 \x01(\tB\x03\xe0\x41\x03:\xa1\x02\xea\x41\x9d\x02\n,securitycenter.googleapis.com/BigQueryExport\x12Jorganizations/{organization}/locations/{location}/bigQueryExports/{export}\x12>folders/{folder}/locations/{location}/bigQueryExports/{export}\x12@projects/{project}/locations/{location}/bigQueryExports/{export}*\x0f\x62igQueryExports2\x0e\x62igQueryExportB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x42igQueryExportProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BigQueryExport").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb deleted file mode 100644 index 077e14997c90..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/chokepoint.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/chokepoint.proto\x12\x1egoogle.cloud.securitycenter.v2\"&\n\nChokepoint\x12\x18\n\x10related_findings\x18\x01 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43hokepointProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Chokepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Chokepoint").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb deleted file mode 100644 index 6cd7e16d09a3..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/cloud_armor.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n0google/cloud/securitycenter/v2/cloud_armor.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1egoogle/protobuf/duration.proto\"\xde\x02\n\nCloudArmor\x12G\n\x0fsecurity_policy\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.SecurityPolicy\x12:\n\x08requests\x18\x02 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Requests\x12O\n\x13\x61\x64\x61ptive_protection\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.AdaptiveProtection\x12\x36\n\x06\x61ttack\x18\x04 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Attack\x12\x15\n\rthreat_vector\x18\x05 \x01(\t\x12+\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\"=\n\x0eSecurityPolicy\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x07preview\x18\x03 \x01(\x08\"j\n\x08Requests\x12\r\n\x05ratio\x18\x01 \x01(\x01\x12\x1a\n\x12short_term_allowed\x18\x02 \x01(\x05\x12\x19\n\x11long_term_allowed\x18\x03 \x01(\x05\x12\x18\n\x10long_term_denied\x18\x04 \x01(\x05\"(\n\x12\x41\x64\x61ptiveProtection\x12\x12\n\nconfidence\x18\x01 \x01(\x01\"\x82\x01\n\x06\x41ttack\x12\x17\n\x0fvolume_pps_long\x18\x04 \x01(\x03\x12\x17\n\x0fvolume_bps_long\x18\x05 \x01(\x03\x12\x16\n\x0e\x63lassification\x18\x03 \x01(\t\x12\x16\n\nvolume_pps\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x16\n\nvolume_bps\x18\x02 \x01(\x05\x42\x02\x18\x01\x42\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43loudArmorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - CloudArmor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudArmor").msgclass - SecurityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPolicy").msgclass - Requests = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Requests").msgclass - AdaptiveProtection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AdaptiveProtection").msgclass - Attack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Attack").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb deleted file mode 100644 index 388023feb3f9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xf4\x01\n\x13\x43loudDlpDataProfile\x12>\n\x0c\x64\x61ta_profile\x18\x01 \x01(\tB(\xfa\x41%\n#dlp.googleapis.com/TableDataProfile\x12S\n\x0bparent_type\x18\x02 \x01(\x0e\x32>.google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType\"H\n\nParentType\x12\x1b\n\x17PARENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cORGANIZATION\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\x42\x94\x03\n\"com.google.cloud.securitycenter.v2B\x18\x43loudDlpDataProfileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41\x9e\x01\n#dlp.googleapis.com/TableDataProfile\x12\x30projects/{project}/tableProfiles/{table_profile}\x12\x45projects/{project}/locations/{location}/tableProfiles/{table_profile}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - CloudDlpDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpDataProfile").msgclass - CloudDlpDataProfile::ParentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb deleted file mode 100644 index 98b7cb9b4a86..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/cloud_dlp_inspection.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n9google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\x88\x01\n\x12\x43loudDlpInspection\x12\x33\n\x0binspect_job\x18\x01 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x64lp.googleapis.com/DlpJob\x12\x11\n\tinfo_type\x18\x02 \x01(\t\x12\x17\n\x0finfo_type_count\x18\x03 \x01(\x03\x12\x11\n\tfull_scan\x18\x04 \x01(\x08\x42\xf0\x02\n\"com.google.cloud.securitycenter.v2B\x17\x43loudDlpInspectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41|\n\x19\x64lp.googleapis.com/DlpJob\x12$projects/{project}/dlpJobs/{dlp_job}\x12\x39projects/{project}/locations/{location}/dlpJobs/{dlp_job}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - CloudDlpInspection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpInspection").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb deleted file mode 100644 index 547a8fe23d36..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/compliance.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/compliance.proto\x12\x1egoogle.cloud.securitycenter.v2\"<\n\nCompliance\x12\x10\n\x08standard\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x0b\n\x03ids\x18\x03 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43omplianceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Compliance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Compliance").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb deleted file mode 100644 index b0144d4d939a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/connection.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/connection.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x81\x02\n\nConnection\x12\x16\n\x0e\x64\x65stination_ip\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65stination_port\x18\x02 \x01(\x05\x12\x11\n\tsource_ip\x18\x03 \x01(\t\x12\x13\n\x0bsource_port\x18\x04 \x01(\x05\x12\x45\n\x08protocol\x18\x05 \x01(\x0e\x32\x33.google.cloud.securitycenter.v2.Connection.Protocol\"R\n\x08Protocol\x12\x18\n\x14PROTOCOL_UNSPECIFIED\x10\x00\x12\x08\n\x04ICMP\x10\x01\x12\x07\n\x03TCP\x10\x06\x12\x07\n\x03UDP\x10\x11\x12\x07\n\x03GRE\x10/\x12\x07\n\x03\x45SP\x10\x32\x42\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43onnectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Connection").msgclass - Connection::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Connection.Protocol").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb deleted file mode 100644 index 06a5286cc3de..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/contact_details.proto - -require 'google/protobuf' - - -descriptor_data = "\n4google/cloud/securitycenter/v2/contact_details.proto\x12\x1egoogle.cloud.securitycenter.v2\"K\n\x0e\x43ontactDetails\x12\x39\n\x08\x63ontacts\x18\x01 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Contact\"\x18\n\x07\x43ontact\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x43ontactDetailsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - ContactDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ContactDetails").msgclass - Contact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Contact").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb deleted file mode 100644 index 14bc2a2bab9f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/container.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v2/label_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/securitycenter/v2/container.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a*google/cloud/securitycenter/v2/label.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa0\x01\n\tContainer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x10\n\x08image_id\x18\x03 \x01(\t\x12\x35\n\x06labels\x18\x04 \x03(\x0b\x32%.google.cloud.securitycenter.v2.Label\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe8\x01\n\"com.google.cloud.securitycenter.v2B\x0e\x43ontainerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Container").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb deleted file mode 100644 index 77d3859aa987..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/data_access_event.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n6google/cloud/securitycenter/v2/data_access_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x0f\x44\x61taAccessEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\t\x12\x17\n\x0fprincipal_email\x18\x02 \x01(\t\x12L\n\toperation\x18\x03 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.DataAccessEvent.Operation\x12.\n\nevent_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"D\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x08\n\x04MOVE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\x42\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14\x44\x61taAccessEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - DataAccessEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataAccessEvent").msgclass - DataAccessEvent::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataAccessEvent.Operation").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb deleted file mode 100644 index 418d09d93c4a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/data_flow_event.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v2/data_flow_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x97\x02\n\rDataFlowEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\t\x12\x17\n\x0fprincipal_email\x18\x02 \x01(\t\x12J\n\toperation\x18\x03 \x01(\x0e\x32\x37.google.cloud.securitycenter.v2.DataFlowEvent.Operation\x12\x19\n\x11violated_location\x18\x04 \x01(\t\x12.\n\nevent_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"D\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x08\n\x04MOVE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\x42\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12\x44\x61taFlowEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - DataFlowEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataFlowEvent").msgclass - DataFlowEvent::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataFlowEvent.Operation").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb deleted file mode 100644 index 17693433fba7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/data_retention_deletion_event.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nBgoogle/cloud/securitycenter/v2/data_retention_deletion_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x02\n\x1a\x44\x61taRetentionDeletionEvent\x12\x38\n\x14\x65vent_detection_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x64\x61ta_object_count\x18\x03 \x01(\x03\x12\x38\n\x15max_retention_allowed\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12X\n\nevent_type\x18\x05 \x01(\x0e\x32\x44.google.cloud.securitycenter.v2.DataRetentionDeletionEvent.EventType\"H\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x45VENT_TYPE_MAX_TTL_EXCEEDED\x10\x01\x42\xf9\x01\n\"com.google.cloud.securitycenter.v2B\x1f\x44\x61taRetentionDeletionEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - DataRetentionDeletionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataRetentionDeletionEvent").msgclass - DataRetentionDeletionEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataRetentionDeletionEvent.EventType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb deleted file mode 100644 index 32310070d4bc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/database.proto - -require 'google/protobuf' - - -descriptor_data = "\n-google/cloud/securitycenter/v2/database.proto\x12\x1egoogle.cloud.securitycenter.v2\"s\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x11\n\tuser_name\x18\x03 \x01(\t\x12\r\n\x05query\x18\x04 \x01(\t\x12\x10\n\x08grantees\x18\x05 \x03(\t\x12\x0f\n\x07version\x18\x06 \x01(\tB\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rDatabaseProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Database").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb deleted file mode 100644 index a62acf2da0c4..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/disk.proto - -require 'google/protobuf' - - -descriptor_data = "\n)google/cloud/securitycenter/v2/disk.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x14\n\x04\x44isk\x12\x0c\n\x04name\x18\x01 \x01(\tB\xe3\x01\n\"com.google.cloud.securitycenter.v2B\tDiskProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Disk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Disk").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb deleted file mode 100644 index 4e217d9041f6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/exfiltration.proto - -require 'google/protobuf' - - -descriptor_data = "\n1google/cloud/securitycenter/v2/exfiltration.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xaf\x01\n\x0c\x45xfiltration\x12>\n\x07sources\x18\x01 \x03(\x0b\x32-.google.cloud.securitycenter.v2.ExfilResource\x12>\n\x07targets\x18\x02 \x03(\x0b\x32-.google.cloud.securitycenter.v2.ExfilResource\x12\x1f\n\x17total_exfiltrated_bytes\x18\x03 \x01(\x03\"1\n\rExfilResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ncomponents\x18\x02 \x03(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v2B\x11\x45xfiltrationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Exfiltration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Exfiltration").msgclass - ExfilResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExfilResource").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb deleted file mode 100644 index 684f53455eeb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/external_system.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v2/external_system.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\t\n\x0e\x45xternalSystem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tassignees\x18\x02 \x03(\t\x12\x14\n\x0c\x65xternal_uid\x18\x03 \x01(\t\x12\x0e\n\x06status\x18\x04 \x01(\t\x12?\n\x1b\x65xternal_system_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x63\x61se_uri\x18\x06 \x01(\t\x12\x15\n\rcase_priority\x18\x07 \x01(\t\x12,\n\x08\x63\x61se_sla\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10\x63\x61se_create_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63\x61se_close_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\x0bticket_info\x18\x08 \x01(\x0b\x32\x39.google.cloud.securitycenter.v2.ExternalSystem.TicketInfo\x1a\x8d\x01\n\nTicketInfo\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61ssignee\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0b\n\x03uri\x18\x04 \x01(\t\x12\x0e\n\x06status\x18\x05 \x01(\t\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\x97\x05\xea\x41\x93\x05\n,securitycenter.googleapis.com/ExternalSystem\x12\x61organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12vorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}\x12Ufolders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12jfolders/{folder}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}\x12Wprojects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12lprojects/{project}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}B\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x45xternalSystemProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - ExternalSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExternalSystem").msgclass - ExternalSystem::TicketInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExternalSystem.TicketInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb deleted file mode 100644 index 3004389fa02c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/file.proto - -require 'google/protobuf' - - -descriptor_data = "\n)google/cloud/securitycenter/v2/file.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x83\x04\n\x04\x46ile\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\x03\x12\x0e\n\x06sha256\x18\x03 \x01(\t\x12\x13\n\x0bhashed_size\x18\x04 \x01(\x03\x12\x18\n\x10partially_hashed\x18\x05 \x01(\x08\x12\x10\n\x08\x63ontents\x18\x06 \x01(\t\x12@\n\tdisk_path\x18\x07 \x01(\x0b\x32-.google.cloud.securitycenter.v2.File.DiskPath\x12\x46\n\noperations\x18\x08 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.File.FileOperation\x1a\x39\n\x08\x44iskPath\x12\x16\n\x0epartition_uuid\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\t\x1a\xc8\x01\n\rFileOperation\x12N\n\x04type\x18\x01 \x01(\x0e\x32@.google.cloud.securitycenter.v2.File.FileOperation.OperationType\"g\n\rOperationType\x12\x1e\n\x1aOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04OPEN\x10\x01\x12\x08\n\x04READ\x10\x02\x12\n\n\x06RENAME\x10\x03\x12\t\n\x05WRITE\x10\x04\x12\x0b\n\x07\x45XECUTE\x10\x05\x42\xe3\x01\n\"com.google.cloud.securitycenter.v2B\tFileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File").msgclass - File::DiskPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.DiskPath").msgclass - File::FileOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.FileOperation").msgclass - File::FileOperation::OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.FileOperation.OperationType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb deleted file mode 100644 index 8dc9f5c367d6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/finding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v2/access_pb' -require 'google/cloud/securitycenter/v2/affected_resources_pb' -require 'google/cloud/securitycenter/v2/agent_pb' -require 'google/cloud/securitycenter/v2/agent_anomaly_pb' -require 'google/cloud/securitycenter/v2/agent_session_pb' -require 'google/cloud/securitycenter/v2/ai_model_pb' -require 'google/cloud/securitycenter/v2/application_pb' -require 'google/cloud/securitycenter/v2/attack_exposure_pb' -require 'google/cloud/securitycenter/v2/backup_disaster_recovery_pb' -require 'google/cloud/securitycenter/v2/chokepoint_pb' -require 'google/cloud/securitycenter/v2/cloud_armor_pb' -require 'google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb' -require 'google/cloud/securitycenter/v2/cloud_dlp_inspection_pb' -require 'google/cloud/securitycenter/v2/compliance_pb' -require 'google/cloud/securitycenter/v2/connection_pb' -require 'google/cloud/securitycenter/v2/contact_details_pb' -require 'google/cloud/securitycenter/v2/container_pb' -require 'google/cloud/securitycenter/v2/data_access_event_pb' -require 'google/cloud/securitycenter/v2/data_flow_event_pb' -require 'google/cloud/securitycenter/v2/data_retention_deletion_event_pb' -require 'google/cloud/securitycenter/v2/database_pb' -require 'google/cloud/securitycenter/v2/disk_pb' -require 'google/cloud/securitycenter/v2/exfiltration_pb' -require 'google/cloud/securitycenter/v2/external_system_pb' -require 'google/cloud/securitycenter/v2/file_pb' -require 'google/cloud/securitycenter/v2/group_membership_pb' -require 'google/cloud/securitycenter/v2/iam_binding_pb' -require 'google/cloud/securitycenter/v2/indicator_pb' -require 'google/cloud/securitycenter/v2/ip_rules_pb' -require 'google/cloud/securitycenter/v2/job_pb' -require 'google/cloud/securitycenter/v2/kernel_rootkit_pb' -require 'google/cloud/securitycenter/v2/kubernetes_pb' -require 'google/cloud/securitycenter/v2/load_balancer_pb' -require 'google/cloud/securitycenter/v2/log_entry_pb' -require 'google/cloud/securitycenter/v2/mitre_attack_pb' -require 'google/cloud/securitycenter/v2/network_pb' -require 'google/cloud/securitycenter/v2/notebook_pb' -require 'google/cloud/securitycenter/v2/org_policy_pb' -require 'google/cloud/securitycenter/v2/process_pb' -require 'google/cloud/securitycenter/v2/security_marks_pb' -require 'google/cloud/securitycenter/v2/security_posture_pb' -require 'google/cloud/securitycenter/v2/toxic_combination_pb' -require 'google/cloud/securitycenter/v2/vertex_ai_pb' -require 'google/cloud/securitycenter/v2/vulnerability_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/securitycenter/v2/finding.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/access.proto\x1a\x37google/cloud/securitycenter/v2/affected_resources.proto\x1a*google/cloud/securitycenter/v2/agent.proto\x1a\x32google/cloud/securitycenter/v2/agent_anomaly.proto\x1a\x32google/cloud/securitycenter/v2/agent_session.proto\x1a-google/cloud/securitycenter/v2/ai_model.proto\x1a\x30google/cloud/securitycenter/v2/application.proto\x1a\x34google/cloud/securitycenter/v2/attack_exposure.proto\x1a=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v2/chokepoint.proto\x1a\x30google/cloud/securitycenter/v2/cloud_armor.proto\x1a;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v2/compliance.proto\x1a/google/cloud/securitycenter/v2/connection.proto\x1a\x34google/cloud/securitycenter/v2/contact_details.proto\x1a.google/cloud/securitycenter/v2/container.proto\x1a\x36google/cloud/securitycenter/v2/data_access_event.proto\x1a\x34google/cloud/securitycenter/v2/data_flow_event.proto\x1a\x42google/cloud/securitycenter/v2/data_retention_deletion_event.proto\x1a-google/cloud/securitycenter/v2/database.proto\x1a)google/cloud/securitycenter/v2/disk.proto\x1a\x31google/cloud/securitycenter/v2/exfiltration.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a)google/cloud/securitycenter/v2/file.proto\x1a\x35google/cloud/securitycenter/v2/group_membership.proto\x1a\x30google/cloud/securitycenter/v2/iam_binding.proto\x1a.google/cloud/securitycenter/v2/indicator.proto\x1a-google/cloud/securitycenter/v2/ip_rules.proto\x1a(google/cloud/securitycenter/v2/job.proto\x1a\x33google/cloud/securitycenter/v2/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v2/kubernetes.proto\x1a\x32google/cloud/securitycenter/v2/load_balancer.proto\x1a.google/cloud/securitycenter/v2/log_entry.proto\x1a\x31google/cloud/securitycenter/v2/mitre_attack.proto\x1a,google/cloud/securitycenter/v2/network.proto\x1a-google/cloud/securitycenter/v2/notebook.proto\x1a/google/cloud/securitycenter/v2/org_policy.proto\x1a,google/cloud/securitycenter/v2/process.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a\x35google/cloud/securitycenter/v2/security_posture.proto\x1a\x36google/cloud/securitycenter/v2/toxic_combination.proto\x1a.google/cloud/securitycenter/v2/vertex_ai.proto\x1a\x32google/cloud/securitycenter/v2/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdf*\n\x07\x46inding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0e\x63\x61nonical_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1a\n\rresource_name\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x41\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x07 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x65xternal_uri\x18\x08 \x01(\t\x12X\n\x11source_properties\x18\t \x03(\x0b\x32=.google.cloud.securitycenter.v2.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\n \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x08severity\x18\x0e \x01(\x0e\x32\x30.google.cloud.securitycenter.v2.Finding.Severity\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12H\n\tmute_info\x18\x35 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.Finding.MuteInfoB\x03\xe0\x41\x03\x12K\n\rfinding_class\x18\x10 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.Finding.FindingClass\x12<\n\tindicator\x18\x11 \x01(\x0b\x32).google.cloud.securitycenter.v2.Indicator\x12\x44\n\rvulnerability\x18\x12 \x01(\x0b\x32-.google.cloud.securitycenter.v2.Vulnerability\x12\x39\n\x10mute_update_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x14 \x03(\x0b\x32<.google.cloud.securitycenter.v2.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x15 \x01(\x0b\x32+.google.cloud.securitycenter.v2.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x16 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Access\x12?\n\x0b\x63onnections\x18\x17 \x03(\x0b\x32*.google.cloud.securitycenter.v2.Connection\x12\x16\n\x0emute_initiator\x18\x18 \x01(\t\x12:\n\tprocesses\x18\x19 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Process\x12L\n\x08\x63ontacts\x18\x1a \x03(\x0b\x32\x35.google.cloud.securitycenter.v2.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\x1b \x03(\x0b\x32*.google.cloud.securitycenter.v2.Compliance\x12 \n\x13parent_display_name\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x1e \x01(\t\x12\x42\n\x0c\x65xfiltration\x18\x1f \x01(\x0b\x32,.google.cloud.securitycenter.v2.Exfiltration\x12@\n\x0ciam_bindings\x18 \x03(\x0b\x32*.google.cloud.securitycenter.v2.IamBinding\x12\x12\n\nnext_steps\x18! \x01(\t\x12\x13\n\x0bmodule_name\x18\" \x01(\t\x12=\n\ncontainers\x18# \x03(\x0b\x32).google.cloud.securitycenter.v2.Container\x12>\n\nkubernetes\x18$ \x01(\x0b\x32*.google.cloud.securitycenter.v2.Kubernetes\x12:\n\x08\x64\x61tabase\x18% \x01(\x0b\x32(.google.cloud.securitycenter.v2.Database\x12G\n\x0f\x61ttack_exposure\x18& \x01(\x0b\x32..google.cloud.securitycenter.v2.AttackExposure\x12\x33\n\x05\x66iles\x18\' \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12P\n\x14\x63loud_dlp_inspection\x18( \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18) \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18* \x01(\x0b\x32-.google.cloud.securitycenter.v2.KernelRootkit\x12?\n\x0corg_policies\x18+ \x03(\x0b\x32).google.cloud.securitycenter.v2.OrgPolicy\x12\x30\n\x03job\x18, \x01(\x0b\x32#.google.cloud.securitycenter.v2.Job\x12@\n\x0b\x61pplication\x18- \x01(\x0b\x32+.google.cloud.securitycenter.v2.Application\x12\x39\n\x08ip_rules\x18. \x01(\x0b\x32\'.google.cloud.securitycenter.v2.IpRules\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18/ \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x30 \x01(\x0b\x32/.google.cloud.securitycenter.v2.SecurityPosture\x12=\n\x0blog_entries\x18\x31 \x03(\x0b\x32(.google.cloud.securitycenter.v2.LogEntry\x12\x44\n\x0eload_balancers\x18\x32 \x03(\x0b\x32,.google.cloud.securitycenter.v2.LoadBalancer\x12?\n\x0b\x63loud_armor\x18\x33 \x01(\x0b\x32*.google.cloud.securitycenter.v2.CloudArmor\x12:\n\x08notebook\x18\x37 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Notebook\x12K\n\x11toxic_combination\x18\x38 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.ToxicCombination\x12J\n\x11group_memberships\x18\x39 \x03(\x0b\x32/.google.cloud.securitycenter.v2.GroupMembership\x12\x32\n\x04\x64isk\x18: \x01(\x0b\x32$.google.cloud.securitycenter.v2.Disk\x12K\n\x12\x64\x61ta_access_events\x18= \x03(\x0b\x32/.google.cloud.securitycenter.v2.DataAccessEvent\x12G\n\x10\x64\x61ta_flow_events\x18> \x03(\x0b\x32-.google.cloud.securitycenter.v2.DataFlowEvent\x12\x39\n\x08networks\x18? \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Network\x12\x62\n\x1e\x64\x61ta_retention_deletion_events\x18@ \x03(\x0b\x32:.google.cloud.securitycenter.v2.DataRetentionDeletionEvent\x12M\n\x12\x61\x66\x66\x65\x63ted_resources\x18\x41 \x01(\x0b\x32\x31.google.cloud.securitycenter.v2.AffectedResources\x12\x39\n\x08\x61i_model\x18\x42 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AiModel\x12>\n\nchokepoint\x18\x45 \x01(\x0b\x32*.google.cloud.securitycenter.v2.Chokepoint\x12;\n\tvertex_ai\x18H \x01(\x0b\x32(.google.cloud.securitycenter.v2.VertexAi\x12\x34\n\x05\x61gent\x18Q \x01(\x0b\x32%.google.cloud.securitycenter.v2.Agent\x12\x44\n\x0e\x61gent_sessions\x18R \x03(\x0b\x32,.google.cloud.securitycenter.v2.AgentSession\x12\x43\n\ragent_anomaly\x18S \x01(\x0b\x32,.google.cloud.securitycenter.v2.AgentAnomaly\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12.\n\napply_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aX\n\x11\x44ynamicMuteRecord\x12\x13\n\x0bmute_config\x18\x01 \x01(\t\x12.\n\nmatch_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x66\n\x14\x45xternalSystemsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.ExternalSystem:\x02\x38\x01\x1a_\n\rContactsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.ContactDetails:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"C\n\x04Mute\x12\x14\n\x10MUTE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\x0b\n\x07UNMUTED\x10\x02\x12\r\n\tUNDEFINED\x10\x03\"\xd9\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t:\xdd\x03\xea\x41\xd9\x03\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12Uorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12Ifolders/{folder}/sources/{source}/locations/{location}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}\x12Kprojects/{project}/sources/{source}/locations/{location}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x46indingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding").msgclass - Finding::MuteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo").msgclass - Finding::MuteInfo::StaticMute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute").msgclass - Finding::MuteInfo::DynamicMuteRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord").msgclass - Finding::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.State").enummodule - Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.Severity").enummodule - Finding::Mute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.Mute").enummodule - Finding::FindingClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.FindingClass").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb deleted file mode 100644 index fe84677148ee..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/folder.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/securitycenter/v2/folder.proto\x12\x1egoogle.cloud.securitycenter.v2\"G\n\x06\x46older\x12\x17\n\x0fresource_folder\x18\x01 \x01(\t\x12$\n\x1cresource_folder_display_name\x18\x02 \x01(\tB\xe5\x01\n\"com.google.cloud.securitycenter.v2B\x0b\x46olderProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Folder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Folder").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb deleted file mode 100644 index 9f419b9c2065..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/group_membership.proto - -require 'google/protobuf' - - -descriptor_data = "\n5google/cloud/securitycenter/v2/group_membership.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xd8\x01\n\x0fGroupMembership\x12M\n\ngroup_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.GroupMembership.GroupType\x12\x10\n\x08group_id\x18\x02 \x01(\t\"d\n\tGroupType\x12\x1a\n\x16GROUP_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cGROUP_TYPE_TOXIC_COMBINATION\x10\x01\x12\x19\n\x15GROUP_TYPE_CHOKEPOINT\x10\x03\x42\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14GroupMembershipProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - GroupMembership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupMembership").msgclass - GroupMembership::GroupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupMembership.GroupType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb deleted file mode 100644 index 16a3bb17f83a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/iam_binding.proto - -require 'google/protobuf' - - -descriptor_data = "\n0google/cloud/securitycenter/v2/iam_binding.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xa4\x01\n\nIamBinding\x12\x41\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v2.IamBinding.Action\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x0e\n\x06member\x18\x03 \x01(\t\"5\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x42\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fIamBindingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - IamBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IamBinding").msgclass - IamBinding::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IamBinding.Action").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb deleted file mode 100644 index ed506ac1a11d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/indicator.proto - -require 'google/protobuf' - - -descriptor_data = "\n.google/cloud/securitycenter/v2/indicator.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xd9\x06\n\tIndicator\x12\x14\n\x0cip_addresses\x18\x01 \x03(\t\x12\x0f\n\x07\x64omains\x18\x02 \x03(\t\x12N\n\nsignatures\x18\x03 \x03(\x0b\x32:.google.cloud.securitycenter.v2.Indicator.ProcessSignature\x12\x0c\n\x04uris\x18\x04 \x03(\t\x1a\xc6\x05\n\x10ProcessSignature\x12o\n\x15memory_hash_signature\x18\x06 \x01(\x0b\x32N.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignatureH\x00\x12k\n\x13yara_rule_signature\x18\x07 \x01(\x0b\x32L.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignatureH\x00\x12`\n\x0esignature_type\x18\x08 \x01(\x0e\x32H.google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType\x1a\xd6\x01\n\x13MemoryHashSignature\x12\x15\n\rbinary_family\x18\x01 \x01(\t\x12l\n\ndetections\x18\x04 \x03(\x0b\x32X.google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection\x1a:\n\tDetection\x12\x0e\n\x06\x62inary\x18\x02 \x01(\t\x12\x1d\n\x15percent_pages_matched\x18\x03 \x01(\x01\x1a&\n\x11YaraRuleSignature\x12\x11\n\tyara_rule\x18\x05 \x01(\t\"d\n\rSignatureType\x12\x1e\n\x1aSIGNATURE_TYPE_UNSPECIFIED\x10\x00\x12\x1a\n\x16SIGNATURE_TYPE_PROCESS\x10\x01\x12\x17\n\x13SIGNATURE_TYPE_FILE\x10\x02\x42\x0b\n\tsignatureB\xe8\x01\n\"com.google.cloud.securitycenter.v2B\x0eIndicatorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Indicator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator").msgclass - Indicator::ProcessSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature").msgclass - Indicator::ProcessSignature::MemoryHashSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature").msgclass - Indicator::ProcessSignature::MemoryHashSignature::Detection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection").msgclass - Indicator::ProcessSignature::YaraRuleSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature").msgclass - Indicator::ProcessSignature::SignatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb deleted file mode 100644 index b6597fce0c8c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/ip_rules.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n-google/cloud/securitycenter/v2/ip_rules.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe2\x02\n\x07IpRules\x12\x44\n\tdirection\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v2.IpRules.Direction\x12:\n\x07\x61llowed\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AllowedH\x00\x12\x38\n\x06\x64\x65nied\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v2.DeniedH\x00\x12\x18\n\x10source_ip_ranges\x18\x04 \x03(\t\x12\x1d\n\x15\x64\x65stination_ip_ranges\x18\x05 \x03(\t\x12\x18\n\x10\x65xposed_services\x18\x06 \x03(\t\"?\n\tDirection\x12\x19\n\x15\x44IRECTION_UNSPECIFIED\x10\x00\x12\x0b\n\x07INGRESS\x10\x01\x12\n\n\x06\x45GRESS\x10\x02\x42\x07\n\x05rules\"\x8d\x01\n\x06IpRule\x12\x10\n\x08protocol\x18\x01 \x01(\t\x12J\n\x0bport_ranges\x18\x02 \x03(\x0b\x32\x30.google.cloud.securitycenter.v2.IpRule.PortRangeB\x03\xe0\x41\x01\x1a%\n\tPortRange\x12\x0b\n\x03min\x18\x01 \x01(\x03\x12\x0b\n\x03max\x18\x02 \x01(\x03\"H\n\x07\x41llowed\x12=\n\x08ip_rules\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.IpRuleB\x03\xe0\x41\x01\"G\n\x06\x44\x65nied\x12=\n\x08ip_rules\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.IpRuleB\x03\xe0\x41\x01\x42\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cIpRulesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - IpRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRules").msgclass - IpRules::Direction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRules.Direction").enummodule - IpRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRule").msgclass - IpRule::PortRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRule.PortRange").msgclass - Allowed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Allowed").msgclass - Denied = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Denied").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb deleted file mode 100644 index c079059f9826..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/job.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n(google/cloud/securitycenter/v2/job.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\"w\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32(.google.cloud.securitycenter.v2.JobStateB\x03\xe0\x41\x03\x12\x12\n\nerror_code\x18\x03 \x01(\x05\x12\x10\n\x08location\x18\x04 \x01(\t*Z\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x42\xe2\x01\n\"com.google.cloud.securitycenter.v2B\x08JobProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Job").msgclass - JobState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.JobState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb deleted file mode 100644 index eba594bf469d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/kernel_rootkit.proto - -require 'google/protobuf' - - -descriptor_data = "\n3google/cloud/securitycenter/v2/kernel_rootkit.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xd7\x02\n\rKernelRootkit\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x1cunexpected_code_modification\x18\x02 \x01(\x08\x12.\n&unexpected_read_only_data_modification\x18\x03 \x01(\x08\x12!\n\x19unexpected_ftrace_handler\x18\x04 \x01(\x08\x12!\n\x19unexpected_kprobe_handler\x18\x05 \x01(\x08\x12$\n\x1cunexpected_kernel_code_pages\x18\x06 \x01(\x08\x12&\n\x1eunexpected_system_call_handler\x18\x07 \x01(\x08\x12$\n\x1cunexpected_interrupt_handler\x18\x08 \x01(\x08\x12(\n unexpected_processes_in_runqueue\x18\t \x01(\x08\x42\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12KernelRootkitProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - KernelRootkit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.KernelRootkit").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb deleted file mode 100644 index 2f1bf77bd0f6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/kubernetes.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v2/container_pb' -require 'google/cloud/securitycenter/v2/label_pb' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/kubernetes.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a.google/cloud/securitycenter/v2/container.proto\x1a*google/cloud/securitycenter/v2/label.proto\"\x82\x0c\n\nKubernetes\x12<\n\x04pods\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.Kubernetes.Pod\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Node\x12G\n\nnode_pools\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.Kubernetes.NodePool\x12>\n\x05roles\x18\x04 \x03(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Role\x12\x44\n\x08\x62indings\x18\x05 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.Kubernetes.Binding\x12O\n\x0e\x61\x63\x63\x65ss_reviews\x18\x06 \x03(\x0b\x32\x37.google.cloud.securitycenter.v2.Kubernetes.AccessReview\x12\x42\n\x07objects\x18\x07 \x03(\x0b\x32\x31.google.cloud.securitycenter.v2.Kubernetes.Object\x1a\x95\x01\n\x03Pod\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x35\n\x06labels\x18\x03 \x03(\x0b\x32%.google.cloud.securitycenter.v2.Label\x12=\n\ncontainers\x18\x04 \x03(\x0b\x32).google.cloud.securitycenter.v2.Container\x1a\x14\n\x04Node\x12\x0c\n\x04name\x18\x01 \x01(\t\x1aX\n\x08NodePool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Node\x1a\x9e\x01\n\x04Role\x12\x42\n\x04kind\x18\x01 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.Kubernetes.Role.Kind\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"8\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x08\n\x04ROLE\x10\x01\x12\x10\n\x0c\x43LUSTER_ROLE\x10\x02\x1a\xa8\x01\n\x07\x42inding\x12\n\n\x02ns\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12=\n\x04role\x18\x03 \x01(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Role\x12\x44\n\x08subjects\x18\x04 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.Kubernetes.Subject\x1a\xbe\x01\n\x07Subject\x12I\n\x04kind\x18\x01 \x01(\x0e\x32;.google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\"N\n\x08\x41uthType\x12\x19\n\x15\x41UTH_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x12\n\x0eSERVICEACCOUNT\x10\x02\x12\t\n\x05GROUP\x10\x03\x1a}\n\x0c\x41\x63\x63\x65ssReview\x12\r\n\x05group\x18\x01 \x01(\t\x12\n\n\x02ns\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x13\n\x0bsubresource\x18\x05 \x01(\t\x12\x0c\n\x04verb\x18\x06 \x01(\t\x12\x0f\n\x07version\x18\x07 \x01(\t\x1a~\n\x06Object\x12\r\n\x05group\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\n\n\x02ns\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12=\n\ncontainers\x18\x05 \x03(\x0b\x32).google.cloud.securitycenter.v2.ContainerB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fKubernetesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Kubernetes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes").msgclass - Kubernetes::Pod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Pod").msgclass - Kubernetes::Node = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Node").msgclass - Kubernetes::NodePool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.NodePool").msgclass - Kubernetes::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Role").msgclass - Kubernetes::Role::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Role.Kind").enummodule - Kubernetes::Binding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Binding").msgclass - Kubernetes::Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Subject").msgclass - Kubernetes::Subject::AuthType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType").enummodule - Kubernetes::AccessReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.AccessReview").msgclass - Kubernetes::Object = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Object").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb deleted file mode 100644 index 3cdb278899ec..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/label.proto - -require 'google/protobuf' - - -descriptor_data = "\n*google/cloud/securitycenter/v2/label.proto\x12\x1egoogle.cloud.securitycenter.v2\"$\n\x05Label\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB\xe4\x01\n\"com.google.cloud.securitycenter.v2B\nLabelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Label").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb deleted file mode 100644 index b23d3a4cfd9f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/load_balancer.proto - -require 'google/protobuf' - - -descriptor_data = "\n2google/cloud/securitycenter/v2/load_balancer.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x1c\n\x0cLoadBalancer\x12\x0c\n\x04name\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v2B\x11LoadBalancerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - LoadBalancer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.LoadBalancer").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb deleted file mode 100644 index b3704ddc1826..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/log_entry.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/securitycenter/v2/log_entry.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"i\n\x08LogEntry\x12P\n\x13\x63loud_logging_entry\x18\x01 \x01(\x0b\x32\x31.google.cloud.securitycenter.v2.CloudLoggingEntryH\x00\x42\x0b\n\tlog_entry\"\x81\x01\n\x11\x43loudLoggingEntry\x12\x11\n\tinsert_id\x18\x01 \x01(\t\x12\x0e\n\x06log_id\x18\x02 \x01(\t\x12\x1a\n\x12resource_container\x18\x03 \x01(\t\x12-\n\ttimestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rLogEntryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.LogEntry").msgclass - CloudLoggingEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudLoggingEntry").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb deleted file mode 100644 index 08d45bd18d1a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/mitre_attack.proto - -require 'google/protobuf' - - -descriptor_data = "\n1google/cloud/securitycenter/v2/mitre_attack.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xca%\n\x0bMitreAttack\x12J\n\x0eprimary_tactic\x18\x01 \x01(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12Q\n\x12primary_techniques\x18\x02 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.MitreAttack.Technique\x12N\n\x12\x61\x64\x64itional_tactics\x18\x03 \x03(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12T\n\x15\x61\x64\x64itional_techniques\x18\x04 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.MitreAttack.Technique\x12\x0f\n\x07version\x18\x05 \x01(\t\"\xb4\x02\n\x06Tactic\x12\x16\n\x12TACTIC_UNSPECIFIED\x10\x00\x12\x12\n\x0eRECONNAISSANCE\x10\x01\x12\x18\n\x14RESOURCE_DEVELOPMENT\x10\x02\x12\x12\n\x0eINITIAL_ACCESS\x10\x05\x12\r\n\tEXECUTION\x10\x03\x12\x0f\n\x0bPERSISTENCE\x10\x06\x12\x18\n\x14PRIVILEGE_ESCALATION\x10\x08\x12\x13\n\x0f\x44\x45\x46\x45NSE_EVASION\x10\x07\x12\x15\n\x11\x43REDENTIAL_ACCESS\x10\t\x12\r\n\tDISCOVERY\x10\n\x12\x14\n\x10LATERAL_MOVEMENT\x10\x0b\x12\x0e\n\nCOLLECTION\x10\x0c\x12\x17\n\x13\x43OMMAND_AND_CONTROL\x10\x04\x12\x10\n\x0c\x45XFILTRATION\x10\r\x12\n\n\x06IMPACT\x10\x0e\"\xad \n\tTechnique\x12\x19\n\x15TECHNIQUE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x44\x41TA_OBFUSCATION\x10\x46\x12\"\n\x1e\x44\x41TA_OBFUSCATION_STEGANOGRAPHY\x10G\x12\x19\n\x15OS_CREDENTIAL_DUMPING\x10r\x12)\n%OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM\x10s\x12\x35\n1OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW\x10z\x12\x1a\n\x16\x44\x41TA_FROM_LOCAL_SYSTEM\x10u\x12\x1a\n\x16\x41UTOMATED_EXFILTRATION\x10\x44\x12\x1c\n\x18OBFUSCATED_FILES_OR_INFO\x10H\x12\x11\n\rSTEGANOGRAPHY\x10I\x12\x1a\n\x16\x43OMPILE_AFTER_DELIVERY\x10J\x12\x17\n\x13\x43OMMAND_OBFUSCATION\x10K\x12\x16\n\x12SCHEDULED_TRANSFER\x10x\x12\x1f\n\x1bSYSTEM_OWNER_USER_DISCOVERY\x10v\x12\x10\n\x0cMASQUERADING\x10\x31\x12%\n!MATCH_LEGITIMATE_NAME_OR_LOCATION\x10\x32\x12(\n$BOOT_OR_LOGON_INITIALIZATION_SCRIPTS\x10%\x12\x11\n\rSTARTUP_ITEMS\x10&\x12\x1d\n\x19NETWORK_SERVICE_DISCOVERY\x10 \x12\x16\n\x12SCHEDULED_TASK_JOB\x10Y\x12\x1b\n\x17SCHEDULED_TASK_JOB_CRON\x10w\x12\x1f\n\x1b\x43ONTAINER_ORCHESTRATION_JOB\x10Z\x12\x15\n\x11PROCESS_INJECTION\x10]\x12\x11\n\rINPUT_CAPTURE\x10g\x12\x1c\n\x18INPUT_CAPTURE_KEYLOGGING\x10h\x12\x15\n\x11PROCESS_DISCOVERY\x10\x38\x12%\n!COMMAND_AND_SCRIPTING_INTERPRETER\x10\x06\x12\x0e\n\nUNIX_SHELL\x10\x07\x12\n\n\x06PYTHON\x10;\x12)\n%EXPLOITATION_FOR_PRIVILEGE_ESCALATION\x10?\x12\x1f\n\x1bPERMISSION_GROUPS_DISCOVERY\x10\x12\x12\x10\n\x0c\x43LOUD_GROUPS\x10\x13\x12\x15\n\x11INDICATOR_REMOVAL\x10{\x12\x34\n0INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS\x10|\x12+\n\'INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY\x10}\x12#\n\x1fINDICATOR_REMOVAL_FILE_DELETION\x10@\x12 \n\x1bINDICATOR_REMOVAL_TIMESTOMP\x10\x80\x01\x12(\n$INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA\x10~\x12\x1e\n\x1a\x41PPLICATION_LAYER_PROTOCOL\x10-\x12\x07\n\x03\x44NS\x10.\x12\x1d\n\x19SOFTWARE_DEPLOYMENT_TOOLS\x10/\x12\x12\n\x0eVALID_ACCOUNTS\x10\x0e\x12\x14\n\x10\x44\x45\x46\x41ULT_ACCOUNTS\x10#\x12\x12\n\x0eLOCAL_ACCOUNTS\x10\x0f\x12\x12\n\x0e\x43LOUD_ACCOUNTS\x10\x10\x12 \n\x1c\x46ILE_AND_DIRECTORY_DISCOVERY\x10y\x12#\n\x1f\x41\x43\x43OUNT_DISCOVERY_LOCAL_ACCOUNT\x10t\x12\t\n\x05PROXY\x10\t\x12\x12\n\x0e\x45XTERNAL_PROXY\x10\n\x12\x13\n\x0fMULTI_HOP_PROXY\x10\x0b\x12\x18\n\x14\x41\x43\x43OUNT_MANIPULATION\x10\x16\x12 \n\x1c\x41\x44\x44ITIONAL_CLOUD_CREDENTIALS\x10(\x12\x1a\n\x16\x41\x44\x44ITIONAL_CLOUD_ROLES\x10\x43\x12\x17\n\x13SSH_AUTHORIZED_KEYS\x10\x17\x12&\n\"ADDITIONAL_CONTAINER_CLUSTER_ROLES\x10:\x12\x18\n\x14MULTI_STAGE_CHANNELS\x10L\x12\x19\n\x15INGRESS_TOOL_TRANSFER\x10\x03\x12\x0e\n\nNATIVE_API\x10\x04\x12\x0f\n\x0b\x42RUTE_FORCE\x10,\x12\x18\n\x14\x41UTOMATED_COLLECTION\x10^\x12\x12\n\x0eSHARED_MODULES\x10\x05\x12\x11\n\rDATA_ENCODING\x10M\x12\x15\n\x11STANDARD_ENCODING\x10N\x12\x1d\n\x19\x41\x43\x43\x45SS_TOKEN_MANIPULATION\x10!\x12 \n\x1cTOKEN_IMPERSONATION_OR_THEFT\x10\'\x12\x12\n\x0e\x43REATE_ACCOUNT\x10O\x12\x11\n\rLOCAL_ACCOUNT\x10P\x12$\n DEOBFUSCATE_DECODE_FILES_OR_INFO\x10_\x12%\n!EXPLOIT_PUBLIC_FACING_APPLICATION\x10\x1b\x12\x1c\n\x17SUPPLY_CHAIN_COMPROMISE\x10\x81\x01\x12;\n6COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS\x10\x82\x01\x12&\n!EXPLOITATION_FOR_CLIENT_EXECUTION\x10\x86\x01\x12\x12\n\x0eUSER_EXECUTION\x10\x45\x12>\n9LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION\x10\x87\x01\x12\x1e\n\x1a\x44OMAIN_POLICY_MODIFICATION\x10\x1e\x12\x14\n\x10\x44\x41TA_DESTRUCTION\x10\x1d\x12\x1e\n\x19\x44\x41TA_ENCRYPTED_FOR_IMPACT\x10\x84\x01\x12\x10\n\x0cSERVICE_STOP\x10\x34\x12\x1b\n\x17INHIBIT_SYSTEM_RECOVERY\x10$\x12\x17\n\x13\x46IRMWARE_CORRUPTION\x10Q\x12\x16\n\x12RESOURCE_HIJACKING\x10\x08\x12\x1d\n\x19NETWORK_DENIAL_OF_SERVICE\x10\x11\x12\x1b\n\x17\x43LOUD_SERVICE_DISCOVERY\x10\x30\x12\"\n\x1eSTEAL_APPLICATION_ACCESS_TOKEN\x10*\x12\x1a\n\x16\x41\x43\x43OUNT_ACCESS_REMOVAL\x10\x33\x12\"\n\x1eTRANSFER_DATA_TO_CLOUD_ACCOUNT\x10[\x12\x1c\n\x18STEAL_WEB_SESSION_COOKIE\x10\x19\x12#\n\x1f\x43REATE_OR_MODIFY_SYSTEM_PROCESS\x10\x18\x12\x1d\n\x19\x45VENT_TRIGGERED_EXECUTION\x10\x41\x12%\n!BOOT_OR_LOGON_AUTOSTART_EXECUTION\x10R\x12!\n\x1dKERNEL_MODULES_AND_EXTENSIONS\x10S\x12\x19\n\x15SHORTCUT_MODIFICATION\x10\x7f\x12%\n!ABUSE_ELEVATION_CONTROL_MECHANISM\x10\"\x12\x38\n3ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID\x10\x88\x01\x12;\n7ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING\x10m\x12\x19\n\x15UNSECURED_CREDENTIALS\x10\r\x12\x18\n\x14\x43REDENTIALS_IN_FILES\x10i\x12\x10\n\x0c\x42\x41SH_HISTORY\x10`\x12\x10\n\x0cPRIVATE_KEYS\x10\x61\x12\x19\n\x15SUBVERT_TRUST_CONTROL\x10j\x12\x1c\n\x18INSTALL_ROOT_CERTIFICATE\x10k\x12#\n\x1f\x43OMPROMISE_HOST_SOFTWARE_BINARY\x10T\x12$\n CREDENTIALS_FROM_PASSWORD_STORES\x10\x62\x12!\n\x1dMODIFY_AUTHENTICATION_PROCESS\x10\x1c\x12$\n PLUGGABLE_AUTHENTICATION_MODULES\x10l\x12 \n\x1bMULTI_FACTOR_AUTHENTICATION\x10\x89\x01\x12\x13\n\x0fIMPAIR_DEFENSES\x10\x1f\x12\x1b\n\x17\x44ISABLE_OR_MODIFY_TOOLS\x10\x37\x12\x16\n\x12INDICATOR_BLOCKING\x10n\x12(\n$DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM\x10o\x12\x12\n\x0eHIDE_ARTIFACTS\x10U\x12 \n\x1cHIDDEN_FILES_AND_DIRECTORIES\x10V\x12\x10\n\x0cHIDDEN_USERS\x10W\x12!\n\x1d\x45XFILTRATION_OVER_WEB_SERVICE\x10\x14\x12!\n\x1d\x45XFILTRATION_TO_CLOUD_STORAGE\x10\x15\x12\x16\n\x12\x44YNAMIC_RESOLUTION\x10\x0c\x12\x19\n\x15LATERAL_TOOL_TRANSFER\x10)\x12\x19\n\x15HIJACK_EXECUTION_FLOW\x10p\x12\x32\n.HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING\x10q\x12\'\n#MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE\x10\x1a\x12\x13\n\x0f\x43REATE_SNAPSHOT\x10\x36\x12\"\n\x1e\x43LOUD_INFRASTRUCTURE_DISCOVERY\x10\x35\x12\x18\n\x14\x44\x45VELOP_CAPABILITIES\x10\x63\x12 \n\x1c\x44\x45VELOP_CAPABILITIES_MALWARE\x10\x64\x12\x17\n\x13OBTAIN_CAPABILITIES\x10+\x12\x1f\n\x1bOBTAIN_CAPABILITIES_MALWARE\x10\x65\x12(\n#OBTAIN_CAPABILITIES_VULNERABILITIES\x10\x85\x01\x12\x13\n\x0f\x41\x43TIVE_SCANNING\x10\x01\x12\x16\n\x12SCANNING_IP_BLOCKS\x10\x02\x12\x16\n\x12STAGE_CAPABILITIES\x10X\x12\x12\n\x0eUPLOAD_MALWARE\x10\x66\x12$\n CONTAINER_ADMINISTRATION_COMMAND\x10<\x12\x14\n\x10\x44\x45PLOY_CONTAINER\x10\x42\x12\x12\n\x0e\x45SCAPE_TO_HOST\x10=\x12$\n CONTAINER_AND_RESOURCE_DISCOVERY\x10\x39\x12\x1b\n\x17REFLECTIVE_CODE_LOADING\x10\\\x12.\n*STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES\x10>\x12\x14\n\x0f\x46INANCIAL_THEFT\x10\x83\x01\x42\xea\x01\n\"com.google.cloud.securitycenter.v2B\x10MitreAttackProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - MitreAttack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack").msgclass - MitreAttack::Tactic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack.Tactic").enummodule - MitreAttack::Technique = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack.Technique").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb deleted file mode 100644 index 1fa427767438..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/mute_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/cloud/securitycenter/v2/mute_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\x06\n\nMuteConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12L\n\x04type\x18\x08 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.MuteConfig.MuteConfigTypeB\x03\xe0\x41\x02\x12\x34\n\x0b\x65xpiry_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"K\n\x0eMuteConfigType\x12 \n\x1cMUTE_CONFIG_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STATIC\x10\x01\x12\x0b\n\x07\x44YNAMIC\x10\x02:\xaa\x03\xea\x41\xa6\x03\n(securitycenter.googleapis.com/MuteConfig\x12\x36organizations/{organization}/muteConfigs/{mute_config}\x12Korganizations/{organization}/locations/{location}/muteConfigs/{mute_config}\x12*folders/{folder}/muteConfigs/{mute_config}\x12?folders/{folder}/locations/{location}/muteConfigs/{mute_config}\x12,projects/{project}/muteConfigs/{mute_config}\x12\x41projects/{project}/locations/{location}/muteConfigs/{mute_config}*\x0bmuteConfigs2\nmuteConfigB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fMuteConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - MuteConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MuteConfig").msgclass - MuteConfig::MuteConfigType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MuteConfig.MuteConfigType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb deleted file mode 100644 index b3adfa3e0d12..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/network.proto - -require 'google/protobuf' - - -descriptor_data = "\n,google/cloud/securitycenter/v2/network.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x17\n\x07Network\x12\x0c\n\x04name\x18\x01 \x01(\tB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cNetworkProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Network").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb deleted file mode 100644 index 648e79e5aff6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/notebook.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/securitycenter/v2/notebook.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"x\n\x08Notebook\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07service\x18\x02 \x01(\t\x12\x13\n\x0blast_author\x18\x03 \x01(\t\x12\x38\n\x14notebook_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rNotebookProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Notebook").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb deleted file mode 100644 index 36db41862bbd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/notification_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n8google/cloud/securitycenter/v2/notification_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbf\x05\n\x12NotificationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x36\n\x0cpubsub_topic\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x1c\n\x0fservice_account\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12^\n\x10streaming_config\x18\x05 \x01(\x0b\x32\x42.google.cloud.securitycenter.v2.NotificationConfig.StreamingConfigH\x00\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t:\xe0\x02\xea\x41\xdc\x02\n0securitycenter.googleapis.com/NotificationConfig\x12[organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}\x12Ofolders/{folder}/locations/{location}/notificationConfigs/{notification_config}\x12Qprojects/{project}/locations/{location}/notificationConfigs/{notification_config}*\x13notificationConfigs2\x12notificationConfigB\x0f\n\rnotify_configB\xb4\x02\n\"com.google.cloud.securitycenter.v2B\x17NotificationConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - NotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationConfig").msgclass - NotificationConfig::StreamingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb deleted file mode 100644 index 77017de51eeb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/notification_message.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v2/finding_pb' -require 'google/cloud/securitycenter/v2/resource_pb' - - -descriptor_data = "\n9google/cloud/securitycenter/v2/notification_message.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a,google/cloud/securitycenter/v2/finding.proto\x1a-google/cloud/securitycenter/v2/resource.proto\"\xb8\x01\n\x13NotificationMessage\x12 \n\x18notification_config_name\x18\x01 \x01(\t\x12:\n\x07\x66inding\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingH\x00\x12:\n\x08resource\x18\x03 \x01(\x0b\x32(.google.cloud.securitycenter.v2.ResourceB\x07\n\x05\x65ventB\xf2\x01\n\"com.google.cloud.securitycenter.v2B\x18NotificationMessageProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - NotificationMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationMessage").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb deleted file mode 100644 index 9668bef4e937..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/org_policy.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/org_policy.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdb\x01\n\tOrgPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:\xba\x01\xea\x41\xb6\x01\n\x1forgpolicy.googleapis.com/Policy\x12\x37organizations/{organization}/policies/{constraint_name}\x12+folders/{folder}/policies/{constraint_name}\x12-projects/{project}/policies/{constraint_name}B\xe8\x01\n\"com.google.cloud.securitycenter.v2B\x0eOrgPolicyProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - OrgPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.OrgPolicy").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb deleted file mode 100644 index d7368f3889e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/process.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v2/file_pb' - - -descriptor_data = "\n,google/cloud/securitycenter/v2/process.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a)google/cloud/securitycenter/v2/file.proto\"\x86\x03\n\x07Process\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x06\x62inary\x18\x02 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x37\n\tlibraries\x18\x03 \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x34\n\x06script\x18\x04 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x0c\n\x04\x61rgs\x18\x05 \x03(\t\x12\x1b\n\x13\x61rguments_truncated\x18\x06 \x01(\x08\x12J\n\renv_variables\x18\x07 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.EnvironmentVariable\x12\x1f\n\x17\x65nv_variables_truncated\x18\x08 \x01(\x08\x12\x0b\n\x03pid\x18\t \x01(\x03\x12\x12\n\nparent_pid\x18\n \x01(\x03\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\"0\n\x13\x45nvironmentVariable\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03val\x18\x02 \x01(\tB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cProcessProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Process = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Process").msgclass - EnvironmentVariable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.EnvironmentVariable").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb deleted file mode 100644 index 2537d399e0df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/resource.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v2/folder_pb' - - -descriptor_data = "\n-google/cloud/securitycenter/v2/resource.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/folder.proto\"\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\xbd\x01\n\x0bGcpMetadata\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x1c\n\x14project_display_name\x18\x02 \x01(\t\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x04 \x01(\t\x12<\n\x07\x66olders\x18\x05 \x03(\x0b\x32&.google.cloud.securitycenter.v2.FolderB\x03\xe0\x41\x03\x12\x14\n\x0corganization\x18\x06 \x01(\t\"\x84\x03\n\x0b\x41wsMetadata\x12Q\n\x0corganization\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization\x12_\n\x14organizational_units\x18\x02 \x03(\x0b\x32\x41.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit\x12G\n\x07\x61\x63\x63ount\x18\x03 \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount\x1a\x1d\n\x0f\x41wsOrganization\x12\n\n\x02id\x18\x01 \x01(\t\x1a\x31\n\x15\x41wsOrganizationalUnit\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x1a&\n\nAwsAccount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xbc\x04\n\rAzureMetadata\x12]\n\x11management_groups\x18\x01 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup\x12U\n\x0csubscription\x18\x02 \x01(\x0b\x32?.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription\x12X\n\x0eresource_group\x18\x03 \x01(\x0b\x32@.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup\x12I\n\x06tenant\x18\x07 \x01(\x0b\x32\x39.google.cloud.securitycenter.v2.AzureMetadata.AzureTenant\x1a\x38\n\x14\x41zureManagementGroup\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a\x35\n\x11\x41zureSubscription\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a.\n\x12\x41zureResourceGroup\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a/\n\x0b\x41zureTenant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xf4\x03\n\x0cResourcePath\x12L\n\x05nodes\x18\x01 \x03(\x0b\x32=.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode\x1a\x8a\x01\n\x10ResourcePathNode\x12T\n\tnode_type\x18\x01 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType\x12\n\n\x02id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\"\x88\x02\n\x14ResourcePathNodeType\x12\'\n#RESOURCE_PATH_NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_ORGANIZATION\x10\x01\x12\x0e\n\nGCP_FOLDER\x10\x02\x12\x0f\n\x0bGCP_PROJECT\x10\x03\x12\x14\n\x10\x41WS_ORGANIZATION\x10\x04\x12\x1b\n\x17\x41WS_ORGANIZATIONAL_UNIT\x10\x05\x12\x0f\n\x0b\x41WS_ACCOUNT\x10\x06\x12\x1a\n\x16\x41ZURE_MANAGEMENT_GROUP\x10\x07\x12\x16\n\x12\x41ZURE_SUBSCRIPTION\x10\x08\x12\x18\n\x14\x41ZURE_RESOURCE_GROUP\x10\t*x\n\rCloudProvider\x12\x1e\n\x1a\x43LOUD_PROVIDER_UNSPECIFIED\x10\x00\x12\x19\n\x15GOOGLE_CLOUD_PLATFORM\x10\x01\x12\x17\n\x13\x41MAZON_WEB_SERVICES\x10\x02\x12\x13\n\x0fMICROSOFT_AZURE\x10\x03\x42\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Resource").msgclass - GcpMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GcpMetadata").msgclass - AwsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata").msgclass - AwsMetadata::AwsOrganization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization").msgclass - AwsMetadata::AwsOrganizationalUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit").msgclass - AwsMetadata::AwsAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsAccount").msgclass - AzureMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata").msgclass - AzureMetadata::AzureManagementGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup").msgclass - AzureMetadata::AzureSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription").msgclass - AzureMetadata::AzureResourceGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup").msgclass - AzureMetadata::AzureTenant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureTenant").msgclass - ResourcePath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath").msgclass - ResourcePath::ResourcePathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode").msgclass - ResourcePath::ResourcePathNodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType").enummodule - CloudProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudProvider").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb deleted file mode 100644 index a620481d431c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/resource_value_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v2/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n:google/cloud/securitycenter/v2/resource_value_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf9\x08\n\x13ResourceValueConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x45\n\x0eresource_value\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x12\x12\n\ntag_values\x18\x03 \x03(\t\x12\x15\n\rresource_type\x18\x04 \x01(\t\x12\r\n\x05scope\x18\x05 \x01(\t\x12q\n\x18resource_labels_selector\x18\x06 \x03(\x0b\x32O.google.cloud.securitycenter.v2.ResourceValueConfig.ResourceLabelsSelectorEntry\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x0e\x63loud_provider\x18\n \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12}\n!sensitive_data_protection_mapping\x18\x0b \x01(\x0b\x32R.google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping\x1a\xc4\x01\n\x1eSensitiveDataProtectionMapping\x12O\n\x18high_sensitivity_mapping\x18\x01 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x12Q\n\x1amedium_sensitivity_mapping\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x1a=\n\x1bResourceLabelsSelectorEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8d\x02\xea\x41\x89\x02\n1securitycenter.googleapis.com/ResourceValueConfig\x12Iorganizations/{organization}/resourceValueConfigs/{resource_value_config}\x12^organizations/{organization}/locations/{location}/resourceValueConfigs/{resource_value_config}*\x14resourceValueConfigs2\x13resourceValueConfig*X\n\rResourceValue\x12\x1e\n\x1aRESOURCE_VALUE_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x07\n\x03LOW\x10\x03\x12\x08\n\x04NONE\x10\x04\x42\xf2\x01\n\"com.google.cloud.securitycenter.v2B\x18ResourceValueConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - ResourceValueConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfig").msgclass - ResourceValueConfig::SensitiveDataProtectionMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping").msgclass - ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValue").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb deleted file mode 100644 index 8f9fb7fdc255..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/security_marks.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n3google/cloud/securitycenter/v2/security_marks.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xee\x06\n\rSecurityMarks\x12\x0c\n\x04name\x18\x01 \x01(\t\x12G\n\x05marks\x18\x02 \x03(\x0b\x32\x38.google.cloud.securitycenter.v2.SecurityMarks.MarksEntry\x12\x16\n\x0e\x63\x61nonical_name\x18\x03 \x01(\t\x1a,\n\nMarksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbf\x05\xea\x41\xbb\x05\n+securitycenter.googleapis.com/SecurityMarks\x12\x39organizations/{organization}/assets/{asset}/securityMarks\x12Norganizations/{organization}/sources/{source}/findings/{finding}/securityMarks\x12\x63organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/securityMarks\x12-folders/{folder}/assets/{asset}/securityMarks\x12\x42\x66olders/{folder}/sources/{source}/findings/{finding}/securityMarks\x12Wfolders/{folder}/sources/{source}/locations/{location}/findings/{finding}/securityMarks\x12/projects/{project}/assets/{asset}/securityMarks\x12\x44projects/{project}/sources/{source}/findings/{finding}/securityMarks\x12Yprojects/{project}/sources/{source}/locations/{location}/findings/{finding}/securityMarksB\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12SecurityMarksProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - SecurityMarks = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityMarks").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb deleted file mode 100644 index 0f13af8fe998..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/security_posture.proto - -require 'google/protobuf' - - -descriptor_data = "\n5google/cloud/securitycenter/v2/security_posture.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xe8\x02\n\x0fSecurityPosture\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0brevision_id\x18\x02 \x01(\t\x12#\n\x1bposture_deployment_resource\x18\x03 \x01(\t\x12\x1a\n\x12posture_deployment\x18\x04 \x01(\t\x12\x16\n\x0e\x63hanged_policy\x18\x05 \x01(\t\x12\x12\n\npolicy_set\x18\x06 \x01(\t\x12\x0e\n\x06policy\x18\x07 \x01(\t\x12`\n\x14policy_drift_details\x18\x08 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails\x1aS\n\x12PolicyDriftDetails\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x16\n\x0e\x65xpected_value\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x65tected_value\x18\x03 \x01(\tB\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14SecurityPostureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - SecurityPosture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPosture").msgclass - SecurityPosture::PolicyDriftDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb deleted file mode 100644 index 438d7aa19da5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/securitycenter_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/cloud/securitycenter/v2/attack_path_pb' -require 'google/cloud/securitycenter/v2/bigquery_export_pb' -require 'google/cloud/securitycenter/v2/external_system_pb' -require 'google/cloud/securitycenter/v2/finding_pb' -require 'google/cloud/securitycenter/v2/mute_config_pb' -require 'google/cloud/securitycenter/v2/notification_config_pb' -require 'google/cloud/securitycenter/v2/resource_pb' -require 'google/cloud/securitycenter/v2/resource_value_config_pb' -require 'google/cloud/securitycenter/v2/security_marks_pb' -require 'google/cloud/securitycenter/v2/simulation_pb' -require 'google/cloud/securitycenter/v2/source_pb' -require 'google/cloud/securitycenter/v2/valued_resource_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n;google/cloud/securitycenter/v2/securitycenter_service.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x30google/cloud/securitycenter/v2/attack_path.proto\x1a\x34google/cloud/securitycenter/v2/bigquery_export.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a,google/cloud/securitycenter/v2/finding.proto\x1a\x30google/cloud/securitycenter/v2/mute_config.proto\x1a\x38google/cloud/securitycenter/v2/notification_config.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a:google/cloud/securitycenter/v2/resource_value_config.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a/google/cloud/securitycenter/v2/simulation.proto\x1a+google/cloud/securitycenter/v2/source.proto\x1a\x34google/cloud/securitycenter/v2/valued_resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\x01\n&BatchCreateResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x08requests\x18\x02 \x03(\x0b\x32@.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestB\x03\xe0\x41\x02\"~\n\'BatchCreateResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xe3\x01\n\x17\x42ulkMuteFindingsRequest\x12\x19\n\x06parent\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12Z\n\nmute_state\x18\x03 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteStateB\x03\xe0\x41\x01\"A\n\tMuteState\x12\x1a\n\x16MUTE_STATE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\r\n\tUNDEFINED\x10\x02\"\x1a\n\x18\x42ulkMuteFindingsResponse\"\xd4\x01\n\x1b\x43reateBigQueryExportRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12M\n\x10\x62ig_query_export\x18\x02 \x01(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExportB\x03\xe0\x41\x02\x12 \n\x13\x62ig_query_export_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xac\x01\n\x14\x43reateFindingRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x17\n\nfinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x07\x66inding\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingB\x03\xe0\x41\x02\"\xbe\x01\n\x17\x43reateMuteConfigRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x44\n\x0bmute_config\x18\x02 \x01(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfigB\x03\xe0\x41\x02\x12\x1b\n\x0emute_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xd9\x01\n\x1f\x43reateNotificationConfigRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x16\n\tconfig_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x13notification_config\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfigB\x03\xe0\x41\x02\"\xc6\x01\n CreateResourceValueConfigRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x15resource_value_config\x18\x02 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\"\x9c\x01\n\x13\x43reateSourceRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12;\n\x06source\x18\x02 \x01(\x0b\x32&.google.cloud.securitycenter.v2.SourceB\x03\xe0\x41\x02\"a\n\x1b\x44\x65leteBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"Y\n\x17\x44\x65leteMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"i\n\x1f\x44\x65leteNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"k\n DeleteResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"+\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xbe\x01\n\x16\x45xportFindingsMetadata\x12:\n\x11\x65xport_start_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12Y\n\x15\x62ig_query_destination\x18\x02 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.BigQueryDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"\x18\n\x16\x45xportFindingsResponse\"^\n\x18GetBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"V\n\x14GetMuteConfigRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/MuteConfig\"f\n\x1cGetNotificationConfigRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0securitycenter.googleapis.com/NotificationConfig\"h\n\x1dGetResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\xa2\x01\n\x14GroupFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\x8b\x01\n\x15GroupFindingsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v2.GroupResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\"\xb8\x01\n\x0bGroupResult\x12O\n\nproperties\x18\x01 \x03(\x0b\x32;.google.cloud.securitycenter.v2.GroupResult.PropertiesEntry\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x1aI\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"\x91\x01\n\x16ListAttackPathsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/AttackPath\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"t\n\x17ListAttackPathsResponse\x12@\n\x0c\x61ttack_paths\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v2.AttackPath\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x14GetSimulationRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(securitycenter.googleapis.com/Simulation\"^\n\x18GetValuedResourceRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/ValuedResource\"\x89\x01\n\x1aListBigQueryExportsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/BigQueryExport\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x1bListBigQueryExportsResponse\x12I\n\x11\x62ig_query_exports\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcc\x01\n\x13ListFindingsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12.\n\nfield_mask\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x11\n\tpage_size\x18\t \x01(\x05\"\xdf\x06\n\x14ListFindingsResponse\x12\x66\n\x15list_findings_results\x18\x01 \x03(\x0b\x32G.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xb1\x05\n\x12ListFindingsResult\x12\x38\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Finding\x12g\n\x08resource\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\x81\x01\n\x16ListMuteConfigsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"t\n\x17ListMuteConfigsResponse\x12@\n\x0cmute_configs\x18\x01 \x03(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x91\x01\n\x1eListNotificationConfigsRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x8c\x01\n\x1fListNotificationConfigsResponse\x12P\n\x14notification_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x93\x01\n\x1fListResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x90\x01\n ListResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x12ListSourcesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$securitycenter.googleapis.com/Source\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x07 \x01(\x05\"g\n\x13ListSourcesResponse\x12\x37\n\x07sources\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.Source\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb0\x01\n\x1aListValuedResourcesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,securitycenter.googleapis.com/ValuedResource\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x94\x01\n\x1bListValuedResourcesResponse\x12H\n\x10valued_resources\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.ValuedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x98\x01\n\x16SetFindingStateRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12\x41\n\x05state\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x02\"\x8e\x01\n\x0eSetMuteRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%securitycenter.googleapis.com/Finding\x12?\n\x04mute\x18\x02 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.MuteB\x03\xe0\x41\x02\"\x9d\x01\n\x1bUpdateBigQueryExportRequest\x12M\n\x10\x62ig_query_export\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExportB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x9c\x01\n\x1bUpdateExternalSystemRequest\x12L\n\x0f\x65xternal_system\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.ExternalSystemB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x86\x01\n\x14UpdateFindingRequest\x12=\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x90\x01\n\x17UpdateMuteConfigRequest\x12\x44\n\x0bmute_config\x18\x01 \x01(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa8\x01\n\x1fUpdateNotificationConfigRequest\x12T\n\x13notification_config\x18\x01 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xac\x01\n UpdateResourceValueConfigRequest\x12W\n\x15resource_value_config\x18\x01 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x99\x01\n\x1aUpdateSecurityMarksRequest\x12J\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x83\x01\n\x13UpdateSourceRequest\x12;\n\x06source\x18\x01 \x01(\x0b\x32&.google.cloud.securitycenter.v2.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask2\xe2\x81\x01\n\x0eSecurityCenter\x12\xe0\x02\n\x1f\x42\x61tchCreateResourceValueConfigs\x12\x46.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest\x1aG.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse\"\xab\x01\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x92\x01\"=/v2/{parent=organizations/*}/resourceValueConfigs:batchCreate:\x01*ZN\"I/v2/{parent=organizations/*/locations/*}/resourceValueConfigs:batchCreate:\x01*\x12\x9a\x04\n\x10\x42ulkMuteFindings\x12\x37.google.cloud.securitycenter.v2.BulkMuteFindingsRequest\x1a\x1d.google.longrunning.Operation\"\xad\x03\xca\x41P\n7google.cloud.securitycenter.v2.BulkMuteFindingsResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xca\x02\"./v2/{parent=organizations/*}/findings:bulkMute:\x01*Z?\":/v2/{parent=organizations/*/locations/*}/findings:bulkMute:\x01*Z-\"(/v2/{parent=folders/*}/findings:bulkMute:\x01*Z9\"4/v2/{parent=folders/*/locations/*}/findings:bulkMute:\x01*Z.\")/v2/{parent=projects/*}/findings:bulkMute:\x01*Z:\"5/v2/{parent=projects/*/locations/*}/findings:bulkMute:\x01*\x12\x98\x03\n\x14\x43reateBigQueryExport\x12;.google.cloud.securitycenter.v2.CreateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\x92\x02\xda\x41+parent,big_query_export,big_query_export_id\x82\xd3\xe4\x93\x02\xdd\x01\"8/v2/{parent=organizations/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZF\"2/v2/{parent=folders/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZG\"3/v2/{parent=projects/*/locations/*}/bigQueryExports:\x10\x62ig_query_export\x12\x96\x02\n\rCreateFinding\x12\x34.google.cloud.securitycenter.v2.CreateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xa5\x01\xda\x41\x19parent,finding,finding_id\x82\xd3\xe4\x93\x02\x82\x01\";/v2/{parent=organizations/*/sources/*/locations/*}/findings:\x07\x66indingZ:\"//v2/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\x99\x05\n\x10\x43reateMuteConfig\x12\x37.google.cloud.securitycenter.v2.CreateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\x9f\x04\xda\x41!parent,mute_config,mute_config_id\x82\xd3\xe4\x93\x02\xe2\x02\"4/v2/{parent=organizations/*/locations/*}/muteConfigs:\x0bmute_configZ=\"./v2/{parent=folders/*/locations/*}/muteConfigs:\x0bmute_configZ>\"//v2/{parent=projects/*/locations/*}/muteConfigs:\x0bmute_configZ7\"(/v2/{parent=organizations/*}/muteConfigs:\x0bmute_configZ1\"\"/v2/{parent=folders/*}/muteConfigs:\x0bmute_configZ2\"#/v2/{parent=projects/*}/muteConfigs:\x0bmute_config\x8a\xd3\xe4\x93\x02\x8b\x01\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\x30\n\x06parent\x12&organizations/*/locations/{location=*}\x12*\n\x06parent\x12 folders/*/locations/{location=*}\x12\xb2\x03\n\x18\x43reateNotificationConfig\x12?.google.cloud.securitycenter.v2.CreateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xa0\x02\xda\x41$parent,notification_config,config_id\x82\xd3\xe4\x93\x02\xf2\x01\".google.cloud.securitycenter.v2.ListNotificationConfigsRequest\x1a?.google.cloud.securitycenter.v2.ListNotificationConfigsResponse\"\xc3\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb3\x01\x12/v2/{name=folders/*/sources/*/locations/*/findings/*}:setState:\x01*Z8\"3/v2/{name=projects/*/sources/*/findings/*}:setState:\x01*ZD\"?/v2/{name=projects/*/sources/*/locations/*/findings/*}:setState:\x01*\x12\x9d\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"R\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02:\"5/v2/{resource=organizations/*/sources/*}:setIamPolicy:\x01*\x12\xf8\x03\n\x07SetMute\x12..google.cloud.securitycenter.v2.SetMuteRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\x93\x03\xda\x41\tname,mute\x82\xd3\xe4\x93\x02\x80\x03\"7/v2/{name=organizations/*/sources/*/findings/*}:setMute:\x01*ZH\"C/v2/{name=organizations/*/sources/*/locations/*/findings/*}:setMute:\x01*Z6\"1/v2/{name=folders/*/sources/*/findings/*}:setMute:\x01*ZB\"=/v2/{name=folders/*/sources/*/locations/*/findings/*}:setMute:\x01*Z7\"2/v2/{name=projects/*/sources/*/findings/*}:setMute:\x01*ZC\">/v2/{name=projects/*/sources/*/locations/*/findings/*}:setMute:\x01*\x12\xc8\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"]\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02@\";/v2/{resource=organizations/*/sources/*}:testIamPermissions:\x01*\x12\xbc\x03\n\x14UpdateBigQueryExport\x12;.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\xb6\x02\xda\x41\x1c\x62ig_query_export,update_mask\x82\xd3\xe4\x93\x02\x90\x02\x32I/v2/{big_query_export.name=organizations/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZW2C/v2/{big_query_export.name=folders/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZX2D/v2/{big_query_export.name=projects/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_export\x12\x9b\x06\n\x14UpdateExternalSystem\x12;.google.cloud.securitycenter.v2.UpdateExternalSystemRequest\x1a..google.cloud.securitycenter.v2.ExternalSystem\"\x95\x05\xda\x41\x1b\x65xternal_system,update_mask\x82\xd3\xe4\x93\x02\xf0\x04\x32Q/v2/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZp2]/v2/{external_system.name=organizations/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ^2K/v2/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZj2W/v2/{external_system.name=folders/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ_2L/v2/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZk2X/v2/{external_system.name=projects/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_system\x12\xb2\x04\n\rUpdateFinding\x12\x34.google.cloud.securitycenter.v2.UpdateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xc1\x03\xda\x41\x13\x66inding,update_mask\x82\xd3\xe4\x93\x02\xa4\x03\x32\x37/v2/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZN2C/v2/{finding.name=organizations/*/sources/*/locations/*/findings/*}:\x07\x66indingZ<21/v2/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZH2=/v2/{finding.name=folders/*/sources/*/locations/*/findings/*}:\x07\x66indingZ=22/v2/{finding.name=projects/*/sources/*/findings/*}:\x07\x66indingZI2>/v2/{finding.name=projects/*/sources/*/locations/*/findings/*}:\x07\x66inding\x12\x9f\x06\n\x10UpdateMuteConfig\x12\x37.google.cloud.securitycenter.v2.UpdateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\xa5\x05\xda\x41\x17mute_config,update_mask\x82\xd3\xe4\x93\x02\xaa\x03\x32\x34/v2/{mute_config.name=organizations/*/muteConfigs/*}:\x0bmute_configZO2@/v2/{mute_config.name=organizations/*/locations/*/muteConfigs/*}:\x0bmute_configZ=2./v2/{mute_config.name=folders/*/muteConfigs/*}:\x0bmute_configZI2:/v2/{mute_config.name=folders/*/locations/*/muteConfigs/*}:\x0bmute_configZ>2//v2/{mute_config.name=projects/*/muteConfigs/*}:\x0bmute_configZJ2;/v2/{mute_config.name=projects/*/locations/*/muteConfigs/*}:\x0bmute_config\x8a\xd3\xe4\x93\x02\xd3\x01\x12\x43\n\x10mute_config.name\x12/projects/*/locations/{location=*}/muteConfigs/*\x12H\n\x10mute_config.name\x12\x34organizations/*/locations/{location=*}/muteConfigs/*\x12\x42\n\x10mute_config.name\x12.folders/*/locations/{location=*}/muteConfigs/*\x12\xe9\x03\n\x18UpdateNotificationConfig\x12?.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xd7\x02\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\xae\x02\x32P/v2/{notification_config.name=organizations/*/locations/*/notificationConfigs/*}:\x13notification_configZa2J/v2/{notification_config.name=folders/*/locations/*/notificationConfigs/*}:\x13notification_configZb2K/v2/{notification_config.name=projects/*/locations/*/notificationConfigs/*}:\x13notification_config\x12\x8e\x03\n\x19UpdateResourceValueConfig\x12@.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xf9\x01\xda\x41!resource_value_config,update_mask\x82\xd3\xe4\x93\x02\xce\x01\x32G/v2/{resource_value_config.name=organizations/*/resourceValueConfigs/*}:\x15resource_value_configZl2S/v2/{resource_value_config.name=organizations/*/locations/*/resourceValueConfigs/*}:\x15resource_value_config\x12\xe4\x07\n\x13UpdateSecurityMarks\x12:.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest\x1a-.google.cloud.securitycenter.v2.SecurityMarks\"\xe1\x06\xda\x41\x1asecurity_marks,update_mask\x82\xd3\xe4\x93\x02\xbd\x06\x32L/v2/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZR2@/v2/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZj2X/v2/{security_marks.name=organizations/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZX2F/v2/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZL2:/v2/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZd2R/v2/{security_marks.name=folders/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZY2G/v2/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZM2;/v2/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZe2S/v2/{security_marks.name=projects/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marks\x12\xbd\x01\n\x0cUpdateSource\x12\x33.google.cloud.securitycenter.v2.UpdateSourceRequest\x1a&.google.cloud.securitycenter.v2.Source\"P\xda\x41\x12source,update_mask\x82\xd3\xe4\x93\x02\x35\x32+/v2/{source.name=organizations/*/sources/*}:\x06source\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe2\x04\n\"com.google.cloud.securitycenter.v2B\x1aSecuritycenterServiceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41g\n2securitycenter.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41U\n,securitycenter.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41\xa8\x01\n8securitycenter.googleapis.com/OrganizationValuedResource\x12lorganizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - BatchCreateResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest").msgclass - BatchCreateResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse").msgclass - BulkMuteFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsRequest").msgclass - BulkMuteFindingsRequest::MuteState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteState").enummodule - BulkMuteFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsResponse").msgclass - CreateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateBigQueryExportRequest").msgclass - CreateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateFindingRequest").msgclass - CreateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateMuteConfigRequest").msgclass - CreateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateNotificationConfigRequest").msgclass - CreateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateResourceValueConfigRequest").msgclass - CreateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateSourceRequest").msgclass - DeleteBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteBigQueryExportRequest").msgclass - DeleteMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteMuteConfigRequest").msgclass - DeleteNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteNotificationConfigRequest").msgclass - DeleteResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest").msgclass - BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BigQueryDestination").msgclass - ExportFindingsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExportFindingsMetadata").msgclass - ExportFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExportFindingsResponse").msgclass - GetBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetBigQueryExportRequest").msgclass - GetMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetMuteConfigRequest").msgclass - GetNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetNotificationConfigRequest").msgclass - GetResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetResourceValueConfigRequest").msgclass - GetSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetSourceRequest").msgclass - GroupFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupFindingsRequest").msgclass - GroupFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupFindingsResponse").msgclass - GroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupResult").msgclass - ListAttackPathsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListAttackPathsRequest").msgclass - ListAttackPathsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListAttackPathsResponse").msgclass - GetSimulationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetSimulationRequest").msgclass - GetValuedResourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetValuedResourceRequest").msgclass - ListBigQueryExportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListBigQueryExportsRequest").msgclass - ListBigQueryExportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListBigQueryExportsResponse").msgclass - ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsRequest").msgclass - ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse").msgclass - ListFindingsResponse::ListFindingsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult").msgclass - ListFindingsResponse::ListFindingsResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource").msgclass - ListMuteConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListMuteConfigsRequest").msgclass - ListMuteConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListMuteConfigsResponse").msgclass - ListNotificationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListNotificationConfigsRequest").msgclass - ListNotificationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListNotificationConfigsResponse").msgclass - ListResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListResourceValueConfigsRequest").msgclass - ListResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListResourceValueConfigsResponse").msgclass - ListSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListSourcesRequest").msgclass - ListSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListSourcesResponse").msgclass - ListValuedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListValuedResourcesRequest").msgclass - ListValuedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListValuedResourcesResponse").msgclass - SetFindingStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SetFindingStateRequest").msgclass - SetMuteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SetMuteRequest").msgclass - UpdateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateBigQueryExportRequest").msgclass - UpdateExternalSystemRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateExternalSystemRequest").msgclass - UpdateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateFindingRequest").msgclass - UpdateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateMuteConfigRequest").msgclass - UpdateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateNotificationConfigRequest").msgclass - UpdateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest").msgclass - UpdateSecurityMarksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateSecurityMarksRequest").msgclass - UpdateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateSourceRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb deleted file mode 100644 index 36c3f5bae249..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb +++ /dev/null @@ -1,167 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/securitycenter/v2/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V2' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/securitycenter/v2/securitycenter_service_pb' - -module Google - module Cloud - module SecurityCenter - module V2 - module SecurityCenter - # V2 APIs for Security Center service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.securitycenter.v2.SecurityCenter' - - # Creates a ResourceValueConfig for an organization. Maps user's tags to - # difference resource values for use by the attack path simulation. - rpc :BatchCreateResourceValueConfigs, ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse - # Kicks off an LRO to bulk mute findings for a parent based on a filter. If - # no location is specified, findings are muted in global. The parent - # can be either an organization, folder, or project. The findings matched by - # the filter will be muted after the LRO is done. - rpc :BulkMuteFindings, ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest, ::Google::Longrunning::Operation - # Creates a BigQuery export. - rpc :CreateBigQueryExport, ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport - # Creates a finding in a location. The corresponding source must exist for - # finding creation to succeed. - rpc :CreateFinding, ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest, ::Google::Cloud::SecurityCenter::V2::Finding - # Creates a mute config. - rpc :CreateMuteConfig, ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig - # Creates a notification config. - rpc :CreateNotificationConfig, ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig - # Creates a source. - rpc :CreateSource, ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source - # Deletes an existing BigQuery export. - rpc :DeleteBigQueryExport, ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest, ::Google::Protobuf::Empty - # Deletes an existing mute config. If no location is specified, default is - # global. - rpc :DeleteMuteConfig, ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest, ::Google::Protobuf::Empty - # Deletes a notification config. - rpc :DeleteNotificationConfig, ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest, ::Google::Protobuf::Empty - # Deletes a ResourceValueConfig. - rpc :DeleteResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest, ::Google::Protobuf::Empty - # Gets a BigQuery export. - rpc :GetBigQueryExport, ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport - # Get the simulation by name or the latest simulation for the given - # organization. - rpc :GetSimulation, ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest, ::Google::Cloud::SecurityCenter::V2::Simulation - # Get the valued resource by name - rpc :GetValuedResource, ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest, ::Google::Cloud::SecurityCenter::V2::ValuedResource - # Gets the access control policy on the specified Source. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets a mute config. If no location is specified, default is - # global. - rpc :GetMuteConfig, ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig - # Gets a notification config. - rpc :GetNotificationConfig, ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig - # Gets a ResourceValueConfig. - rpc :GetResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig - # Gets a source. - rpc :GetSource, ::Google::Cloud::SecurityCenter::V2::GetSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source - # Filters an organization or source's findings and groups them by their - # specified properties in a location. If no location is specified, findings - # are assumed to be in global - # - # To group across all sources provide a `-` as the source id. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - # + `/v2/folders/{folder_id}/sources/-/findings` - # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` - # + `/v2/projects/{project_id}/sources/-/findings` - # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` - rpc :GroupFindings, ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest, ::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse - # Lists the attack paths for a set of simulation results or valued resources - # and filter. - rpc :ListAttackPaths, ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest, ::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse - # Lists BigQuery exports. Note that when requesting BigQuery exports at a - # given level all exports under that level are also returned e.g. if - # requesting BigQuery exports under a folder, then all BigQuery exports - # immediately under the folder plus the ones created under the projects - # within the folder are returned. - rpc :ListBigQueryExports, ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest, ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse - # Lists an organization or source's findings. - # - # To list across all sources for a given location provide a `-` as the source - # id. If no location is specified, finding are assumed to be in global. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - rpc :ListFindings, ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest, ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse - # Lists mute configs. If no location is specified, default is - # global. - rpc :ListMuteConfigs, ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse - # Lists notification configs. - rpc :ListNotificationConfigs, ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse - # Lists all ResourceValueConfigs. - rpc :ListResourceValueConfigs, ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse - # Lists all sources belonging to an organization. - rpc :ListSources, ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest, ::Google::Cloud::SecurityCenter::V2::ListSourcesResponse - # Lists the valued resources for a set of simulation results and filter. - rpc :ListValuedResources, ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest, ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse - # Updates the state of a finding. If no location is specified, finding is - # assumed to be in global - rpc :SetFindingState, ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest, ::Google::Cloud::SecurityCenter::V2::Finding - # Sets the access control policy on the specified Source. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Updates the mute state of a finding. If no location is specified, finding - # is assumed to be in global - rpc :SetMute, ::Google::Cloud::SecurityCenter::V2::SetMuteRequest, ::Google::Cloud::SecurityCenter::V2::Finding - # Returns the permissions that a caller has on the specified source. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Updates a BigQuery export. - rpc :UpdateBigQueryExport, ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport - # Updates external system. This is for a given finding. If no location is - # specified, finding is assumed to be in global - rpc :UpdateExternalSystem, ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest, ::Google::Cloud::SecurityCenter::V2::ExternalSystem - # Creates or updates a finding. If no location is specified, finding is - # assumed to be in global. The corresponding source must exist for a finding - # creation to succeed. - rpc :UpdateFinding, ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest, ::Google::Cloud::SecurityCenter::V2::Finding - # Updates a mute config. If no location is specified, default is - # global. - rpc :UpdateMuteConfig, ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - rpc :UpdateNotificationConfig, ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig - # Updates an existing ResourceValueConfigs with new rules. - rpc :UpdateResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig - # Updates security marks. For Finding Security marks, if no location is - # specified, finding is assumed to be in global. Assets Security Marks can - # only be accessed through global endpoint. - rpc :UpdateSecurityMarks, ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest, ::Google::Cloud::SecurityCenter::V2::SecurityMarks - # Updates a source. - rpc :UpdateSource, ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb deleted file mode 100644 index 7ffa40f95f0a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/simulation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v2/resource_pb' -require 'google/cloud/securitycenter/v2/valued_resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/simulation.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a\x34google/cloud/securitycenter/v2/valued_resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\x03\n\nSimulation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x64\n\x1fresource_value_configs_metadata\x18\x03 \x03(\x0b\x32;.google.cloud.securitycenter.v2.ResourceValueConfigMetadata\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider:\xca\x01\xea\x41\xc6\x01\n(securitycenter.googleapis.com/Simulation\x12\x35organizations/{organization}/simulations/{simulation}\x12Jorganizations/{organization}/locations/{location}/simulations/{simluation}*\x0bsimulations2\nsimulationB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fSimulationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Simulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Simulation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb deleted file mode 100644 index 073204318455..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/source.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n+google/cloud/securitycenter/v2/source.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xfd\x01\n\x06Source\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x16\n\x0e\x63\x61nonical_name\x18\x04 \x01(\t:\xa1\x01\xea\x41\x9d\x01\n$securitycenter.googleapis.com/Source\x12-organizations/{organization}/sources/{source}\x12!folders/{folder}/sources/{source}\x12#projects/{project}/sources/{source}B\xe5\x01\n\"com.google.cloud.securitycenter.v2B\x0bSourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Source").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb deleted file mode 100644 index 7096e7b98ac2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/toxic_combination.proto - -require 'google/protobuf' - - -descriptor_data = "\n6google/cloud/securitycenter/v2/toxic_combination.proto\x12\x1egoogle.cloud.securitycenter.v2\"K\n\x10ToxicCombination\x12\x1d\n\x15\x61ttack_exposure_score\x18\x01 \x01(\x01\x12\x18\n\x10related_findings\x18\x02 \x03(\tB\xef\x01\n\"com.google.cloud.securitycenter.v2B\x15ToxicCombinationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - ToxicCombination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ToxicCombination").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb deleted file mode 100644 index b7df23211efc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/valued_resource.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v2/valued_resource.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xc6\x05\n\x0eValuedResource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08resource\x18\x02 \x01(\t\x12\x15\n\rresource_type\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\t\x12T\n\x0eresource_value\x18\x05 \x01(\x0e\x32<.google.cloud.securitycenter.v2.ValuedResource.ResourceValue\x12\x15\n\rexposed_score\x18\x06 \x01(\x01\x12`\n\x1bresource_value_configs_used\x18\x07 \x03(\x0b\x32;.google.cloud.securitycenter.v2.ResourceValueConfigMetadata\"{\n\rResourceValue\x12\x1e\n\x1aRESOURCE_VALUE_UNSPECIFIED\x10\x00\x12\x16\n\x12RESOURCE_VALUE_LOW\x10\x01\x12\x19\n\x15RESOURCE_VALUE_MEDIUM\x10\x02\x12\x17\n\x13RESOURCE_VALUE_HIGH\x10\x03:\x9a\x02\xea\x41\x96\x02\n,securitycenter.googleapis.com/ValuedResource\x12Worganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}\x12lorganizations/{organization}/locations/{location}/simulations/{simluation}/valuedResources/{valued_resource}*\x0fvaluedResources2\x0evaluedResource\"+\n\x1bResourceValueConfigMetadata\x12\x0c\n\x04name\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13ValuedResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - ValuedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ValuedResource").msgclass - ValuedResource::ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ValuedResource.ResourceValue").enummodule - ResourceValueConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfigMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb deleted file mode 100644 index 00ccbb3b5a21..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/vertex_ai.proto - -require 'google/protobuf' - - -descriptor_data = "\n.google/cloud/securitycenter/v2/vertex_ai.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x83\x02\n\x08VertexAi\x12\x42\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x30.google.cloud.securitycenter.v2.VertexAi.Dataset\x12\x44\n\tpipelines\x18\x02 \x03(\x0b\x32\x31.google.cloud.securitycenter.v2.VertexAi.Pipeline\x1a=\n\x07\x44\x61taset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0e\n\x06source\x18\x03 \x01(\t\x1a.\n\x08Pipeline\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\tB\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rVertexAiProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - VertexAi = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi").msgclass - VertexAi::Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi.Dataset").msgclass - VertexAi::Pipeline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi.Pipeline").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb deleted file mode 100644 index deb4b635f6df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/vulnerability.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/securitycenter/v2/vulnerability.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf5\x02\n\rVulnerability\x12\x30\n\x03\x63ve\x18\x01 \x01(\x0b\x32#.google.cloud.securitycenter.v2.Cve\x12\x42\n\x11offending_package\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12>\n\rfixed_package\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12K\n\x11security_bulletin\x18\x04 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.SecurityBulletin\x12\x1b\n\x13provider_risk_score\x18\x05 \x01(\x03\x12\x11\n\treachable\x18\x06 \x01(\x08\x12\x31\n\x04\x63wes\x18\x07 \x03(\x0b\x32#.google.cloud.securitycenter.v2.Cwe\"\xc7\x05\n\x03\x43ve\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v2.Reference\x12\x36\n\x06\x63vssv3\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Cvssv3\x12\x1e\n\x16upstream_fix_available\x18\x04 \x01(\x08\x12>\n\x06impact\x18\x05 \x01(\x0e\x32..google.cloud.securitycenter.v2.Cve.RiskRating\x12W\n\x15\x65xploitation_activity\x18\x06 \x01(\x0e\x32\x38.google.cloud.securitycenter.v2.Cve.ExploitationActivity\x12\x1c\n\x14observed_in_the_wild\x18\x07 \x01(\x08\x12\x10\n\x08zero_day\x18\x08 \x01(\x08\x12\x38\n\x14\x65xploit_release_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12;\n\x17\x66irst_exploitation_date\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"V\n\nRiskRating\x12\x1b\n\x17RISK_RATING_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04\"\x84\x01\n\x14\x45xploitationActivity\x12%\n!EXPLOITATION_ACTIVITY_UNSPECIFIED\x10\x00\x12\x08\n\x04WIDE\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\r\n\tAVAILABLE\x10\x03\x12\x0f\n\x0b\x41NTICIPATED\x10\x04\x12\x0c\n\x08NO_KNOWN\x10\x05\"(\n\tReference\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\"\xb1\n\n\x06\x43vssv3\x12\x12\n\nbase_score\x18\x01 \x01(\x01\x12J\n\rattack_vector\x18\x02 \x01(\x0e\x32\x33.google.cloud.securitycenter.v2.Cvssv3.AttackVector\x12R\n\x11\x61ttack_complexity\x18\x03 \x01(\x0e\x32\x37.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity\x12V\n\x13privileges_required\x18\x04 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired\x12P\n\x10user_interaction\x18\x05 \x01(\x0e\x32\x36.google.cloud.securitycenter.v2.Cvssv3.UserInteraction\x12;\n\x05scope\x18\x06 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Cvssv3.Scope\x12M\n\x16\x63onfidentiality_impact\x18\x07 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12G\n\x10integrity_impact\x18\x08 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12J\n\x13\x61vailability_impact\x18\t \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\"\x99\x01\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_VECTOR_NETWORK\x10\x01\x12\x1a\n\x16\x41TTACK_VECTOR_ADJACENT\x10\x02\x12\x17\n\x13\x41TTACK_VECTOR_LOCAL\x10\x03\x12\x1a\n\x16\x41TTACK_VECTOR_PHYSICAL\x10\x04\"l\n\x10\x41ttackComplexity\x12!\n\x1d\x41TTACK_COMPLEXITY_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41TTACK_COMPLEXITY_LOW\x10\x01\x12\x1a\n\x16\x41TTACK_COMPLEXITY_HIGH\x10\x02\"\x92\x01\n\x12PrivilegesRequired\x12#\n\x1fPRIVILEGES_REQUIRED_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVILEGES_REQUIRED_NONE\x10\x01\x12\x1b\n\x17PRIVILEGES_REQUIRED_LOW\x10\x02\x12\x1c\n\x18PRIVILEGES_REQUIRED_HIGH\x10\x03\"m\n\x0fUserInteraction\x12 \n\x1cUSER_INTERACTION_UNSPECIFIED\x10\x00\x12\x19\n\x15USER_INTERACTION_NONE\x10\x01\x12\x1d\n\x19USER_INTERACTION_REQUIRED\x10\x02\"F\n\x05Scope\x12\x15\n\x11SCOPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSCOPE_UNCHANGED\x10\x01\x12\x11\n\rSCOPE_CHANGED\x10\x02\"R\n\x06Impact\x12\x16\n\x12IMPACT_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIMPACT_HIGH\x10\x01\x12\x0e\n\nIMPACT_LOW\x10\x02\x12\x0f\n\x0bIMPACT_NONE\x10\x03\"_\n\x07Package\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0f\n\x07\x63pe_uri\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x17\n\x0fpackage_version\x18\x04 \x01(\t\"\x7f\n\x10SecurityBulletin\x12\x13\n\x0b\x62ulletin_id\x18\x01 \x01(\t\x12\x33\n\x0fsubmission_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12!\n\x19suggested_upgrade_version\x18\x03 \x01(\t\"P\n\x03\x43we\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v2.ReferenceB\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12VulnerabilityProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Vulnerability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Vulnerability").msgclass - Cve = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve").msgclass - Cve::RiskRating = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve.RiskRating").enummodule - Cve::ExploitationActivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve.ExploitationActivity").enummodule - Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Reference").msgclass - Cvssv3 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3").msgclass - Cvssv3::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.AttackVector").enummodule - Cvssv3::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.AttackComplexity").enummodule - Cvssv3::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired").enummodule - Cvssv3::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.UserInteraction").enummodule - Cvssv3::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.Scope").enummodule - Cvssv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.Impact").enummodule - Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Package").msgclass - SecurityBulletin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityBulletin").msgclass - Cwe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cwe").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md deleted file mode 100644 index c8ec50fdacaa..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Security Command Center V2 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb deleted file mode 100644 index 6d71a9430253..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,463 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. The order of - # the key-value pairs is undefined, the order of the `routing_parameters` in - # the `RoutingRule` only matters for the evaluation order of the path - # templates when `field` is the same. See the examples below for more details. - # - # Every key and value in the routing header must be percent-encoded, - # and joined together in the following format: `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb deleted file mode 100644 index 4b452fd07cb2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb +++ /dev/null @@ -1,120 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Represents an access event. - # @!attribute [rw] principal_email - # @return [::String] - # Associated email, such as "foo@google.com". - # - # The email address of the authenticated user or a service account acting on - # behalf of a third party principal making the request. For third party - # identity callers, the `principal_subject` field is populated instead of - # this field. For privacy reasons, the principal email address is sometimes - # redacted. For more information, see [Caller identities in audit - # logs](https://cloud.google.com/logging/docs/audit#user-id). - # @!attribute [rw] caller_ip - # @return [::String] - # Caller's IP address, such as "1.1.1.1". - # @!attribute [rw] caller_ip_geo - # @return [::Google::Cloud::SecurityCenter::V2::Geolocation] - # The caller IP's geolocation, which identifies where the call came from. - # @!attribute [rw] user_agent_family - # @return [::String] - # Type of user agent associated with the finding. For example, an operating - # system shell or an embedded or standalone application. - # @!attribute [rw] user_agent - # @return [::String] - # The caller's user agent string associated with the finding. - # @!attribute [rw] service_name - # @return [::String] - # This is the API service that the service account made a call to, e.g. - # "iam.googleapis.com" - # @!attribute [rw] method_name - # @return [::String] - # The method that the service account called, e.g. "SetIamPolicy". - # @!attribute [rw] principal_subject - # @return [::String] - # A string that represents the principal_subject that is associated with the - # identity. Unlike `principal_email`, `principal_subject` supports principals - # that aren't associated with email addresses, such as third party - # principals. For most identities, the format is - # `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. - # Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, - # still use the legacy format `serviceAccount:{identity pool - # name}[\\{subject}]`. - # @!attribute [rw] service_account_key_name - # @return [::String] - # The name of the service account key that was used to create or exchange - # credentials when authenticating the service account that made the request. - # This is a scheme-less URI full resource name. For example: - # - # "//iam.googleapis.com/projects/\\{PROJECT_ID}/serviceAccounts/\\{ACCOUNT}/keys/\\{key}". - # @!attribute [rw] service_account_delegation_info - # @return [::Array<::Google::Cloud::SecurityCenter::V2::ServiceAccountDelegationInfo>] - # The identity delegation history of an authenticated service account that - # made the request. The `serviceAccountDelegationInfo[]` object contains - # information about the real authorities that try to access Google Cloud - # resources by delegating on a service account. When multiple authorities are - # present, they are guaranteed to be sorted based on the original ordering of - # the identity delegation events. - # @!attribute [rw] user_name - # @return [::String] - # A string that represents a username. The username provided depends on the - # type of the finding and is likely not an IAM principal. For example, this - # can be a system username if the finding is related to a virtual machine, or - # it can be an application login username. - class Access - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Identity delegation history of an authenticated service account. - # @!attribute [rw] principal_email - # @return [::String] - # The email address of a Google account. - # @!attribute [rw] principal_subject - # @return [::String] - # A string representing the principal_subject associated with the identity. - # As compared to `principal_email`, supports principals that aren't - # associated with email addresses, such as third party principals. For most - # identities, the format will be `principal://iam.googleapis.com/{identity - # pool name}/subjects/\\{subject}` except for some GKE identities - # (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - # format `serviceAccount:{identity pool name}[{subject}]` - class ServiceAccountDelegationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a geographical location for a given access. - # @!attribute [rw] region_code - # @return [::String] - # A CLDR. - class Geolocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb deleted file mode 100644 index 22a4e9fe9934..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.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! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Details about resources affected by this finding. - # @!attribute [rw] count - # @return [::Integer] - # The count of resources affected by the finding. - class AffectedResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb deleted file mode 100644 index 1f73c0cb72dd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Represents a monitored AI Agent. - # @!attribute [rw] id - # @return [::String] - # Identifier of the agent. - # @!attribute [rw] display_name - # @return [::String] - # The user friendly name of the specific agent instance where the finding was - # detected, for example, "Banking Agent". - class Agent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb deleted file mode 100644 index 04b633fa8589..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Represents details about an anomaly detected in an AI agent's behavior. - # @!attribute [rw] confidence_score - # @return [::Float] - # The overall confidence score indicating the likelihood that this session - # contains a true anomaly. The score ranges from 0.0 to 1.0, where 1.0 - # signifies 100% confidence in the presence of an anomaly and 0.0 signifies - # 0% confidence. - # @!attribute [rw] detector_references - # @return [::Array<::Google::Cloud::SecurityCenter::V2::DetectorReference>] - # The list of references to specific detectors that identified anomalies - # within this session. - # @!attribute [rw] invocation_references - # @return [::Array<::Google::Cloud::SecurityCenter::V2::InvocationReference>] - # References to the OpenTelemetry invocations. - class AgentAnomaly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a reference to a specific anomaly detector. - # @!attribute [rw] severity - # @return [::Google::Cloud::SecurityCenter::V2::DetectorReference::Severity] - # The severity of the detector. - # @!attribute [rw] detector_id - # @return [::String] - # The unique identifier of the detector. - # @!attribute [rw] display_name - # @return [::String] - # A human readable name for the detector, providing context on its purpose. - # For example, "ASI02: Tool Misuse", or "Excessive API Calls". - # @!attribute [rw] explanation - # @return [::String] - # A detailed explanation generated by an LLM or the detector itself, - # describing why this specific anomaly was flagged. This provides rationale - # and context for the detection. - # @!attribute [rw] recommendation - # @return [::String] - # Recommended steps or actions to remediate or investigate the anomaly - # flagged by this detector. These could include configuration changes, code - # adjustments, or further diagnostic procedures. - class DetectorReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Severity levels for detectors. - module Severity - # Unspecified severity. - SEVERITY_UNSPECIFIED = 0 - - # Critical severity. - CRITICAL = 1 - - # High severity. - HIGH = 2 - - # Medium severity. - MEDIUM = 3 - - # Low severity. - LOW = 4 - end - end - - # Represents a reference to a specific OpenTelemetry invocation. - # @!attribute [rw] invocation_id - # @return [::String] - # The unique identifier of the invocation. - class InvocationReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb deleted file mode 100644 index ec46f99686e4..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.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! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Represents a conversational session where the finding occurred. - # @!attribute [rw] session_id - # @return [::String] - # The session ID of a conversation. - class AgentSession - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb deleted file mode 100644 index fe0106b68b6d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Contains information about the AI model associated with the finding. - # @!attribute [rw] name - # @return [::String] - # The name of the AI model, for example, "gemini:1.0.0". - # @!attribute [rw] domain - # @return [::String] - # The domain of the model, for example, “image-classification”. - # @!attribute [rw] library - # @return [::String] - # The name of the model library, for example, “transformers”. - # @!attribute [rw] location - # @return [::String] - # The region in which the model is used, for example, “us-central1”. - # @!attribute [rw] publisher - # @return [::String] - # The publisher of the model, for example, “google” or “nvidia”. - # @!attribute [rw] deployment_platform - # @return [::Google::Cloud::SecurityCenter::V2::AiModel::DeploymentPlatform] - # The platform on which the model is deployed. - # @!attribute [rw] display_name - # @return [::String] - # The user defined display name of model. Ex. baseline-classification-model - class AiModel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The platform on which the model is deployed. - module DeploymentPlatform - # Unspecified deployment platform. - DEPLOYMENT_PLATFORM_UNSPECIFIED = 0 - - # Vertex AI. - VERTEX_AI = 1 - - # Google Kubernetes Engine. - GKE = 2 - - # Google Compute Engine. - GCE = 3 - - # Fine tuned model. - FINE_TUNED_MODEL = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb deleted file mode 100644 index 4c1fa3fef09b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Represents an application associated with a finding. - # @!attribute [rw] base_uri - # @return [::String] - # The base URI that identifies the network location of the application in - # which the vulnerability was detected. For example, `http://example.com`. - # @!attribute [rw] full_uri - # @return [::String] - # The full URI with payload that could be used to reproduce the - # vulnerability. For example, `http://example.com?p=aMmYgI6H`. - class Application - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb deleted file mode 100644 index d3543aea2fa0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # An attack exposure contains the results of an attack path simulation run. - # @!attribute [rw] score - # @return [::Float] - # A number between 0 (inclusive) and infinity that represents how important - # this finding is to remediate. The higher the score, the more important it - # is to remediate. - # @!attribute [rw] latest_calculation_time - # @return [::Google::Protobuf::Timestamp] - # The most recent time the attack exposure was updated on this finding. - # @!attribute [rw] attack_exposure_result - # @return [::String] - # The resource name of the attack path simulation result that contains the - # details regarding this attack exposure score. - # Example: `organizations/123/simulations/456/attackExposureResults/789` - # @!attribute [r] state - # @return [::Google::Cloud::SecurityCenter::V2::AttackExposure::State] - # Output only. What state this AttackExposure is in. This captures whether or - # not an attack exposure has been calculated or not. - # @!attribute [rw] exposed_high_value_resources_count - # @return [::Integer] - # The number of high value resources that are exposed as a result of this - # finding. - # @!attribute [rw] exposed_medium_value_resources_count - # @return [::Integer] - # The number of medium value resources that are exposed as a result of this - # finding. - # @!attribute [rw] exposed_low_value_resources_count - # @return [::Integer] - # The number of high value resources that are exposed as a result of this - # finding. - class AttackExposure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This enum defines the various states an AttackExposure can be in. - module State - # The state is not specified. - STATE_UNSPECIFIED = 0 - - # The attack exposure has been calculated. - CALCULATED = 1 - - # The attack exposure has not been calculated. - NOT_CALCULATED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb deleted file mode 100644 index 395034b6cbf5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb +++ /dev/null @@ -1,147 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # A path that an attacker could take to reach an exposed resource. - # @!attribute [rw] name - # @return [::String] - # The attack path name, for example, - # `organizations/12/simulations/34/valuedResources/56/attackPaths/78` - # @!attribute [rw] path_nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathNode>] - # A list of nodes that exist in this attack path. - # @!attribute [rw] edges - # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathEdge>] - # A list of the edges between nodes in this attack path. - class AttackPath - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents one point that an attacker passes through in this attack path. - # @!attribute [rw] resource - # @return [::String] - # The name of the resource at this point in the attack path. - # The format of the name follows the Cloud Asset Inventory [resource - # name - # format](https://cloud.google.com/asset-inventory/docs/resource-name-format) - # @!attribute [rw] resource_type - # @return [::String] - # The [supported resource - # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # @!attribute [rw] display_name - # @return [::String] - # Human-readable name of this resource. - # @!attribute [rw] associated_findings - # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathNode::PathNodeAssociatedFinding>] - # The findings associated with this node in the attack path. - # @!attribute [rw] uuid - # @return [::String] - # Unique id of the attack path node. - # @!attribute [rw] attack_steps - # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathNode::AttackStepNode>] - # A list of attack step nodes that exist in this attack path node. - class AttackPathNode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A finding that is associated with this node in the attack path. - # @!attribute [rw] canonical_finding - # @return [::String] - # Canonical name of the associated findings. Example: - # `organizations/123/sources/456/findings/789` - # @!attribute [rw] finding_category - # @return [::String] - # The additional taxonomy group within findings from a given source. - # @!attribute [rw] name - # @return [::String] - # Full resource name of the finding. - class PathNodeAssociatedFinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Detailed steps the attack can take between path nodes. - # @!attribute [rw] uuid - # @return [::String] - # Unique ID for one Node - # @!attribute [rw] type - # @return [::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathNode::NodeType] - # Attack step type. Can be either AND, OR or DEFENSE - # @!attribute [rw] display_name - # @return [::String] - # User friendly name of the attack step - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Attack step labels for metadata - # @!attribute [rw] description - # @return [::String] - # Attack step description - class AttackStepNode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The type of the incoming attack step node. - module NodeType - # Type not specified - NODE_TYPE_UNSPECIFIED = 0 - - # Incoming edge joined with AND - NODE_TYPE_AND = 1 - - # Incoming edge joined with OR - NODE_TYPE_OR = 2 - - # Incoming edge is defense - NODE_TYPE_DEFENSE = 3 - - # Incoming edge is attacker - NODE_TYPE_ATTACKER = 4 - end - end - - # Represents a connection between a source node and a destination node in - # this attack path. - # @!attribute [rw] source - # @return [::String] - # The attack node uuid of the source node. - # @!attribute [rw] destination - # @return [::String] - # The attack node uuid of the destination node. - class AttackPathEdge - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb deleted file mode 100644 index b49d6ad06453..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Information related to Google Cloud Backup and DR Service findings. - # @!attribute [rw] backup_template - # @return [::String] - # The name of a Backup and DR template which comprises one or more backup - # policies. See the [Backup and DR - # documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) - # for more information. For example, `snap-ov`. - # @!attribute [rw] policies - # @return [::Array<::String>] - # The names of Backup and DR policies that are associated with a template - # and that define when to run a backup, how frequently to run a backup, and - # how long to retain the backup image. For example, `onvaults`. - # @!attribute [rw] host - # @return [::String] - # The name of a Backup and DR host, which is managed by the backup and - # recovery appliance and known to the management console. The host can be of - # type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file - # system, etc.), vCenter, or an ESX server. See the [Backup and DR - # documentation on - # hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) - # for more information. For example, `centos7-01`. - # @!attribute [rw] applications - # @return [::Array<::String>] - # The names of Backup and DR applications. An application is a VM, database, - # or file system on a managed host monitored by a backup and recovery - # appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, - # `centos7-01-vol02`. - # @!attribute [rw] storage_pool - # @return [::String] - # The name of the Backup and DR storage pool that the backup and recovery - # appliance is storing data in. The storage pool could be of type Cloud, - # Primary, Snapshot, or OnVault. See the [Backup and DR documentation on - # storage - # pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). - # For example, `DiskPoolOne`. - # @!attribute [rw] policy_options - # @return [::Array<::String>] - # The names of Backup and DR advanced policy options of a policy applying to - # an application. See the [Backup and DR documentation on policy - # options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). - # For example, `skipofflineappsincongrp, nounmap`. - # @!attribute [rw] profile - # @return [::String] - # The name of the Backup and DR resource profile that specifies the storage - # media for backups of application and VM data. See the [Backup and DR - # documentation on - # profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). - # For example, `GCP`. - # @!attribute [rw] appliance - # @return [::String] - # The name of the Backup and DR appliance that captures, moves, and manages - # the lifecycle of backup data. For example, `backup-server-57137`. - # @!attribute [rw] backup_type - # @return [::String] - # The backup type of the Backup and DR image. - # For example, `Snapshot`, `Remote Snapshot`, `OnVault`. - # @!attribute [rw] backup_create_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp at which the Backup and DR backup was created. - class BackupDisasterRecovery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb deleted file mode 100644 index 09155c2a96e1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Configures how to deliver Findings to BigQuery Instance. - # @!attribute [rw] name - # @return [::String] - # Identifier. The relative resource name of this export. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name. - # The following list shows some examples: - # - # + - # `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` - # + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` - # + - # `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` - # - # This field is provided in responses, and is ignored when provided in create - # requests. - # @!attribute [rw] description - # @return [::String] - # The description of the export (max of 1024 characters). - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across create/update events - # of findings. The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @!attribute [rw] dataset - # @return [::String] - # The dataset to write findings' updates to. Its format is - # "projects/[project_id]/datasets/[bigquery_dataset_id]". - # BigQuery dataset unique ID must contain only letters (a-z, A-Z), numbers - # (0-9), or underscores (_). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the BigQuery export was created. - # This field is set by the server and will be ignored if provided on export - # on creation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent time at which the BigQuery export was updated. - # This field is set by the server and will be ignored if provided on export - # creation or update. - # @!attribute [r] most_recent_editor - # @return [::String] - # Output only. Email address of the user who last edited the BigQuery export. - # This field is set by the server and will be ignored if provided on export - # creation or update. - # @!attribute [r] principal - # @return [::String] - # Output only. The service account that needs permission to create table and - # upload data to the BigQuery dataset. - class BigQueryExport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb deleted file mode 100644 index 4ac87a98cfbd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Contains details about a chokepoint, which is a resource or resource group - # where high-risk attack paths converge, based on [attack path simulations] - # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). - # @!attribute [rw] related_findings - # @return [::Array<::String>] - # List of resource names of findings associated with this chokepoint. - # For example, organizations/123/sources/456/findings/789. - # This list will have at most 100 findings. - class Chokepoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb deleted file mode 100644 index de5568f900ac..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb +++ /dev/null @@ -1,138 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Fields related to Google Cloud Armor findings. - # @!attribute [rw] security_policy - # @return [::Google::Cloud::SecurityCenter::V2::SecurityPolicy] - # Information about the [Google Cloud Armor security - # policy](https://cloud.google.com/armor/docs/security-policy-overview) - # relevant to the finding. - # @!attribute [rw] requests - # @return [::Google::Cloud::SecurityCenter::V2::Requests] - # Information about incoming requests evaluated by [Google Cloud Armor - # security - # policies](https://cloud.google.com/armor/docs/security-policy-overview). - # @!attribute [rw] adaptive_protection - # @return [::Google::Cloud::SecurityCenter::V2::AdaptiveProtection] - # Information about potential Layer 7 DDoS attacks identified by [Google - # Cloud Armor Adaptive - # Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). - # @!attribute [rw] attack - # @return [::Google::Cloud::SecurityCenter::V2::Attack] - # Information about DDoS attack volume and classification. - # @!attribute [rw] threat_vector - # @return [::String] - # Distinguish between volumetric & protocol DDoS attack and - # application layer attacks. For example, "L3_4" for Layer 3 and Layer 4 DDoS - # attacks, or "L_7" for Layer 7 DDoS attacks. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Duration of attack from the start until the current moment (updated every 5 - # minutes). - class CloudArmor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the [Google Cloud Armor security - # policy](https://cloud.google.com/armor/docs/security-policy-overview) - # relevant to the finding. - # @!attribute [rw] name - # @return [::String] - # The name of the Google Cloud Armor security policy, for example, - # "my-security-policy". - # @!attribute [rw] type - # @return [::String] - # The type of Google Cloud Armor security policy for example, 'backend - # security policy', 'edge security policy', 'network edge security policy', - # or 'always-on DDoS protection'. - # @!attribute [rw] preview - # @return [::Boolean] - # Whether or not the associated rule or policy is in preview mode. - class SecurityPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the requests relevant to the finding. - # @!attribute [rw] ratio - # @return [::Float] - # For 'Increasing deny ratio', the ratio is the denied traffic divided by the - # allowed traffic. For 'Allowed traffic spike', the ratio is the allowed - # traffic in the short term divided by allowed traffic in the long term. - # @!attribute [rw] short_term_allowed - # @return [::Integer] - # Allowed RPS (requests per second) in the short term. - # @!attribute [rw] long_term_allowed - # @return [::Integer] - # Allowed RPS (requests per second) over the long term. - # @!attribute [rw] long_term_denied - # @return [::Integer] - # Denied RPS (requests per second) over the long term. - class Requests - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about [Google Cloud Armor Adaptive - # Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection). - # @!attribute [rw] confidence - # @return [::Float] - # A score of 0 means that there is low confidence that the detected event is - # an actual attack. A score of 1 means that there is high confidence that the - # detected event is an attack. See the [Adaptive Protection - # documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) - # for further explanation. - class AdaptiveProtection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about DDoS attack volume and classification. - # @!attribute [rw] volume_pps_long - # @return [::Integer] - # Total PPS (packets per second) volume of attack. - # @!attribute [rw] volume_bps_long - # @return [::Integer] - # Total BPS (bytes per second) volume of attack. - # @!attribute [rw] classification - # @return [::String] - # Type of attack, for example, 'SYN-flood', 'NTP-udp', or 'CHARGEN-udp'. - # @!attribute [rw] volume_pps - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Total PPS (packets per second) volume of attack. Deprecated - refer to - # volume_pps_long instead. - # @!attribute [rw] volume_bps - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Total BPS (bytes per second) volume of attack. Deprecated - refer to - # volume_bps_long instead. - class Attack - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb deleted file mode 100644 index 346e66b5e35d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # The [data profile](https://cloud.google.com/dlp/docs/data-profiles) - # associated with the finding. - # @!attribute [rw] data_profile - # @return [::String] - # Name of the data profile, for example, - # `projects/123/locations/europe/tableProfiles/8383929`. - # @!attribute [rw] parent_type - # @return [::Google::Cloud::SecurityCenter::V2::CloudDlpDataProfile::ParentType] - # The resource hierarchy level at which the data profile was generated. - class CloudDlpDataProfile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Parents for configurations that produce data profile findings. - module ParentType - # Unspecified parent type. - PARENT_TYPE_UNSPECIFIED = 0 - - # Organization-level configurations. - ORGANIZATION = 1 - - # Project-level configurations. - PROJECT = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb deleted file mode 100644 index 123bea548585..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection - # job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced - # the finding. - # @!attribute [rw] inspect_job - # @return [::String] - # Name of the inspection job, for example, - # `projects/123/locations/europe/dlpJobs/i-8383929`. - # @!attribute [rw] info_type - # @return [::String] - # The type of information (or - # *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, - # for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. - # @!attribute [rw] info_type_count - # @return [::Integer] - # The number of times Cloud DLP found this infoType within this job - # and resource. - # @!attribute [rw] full_scan - # @return [::Boolean] - # Whether Cloud DLP scanned the complete resource or a sampled subset. - class CloudDlpInspection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb deleted file mode 100644 index 01a4fe458c2d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Contains compliance information about a security standard indicating unmet - # recommendations. - # @!attribute [rw] standard - # @return [::String] - # Industry-wide compliance standards or benchmarks, such as CIS, PCI, and - # OWASP. - # @!attribute [rw] version - # @return [::String] - # Version of the standard or benchmark, for example, 1.1 - # @!attribute [rw] ids - # @return [::Array<::String>] - # Policies within the standard or benchmark, for example, A.12.4.1 - class Compliance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb deleted file mode 100644 index 6e6ae87bd5c1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Contains information about the IP connection associated with the finding. - # @!attribute [rw] destination_ip - # @return [::String] - # Destination IP address. Not present for sockets that are listening and not - # connected. - # @!attribute [rw] destination_port - # @return [::Integer] - # Destination port. Not present for sockets that are listening and not - # connected. - # @!attribute [rw] source_ip - # @return [::String] - # Source IP address. - # @!attribute [rw] source_port - # @return [::Integer] - # Source port. - # @!attribute [rw] protocol - # @return [::Google::Cloud::SecurityCenter::V2::Connection::Protocol] - # IANA Internet Protocol Number such as TCP(6) and UDP(17). - class Connection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # IANA Internet Protocol Number such as TCP(6) and UDP(17). - module Protocol - # Unspecified protocol (not HOPOPT). - PROTOCOL_UNSPECIFIED = 0 - - # Internet Control Message Protocol. - ICMP = 1 - - # Transmission Control Protocol. - TCP = 6 - - # User Datagram Protocol. - UDP = 17 - - # Generic Routing Encapsulation. - GRE = 47 - - # Encap Security Payload. - ESP = 50 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb deleted file mode 100644 index 70a23d045d97..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Details about specific contacts - # @!attribute [rw] contacts - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Contact>] - # A list of contacts - class ContactDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The email address of a contact. - # @!attribute [rw] email - # @return [::String] - # An email address. For example, "`person123@company.com`". - class Contact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb deleted file mode 100644 index 5fd4972d8657..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Container associated with the finding. - # @!attribute [rw] name - # @return [::String] - # Name of the container. - # @!attribute [rw] uri - # @return [::String] - # Container image URI provided when configuring a pod or container. This - # string can identify a container image version using mutable tags. - # @!attribute [rw] image_id - # @return [::String] - # Optional container image ID, if provided by the container runtime. Uniquely - # identifies the container image launched using a container image digest. - # @!attribute [rw] labels - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Label>] - # Container labels, as provided by the container runtime. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time that the container was created. - class Container - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb deleted file mode 100644 index 35c543064430..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Details about a data access attempt made by a principal not authorized under - # applicable data security policy. - # @!attribute [rw] event_id - # @return [::String] - # Unique identifier for data access event. - # @!attribute [rw] principal_email - # @return [::String] - # The email address of the principal that accessed the data. The principal - # could be a user account, service account, Google group, or other. - # @!attribute [rw] operation - # @return [::Google::Cloud::SecurityCenter::V2::DataAccessEvent::Operation] - # The operation performed by the principal to access the data. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp of data access event. - class DataAccessEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The operation of a data access event. - module Operation - # The operation is unspecified. - OPERATION_UNSPECIFIED = 0 - - # Represents a read operation. - READ = 1 - - # Represents a move operation. - MOVE = 2 - - # Represents a copy operation. - COPY = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb deleted file mode 100644 index ae25f8a2cff3..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Details about a data flow event, in which either the data is moved to or is - # accessed from a non-compliant geo-location, as defined in the applicable data - # security policy. - # @!attribute [rw] event_id - # @return [::String] - # Unique identifier for data flow event. - # @!attribute [rw] principal_email - # @return [::String] - # The email address of the principal that initiated the data flow event. The - # principal could be a user account, service account, Google group, or other. - # @!attribute [rw] operation - # @return [::Google::Cloud::SecurityCenter::V2::DataFlowEvent::Operation] - # The operation performed by the principal for the data flow event. - # @!attribute [rw] violated_location - # @return [::String] - # Non-compliant location of the principal or the data destination. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp of data flow event. - class DataFlowEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The operation of a data flow event. - module Operation - # The operation is unspecified. - OPERATION_UNSPECIFIED = 0 - - # Represents a read operation. - READ = 1 - - # Represents a move operation. - MOVE = 2 - - # Represents a copy operation. - COPY = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb deleted file mode 100644 index 978743068cc9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Details about data retention deletion violations, in which the data is - # non-compliant based on their retention or deletion time, as defined in the - # applicable data security policy. The Data Retention Deletion (DRD) control is - # a control of the DSPM (Data Security Posture Management) suite that enables - # organizations to manage data retention and deletion policies in compliance - # with regulations, such as GDPR and CRPA. DRD supports two primary policy - # types: maximum storage length (max TTL) and minimum storage length (min TTL). - # Both are aimed at helping organizations meet regulatory and data management - # commitments. - # @!attribute [rw] event_detection_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp indicating when the event was detected. - # @!attribute [rw] data_object_count - # @return [::Integer] - # Number of objects that violated the policy for this resource. If the number - # is less than 1,000, then the value of this field is the exact number. If - # the number of objects that violated the policy is greater than or equal to - # 1,000, then the value of this field is 1000. - # @!attribute [rw] max_retention_allowed - # @return [::Google::Protobuf::Duration] - # Maximum duration of retention allowed from the DRD control. This comes - # from the DRD control where users set a max TTL for their data. For example, - # suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days. - # However, an object in that bucket is 100 days old. In this case, a - # DataRetentionDeletionEvent will be generated for that Cloud Storage bucket, - # and the max_retention_allowed is 90 days. - # @!attribute [rw] event_type - # @return [::Google::Cloud::SecurityCenter::V2::DataRetentionDeletionEvent::EventType] - # Type of the DRD event. - class DataRetentionDeletionEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of the DRD event. - module EventType - # Unspecified event type. - EVENT_TYPE_UNSPECIFIED = 0 - - # The maximum retention time has been exceeded. - EVENT_TYPE_MAX_TTL_EXCEEDED = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb deleted file mode 100644 index 39782b12e5ae..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Represents database access information, such as queries. A database may be a - # sub-resource of an instance (as in the case of Cloud SQL instances or Cloud - # Spanner instances), or the database instance itself. Some database resources - # might not have the [full resource - # name](https://google.aip.dev/122#full-resource-names) populated because these - # resource types, such as Cloud SQL databases, are not yet supported by Cloud - # Asset Inventory. In these cases only the display name is provided. - # @!attribute [rw] name - # @return [::String] - # Some database resources may not have the [full resource - # name](https://google.aip.dev/122#full-resource-names) populated because - # these resource types are not yet supported by Cloud Asset Inventory (e.g. - # Cloud SQL databases). In these cases only the display name will be - # provided. - # The [full resource name](https://google.aip.dev/122#full-resource-names) of - # the database that the user connected to, if it is supported by Cloud Asset - # Inventory. - # @!attribute [rw] display_name - # @return [::String] - # The human-readable name of the database that the user connected to. - # @!attribute [rw] user_name - # @return [::String] - # The username used to connect to the database. The username might not be an - # IAM principal and does not have a set format. - # @!attribute [rw] query - # @return [::String] - # The SQL statement that is associated with the database access. - # @!attribute [rw] grantees - # @return [::Array<::String>] - # The target usernames, roles, or groups of an SQL privilege grant, which is - # not an IAM policy change. - # @!attribute [rw] version - # @return [::String] - # The version of the database, for example, POSTGRES_14. - # See [the complete - # list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). - class Database - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb deleted file mode 100644 index 0f63d09304ea..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Contains information about the disk associated with the finding. - # @!attribute [rw] name - # @return [::String] - # The name of the disk, for example, - # "https://www.googleapis.com/compute/v1/projects/\\{project-id}/zones/\\{zone-id}/disks/\\{disk-id}". - class Disk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb deleted file mode 100644 index e982b02dfc10..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Exfiltration represents a data exfiltration attempt from one or more sources - # to one or more targets. The `sources` attribute lists the sources of the - # exfiltrated data. The `targets` attribute lists the destinations the data was - # copied to. - # @!attribute [rw] sources - # @return [::Array<::Google::Cloud::SecurityCenter::V2::ExfilResource>] - # If there are multiple sources, then the data is considered "joined" between - # them. For instance, BigQuery can join multiple tables, and each - # table would be considered a source. - # @!attribute [rw] targets - # @return [::Array<::Google::Cloud::SecurityCenter::V2::ExfilResource>] - # If there are multiple targets, each target would get a complete copy of the - # "joined" source data. - # @!attribute [rw] total_exfiltrated_bytes - # @return [::Integer] - # Total exfiltrated bytes processed for the entire job. - class Exfiltration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Resource where data was exfiltrated from or exfiltrated to. - # @!attribute [rw] name - # @return [::String] - # The resource's [full resource - # name](https://cloud.google.com/apis/design/resource_names#full_resource_name). - # @!attribute [rw] components - # @return [::Array<::String>] - # Subcomponents of the asset that was exfiltrated, like URIs used during - # exfiltration, table names, databases, and filenames. For example, multiple - # tables might have been exfiltrated from the same Cloud SQL instance, or - # multiple files might have been exfiltrated from the same Cloud Storage - # bucket. - class ExfilResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb deleted file mode 100644 index d13da6e40e27..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb +++ /dev/null @@ -1,106 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Representation of third party SIEM/SOAR fields within SCC. - # @!attribute [rw] name - # @return [::String] - # Full resource name of the external system. The following list - # shows some examples: - # - # + `organizations/1234/sources/5678/findings/123456/externalSystems/jira` - # + - # `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` - # + `folders/1234/sources/5678/findings/123456/externalSystems/jira` - # + - # `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` - # + `projects/1234/sources/5678/findings/123456/externalSystems/jira` - # + - # `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` - # @!attribute [rw] assignees - # @return [::Array<::String>] - # References primary/secondary etc assignees in the external system. - # @!attribute [rw] external_uid - # @return [::String] - # The identifier that's used to track the finding's corresponding case in the - # external system. - # @!attribute [rw] status - # @return [::String] - # The most recent status of the finding's corresponding case, as reported by - # the external system. - # @!attribute [rw] external_system_update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the case was last updated, as reported by the external - # system. - # @!attribute [rw] case_uri - # @return [::String] - # The link to the finding's corresponding case in the external system. - # @!attribute [rw] case_priority - # @return [::String] - # The priority of the finding's corresponding case in the external system. - # @!attribute [rw] case_sla - # @return [::Google::Protobuf::Timestamp] - # The SLA of the finding's corresponding case in the external system. - # @!attribute [rw] case_create_time - # @return [::Google::Protobuf::Timestamp] - # The time when the case was created, as reported by the external system. - # @!attribute [rw] case_close_time - # @return [::Google::Protobuf::Timestamp] - # The time when the case was closed, as reported by the external system. - # @!attribute [rw] ticket_info - # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem::TicketInfo] - # Information about the ticket, if any, that is being used to track the - # resolution of the issue that is identified by this finding. - class ExternalSystem - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about the ticket, if any, that is being used to track the - # resolution of the issue that is identified by this finding. - # @!attribute [rw] id - # @return [::String] - # The identifier of the ticket in the ticket system. - # @!attribute [rw] assignee - # @return [::String] - # The assignee of the ticket in the ticket system. - # @!attribute [rw] description - # @return [::String] - # The description of the ticket in the ticket system. - # @!attribute [rw] uri - # @return [::String] - # The link to the ticket in the ticket system. - # @!attribute [rw] status - # @return [::String] - # The latest status of the ticket, as reported by the ticket system. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time when the ticket was last updated, as reported by the ticket - # system. - class TicketInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb deleted file mode 100644 index fcea377226df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # File information about the related binary/library used by an executable, or - # the script used by a script interpreter - # @!attribute [rw] path - # @return [::String] - # Absolute path of the file as a JSON encoded string. - # @!attribute [rw] size - # @return [::Integer] - # Size of the file in bytes. - # @!attribute [rw] sha256 - # @return [::String] - # SHA256 hash of the first hashed_size bytes of the file encoded as a - # hex string. If hashed_size == size, sha256 represents the SHA256 hash - # of the entire file. - # @!attribute [rw] hashed_size - # @return [::Integer] - # The length in bytes of the file prefix that was hashed. If - # hashed_size == size, any hashes reported represent the entire - # file. - # @!attribute [rw] partially_hashed - # @return [::Boolean] - # True when the hash covers only a prefix of the file. - # @!attribute [rw] contents - # @return [::String] - # Prefix of the file contents as a JSON-encoded string. - # @!attribute [rw] disk_path - # @return [::Google::Cloud::SecurityCenter::V2::File::DiskPath] - # Path of the file in terms of underlying disk/partition identifiers. - # @!attribute [rw] operations - # @return [::Array<::Google::Cloud::SecurityCenter::V2::File::FileOperation>] - # Operation(s) performed on a file. - class File - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Path of the file in terms of underlying disk/partition identifiers. - # @!attribute [rw] partition_uuid - # @return [::String] - # UUID of the partition (format - # https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) - # @!attribute [rw] relative_path - # @return [::String] - # Relative path of the file in the partition as a JSON encoded string. - # Example: /home/user1/executable_file.sh - class DiskPath - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Operation(s) performed on a file. - # @!attribute [rw] type - # @return [::Google::Cloud::SecurityCenter::V2::File::FileOperation::OperationType] - # The type of the operation - class FileOperation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the operation - module OperationType - # The operation is unspecified. - OPERATION_TYPE_UNSPECIFIED = 0 - - # Represents an open operation. - OPEN = 1 - - # Represents a read operation. - READ = 2 - - # Represents a rename operation. - RENAME = 3 - - # Represents a write operation. - WRITE = 4 - - # Represents an execute operation. - EXECUTE = 5 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb deleted file mode 100644 index 80e00cbf53ed..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb +++ /dev/null @@ -1,533 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Security Command Center finding. - # - # A finding is a record of assessment data like security, risk, health, or - # privacy, that is ingested into Security Command Center for presentation, - # notification, analysis, policy testing, and enforcement. For example, a - # cross-site scripting (XSS) vulnerability in an App Engine application is a - # finding. - # @!attribute [rw] name - # @return [::String] - # Identifier. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @!attribute [r] canonical_name - # @return [::String] - # Output only. The canonical name of the finding. The following list shows - # some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # - # The prefix is the closest CRM ancestor of the resource associated with the - # finding. - # @!attribute [rw] parent - # @return [::String] - # The relative resource name of the source and location the finding belongs - # to. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # This field is immutable after creation time. The following list shows some - # examples: - # - # + `organizations/{organization_id}/sources/{source_id}` - # + `folders/{folders_id}/sources/{source_id}` - # + `projects/{projects_id}/sources/{source_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}` - # + `folders/{folders_id}/sources/{source_id}/locations/{location_id}` - # + `projects/{projects_id}/sources/{source_id}/locations/{location_id}` - # @!attribute [rw] resource_name - # @return [::String] - # Immutable. For findings on Google Cloud resources, the full resource - # name of the Google Cloud resource this finding is for. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # When the finding is for a non-Google Cloud resource, the resourceName can - # be a customer or partner defined string. - # @!attribute [r] state - # @return [::Google::Cloud::SecurityCenter::V2::Finding::State] - # Output only. The state of the finding. - # @!attribute [rw] category - # @return [::String] - # Immutable. The additional taxonomy group within findings from a given - # source. Example: "XSS_FLASH_INJECTION" - # @!attribute [rw] external_uri - # @return [::String] - # The URI that, if available, points to a web page outside of Security - # Command Center where additional information about the finding can be found. - # This field is guaranteed to be either empty or a well formed URL. - # @!attribute [rw] source_properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Source specific properties. These properties are managed by the source - # that writes the finding. The key names in the source_properties map must be - # between 1 and 255 characters, and must start with a letter and contain - # alphanumeric characters or underscores only. - # @!attribute [r] security_marks - # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # Output only. User specified security marks. These marks are entirely - # managed by the user and come from the SecurityMarks resource that belongs - # to the finding. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # The time the finding was first detected. If an existing finding is updated, - # then this is the time the update occurred. - # For example, if the finding represents an open firewall, this property - # captures the time the detector believes the firewall became open. The - # accuracy is determined by the detector. If the finding is later resolved, - # then this time reflects when the finding was resolved. This must not - # be set to a value greater than the current timestamp. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the finding was created in Security Command - # Center. - # @!attribute [rw] severity - # @return [::Google::Cloud::SecurityCenter::V2::Finding::Severity] - # The severity of the finding. This field is managed by the source that - # writes the finding. - # @!attribute [rw] mute - # @return [::Google::Cloud::SecurityCenter::V2::Finding::Mute] - # Indicates the mute state of a finding (either muted, unmuted - # or undefined). Unlike other attributes of a finding, a finding provider - # shouldn't set the value of mute. - # @!attribute [r] mute_info - # @return [::Google::Cloud::SecurityCenter::V2::Finding::MuteInfo] - # Output only. The mute information regarding this finding. - # @!attribute [rw] finding_class - # @return [::Google::Cloud::SecurityCenter::V2::Finding::FindingClass] - # The class of the finding. - # @!attribute [rw] indicator - # @return [::Google::Cloud::SecurityCenter::V2::Indicator] - # Represents what's commonly known as an *indicator of compromise* (IoC) in - # computer forensics. This is an artifact observed on a network or in an - # operating system that, with high confidence, indicates a computer - # intrusion. For more information, see [Indicator of - # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). - # @!attribute [rw] vulnerability - # @return [::Google::Cloud::SecurityCenter::V2::Vulnerability] - # Represents vulnerability-specific fields like CVE and CVSS scores. - # CVE stands for Common Vulnerabilities and Exposures - # (https://cve.mitre.org/about/) - # @!attribute [r] mute_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent time this finding was muted or unmuted. - # @!attribute [r] external_systems - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V2::ExternalSystem}] - # Output only. Third party SIEM/SOAR fields within SCC, contains external - # system information and external system finding fields. - # @!attribute [rw] mitre_attack - # @return [::Google::Cloud::SecurityCenter::V2::MitreAttack] - # MITRE ATT&CK tactics and techniques related to this finding. - # See: https://attack.mitre.org - # @!attribute [rw] access - # @return [::Google::Cloud::SecurityCenter::V2::Access] - # Access details associated with the finding, such as more information on the - # caller, which method was accessed, and from where. - # @!attribute [rw] connections - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Connection>] - # Contains information about the IP connection associated with the finding. - # @!attribute [rw] mute_initiator - # @return [::String] - # Records additional information about the mute operation, for example, the - # [mute - # configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings) - # that muted the finding and the user who muted the finding. - # @!attribute [rw] processes - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Process>] - # Represents operating system processes associated with the Finding. - # @!attribute [r] contacts - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V2::ContactDetails}] - # Output only. Map containing the points of contact for the given finding. - # The key represents the type of contact, while the value contains a list of - # all the contacts that pertain. Please refer to: - # https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories - # - # { - # "security": { - # "contacts": [ - # { - # "email": "person1@company.com" - # }, - # { - # "email": "person2@company.com" - # } - # ] - # } - # } - # @!attribute [rw] compliances - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Compliance>] - # Contains compliance information for security standards associated to the - # finding. - # @!attribute [r] parent_display_name - # @return [::String] - # Output only. The human readable display name of the finding source such as - # "Event Threat Detection" or "Security Health Analytics". - # @!attribute [rw] description - # @return [::String] - # Contains more details about the finding. - # @!attribute [rw] exfiltration - # @return [::Google::Cloud::SecurityCenter::V2::Exfiltration] - # Represents exfiltrations associated with the finding. - # @!attribute [rw] iam_bindings - # @return [::Array<::Google::Cloud::SecurityCenter::V2::IamBinding>] - # Represents IAM bindings associated with the finding. - # @!attribute [rw] next_steps - # @return [::String] - # Steps to address the finding. - # @!attribute [rw] module_name - # @return [::String] - # Unique identifier of the module which generated the finding. - # Example: - # folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 - # @!attribute [rw] containers - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Container>] - # Containers associated with the finding. This field provides information for - # both Kubernetes and non-Kubernetes containers. - # @!attribute [rw] kubernetes - # @return [::Google::Cloud::SecurityCenter::V2::Kubernetes] - # Kubernetes resources associated with the finding. - # @!attribute [rw] database - # @return [::Google::Cloud::SecurityCenter::V2::Database] - # Database associated with the finding. - # @!attribute [rw] attack_exposure - # @return [::Google::Cloud::SecurityCenter::V2::AttackExposure] - # The results of an attack path simulation relevant to this finding. - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::SecurityCenter::V2::File>] - # File associated with the finding. - # @!attribute [rw] cloud_dlp_inspection - # @return [::Google::Cloud::SecurityCenter::V2::CloudDlpInspection] - # Cloud Data Loss Prevention (Cloud DLP) inspection results that are - # associated with the finding. - # @!attribute [rw] cloud_dlp_data_profile - # @return [::Google::Cloud::SecurityCenter::V2::CloudDlpDataProfile] - # Cloud DLP data profile that is associated with the finding. - # @!attribute [rw] kernel_rootkit - # @return [::Google::Cloud::SecurityCenter::V2::KernelRootkit] - # Signature of the kernel rootkit. - # @!attribute [rw] org_policies - # @return [::Array<::Google::Cloud::SecurityCenter::V2::OrgPolicy>] - # Contains information about the org policies associated with the finding. - # @!attribute [rw] job - # @return [::Google::Cloud::SecurityCenter::V2::Job] - # Job associated with the finding. - # @!attribute [rw] application - # @return [::Google::Cloud::SecurityCenter::V2::Application] - # Represents an application associated with the finding. - # @!attribute [rw] ip_rules - # @return [::Google::Cloud::SecurityCenter::V2::IpRules] - # IP rules associated with the finding. - # @!attribute [rw] backup_disaster_recovery - # @return [::Google::Cloud::SecurityCenter::V2::BackupDisasterRecovery] - # Fields related to Backup and DR findings. - # @!attribute [rw] security_posture - # @return [::Google::Cloud::SecurityCenter::V2::SecurityPosture] - # The security posture associated with the finding. - # @!attribute [rw] log_entries - # @return [::Array<::Google::Cloud::SecurityCenter::V2::LogEntry>] - # Log entries that are relevant to the finding. - # @!attribute [rw] load_balancers - # @return [::Array<::Google::Cloud::SecurityCenter::V2::LoadBalancer>] - # The load balancers associated with the finding. - # @!attribute [rw] cloud_armor - # @return [::Google::Cloud::SecurityCenter::V2::CloudArmor] - # Fields related to Cloud Armor findings. - # @!attribute [rw] notebook - # @return [::Google::Cloud::SecurityCenter::V2::Notebook] - # Notebook associated with the finding. - # @!attribute [rw] toxic_combination - # @return [::Google::Cloud::SecurityCenter::V2::ToxicCombination] - # Contains details about a group of security issues that, when the issues - # occur together, represent a greater risk than when the issues occur - # independently. A group of such issues is referred to as a toxic - # combination. - # This field cannot be updated. Its value is ignored in all update requests. - # @!attribute [rw] group_memberships - # @return [::Array<::Google::Cloud::SecurityCenter::V2::GroupMembership>] - # Contains details about groups of which this finding is a member. A group is - # a collection of findings that are related in some way. - # This field cannot be updated. Its value is ignored in all update requests. - # @!attribute [rw] disk - # @return [::Google::Cloud::SecurityCenter::V2::Disk] - # Disk associated with the finding. - # @!attribute [rw] data_access_events - # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataAccessEvent>] - # Data access events associated with the finding. - # @!attribute [rw] data_flow_events - # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataFlowEvent>] - # Data flow events associated with the finding. - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Network>] - # Represents the VPC networks that the resource is attached to. - # @!attribute [rw] data_retention_deletion_events - # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataRetentionDeletionEvent>] - # Data retention deletion events associated with the finding. - # @!attribute [rw] affected_resources - # @return [::Google::Cloud::SecurityCenter::V2::AffectedResources] - # AffectedResources associated with the finding. - # @!attribute [rw] ai_model - # @return [::Google::Cloud::SecurityCenter::V2::AiModel] - # The AI model associated with the finding. - # @!attribute [rw] chokepoint - # @return [::Google::Cloud::SecurityCenter::V2::Chokepoint] - # Contains details about a chokepoint, which is a resource or resource group - # where high-risk attack paths converge, based on [attack path simulations] - # (https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_path_simulations). - # This field cannot be updated. Its value is ignored in all update requests. - # @!attribute [rw] vertex_ai - # @return [::Google::Cloud::SecurityCenter::V2::VertexAi] - # VertexAi associated with the finding. - # @!attribute [rw] agent - # @return [::Google::Cloud::SecurityCenter::V2::Agent] - # Primary Agent that the specified finding was flagged for - # @!attribute [rw] agent_sessions - # @return [::Array<::Google::Cloud::SecurityCenter::V2::AgentSession>] - # Conversational session(s) where the finding occurred. - # @!attribute [rw] agent_anomaly - # @return [::Google::Cloud::SecurityCenter::V2::AgentAnomaly] - # Details about behavior anomalies detected in AI agents. - class Finding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Mute information about the finding, including whether the finding has a - # static mute or any matching dynamic mute rules. - # @!attribute [rw] static_mute - # @return [::Google::Cloud::SecurityCenter::V2::Finding::MuteInfo::StaticMute] - # If set, the static mute applied to this finding. Static mutes override - # dynamic mutes. If unset, there is no static mute. - # @!attribute [rw] dynamic_mute_records - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Finding::MuteInfo::DynamicMuteRecord>] - # The list of dynamic mute rules that currently match the finding. - class MuteInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about the static mute state. A static mute state overrides - # any dynamic mute rules that apply to this finding. The static mute state - # can be set by a static mute rule or by muting the finding directly. - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V2::Finding::Mute] - # The static mute state. If the value is `MUTED` or `UNMUTED`, then the - # finding's overall mute state will have the same value. - # @!attribute [rw] apply_time - # @return [::Google::Protobuf::Timestamp] - # When the static mute was applied. - class StaticMute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The record of a dynamic mute rule that matches the finding. - # @!attribute [rw] mute_config - # @return [::String] - # The relative resource name of the mute rule, represented by a mute - # config, that created this record, for example - # `organizations/123/muteConfigs/mymuteconfig` or - # `organizations/123/locations/global/muteConfigs/mymuteconfig`. - # @!attribute [rw] match_time - # @return [::Google::Protobuf::Timestamp] - # When the dynamic mute rule first matched the finding. - class DynamicMuteRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class SourcePropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] - class ExternalSystemsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::SecurityCenter::V2::ContactDetails] - class ContactsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of the finding. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # The finding requires attention and has not been addressed yet. - ACTIVE = 1 - - # The finding has been fixed, triaged as a non-issue or otherwise addressed - # and is no longer active. - INACTIVE = 2 - end - - # The severity of the finding. - module Severity - # This value is used for findings when a source doesn't write a severity - # value. - SEVERITY_UNSPECIFIED = 0 - - # Vulnerability: - # A critical vulnerability is easily discoverable by an external actor, - # exploitable, and results in the direct ability to execute arbitrary code, - # exfiltrate data, and otherwise gain additional access and privileges to - # cloud resources and workloads. Examples include publicly accessible - # unprotected user data and public SSH access with weak or no - # passwords. - # - # Threat: - # Indicates a threat that is able to access, modify, or delete data or - # execute unauthorized code within existing resources. - CRITICAL = 1 - - # Vulnerability: - # A high risk vulnerability can be easily discovered and exploited in - # combination with other vulnerabilities in order to gain direct access and - # the ability to execute arbitrary code, exfiltrate data, and otherwise - # gain additional access and privileges to cloud resources and workloads. - # An example is a database with weak or no passwords that is only - # accessible internally. This database could easily be compromised by an - # actor that had access to the internal network. - # - # Threat: - # Indicates a threat that is able to create new computational resources in - # an environment but not able to access data or execute code in existing - # resources. - HIGH = 2 - - # Vulnerability: - # A medium risk vulnerability could be used by an actor to gain access to - # resources or privileges that enable them to eventually (through multiple - # steps or a complex exploit) gain access and the ability to execute - # arbitrary code or exfiltrate data. An example is a service account with - # access to more projects than it should have. If an actor gains access to - # the service account, they could potentially use that access to manipulate - # a project the service account was not intended to. - # - # Threat: - # Indicates a threat that is able to cause operational impact but may not - # access data or execute unauthorized code. - MEDIUM = 3 - - # Vulnerability: - # A low risk vulnerability hampers a security organization's ability to - # detect vulnerabilities or active threats in their deployment, or prevents - # the root cause investigation of security issues. An example is monitoring - # and logs being disabled for resource configurations and access. - # - # Threat: - # Indicates a threat that has obtained minimal access to an environment but - # is not able to access data, execute code, or create resources. - LOW = 4 - end - - # Mute state a finding can be in. - module Mute - # Unspecified. - MUTE_UNSPECIFIED = 0 - - # Finding has been muted. - MUTED = 1 - - # Finding has been unmuted. - UNMUTED = 2 - - # Finding has never been muted/unmuted. - UNDEFINED = 3 - end - - # Represents what kind of Finding it is. - module FindingClass - # Unspecified finding class. - FINDING_CLASS_UNSPECIFIED = 0 - - # Describes unwanted or malicious activity. - THREAT = 1 - - # Describes a potential weakness in software that increases risk to - # Confidentiality & Integrity & Availability. - VULNERABILITY = 2 - - # Describes a potential weakness in cloud resource/asset configuration that - # increases risk. - MISCONFIGURATION = 3 - - # Describes a security observation that is for informational purposes. - OBSERVATION = 4 - - # Describes an error that prevents some SCC functionality. - SCC_ERROR = 5 - - # Describes a potential security risk due to a change in the security - # posture. - POSTURE_VIOLATION = 6 - - # Describes a combination of security issues that represent a more severe - # security problem when taken together. - TOXIC_COMBINATION = 7 - - # Describes a potential security risk to data assets that contain sensitive - # data. - SENSITIVE_DATA_RISK = 8 - - # Describes a resource or resource group where high risk attack paths - # converge, based on attack path simulations (APS). - CHOKEPOINT = 9 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb deleted file mode 100644 index a56cbebc0318..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Message that contains the resource name and display name of a folder - # resource. - # @!attribute [rw] resource_folder - # @return [::String] - # Full resource name of this folder. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] resource_folder_display_name - # @return [::String] - # The user defined display name for this folder. - class Folder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb deleted file mode 100644 index 4b2f90a8e17c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Contains details about groups of which this finding is a member. A group is a - # collection of findings that are related in some way. - # @!attribute [rw] group_type - # @return [::Google::Cloud::SecurityCenter::V2::GroupMembership::GroupType] - # Type of group. - # @!attribute [rw] group_id - # @return [::String] - # ID of the group. - class GroupMembership - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible types of groups. - module GroupType - # Default value. - GROUP_TYPE_UNSPECIFIED = 0 - - # Group represents a toxic combination. - GROUP_TYPE_TOXIC_COMBINATION = 1 - - # Group represents a chokepoint. - GROUP_TYPE_CHOKEPOINT = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb deleted file mode 100644 index 879809624b27..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Represents a particular IAM binding, which captures a member's role addition, - # removal, or state. - # @!attribute [rw] action - # @return [::Google::Cloud::SecurityCenter::V2::IamBinding::Action] - # The action that was performed on a Binding. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to "members". - # For example, "roles/viewer", "roles/editor", or "roles/owner". - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Cloud Platform resource, for - # example, "foo@google.com". - class IamBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb deleted file mode 100644 index 85acfa00a4c5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb +++ /dev/null @@ -1,116 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Represents what's commonly known as an _indicator of compromise_ (IoC) in - # computer forensics. This is an artifact observed on a network or in an - # operating system that, with high confidence, indicates a computer intrusion. - # For more information, see [Indicator of - # compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). - # @!attribute [rw] ip_addresses - # @return [::Array<::String>] - # The list of IP addresses that are associated with the finding. - # @!attribute [rw] domains - # @return [::Array<::String>] - # List of domains associated to the Finding. - # @!attribute [rw] signatures - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Indicator::ProcessSignature>] - # The list of matched signatures indicating that the given - # process is present in the environment. - # @!attribute [rw] uris - # @return [::Array<::String>] - # The list of URIs associated to the Findings. - class Indicator - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates what signature matched this process. - # @!attribute [rw] memory_hash_signature - # @return [::Google::Cloud::SecurityCenter::V2::Indicator::ProcessSignature::MemoryHashSignature] - # Signature indicating that a binary family was matched. - # - # Note: The following fields are mutually exclusive: `memory_hash_signature`, `yara_rule_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] yara_rule_signature - # @return [::Google::Cloud::SecurityCenter::V2::Indicator::ProcessSignature::YaraRuleSignature] - # Signature indicating that a YARA rule was matched. - # - # Note: The following fields are mutually exclusive: `yara_rule_signature`, `memory_hash_signature`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] signature_type - # @return [::Google::Cloud::SecurityCenter::V2::Indicator::ProcessSignature::SignatureType] - # Describes the type of resource associated with the signature. - class ProcessSignature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A signature corresponding to memory page hashes. - # @!attribute [rw] binary_family - # @return [::String] - # The binary family. - # @!attribute [rw] detections - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Indicator::ProcessSignature::MemoryHashSignature::Detection>] - # The list of memory hash detections contributing to the binary family - # match. - class MemoryHashSignature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Memory hash detection contributing to the binary family match. - # @!attribute [rw] binary - # @return [::String] - # The name of the binary associated with the memory hash - # signature detection. - # @!attribute [rw] percent_pages_matched - # @return [::Float] - # The percentage of memory page hashes in the signature - # that were matched. - class Detection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A signature corresponding to a YARA rule. - # @!attribute [rw] yara_rule - # @return [::String] - # The name of the YARA rule. - class YaraRuleSignature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible resource types to be associated with a signature. - module SignatureType - # The default signature type. - SIGNATURE_TYPE_UNSPECIFIED = 0 - - # Used for signatures concerning processes. - SIGNATURE_TYPE_PROCESS = 1 - - # Used for signatures concerning disks. - SIGNATURE_TYPE_FILE = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb deleted file mode 100644 index ce71b3883188..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb +++ /dev/null @@ -1,122 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # IP rules associated with the finding. - # @!attribute [rw] direction - # @return [::Google::Cloud::SecurityCenter::V2::IpRules::Direction] - # The direction that the rule is applicable to, one of ingress or egress. - # @!attribute [rw] allowed - # @return [::Google::Cloud::SecurityCenter::V2::Allowed] - # Tuple with allowed rules. - # - # Note: The following fields are mutually exclusive: `allowed`, `denied`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] denied - # @return [::Google::Cloud::SecurityCenter::V2::Denied] - # Tuple with denied rules. - # - # Note: The following fields are mutually exclusive: `denied`, `allowed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] source_ip_ranges - # @return [::Array<::String>] - # If source IP ranges are specified, the firewall rule applies only to - # traffic that has a source IP address in these ranges. These ranges must be - # expressed in CIDR format. Only supports IPv4. - # @!attribute [rw] destination_ip_ranges - # @return [::Array<::String>] - # If destination IP ranges are specified, the firewall rule applies only to - # traffic that has a destination IP address in these ranges. These ranges - # must be expressed in CIDR format. Only supports IPv4. - # @!attribute [rw] exposed_services - # @return [::Array<::String>] - # Name of the network protocol service, such as FTP, that is exposed by the - # open port. Follows the naming convention available at: - # https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml. - class IpRules - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of direction that the rule is applicable to, one of ingress or - # egress. Not applicable to OPEN_X_PORT findings. - module Direction - # Unspecified direction value. - DIRECTION_UNSPECIFIED = 0 - - # Ingress direction value. - INGRESS = 1 - - # Egress direction value. - EGRESS = 2 - end - end - - # IP rule information. - # @!attribute [rw] protocol - # @return [::String] - # The IP protocol this rule applies to. This value can either be one of the - # following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, - # SCTP) or a string representation of the integer value. - # @!attribute [rw] port_ranges - # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule::PortRange>] - # Optional. An optional list of ports to which this rule applies. This field - # is only applicable for the UDP or (S)TCP protocols. Each entry must be - # either an integer or a range including a min and max port number. - class IpRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A port range which is inclusive of the min and max values. - # Values are between 0 and 2^16-1. The max can be equal / must be not smaller - # than the min value. If min and max are equal this indicates that it is a - # single port. - # @!attribute [rw] min - # @return [::Integer] - # Minimum port value. - # @!attribute [rw] max - # @return [::Integer] - # Maximum port value. - class PortRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Allowed IP rule. - # @!attribute [rw] ip_rules - # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule>] - # Optional. Optional list of allowed IP rules. - class Allowed - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Denied IP rule. - # @!attribute [rw] ip_rules - # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule>] - # Optional. Optional list of denied IP rules. - class Denied - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb deleted file mode 100644 index e8f38e48dc1b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Describes a job - # @!attribute [rw] name - # @return [::String] - # The fully-qualified name for a job. - # e.g. `projects//jobs/` - # @!attribute [r] state - # @return [::Google::Cloud::SecurityCenter::V2::JobState] - # Output only. State of the job, such as `RUNNING` or `PENDING`. - # @!attribute [rw] error_code - # @return [::Integer] - # Optional. If the job did not complete successfully, this field describes - # why. - # @!attribute [rw] location - # @return [::String] - # Optional. Gives the location where the job ran, such as `US` or - # `europe-west1` - class Job - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # JobState represents the state of the job. - module JobState - # Unspecified represents an unknown state and should not be used. - JOB_STATE_UNSPECIFIED = 0 - - # Job is scheduled and pending for run - PENDING = 1 - - # Job in progress - RUNNING = 2 - - # Job has completed with success - SUCCEEDED = 3 - - # Job has completed but with failure - FAILED = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb deleted file mode 100644 index 0e324f832355..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Kernel mode rootkit signatures. - # @!attribute [rw] name - # @return [::String] - # Rootkit name, when available. - # @!attribute [rw] unexpected_code_modification - # @return [::Boolean] - # True if unexpected modifications of kernel code memory are present. - # @!attribute [rw] unexpected_read_only_data_modification - # @return [::Boolean] - # True if unexpected modifications of kernel read-only data memory are - # present. - # @!attribute [rw] unexpected_ftrace_handler - # @return [::Boolean] - # True if `ftrace` points are present with callbacks pointing to regions - # that are not in the expected kernel or module code range. - # @!attribute [rw] unexpected_kprobe_handler - # @return [::Boolean] - # True if `kprobe` points are present with callbacks pointing to regions - # that are not in the expected kernel or module code range. - # @!attribute [rw] unexpected_kernel_code_pages - # @return [::Boolean] - # True if kernel code pages that are not in the expected kernel or module - # code regions are present. - # @!attribute [rw] unexpected_system_call_handler - # @return [::Boolean] - # True if system call handlers that are are not in the expected kernel or - # module code regions are present. - # @!attribute [rw] unexpected_interrupt_handler - # @return [::Boolean] - # True if interrupt handlers that are are not in the expected kernel or - # module code regions are present. - # @!attribute [rw] unexpected_processes_in_runqueue - # @return [::Boolean] - # True if unexpected processes in the scheduler run queue are present. Such - # processes are in the run queue, but not in the process task list. - class KernelRootkit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb deleted file mode 100644 index 444ecd5eec70..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb +++ /dev/null @@ -1,241 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Kubernetes-related attributes. - # @!attribute [rw] pods - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Pod>] - # Kubernetes - # [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) - # associated with the finding. This field contains Pod records for each - # container that is owned by a Pod. - # @!attribute [rw] nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Node>] - # Provides Kubernetes - # [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) - # information. - # @!attribute [rw] node_pools - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::NodePool>] - # GKE [node - # pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) - # associated with the finding. This field contains node pool information for - # each node, when it is available. - # @!attribute [rw] roles - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Role>] - # Provides Kubernetes role information for findings that involve [Roles or - # ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). - # @!attribute [rw] bindings - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Binding>] - # Provides Kubernetes role binding information for findings that involve - # [RoleBindings or - # ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). - # @!attribute [rw] access_reviews - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::AccessReview>] - # Provides information on any Kubernetes access reviews (privilege checks) - # relevant to the finding. - # @!attribute [rw] objects - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Object>] - # Kubernetes objects related to the finding. - class Kubernetes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A Kubernetes Pod. - # @!attribute [rw] ns - # @return [::String] - # Kubernetes Pod namespace. - # @!attribute [rw] name - # @return [::String] - # Kubernetes Pod name. - # @!attribute [rw] labels - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Label>] - # Pod labels. For Kubernetes containers, these are applied to the - # container. - # @!attribute [rw] containers - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Container>] - # Pod containers associated with this finding, if any. - class Pod - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Kubernetes nodes associated with the finding. - # @!attribute [rw] name - # @return [::String] - # [Full resource name](https://google.aip.dev/122#full-resource-names) of - # the Compute Engine VM running the cluster node. - class Node - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides GKE node pool information. - # @!attribute [rw] name - # @return [::String] - # Kubernetes node pool name. - # @!attribute [rw] nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Node>] - # Nodes associated with the finding. - class NodePool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Kubernetes Role or ClusterRole. - # @!attribute [rw] kind - # @return [::Google::Cloud::SecurityCenter::V2::Kubernetes::Role::Kind] - # Role type. - # @!attribute [rw] ns - # @return [::String] - # Role namespace. - # @!attribute [rw] name - # @return [::String] - # Role name. - class Role - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of Kubernetes roles. - module Kind - # Role type is not specified. - KIND_UNSPECIFIED = 0 - - # Kubernetes Role. - ROLE = 1 - - # Kubernetes ClusterRole. - CLUSTER_ROLE = 2 - end - end - - # Represents a Kubernetes RoleBinding or ClusterRoleBinding. - # @!attribute [rw] ns - # @return [::String] - # Namespace for the binding. - # @!attribute [rw] name - # @return [::String] - # Name for the binding. - # @!attribute [rw] role - # @return [::Google::Cloud::SecurityCenter::V2::Kubernetes::Role] - # The Role or ClusterRole referenced by the binding. - # @!attribute [rw] subjects - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Kubernetes::Subject>] - # Represents one or more subjects that are bound to the role. Not always - # available for PATCH requests. - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Kubernetes subject. - # @!attribute [rw] kind - # @return [::Google::Cloud::SecurityCenter::V2::Kubernetes::Subject::AuthType] - # Authentication type for the subject. - # @!attribute [rw] ns - # @return [::String] - # Namespace for the subject. - # @!attribute [rw] name - # @return [::String] - # Name for the subject. - class Subject - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Auth types that can be used for the subject's kind field. - module AuthType - # Authentication is not specified. - AUTH_TYPE_UNSPECIFIED = 0 - - # User with valid certificate. - USER = 1 - - # Users managed by Kubernetes API with credentials stored as secrets. - SERVICEACCOUNT = 2 - - # Collection of users. - GROUP = 3 - end - end - - # Conveys information about a Kubernetes access review (such as one returned - # by a [`kubectl auth - # can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) - # command) that was involved in a finding. - # @!attribute [rw] group - # @return [::String] - # The API group of the resource. "*" means all. - # @!attribute [rw] ns - # @return [::String] - # Namespace of the action being requested. Currently, there is no - # distinction between no namespace and all namespaces. Both - # are represented by "" (empty). - # @!attribute [rw] name - # @return [::String] - # The name of the resource being requested. Empty means all. - # @!attribute [rw] resource - # @return [::String] - # The optional resource type requested. "*" means all. - # @!attribute [rw] subresource - # @return [::String] - # The optional subresource type. - # @!attribute [rw] verb - # @return [::String] - # A Kubernetes resource API verb, like get, list, watch, create, update, - # delete, proxy. "*" means all. - # @!attribute [rw] version - # @return [::String] - # The API version of the resource. "*" means all. - class AccessReview - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Kubernetes object related to the finding, uniquely identified by GKNN. - # Used if the object Kind is not one of Pod, Node, NodePool, Binding, or - # AccessReview. - # @!attribute [rw] group - # @return [::String] - # Kubernetes object group, such as "policy.k8s.io/v1". - # @!attribute [rw] kind - # @return [::String] - # Kubernetes object kind, such as "Namespace". - # @!attribute [rw] ns - # @return [::String] - # Kubernetes object namespace. Must be a valid DNS label. Named - # "ns" to avoid collision with C++ namespace keyword. For details see - # https://kubernetes.io/docs/tasks/administer-cluster/namespaces/. - # @!attribute [rw] name - # @return [::String] - # Kubernetes object name. For details see - # https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. - # @!attribute [rw] containers - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Container>] - # Pod containers associated with this finding, if any. - class Object - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb deleted file mode 100644 index 609c1859cbe1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Represents a generic name-value label. A label has separate name and value - # fields to support filtering with the `contains()` function. For more - # information, see [Filtering on array-type - # fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering). - # @!attribute [rw] name - # @return [::String] - # Name of the label. - # @!attribute [rw] value - # @return [::String] - # Value that corresponds to the label's name. - class Label - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb deleted file mode 100644 index a9d466c92655..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Contains information related to the load balancer associated with the - # finding. - # @!attribute [rw] name - # @return [::String] - # The name of the load balancer associated with the finding. - class LoadBalancer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb deleted file mode 100644 index f3ea1bf4b29d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # An individual entry in a log. - # @!attribute [rw] cloud_logging_entry - # @return [::Google::Cloud::SecurityCenter::V2::CloudLoggingEntry] - # An individual entry in a log stored in Cloud Logging. - class LogEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata taken from a [Cloud Logging - # LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) - # @!attribute [rw] insert_id - # @return [::String] - # A unique identifier for the log entry. - # @!attribute [rw] log_id - # @return [::String] - # The type of the log (part of `log_name`. `log_name` is the resource name of - # the log to which this log entry belongs). For example: - # `cloudresourcemanager.googleapis.com/activity` Note that this field is not - # URL-encoded, unlike in `LogEntry`. - # @!attribute [rw] resource_container - # @return [::String] - # The organization, folder, or project of the monitored resource that - # produced this log entry. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # The time the event described by the log entry occurred. - class CloudLoggingEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb deleted file mode 100644 index a1f6f5b169c8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb +++ /dev/null @@ -1,521 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # MITRE ATT&CK tactics and techniques related to this finding. - # See: https://attack.mitre.org - # @!attribute [rw] primary_tactic - # @return [::Google::Cloud::SecurityCenter::V2::MitreAttack::Tactic] - # The MITRE ATT&CK tactic most closely represented by this finding, if any. - # @!attribute [rw] primary_techniques - # @return [::Array<::Google::Cloud::SecurityCenter::V2::MitreAttack::Technique>] - # The MITRE ATT&CK technique most closely represented by this finding, if - # any. primary_techniques is a repeated field because there are multiple - # levels of MITRE ATT&CK techniques. If the technique most closely - # represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), - # both the sub-technique and its parent technique(s) will be listed (e.g. - # `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). - # @!attribute [rw] additional_tactics - # @return [::Array<::Google::Cloud::SecurityCenter::V2::MitreAttack::Tactic>] - # Additional MITRE ATT&CK tactics related to this finding, if any. - # @!attribute [rw] additional_techniques - # @return [::Array<::Google::Cloud::SecurityCenter::V2::MitreAttack::Technique>] - # Additional MITRE ATT&CK techniques related to this finding, if any, along - # with any of their respective parent techniques. - # @!attribute [rw] version - # @return [::String] - # The MITRE ATT&CK version referenced by the above fields. E.g. "8". - class MitreAttack - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # MITRE ATT&CK tactics that can be referenced by SCC findings. - # See: https://attack.mitre.org/tactics/enterprise/ - module Tactic - # Unspecified value. - TACTIC_UNSPECIFIED = 0 - - # TA0043 - RECONNAISSANCE = 1 - - # TA0042 - RESOURCE_DEVELOPMENT = 2 - - # TA0001 - INITIAL_ACCESS = 5 - - # TA0002 - EXECUTION = 3 - - # TA0003 - PERSISTENCE = 6 - - # TA0004 - PRIVILEGE_ESCALATION = 8 - - # TA0005 - DEFENSE_EVASION = 7 - - # TA0006 - CREDENTIAL_ACCESS = 9 - - # TA0007 - DISCOVERY = 10 - - # TA0008 - LATERAL_MOVEMENT = 11 - - # TA0009 - COLLECTION = 12 - - # TA0011 - COMMAND_AND_CONTROL = 4 - - # TA0010 - EXFILTRATION = 13 - - # TA0040 - IMPACT = 14 - end - - # MITRE ATT&CK techniques that can be referenced by Security Command Center - # findings. See: https://attack.mitre.org/techniques/enterprise/ - module Technique - # Unspecified value. - TECHNIQUE_UNSPECIFIED = 0 - - # T1001 - DATA_OBFUSCATION = 70 - - # T1001.002 - DATA_OBFUSCATION_STEGANOGRAPHY = 71 - - # T1003 - OS_CREDENTIAL_DUMPING = 114 - - # T1003.007 - OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM = 115 - - # T1003.008 - OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW = 122 - - # T1005 - DATA_FROM_LOCAL_SYSTEM = 117 - - # T1020 - AUTOMATED_EXFILTRATION = 68 - - # T1027 - OBFUSCATED_FILES_OR_INFO = 72 - - # T1027.003 - STEGANOGRAPHY = 73 - - # T1027.004 - COMPILE_AFTER_DELIVERY = 74 - - # T1027.010 - COMMAND_OBFUSCATION = 75 - - # T1029 - SCHEDULED_TRANSFER = 120 - - # T1033 - SYSTEM_OWNER_USER_DISCOVERY = 118 - - # T1036 - MASQUERADING = 49 - - # T1036.005 - MATCH_LEGITIMATE_NAME_OR_LOCATION = 50 - - # T1037 - BOOT_OR_LOGON_INITIALIZATION_SCRIPTS = 37 - - # T1037.005 - STARTUP_ITEMS = 38 - - # T1046 - NETWORK_SERVICE_DISCOVERY = 32 - - # T1053 - SCHEDULED_TASK_JOB = 89 - - # T1053.003 - SCHEDULED_TASK_JOB_CRON = 119 - - # T1053.007 - CONTAINER_ORCHESTRATION_JOB = 90 - - # T1055 - PROCESS_INJECTION = 93 - - # T1056 - INPUT_CAPTURE = 103 - - # T1056.001 - INPUT_CAPTURE_KEYLOGGING = 104 - - # T1057 - PROCESS_DISCOVERY = 56 - - # T1059 - COMMAND_AND_SCRIPTING_INTERPRETER = 6 - - # T1059.004 - UNIX_SHELL = 7 - - # T1059.006 - PYTHON = 59 - - # T1068 - EXPLOITATION_FOR_PRIVILEGE_ESCALATION = 63 - - # T1069 - PERMISSION_GROUPS_DISCOVERY = 18 - - # T1069.003 - CLOUD_GROUPS = 19 - - # T1070 - INDICATOR_REMOVAL = 123 - - # T1070.002 - INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS = 124 - - # T1070.003 - INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY = 125 - - # T1070.004 - INDICATOR_REMOVAL_FILE_DELETION = 64 - - # T1070.006 - INDICATOR_REMOVAL_TIMESTOMP = 128 - - # T1070.008 - INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA = 126 - - # T1071 - APPLICATION_LAYER_PROTOCOL = 45 - - # T1071.004 - DNS = 46 - - # T1072 - SOFTWARE_DEPLOYMENT_TOOLS = 47 - - # T1078 - VALID_ACCOUNTS = 14 - - # T1078.001 - DEFAULT_ACCOUNTS = 35 - - # T1078.003 - LOCAL_ACCOUNTS = 15 - - # T1078.004 - CLOUD_ACCOUNTS = 16 - - # T1083 - FILE_AND_DIRECTORY_DISCOVERY = 121 - - # T1087.001 - ACCOUNT_DISCOVERY_LOCAL_ACCOUNT = 116 - - # T1090 - PROXY = 9 - - # T1090.002 - EXTERNAL_PROXY = 10 - - # T1090.003 - MULTI_HOP_PROXY = 11 - - # T1098 - ACCOUNT_MANIPULATION = 22 - - # T1098.001 - ADDITIONAL_CLOUD_CREDENTIALS = 40 - - # T1098.003 - ADDITIONAL_CLOUD_ROLES = 67 - - # T1098.004 - SSH_AUTHORIZED_KEYS = 23 - - # T1098.006 - ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58 - - # T1104 - MULTI_STAGE_CHANNELS = 76 - - # T1105 - INGRESS_TOOL_TRANSFER = 3 - - # T1106 - NATIVE_API = 4 - - # T1110 - BRUTE_FORCE = 44 - - # T1119 - AUTOMATED_COLLECTION = 94 - - # T1129 - SHARED_MODULES = 5 - - # T1132 - DATA_ENCODING = 77 - - # T1132.001 - STANDARD_ENCODING = 78 - - # T1134 - ACCESS_TOKEN_MANIPULATION = 33 - - # T1134.001 - TOKEN_IMPERSONATION_OR_THEFT = 39 - - # T1136 - CREATE_ACCOUNT = 79 - - # T1136.001 - LOCAL_ACCOUNT = 80 - - # T1140 - DEOBFUSCATE_DECODE_FILES_OR_INFO = 95 - - # T1190 - EXPLOIT_PUBLIC_FACING_APPLICATION = 27 - - # T1195 - SUPPLY_CHAIN_COMPROMISE = 129 - - # T1195.001 - COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS = 130 - - # T1203 - EXPLOITATION_FOR_CLIENT_EXECUTION = 134 - - # T1204 - USER_EXECUTION = 69 - - # T1222.002 - LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION = 135 - - # T1484 - DOMAIN_POLICY_MODIFICATION = 30 - - # T1485 - DATA_DESTRUCTION = 29 - - # T1486 - DATA_ENCRYPTED_FOR_IMPACT = 132 - - # T1489 - SERVICE_STOP = 52 - - # T1490 - INHIBIT_SYSTEM_RECOVERY = 36 - - # T1495 - FIRMWARE_CORRUPTION = 81 - - # T1496 - RESOURCE_HIJACKING = 8 - - # T1498 - NETWORK_DENIAL_OF_SERVICE = 17 - - # T1526 - CLOUD_SERVICE_DISCOVERY = 48 - - # T1528 - STEAL_APPLICATION_ACCESS_TOKEN = 42 - - # T1531 - ACCOUNT_ACCESS_REMOVAL = 51 - - # T1537 - TRANSFER_DATA_TO_CLOUD_ACCOUNT = 91 - - # T1539 - STEAL_WEB_SESSION_COOKIE = 25 - - # T1543 - CREATE_OR_MODIFY_SYSTEM_PROCESS = 24 - - # T1546 - EVENT_TRIGGERED_EXECUTION = 65 - - # T1547 - BOOT_OR_LOGON_AUTOSTART_EXECUTION = 82 - - # T1547.006 - KERNEL_MODULES_AND_EXTENSIONS = 83 - - # T1547.009 - SHORTCUT_MODIFICATION = 127 - - # T1548 - ABUSE_ELEVATION_CONTROL_MECHANISM = 34 - - # T1548.001 - ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID = 136 - - # T1548.003 - ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING = 109 - - # T1552 - UNSECURED_CREDENTIALS = 13 - - # T1552.001 - CREDENTIALS_IN_FILES = 105 - - # T1552.003 - BASH_HISTORY = 96 - - # T1552.004 - PRIVATE_KEYS = 97 - - # T1553 - SUBVERT_TRUST_CONTROL = 106 - - # T1553.004 - INSTALL_ROOT_CERTIFICATE = 107 - - # T1554 - COMPROMISE_HOST_SOFTWARE_BINARY = 84 - - # T1555 - CREDENTIALS_FROM_PASSWORD_STORES = 98 - - # T1556 - MODIFY_AUTHENTICATION_PROCESS = 28 - - # T1556.003 - PLUGGABLE_AUTHENTICATION_MODULES = 108 - - # T1556.006 - MULTI_FACTOR_AUTHENTICATION = 137 - - # T1562 - IMPAIR_DEFENSES = 31 - - # T1562.001 - DISABLE_OR_MODIFY_TOOLS = 55 - - # T1562.006 - INDICATOR_BLOCKING = 110 - - # T1562.012 - DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM = 111 - - # T1564 - HIDE_ARTIFACTS = 85 - - # T1564.001 - HIDDEN_FILES_AND_DIRECTORIES = 86 - - # T1564.002 - HIDDEN_USERS = 87 - - # T1567 - EXFILTRATION_OVER_WEB_SERVICE = 20 - - # T1567.002 - EXFILTRATION_TO_CLOUD_STORAGE = 21 - - # T1568 - DYNAMIC_RESOLUTION = 12 - - # T1570 - LATERAL_TOOL_TRANSFER = 41 - - # T1574 - HIJACK_EXECUTION_FLOW = 112 - - # T1574.006 - HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING = 113 - - # T1578 - MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26 - - # T1578.001 - CREATE_SNAPSHOT = 54 - - # T1580 - CLOUD_INFRASTRUCTURE_DISCOVERY = 53 - - # T1587 - DEVELOP_CAPABILITIES = 99 - - # T1587.001 - DEVELOP_CAPABILITIES_MALWARE = 100 - - # T1588 - OBTAIN_CAPABILITIES = 43 - - # T1588.001 - OBTAIN_CAPABILITIES_MALWARE = 101 - - # T1588.006 - OBTAIN_CAPABILITIES_VULNERABILITIES = 133 - - # T1595 - ACTIVE_SCANNING = 1 - - # T1595.001 - SCANNING_IP_BLOCKS = 2 - - # T1608 - STAGE_CAPABILITIES = 88 - - # T1608.001 - UPLOAD_MALWARE = 102 - - # T1609 - CONTAINER_ADMINISTRATION_COMMAND = 60 - - # T1610 - DEPLOY_CONTAINER = 66 - - # T1611 - ESCAPE_TO_HOST = 61 - - # T1613 - CONTAINER_AND_RESOURCE_DISCOVERY = 57 - - # T1620 - REFLECTIVE_CODE_LOADING = 92 - - # T1649 - STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62 - - # T1657 - FINANCIAL_THEFT = 131 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb deleted file mode 100644 index db9977d397e7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # A mute config is a Cloud SCC resource that contains the configuration - # to mute create/update events of findings. - # @!attribute [rw] name - # @return [::String] - # Identifier. This field will be ignored if provided on config creation. The - # following list shows some examples of the format: - # - # + `organizations/{organization}/muteConfigs/{mute_config}` - # + - # `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` - # + `folders/{folder}/muteConfigs/{mute_config}` - # + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` - # + `projects/{project}/muteConfigs/{mute_config}` - # + `projects/{project}/locations/{location}/muteConfigs/{mute_config}` - # @!attribute [rw] description - # @return [::String] - # A description of the mute config. - # @!attribute [rw] filter - # @return [::String] - # Required. An expression that defines the filter to apply across - # create/update events of findings. While creating a filter string, be - # mindful of the scope in which the mute configuration is being created. - # E.g., If a filter contains project = X but is created under the project = Y - # scope, it might not match any findings. - # - # The following field and operator combinations are supported: - # - # * severity: `=`, `:` - # * category: `=`, `:` - # * resource.name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * finding_class: `=`, `:` - # * indicator.ip_addresses: `=`, `:` - # * indicator.domains: `=`, `:` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the mute config was created. - # This field is set by the server and will be ignored if provided on config - # creation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent time at which the mute config was updated. - # This field is set by the server and will be ignored if provided on config - # creation or update. - # @!attribute [r] most_recent_editor - # @return [::String] - # Output only. Email address of the user who last edited the mute config. - # This field is set by the server and will be ignored if provided on config - # creation or update. - # @!attribute [rw] type - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig::MuteConfigType] - # Required. The type of the mute config, which determines what type of mute - # state the config affects. Immutable after creation. - # @!attribute [rw] expiry_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The expiry of the mute config. Only applicable for dynamic - # configs. If the expiry is set, when the config expires, it is removed from - # all findings. - class MuteConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of MuteConfig. - module MuteConfigType - # Unused. - MUTE_CONFIG_TYPE_UNSPECIFIED = 0 - - # A static mute config, which sets the static mute state of future matching - # findings to muted. Once the static mute state has been set, finding or - # config modifications will not affect the state. - STATIC = 1 - - # A dynamic mute config, which is applied to existing and future matching - # findings, setting their dynamic mute state to "muted". If the config is - # updated or deleted, or a matching finding is updated, such that the - # finding doesn't match the config, the config will be removed from the - # finding, and the finding's dynamic mute state may become "unmuted" - # (unless other configs still match). - DYNAMIC = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb deleted file mode 100644 index 7fb133f55dc2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Contains information about a VPC network associated with the finding. - # @!attribute [rw] name - # @return [::String] - # The name of the VPC network resource, for example, - # `//compute.googleapis.com/projects/my-project/global/networks/my-network`. - class Network - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb deleted file mode 100644 index 0d1e37a099ef..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise - # notebook](https://cloud.google.com/colab/docs/introduction) file, that is - # associated with a finding. - # @!attribute [rw] name - # @return [::String] - # The name of the notebook. - # @!attribute [rw] service - # @return [::String] - # The source notebook service, for example, "Colab Enterprise". - # @!attribute [rw] last_author - # @return [::String] - # The user ID of the latest author to modify the notebook. - # @!attribute [rw] notebook_update_time - # @return [::Google::Protobuf::Timestamp] - # The most recent time the notebook was updated. - class Notebook - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb deleted file mode 100644 index b5de722177ff..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb +++ /dev/null @@ -1,94 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Cloud Security Command Center (Cloud SCC) notification configs. - # - # A notification config is a Cloud SCC resource that contains the configuration - # to send notifications for create/update events of findings, assets and etc. - # @!attribute [rw] name - # @return [::String] - # Identifier. The relative resource name of this notification config. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # The following list shows some examples: - # + - # `organizations/{organization_id}/locations/{location_id}/notificationConfigs/notify_public_bucket` - # + - # `folders/{folder_id}/locations/{location_id}/notificationConfigs/notify_public_bucket` - # + - # `projects/{project_id}/locations/{location_id}/notificationConfigs/notify_public_bucket` - # @!attribute [rw] description - # @return [::String] - # The description of the notification config (max of 1024 characters). - # @!attribute [rw] pubsub_topic - # @return [::String] - # The Pub/Sub topic to send notifications to. Its format is - # "projects/[project_id]/topics/[topic]". - # @!attribute [r] service_account - # @return [::String] - # Output only. The service account that needs "pubsub.topics.publish" - # permission to publish to the Pub/Sub topic. - # @!attribute [rw] streaming_config - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig::StreamingConfig] - # The config for triggering streaming-based notifications. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of when the notification config was last - # updated. - class NotificationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The config for streaming-based notifications, which send each event as soon - # as it is detected. - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across create/update events - # of assets or findings as specified by the event type. The expression is a - # list of zero or more restrictions combined via logical operators `AND` - # and `OR`. Parentheses are supported, and `OR` has higher precedence than - # `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - class StreamingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb deleted file mode 100644 index bd3046afd7de..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Cloud SCC's Notification - # @!attribute [rw] notification_config_name - # @return [::String] - # Name of the notification config that generated current notification. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # If it's a Finding based notification config, this field will be - # populated. - # @!attribute [rw] resource - # @return [::Google::Cloud::SecurityCenter::V2::Resource] - # The Cloud resource tied to this notification's Finding. - class NotificationMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb deleted file mode 100644 index b90cb7b8d034..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Contains information about the org policies associated with the finding. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the org policy. - # Example: - # "organizations/\\{organization_id}/policies/\\{constraint_name}" - class OrgPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb deleted file mode 100644 index e127710a40a5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Represents an operating system process. - # @!attribute [rw] name - # @return [::String] - # The process name, as displayed in utilities like `top` and `ps`. This name - # can be accessed through `/proc/[pid]/comm` and changed with - # `prctl(PR_SET_NAME)`. - # @!attribute [rw] binary - # @return [::Google::Cloud::SecurityCenter::V2::File] - # File information for the process executable. - # @!attribute [rw] libraries - # @return [::Array<::Google::Cloud::SecurityCenter::V2::File>] - # File information for libraries loaded by the process. - # @!attribute [rw] script - # @return [::Google::Cloud::SecurityCenter::V2::File] - # When the process represents the invocation of a script, `binary` provides - # information about the interpreter, while `script` provides information - # about the script file provided to the interpreter. - # @!attribute [rw] args - # @return [::Array<::String>] - # Process arguments as JSON encoded strings. - # @!attribute [rw] arguments_truncated - # @return [::Boolean] - # True if `args` is incomplete. - # @!attribute [rw] env_variables - # @return [::Array<::Google::Cloud::SecurityCenter::V2::EnvironmentVariable>] - # Process environment variables. - # @!attribute [rw] env_variables_truncated - # @return [::Boolean] - # True if `env_variables` is incomplete. - # @!attribute [rw] pid - # @return [::Integer] - # The process ID. - # @!attribute [rw] parent_pid - # @return [::Integer] - # The parent process ID. - # @!attribute [rw] user_id - # @return [::Integer] - # The ID of the user that executed the process. E.g. If this is the root user - # this will always be 0. - class Process - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A name-value pair representing an environment variable used in an operating - # system process. - # @!attribute [rw] name - # @return [::String] - # Environment variable name as a JSON encoded string. - # @!attribute [rw] val - # @return [::String] - # Environment variable value as a JSON encoded string. - class EnvironmentVariable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb deleted file mode 100644 index aaa75073c739..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb +++ /dev/null @@ -1,314 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Information related to the Google Cloud resource. - # @!attribute [rw] name - # @return [::String] - # The full resource name of the resource. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] display_name - # @return [::String] - # The human readable name of the resource. - # @!attribute [rw] type - # @return [::String] - # The full resource type of the resource. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] - # Indicates which cloud provider the finding is from. - # @!attribute [rw] service - # @return [::String] - # The service or resource provider associated with the resource. - # @!attribute [rw] location - # @return [::String] - # The region or location of the service (if applicable). - # @!attribute [rw] gcp_metadata - # @return [::Google::Cloud::SecurityCenter::V2::GcpMetadata] - # The GCP metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `gcp_metadata`, `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] aws_metadata - # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata] - # The AWS metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `aws_metadata`, `gcp_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] azure_metadata - # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata] - # The Azure metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `azure_metadata`, `gcp_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource_path - # @return [::Google::Cloud::SecurityCenter::V2::ResourcePath] - # Provides the path to the resource within the resource hierarchy. - # @!attribute [rw] resource_path_string - # @return [::String] - # A string representation of the resource path. - # For Google Cloud, it has the format of - # `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` - # where there can be any number of folders. - # For AWS, it has the format of - # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` - # where there can be any number of organizational units. - # For Azure, it has the format of - # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` - # where there can be any number of management groups. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Google Cloud metadata associated with the resource. Only applicable if the - # finding's cloud provider is Google Cloud. - # @!attribute [rw] project - # @return [::String] - # The full resource name of project that the resource belongs to. - # @!attribute [rw] project_display_name - # @return [::String] - # The project ID that the resource belongs to. - # @!attribute [rw] parent - # @return [::String] - # The full resource name of resource's parent. - # @!attribute [rw] parent_display_name - # @return [::String] - # The human readable name of resource's parent. - # @!attribute [r] folders - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Folder>] - # Output only. Contains a Folder message for each folder in the assets - # ancestry. The first folder is the deepest nested folder, and the last - # folder is the folder directly under the Organization. - # @!attribute [rw] organization - # @return [::String] - # The name of the organization that the resource belongs to. - class GcpMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AWS metadata associated with the resource, only applicable if the finding's - # cloud provider is Amazon Web Services. - # @!attribute [rw] organization - # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata::AwsOrganization] - # The AWS organization associated with the resource. - # @!attribute [rw] organizational_units - # @return [::Array<::Google::Cloud::SecurityCenter::V2::AwsMetadata::AwsOrganizationalUnit>] - # A list of AWS organizational units associated with the resource, ordered - # from lowest level (closest to the account) to highest level. - # @!attribute [rw] account - # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata::AwsAccount] - # The AWS account associated with the resource. - class AwsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An organization is a collection of accounts that are centrally managed - # together using consolidated billing, organized hierarchically with - # organizational units (OUs), and controlled with policies. - # @!attribute [rw] id - # @return [::String] - # The unique identifier (ID) for the organization. The regex pattern for an - # organization ID string requires "o-" followed by from 10 to 32 lowercase - # letters or digits. - class AwsOrganization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An Organizational Unit (OU) is a container of AWS accounts within a root of - # an organization. Policies that are attached to an OU apply to all accounts - # contained in that OU and in any child OUs. - # @!attribute [rw] id - # @return [::String] - # The unique identifier (ID) associated with this OU. The regex pattern for - # an organizational unit ID string requires "ou-" followed by from 4 to 32 - # lowercase letters or digits (the ID of the root that contains the OU). - # This string is followed by a second "-" dash and from 8 to 32 additional - # lowercase letters or digits. For example, "ou-ab12-cd34ef56". - # @!attribute [rw] name - # @return [::String] - # The friendly name of the OU. - class AwsOrganizationalUnit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An AWS account that is a member of an organization. - # @!attribute [rw] id - # @return [::String] - # The unique identifier (ID) of the account, containing exactly 12 digits. - # @!attribute [rw] name - # @return [::String] - # The friendly name of this account. - class AwsAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Azure metadata associated with the resource, only applicable if the finding's - # cloud provider is Microsoft Azure. - # @!attribute [rw] management_groups - # @return [::Array<::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureManagementGroup>] - # A list of Azure management groups associated with the resource, ordered - # from lowest level (closest to the subscription) to highest level. - # @!attribute [rw] subscription - # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureSubscription] - # The Azure subscription associated with the resource. - # @!attribute [rw] resource_group - # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureResourceGroup] - # The Azure resource group associated with the resource. - # @!attribute [rw] tenant - # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureTenant] - # The Azure Entra tenant associated with the resource. - class AzureMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents an Azure management group. - # @!attribute [rw] id - # @return [::String] - # The UUID of the Azure management group, for example, - # `20000000-0001-0000-0000-000000000000`. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the Azure management group. - class AzureManagementGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an Azure subscription. - # @!attribute [rw] id - # @return [::String] - # The UUID of the Azure subscription, for example, - # `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the Azure subscription. - class AzureSubscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an Azure resource group. - # @!attribute [rw] id - # @return [::String] - # The ID of the Azure resource group. - # @!attribute [rw] name - # @return [::String] - # The name of the Azure resource group. This is not a UUID. - class AzureResourceGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Microsoft Entra tenant. - # @!attribute [rw] id - # @return [::String] - # The ID of the Microsoft Entra tenant, for example, - # "a11aaa11-aa11-1aa1-11aa-1aaa11a". - # @!attribute [rw] display_name - # @return [::String] - # The display name of the Azure tenant. - class AzureTenant - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents the path of resources leading up to the resource this finding is - # about. - # @!attribute [rw] nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V2::ResourcePath::ResourcePathNode>] - # The list of nodes that make the up resource path, ordered from lowest - # level to highest level. - class ResourcePath - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A node within the resource path. Each node represents a resource within the - # resource hierarchy. - # @!attribute [rw] node_type - # @return [::Google::Cloud::SecurityCenter::V2::ResourcePath::ResourcePathNodeType] - # The type of resource this node represents. - # @!attribute [rw] id - # @return [::String] - # The ID of the resource this node represents. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the resource this node represents. - class ResourcePathNode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of resource the node represents. - module ResourcePathNodeType - # Node type is unspecified. - RESOURCE_PATH_NODE_TYPE_UNSPECIFIED = 0 - - # The node represents a Google Cloud organization. - GCP_ORGANIZATION = 1 - - # The node represents a Google Cloud folder. - GCP_FOLDER = 2 - - # The node represents a Google Cloud project. - GCP_PROJECT = 3 - - # The node represents an AWS organization. - AWS_ORGANIZATION = 4 - - # The node represents an AWS organizational unit. - AWS_ORGANIZATIONAL_UNIT = 5 - - # The node represents an AWS account. - AWS_ACCOUNT = 6 - - # The node represents an Azure management group. - AZURE_MANAGEMENT_GROUP = 7 - - # The node represents an Azure subscription. - AZURE_SUBSCRIPTION = 8 - - # The node represents an Azure resource group. - AZURE_RESOURCE_GROUP = 9 - end - end - - # The cloud provider the finding pertains to. - module CloudProvider - # The cloud provider is unspecified. - CLOUD_PROVIDER_UNSPECIFIED = 0 - - # The cloud provider is Google Cloud. - GOOGLE_CLOUD_PLATFORM = 1 - - # The cloud provider is Amazon Web Services. - AMAZON_WEB_SERVICES = 2 - - # The cloud provider is Microsoft Azure. - MICROSOFT_AZURE = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb deleted file mode 100644 index 450e83f704b5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # A resource value configuration (RVC) is a mapping configuration of user's - # resources to resource values. Used in Attack path simulations. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name for the resource value configuration - # @!attribute [rw] resource_value - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValue] - # Resource value level this expression represents - # Only required when there is no Sensitive Data Protection mapping in the - # request - # @!attribute [rw] tag_values - # @return [::Array<::String>] - # Tag values combined with `AND` to check against. - # For Google Cloud resources, they are tag value IDs in the form of - # "tagValues/123". Example: `[ "tagValues/123", "tagValues/456", - # "tagValues/789" ]` - # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing - # @!attribute [rw] resource_type - # @return [::String] - # Apply resource_value only to resources that match resource_type. - # resource_type will be checked with `AND` of other resources. - # For example, "storage.googleapis.com/Bucket" with resource_value "HIGH" - # will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. - # @!attribute [rw] scope - # @return [::String] - # Project or folder to scope this configuration to. - # For example, "project/456" would apply this configuration only to resources - # in "project/456" scope and will be checked with `AND` of other resources. - # @!attribute [rw] resource_labels_selector - # @return [::Google::Protobuf::Map{::String => ::String}] - # List of resource labels to search for, evaluated with `AND`. - # For example, "resource_labels_selector": \\{"key": "value", "env": "prod"} - # will match resources with labels "key": "value" `AND` "env": - # "prod" - # https://cloud.google.com/resource-manager/docs/creating-managing-labels - # @!attribute [rw] description - # @return [::String] - # Description of the resource value configuration. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp this resource value configuration was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp this resource value configuration was last updated. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] - # Cloud provider this configuration applies to - # @!attribute [rw] sensitive_data_protection_mapping - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig::SensitiveDataProtectionMapping] - # A mapping of the sensitivity on Sensitive Data Protection finding to - # resource values. This mapping can only be used in combination with a - # resource_type that is related to BigQuery, e.g. - # "bigquery.googleapis.com/Dataset". - class ResourceValueConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Resource value mapping for Sensitive Data Protection findings - # If any of these mappings have a resource value that is not unspecified, - # the resource_value field will be ignored when reading this configuration. - # @!attribute [rw] high_sensitivity_mapping - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValue] - # Resource value mapping for high-sensitivity Sensitive Data Protection - # findings - # @!attribute [rw] medium_sensitivity_mapping - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValue] - # Resource value mapping for medium-sensitivity Sensitive Data Protection - # findings - class SensitiveDataProtectionMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ResourceLabelsSelectorEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Value enum to map to a resource - module ResourceValue - # Unspecific value - RESOURCE_VALUE_UNSPECIFIED = 0 - - # High resource value - HIGH = 1 - - # Medium resource value - MEDIUM = 2 - - # Low resource value - LOW = 3 - - # No resource value, e.g. ignore these resources - NONE = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb deleted file mode 100644 index 1e3bcc93a58a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # User specified security marks that are attached to the parent Security - # Command Center resource. Security marks are scoped within a Security Command - # Center organization -- they can be modified and viewed by all users who have - # proper permissions on the organization. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of the SecurityMarks. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # The following list shows some examples: - # - # + `organizations/{organization_id}/assets/{asset_id}/securityMarks` - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` - # @!attribute [rw] marks - # @return [::Google::Protobuf::Map{::String => ::String}] - # Mutable user specified security marks belonging to the parent resource. - # Constraints are as follows: - # - # * Keys and values are treated as case insensitive - # * Keys must be between 1 - 256 characters (inclusive) - # * Keys must be letters, numbers, underscores, or dashes - # * Values have leading and trailing whitespace trimmed, remaining - # characters must be between 1 - 4096 characters (inclusive) - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the marks. The following list shows some examples: - # - # + `organizations/{organization_id}/assets/{asset_id}/securityMarks` - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` - # + `folders/{folder_id}/assets/{asset_id}/securityMarks` - # + - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` - # + `projects/{project_number}/assets/{asset_id}/securityMarks` - # + - # `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` - # + - # `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` - class SecurityMarks - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MarksEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb deleted file mode 100644 index 3c2c9899fac1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Represents a posture that is deployed on Google Cloud by the - # Security Command Center Posture Management service. - # A posture contains one or more policy sets. A policy set is a - # group of policies that enforce a set of security rules on Google - # Cloud. - # @!attribute [rw] name - # @return [::String] - # Name of the posture, for example, `CIS-Posture`. - # @!attribute [rw] revision_id - # @return [::String] - # The version of the posture, for example, `c7cfa2a8`. - # @!attribute [rw] posture_deployment_resource - # @return [::String] - # The project, folder, or organization on which the posture is deployed, - # for example, `projects/{project_number}`. - # @!attribute [rw] posture_deployment - # @return [::String] - # The name of the posture deployment, for example, - # `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. - # @!attribute [rw] changed_policy - # @return [::String] - # The name of the updated policy, for example, - # `projects/{project_id}/policies/{constraint_name}`. - # @!attribute [rw] policy_set - # @return [::String] - # The name of the updated policy set, for example, `cis-policyset`. - # @!attribute [rw] policy - # @return [::String] - # The ID of the updated policy, for example, `compute-policy-1`. - # @!attribute [rw] policy_drift_details - # @return [::Array<::Google::Cloud::SecurityCenter::V2::SecurityPosture::PolicyDriftDetails>] - # The details about a change in an updated policy that violates the deployed - # posture. - class SecurityPosture - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The policy field that violates the deployed posture and its expected and - # detected values. - # @!attribute [rw] field - # @return [::String] - # The name of the updated field, for example - # constraint.implementation.policy_rules[0].enforce - # @!attribute [rw] expected_value - # @return [::String] - # The value of this field that was configured in a posture, for example, - # `true` or `allowed_values={"projects/29831892"}`. - # @!attribute [rw] detected_value - # @return [::String] - # The detected value that violates the deployed posture, for example, - # `false` or `allowed_values={"projects/22831892"}`. - class PolicyDriftDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb deleted file mode 100644 index 5aa1b2607e39..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb +++ /dev/null @@ -1,1216 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Request message to create multiple resource value configs - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # The parent field in the CreateResourceValueConfigRequest - # messages must either be empty or match this field. - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::SecurityCenter::V2::CreateResourceValueConfigRequest>] - # Required. The resource value configs to be created. - class BatchCreateResourceValueConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for BatchCreateResourceValueConfigs - # @!attribute [rw] resource_value_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] - # The resource value configs created - class BatchCreateResourceValueConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for bulk findings update. - # - # Note: - # 1. If multiple bulk update requests match the same resource, the order in - # which they get executed is not defined. - # 2. Once a bulk operation is started, there is no way to stop it. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, at which bulk action needs to be applied. If no - # location is specified, findings are updated in global. The following list - # shows some examples: - # - # + `organizations/[organization_id]` - # + `organizations/[organization_id]/locations/[location_id]` - # + `folders/[folder_id]` - # + `folders/[folder_id]/locations/[location_id]` - # + `projects/[project_id]` - # + `projects/[project_id]/locations/[location_id]` - # @!attribute [rw] filter - # @return [::String] - # Expression that identifies findings that should be updated. - # The expression is a list of zero or more restrictions combined - # via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - # has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a - # `-` character in front of them to indicate negation. The fields map to - # those defined in the corresponding resource. - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # @!attribute [rw] mute_state - # @return [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest::MuteState] - # Optional. All findings matching the given filter will have their mute state - # set to this value. The default value is `MUTED`. Setting this to - # `UNDEFINED` will clear the mute state on all matching findings. - class BulkMuteFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The mute state. - module MuteState - # Unused. - MUTE_STATE_UNSPECIFIED = 0 - - # Matching findings will be muted (default). - MUTED = 1 - - # Matching findings will have their mute state cleared. - UNDEFINED = 2 - end - end - - # The response to a BulkMute request. Contains the LRO information. - class BulkMuteFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a BigQuery export. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent resource of the new BigQuery export. Its - # format is `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @!attribute [rw] big_query_export - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # Required. The BigQuery export being created. - # @!attribute [rw] big_query_export_id - # @return [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - class CreateBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a finding. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new finding's parent. The following list - # shows some examples of the format: - # + - # `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # @!attribute [rw] finding_id - # @return [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must be alphanumeric and less than or equal to 32 characters and - # greater than 0 characters in length. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # Required. The Finding being created. The name and security_marks will be - # ignored as they are both output only fields on this resource. - class CreateFindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a mute config. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new mute configs's parent. Its format is - # `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @!attribute [rw] mute_config - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # Required. The mute config being created. - # @!attribute [rw] mute_config_id - # @return [::String] - # Required. Unique identifier provided by the client within the parent scope. - # It must consist of only lowercase letters, numbers, and hyphens, must start - # with a letter, must end with either a letter or a number, and must be 63 - # characters or less. - class CreateMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a notification config. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new notification config's parent. Its format - # is `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @!attribute [rw] config_id - # @return [::String] - # Required. - # Unique identifier provided by the client within the parent scope. - # It must be between 1 and 128 characters and contain alphanumeric - # characters, underscores, or hyphens only. - # @!attribute [rw] notification_config - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # Required. The notification config being created. The name and the service - # account will be ignored as they are both output only fields on this - # resource. - class CreateNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to create single resource value config - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new ResourceValueConfig's parent. - # @!attribute [rw] resource_value_config - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # Required. The resource value config being created. - class CreateResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating a source. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new source's parent. Its format should be - # `organizations/[organization_id]`. - # @!attribute [rw] source - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # Required. The Source being created, only the display_name and description - # will be used. All other fields will be ignored. - class CreateSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a BigQuery export. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the BigQuery export to delete. The following list - # shows some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}/locations/{location}/bigQueryExports/{export_id}` - class DeleteBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a mute config. If no location is specified, - # default is global. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the mute config to delete. The following list shows some - # examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` - class DeleteMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a notification config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the notification config to delete. The following list - # shows some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]` - class DeleteNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to delete resource value config - # @!attribute [rw] name - # @return [::String] - # Required. Name of the ResourceValueConfig to delete - class DeleteResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The destination big query dataset to export findings to. - # @!attribute [rw] dataset - # @return [::String] - # Required. The relative resource name of the destination dataset, in the - # form projects/\\{projectId}/datasets/\\{datasetId}. - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The LRO metadata for a ExportFindings request. - # @!attribute [rw] export_start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Timestamp at which export was started - # @!attribute [rw] big_query_destination - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryDestination] - # Required. The destination big query dataset to export findings to. - class ExportFindingsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to a ExportFindings request. Contains the LRO information. - class ExportFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for retrieving a BigQuery export. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the BigQuery export to retrieve. The following list shows - # some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` - class GetBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for retrieving a mute config. If no location is specified, - # default is global. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the mute config to retrieve. The following list shows - # some examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` - class GetMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a notification config. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the notification config to get. The following list shows - # some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` - class GetNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to get resource value config - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource value config to retrieve. Its format is - # organizations/\\{organization}/resourceValueConfigs/\\{config_id}. - class GetResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a source. - # @!attribute [rw] name - # @return [::String] - # Required. Relative resource name of the source. Its format is - # `organizations/[organization_id]/source/[source_id]`. - class GetSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for grouping by findings. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the source to groupBy. If no location is specified, - # finding is assumed to be in global. - # The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To groupBy across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/[location_id]` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-/locations/[location_id]` - # + `projects/{project_id}/sources/-` - # + `projects/{project_id}/sources/-/locations/[location_id]` - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * security_marks.marks: `=`, `:` - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # @!attribute [rw] group_by - # @return [::String] - # Required. Expression that defines what assets fields to use for grouping. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: "parent,resource_name". - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `GroupFindingsResponse`; indicates - # that this is a continuation of a prior `GroupFindings` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class GroupFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for group by findings. - # @!attribute [rw] group_by_results - # @return [::Array<::Google::Cloud::SecurityCenter::V2::GroupResult>] - # Group results. There exists an element for each existing unique - # combination of property/values. The element contains a count for the number - # of times those specific property/values appear. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of results matching the query. - class GroupFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Result containing the properties and count of a groupBy request. - # @!attribute [rw] properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Properties matching the groupBy fields in the request. - # @!attribute [rw] count - # @return [::Integer] - # Total count of resources for the given properties. - class GroupResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class PropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for listing the attack paths for a given simulation or valued - # resource. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list attack paths. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - # @!attribute [rw] filter - # @return [::String] - # The filter expression that filters the attack path in the response. - # Supported fields: - # - # * `valued_resources` supports = - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListAttackPathsResponse`; indicates - # that this is a continuation of a prior `ListAttackPaths` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListAttackPathsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing the attack paths for a given simulation or - # valued resource. - # @!attribute [rw] attack_paths - # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath>] - # The attack paths that the attack path simulation identified. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - class ListAttackPathsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting simulation. - # Simulation name can include "latest" to retrieve the latest simulation - # For example, "organizations/123/simulations/latest" - # @!attribute [rw] name - # @return [::String] - # Required. The organization name or simulation name of this simulation - # - # Valid format: - # `organizations/{organization}/simulations/latest` - # `organizations/{organization}/simulations/{simulation}` - class GetSimulationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a valued resource. - # @!attribute [rw] name - # @return [::String] - # Required. The name of this valued resource - # - # Valid format: - # `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}` - class GetValuedResourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing BigQuery exports at a given scope e.g. - # organization, folder or project. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns the collection of BigQuery exports. Its - # format is `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListBigQueryExports` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListBigQueryExports` - # must match the call that provided the page token. - class ListBigQueryExportsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing BigQuery exports. - # @!attribute [rw] big_query_exports - # @return [::Array<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] - # The BigQuery exports from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListBigQueryExportsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing findings. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the source the findings belong to. If no location is - # specified, the default is global. The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To list across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/{location_id}` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-locations/{location_id}` - # + `projects/{projects_id}/sources/-` - # + `projects/{projects_id}/sources/-/locations/{location_id}` - # @!attribute [rw] filter - # @return [::String] - # Expression that defines the filter to apply across findings. - # The expression is a list of one or more restrictions combined via logical - # operators `AND` and `OR`. - # Parentheses are supported, and `OR` has higher precedence than `AND`. - # - # Restrictions have the form ` ` and may have a `-` - # character in front of them to indicate negation. Examples include: - # - # * name - # * security_marks.marks.marka - # - # The supported operators are: - # - # * `=` for all value types. - # * `>`, `<`, `>=`, `<=` for integer values. - # * `:`, meaning substring matching, for strings. - # - # The supported value types are: - # - # * string literals in quotes. - # * integer literals without quotes. - # * boolean literals `true` and `false` without quotes. - # - # The following field and operator combinations are supported: - # - # * name: `=` - # * parent: `=`, `:` - # * resource_name: `=`, `:` - # * state: `=`, `:` - # * category: `=`, `:` - # * external_uri: `=`, `:` - # * event_time: `=`, `>`, `<`, `>=`, `<=` - # - # Usage: This should be milliseconds since epoch or an RFC3339 string. - # Examples: - # `event_time = "2019-06-10T16:07:18-07:00"` - # `event_time = 1560208038000` - # - # * severity: `=`, `:` - # * security_marks.marks: `=`, `:` - # * resource: - # * resource.name: `=`, `:` - # * resource.parent_name: `=`, `:` - # * resource.parent_display_name: `=`, `:` - # * resource.project_name: `=`, `:` - # * resource.project_display_name: `=`, `:` - # * resource.type: `=`, `:` - # * resource.folders.resource_folder: `=`, `:` - # * resource.display_name: `=`, `:` - # @!attribute [rw] order_by - # @return [::String] - # Expression that defines what fields and order to use for sorting. The - # string value should follow SQL syntax: comma separated list of fields. For - # example: "name,parent". The default sorting order - # is ascending. To specify descending order for a field, a suffix " desc" - # should be appended to the field name. For example: "name - # desc,parent". Redundant space characters in the - # syntax are insignificant. "name desc,parent" and " - # name desc , parent " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # security_marks.marks - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # A field mask to specify the Finding fields to be listed in the response. - # An empty field mask will list all fields. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListFindingsResponse`; indicates - # that this is a continuation of a prior `ListFindings` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing findings. - # @!attribute [rw] list_findings_results - # @return [::Array<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] - # Findings matching the list request. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The total number of findings matching the query. - class ListFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Result containing the Finding. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # Finding matching the search request. - # @!attribute [r] resource - # @return [::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult::Resource] - # Output only. Resource that is associated with this finding. - class ListFindingsResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information related to the Google Cloud resource that is - # associated with this finding. - # @!attribute [rw] name - # @return [::String] - # The full resource name of the resource. See: - # https://cloud.google.com/apis/design/resource_names#full_resource_name - # @!attribute [rw] display_name - # @return [::String] - # The human readable name of the resource. - # @!attribute [rw] type - # @return [::String] - # The full resource type of the resource. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] - # Indicates which cloud provider the finding is from. - # @!attribute [rw] service - # @return [::String] - # The service or resource provider associated with the resource. - # @!attribute [rw] location - # @return [::String] - # The region or location of the service (if applicable). - # @!attribute [rw] gcp_metadata - # @return [::Google::Cloud::SecurityCenter::V2::GcpMetadata] - # The GCP metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `gcp_metadata`, `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] aws_metadata - # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata] - # The AWS metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `aws_metadata`, `gcp_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] azure_metadata - # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata] - # The Azure metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `azure_metadata`, `gcp_metadata`, `aws_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resource_path - # @return [::Google::Cloud::SecurityCenter::V2::ResourcePath] - # Provides the path to the resource within the resource hierarchy. - # @!attribute [rw] resource_path_string - # @return [::String] - # A string representation of the resource path. - # For Google Cloud, it has the format of - # `organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id}` - # where there can be any number of folders. - # For AWS, it has the format of - # `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` - # where there can be any number of organizational units. - # For Azure, it has the format of - # `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` - # where there can be any number of management groups. - class Resource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Request message for listing mute configs at a given scope e.g. organization, - # folder or project. If no location is specified, default is - # global. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns the collection of mute configs. Its format - # is `organizations/[organization_id]", "folders/[folder_id]`, - # `projects/[project_id]`, - # `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, - # `projects/[project_id]/locations/[location_id]`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListMuteConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMuteConfigs` must - # match the call that provided the page token. - class ListMuteConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing mute configs. - # @!attribute [rw] mute_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V2::MuteConfig>] - # The mute configs from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListMuteConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing notification configs. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent in which to list the notification - # configurations. Its format is - # "organizations/[organization_id]/locations/[location_id]", - # "folders/[folder_id]/locations/[location_id]", or - # "projects/[project_id]/locations/[location_id]". - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListNotificationConfigsResponse`; indicates - # that this is a continuation of a prior `ListNotificationConfigs` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListNotificationConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing notification configs. - # @!attribute [rw] notification_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] - # Notification configs belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - class ListNotificationConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to list resource value configs of a parent - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns the collection of resource value configs. - # Its format is - # `organizations/[organization_id]` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of configs to return. The service may return fewer than - # this value. - # If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListResourceValueConfigs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListResourceValueConfigs` must match the call that provided the - # page token. - # - # page_size can be specified, and the new page_size will be used. - class ListResourceValueConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message to list resource value configs - # @!attribute [rw] resource_value_configs - # @return [::Array<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] - # The resource value configs from the specified parent. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is empty, there are no subsequent pages. - class ListResourceValueConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing sources. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent of sources to list. Its format should - # be `organizations/[organization_id]`, `folders/[folder_id]`, or - # `projects/[project_id]`. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListSourcesResponse`; indicates - # that this is a continuation of a prior `ListSources` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - class ListSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing sources. - # @!attribute [rw] sources - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Source>] - # Sources belonging to the requested parent. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - class ListSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing the valued resources for a given simulation. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list exposed resources. - # - # Valid formats: - # `organizations/{organization}`, - # `organizations/{organization}/simulations/{simulation}` - # `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` - # @!attribute [rw] filter - # @return [::String] - # The filter expression that filters the valued resources in the response. - # Supported fields: - # - # * `resource_value` supports = - # * `resource_type` supports = - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListValuedResourcesResponse`; indicates - # that this is a continuation of a prior `ListValuedResources` call, and - # that the system should return the next page of data. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response. Default is - # 10, minimum is 1, maximum is 1000. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The fields by which to order the valued resources response. - # - # Supported fields: - # - # * `exposed_score` - # - # * `resource_value` - # - # * `resource_type` - # - # Values should be a comma separated list of fields. For example: - # `exposed_score,resource_value`. - # - # The default sorting order is descending. To specify ascending or descending - # order for a field, append a " ASC" or a " DESC" suffix, respectively; for - # example: `exposed_score DESC`. - class ListValuedResourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing the valued resources for a given simulation. - # @!attribute [rw] valued_resources - # @return [::Array<::Google::Cloud::SecurityCenter::V2::ValuedResource>] - # The valued resources that the attack path simulation identified. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results. - # @!attribute [rw] total_size - # @return [::Integer] - # The estimated total number of results matching the query. - class ListValuedResourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a finding's state. - # @!attribute [rw] name - # @return [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V2::Finding::State] - # Required. The desired State of the finding. - class SetFindingStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a finding's mute status. - # @!attribute [rw] name - # @return [::String] - # Required. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @!attribute [rw] mute - # @return [::Google::Cloud::SecurityCenter::V2::Finding::Mute] - # Required. The desired state of the Mute. - class SetMuteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a BigQuery export. - # @!attribute [rw] big_query_export - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # Required. The BigQuery export being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - class UpdateBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a ExternalSystem resource. - # @!attribute [rw] external_system - # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] - # Required. The external system resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the external system resource. - # - # If empty all mutable fields will be updated. - class UpdateExternalSystemRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating or creating a finding. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # Required. The finding resource to update or create if it does not already - # exist. parent, security_marks, and update_time will be ignored. - # - # In the case of creation, the finding id portion of the name must be - # alphanumeric and less than or equal to 32 characters and greater than 0 - # characters in length. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the finding resource. This field should - # not be specified when creating a finding. - # - # When updating a finding, an empty mask is treated as updating all mutable - # fields and replacing source_properties. Individual source_properties can - # be added/updated by using "source_properties." in the field - # mask. - class UpdateFindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a mute config. - # @!attribute [rw] mute_config - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # Required. The mute config being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - class UpdateMuteConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a notification config. - # @!attribute [rw] notification_config - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # Required. The notification config to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the notification config. - # - # If empty all mutable fields will be updated. - class UpdateNotificationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to update resource value config - # @!attribute [rw] resource_value_config - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # Required. The resource value config being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If empty all mutable fields will be updated. - # - # To update nested fields, include the top level field in the mask - # For example, to update gcp_metadata.resource_type, include the - # "gcp_metadata" field mask - class UpdateResourceValueConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a SecurityMarks resource. - # @!attribute [rw] security_marks - # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # Required. The security marks resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the security marks resource. - # - # The field mask must not contain duplicate fields. - # If empty or set to "marks", all marks will be replaced. Individual - # marks can be updated using "marks.". - class UpdateSecurityMarksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a source. - # @!attribute [rw] source - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # Required. The source resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The FieldMask to use when updating the source resource. - # - # If empty all mutable fields will be updated. - class UpdateSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb deleted file mode 100644 index 05bb5af8f001..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Attack path simulation - # @!attribute [rw] name - # @return [::String] - # Full resource name of the Simulation: - # `organizations/123/simulations/456` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time simulation was created - # @!attribute [rw] resource_value_configs_metadata - # @return [::Array<::Google::Cloud::SecurityCenter::V2::ResourceValueConfigMetadata>] - # Resource value configurations' metadata used in this simulation. Maximum of - # 100. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] - # Indicates which cloud provider was used in this simulation. - class Simulation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb deleted file mode 100644 index 27dd5626b0cf..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Security Command Center finding source. A finding source - # is an entity or a mechanism that can produce a finding. A source is like a - # container of findings that come from the same scanner, logger, monitor, and - # other tools. - # @!attribute [rw] name - # @return [::String] - # The relative resource name of this source. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # Example: - # "organizations/\\{organization_id}/sources/\\{source_id}" - # @!attribute [rw] display_name - # @return [::String] - # The source's display name. - # A source's display name must be unique amongst its siblings, for example, - # two sources with the same parent can't share the same display name. - # The display name must have a length between 1 and 64 characters - # (inclusive). - # @!attribute [rw] description - # @return [::String] - # The description of the source (max of 1024 characters). - # Example: - # "Web Security Scanner is a web security scanner for common - # vulnerabilities in App Engine applications. It can automatically - # scan and detect four common vulnerabilities, including cross-site-scripting - # (XSS), Flash injection, mixed content (HTTP in HTTPS), and - # outdated or insecure libraries." - # @!attribute [rw] canonical_name - # @return [::String] - # The canonical name of the finding source. It's either - # "organizations/\\{organization_id}/sources/\\{source_id}", - # "folders/\\{folder_id}/sources/\\{source_id}", or - # "projects/\\{project_number}/sources/\\{source_id}", - # depending on the closest CRM ancestor of the resource associated with the - # finding. - class Source - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb deleted file mode 100644 index dff76d98c704..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Contains details about a group of security issues that, when the issues - # occur together, represent a greater risk than when the issues occur - # independently. A group of such issues is referred to as a toxic - # combination. - # @!attribute [rw] attack_exposure_score - # @return [::Float] - # The - # [Attack exposure - # score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) - # of this toxic combination. The score is a measure of how much this toxic - # combination exposes one or more high-value resources to potential attack. - # @!attribute [rw] related_findings - # @return [::Array<::String>] - # List of resource names of findings associated with this toxic combination. - # For example, `organizations/123/sources/456/findings/789`. - class ToxicCombination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb deleted file mode 100644 index e97a21960308..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # A resource that is determined to have value to a user's system - # @!attribute [rw] name - # @return [::String] - # Valued resource name, for example, - # e.g.: - # `organizations/123/simulations/456/valuedResources/789` - # @!attribute [rw] resource - # @return [::String] - # The - # [full resource - # name](https://cloud.google.com/apis/design/resource_names#full_resource_name) - # of the valued resource. - # @!attribute [rw] resource_type - # @return [::String] - # The [resource - # type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - # of the valued resource. - # @!attribute [rw] display_name - # @return [::String] - # Human-readable name of the valued resource. - # @!attribute [rw] resource_value - # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource::ResourceValue] - # How valuable this resource is. - # @!attribute [rw] exposed_score - # @return [::Float] - # Exposed score for this valued resource. A value of 0 means no exposure was - # detected exposure. - # @!attribute [rw] resource_value_configs_used - # @return [::Array<::Google::Cloud::SecurityCenter::V2::ResourceValueConfigMetadata>] - # List of resource value configurations' metadata used to determine the value - # of this resource. Maximum of 100. - class ValuedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # How valuable the resource is. - module ResourceValue - # The resource value isn't specified. - RESOURCE_VALUE_UNSPECIFIED = 0 - - # This is a low-value resource. - RESOURCE_VALUE_LOW = 1 - - # This is a medium-value resource. - RESOURCE_VALUE_MEDIUM = 2 - - # This is a high-value resource. - RESOURCE_VALUE_HIGH = 3 - end - end - - # Metadata about a ResourceValueConfig. For example, id and name. - # @!attribute [rw] name - # @return [::String] - # Resource value config name - class ResourceValueConfigMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb deleted file mode 100644 index f11b0348de0a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb +++ /dev/null @@ -1,68 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenter - module V2 - # Vertex AI-related information associated with the finding. - # @!attribute [rw] datasets - # @return [::Array<::Google::Cloud::SecurityCenter::V2::VertexAi::Dataset>] - # Datasets associated with the finding. - # @!attribute [rw] pipelines - # @return [::Array<::Google::Cloud::SecurityCenter::V2::VertexAi::Pipeline>] - # Pipelines associated with the finding. - class VertexAi - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Vertex AI dataset associated with the finding. - # @!attribute [rw] name - # @return [::String] - # Resource name of the dataset, e.g. - # projects/\\{project}/locations/\\{location}/datasets/2094040236064505856 - # @!attribute [rw] display_name - # @return [::String] - # The user defined display name of dataset, e.g. plants-dataset - # @!attribute [rw] source - # @return [::String] - # Data source, such as a BigQuery source URI, e.g. - # bq://scc-nexus-test.AIPPtest.gsod - class Dataset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Vertex AI training pipeline associated with the finding. - # @!attribute [rw] name - # @return [::String] - # Resource name of the pipeline, e.g. - # projects/\\{project}/locations/\\{location}/trainingPipelines/5253428229225578496 - # @!attribute [rw] display_name - # @return [::String] - # The user-defined display name of pipeline, e.g. plants-classification - class Pipeline - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb deleted file mode 100644 index 41c3a3589f1d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb +++ /dev/null @@ -1,365 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V2 - # Refers to common vulnerability fields e.g. cve, cvss, cwe etc. - # @!attribute [rw] cve - # @return [::Google::Cloud::SecurityCenter::V2::Cve] - # CVE stands for Common Vulnerabilities and Exposures - # (https://cve.mitre.org/about/) - # @!attribute [rw] offending_package - # @return [::Google::Cloud::SecurityCenter::V2::Package] - # The offending package is relevant to the finding. - # @!attribute [rw] fixed_package - # @return [::Google::Cloud::SecurityCenter::V2::Package] - # The fixed package is relevant to the finding. - # @!attribute [rw] security_bulletin - # @return [::Google::Cloud::SecurityCenter::V2::SecurityBulletin] - # The security bulletin is relevant to this finding. - # @!attribute [rw] provider_risk_score - # @return [::Integer] - # Provider provided risk_score based on multiple factors. The higher the risk - # score, the more risky the vulnerability is. - # @!attribute [rw] reachable - # @return [::Boolean] - # Represents whether the vulnerability is reachable (detected via static - # analysis) - # @!attribute [rw] cwes - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Cwe>] - # Represents one or more Common Weakness Enumeration (CWE) information on - # this vulnerability. - class Vulnerability - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CVE stands for Common Vulnerabilities and Exposures. - # Information from the [CVE - # record](https://www.cve.org/ResourcesSupport/Glossary) that describes this - # vulnerability. - # @!attribute [rw] id - # @return [::String] - # The unique identifier for the vulnerability. e.g. CVE-2021-34527 - # @!attribute [rw] references - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Reference>] - # Additional information about the CVE. - # e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 - # @!attribute [rw] cvssv3 - # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3] - # Describe Common Vulnerability Scoring System specified at - # https://www.first.org/cvss/v3.1/specification-document - # @!attribute [rw] upstream_fix_available - # @return [::Boolean] - # Whether upstream fix is available for the CVE. - # @!attribute [rw] impact - # @return [::Google::Cloud::SecurityCenter::V2::Cve::RiskRating] - # The potential impact of the vulnerability if it was to be exploited. - # @!attribute [rw] exploitation_activity - # @return [::Google::Cloud::SecurityCenter::V2::Cve::ExploitationActivity] - # The exploitation activity of the vulnerability in the wild. - # @!attribute [rw] observed_in_the_wild - # @return [::Boolean] - # Whether or not the vulnerability has been observed in the wild. - # @!attribute [rw] zero_day - # @return [::Boolean] - # Whether or not the vulnerability was zero day when the finding was - # published. - # @!attribute [rw] exploit_release_date - # @return [::Google::Protobuf::Timestamp] - # Date the first publicly available exploit or PoC was released. - # @!attribute [rw] first_exploitation_date - # @return [::Google::Protobuf::Timestamp] - # Date of the earliest known exploitation. - class Cve - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible values of impact of the vulnerability if it was to be - # exploited. - module RiskRating - # Invalid or empty value. - RISK_RATING_UNSPECIFIED = 0 - - # Exploitation would have little to no security impact. - LOW = 1 - - # Exploitation would enable attackers to perform activities, or could allow - # attackers to have a direct impact, but would require additional steps. - MEDIUM = 2 - - # Exploitation would enable attackers to have a notable direct impact - # without needing to overcome any major mitigating factors. - HIGH = 3 - - # Exploitation would fundamentally undermine the security of affected - # systems, enable actors to perform significant attacks with minimal - # effort, with little to no mitigating factors to overcome. - CRITICAL = 4 - end - - # The possible values of exploitation activity of the vulnerability in the - # wild. - module ExploitationActivity - # Invalid or empty value. - EXPLOITATION_ACTIVITY_UNSPECIFIED = 0 - - # Exploitation has been reported or confirmed to widely occur. - WIDE = 1 - - # Limited reported or confirmed exploitation activities. - CONFIRMED = 2 - - # Exploit is publicly available. - AVAILABLE = 3 - - # No known exploitation activity, but has a high potential for - # exploitation. - ANTICIPATED = 4 - - # No known exploitation activity. - NO_KNOWN = 5 - end - end - - # Additional Links - # @!attribute [rw] source - # @return [::String] - # Source of the reference e.g. NVD - # @!attribute [rw] uri - # @return [::String] - # Uri for the mentioned source e.g. - # https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. - class Reference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Common Vulnerability Scoring System version 3. - # @!attribute [rw] base_score - # @return [::Float] - # The base score is a function of the base metric scores. - # @!attribute [rw] attack_vector - # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::AttackVector] - # Base Metrics - # Represents the intrinsic characteristics of a vulnerability that are - # constant over time and across user environments. - # This metric reflects the context by which vulnerability exploitation is - # possible. - # @!attribute [rw] attack_complexity - # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::AttackComplexity] - # This metric describes the conditions beyond the attacker's control that - # must exist in order to exploit the vulnerability. - # @!attribute [rw] privileges_required - # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::PrivilegesRequired] - # This metric describes the level of privileges an attacker must possess - # before successfully exploiting the vulnerability. - # @!attribute [rw] user_interaction - # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::UserInteraction] - # This metric captures the requirement for a human user, other than the - # attacker, to participate in the successful compromise of the vulnerable - # component. - # @!attribute [rw] scope - # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::Scope] - # The Scope metric captures whether a vulnerability in one vulnerable - # component impacts resources in components beyond its security scope. - # @!attribute [rw] confidentiality_impact - # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::Impact] - # This metric measures the impact to the confidentiality of the information - # resources managed by a software component due to a successfully exploited - # vulnerability. - # @!attribute [rw] integrity_impact - # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::Impact] - # This metric measures the impact to integrity of a successfully exploited - # vulnerability. - # @!attribute [rw] availability_impact - # @return [::Google::Cloud::SecurityCenter::V2::Cvssv3::Impact] - # This metric measures the impact to the availability of the impacted - # component resulting from a successfully exploited vulnerability. - class Cvssv3 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This metric reflects the context by which vulnerability exploitation is - # possible. - module AttackVector - # Invalid value. - ATTACK_VECTOR_UNSPECIFIED = 0 - - # The vulnerable component is bound to the network stack and the set of - # possible attackers extends beyond the other options listed below, up to - # and including the entire Internet. - ATTACK_VECTOR_NETWORK = 1 - - # The vulnerable component is bound to the network stack, but the attack is - # limited at the protocol level to a logically adjacent topology. - ATTACK_VECTOR_ADJACENT = 2 - - # The vulnerable component is not bound to the network stack and the - # attacker's path is via read/write/execute capabilities. - ATTACK_VECTOR_LOCAL = 3 - - # The attack requires the attacker to physically touch or manipulate the - # vulnerable component. - ATTACK_VECTOR_PHYSICAL = 4 - end - - # This metric describes the conditions beyond the attacker's control that - # must exist in order to exploit the vulnerability. - module AttackComplexity - # Invalid value. - ATTACK_COMPLEXITY_UNSPECIFIED = 0 - - # Specialized access conditions or extenuating circumstances do not exist. - # An attacker can expect repeatable success when attacking the vulnerable - # component. - ATTACK_COMPLEXITY_LOW = 1 - - # A successful attack depends on conditions beyond the attacker's control. - # That is, a successful attack cannot be accomplished at will, but requires - # the attacker to invest in some measurable amount of effort in preparation - # or execution against the vulnerable component before a successful attack - # can be expected. - ATTACK_COMPLEXITY_HIGH = 2 - end - - # This metric describes the level of privileges an attacker must possess - # before successfully exploiting the vulnerability. - module PrivilegesRequired - # Invalid value. - PRIVILEGES_REQUIRED_UNSPECIFIED = 0 - - # The attacker is unauthorized prior to attack, and therefore does not - # require any access to settings or files of the vulnerable system to - # carry out an attack. - PRIVILEGES_REQUIRED_NONE = 1 - - # The attacker requires privileges that provide basic user capabilities - # that could normally affect only settings and files owned by a user. - # Alternatively, an attacker with Low privileges has the ability to access - # only non-sensitive resources. - PRIVILEGES_REQUIRED_LOW = 2 - - # The attacker requires privileges that provide significant (e.g., - # administrative) control over the vulnerable component allowing access to - # component-wide settings and files. - PRIVILEGES_REQUIRED_HIGH = 3 - end - - # This metric captures the requirement for a human user, other than the - # attacker, to participate in the successful compromise of the vulnerable - # component. - module UserInteraction - # Invalid value. - USER_INTERACTION_UNSPECIFIED = 0 - - # The vulnerable system can be exploited without interaction from any user. - USER_INTERACTION_NONE = 1 - - # Successful exploitation of this vulnerability requires a user to take - # some action before the vulnerability can be exploited. - USER_INTERACTION_REQUIRED = 2 - end - - # The Scope metric captures whether a vulnerability in one vulnerable - # component impacts resources in components beyond its security scope. - module Scope - # Invalid value. - SCOPE_UNSPECIFIED = 0 - - # An exploited vulnerability can only affect resources managed by the same - # security authority. - SCOPE_UNCHANGED = 1 - - # An exploited vulnerability can affect resources beyond the security scope - # managed by the security authority of the vulnerable component. - SCOPE_CHANGED = 2 - end - - # The Impact metrics capture the effects of a successfully exploited - # vulnerability on the component that suffers the worst outcome that is most - # directly and predictably associated with the attack. - module Impact - # Invalid value. - IMPACT_UNSPECIFIED = 0 - - # High impact. - IMPACT_HIGH = 1 - - # Low impact. - IMPACT_LOW = 2 - - # No impact. - IMPACT_NONE = 3 - end - end - - # Package is a generic definition of a package. - # @!attribute [rw] package_name - # @return [::String] - # The name of the package where the vulnerability was detected. - # @!attribute [rw] cpe_uri - # @return [::String] - # The CPE URI where the vulnerability was detected. - # @!attribute [rw] package_type - # @return [::String] - # Type of package, for example, os, maven, or go. - # @!attribute [rw] package_version - # @return [::String] - # The version of the package. - class Package - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SecurityBulletin are notifications of vulnerabilities of Google products. - # @!attribute [rw] bulletin_id - # @return [::String] - # ID of the bulletin corresponding to the vulnerability. - # @!attribute [rw] submission_time - # @return [::Google::Protobuf::Timestamp] - # Submission time of this Security Bulletin. - # @!attribute [rw] suggested_upgrade_version - # @return [::String] - # This represents a version that the cluster receiving this notification - # should be upgraded to, based on its current version. For example, 1.15.0 - class SecurityBulletin - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CWE stands for Common Weakness Enumeration. Information about this weakness, - # as described by [CWE](https://cwe.mitre.org/). - # @!attribute [rw] id - # @return [::String] - # The CWE identifier, e.g. CWE-94 - # @!attribute [rw] references - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Reference>] - # Any reference to the details on the CWE, for example, - # https://cwe.mitre.org/data/definitions/94.html - class Cwe - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile deleted file mode 100644 index 99432c66bb92..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-security_center-v2", path: "../" -else - gem "google-cloud-security_center-v2" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb deleted file mode 100644 index 35868ebf184f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the batch_create_resource_value_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#batch_create_resource_value_configs. -# -def batch_create_resource_value_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new - - # Call the batch_create_resource_value_configs method. - result = client.batch_create_resource_value_configs request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb deleted file mode 100644 index 937f173f1687..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_BulkMuteFindings_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the bulk_mute_findings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#bulk_mute_findings. -# -def bulk_mute_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new - - # Call the bulk_mute_findings method. - result = client.bulk_mute_findings request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END securitycenter_v2_generated_SecurityCenter_BulkMuteFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb deleted file mode 100644 index 34909f562782..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_CreateBigQueryExport_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the create_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_big_query_export. -# -def create_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new - - # Call the create_big_query_export method. - result = client.create_big_query_export request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_CreateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb deleted file mode 100644 index b2dbeb349717..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_CreateFinding_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the create_finding call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_finding. -# -def create_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new - - # Call the create_finding method. - result = client.create_finding request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb deleted file mode 100644 index 5ac853e23ca6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_CreateMuteConfig_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the create_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_mute_config. -# -def create_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new - - # Call the create_mute_config method. - result = client.create_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_CreateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb deleted file mode 100644 index 8d63ccdb2cc6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_CreateNotificationConfig_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the create_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_notification_config. -# -def create_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new - - # Call the create_notification_config method. - result = client.create_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb deleted file mode 100644 index 042a0de0ff05..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_CreateSource_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the create_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_source. -# -def create_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new - - # Call the create_source method. - result = client.create_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb deleted file mode 100644 index c5b9ec740f3f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_DeleteBigQueryExport_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the delete_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_big_query_export. -# -def delete_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new - - # Call the delete_big_query_export method. - result = client.delete_big_query_export request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_DeleteBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb deleted file mode 100644 index f6d9fe6232b5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_DeleteMuteConfig_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the delete_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_mute_config. -# -def delete_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new - - # Call the delete_mute_config method. - result = client.delete_mute_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_DeleteMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb deleted file mode 100644 index e7084636df2d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_DeleteNotificationConfig_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the delete_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_notification_config. -# -def delete_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new - - # Call the delete_notification_config method. - result = client.delete_notification_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb deleted file mode 100644 index f369d1ca9754..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_DeleteResourceValueConfig_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the delete_resource_value_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_resource_value_config. -# -def delete_resource_value_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new - - # Call the delete_resource_value_config method. - result = client.delete_resource_value_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_DeleteResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb deleted file mode 100644 index 167844fa3f97..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_GetBigQueryExport_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the get_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_big_query_export. -# -def get_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new - - # Call the get_big_query_export method. - result = client.get_big_query_export request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb deleted file mode 100644 index e260df274f67..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_GetIamPolicy_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the get_iam_policy call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb deleted file mode 100644 index 737f0b9b778a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_GetMuteConfig_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the get_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_mute_config. -# -def get_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new - - # Call the get_mute_config method. - result = client.get_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb deleted file mode 100644 index a6e6fe0bf43d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_GetNotificationConfig_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the get_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_notification_config. -# -def get_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new - - # Call the get_notification_config method. - result = client.get_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb deleted file mode 100644 index dca8397631b9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_GetResourceValueConfig_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the get_resource_value_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_resource_value_config. -# -def get_resource_value_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new - - # Call the get_resource_value_config method. - result = client.get_resource_value_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb deleted file mode 100644 index 97887b9c87b5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_GetSimulation_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the get_simulation call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_simulation. -# -def get_simulation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new - - # Call the get_simulation method. - result = client.get_simulation request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Simulation. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetSimulation_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb deleted file mode 100644 index 9e23b772526e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_GetSource_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the get_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_source. -# -def get_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new - - # Call the get_source method. - result = client.get_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb deleted file mode 100644 index 1d27e0e2a2bd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_GetValuedResource_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the get_valued_resource call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_valued_resource. -# -def get_valued_resource - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new - - # Call the get_valued_resource method. - result = client.get_valued_resource request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::ValuedResource. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetValuedResource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb deleted file mode 100644 index 1c83d2e734fb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_GroupFindings_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the group_findings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#group_findings. -# -def group_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new - - # Call the group_findings method. - result = client.group_findings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V2::GroupResult. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb deleted file mode 100644 index efd9cc9a111e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_ListAttackPaths_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the list_attack_paths call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_attack_paths. -# -def list_attack_paths - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new - - # Call the list_attack_paths method. - result = client.list_attack_paths request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V2::AttackPath. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListAttackPaths_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb deleted file mode 100644 index b499ded4d8b6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_ListBigQueryExports_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the list_big_query_exports call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_big_query_exports. -# -def list_big_query_exports - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new - - # Call the list_big_query_exports method. - result = client.list_big_query_exports request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V2::BigQueryExport. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListBigQueryExports_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb deleted file mode 100644 index f8f726312d73..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_ListFindings_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the list_findings call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_findings. -# -def list_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new - - # Call the list_findings method. - result = client.list_findings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb deleted file mode 100644 index aa028407968b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_ListMuteConfigs_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the list_mute_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_mute_configs. -# -def list_mute_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new - - # Call the list_mute_configs method. - result = client.list_mute_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V2::MuteConfig. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListMuteConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb deleted file mode 100644 index 421f44da22ce..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_ListNotificationConfigs_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the list_notification_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_notification_configs. -# -def list_notification_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new - - # Call the list_notification_configs method. - result = client.list_notification_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V2::NotificationConfig. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb deleted file mode 100644 index ebd23f97037d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_ListResourceValueConfigs_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the list_resource_value_configs call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_resource_value_configs. -# -def list_resource_value_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new - - # Call the list_resource_value_configs method. - result = client.list_resource_value_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb deleted file mode 100644 index 0d014e61ce97..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_ListSources_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the list_sources call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_sources. -# -def list_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new - - # Call the list_sources method. - result = client.list_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V2::Source. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb deleted file mode 100644 index ff34383c5836..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_ListValuedResources_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the list_valued_resources call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_valued_resources. -# -def list_valued_resources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new - - # Call the list_valued_resources method. - result = client.list_valued_resources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenter::V2::ValuedResource. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListValuedResources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb deleted file mode 100644 index 948f27b578d9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_SetFindingState_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the set_finding_state call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_finding_state. -# -def set_finding_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new - - # Call the set_finding_state method. - result = client.set_finding_state request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb deleted file mode 100644 index 357443d72dfc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_SetIamPolicy_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the set_iam_policy call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb deleted file mode 100644 index 7928a7e3a85b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_SetMute_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the set_mute call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_mute. -# -def set_mute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new - - # Call the set_mute method. - result = client.set_mute request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_SetMute_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb deleted file mode 100644 index 7a22e129a409..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_TestIamPermissions_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the test_iam_permissions call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb deleted file mode 100644 index c3357e841268..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_UpdateBigQueryExport_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the update_big_query_export call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_big_query_export. -# -def update_big_query_export - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new - - # Call the update_big_query_export method. - result = client.update_big_query_export request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb deleted file mode 100644 index 58bb7f1196d7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_UpdateExternalSystem_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the update_external_system call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_external_system. -# -def update_external_system - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new - - # Call the update_external_system method. - result = client.update_external_system request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::ExternalSystem. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateExternalSystem_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb deleted file mode 100644 index 3d8d7bc0e599..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_UpdateFinding_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the update_finding call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_finding. -# -def update_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new - - # Call the update_finding method. - result = client.update_finding request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb deleted file mode 100644 index efa2c28e01be..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_UpdateMuteConfig_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the update_mute_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_mute_config. -# -def update_mute_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new - - # Call the update_mute_config method. - result = client.update_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb deleted file mode 100644 index 50e827404937..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_UpdateNotificationConfig_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the update_notification_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_notification_config. -# -def update_notification_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new - - # Call the update_notification_config method. - result = client.update_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb deleted file mode 100644 index fb28fc12506d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_UpdateResourceValueConfig_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the update_resource_value_config call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_resource_value_config. -# -def update_resource_value_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new - - # Call the update_resource_value_config method. - result = client.update_resource_value_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb deleted file mode 100644 index 828f608dee92..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_UpdateSecurityMarks_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the update_security_marks call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_security_marks. -# -def update_security_marks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new - - # Call the update_security_marks method. - result = client.update_security_marks request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::SecurityMarks. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb deleted file mode 100644 index 7dad0281409d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycenter_v2_generated_SecurityCenter_UpdateSource_sync] -require "google/cloud/security_center/v2" - -## -# Snippet for the update_source call in the SecurityCenter service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_source. -# -def update_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new - - # Call the update_source method. - result = client.update_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json b/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json deleted file mode 100644 index 8b78714ab7d9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json +++ /dev/null @@ -1,1615 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-security_center-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.securitycenter.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync", - "title": "Snippet for the batch_create_resource_value_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#batch_create_resource_value_configs.", - "file": "security_center/batch_create_resource_value_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_resource_value_configs", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#batch_create_resource_value_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "BatchCreateResourceValueConfigs", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.BatchCreateResourceValueConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_BulkMuteFindings_sync", - "title": "Snippet for the bulk_mute_findings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#bulk_mute_findings.", - "file": "security_center/bulk_mute_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_mute_findings", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#bulk_mute_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "BulkMuteFindings", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.BulkMuteFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_CreateBigQueryExport_sync", - "title": "Snippet for the create_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_big_query_export.", - "file": "security_center/create_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateBigQueryExport", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_CreateFinding_sync", - "title": "Snippet for the create_finding call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_finding.", - "file": "security_center/create_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_finding", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::CreateFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateFinding", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateFinding", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_CreateMuteConfig_sync", - "title": "Snippet for the create_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_mute_config.", - "file": "security_center/create_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateMuteConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_CreateNotificationConfig_sync", - "title": "Snippet for the create_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_notification_config.", - "file": "security_center/create_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateNotificationConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_CreateSource_sync", - "title": "Snippet for the create_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_source.", - "file": "security_center/create_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_source", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::CreateSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateSource", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_DeleteBigQueryExport_sync", - "title": "Snippet for the delete_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_big_query_export.", - "file": "security_center/delete_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteBigQueryExport", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_DeleteMuteConfig_sync", - "title": "Snippet for the delete_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_mute_config.", - "file": "security_center/delete_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteMuteConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_DeleteNotificationConfig_sync", - "title": "Snippet for the delete_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_notification_config.", - "file": "security_center/delete_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteNotificationConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_DeleteResourceValueConfig_sync", - "title": "Snippet for the delete_resource_value_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_resource_value_config.", - "file": "security_center/delete_resource_value_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_resource_value_config", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#delete_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteResourceValueConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_GetBigQueryExport_sync", - "title": "Snippet for the get_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_big_query_export.", - "file": "security_center/get_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetBigQueryExport", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_GetSimulation_sync", - "title": "Snippet for the get_simulation call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_simulation.", - "file": "security_center/get_simulation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_simulation", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_simulation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetSimulationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Simulation", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetSimulation", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetSimulation", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_GetValuedResource_sync", - "title": "Snippet for the get_valued_resource call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_valued_resource.", - "file": "security_center/get_valued_resource.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_valued_resource", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_valued_resource", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ValuedResource", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetValuedResource", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetValuedResource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_iam_policy.", - "file": "security_center/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetIamPolicy", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_GetMuteConfig_sync", - "title": "Snippet for the get_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_mute_config.", - "file": "security_center/get_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetMuteConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_GetNotificationConfig_sync", - "title": "Snippet for the get_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_notification_config.", - "file": "security_center/get_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetNotificationConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_GetResourceValueConfig_sync", - "title": "Snippet for the get_resource_value_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_resource_value_config.", - "file": "security_center/get_resource_value_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_resource_value_config", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ResourceValueConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetResourceValueConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_GetSource_sync", - "title": "Snippet for the get_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_source.", - "file": "security_center/get_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_source", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetSource", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_GroupFindings_sync", - "title": "Snippet for the group_findings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#group_findings.", - "file": "security_center/group_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "group_findings", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#group_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GroupFindings", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GroupFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_ListAttackPaths_sync", - "title": "Snippet for the list_attack_paths call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_attack_paths.", - "file": "security_center/list_attack_paths.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_attack_paths", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_attack_paths", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListAttackPaths", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListAttackPaths", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_ListBigQueryExports_sync", - "title": "Snippet for the list_big_query_exports call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_big_query_exports.", - "file": "security_center/list_big_query_exports.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_big_query_exports", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_big_query_exports", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListBigQueryExports", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListBigQueryExports", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_ListFindings_sync", - "title": "Snippet for the list_findings call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_findings.", - "file": "security_center/list_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_findings", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListFindingsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListFindings", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_ListMuteConfigs_sync", - "title": "Snippet for the list_mute_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_mute_configs.", - "file": "security_center/list_mute_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_mute_configs", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_mute_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListMuteConfigs", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListMuteConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_ListNotificationConfigs_sync", - "title": "Snippet for the list_notification_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_notification_configs.", - "file": "security_center/list_notification_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_notification_configs", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_notification_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListNotificationConfigs", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListNotificationConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_ListResourceValueConfigs_sync", - "title": "Snippet for the list_resource_value_configs call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_resource_value_configs.", - "file": "security_center/list_resource_value_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_resource_value_configs", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_resource_value_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListResourceValueConfigs", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListResourceValueConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_ListSources_sync", - "title": "Snippet for the list_sources call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_sources.", - "file": "security_center/list_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sources", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListSourcesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListSources", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListSources", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_ListValuedResources_sync", - "title": "Snippet for the list_valued_resources call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_valued_resources.", - "file": "security_center/list_valued_resources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_valued_resources", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_valued_resources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListValuedResources", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListValuedResources", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_SetFindingState_sync", - "title": "Snippet for the set_finding_state call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_finding_state.", - "file": "security_center/set_finding_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_finding_state", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_finding_state", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "SetFindingState", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetFindingState", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_iam_policy.", - "file": "security_center/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetIamPolicy", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_SetMute_sync", - "title": "Snippet for the set_mute call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_mute.", - "file": "security_center/set_mute.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_mute", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_mute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::SetMuteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "SetMute", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetMute", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#test_iam_permissions.", - "file": "security_center/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.TestIamPermissions", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateBigQueryExport_sync", - "title": "Snippet for the update_big_query_export call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_big_query_export.", - "file": "security_center/update_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_big_query_export", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateBigQueryExport", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateExternalSystem_sync", - "title": "Snippet for the update_external_system call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_external_system.", - "file": "security_center/update_external_system.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_external_system", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_external_system", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ExternalSystem", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateExternalSystem", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateExternalSystem", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateFinding_sync", - "title": "Snippet for the update_finding call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_finding.", - "file": "security_center/update_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_finding", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateFinding", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateFinding", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateMuteConfig_sync", - "title": "Snippet for the update_mute_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_mute_config.", - "file": "security_center/update_mute_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_mute_config", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateMuteConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateNotificationConfig_sync", - "title": "Snippet for the update_notification_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_notification_config.", - "file": "security_center/update_notification_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_notification_config", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateNotificationConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateResourceValueConfig_sync", - "title": "Snippet for the update_resource_value_config call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_resource_value_config.", - "file": "security_center/update_resource_value_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_resource_value_config", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ResourceValueConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateResourceValueConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateSecurityMarks_sync", - "title": "Snippet for the update_security_marks call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_security_marks.", - "file": "security_center/update_security_marks.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_security_marks", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_security_marks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::SecurityMarks", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSecurityMarks", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateSecurityMarks", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_generated_SecurityCenter_UpdateSource_sync", - "title": "Snippet for the update_source call in the SecurityCenter service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_source.", - "file": "security_center/update_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_source", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSource", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb deleted file mode 100644 index f30feef48b99..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/securitycenter/v2/securitycenter_service_pb" -require "google/cloud/securitycenter/v2/securitycenter_service_services_pb" -require "google/cloud/security_center/v2/security_center" - -class ::Google::Cloud::SecurityCenter::V2::SecurityCenter::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb deleted file mode 100644 index 88ac82de925a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb +++ /dev/null @@ -1,403 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/security_center/v2/security_center" - -class ::Google::Cloud::SecurityCenter::V2::SecurityCenter::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_big_query_export_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.big_query_export_path organization: "value0", location: "value1", export: "value2" - assert_equal "organizations/value0/locations/value1/bigQueryExports/value2", path - - path = client.big_query_export_path folder: "value0", location: "value1", export: "value2" - assert_equal "folders/value0/locations/value1/bigQueryExports/value2", path - - path = client.big_query_export_path project: "value0", location: "value1", export: "value2" - assert_equal "projects/value0/locations/value1/bigQueryExports/value2", path - end - end - - def test_dlp_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dlp_job_path project: "value0", dlp_job: "value1" - assert_equal "projects/value0/dlpJobs/value1", path - - path = client.dlp_job_path project: "value0", location: "value1", dlp_job: "value2" - assert_equal "projects/value0/locations/value1/dlpJobs/value2", path - end - end - - def test_external_system_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.external_system_path organization: "value0", source: "value1", finding: "value2", externalsystem: "value3" - assert_equal "organizations/value0/sources/value1/findings/value2/externalSystems/value3", path - - path = client.external_system_path organization: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" - assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", path - - path = client.external_system_path folder: "value0", source: "value1", finding: "value2", externalsystem: "value3" - assert_equal "folders/value0/sources/value1/findings/value2/externalSystems/value3", path - - path = client.external_system_path folder: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" - assert_equal "folders/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", path - - path = client.external_system_path project: "value0", source: "value1", finding: "value2", externalsystem: "value3" - assert_equal "projects/value0/sources/value1/findings/value2/externalSystems/value3", path - - path = client.external_system_path project: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" - assert_equal "projects/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", path - end - end - - def test_finding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.finding_path organization: "value0", source: "value1", finding: "value2" - assert_equal "organizations/value0/sources/value1/findings/value2", path - - path = client.finding_path organization: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3", path - - path = client.finding_path folder: "value0", source: "value1", finding: "value2" - assert_equal "folders/value0/sources/value1/findings/value2", path - - path = client.finding_path folder: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "folders/value0/sources/value1/locations/value2/findings/value3", path - - path = client.finding_path project: "value0", source: "value1", finding: "value2" - assert_equal "projects/value0/sources/value1/findings/value2", path - - path = client.finding_path project: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "projects/value0/sources/value1/locations/value2/findings/value3", path - end - end - - def test_folder_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_path folder: "value0" - assert_equal "folders/value0", path - end - end - - def test_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_mute_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.mute_config_path organization: "value0", mute_config: "value1" - assert_equal "organizations/value0/muteConfigs/value1", path - - path = client.mute_config_path organization: "value0", location: "value1", mute_config: "value2" - assert_equal "organizations/value0/locations/value1/muteConfigs/value2", path - - path = client.mute_config_path folder: "value0", mute_config: "value1" - assert_equal "folders/value0/muteConfigs/value1", path - - path = client.mute_config_path folder: "value0", location: "value1", mute_config: "value2" - assert_equal "folders/value0/locations/value1/muteConfigs/value2", path - - path = client.mute_config_path project: "value0", mute_config: "value1" - assert_equal "projects/value0/muteConfigs/value1", path - - path = client.mute_config_path project: "value0", location: "value1", mute_config: "value2" - assert_equal "projects/value0/locations/value1/muteConfigs/value2", path - end - end - - def test_notification_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.notification_config_path organization: "value0", location: "value1", notification_config: "value2" - assert_equal "organizations/value0/locations/value1/notificationConfigs/value2", path - - path = client.notification_config_path folder: "value0", location: "value1", notification_config: "value2" - assert_equal "folders/value0/locations/value1/notificationConfigs/value2", path - - path = client.notification_config_path project: "value0", location: "value1", notification_config: "value2" - assert_equal "projects/value0/locations/value1/notificationConfigs/value2", path - end - end - - def test_organization_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_path organization: "value0" - assert_equal "organizations/value0", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_organization_valued_resource_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_valued_resource_path organization: "value0", location: "value1", simulation: "value2", valued_resource: "value3" - assert_equal "organizations/value0/locations/value1/simulations/value2/valuedResources/value3", path - end - end - - def test_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_path organization: "value0", constraint_name: "value1" - assert_equal "organizations/value0/policies/value1", path - - path = client.policy_path folder: "value0", constraint_name: "value1" - assert_equal "folders/value0/policies/value1", path - - path = client.policy_path project: "value0", constraint_name: "value1" - assert_equal "projects/value0/policies/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_resource_value_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.resource_value_config_path organization: "value0", resource_value_config: "value1" - assert_equal "organizations/value0/resourceValueConfigs/value1", path - - path = client.resource_value_config_path organization: "value0", location: "value1", resource_value_config: "value2" - assert_equal "organizations/value0/locations/value1/resourceValueConfigs/value2", path - end - end - - def test_security_marks_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.security_marks_path organization: "value0", asset: "value1" - assert_equal "organizations/value0/assets/value1/securityMarks", path - - path = client.security_marks_path organization: "value0", source: "value1", finding: "value2" - assert_equal "organizations/value0/sources/value1/findings/value2/securityMarks", path - - path = client.security_marks_path organization: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3/securityMarks", path - - path = client.security_marks_path folder: "value0", asset: "value1" - assert_equal "folders/value0/assets/value1/securityMarks", path - - path = client.security_marks_path folder: "value0", source: "value1", finding: "value2" - assert_equal "folders/value0/sources/value1/findings/value2/securityMarks", path - - path = client.security_marks_path folder: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "folders/value0/sources/value1/locations/value2/findings/value3/securityMarks", path - - path = client.security_marks_path project: "value0", asset: "value1" - assert_equal "projects/value0/assets/value1/securityMarks", path - - path = client.security_marks_path project: "value0", source: "value1", finding: "value2" - assert_equal "projects/value0/sources/value1/findings/value2/securityMarks", path - - path = client.security_marks_path project: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "projects/value0/sources/value1/locations/value2/findings/value3/securityMarks", path - end - end - - def test_simulation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.simulation_path organization: "value0", simulation: "value1" - assert_equal "organizations/value0/simulations/value1", path - - path = client.simulation_path organization: "value0", location: "value1", simluation: "value2" - assert_equal "organizations/value0/locations/value1/simulations/value2", path - end - end - - def test_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.source_path organization: "value0", source: "value1" - assert_equal "organizations/value0/sources/value1", path - - path = client.source_path folder: "value0", source: "value1" - assert_equal "folders/value0/sources/value1", path - - path = client.source_path project: "value0", source: "value1" - assert_equal "projects/value0/sources/value1", path - end - end - - def test_table_data_profile_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_data_profile_path project: "value0", table_profile: "value1" - assert_equal "projects/value0/tableProfiles/value1", path - - path = client.table_data_profile_path project: "value0", location: "value1", table_profile: "value2" - assert_equal "projects/value0/locations/value1/tableProfiles/value2", path - end - end - - def test_topic_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.topic_path project: "value0", topic: "value1" - assert_equal "projects/value0/topics/value1", path - end - end - - def test_valued_resource_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.valued_resource_path organization: "value0", simulation: "value1", valued_resource: "value2" - assert_equal "organizations/value0/simulations/value1/valuedResources/value2", path - - path = client.valued_resource_path organization: "value0", location: "value1", simluation: "value2", valued_resource: "value3" - assert_equal "organizations/value0/locations/value1/simulations/value2/valuedResources/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb deleted file mode 100644 index f48ffed9375a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb +++ /dev/null @@ -1,2311 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/securitycenter/v2/securitycenter_service_pb" -require "google/cloud/security_center/v2/security_center/rest" - - -class ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_batch_create_resource_value_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_create_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_batch_create_resource_value_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_create_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_create_resource_value_configs parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_create_resource_value_configs({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_create_resource_value_configs_client_stub.call_count - end - end - end - - def test_bulk_mute_findings - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - mute_state = :MUTE_STATE_UNSPECIFIED - - bulk_mute_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_bulk_mute_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_mute_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.bulk_mute_findings({ parent: parent, filter: filter, mute_state: mute_state }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.bulk_mute_findings parent: parent, filter: filter, mute_state: mute_state do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_state: mute_state) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.bulk_mute_findings({ parent: parent, filter: filter, mute_state: mute_state }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_state: mute_state), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_mute_findings_client_stub.call_count - end - end - end - - def test_create_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - big_query_export = {} - big_query_export_id = "hello world" - - create_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_create_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_big_query_export ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_big_query_export(::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_big_query_export_client_stub.call_count - end - end - end - - def test_create_finding - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - finding_id = "hello world" - finding = {} - - create_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_create_finding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_finding parent: parent, finding_id: finding_id, finding: finding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_finding ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_finding(::Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_finding_client_stub.call_count - end - end - end - - def test_create_mute_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - mute_config = {} - mute_config_id = "hello world" - - create_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_create_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_mute_config ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_mute_config(::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_mute_config_client_stub.call_count - end - end - end - - def test_create_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - config_id = "hello world" - notification_config = {} - - create_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_create_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_notification_config ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_notification_config(::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_notification_config_client_stub.call_count - end - end - end - - def test_create_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source = {} - - create_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_create_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_source({ parent: parent, source: source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_source parent: parent, source: source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_source ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new(parent: parent, source: source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_source({ parent: parent, source: source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_source(::Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new(parent: parent, source: source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_source_client_stub.call_count - end - end - end - - def test_delete_big_query_export - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_big_query_export({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_big_query_export name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_big_query_export ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_big_query_export({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_big_query_export(::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_big_query_export_client_stub.call_count - end - end - end - - def test_delete_mute_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_mute_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_mute_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_mute_config ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_mute_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_mute_config(::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_mute_config_client_stub.call_count - end - end - end - - def test_delete_notification_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_notification_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_notification_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_notification_config ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_notification_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_notification_config(::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_notification_config_client_stub.call_count - end - end - end - - def test_delete_resource_value_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_delete_resource_value_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_resource_value_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_resource_value_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_resource_value_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_resource_value_config_client_stub.call_count - end - end - end - - def test_get_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_big_query_export({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_big_query_export name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_big_query_export ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_big_query_export({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_big_query_export(::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_big_query_export_client_stub.call_count - end - end - end - - def test_get_simulation - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::Simulation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_simulation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_simulation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_simulation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_simulation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_simulation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_simulation ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_simulation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_simulation(::Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_simulation_client_stub.call_count - end - end - end - - def test_get_valued_resource - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ValuedResource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_valued_resource_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_valued_resource_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_valued_resource_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_valued_resource({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_valued_resource name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_valued_resource ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_valued_resource({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_valued_resource(::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_valued_resource_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_get_mute_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_mute_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_mute_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_mute_config ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_mute_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_mute_config(::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_mute_config_client_stub.call_count - end - end - end - - def test_get_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_notification_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_notification_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_notification_config ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_notification_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_notification_config(::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_notification_config_client_stub.call_count - end - end - end - - def test_get_resource_value_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_resource_value_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_resource_value_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_resource_value_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_resource_value_config ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_resource_value_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_resource_value_config(::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_resource_value_config_client_stub.call_count - end - end - end - - def test_get_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_get_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_source ::Google::Cloud::SecurityCenter::V2::GetSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_source(::Google::Cloud::SecurityCenter::V2::GetSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_source_client_stub.call_count - end - end - end - - def test_group_findings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - page_token = "hello world" - page_size = 42 - - group_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_group_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, group_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.group_findings({ parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.group_findings parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.group_findings ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.group_findings({ parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.group_findings(::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, group_findings_client_stub.call_count - end - end - end - - def test_list_attack_paths - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - - list_attack_paths_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_attack_paths_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_attack_paths_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_attack_paths ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_attack_paths(::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_attack_paths_client_stub.call_count - end - end - end - - def test_list_big_query_exports - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_big_query_exports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_big_query_exports_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_big_query_exports_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_big_query_exports ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_big_query_exports(::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_big_query_exports_client_stub.call_count - end - end - end - - def test_list_findings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_findings({ parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_findings parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_findings ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_findings({ parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_findings(::Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_count - end - end - end - - def test_list_mute_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_mute_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_mute_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_mute_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_mute_configs ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_mute_configs(::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_mute_configs_client_stub.call_count - end - end - end - - def test_list_notification_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_notification_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_notification_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_notification_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_notification_configs ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_notification_configs(::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_notification_configs_client_stub.call_count - end - end - end - - def test_list_resource_value_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_resource_value_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_resource_value_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_resource_value_configs_client_stub.call_count - end - end - end - - def test_list_sources - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ListSourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_sources parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_sources ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_sources(::Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_sources_client_stub.call_count - end - end - end - - def test_list_valued_resources - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - - list_valued_resources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_list_valued_resources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_valued_resources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_valued_resources ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_valued_resources(::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_valued_resources_client_stub.call_count - end - end - end - - def test_set_finding_state - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - state = :STATE_UNSPECIFIED - - set_finding_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_set_finding_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_finding_state_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_finding_state({ name: name, state: state }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_finding_state name: name, state: state do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_finding_state ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_finding_state({ name: name, state: state }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_finding_state(::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_finding_state_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_set_mute - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - mute = :MUTE_UNSPECIFIED - - set_mute_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_set_mute_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_mute_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_mute({ name: name, mute: mute }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_mute name: name, mute: mute do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_mute ::Google::Cloud::SecurityCenter::V2::SetMuteRequest.new(name: name, mute: mute) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_mute({ name: name, mute: mute }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_mute(::Google::Cloud::SecurityCenter::V2::SetMuteRequest.new(name: name, mute: mute), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_mute_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_update_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - big_query_export = {} - update_mask = {} - - update_big_query_export_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_big_query_export_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_big_query_export ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_big_query_export(::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_big_query_export_client_stub.call_count - end - end - end - - def test_update_external_system - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ExternalSystem.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - external_system = {} - update_mask = {} - - update_external_system_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_external_system_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_external_system_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_external_system external_system: external_system, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_external_system ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_external_system({ external_system: external_system, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_external_system(::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_external_system_client_stub.call_count - end - end - end - - def test_update_finding - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - finding = {} - update_mask = {} - - update_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_finding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_finding({ finding: finding, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_finding finding: finding, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_finding ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_finding({ finding: finding, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_finding(::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_finding_client_stub.call_count - end - end - end - - def test_update_mute_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - mute_config = {} - update_mask = {} - - update_mute_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_mute_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_mute_config mute_config: mute_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_mute_config ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_mute_config(::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_mute_config_client_stub.call_count - end - end - end - - def test_update_notification_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - notification_config = {} - update_mask = {} - - update_notification_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_notification_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_notification_config notification_config: notification_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_notification_config ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_notification_config(::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_notification_config_client_stub.call_count - end - end - end - - def test_update_resource_value_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource_value_config = {} - update_mask = {} - - update_resource_value_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_resource_value_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_resource_value_config ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_resource_value_config(::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_resource_value_config_client_stub.call_count - end - end - end - - def test_update_security_marks - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::SecurityMarks.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - security_marks = {} - update_mask = {} - - update_security_marks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_security_marks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_security_marks_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_security_marks security_marks: security_marks, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_security_marks ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_security_marks(::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_security_marks_client_stub.call_count - end - end - end - - def test_update_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::Source.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - source = {} - update_mask = {} - - update_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.stub :transcode_update_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_source({ source: source, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_source source: source, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_source ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_source({ source: source, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_source(::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new(source: source, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_source_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb deleted file mode 100644 index b3295b2bd5b5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb +++ /dev/null @@ -1,2592 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/securitycenter/v2/securitycenter_service_pb" -require "google/cloud/security_center/v2/security_center" - -class ::Google::Cloud::SecurityCenter::V2::SecurityCenter::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_batch_create_resource_value_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - batch_create_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_resource_value_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateResourceValueConfigRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_create_resource_value_configs({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_create_resource_value_configs parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_create_resource_value_configs ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_create_resource_value_configs({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_create_resource_value_configs(::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_resource_value_configs_client_stub.call_rpc_count - end - end - - def test_bulk_mute_findings - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - mute_state = :MUTE_STATE_UNSPECIFIED - - bulk_mute_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_mute_findings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal :MUTE_STATE_UNSPECIFIED, request["mute_state"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_mute_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.bulk_mute_findings({ parent: parent, filter: filter, mute_state: mute_state }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.bulk_mute_findings parent: parent, filter: filter, mute_state: mute_state do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_state: mute_state) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.bulk_mute_findings({ parent: parent, filter: filter, mute_state: mute_state }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.bulk_mute_findings(::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, mute_state: mute_state), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_mute_findings_client_stub.call_rpc_count - end - end - - def test_create_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - big_query_export = {} - big_query_export_id = "hello world" - - create_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::BigQueryExport), request["big_query_export"] - assert_equal "hello world", request["big_query_export_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_big_query_export parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_big_query_export ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_big_query_export({ parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_big_query_export(::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new(parent: parent, big_query_export: big_query_export, big_query_export_id: big_query_export_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_big_query_export_client_stub.call_rpc_count - end - end - - def test_create_finding - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - finding_id = "hello world" - finding = {} - - create_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_finding, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["finding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Finding), request["finding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_finding parent: parent, finding_id: finding_id, finding: finding do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_finding ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_finding({ parent: parent, finding_id: finding_id, finding: finding }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_finding(::Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new(parent: parent, finding_id: finding_id, finding: finding), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_finding_client_stub.call_rpc_count - end - end - - def test_create_mute_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - mute_config = {} - mute_config_id = "hello world" - - create_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::MuteConfig), request["mute_config"] - assert_equal "hello world", request["mute_config_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_mute_config parent: parent, mute_config: mute_config, mute_config_id: mute_config_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_mute_config ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_mute_config({ parent: parent, mute_config: mute_config, mute_config_id: mute_config_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_mute_config(::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new(parent: parent, mute_config: mute_config, mute_config_id: mute_config_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_mute_config_client_stub.call_rpc_count - end - end - - def test_create_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - config_id = "hello world" - notification_config = {} - - create_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::NotificationConfig), request["notification_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_notification_config parent: parent, config_id: config_id, notification_config: notification_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_notification_config ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_notification_config({ parent: parent, config_id: config_id, notification_config: notification_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_notification_config(::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new(parent: parent, config_id: config_id, notification_config: notification_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_notification_config_client_stub.call_rpc_count - end - end - - def test_create_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source = {} - - create_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Source), request["source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_source({ parent: parent, source: source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_source parent: parent, source: source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_source ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new(parent: parent, source: source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_source({ parent: parent, source: source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_source(::Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new(parent: parent, source: source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_source_client_stub.call_rpc_count - end - end - - def test_delete_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_big_query_export({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_big_query_export name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_big_query_export ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_big_query_export({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_big_query_export(::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_big_query_export_client_stub.call_rpc_count - end - end - - def test_delete_mute_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_mute_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_mute_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_mute_config ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_mute_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_mute_config(::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_mute_config_client_stub.call_rpc_count - end - end - - def test_delete_notification_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_notification_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_notification_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_notification_config ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_notification_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_notification_config(::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_notification_config_client_stub.call_rpc_count - end - end - - def test_delete_resource_value_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_resource_value_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_resource_value_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_resource_value_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_resource_value_config ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_resource_value_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_resource_value_config(::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_resource_value_config_client_stub.call_rpc_count - end - end - - def test_get_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_big_query_export({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_big_query_export name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_big_query_export ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_big_query_export({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_big_query_export(::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_big_query_export_client_stub.call_rpc_count - end - end - - def test_get_simulation - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::Simulation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_simulation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_simulation, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_simulation_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_simulation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_simulation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_simulation ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_simulation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_simulation(::Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_simulation_client_stub.call_rpc_count - end - end - - def test_get_valued_resource - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ValuedResource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_valued_resource_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_valued_resource, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_valued_resource_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_valued_resource({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_valued_resource name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_valued_resource ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_valued_resource({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_valued_resource(::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_valued_resource_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_get_mute_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_mute_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_mute_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_mute_config ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_mute_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_mute_config(::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_mute_config_client_stub.call_rpc_count - end - end - - def test_get_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_notification_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_notification_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_notification_config ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_notification_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_notification_config(::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_notification_config_client_stub.call_rpc_count - end - end - - def test_get_resource_value_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_resource_value_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_resource_value_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_resource_value_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_resource_value_config ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_resource_value_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_resource_value_config(::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_resource_value_config_client_stub.call_rpc_count - end - end - - def test_get_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::GetSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_source ::Google::Cloud::SecurityCenter::V2::GetSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_source({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_source(::Google::Cloud::SecurityCenter::V2::GetSourceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_source_client_stub.call_rpc_count - end - end - - def test_group_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - group_by = "hello world" - page_token = "hello world" - page_size = 42 - - group_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :group_findings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["group_by"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, group_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.group_findings({ parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.group_findings parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.group_findings ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.group_findings({ parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.group_findings(::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, group_findings_client_stub.call_rpc_count - end - end - - def test_list_attack_paths - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - - list_attack_paths_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_attack_paths, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_attack_paths_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_attack_paths parent: parent, filter: filter, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_attack_paths ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_attack_paths({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_attack_paths(::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_attack_paths_client_stub.call_rpc_count - end - end - - def test_list_big_query_exports - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_big_query_exports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_big_query_exports, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_big_query_exports_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_big_query_exports parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_big_query_exports ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_big_query_exports({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_big_query_exports(::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_big_query_exports_client_stub.call_rpc_count - end - end - - def test_list_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - order_by = "hello world" - field_mask = {} - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_findings, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_findings_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_findings({ parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_findings parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_findings ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_findings({ parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_findings(::Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, field_mask: field_mask, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_rpc_count - end - end - - def test_list_mute_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_mute_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_mute_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_mute_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_mute_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_mute_configs ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_mute_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_mute_configs(::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_mute_configs_client_stub.call_rpc_count - end - end - - def test_list_notification_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_notification_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_notification_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_notification_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_notification_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_notification_configs ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_notification_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_notification_configs(::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_notification_configs_client_stub.call_rpc_count - end - end - - def test_list_resource_value_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_resource_value_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_resource_value_configs, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_resource_value_configs_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_resource_value_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_resource_value_configs ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_resource_value_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_resource_value_configs(::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_resource_value_configs_client_stub.call_rpc_count - end - end - - def test_list_sources - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ListSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sources, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_sources parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_sources ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_sources({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_sources(::Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new(parent: parent, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_sources_client_stub.call_rpc_count - end - end - - def test_list_valued_resources - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - order_by = "hello world" - - list_valued_resources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_valued_resources, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_valued_resources_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_valued_resources parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_valued_resources ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_valued_resources({ parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_valued_resources(::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_valued_resources_client_stub.call_rpc_count - end - end - - def test_set_finding_state - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - state = :STATE_UNSPECIFIED - - set_finding_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_finding_state, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest, request - assert_equal "hello world", request["name"] - assert_equal :STATE_UNSPECIFIED, request["state"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_finding_state_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_finding_state({ name: name, state: state }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_finding_state name: name, state: state do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_finding_state ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_finding_state({ name: name, state: state }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_finding_state(::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_finding_state_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_mute - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - mute = :MUTE_UNSPECIFIED - - set_mute_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_mute, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::SetMuteRequest, request - assert_equal "hello world", request["name"] - assert_equal :MUTE_UNSPECIFIED, request["mute"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_mute_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_mute({ name: name, mute: mute }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_mute name: name, mute: mute do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_mute ::Google::Cloud::SecurityCenter::V2::SetMuteRequest.new(name: name, mute: mute) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_mute({ name: name, mute: mute }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_mute(::Google::Cloud::SecurityCenter::V2::SetMuteRequest.new(name: name, mute: mute), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_mute_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_update_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::BigQueryExport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - big_query_export = {} - update_mask = {} - - update_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_big_query_export, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::BigQueryExport), request["big_query_export"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_big_query_export_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_big_query_export ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_big_query_export(::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_big_query_export_client_stub.call_rpc_count - end - end - - def test_update_external_system - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ExternalSystem.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - external_system = {} - update_mask = {} - - update_external_system_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_external_system, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::ExternalSystem), request["external_system"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_external_system_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_external_system({ external_system: external_system, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_external_system external_system: external_system, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_external_system ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_external_system({ external_system: external_system, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_external_system(::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new(external_system: external_system, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_external_system_client_stub.call_rpc_count - end - end - - def test_update_finding - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - finding = {} - update_mask = {} - - update_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_finding, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Finding), request["finding"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_finding({ finding: finding, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_finding finding: finding, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_finding ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new(finding: finding, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_finding({ finding: finding, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_finding(::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new(finding: finding, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_finding_client_stub.call_rpc_count - end - end - - def test_update_mute_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::MuteConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - mute_config = {} - update_mask = {} - - update_mute_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_mute_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::MuteConfig), request["mute_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_mute_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_mute_config mute_config: mute_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_mute_config ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_mute_config({ mute_config: mute_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_mute_config(::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new(mute_config: mute_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_mute_config_client_stub.call_rpc_count - end - end - - def test_update_notification_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::NotificationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - notification_config = {} - update_mask = {} - - update_notification_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_notification_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::NotificationConfig), request["notification_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_notification_config notification_config: notification_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_notification_config ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_notification_config({ notification_config: notification_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_notification_config(::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new(notification_config: notification_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_notification_config_client_stub.call_rpc_count - end - end - - def test_update_resource_value_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource_value_config = {} - update_mask = {} - - update_resource_value_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_resource_value_config, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig), request["resource_value_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_resource_value_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_resource_value_config resource_value_config: resource_value_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_resource_value_config ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_resource_value_config({ resource_value_config: resource_value_config, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_resource_value_config(::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new(resource_value_config: resource_value_config, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_resource_value_config_client_stub.call_rpc_count - end - end - - def test_update_security_marks - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::SecurityMarks.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - security_marks = {} - update_mask = {} - - update_security_marks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_security_marks, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::SecurityMarks), request["security_marks"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_security_marks_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_security_marks security_marks: security_marks, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_security_marks ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_security_marks({ security_marks: security_marks, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_security_marks(::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_security_marks_client_stub.call_rpc_count - end - end - - def test_update_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::Source.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - source = {} - update_mask = {} - - update_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_source, name - assert_kind_of ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Source), request["source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_source({ source: source, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_source source: source, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_source ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new(source: source, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_source({ source: source, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_source(::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new(source: source, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_source_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/helper.rb b/owl-bot-staging/google-cloud-security_center-v2/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v1/.gitignore b/owl-bot-staging/google-cloud-security_center_management-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/.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-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center_management-v1/.repo-metadata.json deleted file mode 100644 index 1d992fcf1320..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/.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-v1/latest", - "distribution_name": "google-cloud-security_center_management-v1", - "is_cloud": true, - "language": "ruby", - "name": "securitycentermanagement", - "name_pretty": "Security Command Center Management V1 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. Note that google-cloud-security_center_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center_management instead. See the readme for more details.", - "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-v1/.rubocop.yml b/owl-bot-staging/google-cloud-security_center_management-v1/.rubocop.yml deleted file mode 100644 index a9f2a1f499a0..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security_center_management-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-security_center_management-v1.rb" diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/.toys.rb b/owl-bot-staging/google-cloud-security_center_management-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/.yardopts b/owl-bot-staging/google-cloud-security_center_management-v1/.yardopts deleted file mode 100644 index e42b7f692e9a..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Security Command Center Management V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center_management-v1/AUTHENTICATION.md deleted file mode 100644 index 2e810e8e608e..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security_center_management-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-security_center_management-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/security_center_management/v1" - -client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new 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/v1" - -::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-security_center_management-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/security_center_management/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center_management-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/Gemfile b/owl-bot-staging/google-cloud-security_center_management-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-v1/LICENSE.md b/owl-bot-staging/google-cloud-security_center_management-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/README.md b/owl-bot-staging/google-cloud-security_center_management-v1/README.md deleted file mode 100644 index 6664a13aefd7..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Security Command Center Management V1 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. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Security Command Center Management V1 API. Most users should consider using -the main client gem, -[google-cloud-security_center_management](https://rubygems.org/gems/google-cloud-security_center_management). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-security_center_management-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/securitycentermanagement.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/security_center_management/v1" - -client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new -request = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new # (request fields as keyword arguments...) -response = client.list_effective_security_health_analytics_custom_modules request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center_management-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/reference/security-center-management/rest) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/security_center_management/v1" -require "logger" - -client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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-v1/Rakefile b/owl-bot-staging/google-cloud-security_center_management-v1/Rakefile deleted file mode 100644 index 48a25ec27530..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-security_center_management-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/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-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security_center_management-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-security_center_management-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-security_center_management-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security_center_management-v1" - header "google-cloud-security_center_management-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security_center_management-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security_center_management-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-security_center_management-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-security_center_management-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center_management-v1/gapic_metadata.json deleted file mode 100644 index a1ebc19f46fd..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/gapic_metadata.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.securitycentermanagement.v1", - "libraryPackage": "::Google::Cloud::SecurityCenterManagement::V1", - "services": { - "SecurityCenterManagement": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client", - "rpcs": { - "ListEffectiveSecurityHealthAnalyticsCustomModules": { - "methods": [ - "list_effective_security_health_analytics_custom_modules" - ] - }, - "GetEffectiveSecurityHealthAnalyticsCustomModule": { - "methods": [ - "get_effective_security_health_analytics_custom_module" - ] - }, - "ListSecurityHealthAnalyticsCustomModules": { - "methods": [ - "list_security_health_analytics_custom_modules" - ] - }, - "ListDescendantSecurityHealthAnalyticsCustomModules": { - "methods": [ - "list_descendant_security_health_analytics_custom_modules" - ] - }, - "GetSecurityHealthAnalyticsCustomModule": { - "methods": [ - "get_security_health_analytics_custom_module" - ] - }, - "CreateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "create_security_health_analytics_custom_module" - ] - }, - "UpdateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "update_security_health_analytics_custom_module" - ] - }, - "DeleteSecurityHealthAnalyticsCustomModule": { - "methods": [ - "delete_security_health_analytics_custom_module" - ] - }, - "SimulateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "simulate_security_health_analytics_custom_module" - ] - }, - "ListEffectiveEventThreatDetectionCustomModules": { - "methods": [ - "list_effective_event_threat_detection_custom_modules" - ] - }, - "GetEffectiveEventThreatDetectionCustomModule": { - "methods": [ - "get_effective_event_threat_detection_custom_module" - ] - }, - "ListEventThreatDetectionCustomModules": { - "methods": [ - "list_event_threat_detection_custom_modules" - ] - }, - "ListDescendantEventThreatDetectionCustomModules": { - "methods": [ - "list_descendant_event_threat_detection_custom_modules" - ] - }, - "GetEventThreatDetectionCustomModule": { - "methods": [ - "get_event_threat_detection_custom_module" - ] - }, - "CreateEventThreatDetectionCustomModule": { - "methods": [ - "create_event_threat_detection_custom_module" - ] - }, - "UpdateEventThreatDetectionCustomModule": { - "methods": [ - "update_event_threat_detection_custom_module" - ] - }, - "DeleteEventThreatDetectionCustomModule": { - "methods": [ - "delete_event_threat_detection_custom_module" - ] - }, - "ValidateEventThreatDetectionCustomModule": { - "methods": [ - "validate_event_threat_detection_custom_module" - ] - }, - "GetSecurityCenterService": { - "methods": [ - "get_security_center_service" - ] - }, - "ListSecurityCenterServices": { - "methods": [ - "list_security_center_services" - ] - }, - "UpdateSecurityCenterService": { - "methods": [ - "update_security_center_service" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/google-cloud-security_center_management-v1.gemspec b/owl-bot-staging/google-cloud-security_center_management-v1/google-cloud-security_center_management-v1.gemspec deleted file mode 100644 index 6f9c77776f8d..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/google-cloud-security_center_management-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security_center_management/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security_center_management-v1" - gem.version = Google::Cloud::SecurityCenterManagement::V1::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. Note that google-cloud-security_center_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-security_center_management instead. See the readme for more details." - 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") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google-cloud-security_center_management-v1.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google-cloud-security_center_management-v1.rb deleted file mode 100644 index 64c9d0aec5c2..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google-cloud-security_center_management-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/security_center_management/v1" diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1.rb deleted file mode 100644 index a6774f1f6c46..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center_management/v1/security_center_management" -require "google/cloud/security_center_management/v1/version" - -module Google - module Cloud - module SecurityCenterManagement - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/security_center_management/v1" - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/security_center_management/v1" - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/security_center_management/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/bindings_override.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/bindings_override.rb deleted file mode 100644 index a6a097cc314f..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module SecurityCenterManagement - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/security_center_management/v1/rest" - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecurityCenterManagement"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/rest.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/rest.rb deleted file mode 100644 index 26d917a7bf92..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/security_center_management/v1/security_center_management/rest" -require "google/cloud/security_center_management/v1/bindings_override" -require "google/cloud/security_center_management/v1/version" - -module Google - module Cloud - module SecurityCenterManagement - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/security_center_management/v1/rest" - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management.rb deleted file mode 100644 index f906e0bc11fd..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security_center_management/v1/version" - -require "google/cloud/security_center_management/v1/security_center_management/credentials" -require "google/cloud/security_center_management/v1/security_center_management/paths" -require "google/cloud/security_center_management/v1/security_center_management/client" -require "google/cloud/security_center_management/v1/security_center_management/rest" - -module Google - module Cloud - module SecurityCenterManagement - module V1 - ## - # Service describing handlers for resources - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/security_center_management/v1/security_center_management" - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/security_center_management/v1/security_center_management/rest" - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - module SecurityCenterManagement - end - end - end - end -end - -helper_path = ::File.join __dir__, "security_center_management", "helpers.rb" -require "google/cloud/security_center_management/v1/security_center_management/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.rb deleted file mode 100644 index ddcb9e67922d..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/client.rb +++ /dev/null @@ -1,2792 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securitycentermanagement/v1/security_center_management_pb" -require "google/cloud/location" - -module Google - module Cloud - module SecurityCenterManagement - module V1 - module SecurityCenterManagement - ## - # Client for the SecurityCenterManagement service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycentermanagement.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :security_center_management_stub - - ## - # Configure the SecurityCenterManagement Client class. - # - # See {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenterManagement clients - # ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecurityCenterManagement", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.simulate_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.simulate_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_effective_event_threat_detection_custom_modules.timeout = 60.0 - default_config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_effective_event_threat_detection_custom_module.timeout = 60.0 - default_config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_event_threat_detection_custom_modules.timeout = 60.0 - default_config.rpcs.list_event_threat_detection_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout = 60.0 - default_config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_event_threat_detection_custom_module.timeout = 60.0 - default_config.rpcs.get_event_threat_detection_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_event_threat_detection_custom_module.timeout = 60.0 - - default_config.rpcs.update_event_threat_detection_custom_module.timeout = 60.0 - - default_config.rpcs.delete_event_threat_detection_custom_module.timeout = 60.0 - - default_config.rpcs.validate_event_threat_detection_custom_module.timeout = 60.0 - default_config.rpcs.validate_event_threat_detection_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenterManagement Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @security_center_management_stub.universe_domain - end - - ## - # Create a new SecurityCenterManagement client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecurityCenterManagement client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/securitycentermanagement/v1/security_center_management_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @security_center_management_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @security_center_management_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @security_center_management_stub.endpoint - config.universe_domain = @security_center_management_stub.universe_domain - config.logger = @security_center_management_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @security_center_management_stub.logger - end - - # Service calls - - ## - # Returns a list of all - # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule EffectiveSecurityHealthAnalyticsCustomModule} - # resources for the given parent. This includes resident modules defined at - # the scope of the parent, and inherited modules, inherited from ancestor - # organizations, folders, and projects (no descendants). - # - # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list effective custom modules, in one of the - # following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_effective_security_health_analytics_custom_modules method. - # result = client.list_effective_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_effective_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :list_effective_security_health_analytics_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_effective_security_health_analytics_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single - # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule EffectiveSecurityHealthAnalyticsCustomModule}. - # - # @overload get_effective_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_effective_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The full resource name of the custom module, specified in one of - # the following formats: - # - # * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - # * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - # * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_effective_security_health_analytics_custom_module method. - # result = client.get_effective_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p result - # - def get_effective_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :get_effective_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # resources for the given parent. This includes resident modules defined at - # the scope of the parent, and inherited modules, inherited from ancestor - # organizations, folders, and projects (no descendants). - # - # @overload list_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent organization, folder, or project in which to - # list custom modules, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_security_health_analytics_custom_modules method. - # result = client.list_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :list_security_health_analytics_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_security_health_analytics_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all resident - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # resources under the given organization, folder, or project and all of its - # descendants. - # - # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent organization, folder, or project in which to - # list custom modules, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_descendant_security_health_analytics_custom_modules method. - # result = client.list_descendant_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_descendant_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :list_descendant_security_health_analytics_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_descendant_security_health_analytics_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule}. - # - # @overload get_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource, in the format - # `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_security_health_analytics_custom_module method. - # result = client.get_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def get_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :get_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # at the scope of the given organization, folder, or project, and also - # creates inherited `SecurityHealthAnalyticsCustomModule` resources for all - # folders and projects that are descendants of the given parent. These - # modules are enabled by default. - # - # @overload create_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil, validate_only: nil) - # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent organization, folder, or project of the - # module, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. The resource being created. - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be created. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to create the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the create_security_health_analytics_custom_module method. - # result = client.create_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def create_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :create_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # under the given name based on the given update mask. Updating the - # enablement state is supported on both resident and inherited modules - # (though resident modules cannot have an enablement state of "inherited"). - # Updating the display name and custom configuration of a module is supported - # on resident modules only. - # - # @overload update_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_security_health_analytics_custom_module(update_mask: nil, security_health_analytics_custom_module: nil, validate_only: nil) - # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to update. The following values are valid: - # - # * `custom_config` - # * `enablement_state` - # - # If you omit this field or set it to the wildcard value `*`, then all - # eligible fields are updated. - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. The resource being updated. - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be updated. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to update the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the update_security_health_analytics_custom_module method. - # result = client.update_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def update_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.security_health_analytics_custom_module&.name - header_params["security_health_analytics_custom_module.name"] = request.security_health_analytics_custom_module.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :update_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # and all of its descendants in the resource hierarchy. This method is only - # supported for resident custom modules. - # - # @overload delete_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_security_health_analytics_custom_module(name: nil, validate_only: nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the SHA custom module, in one of the - # following formats: - # - # * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be deleted. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to delete the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during deletion of the module - # - # Defaults to `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the delete_security_health_analytics_custom_module method. - # result = client.delete_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :delete_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Simulates the result of using a - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # to check a resource. - # - # @overload simulate_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative resource name of the organization, project, or - # folder. For more information about relative resource names, see [AIP-122: - # Resource names](https://google.aip.dev/122). Example: - # `organizations/{organization_id}`. - # @param custom_config [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig, ::Hash] - # Required. The custom configuration that you need to test. - # @param resource [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] - # Required. Resource data to simulate custom module against. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the simulate_security_health_analytics_custom_module method. - # result = client.simulate_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. - # p result - # - def simulate_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :simulate_security_health_analytics_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all effective Event Threat Detection custom modules for the - # given parent. This includes resident modules defined at the scope of the - # parent along with modules inherited from its ancestors. - # - # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list effective custom modules, in one of the - # following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_effective_event_threat_detection_custom_modules method. - # result = client.list_effective_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. - # p item - # end - # - def list_effective_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :list_effective_event_threat_detection_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_effective_event_threat_detection_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the effective Event Threat Detection custom module at the given level. - # - # The difference between an - # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule EffectiveEventThreatDetectionCustomModule} - # and an - # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule EventThreatDetectionCustomModule} - # is that the fields for an `EffectiveEventThreatDetectionCustomModule` are - # computed from ancestors if needed. For example, the enablement state for an - # `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or - # `INHERITED`. In contrast, the enablement state for an - # `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` - # or `DISABLED`. - # - # @overload get_effective_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_effective_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Event Threat Detection custom module, in - # one of the following formats: - # - # * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_effective_event_threat_detection_custom_module method. - # result = client.get_effective_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. - # p result - # - def get_effective_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :get_effective_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all Event Threat Detection custom modules for the given organization, - # folder, or project. This includes resident modules defined at the scope of - # the parent along with modules inherited from ancestors. - # - # @overload list_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list custom modules, in one of the following - # formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of modules to return. The service may return - # fewer than this value. If unspecified, at most 10 modules will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_event_threat_detection_custom_modules method. - # result = client.list_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :list_event_threat_detection_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_event_threat_detection_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all resident Event Threat Detection custom modules for the given - # organization, folder, or project and its descendants. - # - # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list custom modules, in one of the following - # formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of modules to return. The service may return - # fewer than this value. If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_descendant_event_threat_detection_custom_modules method. - # result = client.list_descendant_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_descendant_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :list_descendant_event_threat_detection_custom_modules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_descendant_event_threat_detection_custom_modules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an Event Threat Detection custom module. - # - # @overload get_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Event Threat Detection custom module, in - # one of the following formats: - # - # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_event_threat_detection_custom_module method. - # result = client.get_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - # p result - # - def get_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :get_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident Event Threat Detection custom module at the scope of the - # given organization, folder, or project, and creates inherited custom - # modules for all descendants of the given parent. These modules are enabled - # by default. - # - # @overload create_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil, validate_only: nil) - # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent for the module, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module to create. The - # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule#name EventThreatDetectionCustomModule.name} - # field is ignored; Security Command Center generates the name. - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be created. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to create the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new - # - # # Call the create_event_threat_detection_custom_module method. - # result = client.create_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - # p result - # - def create_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :create_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Event Threat Detection custom module with the given name based - # on the given update mask. Updating the enablement state is supported for - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name or - # configuration of a module is supported for resident modules only. The type - # of a module cannot be changed. - # - # @overload update_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_event_threat_detection_custom_module(update_mask: nil, event_threat_detection_custom_module: nil, validate_only: nil) - # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to update. If omitted, then all fields are updated. - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module being updated. - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be updated. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to update the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new - # - # # Call the update_event_threat_detection_custom_module method. - # result = client.update_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - # p result - # - def update_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.event_threat_detection_custom_module&.name - header_params["event_threat_detection_custom_module.name"] = request.event_threat_detection_custom_module.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :update_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified Event Threat Detection custom module and all of its - # descendants in the resource hierarchy. This method is only supported for - # resident custom modules. - # - # @overload delete_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_event_threat_detection_custom_module(name: nil, validate_only: nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Event Threat Detection custom module, in - # one of the following formats: - # - # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be deleted. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to delete the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new - # - # # Call the delete_event_threat_detection_custom_module method. - # result = client.delete_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :delete_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Validates the given Event Threat Detection custom module. - # - # @overload validate_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent to validate the custom modules under, - # in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # @param raw_text [::String] - # Required. The raw text of the module's contents. Used to generate error - # messages. - # @param type [::String] - # Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new - # - # # Call the validate_event_threat_detection_custom_module method. - # result = client.validate_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse. - # p result - # - def validate_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, - metadata: metadata, - retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :validate_event_threat_detection_custom_module, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets service settings for the specified Security Command Center service. - # - # @overload get_security_center_service(request, options = nil) - # Pass arguments to `get_security_center_service` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_security_center_service(name: nil, show_eligible_modules_only: nil) - # Pass arguments to `get_security_center_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The Security Command Center service to retrieve, in one of the - # following formats: - # - # * organizations/\\{organization}/locations/\\{location}/securityCenterServices/\\{service} - # * folders/\\{folder}/locations/\\{location}/securityCenterServices/\\{service} - # * projects/\\{project}/locations/\\{location}/securityCenterServices/\\{service} - # - # The following values are valid for `{service}`: - # - # * `container-threat-detection` - # * `event-threat-detection` - # * `security-health-analytics` - # * `vm-threat-detection` - # * `web-security-scanner` - # @param show_eligible_modules_only [::Boolean] - # Set to `true` to show only modules that are in scope. By default, all - # modules are shown. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new - # - # # Call the get_security_center_service method. - # result = client.get_security_center_service request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. - # p result - # - def get_security_center_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_security_center_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_security_center_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_security_center_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :get_security_center_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all Security Command Center services for the given - # parent. - # - # @overload list_security_center_services(request, options = nil) - # Pass arguments to `list_security_center_services` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_security_center_services(parent: nil, page_size: nil, page_token: nil, show_eligible_modules_only: nil) - # Pass arguments to `list_security_center_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent to list Security Command Center services, - # in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # @param show_eligible_modules_only [::Boolean] - # Flag that, when set, is used to filter the module settings that are shown. - # The default setting is that all modules are shown. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new - # - # # Call the list_security_center_services method. - # result = client.list_security_center_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. - # p item - # end - # - def list_security_center_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_security_center_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_security_center_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_security_center_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :list_security_center_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @security_center_management_stub, :list_security_center_services, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Security Command Center service using the given update mask. - # - # @overload update_security_center_service(request, options = nil) - # Pass arguments to `update_security_center_service` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_security_center_service(security_center_service: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_security_center_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_center_service [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService, ::Hash] - # Required. The updated service. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to update. Accepts the following values: - # - # * `intended_enablement_state` - # * `modules` - # - # If omitted, then all eligible fields are updated. - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no service will be updated. An `OK` response indicates that - # the request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to update the service could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during update of the service - # - # Defaults to `false`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new - # - # # Call the update_security_center_service method. - # result = client.update_security_center_service request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. - # p result - # - def update_security_center_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_security_center_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.security_center_service&.name - header_params["security_center_service.name"] = request.security_center_service.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_security_center_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_security_center_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.call_rpc :update_security_center_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecurityCenterManagement API. - # - # This class represents the configuration for SecurityCenterManagement, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_effective_security_health_analytics_custom_modules to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycentermanagement.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the SecurityCenterManagement API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_security_health_analytics_custom_module - ## - # RPC-specific configuration for `list_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `get_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_security_health_analytics_custom_module - ## - # RPC-specific configuration for `create_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_security_health_analytics_custom_module - ## - # RPC-specific configuration for `update_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_health_analytics_custom_module - ## - # RPC-specific configuration for `delete_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_security_health_analytics_custom_module - ## - # RPC-specific configuration for `simulate_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :simulate_security_health_analytics_custom_module - ## - # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_event_threat_detection_custom_module - ## - # RPC-specific configuration for `list_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `get_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_event_threat_detection_custom_module - ## - # RPC-specific configuration for `create_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_event_threat_detection_custom_module - ## - # RPC-specific configuration for `update_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_event_threat_detection_custom_module - ## - # RPC-specific configuration for `delete_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_event_threat_detection_custom_module - ## - # RPC-specific configuration for `validate_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :validate_event_threat_detection_custom_module - ## - # RPC-specific configuration for `get_security_center_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_security_center_service - ## - # RPC-specific configuration for `list_security_center_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_security_center_services - ## - # RPC-specific configuration for `update_security_center_service` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_center_service - - # @private - def initialize parent_rpcs = nil - list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules - @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config - get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module - @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config - list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules - @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config - list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules - @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config - get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module - @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config - create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module - @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config - update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module - @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config - delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module - @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config - simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module - @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config - list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules - @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config - get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module - @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config - list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules - @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config - list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules - @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config - get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module - @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config - create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module - @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config - update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module - @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config - delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module - @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config - validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module - @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config - get_security_center_service_config = parent_rpcs.get_security_center_service if parent_rpcs.respond_to? :get_security_center_service - @get_security_center_service = ::Gapic::Config::Method.new get_security_center_service_config - list_security_center_services_config = parent_rpcs.list_security_center_services if parent_rpcs.respond_to? :list_security_center_services - @list_security_center_services = ::Gapic::Config::Method.new list_security_center_services_config - update_security_center_service_config = parent_rpcs.update_security_center_service if parent_rpcs.respond_to? :update_security_center_service - @update_security_center_service = ::Gapic::Config::Method.new update_security_center_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb deleted file mode 100644 index d03792871b08..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module SecurityCenterManagement - module V1 - module SecurityCenterManagement - # Credentials for the SecurityCenterManagement API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb deleted file mode 100644 index 614cfad55b62..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/paths.rb +++ /dev/null @@ -1,374 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenterManagement - module V1 - module SecurityCenterManagement - # Path helper methods for the SecurityCenterManagement API. - module Paths - ## - # Create a fully-qualified EffectiveEventThreatDetectionCustomModule resource string. - # - # @overload effective_event_threat_detection_custom_module_path(organization:, location:, effective_event_threat_detection_custom_module:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}` - # - # @param organization [String] - # @param location [String] - # @param effective_event_threat_detection_custom_module [String] - # - # @overload effective_event_threat_detection_custom_module_path(project:, location:, effective_event_threat_detection_custom_module:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}` - # - # @param project [String] - # @param location [String] - # @param effective_event_threat_detection_custom_module [String] - # - # @overload effective_event_threat_detection_custom_module_path(folder:, location:, effective_event_threat_detection_custom_module:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}` - # - # @param folder [String] - # @param location [String] - # @param effective_event_threat_detection_custom_module [String] - # - # @return [::String] - def effective_event_threat_detection_custom_module_path **args - resources = { - "effective_event_threat_detection_custom_module:location:organization" => (proc do |organization:, location:, effective_event_threat_detection_custom_module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/effectiveEventThreatDetectionCustomModules/#{effective_event_threat_detection_custom_module}" - end), - "effective_event_threat_detection_custom_module:location:project" => (proc do |project:, location:, effective_event_threat_detection_custom_module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/effectiveEventThreatDetectionCustomModules/#{effective_event_threat_detection_custom_module}" - end), - "effective_event_threat_detection_custom_module:folder:location" => (proc do |folder:, location:, effective_event_threat_detection_custom_module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/effectiveEventThreatDetectionCustomModules/#{effective_event_threat_detection_custom_module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified EffectiveSecurityHealthAnalyticsCustomModule resource string. - # - # @overload effective_security_health_analytics_custom_module_path(organization:, location:, effective_security_health_analytics_custom_module:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - # - # @param organization [String] - # @param location [String] - # @param effective_security_health_analytics_custom_module [String] - # - # @overload effective_security_health_analytics_custom_module_path(project:, location:, effective_security_health_analytics_custom_module:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - # - # @param project [String] - # @param location [String] - # @param effective_security_health_analytics_custom_module [String] - # - # @overload effective_security_health_analytics_custom_module_path(folder:, location:, effective_security_health_analytics_custom_module:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - # - # @param folder [String] - # @param location [String] - # @param effective_security_health_analytics_custom_module [String] - # - # @return [::String] - def effective_security_health_analytics_custom_module_path **args - resources = { - "effective_security_health_analytics_custom_module:location:organization" => (proc do |organization:, location:, effective_security_health_analytics_custom_module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/effectiveSecurityHealthAnalyticsCustomModules/#{effective_security_health_analytics_custom_module}" - end), - "effective_security_health_analytics_custom_module:location:project" => (proc do |project:, location:, effective_security_health_analytics_custom_module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/effectiveSecurityHealthAnalyticsCustomModules/#{effective_security_health_analytics_custom_module}" - end), - "effective_security_health_analytics_custom_module:folder:location" => (proc do |folder:, location:, effective_security_health_analytics_custom_module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/effectiveSecurityHealthAnalyticsCustomModules/#{effective_security_health_analytics_custom_module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified EventThreatDetectionCustomModule resource string. - # - # @overload event_threat_detection_custom_module_path(organization:, location:, event_threat_detection_custom_module:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}` - # - # @param organization [String] - # @param location [String] - # @param event_threat_detection_custom_module [String] - # - # @overload event_threat_detection_custom_module_path(project:, location:, event_threat_detection_custom_module:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}` - # - # @param project [String] - # @param location [String] - # @param event_threat_detection_custom_module [String] - # - # @overload event_threat_detection_custom_module_path(folder:, location:, event_threat_detection_custom_module:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}` - # - # @param folder [String] - # @param location [String] - # @param event_threat_detection_custom_module [String] - # - # @return [::String] - def event_threat_detection_custom_module_path **args - resources = { - "event_threat_detection_custom_module:location:organization" => (proc do |organization:, location:, event_threat_detection_custom_module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/eventThreatDetectionCustomModules/#{event_threat_detection_custom_module}" - end), - "event_threat_detection_custom_module:location:project" => (proc do |project:, location:, event_threat_detection_custom_module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/eventThreatDetectionCustomModules/#{event_threat_detection_custom_module}" - end), - "event_threat_detection_custom_module:folder:location" => (proc do |folder:, location:, event_threat_detection_custom_module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/eventThreatDetectionCustomModules/#{event_threat_detection_custom_module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified SecurityCenterService resource string. - # - # @overload security_center_service_path(project:, location:, service:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/securityCenterServices/{service}` - # - # @param project [String] - # @param location [String] - # @param service [String] - # - # @overload security_center_service_path(folder:, location:, service:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/securityCenterServices/{service}` - # - # @param folder [String] - # @param location [String] - # @param service [String] - # - # @overload security_center_service_path(organization:, location:, service:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/securityCenterServices/{service}` - # - # @param organization [String] - # @param location [String] - # @param service [String] - # - # @return [::String] - def security_center_service_path **args - resources = { - "location:project:service" => (proc do |project:, location:, service:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/securityCenterServices/#{service}" - end), - "folder:location:service" => (proc do |folder:, location:, service:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/securityCenterServices/#{service}" - end), - "location:organization:service" => (proc do |organization:, location:, service:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/securityCenterServices/#{service}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified SecurityHealthAnalyticsCustomModule resource string. - # - # @overload security_health_analytics_custom_module_path(organization:, location:, security_health_analytics_custom_module:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - # - # @param organization [String] - # @param location [String] - # @param security_health_analytics_custom_module [String] - # - # @overload security_health_analytics_custom_module_path(project:, location:, security_health_analytics_custom_module:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - # - # @param project [String] - # @param location [String] - # @param security_health_analytics_custom_module [String] - # - # @overload security_health_analytics_custom_module_path(folder:, location:, security_health_analytics_custom_module:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - # - # @param folder [String] - # @param location [String] - # @param security_health_analytics_custom_module [String] - # - # @return [::String] - def security_health_analytics_custom_module_path **args - resources = { - "location:organization:security_health_analytics_custom_module" => (proc do |organization:, location:, security_health_analytics_custom_module:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/securityHealthAnalyticsCustomModules/#{security_health_analytics_custom_module}" - end), - "location:project:security_health_analytics_custom_module" => (proc do |project:, location:, security_health_analytics_custom_module:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/securityHealthAnalyticsCustomModules/#{security_health_analytics_custom_module}" - end), - "folder:location:security_health_analytics_custom_module" => (proc do |folder:, location:, security_health_analytics_custom_module:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/securityHealthAnalyticsCustomModules/#{security_health_analytics_custom_module}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb deleted file mode 100644 index 2451529ae88b..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/security_center_management/v1/version" -require "google/cloud/security_center_management/v1/bindings_override" - -require "google/cloud/security_center_management/v1/security_center_management/credentials" -require "google/cloud/security_center_management/v1/security_center_management/paths" -require "google/cloud/security_center_management/v1/security_center_management/rest/client" - -module Google - module Cloud - module SecurityCenterManagement - module V1 - ## - # Service describing handlers for resources - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/security_center_management/v1/security_center_management/rest" - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - module SecurityCenterManagement - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/security_center_management/v1/security_center_management/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb deleted file mode 100644 index 6274bfaaa822..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/client.rb +++ /dev/null @@ -1,2610 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/securitycentermanagement/v1/security_center_management_pb" -require "google/cloud/security_center_management/v1/security_center_management/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module SecurityCenterManagement - module V1 - module SecurityCenterManagement - module Rest - ## - # REST client for the SecurityCenterManagement service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "securitycentermanagement.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :security_center_management_stub - - ## - # Configure the SecurityCenterManagement Client class. - # - # See {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenterManagement clients - # ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "SecurityCenterManagement", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_effective_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout = 60.0 - default_config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.get_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.update_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.delete_security_health_analytics_custom_module.timeout = 60.0 - - default_config.rpcs.simulate_security_health_analytics_custom_module.timeout = 60.0 - default_config.rpcs.simulate_security_health_analytics_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_effective_event_threat_detection_custom_modules.timeout = 60.0 - default_config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_effective_event_threat_detection_custom_module.timeout = 60.0 - default_config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_event_threat_detection_custom_modules.timeout = 60.0 - default_config.rpcs.list_event_threat_detection_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout = 60.0 - default_config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_event_threat_detection_custom_module.timeout = 60.0 - default_config.rpcs.get_event_threat_detection_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_event_threat_detection_custom_module.timeout = 60.0 - - default_config.rpcs.update_event_threat_detection_custom_module.timeout = 60.0 - - default_config.rpcs.delete_event_threat_detection_custom_module.timeout = 60.0 - - default_config.rpcs.validate_event_threat_detection_custom_module.timeout = 60.0 - default_config.rpcs.validate_event_threat_detection_custom_module.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SecurityCenterManagement Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @security_center_management_stub.universe_domain - end - - ## - # Create a new SecurityCenterManagement REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SecurityCenterManagement client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @security_center_management_stub = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @security_center_management_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @security_center_management_stub.endpoint - config.universe_domain = @security_center_management_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @security_center_management_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @security_center_management_stub.logger - end - - # Service calls - - ## - # Returns a list of all - # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule EffectiveSecurityHealthAnalyticsCustomModule} - # resources for the given parent. This includes resident modules defined at - # the scope of the parent, and inherited modules, inherited from ancestor - # organizations, folders, and projects (no descendants). - # - # @overload list_effective_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_effective_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_effective_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list effective custom modules, in one of the - # following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_effective_security_health_analytics_custom_modules method. - # result = client.list_effective_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_effective_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_effective_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_effective_security_health_analytics_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_effective_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.list_effective_security_health_analytics_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_effective_security_health_analytics_custom_modules, "effective_security_health_analytics_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single - # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule EffectiveSecurityHealthAnalyticsCustomModule}. - # - # @overload get_effective_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_effective_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_effective_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The full resource name of the custom module, specified in one of - # the following formats: - # - # * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - # * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - # * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_effective_security_health_analytics_custom_module method. - # result = client.get_effective_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. - # p result - # - def get_effective_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_effective_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_effective_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_effective_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.get_effective_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # resources for the given parent. This includes resident modules defined at - # the scope of the parent, and inherited modules, inherited from ancestor - # organizations, folders, and projects (no descendants). - # - # @overload list_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent organization, folder, or project in which to - # list custom modules, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_security_health_analytics_custom_modules method. - # result = client.list_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_security_health_analytics_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.list_security_health_analytics_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all resident - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # resources under the given organization, folder, or project and all of its - # descendants. - # - # @overload list_descendant_security_health_analytics_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_descendant_security_health_analytics_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_descendant_security_health_analytics_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent organization, folder, or project in which to - # list custom modules, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new - # - # # Call the list_descendant_security_health_analytics_custom_modules method. - # result = client.list_descendant_security_health_analytics_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - # p item - # end - # - def list_descendant_security_health_analytics_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_descendant_security_health_analytics_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_descendant_security_health_analytics_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_descendant_security_health_analytics_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.list_descendant_security_health_analytics_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_descendant_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule}. - # - # @overload get_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `get_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_security_health_analytics_custom_module(name: nil) - # Pass arguments to `get_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource, in the format - # `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the get_security_health_analytics_custom_module method. - # result = client.get_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def get_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.get_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # at the scope of the given organization, folder, or project, and also - # creates inherited `SecurityHealthAnalyticsCustomModule` resources for all - # folders and projects that are descendants of the given parent. These - # modules are enabled by default. - # - # @overload create_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `create_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_security_health_analytics_custom_module(parent: nil, security_health_analytics_custom_module: nil, validate_only: nil) - # Pass arguments to `create_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the parent organization, folder, or project of the - # module, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. The resource being created. - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be created. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to create the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the create_security_health_analytics_custom_module method. - # result = client.create_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def create_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.create_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # under the given name based on the given update mask. Updating the - # enablement state is supported on both resident and inherited modules - # (though resident modules cannot have an enablement state of "inherited"). - # Updating the display name and custom configuration of a module is supported - # on resident modules only. - # - # @overload update_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `update_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_security_health_analytics_custom_module(update_mask: nil, security_health_analytics_custom_module: nil, validate_only: nil) - # Pass arguments to `update_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to update. The following values are valid: - # - # * `custom_config` - # * `enablement_state` - # - # If you omit this field or set it to the wildcard value `*`, then all - # eligible fields are updated. - # @param security_health_analytics_custom_module [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule, ::Hash] - # Required. The resource being updated. - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be updated. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to update the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the update_security_health_analytics_custom_module method. - # result = client.update_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - # p result - # - def update_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.update_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # and all of its descendants in the resource hierarchy. This method is only - # supported for resident custom modules. - # - # @overload delete_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_security_health_analytics_custom_module(name: nil, validate_only: nil) - # Pass arguments to `delete_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the SHA custom module, in one of the - # following formats: - # - # * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be deleted. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to delete the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during deletion of the module - # - # Defaults to `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the delete_security_health_analytics_custom_module method. - # result = client.delete_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.delete_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Simulates the result of using a - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule SecurityHealthAnalyticsCustomModule} - # to check a resource. - # - # @overload simulate_security_health_analytics_custom_module(request, options = nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload simulate_security_health_analytics_custom_module(parent: nil, custom_config: nil, resource: nil) - # Pass arguments to `simulate_security_health_analytics_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The relative resource name of the organization, project, or - # folder. For more information about relative resource names, see [AIP-122: - # Resource names](https://google.aip.dev/122). Example: - # `organizations/{organization_id}`. - # @param custom_config [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig, ::Hash] - # Required. The custom configuration that you need to test. - # @param resource [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource, ::Hash] - # Required. Resource data to simulate custom module against. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new - # - # # Call the simulate_security_health_analytics_custom_module method. - # result = client.simulate_security_health_analytics_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. - # p result - # - def simulate_security_health_analytics_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.simulate_security_health_analytics_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.simulate_security_health_analytics_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.simulate_security_health_analytics_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.simulate_security_health_analytics_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all effective Event Threat Detection custom modules for the - # given parent. This includes resident modules defined at the scope of the - # parent along with modules inherited from its ancestors. - # - # @overload list_effective_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_effective_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_effective_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list effective custom modules, in one of the - # following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_effective_event_threat_detection_custom_modules method. - # result = client.list_effective_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. - # p item - # end - # - def list_effective_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_effective_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_effective_event_threat_detection_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_effective_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.list_effective_event_threat_detection_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_effective_event_threat_detection_custom_modules, "effective_event_threat_detection_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the effective Event Threat Detection custom module at the given level. - # - # The difference between an - # {::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule EffectiveEventThreatDetectionCustomModule} - # and an - # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule EventThreatDetectionCustomModule} - # is that the fields for an `EffectiveEventThreatDetectionCustomModule` are - # computed from ancestors if needed. For example, the enablement state for an - # `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or - # `INHERITED`. In contrast, the enablement state for an - # `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` - # or `DISABLED`. - # - # @overload get_effective_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_effective_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_effective_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Event Threat Detection custom module, in - # one of the following formats: - # - # * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_effective_event_threat_detection_custom_module method. - # result = client.get_effective_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. - # p result - # - def get_effective_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_effective_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_effective_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_effective_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.get_effective_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all Event Threat Detection custom modules for the given organization, - # folder, or project. This includes resident modules defined at the scope of - # the parent along with modules inherited from ancestors. - # - # @overload list_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list custom modules, in one of the following - # formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of modules to return. The service may return - # fewer than this value. If unspecified, at most 10 modules will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_event_threat_detection_custom_modules method. - # result = client.list_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_event_threat_detection_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.list_event_threat_detection_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all resident Event Threat Detection custom modules for the given - # organization, folder, or project and its descendants. - # - # @overload list_descendant_event_threat_detection_custom_modules(request, options = nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_descendant_event_threat_detection_custom_modules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_descendant_event_threat_detection_custom_modules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent to list custom modules, in one of the following - # formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of modules to return. The service may return - # fewer than this value. If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new - # - # # Call the list_descendant_event_threat_detection_custom_modules method. - # result = client.list_descendant_event_threat_detection_custom_modules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - # p item - # end - # - def list_descendant_event_threat_detection_custom_modules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_descendant_event_threat_detection_custom_modules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_descendant_event_threat_detection_custom_modules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_descendant_event_threat_detection_custom_modules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.list_descendant_event_threat_detection_custom_modules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_descendant_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an Event Threat Detection custom module. - # - # @overload get_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `get_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_event_threat_detection_custom_module(name: nil) - # Pass arguments to `get_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Event Threat Detection custom module, in - # one of the following formats: - # - # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new - # - # # Call the get_event_threat_detection_custom_module method. - # result = client.get_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - # p result - # - def get_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.get_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a resident Event Threat Detection custom module at the scope of the - # given organization, folder, or project, and creates inherited custom - # modules for all descendants of the given parent. These modules are enabled - # by default. - # - # @overload create_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `create_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_event_threat_detection_custom_module(parent: nil, event_threat_detection_custom_module: nil, validate_only: nil) - # Pass arguments to `create_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of parent for the module, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module to create. The - # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule#name EventThreatDetectionCustomModule.name} - # field is ignored; Security Command Center generates the name. - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be created. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to create the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new - # - # # Call the create_event_threat_detection_custom_module method. - # result = client.create_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - # p result - # - def create_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.create_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Event Threat Detection custom module with the given name based - # on the given update mask. Updating the enablement state is supported for - # both resident and inherited modules (though resident modules cannot have an - # enablement state of "inherited"). Updating the display name or - # configuration of a module is supported for resident modules only. The type - # of a module cannot be changed. - # - # @overload update_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `update_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_event_threat_detection_custom_module(update_mask: nil, event_threat_detection_custom_module: nil, validate_only: nil) - # Pass arguments to `update_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to update. If omitted, then all fields are updated. - # @param event_threat_detection_custom_module [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule, ::Hash] - # Required. The module being updated. - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be updated. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to update the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new - # - # # Call the update_event_threat_detection_custom_module method. - # result = client.update_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - # p result - # - def update_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.update_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified Event Threat Detection custom module and all of its - # descendants in the resource hierarchy. This method is only supported for - # resident custom modules. - # - # @overload delete_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_event_threat_detection_custom_module(name: nil, validate_only: nil) - # Pass arguments to `delete_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Event Threat Detection custom module, in - # one of the following formats: - # - # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be deleted. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to delete the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new - # - # # Call the delete_event_threat_detection_custom_module method. - # result = client.delete_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.delete_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Validates the given Event Threat Detection custom module. - # - # @overload validate_event_threat_detection_custom_module(request, options = nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload validate_event_threat_detection_custom_module(parent: nil, raw_text: nil, type: nil) - # Pass arguments to `validate_event_threat_detection_custom_module` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent to validate the custom modules under, - # in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # @param raw_text [::String] - # Required. The raw text of the module's contents. Used to generate error - # messages. - # @param type [::String] - # Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new - # - # # Call the validate_event_threat_detection_custom_module method. - # result = client.validate_event_threat_detection_custom_module request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse. - # p result - # - def validate_event_threat_detection_custom_module request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.validate_event_threat_detection_custom_module.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.validate_event_threat_detection_custom_module.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.validate_event_threat_detection_custom_module.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.validate_event_threat_detection_custom_module request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets service settings for the specified Security Command Center service. - # - # @overload get_security_center_service(request, options = nil) - # Pass arguments to `get_security_center_service` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_security_center_service(name: nil, show_eligible_modules_only: nil) - # Pass arguments to `get_security_center_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The Security Command Center service to retrieve, in one of the - # following formats: - # - # * organizations/\\{organization}/locations/\\{location}/securityCenterServices/\\{service} - # * folders/\\{folder}/locations/\\{location}/securityCenterServices/\\{service} - # * projects/\\{project}/locations/\\{location}/securityCenterServices/\\{service} - # - # The following values are valid for `{service}`: - # - # * `container-threat-detection` - # * `event-threat-detection` - # * `security-health-analytics` - # * `vm-threat-detection` - # * `web-security-scanner` - # @param show_eligible_modules_only [::Boolean] - # Set to `true` to show only modules that are in scope. By default, all - # modules are shown. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new - # - # # Call the get_security_center_service method. - # result = client.get_security_center_service request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. - # p result - # - def get_security_center_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_security_center_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_security_center_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_security_center_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.get_security_center_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a list of all Security Command Center services for the given - # parent. - # - # @overload list_security_center_services(request, options = nil) - # Pass arguments to `list_security_center_services` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_security_center_services(parent: nil, page_size: nil, page_token: nil, show_eligible_modules_only: nil) - # Pass arguments to `list_security_center_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the parent to list Security Command Center services, - # in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # @param show_eligible_modules_only [::Boolean] - # Flag that, when set, is used to filter the module settings that are shown. - # The default setting is that all modules are shown. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new - # - # # Call the list_security_center_services method. - # result = client.list_security_center_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. - # p item - # end - # - def list_security_center_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_security_center_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_security_center_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_security_center_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.list_security_center_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @security_center_management_stub, :list_security_center_services, "security_center_services", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Security Command Center service using the given update mask. - # - # @overload update_security_center_service(request, options = nil) - # Pass arguments to `update_security_center_service` via a request object, either of type - # {::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_security_center_service(security_center_service: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_security_center_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param security_center_service [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService, ::Hash] - # Required. The updated service. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to update. Accepts the following values: - # - # * `intended_enablement_state` - # * `modules` - # - # If omitted, then all eligible fields are updated. - # @param validate_only [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no service will be updated. An `OK` response indicates that - # the request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to update the service could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during update of the service - # - # Defaults to `false`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new - # - # # Call the update_security_center_service method. - # result = client.update_security_center_service request - # - # # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. - # p result - # - def update_security_center_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_security_center_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::SecurityCenterManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_security_center_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_security_center_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @security_center_management_stub.update_security_center_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SecurityCenterManagement REST API. - # - # This class represents the configuration for SecurityCenterManagement REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_effective_security_health_analytics_custom_modules to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_effective_security_health_analytics_custom_modules.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "securitycentermanagement.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the SecurityCenterManagement API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_effective_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `get_effective_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_security_health_analytics_custom_module - ## - # RPC-specific configuration for `list_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `list_descendant_security_health_analytics_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_security_health_analytics_custom_modules - ## - # RPC-specific configuration for `get_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_security_health_analytics_custom_module - ## - # RPC-specific configuration for `create_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_security_health_analytics_custom_module - ## - # RPC-specific configuration for `update_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_health_analytics_custom_module - ## - # RPC-specific configuration for `delete_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_security_health_analytics_custom_module - ## - # RPC-specific configuration for `simulate_security_health_analytics_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :simulate_security_health_analytics_custom_module - ## - # RPC-specific configuration for `list_effective_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_effective_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `get_effective_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_effective_event_threat_detection_custom_module - ## - # RPC-specific configuration for `list_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `list_descendant_event_threat_detection_custom_modules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_descendant_event_threat_detection_custom_modules - ## - # RPC-specific configuration for `get_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :get_event_threat_detection_custom_module - ## - # RPC-specific configuration for `create_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :create_event_threat_detection_custom_module - ## - # RPC-specific configuration for `update_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :update_event_threat_detection_custom_module - ## - # RPC-specific configuration for `delete_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_event_threat_detection_custom_module - ## - # RPC-specific configuration for `validate_event_threat_detection_custom_module` - # @return [::Gapic::Config::Method] - # - attr_reader :validate_event_threat_detection_custom_module - ## - # RPC-specific configuration for `get_security_center_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_security_center_service - ## - # RPC-specific configuration for `list_security_center_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_security_center_services - ## - # RPC-specific configuration for `update_security_center_service` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_center_service - - # @private - def initialize parent_rpcs = nil - list_effective_security_health_analytics_custom_modules_config = parent_rpcs.list_effective_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_effective_security_health_analytics_custom_modules - @list_effective_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_effective_security_health_analytics_custom_modules_config - get_effective_security_health_analytics_custom_module_config = parent_rpcs.get_effective_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_effective_security_health_analytics_custom_module - @get_effective_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_effective_security_health_analytics_custom_module_config - list_security_health_analytics_custom_modules_config = parent_rpcs.list_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_security_health_analytics_custom_modules - @list_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_security_health_analytics_custom_modules_config - list_descendant_security_health_analytics_custom_modules_config = parent_rpcs.list_descendant_security_health_analytics_custom_modules if parent_rpcs.respond_to? :list_descendant_security_health_analytics_custom_modules - @list_descendant_security_health_analytics_custom_modules = ::Gapic::Config::Method.new list_descendant_security_health_analytics_custom_modules_config - get_security_health_analytics_custom_module_config = parent_rpcs.get_security_health_analytics_custom_module if parent_rpcs.respond_to? :get_security_health_analytics_custom_module - @get_security_health_analytics_custom_module = ::Gapic::Config::Method.new get_security_health_analytics_custom_module_config - create_security_health_analytics_custom_module_config = parent_rpcs.create_security_health_analytics_custom_module if parent_rpcs.respond_to? :create_security_health_analytics_custom_module - @create_security_health_analytics_custom_module = ::Gapic::Config::Method.new create_security_health_analytics_custom_module_config - update_security_health_analytics_custom_module_config = parent_rpcs.update_security_health_analytics_custom_module if parent_rpcs.respond_to? :update_security_health_analytics_custom_module - @update_security_health_analytics_custom_module = ::Gapic::Config::Method.new update_security_health_analytics_custom_module_config - delete_security_health_analytics_custom_module_config = parent_rpcs.delete_security_health_analytics_custom_module if parent_rpcs.respond_to? :delete_security_health_analytics_custom_module - @delete_security_health_analytics_custom_module = ::Gapic::Config::Method.new delete_security_health_analytics_custom_module_config - simulate_security_health_analytics_custom_module_config = parent_rpcs.simulate_security_health_analytics_custom_module if parent_rpcs.respond_to? :simulate_security_health_analytics_custom_module - @simulate_security_health_analytics_custom_module = ::Gapic::Config::Method.new simulate_security_health_analytics_custom_module_config - list_effective_event_threat_detection_custom_modules_config = parent_rpcs.list_effective_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_effective_event_threat_detection_custom_modules - @list_effective_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_effective_event_threat_detection_custom_modules_config - get_effective_event_threat_detection_custom_module_config = parent_rpcs.get_effective_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_effective_event_threat_detection_custom_module - @get_effective_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_effective_event_threat_detection_custom_module_config - list_event_threat_detection_custom_modules_config = parent_rpcs.list_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_event_threat_detection_custom_modules - @list_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_event_threat_detection_custom_modules_config - list_descendant_event_threat_detection_custom_modules_config = parent_rpcs.list_descendant_event_threat_detection_custom_modules if parent_rpcs.respond_to? :list_descendant_event_threat_detection_custom_modules - @list_descendant_event_threat_detection_custom_modules = ::Gapic::Config::Method.new list_descendant_event_threat_detection_custom_modules_config - get_event_threat_detection_custom_module_config = parent_rpcs.get_event_threat_detection_custom_module if parent_rpcs.respond_to? :get_event_threat_detection_custom_module - @get_event_threat_detection_custom_module = ::Gapic::Config::Method.new get_event_threat_detection_custom_module_config - create_event_threat_detection_custom_module_config = parent_rpcs.create_event_threat_detection_custom_module if parent_rpcs.respond_to? :create_event_threat_detection_custom_module - @create_event_threat_detection_custom_module = ::Gapic::Config::Method.new create_event_threat_detection_custom_module_config - update_event_threat_detection_custom_module_config = parent_rpcs.update_event_threat_detection_custom_module if parent_rpcs.respond_to? :update_event_threat_detection_custom_module - @update_event_threat_detection_custom_module = ::Gapic::Config::Method.new update_event_threat_detection_custom_module_config - delete_event_threat_detection_custom_module_config = parent_rpcs.delete_event_threat_detection_custom_module if parent_rpcs.respond_to? :delete_event_threat_detection_custom_module - @delete_event_threat_detection_custom_module = ::Gapic::Config::Method.new delete_event_threat_detection_custom_module_config - validate_event_threat_detection_custom_module_config = parent_rpcs.validate_event_threat_detection_custom_module if parent_rpcs.respond_to? :validate_event_threat_detection_custom_module - @validate_event_threat_detection_custom_module = ::Gapic::Config::Method.new validate_event_threat_detection_custom_module_config - get_security_center_service_config = parent_rpcs.get_security_center_service if parent_rpcs.respond_to? :get_security_center_service - @get_security_center_service = ::Gapic::Config::Method.new get_security_center_service_config - list_security_center_services_config = parent_rpcs.list_security_center_services if parent_rpcs.respond_to? :list_security_center_services - @list_security_center_services = ::Gapic::Config::Method.new list_security_center_services_config - update_security_center_service_config = parent_rpcs.update_security_center_service if parent_rpcs.respond_to? :update_security_center_service - @update_security_center_service = ::Gapic::Config::Method.new update_security_center_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb deleted file mode 100644 index 4bd0edd3626c..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/security_center_management/rest/service_stub.rb +++ /dev/null @@ -1,1677 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/securitycentermanagement/v1/security_center_management_pb" - -module Google - module Cloud - module SecurityCenterManagement - module V1 - module SecurityCenterManagement - module Rest - ## - # REST service stub for the SecurityCenterManagement service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_effective_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse] - # A result object deserialized from the server's reply - def list_effective_security_health_analytics_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_security_health_analytics_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_effective_security_health_analytics_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_effective_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def get_effective_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_effective_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse] - # A result object deserialized from the server's reply - def list_security_health_analytics_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_security_health_analytics_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_security_health_analytics_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_descendant_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse] - # A result object deserialized from the server's reply - def list_descendant_security_health_analytics_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_descendant_security_health_analytics_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def get_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def create_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # A result object deserialized from the server's reply - def update_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the simulate_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse] - # A result object deserialized from the server's reply - def simulate_security_health_analytics_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_simulate_security_health_analytics_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "simulate_security_health_analytics_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_effective_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse] - # A result object deserialized from the server's reply - def list_effective_event_threat_detection_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_effective_event_threat_detection_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_effective_event_threat_detection_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_effective_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def get_effective_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_effective_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_effective_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse] - # A result object deserialized from the server's reply - def list_event_threat_detection_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_event_threat_detection_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_event_threat_detection_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_descendant_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse] - # A result object deserialized from the server's reply - def list_descendant_event_threat_detection_custom_modules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_descendant_event_threat_detection_custom_modules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def get_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def create_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # A result object deserialized from the server's reply - def update_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the validate_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse] - # A result object deserialized from the server's reply - def validate_event_threat_detection_custom_module request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_validate_event_threat_detection_custom_module_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "validate_event_threat_detection_custom_module", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_security_center_service REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # A result object deserialized from the server's reply - def get_security_center_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_security_center_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_security_center_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_security_center_services REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse] - # A result object deserialized from the server's reply - def list_security_center_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_security_center_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_security_center_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_security_center_service REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # A result object deserialized from the server's reply - def update_security_center_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_security_center_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_security_center_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_effective_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_effective_security_health_analytics_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveSecurityHealthAnalyticsCustomModules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveSecurityHealthAnalyticsCustomModules", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveSecurityHealthAnalyticsCustomModules", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_effective_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_effective_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/effectiveSecurityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/effectiveSecurityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/effectiveSecurityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_security_health_analytics_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_descendant_security_health_analytics_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_descendant_security_health_analytics_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:listDescendant", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:listDescendant", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:listDescendant", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", - body: "security_health_analytics_custom_module", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", - body: "security_health_analytics_custom_module", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules", - body: "security_health_analytics_custom_module", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_health_analytics_custom_module.name}", - body: "security_health_analytics_custom_module", - matches: [ - ["security_health_analytics_custom_module.name", %r{^projects/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_health_analytics_custom_module.name}", - body: "security_health_analytics_custom_module", - matches: [ - ["security_health_analytics_custom_module.name", %r{^folders/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_health_analytics_custom_module.name}", - body: "security_health_analytics_custom_module", - matches: [ - ["security_health_analytics_custom_module.name", %r{^organizations/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/securityHealthAnalyticsCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the simulate_security_health_analytics_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_simulate_security_health_analytics_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:simulate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:simulate", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/securityHealthAnalyticsCustomModules:simulate", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_effective_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_effective_event_threat_detection_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveEventThreatDetectionCustomModules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveEventThreatDetectionCustomModules", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/effectiveEventThreatDetectionCustomModules", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_effective_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_effective_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/effectiveEventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/effectiveEventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/effectiveEventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_event_threat_detection_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_descendant_event_threat_detection_custom_modules REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_descendant_event_threat_detection_custom_modules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:listDescendant", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:listDescendant", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:listDescendant", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", - body: "event_threat_detection_custom_module", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", - body: "event_threat_detection_custom_module", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules", - body: "event_threat_detection_custom_module", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{event_threat_detection_custom_module.name}", - body: "event_threat_detection_custom_module", - matches: [ - ["event_threat_detection_custom_module.name", %r{^projects/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{event_threat_detection_custom_module.name}", - body: "event_threat_detection_custom_module", - matches: [ - ["event_threat_detection_custom_module.name", %r{^folders/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{event_threat_detection_custom_module.name}", - body: "event_threat_detection_custom_module", - matches: [ - ["event_threat_detection_custom_module.name", %r{^organizations/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/eventThreatDetectionCustomModules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the validate_event_threat_detection_custom_module REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_validate_event_threat_detection_custom_module_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:validate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:validate", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/eventThreatDetectionCustomModules:validate", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_security_center_service REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_security_center_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_security_center_services REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_security_center_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/securityCenterServices", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/securityCenterServices", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/securityCenterServices", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_security_center_service REST call - # - # @param request_pb [::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_security_center_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_center_service.name}", - body: "security_center_service", - matches: [ - ["security_center_service.name", %r{^projects/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_center_service.name}", - body: "security_center_service", - matches: [ - ["security_center_service.name", %r{^folders/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{security_center_service.name}", - body: "security_center_service", - matches: [ - ["security_center_service.name", %r{^organizations/[^/]+/locations/[^/]+/securityCenterServices/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/version.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/version.rb deleted file mode 100644 index 5a44413e0a99..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/security_center_management/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module SecurityCenterManagement - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_pb.rb b/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_pb.rb deleted file mode 100644 index 9dc6c4a10fff..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/lib/google/cloud/securitycentermanagement/v1/security_center_management_pb.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycentermanagement/v1/security_center_management.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' -require 'google/type/expr_pb' - - -descriptor_data = "\nIgoogle/cloud/securitycentermanagement/v1/security_center_management.proto\x12(google.cloud.securitycentermanagement.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/expr.proto\"\xbe\n\n\x15SecurityCenterService\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12w\n\x19intended_enablement_state\x18\x02 \x01(\x0e\x32O.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementStateB\x03\xe0\x41\x01\x12x\n\x1a\x65\x66\x66\x65\x63tive_enablement_state\x18\x03 \x01(\x0e\x32O.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementStateB\x03\xe0\x41\x03\x12\x62\n\x07modules\x18\x04 \x03(\x0b\x32L.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModulesEntryB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0eservice_config\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a\x83\x02\n\x0eModuleSettings\x12w\n\x19intended_enablement_state\x18\x01 \x01(\x0e\x32O.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementStateB\x03\xe0\x41\x01\x12x\n\x1a\x65\x66\x66\x65\x63tive_enablement_state\x18\x02 \x01(\x0e\x32O.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementStateB\x03\xe0\x41\x03\x1a~\n\x0cModulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12]\n\x05value\x18\x02 \x01(\x0b\x32N.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings:\x02\x38\x01\"n\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\r\n\tINHERITED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\x0f\n\x0bINGEST_ONLY\x10\x04:\xd8\x02\xea\x41\xd4\x02\n=securitycentermanagement.googleapis.com/SecurityCenterService\x12Hprojects/{project}/locations/{location}/securityCenterServices/{service}\x12\x46\x66olders/{folder}/locations/{location}/securityCenterServices/{service}\x12Rorganizations/{organization}/locations/{location}/securityCenterServices/{service}*\x16securityCenterServices2\x15securityCenterService\"\xee\x07\n,EffectiveSecurityHealthAnalyticsCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12R\n\rcustom_config\x18\x02 \x01(\x0b\x32\x36.google.cloud.securitycentermanagement.v1.CustomConfigB\x03\xe0\x41\x03\x12\x85\x01\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32\x66.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\xe3\x04\xea\x41\xdf\x04\nTsecuritycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\x12\x93\x01organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}\x12\x89\x01projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}\x12\x87\x01\x66olders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}*-effectiveSecurityHealthAnalyticsCustomModules2,effectiveSecurityHealthAnalyticsCustomModule\"\xd9\x01\n8ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x12l\n\x06parent\x18\x01 \x01(\tB\\\xe0\x41\x02\xfa\x41V\x12Tsecuritycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xe9\x01\n9ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\x12\x92\x01\n2effective_security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32V.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa4\x01\n6GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x12j\n\x04name\x18\x01 \x01(\tB\\\xe0\x41\x02\xfa\x41V\nTsecuritycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule\"\xd2\x08\n#SecurityHealthAnalyticsCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12|\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32].google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementStateB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12l\n\x0f\x61ncestor_module\x18\x06 \x01(\tBS\xe0\x41\x03\xfa\x41M\nKsecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12R\n\rcustom_config\x18\x07 \x01(\x0b\x32\x36.google.cloud.securitycentermanagement.v1.CustomConfigB\x03\xe0\x41\x01\"]\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tINHERITED\x10\x03:\x8d\x04\xea\x41\x89\x04\nKsecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x80\x01organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}\x12vprojects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}\x12tfolders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}*$securityHealthAnalyticsCustomModules2#securityHealthAnalyticsCustomModule\"\xeb\x05\n\x0c\x43ustomConfig\x12)\n\tpredicate\x18\x01 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x12\x63\n\rcustom_output\x18\x02 \x01(\x0b\x32G.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpecB\x03\xe0\x41\x01\x12g\n\x11resource_selector\x18\x03 \x01(\x0b\x32G.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelectorB\x03\xe0\x41\x01\x12V\n\x08severity\x18\x04 \x01(\x0e\x32?.google.cloud.securitycentermanagement.v1.CustomConfig.SeverityB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0erecommendation\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\xce\x01\n\x10\x43ustomOutputSpec\x12i\n\nproperties\x18\x01 \x03(\x0b\x32P.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.PropertyB\x03\xe0\x41\x01\x1aO\n\x08Property\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x30\n\x10value_expression\x18\x02 \x01(\x0b\x32\x11.google.type.ExprB\x03\xe0\x41\x01\x1a/\n\x10ResourceSelector\x12\x1b\n\x0eresource_types\x18\x01 \x03(\tB\x03\xe0\x41\x01\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"\xc7\x01\n/ListSecurityHealthAnalyticsCustomModulesRequest\x12\x63\n\x06parent\x18\x01 \x01(\tBS\xe0\x41\x02\xfa\x41M\x12Ksecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xcc\x01\n0ListSecurityHealthAnalyticsCustomModulesResponse\x12\x7f\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32M.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd1\x01\n9ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x12\x63\n\x06parent\x18\x01 \x01(\tBS\xe0\x41\x02\xfa\x41M\x12Ksecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xd6\x01\n:ListDescendantSecurityHealthAnalyticsCustomModulesResponse\x12\x7f\n(security_health_analytics_custom_modules\x18\x01 \x03(\x0b\x32M.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x92\x01\n-GetSecurityHealthAnalyticsCustomModuleRequest\x12\x61\n\x04name\x18\x01 \x01(\tBS\xe0\x41\x02\xfa\x41M\nKsecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\"\xb9\x02\n0CreateSecurityHealthAnalyticsCustomModuleRequest\x12\x63\n\x06parent\x18\x01 \x01(\tBS\xe0\x41\x02\xfa\x41M\x12Ksecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x83\x01\n\'security_health_analytics_custom_module\x18\x02 \x01(\x0b\x32M.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModuleB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x02\n0UpdateSecurityHealthAnalyticsCustomModuleRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x83\x01\n\'security_health_analytics_custom_module\x18\x02 \x01(\x0b\x32M.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModuleB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xb1\x01\n0DeleteSecurityHealthAnalyticsCustomModuleRequest\x12\x61\n\x04name\x18\x01 \x01(\tBS\xe0\x41\x02\xfa\x41M\nKsecuritycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xc1\x03\n2SimulateSecurityHealthAnalyticsCustomModuleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\rcustom_config\x18\x02 \x01(\x0b\x32\x36.google.cloud.securitycentermanagement.v1.CustomConfigB\x03\xe0\x41\x02\x12\x85\x01\n\x08resource\x18\x03 \x01(\x0b\x32n.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResourceB\x03\xe0\x41\x02\x1a\x99\x01\n\x11SimulatedResource\x12\x1a\n\rresource_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\rresource_data\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x33\n\x0fiam_policy_data\x18\x03 \x01(\x0b\x32\x15.google.iam.v1.PolicyB\x03\xe0\x41\x01\"\x8a\t\n\x10SimulatedFinding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x0e\n\x06parent\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\x04 \x01(\t\x12T\n\x05state\x18\x05 \x01(\x0e\x32@.google.cloud.securitycentermanagement.v1.SimulatedFinding.StateB\x03\xe0\x41\x03\x12k\n\x11source_properties\x18\x06 \x03(\x0b\x32P.google.cloud.securitycentermanagement.v1.SimulatedFinding.SourcePropertiesEntry\x12.\n\nevent_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12U\n\x08severity\x18\x08 \x01(\x0e\x32\x43.google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity\x12^\n\rfinding_class\x18\t \x01(\x0e\x32G.google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass\x1aO\n\x15SourcePropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"8\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04\"\xb0\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07:\xee\x01\xea\x41\xea\x01\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}*\x08\x66indings2\x07\x66inding\"\xf6\x02\n3SimulateSecurityHealthAnalyticsCustomModuleResponse\x12}\n\x06result\x18\x01 \x01(\x0b\x32m.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult\x1a\xbf\x01\n\x0fSimulatedResult\x12M\n\x07\x66inding\x18\x01 \x01(\x0b\x32:.google.cloud.securitycentermanagement.v1.SimulatedFindingH\x00\x12.\n\x0cno_violation\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00\x12#\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42\x08\n\x06result\"\xd4\x07\n)EffectiveEventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12,\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12\x82\x01\n\x10\x65nablement_state\x18\x03 \x01(\x0e\x32\x63.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementStateB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\"N\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:\xc8\x04\xea\x41\xc4\x04\nQsecuritycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12\x8d\x01organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}\x12\x83\x01projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}\x12\x81\x01\x66olders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}**effectiveEventThreatDetectionCustomModules2)effectiveEventThreatDetectionCustomModule\"\xd3\x01\n5ListEffectiveEventThreatDetectionCustomModulesRequest\x12i\n\x06parent\x18\x01 \x01(\tBY\xe0\x41\x02\xfa\x41S\x12Qsecuritycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xe0\x01\n6ListEffectiveEventThreatDetectionCustomModulesResponse\x12\x8c\x01\n/effective_event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32S.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9e\x01\n3GetEffectiveEventThreatDetectionCustomModuleRequest\x12g\n\x04name\x18\x01 \x01(\tBY\xe0\x41\x02\xfa\x41S\nQsecuritycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule\"\xb4\x08\n EventThreatDetectionCustomModule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12,\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12i\n\x0f\x61ncestor_module\x18\x03 \x01(\tBP\xe0\x41\x03\xfa\x41J\nHsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12y\n\x10\x65nablement_state\x18\x04 \x01(\x0e\x32Z.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementStateB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\t \x01(\tB\x03\xe0\x41\x03\"]\n\x0f\x45nablementState\x12 \n\x1c\x45NABLEMENT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x12\r\n\tINHERITED\x10\x03:\xf1\x03\xea\x41\xed\x03\nHsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12zorganizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}\x12pprojects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}\x12nfolders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}*!eventThreatDetectionCustomModules2 eventThreatDetectionCustomModule\"\xc1\x01\n,ListEventThreatDetectionCustomModulesRequest\x12`\n\x06parent\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\x12Hsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc3\x01\n-ListEventThreatDetectionCustomModulesResponse\x12y\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32J.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcb\x01\n6ListDescendantEventThreatDetectionCustomModulesRequest\x12`\n\x06parent\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\x12Hsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xcd\x01\n7ListDescendantEventThreatDetectionCustomModulesResponse\x12y\n%event_threat_detection_custom_modules\x18\x01 \x03(\x0b\x32J.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8c\x01\n*GetEventThreatDetectionCustomModuleRequest\x12^\n\x04name\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\nHsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\"\xac\x02\n-CreateEventThreatDetectionCustomModuleRequest\x12`\n\x06parent\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\x12Hsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12}\n$event_threat_detection_custom_module\x18\x03 \x01(\x0b\x32J.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x80\x02\n-UpdateEventThreatDetectionCustomModuleRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12}\n$event_threat_detection_custom_module\x18\x02 \x01(\x0b\x32J.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModuleB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xab\x01\n-DeleteEventThreatDetectionCustomModuleRequest\x12^\n\x04name\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\nHsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xbd\x01\n/ValidateEventThreatDetectionCustomModuleRequest\x12`\n\x06parent\x18\x01 \x01(\tBP\xe0\x41\x02\xfa\x41J\x12Hsecuritycentermanagement.googleapis.com/EventThreatDetectionCustomModule\x12\x15\n\x08raw_text\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xbe\x04\n0ValidateEventThreatDetectionCustomModuleResponse\x12\x86\x01\n\x06\x65rrors\x18\x02 \x03(\x0b\x32v.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError\x1a\xc8\x02\n\x1b\x43ustomModuleValidationError\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x12\n\nfield_path\x18\x02 \x01(\t\x12w\n\x05start\x18\x03 \x01(\x0b\x32\x63.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.PositionH\x00\x88\x01\x01\x12u\n\x03\x65nd\x18\x04 \x01(\x0b\x32\x63.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.PositionH\x01\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_end\x1a\x36\n\x08Position\x12\x13\n\x0bline_number\x18\x01 \x01(\x05\x12\x15\n\rcolumn_number\x18\x02 \x01(\x05\"\x9a\x01\n\x1fGetSecurityCenterServiceRequest\x12S\n\x04name\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\n=securitycentermanagement.googleapis.com/SecurityCenterService\x12\"\n\x1ashow_eligible_modules_only\x18\x02 \x01(\x08\"\xcf\x01\n!ListSecurityCenterServicesRequest\x12U\n\x06parent\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\x12=securitycentermanagement.googleapis.com/SecurityCenterService\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x1ashow_eligible_modules_only\x18\x04 \x01(\x08\"\xa0\x01\n\"ListSecurityCenterServicesResponse\x12\x61\n\x18security_center_services\x18\x01 \x03(\x0b\x32?.google.cloud.securitycentermanagement.v1.SecurityCenterService\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdd\x01\n\"UpdateSecurityCenterServiceRequest\x12\x65\n\x17security_center_service\x18\x01 \x01(\x0b\x32?.google.cloud.securitycentermanagement.v1.SecurityCenterServiceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x32\xceU\n\x18SecurityCenterManagement\x12\x90\x04\n1ListEffectiveSecurityHealthAnalyticsCustomModules\x12\x62.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest\x1a\x63.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse\"\x91\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x81\x02\x12Q/v1/{parent=projects/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModulesZR\x12P/v1/{parent=folders/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModulesZX\x12V/v1/{parent=organizations/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules\x12\xfd\x03\n/GetEffectiveSecurityHealthAnalyticsCustomModule\x12`.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest\x1aV.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule\"\x8f\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\x81\x02\x12Q/v1/{name=projects/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}ZR\x12P/v1/{name=folders/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}ZX\x12V/v1/{name=organizations/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}\x12\xda\x03\n(ListSecurityHealthAnalyticsCustomModules\x12Y.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest\x1aZ.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse\"\xf6\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xe6\x01\x12H/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModulesZI\x12G/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModulesZO\x12M/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules\x12\xa5\x04\n2ListDescendantSecurityHealthAnalyticsCustomModules\x12\x63.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest\x1a\x64.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse\"\xa3\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x93\x02\x12W/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendantZX\x12V/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendantZ^\x12\\/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant\x12\xc7\x03\n&GetSecurityHealthAnalyticsCustomModule\x12W.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest\x1aM.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule\"\xf4\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe6\x01\x12H/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}ZI\x12G/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}ZO\x12M/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}\x12\xf2\x04\n)CreateSecurityHealthAnalyticsCustomModule\x12Z.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest\x1aM.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule\"\x99\x03\xda\x41.parent,security_health_analytics_custom_module\x82\xd3\xe4\x93\x02\xe1\x02\"H/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:\'security_health_analytics_custom_moduleZr\"G/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:\'security_health_analytics_custom_moduleZx\"M/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:\'security_health_analytics_custom_module\x12\xf1\x05\n)UpdateSecurityHealthAnalyticsCustomModule\x12Z.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest\x1aM.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule\"\x98\x04\xda\x41\x33security_health_analytics_custom_module,update_mask\x82\xd3\xe4\x93\x02\xdb\x03\x32p/v1/{security_health_analytics_custom_module.name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}:\'security_health_analytics_custom_moduleZ\x9a\x01\x32o/v1/{security_health_analytics_custom_module.name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}:\'security_health_analytics_custom_moduleZ\xa0\x01\x32u/v1/{security_health_analytics_custom_module.name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}:\'security_health_analytics_custom_module\x12\x96\x03\n)DeleteSecurityHealthAnalyticsCustomModule\x12Z.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xf4\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe6\x01*H/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}ZI*G/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}ZO*M/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}\x12\x9e\x04\n+SimulateSecurityHealthAnalyticsCustomModule\x12\\.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest\x1a].google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse\"\xb1\x02\xda\x41\x1dparent,custom_config,resource\x82\xd3\xe4\x93\x02\x8a\x02\"Q/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:simulate:\x01*ZU\"P/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:simulate:\x01*Z[\"V/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:simulate:\x01*\x12\xfe\x03\n.ListEffectiveEventThreatDetectionCustomModules\x12_.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest\x1a`.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse\"\x88\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xf8\x01\x12N/v1/{parent=projects/*/locations/*}/effectiveEventThreatDetectionCustomModulesZO\x12M/v1/{parent=folders/*/locations/*}/effectiveEventThreatDetectionCustomModulesZU\x12S/v1/{parent=organizations/*/locations/*}/effectiveEventThreatDetectionCustomModules\x12\xeb\x03\n,GetEffectiveEventThreatDetectionCustomModule\x12].google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest\x1aS.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule\"\x86\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xf8\x01\x12N/v1/{name=projects/*/locations/*/effectiveEventThreatDetectionCustomModules/*}ZO\x12M/v1/{name=folders/*/locations/*/effectiveEventThreatDetectionCustomModules/*}ZU\x12S/v1/{name=organizations/*/locations/*/effectiveEventThreatDetectionCustomModules/*}\x12\xc8\x03\n%ListEventThreatDetectionCustomModules\x12V.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest\x1aW.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse\"\xed\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xdd\x01\x12\x45/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModulesZF\x12\x44/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModulesZL\x12J/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules\x12\x93\x04\n/ListDescendantEventThreatDetectionCustomModules\x12`.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest\x1a\x61.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse\"\x9a\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8a\x02\x12T/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:listDescendantZU\x12S/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:listDescendantZ[\x12Y/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:listDescendant\x12\xb5\x03\n#GetEventThreatDetectionCustomModule\x12T.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest\x1aJ.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01\x12\x45/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}ZF\x12\x44/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}ZL\x12J/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}\x12\xd4\x04\n&CreateEventThreatDetectionCustomModule\x12W.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest\x1aJ.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule\"\x84\x03\xda\x41+parent,event_threat_detection_custom_module\x82\xd3\xe4\x93\x02\xcf\x02\"E/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:$event_threat_detection_custom_moduleZl\"D/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:$event_threat_detection_custom_moduleZr\"J/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:$event_threat_detection_custom_module\x12\xca\x05\n&UpdateEventThreatDetectionCustomModule\x12W.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest\x1aJ.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule\"\xfa\x03\xda\x41\x30\x65vent_threat_detection_custom_module,update_mask\x82\xd3\xe4\x93\x02\xc0\x03\x32j/v1/{event_threat_detection_custom_module.name=projects/*/locations/*/eventThreatDetectionCustomModules/*}:$event_threat_detection_custom_moduleZ\x91\x01\x32i/v1/{event_threat_detection_custom_module.name=folders/*/locations/*/eventThreatDetectionCustomModules/*}:$event_threat_detection_custom_moduleZ\x97\x01\x32o/v1/{event_threat_detection_custom_module.name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}:$event_threat_detection_custom_module\x12\x87\x03\n&DeleteEventThreatDetectionCustomModule\x12W.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest\x1a\x16.google.protobuf.Empty\"\xeb\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xdd\x01*E/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}ZF*D/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}ZL*J/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}\x12\xec\x03\n(ValidateEventThreatDetectionCustomModule\x12Y.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest\x1aZ.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse\"\x88\x02\x82\xd3\xe4\x93\x02\x81\x02\"N/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:validate:\x01*ZR\"M/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:validate:\x01*ZX\"S/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:validate:\x01*\x12\xf3\x02\n\x18GetSecurityCenterService\x12I.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest\x1a?.google.cloud.securitycentermanagement.v1.SecurityCenterService\"\xca\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xbc\x01\x12:/v1/{name=projects/*/locations/*/securityCenterServices/*}Z;\x12\x39/v1/{name=folders/*/locations/*/securityCenterServices/*}ZA\x12?/v1/{name=organizations/*/locations/*/securityCenterServices/*}\x12\x86\x03\n\x1aListSecurityCenterServices\x12K.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest\x1aL.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse\"\xcc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xbc\x01\x12:/v1/{parent=projects/*/locations/*}/securityCenterServicesZ;\x12\x39/v1/{parent=folders/*/locations/*}/securityCenterServicesZA\x12?/v1/{parent=organizations/*/locations/*}/securityCenterServices\x12\xab\x04\n\x1bUpdateSecurityCenterService\x12L.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest\x1a?.google.cloud.securitycentermanagement.v1.SecurityCenterService\"\xfc\x02\xda\x41#security_center_service,update_mask\x82\xd3\xe4\x93\x02\xcf\x02\x32R/v1/{security_center_service.name=projects/*/locations/*/securityCenterServices/*}:\x17security_center_serviceZl2Q/v1/{security_center_service.name=folders/*/locations/*/securityCenterServices/*}:\x17security_center_serviceZr2W/v1/{security_center_service.name=organizations/*/locations/*/securityCenterServices/*}:\x17security_center_service\x1a[\xca\x41\'securitycentermanagement.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x93\x04\n,com.google.cloud.securitycentermanagement.v1B\x1dSecurityCenterManagementProtoP\x01Zhcloud.google.com/go/securitycentermanagement/apiv1/securitycentermanagementpb;securitycentermanagementpb\xaa\x02(Google.Cloud.SecurityCenterManagement.V1\xca\x02(Google\\Cloud\\SecurityCenterManagement\\V1\xea\x02+Google::Cloud::SecurityCenterManagement::V1\xea\x41q\n] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb deleted file mode 100644 index b9f8a419f0dc..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/cloud/securitycentermanagement/v1/security_center_management.rb +++ /dev/null @@ -1,1334 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Represents a particular Security Command Center service. This includes - # settings information such as top-level enablement in addition to individual - # module settings. Service settings can be configured at the organization, - # folder, or project level. Service settings at the organization or folder - # level are inherited by those in descendant folders and projects. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the service, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}/securityCenterServices/{service}` - # * `folders/{folder}/locations/{location}/securityCenterServices/{service}` - # * `projects/{project}/locations/{location}/securityCenterServices/{service}` - # - # The following values are valid for `{service}`: - # - # * `container-threat-detection` - # * `event-threat-detection` - # * `security-health-analytics` - # * `vm-threat-detection` - # * `web-security-scanner` - # @!attribute [rw] intended_enablement_state - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::EnablementState] - # Optional. The intended enablement state for the service at its level of the - # resource hierarchy. A `DISABLED` state will override all module enablement - # states to `DISABLED`. - # @!attribute [r] effective_enablement_state - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::EnablementState] - # Output only. The effective enablement state for the service at its level of - # the resource hierarchy. If the intended state is set to `INHERITED`, the - # effective state will be inherited from the enablement state of an ancestor. - # This state may differ from the intended enablement state due to billing - # eligibility or onboarding status. - # @!attribute [rw] modules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::ModuleSettings}] - # Optional. The module configurations, including the enablement state for the - # service's modules. The absence of a module in the map implies that its - # configuration is inherited from its parents. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the service was last updated. This could be due to an - # explicit user update or due to a side effect of another system change, such - # as billing subscription expiry. - # @!attribute [rw] service_config - # @return [::Google::Protobuf::Struct] - # Optional. Additional service-specific configuration. Not all services will - # utilize this field. - class SecurityCenterService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The settings for individual modules. - # @!attribute [rw] intended_enablement_state - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::EnablementState] - # Optional. The intended enablement state for the module at its level of - # the resource hierarchy. - # @!attribute [r] effective_enablement_state - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::EnablementState] - # Output only. The effective enablement state for the module at its level - # of the resource hierarchy. If the intended state is set to `INHERITED`, - # the effective state will be inherited from the enablement state of an - # ancestor. This state may differ from the intended enablement state due to - # billing eligibility or onboarding status. - class ModuleSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService::ModuleSettings] - class ModulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the possible enablement states for a service or module. - module EnablementState - # Default value. This value is unused. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # State is inherited from the parent resource. Valid as an intended - # enablement state, but not as an effective enablement state. - INHERITED = 1 - - # State is enabled. - ENABLED = 2 - - # State is disabled. - DISABLED = 3 - - # Security Command Center is configured to ingest findings from this - # service, but not to enable this service. This state indicates that - # Security Command Center is misconfigured. You can't set this state - # yourself. - INGEST_ONLY = 4 - end - end - - # The representation of a Security Health Analytics custom module at a - # specified level of the resource hierarchy: organization, folder, or project. - # If a custom module is inherited from an ancestor organization or folder, then - # the enablement state is set to the value that is effective in the parent, not - # to `INHERITED`. For example, if the module is enabled in an organization or - # folder, then the effective enablement state for the module is `ENABLED` in - # all descendant folders or projects. - # @!attribute [rw] name - # @return [::String] - # Identifier. The full resource name of the custom module, in one of the - # following formats: - # - # * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - # * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - # * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - # @!attribute [r] custom_config - # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig] - # Output only. The user-specified configuration for the module. - # @!attribute [r] enablement_state - # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule::EnablementState] - # Output only. The effective enablement state for the module at the given - # level of the hierarchy. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name for the custom module. The name must be - # between 1 and 128 characters, start with a lowercase letter, and contain - # alphanumeric characters or underscores only. - class EffectiveSecurityHealthAnalyticsCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The enablement state of the module. - module EnablementState - # Default value. This value is unused. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given level. - ENABLED = 1 - - # The module is disabled at the given level. - DISABLED = 2 - end - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_security_health_analytics_custom_modules SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules}. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list effective custom modules, in one of the - # following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_security_health_analytics_custom_modules SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules}. - # @!attribute [rw] effective_security_health_analytics_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule>] - # The list of effective Security Health Analytics custom modules. - # @!attribute [rw] next_page_token - # @return [::String] - # A pagination token. To retrieve the next page of results, call the method - # again with this token. - class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_security_health_analytics_custom_module SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule}. - # @!attribute [rw] name - # @return [::String] - # Required. The full resource name of the custom module, specified in one of - # the following formats: - # - # * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - # * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - # * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an instance of a Security Health Analytics custom module, - # including its full module name, display name, enablement state, and last - # updated time. You can create a custom module at the organization, folder, or - # project level. Custom modules that you create at the organization or folder - # level are inherited by the descendant folders and projects. - # @!attribute [rw] name - # @return [::String] - # Identifier. The full resource name of the custom module, in one of the - # following formats: - # - # * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. The display name of the Security Health Analytics custom module. - # This display name becomes the finding category for all findings that are - # returned by this custom module. The display name must be between 1 and 128 - # characters, start with a lowercase letter, and contain alphanumeric - # characters or underscores only. - # @!attribute [rw] enablement_state - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule::EnablementState] - # Optional. The enablement state of the custom module. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the custom module was last updated. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The editor that last updated the custom module. - # @!attribute [r] ancestor_module - # @return [::String] - # Output only. Specifies the organization or folder from which the custom - # module is inherited. If empty, indicates that the custom module was created - # in the organization, folder, or project in which you are viewing the custom - # module. - # @!attribute [rw] custom_config - # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig] - # Optional. The user-specified custom configuration for the module. - class SecurityHealthAnalyticsCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible enablement states of a custom module. - module EnablementState - # Default value. This value is unused. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given organization, folder, or project. - ENABLED = 1 - - # The module is disabled at the given organization, folder, or project. - DISABLED = 2 - - # State is inherited from an ancestor module. The module will either - # be effectively `ENABLED` or `DISABLED` based on its closest non-inherited - # ancestor module in the resource hierarchy. If you try to set a top-level - # module (a module with no parent) to the `INHERITED` state, you receive an - # `INVALID_ARGUMENT` error. - INHERITED = 3 - end - end - - # Defines the properties in a custom module configuration for Security - # Health Analytics. Use the custom module configuration to create custom - # detectors that generate custom findings for resources that you specify. - # @!attribute [rw] predicate - # @return [::Google::Type::Expr] - # Optional. The Common Expression Language (CEL) expression to evaluate to - # produce findings. When the expression evaluates to `true` against a - # resource, a finding is generated. - # @!attribute [rw] custom_output - # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig::CustomOutputSpec] - # Optional. Custom output properties. - # @!attribute [rw] resource_selector - # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig::ResourceSelector] - # Optional. The Cloud Asset Inventory resource types that the custom module - # operates on. For information about resource types, see [Supported asset - # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - # Each custom module can specify up to 5 resource types. - # @!attribute [rw] severity - # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig::Severity] - # Optional. The severity to assign to findings generated by the module. - # @!attribute [rw] description - # @return [::String] - # Optional. Text that describes the vulnerability or misconfiguration that - # the custom module detects. This explanation is returned with each finding - # instance to help investigators understand the detected issue. The text must - # be enclosed in quotation marks. - # @!attribute [rw] recommendation - # @return [::String] - # Optional. An explanation of the recommended steps that security teams can - # take to resolve the detected issue. This explanation is returned with each - # finding generated by this module. - class CustomConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A set of optional name-value pairs that define custom source properties to - # return with each finding that is generated by the custom module. The custom - # source properties that are defined here are included in the finding. - # @!attribute [rw] properties - # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::CustomConfig::CustomOutputSpec::Property>] - # Optional. A list of custom output properties to add to the finding. - class CustomOutputSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An individual name-value pair that defines a custom source property. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the property for the custom output. - # @!attribute [rw] value_expression - # @return [::Google::Type::Expr] - # Optional. The CEL expression for the custom output. A resource property - # can be specified to return the value of the property or a text string - # enclosed in quotation marks. - class Property - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Resource for selecting resource type. - # @!attribute [rw] resource_types - # @return [::Array<::String>] - # Optional. The resource types to run the detector on. - class ResourceSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the valid value options for the severity of a finding. - module Severity - # Default value. This value is unused. - SEVERITY_UNSPECIFIED = 0 - - # Critical severity. - CRITICAL = 1 - - # High severity. - HIGH = 2 - - # Medium severity. - MEDIUM = 3 - - # Low severity. - LOW = 4 - end - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_health_analytics_custom_modules SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules}. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent organization, folder, or project in which to - # list custom modules, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - class ListSecurityHealthAnalyticsCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_health_analytics_custom_modules SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules}. - # @!attribute [rw] security_health_analytics_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] - # The list of Security Health Analytics custom modules. - # @!attribute [rw] next_page_token - # @return [::String] - # A pagination token. To retrieve the next page of results, call the method - # again with this token. - class ListSecurityHealthAnalyticsCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_security_health_analytics_custom_modules SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules}. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent organization, folder, or project in which to - # list custom modules, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - class ListDescendantSecurityHealthAnalyticsCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_security_health_analytics_custom_modules SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules}. - # @!attribute [rw] security_health_analytics_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule>] - # The list of SecurityHealthAnalyticsCustomModules - # @!attribute [rw] next_page_token - # @return [::String] - # A pagination token. To retrieve the next page of results, call the method - # again with this token. - class ListDescendantSecurityHealthAnalyticsCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_health_analytics_custom_module SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource, in the format - # `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. - class GetSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_security_health_analytics_custom_module SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule}. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the parent organization, folder, or project of the - # module, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @!attribute [rw] security_health_analytics_custom_module - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # Required. The resource being created. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be created. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to create the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - class CreateSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_health_analytics_custom_module SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule}. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The fields to update. The following values are valid: - # - # * `custom_config` - # * `enablement_state` - # - # If you omit this field or set it to the wildcard value `*`, then all - # eligible fields are updated. - # @!attribute [rw] security_health_analytics_custom_module - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule] - # Required. The resource being updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be updated. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to update the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - class UpdateSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_security_health_analytics_custom_module SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the SHA custom module, in one of the - # following formats: - # - # * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be deleted. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to delete the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during deletion of the module - # - # Defaults to `false`. - class DeleteSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#simulate_security_health_analytics_custom_module SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule}. - # The maximum size of the request is 4 MiB. - # @!attribute [rw] parent - # @return [::String] - # Required. The relative resource name of the organization, project, or - # folder. For more information about relative resource names, see [AIP-122: - # Resource names](https://google.aip.dev/122). Example: - # `organizations/{organization_id}`. - # @!attribute [rw] custom_config - # @return [::Google::Cloud::SecurityCenterManagement::V1::CustomConfig] - # Required. The custom configuration that you need to test. - # @!attribute [rw] resource - # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource] - # Required. Resource data to simulate custom module against. - class SimulateSecurityHealthAnalyticsCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Manually constructed information about a resource. - # @!attribute [rw] resource_type - # @return [::String] - # Required. The type of the resource. For example, - # `compute.googleapis.com/Disk`. - # @!attribute [rw] resource_data - # @return [::Google::Protobuf::Struct] - # Optional. A representation of the Google Cloud resource. Should match the - # Google Cloud resource JSON format. - # - # If the custom module evaluates only the IAM allow policy, then you can - # omit this field. - # @!attribute [rw] iam_policy_data - # @return [::Google::Iam::V1::Policy] - # Optional. A representation of the IAM allow policy. - # - # If the custom module evaluates only the resource data, then you can omit - # this field. - class SimulatedResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The minimum set of fields needed to represent a simulated finding from a - # Security Health Analytics custom module. - # @!attribute [rw] name - # @return [::String] - # Identifier. The [relative resource name](https://google.aip.dev/122) of the - # finding, in one of the following formats: - # - # * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # * `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # @!attribute [rw] parent - # @return [::String] - # The [relative resource name](https://google.aip.dev/122) of the source the - # finding belongs to. For example, - # `organizations/{organization_id}/sources/{source_id}`. This field is - # immutable after creation time. - # @!attribute [rw] resource_name - # @return [::String] - # For findings on Google Cloud resources, the - # [full resource name](https://google.aip.dev/122#full-resource-names) of the - # Google Cloud resource this finding is for. When the finding is for a - # non-Google Cloud resource, the value can be a customer or partner defined - # string. This field is immutable after creation time. - # @!attribute [rw] category - # @return [::String] - # The additional taxonomy group within findings from a given source. For - # example, `XSS_FLASH_INJECTION`. This field is immutable after creation - # time. - # @!attribute [r] state - # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulatedFinding::State] - # Output only. The state of the finding. - # @!attribute [rw] source_properties - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Source-specific properties. These properties are managed by the source - # that writes the finding. The key names must be between 1 and 255 - # characters; they must start with a letter and contain alphanumeric - # characters or underscores only. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # The time the finding was first detected. If an existing finding is updated, - # then this is the time the update occurred. If the finding is later - # resolved, then this time reflects when the finding was resolved. - # - # For example, if the finding represents an open firewall, this property - # captures the time the detector believes the firewall became open. The - # accuracy is determined by the detector. - # - # The event time must not be set to a value greater than the current - # timestamp. - # @!attribute [rw] severity - # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulatedFinding::Severity] - # The severity of the finding. This field is managed by the source that - # writes the finding. - # @!attribute [rw] finding_class - # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulatedFinding::FindingClass] - # The class of the finding. - class SimulatedFinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class SourcePropertiesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of the finding. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The finding requires attention and has not been addressed yet. - ACTIVE = 1 - - # The finding has been fixed, triaged as a non-issue, or otherwise - # addressed and is no longer active. - INACTIVE = 2 - end - - # The severity of the finding. - module Severity - # Default value. This value is unused. - SEVERITY_UNSPECIFIED = 0 - - # For vulnerabilities: A critical vulnerability is easily discoverable by - # an external actor, exploitable, and results in the direct ability to - # execute arbitrary code, exfiltrate data, and otherwise gain additional - # access and privileges to cloud resources and workloads. Examples include - # publicly accessible unprotected user data and public SSH access with weak - # or no passwords. - # - # For threats: Indicates a threat that is able to access, modify, or delete - # data or execute unauthorized code within existing resources. - CRITICAL = 1 - - # For vulnerabilities: A high-risk vulnerability can be easily discovered - # and exploited in combination with other vulnerabilities in order to gain - # direct access and the ability to execute arbitrary code, exfiltrate data, - # and otherwise gain additional access and privileges to cloud resources - # and workloads. An example is a database with weak or no passwords that is - # only accessible internally. This database could easily be compromised by - # an actor that had access to the internal network. - # - # For threats: Indicates a threat that is able to create new computational - # resources in an environment but not able to access data or execute code - # in existing resources. - HIGH = 2 - - # For vulnerabilities: A medium-risk vulnerability could be used by an - # actor to gain access to resources or privileges that enable them to - # eventually (through multiple steps or a complex exploit) gain access and - # the ability to execute arbitrary code or exfiltrate data. An example is a - # service account with access to more projects than it should have. If an - # actor gains access to the service account, they could potentially use - # that access to manipulate a project the service account was not intended - # to. - # - # For threats: Indicates a threat that is able to cause operational impact - # but may not access data or execute unauthorized code. - MEDIUM = 3 - - # For vulnerabilities: A low-risk vulnerability hampers a security - # organization's ability to detect vulnerabilities or active threats in - # their deployment, or prevents the root cause investigation of security - # issues. An example is monitoring and logs being disabled for resource - # configurations and access. - # - # For threats: Indicates a threat that has obtained minimal access to an - # environment but is not able to access data, execute code, or create - # resources. - LOW = 4 - end - - # Represents what kind of finding it is. - module FindingClass - # Default value. This value is unused. - FINDING_CLASS_UNSPECIFIED = 0 - - # Describes unwanted or malicious activity. - THREAT = 1 - - # Describes a potential weakness in software that increases risk to - # confidentiality, integrity, and availability. - VULNERABILITY = 2 - - # Describes a potential weakness in cloud resource or asset configuration - # that increases risk. - MISCONFIGURATION = 3 - - # Describes a security observation that is for informational purposes. - OBSERVATION = 4 - - # Describes an error that prevents Security Command Center from working - # correctly. - SCC_ERROR = 5 - - # Describes a potential security risk due to a change in the security - # posture. - POSTURE_VIOLATION = 6 - - # Describes a combination of security issues that represent a more severe - # security problem when taken together. - TOXIC_COMBINATION = 7 - end - end - - # Response message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#simulate_security_health_analytics_custom_module SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule}. - # @!attribute [rw] result - # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse::SimulatedResult] - # Result for test case in the corresponding request. - class SimulateSecurityHealthAnalyticsCustomModuleResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible test result. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenterManagement::V1::SimulatedFinding] - # Finding that would be published for the test case if a violation is - # detected. - # - # Note: The following fields are mutually exclusive: `finding`, `no_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] no_violation - # @return [::Google::Protobuf::Empty] - # Indicates that the test case does not trigger any violation. - # - # Note: The following fields are mutually exclusive: `no_violation`, `finding`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Error encountered during the test. - # - # Note: The following fields are mutually exclusive: `error`, `finding`, `no_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SimulatedResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The representation of an - # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule EventThreatDetectionCustomModule} - # at a given level, taking hierarchy into account and resolving various fields - # accordingly. For example, if the module is enabled at the ancestor level, - # then effective modules at all descendant levels will have their enablement - # state set to `ENABLED`. Similarly, if `module.inherited` is set, then the - # effective module's configuration will reflect the ancestor's configuration. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the Event Threat Detection custom module, - # in one of the following formats: - # - # * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - # @!attribute [r] config - # @return [::Google::Protobuf::Struct] - # Output only. Configuration for the effective module. - # @!attribute [r] enablement_state - # @return [::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule::EnablementState] - # Output only. The effective state of enablement for the module at the given - # level of the hierarchy. - # @!attribute [r] type - # @return [::String] - # Output only. Type for the module (for example, `CONFIGURABLE_BAD_IP`). - # @!attribute [r] display_name - # @return [::String] - # Output only. The human-readable name of the module. - # @!attribute [r] description - # @return [::String] - # Output only. A description of the module. - class EffectiveEventThreatDetectionCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The enablement state of the module. - module EnablementState - # Default value. This value is unused. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given level. - ENABLED = 1 - - # The module is disabled at the given level. - DISABLED = 2 - end - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_event_threat_detection_custom_modules SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules}. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list effective custom modules, in one of the - # following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - class ListEffectiveEventThreatDetectionCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_event_threat_detection_custom_modules SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules}. - # @!attribute [rw] effective_event_threat_detection_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule>] - # The list of effective Event Threat Detection custom modules. - # @!attribute [rw] next_page_token - # @return [::String] - # A pagination token. To retrieve the next page of results, call the method - # again with this token. - class ListEffectiveEventThreatDetectionCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_event_threat_detection_custom_module SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Event Threat Detection custom module, in - # one of the following formats: - # - # * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - class GetEffectiveEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Security Command Center resource that contains the configuration and - # enablement state of a custom module, which enables Event Threat Detection to - # write certain findings to Security Command Center. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the Event Threat Detection custom module, - # in one of the following formats: - # - # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # @!attribute [rw] config - # @return [::Google::Protobuf::Struct] - # Optional. Configuration for the module. For the resident module, its - # configuration value is defined at this level. For the inherited module, its - # configuration value is inherited from the ancestor module. - # @!attribute [r] ancestor_module - # @return [::String] - # Output only. The closest ancestor module that this module inherits the - # enablement state from. If empty, indicates that the custom module was - # created in the requesting parent organization, folder, or project. The - # format is the same as the custom module's resource name. - # @!attribute [rw] enablement_state - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule::EnablementState] - # Optional. The state of enablement for the module at the given level of the - # hierarchy. - # @!attribute [rw] type - # @return [::String] - # Optional. Type for the module. For example, `CONFIGURABLE_BAD_IP`. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The human-readable name of the module. - # @!attribute [rw] description - # @return [::String] - # Optional. A description of the module. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the module was last updated. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The editor the module was last updated by. - class EventThreatDetectionCustomModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The enablement state of the module. - module EnablementState - # Unspecified enablement state. - ENABLEMENT_STATE_UNSPECIFIED = 0 - - # The module is enabled at the given level. - ENABLED = 1 - - # The module is disabled at the given level. - DISABLED = 2 - - # State is inherited from an ancestor module. The module will either be - # effectively `ENABLED` or `DISABLED` based on its closest non-inherited - # ancestor module in the CRM hierarchy. If you try to set a top-level - # module (a module with no parent) to the `INHERITED` state, you receive an - # `INVALID_ARGUMENT` error. - INHERITED = 3 - end - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_event_threat_detection_custom_modules SecurityCenterManagement.ListEventThreatDetectionCustomModules}. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list custom modules, in one of the following - # formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of modules to return. The service may return - # fewer than this value. If unspecified, at most 10 modules will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - class ListEventThreatDetectionCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_event_threat_detection_custom_modules SecurityCenterManagement.ListEventThreatDetectionCustomModules}. - # @!attribute [rw] event_threat_detection_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] - # The list of custom modules. - # @!attribute [rw] next_page_token - # @return [::String] - # A pagination token. To retrieve the next page of results, call the method - # again with this token. - class ListEventThreatDetectionCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_event_threat_detection_custom_modules SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules}. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list custom modules, in one of the following - # formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of modules to return. The service may return - # fewer than this value. If unspecified, at most 10 configs will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - class ListDescendantEventThreatDetectionCustomModulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_event_threat_detection_custom_modules SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules}. - # @!attribute [rw] event_threat_detection_custom_modules - # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule>] - # The list of custom modules. - # @!attribute [rw] next_page_token - # @return [::String] - # A pagination token. To retrieve the next page of results, call the method - # again with this token. - class ListDescendantEventThreatDetectionCustomModulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_event_threat_detection_custom_module SecurityCenterManagement.GetEventThreatDetectionCustomModule}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Event Threat Detection custom module, in - # one of the following formats: - # - # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - class GetEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_event_threat_detection_custom_module SecurityCenterManagement.CreateEventThreatDetectionCustomModule}. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent for the module, in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @!attribute [rw] event_threat_detection_custom_module - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # Required. The module to create. The - # {::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule#name EventThreatDetectionCustomModule.name} - # field is ignored; Security Command Center generates the name. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be created. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to create the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - class CreateEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a EventThreatDetectionCustomModule - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The fields to update. If omitted, then all fields are updated. - # @!attribute [rw] event_threat_detection_custom_module - # @return [::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule] - # Required. The module being updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be updated. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to update the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - class UpdateEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_event_threat_detection_custom_module SecurityCenterManagement.DeleteEventThreatDetectionCustomModule}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Event Threat Detection custom module, in - # one of the following formats: - # - # * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no module will be deleted. An `OK` response indicates that the - # request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to delete the module could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during creation of the module - # - # Defaults to `false`. - class DeleteEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#validate_event_threat_detection_custom_module SecurityCenterManagement.ValidateEventThreatDetectionCustomModule}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent to validate the custom modules under, - # in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # @!attribute [rw] raw_text - # @return [::String] - # Required. The raw text of the module's contents. Used to generate error - # messages. - # @!attribute [rw] type - # @return [::String] - # Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. - class ValidateEventThreatDetectionCustomModuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#validate_event_threat_detection_custom_module SecurityCenterManagement.ValidateEventThreatDetectionCustomModule}. - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse::CustomModuleValidationError>] - # A list of errors returned by the validator. If the list is empty, there - # were no errors. - class ValidateEventThreatDetectionCustomModuleResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An error encountered while validating the uploaded configuration of an - # Event Threat Detection custom module. - # @!attribute [rw] description - # @return [::String] - # A human-readable description of the error. - # @!attribute [rw] field_path - # @return [::String] - # The path, in [RFC 6901: JSON - # Pointer](https://datatracker.ietf.org/doc/html/rfc6901) format, to the - # field that failed validation. Omitted if no specific field is affected. - # @!attribute [rw] start - # @return [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse::Position] - # The initial position of the error in the uploaded text version of the - # module. Omitted if no specific position applies, or if the position could - # not be computed. - # @!attribute [rw] end - # @return [::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse::Position] - # The end position of the error in the uploaded text version of the module. - # Omitted if no specific position applies, or if the position could not be - # computed. - class CustomModuleValidationError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A position in the uploaded text version of a module. - # @!attribute [rw] line_number - # @return [::Integer] - # The line position in the text. - # @!attribute [rw] column_number - # @return [::Integer] - # The column position in the line. - class Position - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_center_service SecurityCenterManagement.GetSecurityCenterService}. - # @!attribute [rw] name - # @return [::String] - # Required. The Security Command Center service to retrieve, in one of the - # following formats: - # - # * organizations/\\{organization}/locations/\\{location}/securityCenterServices/\\{service} - # * folders/\\{folder}/locations/\\{location}/securityCenterServices/\\{service} - # * projects/\\{project}/locations/\\{location}/securityCenterServices/\\{service} - # - # The following values are valid for `{service}`: - # - # * `container-threat-detection` - # * `event-threat-detection` - # * `security-health-analytics` - # * `vm-threat-detection` - # * `web-security-scanner` - # @!attribute [rw] show_eligible_modules_only - # @return [::Boolean] - # Set to `true` to show only modules that are in scope. By default, all - # modules are shown. - class GetSecurityCenterServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_center_services SecurityCenterManagement.ListSecurityCenterServices}. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the parent to list Security Command Center services, - # in one of the following formats: - # - # * `organizations/{organization}/locations/{location}` - # * `folders/{folder}/locations/{location}` - # * `projects/{project}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return in a single response. - # Default is 10, minimum is 1, maximum is 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A pagination token returned from a previous request. Provide this - # token to retrieve the next page of results. - # - # When paginating, the rest of the request must match the request that - # generated the page token. - # @!attribute [rw] show_eligible_modules_only - # @return [::Boolean] - # Flag that, when set, is used to filter the module settings that are shown. - # The default setting is that all modules are shown. - class ListSecurityCenterServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_center_services SecurityCenterManagement.ListSecurityCenterServices}. - # @!attribute [rw] security_center_services - # @return [::Array<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>] - # The list of services. - # @!attribute [rw] next_page_token - # @return [::String] - # A pagination token. To retrieve the next page of results, call the method - # again with this token. - class ListSecurityCenterServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_center_service SecurityCenterManagement.UpdateSecurityCenterService}. - # @!attribute [rw] security_center_service - # @return [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService] - # Required. The updated service. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The fields to update. Accepts the following values: - # - # * `intended_enablement_state` - # * `modules` - # - # If omitted, then all eligible fields are updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. When set to `true`, the request will be validated (including IAM - # checks), but no service will be updated. An `OK` response indicates that - # the request is valid, while an error response indicates that the request is - # invalid. - # - # If the request is valid, a subsequent request to update the service could - # still fail for one of the following reasons: - # - # * The state of your cloud resources changed; for example, you lost a - # required IAM permission - # * An error occurred during update of the service - # - # Defaults to `false`. - class UpdateSecurityCenterServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/Gemfile deleted file mode 100644 index 48ea53e31c30..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-security_center_management-v1", path: "../" -else - gem "google-cloud-security_center_management-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_event_threat_detection_custom_module.rb deleted file mode 100644 index 1af62ea87528..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the create_event_threat_detection_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_event_threat_detection_custom_module. -# -def create_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new - - # Call the create_event_threat_detection_custom_module method. - result = client.create_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_security_health_analytics_custom_module.rb deleted file mode 100644 index 345362f5da41..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/create_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the create_security_health_analytics_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_security_health_analytics_custom_module. -# -def create_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the create_security_health_analytics_custom_module method. - result = client.create_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.rb deleted file mode 100644 index 1a1782aec5de..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_event_threat_detection_custom_module. -# -def delete_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new - - # Call the delete_event_threat_detection_custom_module method. - result = client.delete_event_threat_detection_custom_module request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.rb deleted file mode 100644 index 7c265ee8e5ba..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/delete_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_security_health_analytics_custom_module. -# -def delete_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the delete_security_health_analytics_custom_module method. - result = client.delete_security_health_analytics_custom_module request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.rb deleted file mode 100644 index 9dfd40d071fc..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_event_threat_detection_custom_module. -# -def get_effective_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new - - # Call the get_effective_event_threat_detection_custom_module method. - result = client.get_effective_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.rb deleted file mode 100644 index 6fe48aa1f67b..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_effective_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_security_health_analytics_custom_module. -# -def get_effective_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the get_effective_security_health_analytics_custom_module method. - result = client.get_effective_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_event_threat_detection_custom_module.rb deleted file mode 100644 index e772e63bd4e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the get_event_threat_detection_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_event_threat_detection_custom_module. -# -def get_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new - - # Call the get_event_threat_detection_custom_module method. - result = client.get_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_center_service.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_center_service.rb deleted file mode 100644 index 6034fcfea4db..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_center_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the get_security_center_service call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_center_service. -# -def get_security_center_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new - - # Call the get_security_center_service method. - result = client.get_security_center_service request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_health_analytics_custom_module.rb deleted file mode 100644 index bb916a20de63..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/get_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the get_security_health_analytics_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_health_analytics_custom_module. -# -def get_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the get_security_health_analytics_custom_module method. - result = client.get_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.rb deleted file mode 100644 index f36375df2816..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_event_threat_detection_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_event_threat_detection_custom_modules. -# -def list_descendant_event_threat_detection_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new - - # Call the list_descendant_event_threat_detection_custom_modules method. - result = client.list_descendant_event_threat_detection_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - p item - end -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.rb deleted file mode 100644 index 7cfa0c972603..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_descendant_security_health_analytics_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_security_health_analytics_custom_modules. -# -def list_descendant_security_health_analytics_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new - - # Call the list_descendant_security_health_analytics_custom_modules method. - result = client.list_descendant_security_health_analytics_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - p item - end -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.rb deleted file mode 100644 index 4c7f69640d8a..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_event_threat_detection_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_event_threat_detection_custom_modules. -# -def list_effective_event_threat_detection_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new - - # Call the list_effective_event_threat_detection_custom_modules method. - result = client.list_effective_event_threat_detection_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule. - p item - end -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.rb deleted file mode 100644 index 28d70b7bc51f..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_effective_security_health_analytics_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_security_health_analytics_custom_modules. -# -def list_effective_security_health_analytics_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new - - # Call the list_effective_security_health_analytics_custom_modules method. - result = client.list_effective_security_health_analytics_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule. - p item - end -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.rb deleted file mode 100644 index fc62f7c99e51..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_event_threat_detection_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_event_threat_detection_custom_modules. -# -def list_event_threat_detection_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new - - # Call the list_event_threat_detection_custom_modules method. - result = client.list_event_threat_detection_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - p item - end -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_center_services.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_center_services.rb deleted file mode 100644 index 3c2cc1f945c6..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_center_services.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the list_security_center_services call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_center_services. -# -def list_security_center_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new - - # Call the list_security_center_services method. - result = client.list_security_center_services request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. - p item - end -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.rb deleted file mode 100644 index 38701f9cc760..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/list_security_health_analytics_custom_modules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_health_analytics_custom_modules. -# -def list_security_health_analytics_custom_modules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new - - # Call the list_security_health_analytics_custom_modules method. - result = client.list_security_health_analytics_custom_modules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - p item - end -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.rb deleted file mode 100644 index a87f00cd27b9..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/simulate_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#simulate_security_health_analytics_custom_module. -# -def simulate_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the simulate_security_health_analytics_custom_module method. - result = client.simulate_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_event_threat_detection_custom_module.rb deleted file mode 100644 index 3551bb287965..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the update_event_threat_detection_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_event_threat_detection_custom_module. -# -def update_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new - - # Call the update_event_threat_detection_custom_module method. - result = client.update_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_center_service.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_center_service.rb deleted file mode 100644 index 4abb4dcae4a3..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_center_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the update_security_center_service call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_center_service. -# -def update_security_center_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new - - # Call the update_security_center_service method. - result = client.update_security_center_service request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_health_analytics_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_health_analytics_custom_module.rb deleted file mode 100644 index 7aef0a715144..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/update_security_health_analytics_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the update_security_health_analytics_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_health_analytics_custom_module. -# -def update_security_health_analytics_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new - - # Call the update_security_health_analytics_custom_module method. - result = client.update_security_health_analytics_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.rb b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.rb deleted file mode 100644 index 4fd089b6c7d4..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/security_center_management/validate_event_threat_detection_custom_module.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_sync] -require "google/cloud/security_center_management/v1" - -## -# Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenterManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#validate_event_threat_detection_custom_module. -# -def validate_event_threat_detection_custom_module - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new - - # Call the validate_event_threat_detection_custom_module method. - result = client.validate_event_threat_detection_custom_module request - - # The returned object is of type Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse. - p result -end -# [END securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_sync] diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/snippet_metadata_google.cloud.securitycentermanagement.v1.json b/owl-bot-staging/google-cloud-security_center_management-v1/snippets/snippet_metadata_google.cloud.securitycentermanagement.v1.json deleted file mode 100644 index 1f027b6d1787..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/snippets/snippet_metadata_google.cloud.securitycentermanagement.v1.json +++ /dev/null @@ -1,855 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-security_center_management-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.securitycentermanagement.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_sync", - "title": "Snippet for the list_effective_security_health_analytics_custom_modules call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_security_health_analytics_custom_modules.", - "file": "security_center_management/list_effective_security_health_analytics_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_effective_security_health_analytics_custom_modules", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_security_health_analytics_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "ListEffectiveSecurityHealthAnalyticsCustomModules", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the get_effective_security_health_analytics_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_security_health_analytics_custom_module.", - "file": "security_center_management/get_effective_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_effective_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "GetEffectiveSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_sync", - "title": "Snippet for the list_security_health_analytics_custom_modules call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_health_analytics_custom_modules.", - "file": "security_center_management/list_security_health_analytics_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_security_health_analytics_custom_modules", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_health_analytics_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "ListSecurityHealthAnalyticsCustomModules", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_sync", - "title": "Snippet for the list_descendant_security_health_analytics_custom_modules call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_security_health_analytics_custom_modules.", - "file": "security_center_management/list_descendant_security_health_analytics_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_descendant_security_health_analytics_custom_modules", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_security_health_analytics_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "ListDescendantSecurityHealthAnalyticsCustomModules", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the get_security_health_analytics_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_health_analytics_custom_module.", - "file": "security_center_management/get_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "GetSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the create_security_health_analytics_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_security_health_analytics_custom_module.", - "file": "security_center_management/create_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "CreateSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the update_security_health_analytics_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_health_analytics_custom_module.", - "file": "security_center_management/update_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "UpdateSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the delete_security_health_analytics_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_security_health_analytics_custom_module.", - "file": "security_center_management/delete_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "DeleteSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_sync", - "title": "Snippet for the simulate_security_health_analytics_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#simulate_security_health_analytics_custom_module.", - "file": "security_center_management/simulate_security_health_analytics_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "simulate_security_health_analytics_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#simulate_security_health_analytics_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "SimulateSecurityHealthAnalyticsCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_sync", - "title": "Snippet for the list_effective_event_threat_detection_custom_modules call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_event_threat_detection_custom_modules.", - "file": "security_center_management/list_effective_event_threat_detection_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_effective_event_threat_detection_custom_modules", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_effective_event_threat_detection_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "ListEffectiveEventThreatDetectionCustomModules", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_sync", - "title": "Snippet for the get_effective_event_threat_detection_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_event_threat_detection_custom_module.", - "file": "security_center_management/get_effective_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_effective_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_effective_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "GetEffectiveEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_sync", - "title": "Snippet for the list_event_threat_detection_custom_modules call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_event_threat_detection_custom_modules.", - "file": "security_center_management/list_event_threat_detection_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_event_threat_detection_custom_modules", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_event_threat_detection_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "ListEventThreatDetectionCustomModules", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_sync", - "title": "Snippet for the list_descendant_event_threat_detection_custom_modules call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_event_threat_detection_custom_modules.", - "file": "security_center_management/list_descendant_event_threat_detection_custom_modules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_descendant_event_threat_detection_custom_modules", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_descendant_event_threat_detection_custom_modules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "ListDescendantEventThreatDetectionCustomModules", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_sync", - "title": "Snippet for the get_event_threat_detection_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_event_threat_detection_custom_module.", - "file": "security_center_management/get_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "GetEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_sync", - "title": "Snippet for the create_event_threat_detection_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_event_threat_detection_custom_module.", - "file": "security_center_management/create_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#create_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "CreateEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_sync", - "title": "Snippet for the update_event_threat_detection_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_event_threat_detection_custom_module.", - "file": "security_center_management/update_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "UpdateEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_sync", - "title": "Snippet for the delete_event_threat_detection_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_event_threat_detection_custom_module.", - "file": "security_center_management/delete_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#delete_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "DeleteEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_sync", - "title": "Snippet for the validate_event_threat_detection_custom_module call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#validate_event_threat_detection_custom_module.", - "file": "security_center_management/validate_event_threat_detection_custom_module.rb", - "language": "RUBY", - "client_method": { - "short_name": "validate_event_threat_detection_custom_module", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#validate_event_threat_detection_custom_module", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "ValidateEventThreatDetectionCustomModule", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_sync", - "title": "Snippet for the get_security_center_service call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_center_service.", - "file": "security_center_management/get_security_center_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_security_center_service", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#get_security_center_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "GetSecurityCenterService", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterService", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_sync", - "title": "Snippet for the list_security_center_services call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_center_services.", - "file": "security_center_management/list_security_center_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_security_center_services", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#list_security_center_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "ListSecurityCenterServices", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_sync", - "title": "Snippet for the update_security_center_service call in the SecurityCenterManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_center_service.", - "file": "security_center_management/update_security_center_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_security_center_service", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client#update_security_center_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService", - "client": { - "short_name": "SecurityCenterManagement::Client", - "full_name": "::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client" - }, - "method": { - "short_name": "UpdateSecurityCenterService", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterService", - "service": { - "short_name": "SecurityCenterManagement", - "full_name": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_test.rb b/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_test.rb deleted file mode 100644 index 57be2bde861c..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_paths_test.rb +++ /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 "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/security_center_management/v1/security_center_management" - -class ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_effective_event_threat_detection_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.effective_event_threat_detection_custom_module_path organization: "value0", location: "value1", effective_event_threat_detection_custom_module: "value2" - assert_equal "organizations/value0/locations/value1/effectiveEventThreatDetectionCustomModules/value2", path - - path = client.effective_event_threat_detection_custom_module_path project: "value0", location: "value1", effective_event_threat_detection_custom_module: "value2" - assert_equal "projects/value0/locations/value1/effectiveEventThreatDetectionCustomModules/value2", path - - path = client.effective_event_threat_detection_custom_module_path folder: "value0", location: "value1", effective_event_threat_detection_custom_module: "value2" - assert_equal "folders/value0/locations/value1/effectiveEventThreatDetectionCustomModules/value2", path - end - end - - def test_effective_security_health_analytics_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.effective_security_health_analytics_custom_module_path organization: "value0", location: "value1", effective_security_health_analytics_custom_module: "value2" - assert_equal "organizations/value0/locations/value1/effectiveSecurityHealthAnalyticsCustomModules/value2", path - - path = client.effective_security_health_analytics_custom_module_path project: "value0", location: "value1", effective_security_health_analytics_custom_module: "value2" - assert_equal "projects/value0/locations/value1/effectiveSecurityHealthAnalyticsCustomModules/value2", path - - path = client.effective_security_health_analytics_custom_module_path folder: "value0", location: "value1", effective_security_health_analytics_custom_module: "value2" - assert_equal "folders/value0/locations/value1/effectiveSecurityHealthAnalyticsCustomModules/value2", path - end - end - - def test_event_threat_detection_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.event_threat_detection_custom_module_path organization: "value0", location: "value1", event_threat_detection_custom_module: "value2" - assert_equal "organizations/value0/locations/value1/eventThreatDetectionCustomModules/value2", path - - path = client.event_threat_detection_custom_module_path project: "value0", location: "value1", event_threat_detection_custom_module: "value2" - assert_equal "projects/value0/locations/value1/eventThreatDetectionCustomModules/value2", path - - path = client.event_threat_detection_custom_module_path folder: "value0", location: "value1", event_threat_detection_custom_module: "value2" - assert_equal "folders/value0/locations/value1/eventThreatDetectionCustomModules/value2", path - end - end - - def test_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_security_center_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.security_center_service_path project: "value0", location: "value1", service: "value2" - assert_equal "projects/value0/locations/value1/securityCenterServices/value2", path - - path = client.security_center_service_path folder: "value0", location: "value1", service: "value2" - assert_equal "folders/value0/locations/value1/securityCenterServices/value2", path - - path = client.security_center_service_path organization: "value0", location: "value1", service: "value2" - assert_equal "organizations/value0/locations/value1/securityCenterServices/value2", path - end - end - - def test_security_health_analytics_custom_module_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.security_health_analytics_custom_module_path organization: "value0", location: "value1", security_health_analytics_custom_module: "value2" - assert_equal "organizations/value0/locations/value1/securityHealthAnalyticsCustomModules/value2", path - - path = client.security_health_analytics_custom_module_path project: "value0", location: "value1", security_health_analytics_custom_module: "value2" - assert_equal "projects/value0/locations/value1/securityHealthAnalyticsCustomModules/value2", path - - path = client.security_health_analytics_custom_module_path folder: "value0", location: "value1", security_health_analytics_custom_module: "value2" - assert_equal "folders/value0/locations/value1/securityHealthAnalyticsCustomModules/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_test.rb b/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_test.rb deleted file mode 100644 index a14923da003c..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_rest_test.rb +++ /dev/null @@ -1,1265 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/securitycentermanagement/v1/security_center_management_pb" -require "google/cloud/security_center_management/v1/security_center_management/rest" - - -class ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_effective_security_health_analytics_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_effective_security_health_analytics_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_count - end - end - end - - def test_get_effective_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_get_effective_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_effective_security_health_analytics_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_effective_security_health_analytics_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_effective_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_list_security_health_analytics_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_security_health_analytics_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_count - end - end - end - - def test_list_descendant_security_health_analytics_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_descendant_security_health_analytics_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_count - end - end - end - - def test_get_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_get_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_security_health_analytics_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_security_health_analytics_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_security_health_analytics_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_create_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - security_health_analytics_custom_module = {} - validate_only = true - - create_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_create_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_update_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - security_health_analytics_custom_module = {} - validate_only = true - - update_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_update_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_security_health_analytics_custom_module({ update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_security_health_analytics_custom_module update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_security_health_analytics_custom_module({ update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_delete_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - - delete_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_delete_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_security_health_analytics_custom_module({ name: name, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_security_health_analytics_custom_module name: name, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_security_health_analytics_custom_module({ name: name, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_simulate_security_health_analytics_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - custom_config = {} - resource = {} - - simulate_security_health_analytics_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_simulate_security_health_analytics_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_count - end - end - end - - def test_list_effective_event_threat_detection_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_effective_event_threat_detection_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_effective_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_count - end - end - end - - def test_get_effective_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_get_effective_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_effective_event_threat_detection_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_effective_event_threat_detection_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_effective_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_list_event_threat_detection_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_event_threat_detection_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_count - end - end - end - - def test_list_descendant_event_threat_detection_custom_modules - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_descendant_event_threat_detection_custom_modules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_descendant_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_count - end - end - end - - def test_get_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_get_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_event_threat_detection_custom_module({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_event_threat_detection_custom_module name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_event_threat_detection_custom_module({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_create_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - event_threat_detection_custom_module = {} - validate_only = true - - create_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_create_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_update_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - event_threat_detection_custom_module = {} - validate_only = true - - update_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_update_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_event_threat_detection_custom_module({ update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_event_threat_detection_custom_module update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new(update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_event_threat_detection_custom_module({ update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new(update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_delete_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - - delete_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_delete_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_event_threat_detection_custom_module({ name: name, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_event_threat_detection_custom_module name: name, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_event_threat_detection_custom_module({ name: name, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_validate_event_threat_detection_custom_module - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - raw_text = "hello world" - type = "hello world" - - validate_event_threat_detection_custom_module_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_validate_event_threat_detection_custom_module_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, validate_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_count - end - end - end - - def test_get_security_center_service - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - show_eligible_modules_only = true - - get_security_center_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_get_security_center_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_security_center_service_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_security_center_service name: name, show_eligible_modules_only: show_eligible_modules_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_security_center_service_client_stub.call_count - end - end - end - - def test_list_security_center_services - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_eligible_modules_only = true - - list_security_center_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_list_security_center_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_security_center_services_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_security_center_services parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_security_center_services ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_security_center_services(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_security_center_services_client_stub.call_count - end - end - end - - def test_update_security_center_service - # Create test objects. - client_result = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - security_center_service = {} - update_mask = {} - validate_only = true - - update_security_center_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::ServiceStub.stub :transcode_update_security_center_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_security_center_service_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_security_center_service({ security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_security_center_service security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new(security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_security_center_service({ security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new(security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_security_center_service_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_test.rb b/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_test.rb deleted file mode 100644 index a8b7fce652a9..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/test/google/cloud/security_center_management/v1/security_center_management_test.rb +++ /dev/null @@ -1,1421 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/securitycentermanagement/v1/security_center_management_pb" -require "google/cloud/security_center_management/v1/security_center_management" - -class ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_effective_security_health_analytics_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_effective_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_effective_security_health_analytics_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_effective_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_effective_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_effective_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_effective_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_effective_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_effective_security_health_analytics_custom_modules_client_stub.call_rpc_count - end - end - - def test_get_effective_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveSecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_effective_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_effective_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_effective_security_health_analytics_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_effective_security_health_analytics_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_effective_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_effective_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_effective_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_effective_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_list_security_health_analytics_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_security_health_analytics_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_security_health_analytics_custom_modules_client_stub.call_rpc_count - end - end - - def test_list_descendant_security_health_analytics_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_descendant_security_health_analytics_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_descendant_security_health_analytics_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_descendant_security_health_analytics_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_descendant_security_health_analytics_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_descendant_security_health_analytics_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_descendant_security_health_analytics_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_descendant_security_health_analytics_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListDescendantSecurityHealthAnalyticsCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_descendant_security_health_analytics_custom_modules_client_stub.call_rpc_count - end - end - - def test_get_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_security_health_analytics_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_security_health_analytics_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_security_health_analytics_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityHealthAnalyticsCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_create_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - security_health_analytics_custom_module = {} - validate_only = true - - create_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_security_health_analytics_custom_module parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_security_health_analytics_custom_module({ parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::CreateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_update_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - security_health_analytics_custom_module = {} - validate_only = true - - update_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::SecurityHealthAnalyticsCustomModule), request["security_health_analytics_custom_module"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_security_health_analytics_custom_module({ update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_security_health_analytics_custom_module update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_security_health_analytics_custom_module({ update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityHealthAnalyticsCustomModuleRequest.new(update_mask: update_mask, security_health_analytics_custom_module: security_health_analytics_custom_module, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_delete_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - - delete_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_security_health_analytics_custom_module({ name: name, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_security_health_analytics_custom_module name: name, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_security_health_analytics_custom_module({ name: name, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::DeleteSecurityHealthAnalyticsCustomModuleRequest.new(name: name, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_simulate_security_health_analytics_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - custom_config = {} - resource = {} - - simulate_security_health_analytics_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :simulate_security_health_analytics_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::CustomConfig), request["custom_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest::SimulatedResource), request["resource"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, simulate_security_health_analytics_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.simulate_security_health_analytics_custom_module parent: parent, custom_config: custom_config, resource: resource do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.simulate_security_health_analytics_custom_module ::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.simulate_security_health_analytics_custom_module({ parent: parent, custom_config: custom_config, resource: resource }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.simulate_security_health_analytics_custom_module(::Google::Cloud::SecurityCenterManagement::V1::SimulateSecurityHealthAnalyticsCustomModuleRequest.new(parent: parent, custom_config: custom_config, resource: resource), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, simulate_security_health_analytics_custom_module_client_stub.call_rpc_count - end - end - - def test_list_effective_event_threat_detection_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_effective_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_effective_event_threat_detection_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_effective_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_effective_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_effective_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_effective_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_effective_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEffectiveEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_effective_event_threat_detection_custom_modules_client_stub.call_rpc_count - end - end - - def test_get_effective_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::EffectiveEventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_effective_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_effective_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_effective_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_effective_event_threat_detection_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_effective_event_threat_detection_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_effective_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_effective_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_effective_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEffectiveEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_effective_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_list_event_threat_detection_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_event_threat_detection_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_event_threat_detection_custom_modules_client_stub.call_rpc_count - end - end - - def test_list_descendant_event_threat_detection_custom_modules - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_descendant_event_threat_detection_custom_modules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_descendant_event_threat_detection_custom_modules, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_descendant_event_threat_detection_custom_modules_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_descendant_event_threat_detection_custom_modules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_descendant_event_threat_detection_custom_modules ::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_descendant_event_threat_detection_custom_modules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_descendant_event_threat_detection_custom_modules(::Google::Cloud::SecurityCenterManagement::V1::ListDescendantEventThreatDetectionCustomModulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_descendant_event_threat_detection_custom_modules_client_stub.call_rpc_count - end - end - - def test_get_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_event_threat_detection_custom_module({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_event_threat_detection_custom_module name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_event_threat_detection_custom_module({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::GetEventThreatDetectionCustomModuleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_create_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - event_threat_detection_custom_module = {} - validate_only = true - - create_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_event_threat_detection_custom_module parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_event_threat_detection_custom_module({ parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::CreateEventThreatDetectionCustomModuleRequest.new(parent: parent, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_update_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - event_threat_detection_custom_module = {} - validate_only = true - - update_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::EventThreatDetectionCustomModule), request["event_threat_detection_custom_module"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_event_threat_detection_custom_module({ update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_event_threat_detection_custom_module update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new(update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_event_threat_detection_custom_module({ update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::UpdateEventThreatDetectionCustomModuleRequest.new(update_mask: update_mask, event_threat_detection_custom_module: event_threat_detection_custom_module, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_delete_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - - delete_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_event_threat_detection_custom_module({ name: name, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_event_threat_detection_custom_module name: name, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_event_threat_detection_custom_module({ name: name, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::DeleteEventThreatDetectionCustomModuleRequest.new(name: name, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_validate_event_threat_detection_custom_module - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - raw_text = "hello world" - type = "hello world" - - validate_event_threat_detection_custom_module_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :validate_event_threat_detection_custom_module, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["raw_text"] - assert_equal "hello world", request["type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, validate_event_threat_detection_custom_module_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.validate_event_threat_detection_custom_module parent: parent, raw_text: raw_text, type: type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.validate_event_threat_detection_custom_module ::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.validate_event_threat_detection_custom_module({ parent: parent, raw_text: raw_text, type: type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.validate_event_threat_detection_custom_module(::Google::Cloud::SecurityCenterManagement::V1::ValidateEventThreatDetectionCustomModuleRequest.new(parent: parent, raw_text: raw_text, type: type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, validate_event_threat_detection_custom_module_client_stub.call_rpc_count - end - end - - def test_get_security_center_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - show_eligible_modules_only = true - - get_security_center_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_security_center_service, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["show_eligible_modules_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_security_center_service_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_security_center_service name: name, show_eligible_modules_only: show_eligible_modules_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_security_center_service_client_stub.call_rpc_count - end - end - - def test_list_security_center_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - show_eligible_modules_only = true - - list_security_center_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_security_center_services, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["show_eligible_modules_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_security_center_services_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_security_center_services parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_security_center_services ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_security_center_services(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_security_center_services_client_stub.call_rpc_count - end - end - - def test_update_security_center_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - security_center_service = {} - update_mask = {} - validate_only = true - - update_security_center_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_security_center_service, name - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService), request["security_center_service"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_security_center_service_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_security_center_service({ security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_security_center_service security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new(security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_security_center_service({ security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::UpdateSecurityCenterServiceRequest.new(security_center_service: security_center_service, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_security_center_service_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterManagement::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center_management-v1/test/helper.rb b/owl-bot-staging/google-cloud-security_center_management-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center_management-v1/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-v1/.gitignore b/owl-bot-staging/google-cloud-service_control-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/.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-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-service_control-v1/.repo-metadata.json deleted file mode 100644 index 6f4ac0605165..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/.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-v1/latest", - "distribution_name": "google-cloud-service_control-v1", - "is_cloud": true, - "language": "ruby", - "name": "servicecontrol", - "name_pretty": "Service Control API V1 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. Note that google-cloud-service_control-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_control instead. See the readme for more details.", - "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-v1/.rubocop.yml b/owl-bot-staging/google-cloud-service_control-v1/.rubocop.yml deleted file mode 100644 index 12b1f90426a5..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-service_control-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-service_control-v1.rb" diff --git a/owl-bot-staging/google-cloud-service_control-v1/.toys.rb b/owl-bot-staging/google-cloud-service_control-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/.yardopts b/owl-bot-staging/google-cloud-service_control-v1/.yardopts deleted file mode 100644 index 2bbe9053aeb8..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Service Control API V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-service_control-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_control-v1/AUTHENTICATION.md deleted file mode 100644 index d242e6b29038..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-service_control-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-service_control-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/service_control/v1" - -client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/service_control/v1" - -::Google::Cloud::ServiceControl::V1::QuotaController::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-service_control-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/service_control/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-service_control-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-service_control-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-service_control-v1/Gemfile b/owl-bot-staging/google-cloud-service_control-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-v1/LICENSE.md b/owl-bot-staging/google-cloud-service_control-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-service_control-v1/README.md b/owl-bot-staging/google-cloud-service_control-v1/README.md deleted file mode 100644 index 959ac12e2d69..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Service Control API V1 API - -Provides admission control and telemetry reporting for services integrated with Service Infrastructure. - -The Service Control API provides control plane functionality to managed services, such as logging, monitoring, and status checks. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Service Control API V1 API. Most users should consider using -the main client gem, -[google-cloud-service_control](https://rubygems.org/gems/google-cloud-service_control). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-service_control-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/servicecontrol.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/service_control/v1" - -client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new -request = ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new # (request fields as keyword arguments...) -response = client.allocate_quota request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_control-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/service-infrastructure/docs/overview/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/service_control/v1" -require "logger" - -client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-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-v1/Rakefile b/owl-bot-staging/google-cloud-service_control-v1/Rakefile deleted file mode 100644 index 1cadd92fcbaf..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-service_control-v1 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-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-service_control-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-service_control-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-service_control-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-service_control-v1" - header "google-cloud-service_control-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-service_control-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-service_control-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-service_control-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-service_control-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-service_control-v1/gapic_metadata.json deleted file mode 100644 index f4217c466359..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/gapic_metadata.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.api.servicecontrol.v1", - "libraryPackage": "::Google::Cloud::ServiceControl::V1", - "services": { - "QuotaController": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ServiceControl::V1::QuotaController::Client", - "rpcs": { - "AllocateQuota": { - "methods": [ - "allocate_quota" - ] - } - } - } - } - }, - "ServiceController": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ServiceControl::V1::ServiceController::Client", - "rpcs": { - "Check": { - "methods": [ - "check" - ] - }, - "Report": { - "methods": [ - "report" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-service_control-v1/google-cloud-service_control-v1.gemspec b/owl-bot-staging/google-cloud-service_control-v1/google-cloud-service_control-v1.gemspec deleted file mode 100644 index 7b0fd8c9a699..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/google-cloud-service_control-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/service_control/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-service_control-v1" - gem.version = Google::Cloud::ServiceControl::V1::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. Note that google-cloud-service_control-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_control instead. See the readme for more details." - gem.summary = "Provides admission control and telemetry reporting for services integrated with Service Infrastructure." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google-cloud-service_control-v1.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google-cloud-service_control-v1.rb deleted file mode 100644 index bfde08f78cb8..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google-cloud-service_control-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/service_control/v1" diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/check_error_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/check_error_pb.rb deleted file mode 100644 index d3741b33f8bd..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/check_error_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/servicecontrol/v1/check_error.proto - -require 'google/protobuf' - -require 'google/rpc/status_pb' - - -descriptor_data = "\n.google/api/servicecontrol/v1/check_error.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a\x17google/rpc/status.proto\"\xae\x05\n\nCheckError\x12;\n\x04\x63ode\x18\x01 \x01(\x0e\x32-.google.api.servicecontrol.v1.CheckError.Code\x12\x0f\n\x07subject\x18\x04 \x01(\t\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\x12\"\n\x06status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\"\x9d\x04\n\x04\x43ode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12\r\n\tNOT_FOUND\x10\x05\x12\x15\n\x11PERMISSION_DENIED\x10\x07\x12\x16\n\x12RESOURCE_EXHAUSTED\x10\x08\x12\x19\n\x15SERVICE_NOT_ACTIVATED\x10h\x12\x14\n\x10\x42ILLING_DISABLED\x10k\x12\x13\n\x0fPROJECT_DELETED\x10l\x12\x13\n\x0fPROJECT_INVALID\x10r\x12\x14\n\x10\x43ONSUMER_INVALID\x10}\x12\x16\n\x12IP_ADDRESS_BLOCKED\x10m\x12\x13\n\x0fREFERER_BLOCKED\x10n\x12\x16\n\x12\x43LIENT_APP_BLOCKED\x10o\x12\x16\n\x12\x41PI_TARGET_BLOCKED\x10z\x12\x13\n\x0f\x41PI_KEY_INVALID\x10i\x12\x13\n\x0f\x41PI_KEY_EXPIRED\x10p\x12\x15\n\x11\x41PI_KEY_NOT_FOUND\x10q\x12\x16\n\x12INVALID_CREDENTIAL\x10{\x12!\n\x1cNAMESPACE_LOOKUP_UNAVAILABLE\x10\xac\x02\x12\x1f\n\x1aSERVICE_STATUS_UNAVAILABLE\x10\xad\x02\x12\x1f\n\x1a\x42ILLING_STATUS_UNAVAILABLE\x10\xae\x02\x12/\n*CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE\x10\xb1\x02\x42\xe7\x01\n com.google.api.servicecontrol.v1B\x0f\x43heckErrorProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceControl - module V1 - CheckError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckError").msgclass - CheckError::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckError.Code").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/distribution_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/distribution_pb.rb deleted file mode 100644 index 8cce8a133ca1..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/distribution_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/servicecontrol/v1/distribution.proto - -require 'google/protobuf' - -require 'google/api/distribution_pb' - - -descriptor_data = "\n/google/api/servicecontrol/v1/distribution.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a\x1dgoogle/api/distribution.proto\"\x9e\x05\n\x0c\x44istribution\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x0c\n\x04mean\x18\x02 \x01(\x01\x12\x0f\n\x07minimum\x18\x03 \x01(\x01\x12\x0f\n\x07maximum\x18\x04 \x01(\x01\x12 \n\x18sum_of_squared_deviation\x18\x05 \x01(\x01\x12\x15\n\rbucket_counts\x18\x06 \x03(\x03\x12R\n\x0elinear_buckets\x18\x07 \x01(\x0b\x32\x38.google.api.servicecontrol.v1.Distribution.LinearBucketsH\x00\x12\\\n\x13\x65xponential_buckets\x18\x08 \x01(\x0b\x32=.google.api.servicecontrol.v1.Distribution.ExponentialBucketsH\x00\x12V\n\x10\x65xplicit_buckets\x18\t \x01(\x0b\x32:.google.api.servicecontrol.v1.Distribution.ExplicitBucketsH\x00\x12\x34\n\texemplars\x18\n \x03(\x0b\x32!.google.api.Distribution.Exemplar\x1aJ\n\rLinearBuckets\x12\x1a\n\x12num_finite_buckets\x18\x01 \x01(\x05\x12\r\n\x05width\x18\x02 \x01(\x01\x12\x0e\n\x06offset\x18\x03 \x01(\x01\x1aV\n\x12\x45xponentialBuckets\x12\x1a\n\x12num_finite_buckets\x18\x01 \x01(\x05\x12\x15\n\rgrowth_factor\x18\x02 \x01(\x01\x12\r\n\x05scale\x18\x03 \x01(\x01\x1a!\n\x0f\x45xplicitBuckets\x12\x0e\n\x06\x62ounds\x18\x01 \x03(\x01\x42\x0f\n\rbucket_optionB\xe9\x01\n com.google.api.servicecontrol.v1B\x11\x44istributionProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceControl - module V1 - Distribution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution").msgclass - Distribution::LinearBuckets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution.LinearBuckets").msgclass - Distribution::ExponentialBuckets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution.ExponentialBuckets").msgclass - Distribution::ExplicitBuckets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Distribution.ExplicitBuckets").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/http_request_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/http_request_pb.rb deleted file mode 100644 index de8a58424660..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/http_request_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/servicecontrol/v1/http_request.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n/google/api/servicecontrol/v1/http_request.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a\x1egoogle/protobuf/duration.proto\"\xef\x02\n\x0bHttpRequest\x12\x16\n\x0erequest_method\x18\x01 \x01(\t\x12\x13\n\x0brequest_url\x18\x02 \x01(\t\x12\x14\n\x0crequest_size\x18\x03 \x01(\x03\x12\x0e\n\x06status\x18\x04 \x01(\x05\x12\x15\n\rresponse_size\x18\x05 \x01(\x03\x12\x12\n\nuser_agent\x18\x06 \x01(\t\x12\x11\n\tremote_ip\x18\x07 \x01(\t\x12\x11\n\tserver_ip\x18\r \x01(\t\x12\x0f\n\x07referer\x18\x08 \x01(\t\x12*\n\x07latency\x18\x0e \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0c\x63\x61\x63he_lookup\x18\x0b \x01(\x08\x12\x11\n\tcache_hit\x18\t \x01(\x08\x12*\n\"cache_validated_with_origin_server\x18\n \x01(\x08\x12\x18\n\x10\x63\x61\x63he_fill_bytes\x18\x0c \x01(\x03\x12\x10\n\x08protocol\x18\x0f \x01(\tB\xe8\x01\n com.google.api.servicecontrol.v1B\x10HttpRequestProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceControl - module V1 - HttpRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.HttpRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/log_entry_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/log_entry_pb.rb deleted file mode 100644 index 33520e195e44..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/log_entry_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/servicecontrol/v1/log_entry.proto - -require 'google/protobuf' - -require 'google/api/servicecontrol/v1/http_request_pb' -require 'google/logging/type/log_severity_pb' -require 'google/protobuf/any_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/api/servicecontrol/v1/log_entry.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a/google/api/servicecontrol/v1/http_request.proto\x1a&google/logging/type/log_severity.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x04\n\x08LogEntry\x12\x0c\n\x04name\x18\n \x01(\t\x12-\n\ttimestamp\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x08severity\x18\x0c \x01(\x0e\x32 .google.logging.type.LogSeverity\x12?\n\x0chttp_request\x18\x0e \x01(\x0b\x32).google.api.servicecontrol.v1.HttpRequest\x12\r\n\x05trace\x18\x0f \x01(\t\x12\x11\n\tinsert_id\x18\x04 \x01(\t\x12\x42\n\x06labels\x18\r \x03(\x0b\x32\x32.google.api.servicecontrol.v1.LogEntry.LabelsEntry\x12-\n\rproto_payload\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x16\n\x0ctext_payload\x18\x03 \x01(\tH\x00\x12\x31\n\x0estruct_payload\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x42\n\toperation\x18\x10 \x01(\x0b\x32/.google.api.servicecontrol.v1.LogEntryOperation\x12M\n\x0fsource_location\x18\x11 \x01(\x0b\x32\x34.google.api.servicecontrol.v1.LogEntrySourceLocation\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07payload\"N\n\x11LogEntryOperation\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08producer\x18\x02 \x01(\t\x12\r\n\x05\x66irst\x18\x03 \x01(\x08\x12\x0c\n\x04last\x18\x04 \x01(\x08\"F\n\x16LogEntrySourceLocation\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\x0c\n\x04line\x18\x02 \x01(\x03\x12\x10\n\x08\x66unction\x18\x03 \x01(\tB\xe5\x01\n com.google.api.servicecontrol.v1B\rLogEntryProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceControl - module V1 - LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.LogEntry").msgclass - LogEntryOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.LogEntryOperation").msgclass - LogEntrySourceLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.LogEntrySourceLocation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/metric_value_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/metric_value_pb.rb deleted file mode 100644 index 95e8a50317f0..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/metric_value_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/servicecontrol/v1/metric_value.proto - -require 'google/protobuf' - -require 'google/api/servicecontrol/v1/distribution_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/api/servicecontrol/v1/metric_value.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a/google/api/servicecontrol/v1/distribution.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x91\x03\n\x0bMetricValue\x12\x45\n\x06labels\x18\x01 \x03(\x0b\x32\x35.google.api.servicecontrol.v1.MetricValue.LabelsEntry\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x05 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x06 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x07 \x01(\tH\x00\x12H\n\x12\x64istribution_value\x18\x08 \x01(\x0b\x32*.google.api.servicecontrol.v1.DistributionH\x00\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x07\n\x05value\"g\n\x0eMetricValueSet\x12\x13\n\x0bmetric_name\x18\x01 \x01(\t\x12@\n\rmetric_values\x18\x02 \x03(\x0b\x32).google.api.servicecontrol.v1.MetricValueB\xeb\x01\n com.google.api.servicecontrol.v1B\x13MetricValueSetProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceControl - module V1 - MetricValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.MetricValue").msgclass - MetricValueSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.MetricValueSet").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/operation_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/operation_pb.rb deleted file mode 100644 index a376009218f7..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/operation_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/servicecontrol/v1/operation.proto - -require 'google/protobuf' - -require 'google/api/servicecontrol/v1/log_entry_pb' -require 'google/api/servicecontrol/v1/metric_value_pb' -require 'google/protobuf/any_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/api/servicecontrol/v1/operation.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a,google/api/servicecontrol/v1/log_entry.proto\x1a/google/api/servicecontrol/v1/metric_value.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x05\n\tOperation\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\x16\n\x0eoperation_name\x18\x02 \x01(\t\x12\x13\n\x0b\x63onsumer_id\x18\x03 \x01(\t\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x06labels\x18\x06 \x03(\x0b\x32\x33.google.api.servicecontrol.v1.Operation.LabelsEntry\x12G\n\x11metric_value_sets\x18\x07 \x03(\x0b\x32,.google.api.servicecontrol.v1.MetricValueSet\x12;\n\x0blog_entries\x18\x08 \x03(\x0b\x32&.google.api.servicecontrol.v1.LogEntry\x12\x46\n\nimportance\x18\x0b \x01(\x0e\x32\x32.google.api.servicecontrol.v1.Operation.Importance\x12L\n\x0buser_labels\x18\x0c \x03(\x0b\x32\x37.google.api.servicecontrol.v1.Operation.UserLabelsEntry\x12(\n\nextensions\x18\x10 \x03(\x0b\x32\x14.google.protobuf.Any\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1f\n\nImportance\x12\x07\n\x03LOW\x10\x00\x12\x08\n\x04HIGH\x10\x01\x42\xe6\x01\n com.google.api.servicecontrol.v1B\x0eOperationProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceControl - module V1 - Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Operation").msgclass - Operation::Importance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.Operation.Importance").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_pb.rb deleted file mode 100644 index a3de7db9b77f..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/servicecontrol/v1/quota_controller.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/servicecontrol/v1/metric_value_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n3google/api/servicecontrol/v1/quota_controller.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a/google/api/servicecontrol/v1/metric_value.proto\x1a\x17google/rpc/status.proto\"\x91\x01\n\x14\x41llocateQuotaRequest\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12H\n\x12\x61llocate_operation\x18\x02 \x01(\x0b\x32,.google.api.servicecontrol.v1.QuotaOperation\x12\x19\n\x11service_config_id\x18\x04 \x01(\t\"\xc6\x03\n\x0eQuotaOperation\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\x13\n\x0bmethod_name\x18\x02 \x01(\t\x12\x13\n\x0b\x63onsumer_id\x18\x03 \x01(\t\x12H\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.api.servicecontrol.v1.QuotaOperation.LabelsEntry\x12\x43\n\rquota_metrics\x18\x05 \x03(\x0b\x32,.google.api.servicecontrol.v1.MetricValueSet\x12J\n\nquota_mode\x18\x06 \x01(\x0e\x32\x36.google.api.servicecontrol.v1.QuotaOperation.QuotaMode\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"j\n\tQuotaMode\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x0f\n\x0b\x42\x45ST_EFFORT\x10\x02\x12\x0e\n\nCHECK_ONLY\x10\x03\x12\x0e\n\nQUERY_ONLY\x10\x04\x12\x0f\n\x0b\x41\x44JUST_ONLY\x10\x05\"\xd0\x01\n\x15\x41llocateQuotaResponse\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\x41\n\x0f\x61llocate_errors\x18\x02 \x03(\x0b\x32(.google.api.servicecontrol.v1.QuotaError\x12\x43\n\rquota_metrics\x18\x03 \x03(\x0b\x32,.google.api.servicecontrol.v1.MetricValueSet\x12\x19\n\x11service_config_id\x18\x04 \x01(\t\"\x9c\x02\n\nQuotaError\x12;\n\x04\x63ode\x18\x01 \x01(\x0e\x32-.google.api.servicecontrol.v1.QuotaError.Code\x12\x0f\n\x07subject\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\"\n\x06status\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\x86\x01\n\x04\x43ode\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x16\n\x12RESOURCE_EXHAUSTED\x10\x08\x12\x16\n\x12\x42ILLING_NOT_ACTIVE\x10k\x12\x13\n\x0fPROJECT_DELETED\x10l\x12\x13\n\x0f\x41PI_KEY_INVALID\x10i\x12\x13\n\x0f\x41PI_KEY_EXPIRED\x10p2\xc5\x02\n\x0fQuotaController\x12\xae\x01\n\rAllocateQuota\x12\x32.google.api.servicecontrol.v1.AllocateQuotaRequest\x1a\x33.google.api.servicecontrol.v1.AllocateQuotaResponse\"4\x82\xd3\xe4\x93\x02.\")/v1/services/{service_name}:allocateQuota:\x01*\x1a\x80\x01\xca\x41\x1dservicecontrol.googleapis.com\xd2\x41]https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/servicecontrolB\xec\x01\n com.google.api.servicecontrol.v1B\x14QuotaControllerProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceControl - module V1 - AllocateQuotaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.AllocateQuotaRequest").msgclass - QuotaOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaOperation").msgclass - QuotaOperation::QuotaMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaOperation.QuotaMode").enummodule - AllocateQuotaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.AllocateQuotaResponse").msgclass - QuotaError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaError").msgclass - QuotaError::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaError.Code").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb deleted file mode 100644 index d4f30c296b0d..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/quota_controller_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/api/servicecontrol/v1/quota_controller.proto for package 'Google.Cloud.ServiceControl.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/api/servicecontrol/v1/quota_controller_pb' - -module Google - module Cloud - module ServiceControl - module V1 - module 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). - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.api.servicecontrol.v1.QuotaController' - - # Attempts to allocate quota for the specified consumer. It should be called - # before the operation is executed. - # - # This method requires the `servicemanagement.services.quota` - # permission on the specified service. For more information, see - # [Cloud IAM](https://cloud.google.com/iam). - # - # **NOTE:** The client **must** fail-open on server errors `INTERNAL`, - # `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system - # reliability, the server may inject these errors to prohibit any hard - # dependency on the quota functionality. - rpc :AllocateQuota, ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest, ::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_pb.rb deleted file mode 100644 index 19ab679f9674..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/servicecontrol/v1/service_controller.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/servicecontrol/v1/check_error_pb' -require 'google/api/servicecontrol/v1/operation_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n5google/api/servicecontrol/v1/service_controller.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a.google/api/servicecontrol/v1/check_error.proto\x1a,google/api/servicecontrol/v1/operation.proto\x1a\x17google/rpc/status.proto\"{\n\x0c\x43heckRequest\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12:\n\toperation\x18\x02 \x01(\x0b\x32\'.google.api.servicecontrol.v1.Operation\x12\x19\n\x11service_config_id\x18\x04 \x01(\t\"\xfc\x04\n\rCheckResponse\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12>\n\x0c\x63heck_errors\x18\x02 \x03(\x0b\x32(.google.api.servicecontrol.v1.CheckError\x12\x19\n\x11service_config_id\x18\x05 \x01(\t\x12\x1a\n\x12service_rollout_id\x18\x0b \x01(\t\x12I\n\ncheck_info\x18\x06 \x01(\x0b\x32\x35.google.api.servicecontrol.v1.CheckResponse.CheckInfo\x1a\x8b\x01\n\tCheckInfo\x12\x18\n\x10unused_arguments\x18\x01 \x03(\t\x12O\n\rconsumer_info\x18\x02 \x01(\x0b\x32\x38.google.api.servicecontrol.v1.CheckResponse.ConsumerInfo\x12\x13\n\x0b\x61pi_key_uid\x18\x05 \x01(\t\x1a\x84\x02\n\x0c\x43onsumerInfo\x12\x16\n\x0eproject_number\x18\x01 \x01(\x03\x12S\n\x04type\x18\x02 \x01(\x0e\x32\x45.google.api.servicecontrol.v1.CheckResponse.ConsumerInfo.ConsumerType\x12\x17\n\x0f\x63onsumer_number\x18\x03 \x01(\x03\"n\n\x0c\x43onsumerType\x12\x1d\n\x19\x43ONSUMER_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PROJECT\x10\x01\x12\n\n\x06\x46OLDER\x10\x02\x12\x10\n\x0cORGANIZATION\x10\x03\x12\x14\n\x10SERVICE_SPECIFIC\x10\x04\"}\n\rReportRequest\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12;\n\noperations\x18\x02 \x03(\x0b\x32\'.google.api.servicecontrol.v1.Operation\x12\x19\n\x11service_config_id\x18\x03 \x01(\t\"\xe1\x01\n\x0eReportResponse\x12O\n\rreport_errors\x18\x01 \x03(\x0b\x32\x38.google.api.servicecontrol.v1.ReportResponse.ReportError\x12\x19\n\x11service_config_id\x18\x02 \x01(\t\x12\x1a\n\x12service_rollout_id\x18\x04 \x01(\t\x1aG\n\x0bReportError\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status2\xbc\x03\n\x11ServiceController\x12\x8e\x01\n\x05\x43heck\x12*.google.api.servicecontrol.v1.CheckRequest\x1a+.google.api.servicecontrol.v1.CheckResponse\",\x82\xd3\xe4\x93\x02&\"!/v1/services/{service_name}:check:\x01*\x12\x92\x01\n\x06Report\x12+.google.api.servicecontrol.v1.ReportRequest\x1a,.google.api.servicecontrol.v1.ReportResponse\"-\x82\xd3\xe4\x93\x02\'\"\"/v1/services/{service_name}:report:\x01*\x1a\x80\x01\xca\x41\x1dservicecontrol.googleapis.com\xd2\x41]https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/servicecontrolB\xee\x01\n com.google.api.servicecontrol.v1B\x16ServiceControllerProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceControl - module V1 - CheckRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckRequest").msgclass - CheckResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse").msgclass - CheckResponse::CheckInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse.CheckInfo").msgclass - CheckResponse::ConsumerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse.ConsumerInfo").msgclass - CheckResponse::ConsumerInfo::ConsumerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.CheckResponse.ConsumerInfo.ConsumerType").enummodule - ReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.ReportRequest").msgclass - ReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.ReportResponse").msgclass - ReportResponse::ReportError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.ReportResponse.ReportError").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb deleted file mode 100644 index 2278fccc29d4..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/api/servicecontrol/v1/service_controller_services_pb.rb +++ /dev/null @@ -1,81 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/api/servicecontrol/v1/service_controller.proto for package 'Google.Cloud.ServiceControl.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/api/servicecontrol/v1/service_controller_pb' - -module Google - module Cloud - module ServiceControl - module V1 - module 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). - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.api.servicecontrol.v1.ServiceController' - - # Checks whether an operation on a service should be allowed to proceed - # based on the configuration of the service and related policies. It must be - # called before the operation is executed. - # - # If feasible, the client should cache the check results and reuse them for - # 60 seconds. In case of any server errors, the client should rely on the - # cached results for much longer time to avoid outage. - # WARNING: There is general 60s delay for the configuration and policy - # propagation, therefore callers MUST NOT depend on the `Check` method having - # the latest policy information. - # - # NOTE: the [CheckRequest][google.api.servicecontrol.v1.CheckRequest] has the - # size limit (wire-format byte size) of 1MB. - # - # This method requires the `servicemanagement.services.check` permission - # on the specified service. For more information, see - # [Cloud IAM](https://cloud.google.com/iam). - rpc :Check, ::Google::Cloud::ServiceControl::V1::CheckRequest, ::Google::Cloud::ServiceControl::V1::CheckResponse - # Reports operation results to Google Service Control, such as logs and - # metrics. It should be called after an operation is completed. - # - # If feasible, the client should aggregate reporting data for up to 5 - # seconds to reduce API traffic. Limiting aggregation to 5 seconds is to - # reduce data loss during client crashes. Clients should carefully choose - # the aggregation time window to avoid data loss risk more than 0.01% - # for business and compliance reasons. - # - # NOTE: the [ReportRequest][google.api.servicecontrol.v1.ReportRequest] has - # the size limit (wire-format byte size) of 1MB. - # - # This method requires the `servicemanagement.services.report` permission - # on the specified service. For more information, see - # [Google Cloud IAM](https://cloud.google.com/iam). - rpc :Report, ::Google::Cloud::ServiceControl::V1::ReportRequest, ::Google::Cloud::ServiceControl::V1::ReportResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1.rb deleted file mode 100644 index dcc95829cf0e..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/service_control/v1/quota_controller" -require "google/cloud/service_control/v1/service_controller" -require "google/cloud/service_control/v1/version" - -module Google - module Cloud - module ServiceControl - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/service_control/v1" - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/service_control/v1" - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/service_control/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller.rb deleted file mode 100644 index e963c97e2520..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_control/v1/version" - -require "google/cloud/service_control/v1/quota_controller/credentials" -require "google/cloud/service_control/v1/quota_controller/client" -require "google/cloud/service_control/v1/quota_controller/rest" - -module Google - module Cloud - module ServiceControl - module V1 - ## - # [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). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/service_control/v1/quota_controller" - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/service_control/v1/quota_controller/rest" - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new - # - module QuotaController - end - end - end - end -end - -helper_path = ::File.join __dir__, "quota_controller", "helpers.rb" -require "google/cloud/service_control/v1/quota_controller/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/client.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/client.rb deleted file mode 100644 index 1482ccfab979..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/client.rb +++ /dev/null @@ -1,497 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/api/servicecontrol/v1/quota_controller_pb" - -module Google - module Cloud - module ServiceControl - module V1 - module QuotaController - ## - # Client for the QuotaController service. - # - # [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). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicecontrol.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :quota_controller_stub - - ## - # Configure the QuotaController Client class. - # - # See {::Google::Cloud::ServiceControl::V1::QuotaController::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaController clients - # ::Google::Cloud::ServiceControl::V1::QuotaController::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceControl", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the QuotaController Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceControl::V1::QuotaController::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @quota_controller_stub.universe_domain - end - - ## - # Create a new QuotaController client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaController client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/api/servicecontrol/v1/quota_controller_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @quota_controller_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ServiceControl::V1::QuotaController::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @quota_controller_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @quota_controller_stub.logger - end - - # Service calls - - ## - # Attempts to allocate quota for the specified consumer. It should be called - # before the operation is executed. - # - # This method requires the `servicemanagement.services.quota` - # permission on the specified service. For more information, see - # [Cloud IAM](https://cloud.google.com/iam). - # - # **NOTE:** The client **must** fail-open on server errors `INTERNAL`, - # `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system - # reliability, the server may inject these errors to prohibit any hard - # dependency on the quota functionality. - # - # @overload allocate_quota(request, options = nil) - # Pass arguments to `allocate_quota` via a request object, either of type - # {::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload allocate_quota(service_name: nil, allocate_operation: nil, service_config_id: nil) - # Pass arguments to `allocate_quota` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Name of the service as specified in the service configuration. For example, - # `"pubsub.googleapis.com"`. - # - # See [google.api.Service][google.api.Service] for the definition of a - # service name. - # @param allocate_operation [::Google::Cloud::ServiceControl::V1::QuotaOperation, ::Hash] - # Operation that describes the quota allocation. - # @param service_config_id [::String] - # Specifies which version of service configuration should be used to process - # the request. If unspecified or no matching version can be found, the latest - # one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_control/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceControl::V1::QuotaController::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new - # - # # Call the allocate_quota method. - # result = client.allocate_quota request - # - # # The returned object is of type Google::Cloud::ServiceControl::V1::AllocateQuotaResponse. - # p result - # - def allocate_quota request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.allocate_quota.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.allocate_quota.timeout, - metadata: metadata, - retry_policy: @config.rpcs.allocate_quota.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_controller_stub.call_rpc :allocate_quota, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaController API. - # - # This class represents the configuration for QuotaController, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceControl::V1::QuotaController::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # allocate_quota to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceControl::V1::QuotaController::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.allocate_quota.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.allocate_quota.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicecontrol.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the QuotaController API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `allocate_quota` - # @return [::Gapic::Config::Method] - # - attr_reader :allocate_quota - - # @private - def initialize parent_rpcs = nil - allocate_quota_config = parent_rpcs.allocate_quota if parent_rpcs.respond_to? :allocate_quota - @allocate_quota = ::Gapic::Config::Method.new allocate_quota_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.rb deleted file mode 100644 index e06bb9ba406a..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/credentials.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ServiceControl - module V1 - module QuotaController - # Credentials for the QuotaController API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/servicecontrol" - ] - self.env_vars = [ - "SERVICE_CONTROL_CREDENTIALS", - "SERVICE_CONTROL_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SERVICE_CONTROL_CREDENTIALS_JSON", - "SERVICE_CONTROL_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest.rb deleted file mode 100644 index 50b91d2a35b3..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_control/v1/version" - -require "google/cloud/service_control/v1/quota_controller/credentials" -require "google/cloud/service_control/v1/quota_controller/rest/client" - -module Google - module Cloud - module ServiceControl - module V1 - ## - # [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). - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/service_control/v1/quota_controller/rest" - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new - # - module QuotaController - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/service_control/v1/quota_controller/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.rb deleted file mode 100644 index e595839f0e14..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/client.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/api/servicecontrol/v1/quota_controller_pb" -require "google/cloud/service_control/v1/quota_controller/rest/service_stub" - -module Google - module Cloud - module ServiceControl - module V1 - module QuotaController - module Rest - ## - # REST client for the QuotaController service. - # - # [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). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicecontrol.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :quota_controller_stub - - ## - # Configure the QuotaController Client class. - # - # See {::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all QuotaController clients - # ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceControl", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the QuotaController Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @quota_controller_stub.universe_domain - end - - ## - # Create a new QuotaController REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the QuotaController client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @quota_controller_stub = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @quota_controller_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @quota_controller_stub.logger - end - - # Service calls - - ## - # Attempts to allocate quota for the specified consumer. It should be called - # before the operation is executed. - # - # This method requires the `servicemanagement.services.quota` - # permission on the specified service. For more information, see - # [Cloud IAM](https://cloud.google.com/iam). - # - # **NOTE:** The client **must** fail-open on server errors `INTERNAL`, - # `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system - # reliability, the server may inject these errors to prohibit any hard - # dependency on the quota functionality. - # - # @overload allocate_quota(request, options = nil) - # Pass arguments to `allocate_quota` via a request object, either of type - # {::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload allocate_quota(service_name: nil, allocate_operation: nil, service_config_id: nil) - # Pass arguments to `allocate_quota` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Name of the service as specified in the service configuration. For example, - # `"pubsub.googleapis.com"`. - # - # See [google.api.Service][google.api.Service] for the definition of a - # service name. - # @param allocate_operation [::Google::Cloud::ServiceControl::V1::QuotaOperation, ::Hash] - # Operation that describes the quota allocation. - # @param service_config_id [::String] - # Specifies which version of service configuration should be used to process - # the request. If unspecified or no matching version can be found, the latest - # one will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_control/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new - # - # # Call the allocate_quota method. - # result = client.allocate_quota request - # - # # The returned object is of type Google::Cloud::ServiceControl::V1::AllocateQuotaResponse. - # p result - # - def allocate_quota request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.allocate_quota.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.allocate_quota.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.allocate_quota.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @quota_controller_stub.allocate_quota request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the QuotaController REST API. - # - # This class represents the configuration for QuotaController REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # allocate_quota to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.allocate_quota.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.allocate_quota.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicecontrol.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the QuotaController API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `allocate_quota` - # @return [::Gapic::Config::Method] - # - attr_reader :allocate_quota - - # @private - def initialize parent_rpcs = nil - allocate_quota_config = parent_rpcs.allocate_quota if parent_rpcs.respond_to? :allocate_quota - @allocate_quota = ::Gapic::Config::Method.new allocate_quota_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.rb deleted file mode 100644 index f4dcafdb9c1a..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/quota_controller/rest/service_stub.rb +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/api/servicecontrol/v1/quota_controller_pb" - -module Google - module Cloud - module ServiceControl - module V1 - module QuotaController - module Rest - ## - # REST service stub for the QuotaController service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the allocate_quota REST call - # - # @param request_pb [::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse] - # A result object deserialized from the server's reply - def allocate_quota request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_allocate_quota_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "allocate_quota", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the allocate_quota REST call - # - # @param request_pb [::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_allocate_quota_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/services/{service_name}:allocateQuota", - body: "*", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/rest.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/rest.rb deleted file mode 100644 index b1390881305c..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/service_control/v1/quota_controller/rest" -require "google/cloud/service_control/v1/service_controller/rest" -require "google/cloud/service_control/v1/version" - -module Google - module Cloud - module ServiceControl - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/service_control/v1/rest" - # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller.rb deleted file mode 100644 index 7d39f2a58c49..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_control/v1/version" - -require "google/cloud/service_control/v1/service_controller/credentials" -require "google/cloud/service_control/v1/service_controller/client" -require "google/cloud/service_control/v1/service_controller/rest" - -module Google - module Cloud - module ServiceControl - module V1 - ## - # [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). - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/service_control/v1/service_controller" - # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/service_control/v1/service_controller/rest" - # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new - # - module ServiceController - end - end - end - end -end - -helper_path = ::File.join __dir__, "service_controller", "helpers.rb" -require "google/cloud/service_control/v1/service_controller/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/client.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/client.rb deleted file mode 100644 index b9e740577397..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/client.rb +++ /dev/null @@ -1,643 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/api/servicecontrol/v1/service_controller_pb" - -module Google - module Cloud - module ServiceControl - module V1 - module ServiceController - ## - # Client for the ServiceController service. - # - # [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). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicecontrol.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :service_controller_stub - - ## - # Configure the ServiceController Client class. - # - # See {::Google::Cloud::ServiceControl::V1::ServiceController::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ServiceController clients - # ::Google::Cloud::ServiceControl::V1::ServiceController::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceControl", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.check.timeout = 5.0 - default_config.rpcs.check.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.report.timeout = 16.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceController Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceControl::V1::ServiceController::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @service_controller_stub.universe_domain - end - - ## - # Create a new ServiceController client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ServiceController client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/api/servicecontrol/v1/service_controller_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @service_controller_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ServiceControl::V1::ServiceController::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @service_controller_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @service_controller_stub.logger - end - - # Service calls - - ## - # Checks whether an operation on a service should be allowed to proceed - # based on the configuration of the service and related policies. It must be - # called before the operation is executed. - # - # If feasible, the client should cache the check results and reuse them for - # 60 seconds. In case of any server errors, the client should rely on the - # cached results for much longer time to avoid outage. - # WARNING: There is general 60s delay for the configuration and policy - # propagation, therefore callers MUST NOT depend on the `Check` method having - # the latest policy information. - # - # NOTE: the {::Google::Cloud::ServiceControl::V1::CheckRequest CheckRequest} has the - # size limit (wire-format byte size) of 1MB. - # - # This method requires the `servicemanagement.services.check` permission - # on the specified service. For more information, see - # [Cloud IAM](https://cloud.google.com/iam). - # - # @overload check(request, options = nil) - # Pass arguments to `check` via a request object, either of type - # {::Google::Cloud::ServiceControl::V1::CheckRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceControl::V1::CheckRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload check(service_name: nil, operation: nil, service_config_id: nil) - # Pass arguments to `check` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # The service name as specified in its service configuration. For example, - # `"pubsub.googleapis.com"`. - # - # See - # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) - # for the definition of a service name. - # @param operation [::Google::Cloud::ServiceControl::V1::Operation, ::Hash] - # The operation to be checked. - # @param service_config_id [::String] - # Specifies which version of service configuration should be used to process - # the request. - # - # If unspecified or no matching version can be found, the - # latest one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceControl::V1::CheckResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceControl::V1::CheckResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_control/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceControl::V1::ServiceController::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceControl::V1::CheckRequest.new - # - # # Call the check method. - # result = client.check request - # - # # The returned object is of type Google::Cloud::ServiceControl::V1::CheckResponse. - # p result - # - def check request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::CheckRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.check.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.check.timeout, - metadata: metadata, - retry_policy: @config.rpcs.check.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_controller_stub.call_rpc :check, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Reports operation results to Google Service Control, such as logs and - # metrics. It should be called after an operation is completed. - # - # If feasible, the client should aggregate reporting data for up to 5 - # seconds to reduce API traffic. Limiting aggregation to 5 seconds is to - # reduce data loss during client crashes. Clients should carefully choose - # the aggregation time window to avoid data loss risk more than 0.01% - # for business and compliance reasons. - # - # NOTE: the {::Google::Cloud::ServiceControl::V1::ReportRequest ReportRequest} has - # the size limit (wire-format byte size) of 1MB. - # - # This method requires the `servicemanagement.services.report` permission - # on the specified service. For more information, see - # [Google Cloud IAM](https://cloud.google.com/iam). - # - # @overload report(request, options = nil) - # Pass arguments to `report` via a request object, either of type - # {::Google::Cloud::ServiceControl::V1::ReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceControl::V1::ReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload report(service_name: nil, operations: nil, service_config_id: nil) - # Pass arguments to `report` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # The service name as specified in its service configuration. For example, - # `"pubsub.googleapis.com"`. - # - # See - # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) - # for the definition of a service name. - # @param operations [::Array<::Google::Cloud::ServiceControl::V1::Operation, ::Hash>] - # Operations to be reported. - # - # Typically the service should report one operation per request. - # Putting multiple operations into a single request is allowed, but should - # be used only when multiple operations are natually available at the time - # of the report. - # - # There is no limit on the number of operations in the same ReportRequest, - # however the ReportRequest size should be no larger than 1MB. See - # {::Google::Cloud::ServiceControl::V1::ReportResponse#report_errors ReportResponse.report_errors} - # for partial failure behavior. - # @param service_config_id [::String] - # Specifies which version of service config should be used to process the - # request. - # - # If unspecified or no matching version can be found, the - # latest one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceControl::V1::ReportResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceControl::V1::ReportResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_control/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceControl::V1::ServiceController::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceControl::V1::ReportRequest.new - # - # # Call the report method. - # result = client.report request - # - # # The returned object is of type Google::Cloud::ServiceControl::V1::ReportResponse. - # p result - # - def report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::ReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.report.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_controller_stub.call_rpc :report, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ServiceController API. - # - # This class represents the configuration for ServiceController, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceControl::V1::ServiceController::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # check to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceControl::V1::ServiceController::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.check.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.check.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicecontrol.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ServiceController API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `check` - # @return [::Gapic::Config::Method] - # - attr_reader :check - ## - # RPC-specific configuration for `report` - # @return [::Gapic::Config::Method] - # - attr_reader :report - - # @private - def initialize parent_rpcs = nil - check_config = parent_rpcs.check if parent_rpcs.respond_to? :check - @check = ::Gapic::Config::Method.new check_config - report_config = parent_rpcs.report if parent_rpcs.respond_to? :report - @report = ::Gapic::Config::Method.new report_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/credentials.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/credentials.rb deleted file mode 100644 index ae04179c3e7e..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/credentials.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ServiceControl - module V1 - module ServiceController - # Credentials for the ServiceController API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/servicecontrol" - ] - self.env_vars = [ - "SERVICE_CONTROL_CREDENTIALS", - "SERVICE_CONTROL_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SERVICE_CONTROL_CREDENTIALS_JSON", - "SERVICE_CONTROL_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest.rb deleted file mode 100644 index 7ae6dee6ef4c..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_control/v1/version" - -require "google/cloud/service_control/v1/service_controller/credentials" -require "google/cloud/service_control/v1/service_controller/rest/client" - -module Google - module Cloud - module ServiceControl - module V1 - ## - # [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). - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/service_control/v1/service_controller/rest" - # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new - # - module ServiceController - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/service_control/v1/service_controller/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.rb deleted file mode 100644 index e0be9acd1d0c..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/client.rb +++ /dev/null @@ -1,586 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/api/servicecontrol/v1/service_controller_pb" -require "google/cloud/service_control/v1/service_controller/rest/service_stub" - -module Google - module Cloud - module ServiceControl - module V1 - module ServiceController - module Rest - ## - # REST client for the ServiceController service. - # - # [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). - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicecontrol.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :service_controller_stub - - ## - # Configure the ServiceController Client class. - # - # See {::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ServiceController clients - # ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceControl", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.check.timeout = 5.0 - default_config.rpcs.check.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.report.timeout = 16.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceController Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @service_controller_stub.universe_domain - end - - ## - # Create a new ServiceController REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ServiceController client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @service_controller_stub = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @service_controller_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @service_controller_stub.logger - end - - # Service calls - - ## - # Checks whether an operation on a service should be allowed to proceed - # based on the configuration of the service and related policies. It must be - # called before the operation is executed. - # - # If feasible, the client should cache the check results and reuse them for - # 60 seconds. In case of any server errors, the client should rely on the - # cached results for much longer time to avoid outage. - # WARNING: There is general 60s delay for the configuration and policy - # propagation, therefore callers MUST NOT depend on the `Check` method having - # the latest policy information. - # - # NOTE: the {::Google::Cloud::ServiceControl::V1::CheckRequest CheckRequest} has the - # size limit (wire-format byte size) of 1MB. - # - # This method requires the `servicemanagement.services.check` permission - # on the specified service. For more information, see - # [Cloud IAM](https://cloud.google.com/iam). - # - # @overload check(request, options = nil) - # Pass arguments to `check` via a request object, either of type - # {::Google::Cloud::ServiceControl::V1::CheckRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceControl::V1::CheckRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload check(service_name: nil, operation: nil, service_config_id: nil) - # Pass arguments to `check` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # The service name as specified in its service configuration. For example, - # `"pubsub.googleapis.com"`. - # - # See - # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) - # for the definition of a service name. - # @param operation [::Google::Cloud::ServiceControl::V1::Operation, ::Hash] - # The operation to be checked. - # @param service_config_id [::String] - # Specifies which version of service configuration should be used to process - # the request. - # - # If unspecified or no matching version can be found, the - # latest one will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceControl::V1::CheckResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceControl::V1::CheckResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_control/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceControl::V1::CheckRequest.new - # - # # Call the check method. - # result = client.check request - # - # # The returned object is of type Google::Cloud::ServiceControl::V1::CheckResponse. - # p result - # - def check request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::CheckRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.check.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.check.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.check.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_controller_stub.check request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Reports operation results to Google Service Control, such as logs and - # metrics. It should be called after an operation is completed. - # - # If feasible, the client should aggregate reporting data for up to 5 - # seconds to reduce API traffic. Limiting aggregation to 5 seconds is to - # reduce data loss during client crashes. Clients should carefully choose - # the aggregation time window to avoid data loss risk more than 0.01% - # for business and compliance reasons. - # - # NOTE: the {::Google::Cloud::ServiceControl::V1::ReportRequest ReportRequest} has - # the size limit (wire-format byte size) of 1MB. - # - # This method requires the `servicemanagement.services.report` permission - # on the specified service. For more information, see - # [Google Cloud IAM](https://cloud.google.com/iam). - # - # @overload report(request, options = nil) - # Pass arguments to `report` via a request object, either of type - # {::Google::Cloud::ServiceControl::V1::ReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceControl::V1::ReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload report(service_name: nil, operations: nil, service_config_id: nil) - # Pass arguments to `report` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # The service name as specified in its service configuration. For example, - # `"pubsub.googleapis.com"`. - # - # See - # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) - # for the definition of a service name. - # @param operations [::Array<::Google::Cloud::ServiceControl::V1::Operation, ::Hash>] - # Operations to be reported. - # - # Typically the service should report one operation per request. - # Putting multiple operations into a single request is allowed, but should - # be used only when multiple operations are natually available at the time - # of the report. - # - # There is no limit on the number of operations in the same ReportRequest, - # however the ReportRequest size should be no larger than 1MB. See - # {::Google::Cloud::ServiceControl::V1::ReportResponse#report_errors ReportResponse.report_errors} - # for partial failure behavior. - # @param service_config_id [::String] - # Specifies which version of service config should be used to process the - # request. - # - # If unspecified or no matching version can be found, the - # latest one will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceControl::V1::ReportResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceControl::V1::ReportResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_control/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceControl::V1::ReportRequest.new - # - # # Call the report method. - # result = client.report request - # - # # The returned object is of type Google::Cloud::ServiceControl::V1::ReportResponse. - # p result - # - def report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceControl::V1::ReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.report.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_controller_stub.report request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ServiceController REST API. - # - # This class represents the configuration for ServiceController REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # check to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.check.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.check.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicecontrol.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ServiceController API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `check` - # @return [::Gapic::Config::Method] - # - attr_reader :check - ## - # RPC-specific configuration for `report` - # @return [::Gapic::Config::Method] - # - attr_reader :report - - # @private - def initialize parent_rpcs = nil - check_config = parent_rpcs.check if parent_rpcs.respond_to? :check - @check = ::Gapic::Config::Method.new check_config - report_config = parent_rpcs.report if parent_rpcs.respond_to? :report - @report = ::Gapic::Config::Method.new report_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.rb deleted file mode 100644 index 3203240fae04..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/service_controller/rest/service_stub.rb +++ /dev/null @@ -1,205 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/api/servicecontrol/v1/service_controller_pb" - -module Google - module Cloud - module ServiceControl - module V1 - module ServiceController - module Rest - ## - # REST service stub for the ServiceController service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the check REST call - # - # @param request_pb [::Google::Cloud::ServiceControl::V1::CheckRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceControl::V1::CheckResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceControl::V1::CheckResponse] - # A result object deserialized from the server's reply - def check request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_check_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "check", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceControl::V1::CheckResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the report REST call - # - # @param request_pb [::Google::Cloud::ServiceControl::V1::ReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceControl::V1::ReportResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceControl::V1::ReportResponse] - # A result object deserialized from the server's reply - def report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_report_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "report", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceControl::V1::ReportResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the check REST call - # - # @param request_pb [::Google::Cloud::ServiceControl::V1::CheckRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_check_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/services/{service_name}:check", - body: "*", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the report REST call - # - # @param request_pb [::Google::Cloud::ServiceControl::V1::ReportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/services/{service_name}:report", - body: "*", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/version.rb b/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/version.rb deleted file mode 100644 index f4ed47989a7e..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/lib/google/cloud/service_control/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceControl - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/README.md deleted file mode 100644 index 9aa07e3d9899..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Service Control API V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/distribution.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/distribution.rb deleted file mode 100644 index e4f870d5ad0d..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/distribution.rb +++ /dev/null @@ -1,233 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # `Distribution` contains summary statistics for a population of values. It - # optionally contains a histogram representing the distribution of those values - # across a set of buckets. - # - # The summary statistics are the count, mean, sum of the squared deviation from - # the mean, the minimum, and the maximum of the set of population of values. - # The histogram is based on a sequence of buckets and gives a count of values - # that fall into each bucket. The boundaries of the buckets are given either - # explicitly or by formulas for buckets of fixed or exponentially increasing - # widths. - # - # Although it is not forbidden, it is generally a bad idea to include - # non-finite values (infinities or NaNs) in the population of values, as this - # will render the `mean` and `sum_of_squared_deviation` fields meaningless. - # @!attribute [rw] count - # @return [::Integer] - # The number of values in the population. Must be non-negative. This value - # must equal the sum of the values in `bucket_counts` if a histogram is - # provided. - # @!attribute [rw] mean - # @return [::Float] - # The arithmetic mean of the values in the population. If `count` is zero - # then this field must be zero. - # @!attribute [rw] sum_of_squared_deviation - # @return [::Float] - # The sum of squared deviations from the mean of the values in the - # population. For values x_i this is: - # - # Sum[i=1..n]((x_i - mean)^2) - # - # Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition - # describes Welford's method for accumulating this sum in one pass. - # - # If `count` is zero then this field must be zero. - # @!attribute [rw] range - # @return [::Google::Api::Distribution::Range] - # If specified, contains the range of the population values. The field - # must not be present if the `count` is zero. - # @!attribute [rw] bucket_options - # @return [::Google::Api::Distribution::BucketOptions] - # Defines the histogram bucket boundaries. If the distribution does not - # contain a histogram, then omit this field. - # @!attribute [rw] bucket_counts - # @return [::Array<::Integer>] - # The number of values in each bucket of the histogram, as described in - # `bucket_options`. If the distribution does not have a histogram, then omit - # this field. If there is a histogram, then the sum of the values in - # `bucket_counts` must equal the value in the `count` field of the - # distribution. - # - # If present, `bucket_counts` should contain N values, where N is the number - # of buckets specified in `bucket_options`. If you supply fewer than N - # values, the remaining values are assumed to be 0. - # - # The order of the values in `bucket_counts` follows the bucket numbering - # schemes described for the three bucket types. The first value must be the - # count for the underflow bucket (number 0). The next N-2 values are the - # counts for the finite buckets (number 1 through N-2). The N'th value in - # `bucket_counts` is the count for the overflow bucket (number N-1). - # @!attribute [rw] exemplars - # @return [::Array<::Google::Api::Distribution::Exemplar>] - # Must be in increasing order of `value` field. - class Distribution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The range of the population values. - # @!attribute [rw] min - # @return [::Float] - # The minimum of the population values. - # @!attribute [rw] max - # @return [::Float] - # The maximum of the population values. - class Range - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BucketOptions` describes the bucket boundaries used to create a histogram - # for the distribution. The buckets can be in a linear sequence, an - # exponential sequence, or each bucket can be specified explicitly. - # `BucketOptions` does not include the number of values in each bucket. - # - # A bucket has an inclusive lower bound and exclusive upper bound for the - # values that are counted for that bucket. The upper bound of a bucket must - # be strictly greater than the lower bound. The sequence of N buckets for a - # distribution consists of an underflow bucket (number 0), zero or more - # finite buckets (number 1 through N - 2) and an overflow bucket (number N - - # 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the - # same as the upper bound of bucket i - 1. The buckets span the whole range - # of finite values: lower bound of the underflow bucket is -infinity and the - # upper bound of the overflow bucket is +infinity. The finite buckets are - # so-called because both bounds are finite. - # @!attribute [rw] linear_buckets - # @return [::Google::Api::Distribution::BucketOptions::Linear] - # The linear bucket. - # - # Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exponential_buckets - # @return [::Google::Api::Distribution::BucketOptions::Exponential] - # The exponential buckets. - # - # Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] explicit_buckets - # @return [::Google::Api::Distribution::BucketOptions::Explicit] - # The explicit buckets. - # - # Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BucketOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies a linear sequence of buckets that all have the same width - # (except overflow and underflow). Each bucket represents a constant - # absolute uncertainty on the specific value in the bucket. - # - # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the - # following boundaries: - # - # Upper bound (0 <= i < N-1): offset + (width * i). - # - # Lower bound (1 <= i < N): offset + (width * (i - 1)). - # @!attribute [rw] num_finite_buckets - # @return [::Integer] - # Must be greater than 0. - # @!attribute [rw] width - # @return [::Float] - # Must be greater than 0. - # @!attribute [rw] offset - # @return [::Float] - # Lower bound of the first bucket. - class Linear - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies an exponential sequence of buckets that have a width that is - # proportional to the value of the lower bound. Each bucket represents a - # constant relative uncertainty on a specific value in the bucket. - # - # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the - # following boundaries: - # - # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). - # - # Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). - # @!attribute [rw] num_finite_buckets - # @return [::Integer] - # Must be greater than 0. - # @!attribute [rw] growth_factor - # @return [::Float] - # Must be greater than 1. - # @!attribute [rw] scale - # @return [::Float] - # Must be greater than 0. - class Exponential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a set of buckets with arbitrary widths. - # - # There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following - # boundaries: - # - # Upper bound (0 <= i < N-1): bounds[i] - # Lower bound (1 <= i < N); bounds[i - 1] - # - # The `bounds` field must contain at least one element. If `bounds` has - # only one element, then there are no finite buckets, and that single - # element is the common boundary of the overflow and underflow buckets. - # @!attribute [rw] bounds - # @return [::Array<::Float>] - # The values must be monotonically increasing. - class Explicit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Exemplars are example points that may be used to annotate aggregated - # distribution values. They are metadata that gives information about a - # particular value added to a Distribution bucket, such as a trace ID that - # was active when a value was added. They may contain further information, - # such as a example values and timestamps, origin, etc. - # @!attribute [rw] value - # @return [::Float] - # Value of the exemplar point. This value determines to which bucket the - # exemplar belongs. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # The observation (sampling) time of the above value. - # @!attribute [rw] attachments - # @return [::Array<::Google::Protobuf::Any>] - # Contextual information about the example value. Examples are: - # - # Trace: type.googleapis.com/google.monitoring.v3.SpanContext - # - # Literal string: type.googleapis.com/google.protobuf.StringValue - # - # Labels dropped during aggregation: - # type.googleapis.com/google.monitoring.v3.DroppedLabels - # - # There may be only a single attachment of any given message type in a - # single exemplar, and this is enforced by the system. - class Exemplar - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/check_error.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/check_error.rb deleted file mode 100644 index 68d445510c11..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/check_error.rb +++ /dev/null @@ -1,129 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceControl - module V1 - # Defines the errors to be returned in - # {::Google::Cloud::ServiceControl::V1::CheckResponse#check_errors google.api.servicecontrol.v1.CheckResponse.check_errors}. - # @!attribute [rw] code - # @return [::Google::Cloud::ServiceControl::V1::CheckError::Code] - # The error code. - # @!attribute [rw] subject - # @return [::String] - # Subject to whom this error applies. See the specific code enum for more - # details on this field. For example: - # - # - "project:" - # - "folder:" - # - "organization:" - # @!attribute [rw] detail - # @return [::String] - # Free-form text providing details on the error cause of the error. - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # Contains public information about the check error. If available, - # `status.code` will be non zero and client can propagate it out as public - # error. - class CheckError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Error codes for Check responses. - module Code - # This is the default value if error code is not explicitly set. - # It should not be used directly. - ERROR_CODE_UNSPECIFIED = 0 - - # The consumer's project id, network container, or resource container was - # not found. Same as - # [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND]. - NOT_FOUND = 5 - - # The consumer doesn't have access to the specified resource. - # Same as - # [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. - PERMISSION_DENIED = 7 - - # Quota check failed. Same as - # [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]. - RESOURCE_EXHAUSTED = 8 - - # The consumer hasn't activated the service. - SERVICE_NOT_ACTIVATED = 104 - - # The consumer cannot access the service because billing is disabled. - BILLING_DISABLED = 107 - - # The consumer's project has been marked as deleted (soft deletion). - PROJECT_DELETED = 108 - - # The consumer's project number or id does not represent a valid project. - PROJECT_INVALID = 114 - - # The input consumer info does not represent a valid consumer folder or - # organization. - CONSUMER_INVALID = 125 - - # The IP address of the consumer is invalid for the specific consumer - # project. - IP_ADDRESS_BLOCKED = 109 - - # The referer address of the consumer request is invalid for the specific - # consumer project. - REFERER_BLOCKED = 110 - - # The client application of the consumer request is invalid for the - # specific consumer project. - CLIENT_APP_BLOCKED = 111 - - # The API targeted by this request is invalid for the specified consumer - # project. - API_TARGET_BLOCKED = 122 - - # The consumer's API key is invalid. - API_KEY_INVALID = 105 - - # The consumer's API Key has expired. - API_KEY_EXPIRED = 112 - - # The consumer's API Key was not found in config record. - API_KEY_NOT_FOUND = 113 - - # The credential in the request can not be verified. - INVALID_CREDENTIAL = 123 - - # The backend server for looking up project id/number is unavailable. - NAMESPACE_LOOKUP_UNAVAILABLE = 300 - - # The backend server for checking service status is unavailable. - SERVICE_STATUS_UNAVAILABLE = 301 - - # The backend server for checking billing status is unavailable. - BILLING_STATUS_UNAVAILABLE = 302 - - # Cloud Resource Manager backend server is unavailable. - CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE = 305 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/distribution.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/distribution.rb deleted file mode 100644 index f25125b9bf74..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/distribution.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! - - -module Google - module Cloud - module ServiceControl - module V1 - # Distribution represents a frequency distribution of double-valued sample - # points. It contains the size of the population of sample points plus - # additional optional information: - # - # * the arithmetic mean of the samples - # * the minimum and maximum of the samples - # * the sum-squared-deviation of the samples, used to compute variance - # * a histogram of the values of the sample points - # @!attribute [rw] count - # @return [::Integer] - # The total number of samples in the distribution. Must be >= 0. - # @!attribute [rw] mean - # @return [::Float] - # The arithmetic mean of the samples in the distribution. If `count` is - # zero then this field must be zero. - # @!attribute [rw] minimum - # @return [::Float] - # The minimum of the population of values. Ignored if `count` is zero. - # @!attribute [rw] maximum - # @return [::Float] - # The maximum of the population of values. Ignored if `count` is zero. - # @!attribute [rw] sum_of_squared_deviation - # @return [::Float] - # The sum of squared deviations from the mean: - # Sum[i=1..count]((x_i - mean)^2) - # where each x_i is a sample values. If `count` is zero then this field - # must be zero, otherwise validation of the request fails. - # @!attribute [rw] bucket_counts - # @return [::Array<::Integer>] - # The number of samples in each histogram bucket. `bucket_counts` are - # optional. If present, they must sum to the `count` value. - # - # The buckets are defined below in `bucket_option`. There are N buckets. - # `bucket_counts[0]` is the number of samples in the underflow bucket. - # `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples - # in each of the finite buckets. And `bucket_counts[N]` is the number - # of samples in the overflow bucket. See the comments of `bucket_option` - # below for more details. - # - # Any suffix of trailing zeros may be omitted. - # @!attribute [rw] linear_buckets - # @return [::Google::Cloud::ServiceControl::V1::Distribution::LinearBuckets] - # Buckets with constant width. - # - # Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exponential_buckets - # @return [::Google::Cloud::ServiceControl::V1::Distribution::ExponentialBuckets] - # Buckets with exponentially growing width. - # - # Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] explicit_buckets - # @return [::Google::Cloud::ServiceControl::V1::Distribution::ExplicitBuckets] - # Buckets with arbitrary user-provided width. - # - # Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exemplars - # @return [::Array<::Google::Api::Distribution::Exemplar>] - # Example points. Must be in increasing order of `value` field. - class Distribution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describing buckets with constant width. - # @!attribute [rw] num_finite_buckets - # @return [::Integer] - # The number of finite buckets. With the underflow and overflow buckets, - # the total number of buckets is `num_finite_buckets` + 2. - # See comments on `bucket_options` for details. - # @!attribute [rw] width - # @return [::Float] - # The i'th linear bucket covers the interval - # [offset + (i-1) * width, offset + i * width) - # where i ranges from 1 to num_finite_buckets, inclusive. - # Must be strictly positive. - # @!attribute [rw] offset - # @return [::Float] - # The i'th linear bucket covers the interval - # [offset + (i-1) * width, offset + i * width) - # where i ranges from 1 to num_finite_buckets, inclusive. - class LinearBuckets - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describing buckets with exponentially growing width. - # @!attribute [rw] num_finite_buckets - # @return [::Integer] - # The number of finite buckets. With the underflow and overflow buckets, - # the total number of buckets is `num_finite_buckets` + 2. - # See comments on `bucket_options` for details. - # @!attribute [rw] growth_factor - # @return [::Float] - # The i'th exponential bucket covers the interval - # [scale * growth_factor^(i-1), scale * growth_factor^i) - # where i ranges from 1 to num_finite_buckets inclusive. - # Must be larger than 1.0. - # @!attribute [rw] scale - # @return [::Float] - # The i'th exponential bucket covers the interval - # [scale * growth_factor^(i-1), scale * growth_factor^i) - # where i ranges from 1 to num_finite_buckets inclusive. - # Must be > 0. - class ExponentialBuckets - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describing buckets with arbitrary user-provided width. - # @!attribute [rw] bounds - # @return [::Array<::Float>] - # 'bound' is a list of strictly increasing boundaries between - # buckets. Note that a list of length N-1 defines N buckets because - # of fenceposting. See comments on `bucket_options` for details. - # - # The i'th finite bucket covers the interval - # [bound[i-1], bound[i]) - # where i ranges from 1 to bound_size() - 1. Note that there are no - # finite buckets at all if 'bound' only contains a single element; in - # that special case the single bound defines the boundary between the - # underflow and overflow buckets. - # - # bucket number lower bound upper bound - # i == 0 (underflow) -inf bound[i] - # 0 < i < bound_size() bound[i-1] bound[i] - # i == bound_size() (overflow) bound[i-1] +inf - class ExplicitBuckets - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/http_request.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/http_request.rb deleted file mode 100644 index 64635c2a2991..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/http_request.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceControl - module V1 - # A common proto for logging HTTP requests. Only contains semantics - # defined by the HTTP specification. Product-specific logging - # information MUST be defined in a separate message. - # @!attribute [rw] request_method - # @return [::String] - # The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. - # @!attribute [rw] request_url - # @return [::String] - # The scheme (http, https), the host name, the path, and the query - # portion of the URL that was requested. - # Example: `"http://example.com/some/info?color=red"`. - # @!attribute [rw] request_size - # @return [::Integer] - # The size of the HTTP request message in bytes, including the request - # headers and the request body. - # @!attribute [rw] status - # @return [::Integer] - # The response code indicating the status of the response. - # Examples: 200, 404. - # @!attribute [rw] response_size - # @return [::Integer] - # The size of the HTTP response message sent back to the client, in bytes, - # including the response headers and the response body. - # @!attribute [rw] user_agent - # @return [::String] - # The user agent sent by the client. Example: - # `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET - # CLR 1.0.3705)"`. - # @!attribute [rw] remote_ip - # @return [::String] - # The IP address (IPv4 or IPv6) of the client that issued the HTTP - # request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. - # @!attribute [rw] server_ip - # @return [::String] - # The IP address (IPv4 or IPv6) of the origin server that the request was - # sent to. - # @!attribute [rw] referer - # @return [::String] - # The referer URL of the request, as defined in - # [HTTP/1.1 Header Field - # Definitions](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). - # @!attribute [rw] latency - # @return [::Google::Protobuf::Duration] - # The request processing latency on the server, from the time the request was - # received until the response was sent. - # @!attribute [rw] cache_lookup - # @return [::Boolean] - # Whether or not a cache lookup was attempted. - # @!attribute [rw] cache_hit - # @return [::Boolean] - # Whether or not an entity was served from cache - # (with or without validation). - # @!attribute [rw] cache_validated_with_origin_server - # @return [::Boolean] - # Whether or not the response was validated with the origin server before - # being served from cache. This field is only meaningful if `cache_hit` is - # True. - # @!attribute [rw] cache_fill_bytes - # @return [::Integer] - # The number of HTTP response bytes inserted into cache. Set only when a - # cache fill was attempted. - # @!attribute [rw] protocol - # @return [::String] - # Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" - class HttpRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/log_entry.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/log_entry.rb deleted file mode 100644 index bb1679135a7f..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/log_entry.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceControl - module V1 - # An individual log entry. - # @!attribute [rw] name - # @return [::String] - # Required. The log to which this log entry belongs. Examples: `"syslog"`, - # `"book_log"`. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # The time the event described by the log entry occurred. If - # omitted, defaults to operation start time. - # @!attribute [rw] severity - # @return [::Google::Cloud::Logging::Type::LogSeverity] - # The severity of the log entry. The default value is - # `LogSeverity.DEFAULT`. - # @!attribute [rw] http_request - # @return [::Google::Cloud::ServiceControl::V1::HttpRequest] - # Optional. Information about the HTTP request associated with this - # log entry, if applicable. - # @!attribute [rw] trace - # @return [::String] - # Optional. Resource name of the trace associated with the log entry, if any. - # If this field contains a relative resource name, you can assume the name is - # relative to `//tracing.googleapis.com`. Example: - # `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` - # @!attribute [rw] insert_id - # @return [::String] - # A unique ID for the log entry used for deduplication. If omitted, - # the implementation will generate one based on operation_id. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # A set of user-defined (key, value) data that provides additional - # information about the log entry. - # @!attribute [rw] proto_payload - # @return [::Google::Protobuf::Any] - # The log entry payload, represented as a protocol buffer that is - # expressed as a JSON object. The only accepted type currently is - # [AuditLog][google.cloud.audit.AuditLog]. - # - # Note: The following fields are mutually exclusive: `proto_payload`, `text_payload`, `struct_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_payload - # @return [::String] - # The log entry payload, represented as a Unicode string (UTF-8). - # - # Note: The following fields are mutually exclusive: `text_payload`, `proto_payload`, `struct_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_payload - # @return [::Google::Protobuf::Struct] - # The log entry payload, represented as a structure that - # is expressed as a JSON object. - # - # Note: The following fields are mutually exclusive: `struct_payload`, `proto_payload`, `text_payload`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] operation - # @return [::Google::Cloud::ServiceControl::V1::LogEntryOperation] - # Optional. Information about an operation associated with the log entry, if - # applicable. - # @!attribute [rw] source_location - # @return [::Google::Cloud::ServiceControl::V1::LogEntrySourceLocation] - # Optional. Source code location information associated with the log entry, - # if any. - class LogEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Additional information about a potentially long-running operation with which - # a log entry is associated. - # @!attribute [rw] id - # @return [::String] - # Optional. An arbitrary operation identifier. Log entries with the - # same identifier are assumed to be part of the same operation. - # @!attribute [rw] producer - # @return [::String] - # Optional. An arbitrary producer identifier. The combination of - # `id` and `producer` must be globally unique. Examples for `producer`: - # `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - # @!attribute [rw] first - # @return [::Boolean] - # Optional. Set this to True if this is the first log entry in the operation. - # @!attribute [rw] last - # @return [::Boolean] - # Optional. Set this to True if this is the last log entry in the operation. - class LogEntryOperation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional information about the source code location that produced the log - # entry. - # @!attribute [rw] file - # @return [::String] - # Optional. Source file name. Depending on the runtime environment, this - # might be a simple name or a fully-qualified name. - # @!attribute [rw] line - # @return [::Integer] - # Optional. Line within the source file. 1-based; 0 indicates no line number - # available. - # @!attribute [rw] function - # @return [::String] - # Optional. Human-readable name of the function or method being invoked, with - # optional context such as the class or package name. This information may be - # used in contexts such as the logs viewer, where a file and line number are - # less meaningful. The format can vary by language. For example: - # `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` - # (Python). - class LogEntrySourceLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/metric_value.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/metric_value.rb deleted file mode 100644 index a5736d442c2a..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/metric_value.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Represents a single metric value. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The labels describing the metric value. - # See comments on - # {::Google::Cloud::ServiceControl::V1::Operation#labels google.api.servicecontrol.v1.Operation.labels} - # for the overriding relationship. Note that this map must not contain - # monitored resource labels. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The start of the time period over which this metric value's measurement - # applies. The time period has different semantics for different metric - # types (cumulative, delta, and gauge). See the metric definition - # documentation in the service configuration for details. If not specified, - # {::Google::Cloud::ServiceControl::V1::Operation#start_time google.api.servicecontrol.v1.Operation.start_time} - # will be used. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The end of the time period over which this metric value's measurement - # applies. If not specified, - # {::Google::Cloud::ServiceControl::V1::Operation#end_time google.api.servicecontrol.v1.Operation.end_time} - # will be used. - # @!attribute [rw] bool_value - # @return [::Boolean] - # A boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] int64_value - # @return [::Integer] - # A signed 64-bit integer value. - # - # Note: The following fields are mutually exclusive: `int64_value`, `bool_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] double_value - # @return [::Float] - # A double precision floating point value. - # - # Note: The following fields are mutually exclusive: `double_value`, `bool_value`, `int64_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # A text string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `int64_value`, `double_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] distribution_value - # @return [::Google::Cloud::ServiceControl::V1::Distribution] - # A distribution value. - # - # Note: The following fields are mutually exclusive: `distribution_value`, `bool_value`, `int64_value`, `double_value`, `string_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class MetricValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents a set of metric values in the same metric. - # Each metric value in the set should have a unique combination of start time, - # end time, and label values. - # @!attribute [rw] metric_name - # @return [::String] - # The metric name defined in the service configuration. - # @!attribute [rw] metric_values - # @return [::Array<::Google::Cloud::ServiceControl::V1::MetricValue>] - # The values in this metric. - class MetricValueSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/operation.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/operation.rb deleted file mode 100644 index 4104f50bea0e..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/operation.rb +++ /dev/null @@ -1,146 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Represents information regarding an operation. - # @!attribute [rw] operation_id - # @return [::String] - # Identity of the operation. This must be unique within the scope of the - # service that generated the operation. If the service calls - # Check() and Report() on the same operation, the two calls should carry - # the same id. - # - # UUID version 4 is recommended, though not required. - # In scenarios where an operation is computed from existing information - # and an idempotent id is desirable for deduplication purpose, UUID version 5 - # is recommended. See RFC 4122 for details. - # @!attribute [rw] operation_name - # @return [::String] - # Fully qualified name of the operation. Reserved for future use. - # @!attribute [rw] consumer_id - # @return [::String] - # Identity of the consumer who is using the service. - # This field should be filled in for the operations initiated by a - # consumer, but not for service-initiated operations that are - # not related to a specific consumer. - # - # - # - This can be in one of the following formats: - # - project:PROJECT_ID, - # - project`_`number:PROJECT_NUMBER, - # - projects/PROJECT_ID or PROJECT_NUMBER, - # - folders/FOLDER_NUMBER, - # - organizations/ORGANIZATION_NUMBER, - # - api`_`key:API_KEY. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Required. Start time of the operation. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # End time of the operation. - # Required when the operation is used in - # {::Google::Cloud::ServiceControl::V1::ServiceController::Client#report ServiceController.Report}, - # but optional when the operation is used in - # {::Google::Cloud::ServiceControl::V1::ServiceController::Client#check ServiceController.Check}. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels describing the operation. Only the following labels are allowed: - # - # - Labels describing monitored resources as defined in - # the service configuration. - # - Default labels of metric values. When specified, labels defined in the - # metric value override these default. - # - The following labels defined by Google Cloud Platform: - # - `cloud.googleapis.com/location` describing the location where the - # operation happened, - # - `servicecontrol.googleapis.com/user_agent` describing the user agent - # of the API request, - # - `servicecontrol.googleapis.com/service_agent` describing the service - # used to handle the API request (e.g. ESP), - # - `servicecontrol.googleapis.com/platform` describing the platform - # where the API is served, such as App Engine, Compute Engine, or - # Kubernetes Engine. - # @!attribute [rw] metric_value_sets - # @return [::Array<::Google::Cloud::ServiceControl::V1::MetricValueSet>] - # Represents information about this operation. Each MetricValueSet - # corresponds to a metric defined in the service configuration. - # The data type used in the MetricValueSet must agree with - # the data type specified in the metric definition. - # - # Within a single operation, it is not allowed to have more than one - # MetricValue instances that have the same metric names and identical - # label value combinations. If a request has such duplicated MetricValue - # instances, the entire request is rejected with - # an invalid argument error. - # @!attribute [rw] log_entries - # @return [::Array<::Google::Cloud::ServiceControl::V1::LogEntry>] - # Represents information to be logged. - # @!attribute [rw] importance - # @return [::Google::Cloud::ServiceControl::V1::Operation::Importance] - # DO NOT USE. This is an experimental field. - # @!attribute [rw] user_labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Private Preview. This feature is only available for approved services. - # - # User defined labels for the resource that this operation is associated - # with. - # @!attribute [rw] extensions - # @return [::Array<::Google::Protobuf::Any>] - # Unimplemented. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class UserLabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the importance of the data contained in the operation. - module Importance - # Allows data caching, batching, and aggregation. It provides - # higher performance with higher data loss risk. - LOW = 0 - - # Disables data aggregation to minimize data loss. It is for operations - # that contains significant monetary value or audit trail. This feature - # only applies to the client libraries. - HIGH = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.rb deleted file mode 100644 index 8d919881597e..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/quota_controller.rb +++ /dev/null @@ -1,235 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceControl - module V1 - # Request message for the AllocateQuota method. - # @!attribute [rw] service_name - # @return [::String] - # Name of the service as specified in the service configuration. For example, - # `"pubsub.googleapis.com"`. - # - # See [google.api.Service][google.api.Service] for the definition of a - # service name. - # @!attribute [rw] allocate_operation - # @return [::Google::Cloud::ServiceControl::V1::QuotaOperation] - # Operation that describes the quota allocation. - # @!attribute [rw] service_config_id - # @return [::String] - # Specifies which version of service configuration should be used to process - # the request. If unspecified or no matching version can be found, the latest - # one will be used. - class AllocateQuotaRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents information regarding a quota operation. - # @!attribute [rw] operation_id - # @return [::String] - # Identity of the operation. For Allocation Quota, this is expected to be - # unique within the scope of the service that generated the operation, and - # guarantees idempotency in case of retries. - # - # In order to ensure best performance and latency in the Quota backends, - # operation_ids are optimally associated with time, so that related - # operations can be accessed fast in storage. For this reason, the - # recommended token for services that intend to operate at a high QPS is - # Unix time in nanos + UUID - # @!attribute [rw] method_name - # @return [::String] - # Fully qualified name of the API method for which this quota operation is - # requested. This name is used for matching quota rules or metric rules and - # billing status rules defined in service configuration. - # - # This field should not be set if any of the following is true: - # (1) the quota operation is performed on non-API resources. - # (2) quota_metrics is set because the caller is doing quota override. - # - # - # Example of an RPC method name: - # google.example.library.v1.LibraryService.CreateShelf - # @!attribute [rw] consumer_id - # @return [::String] - # Identity of the consumer for whom this quota operation is being performed. - # - # This can be in one of the following formats: - # project:, - # project_number:, - # api_key:. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels describing the operation. - # @!attribute [rw] quota_metrics - # @return [::Array<::Google::Cloud::ServiceControl::V1::MetricValueSet>] - # Represents information about this operation. Each MetricValueSet - # corresponds to a metric defined in the service configuration. - # The data type used in the MetricValueSet must agree with - # the data type specified in the metric definition. - # - # Within a single operation, it is not allowed to have more than one - # MetricValue instances that have the same metric names and identical - # label value combinations. If a request has such duplicated MetricValue - # instances, the entire request is rejected with - # an invalid argument error. - # - # This field is mutually exclusive with method_name. - # @!attribute [rw] quota_mode - # @return [::Google::Cloud::ServiceControl::V1::QuotaOperation::QuotaMode] - # Quota mode for this operation. - class QuotaOperation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Supported quota modes. - module QuotaMode - # Guard against implicit default. Must not be used. - UNSPECIFIED = 0 - - # For AllocateQuota request, allocates quota for the amount specified in - # the service configuration or specified using the quota metrics. If the - # amount is higher than the available quota, allocation error will be - # returned and no quota will be allocated. - # If multiple quotas are part of the request, and one fails, none of the - # quotas are allocated or released. - NORMAL = 1 - - # The operation allocates quota for the amount specified in the service - # configuration or specified using the quota metrics. If the amount is - # higher than the available quota, request does not fail but all available - # quota will be allocated. - # For rate quota, BEST_EFFORT will continue to deduct from other groups - # even if one does not have enough quota. For allocation, it will find the - # minimum available amount across all groups and deduct that amount from - # all the affected groups. - BEST_EFFORT = 2 - - # For AllocateQuota request, only checks if there is enough quota - # available and does not change the available quota. No lock is placed on - # the available quota either. - CHECK_ONLY = 3 - - # Unimplemented. When used in AllocateQuotaRequest, this returns the - # effective quota limit(s) in the response, and no quota check will be - # performed. Not supported for other requests, and even for - # AllocateQuotaRequest, this is currently supported only for allowlisted - # services. - QUERY_ONLY = 4 - - # The operation allocates quota for the amount specified in the service - # configuration or specified using the quota metrics. If the requested - # amount is higher than the available quota, request does not fail and - # remaining quota would become negative (going over the limit). - # Not supported for Rate Quota. - ADJUST_ONLY = 5 - end - end - - # Response message for the AllocateQuota method. - # @!attribute [rw] operation_id - # @return [::String] - # The same operation_id value used in the AllocateQuotaRequest. Used for - # logging and diagnostics purposes. - # @!attribute [rw] allocate_errors - # @return [::Array<::Google::Cloud::ServiceControl::V1::QuotaError>] - # Indicates the decision of the allocate. - # @!attribute [rw] quota_metrics - # @return [::Array<::Google::Cloud::ServiceControl::V1::MetricValueSet>] - # Quota metrics to indicate the result of allocation. Depending on the - # request, one or more of the following metrics will be included: - # - # 1. Per quota group or per quota metric incremental usage will be specified - # using the following delta metric : - # "serviceruntime.googleapis.com/api/consumer/quota_used_count" - # - # 2. The quota limit reached condition will be specified using the following - # boolean metric : - # "serviceruntime.googleapis.com/quota/exceeded" - # @!attribute [rw] service_config_id - # @return [::String] - # ID of the actual config used to process the request. - class AllocateQuotaResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents error information for - # {::Google::Cloud::ServiceControl::V1::QuotaOperation QuotaOperation}. - # @!attribute [rw] code - # @return [::Google::Cloud::ServiceControl::V1::QuotaError::Code] - # Error code. - # @!attribute [rw] subject - # @return [::String] - # Subject to whom this error applies. See the specific enum for more details - # on this field. For example, "clientip:" or - # "project:". - # @!attribute [rw] description - # @return [::String] - # Free-form text that provides details on the cause of the error. - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # Contains additional information about the quota error. - # If available, `status.code` will be non zero. - class QuotaError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Error codes related to project config validations are deprecated since the - # quota controller methods do not perform these validations. Instead services - # have to call the Check method, without quota_properties field, to perform - # these validations before calling the quota controller methods. These - # methods check only for project deletion to be wipe out compliant. - module Code - # This is never used. - UNSPECIFIED = 0 - - # Quota allocation failed. - # Same as - # [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]. - RESOURCE_EXHAUSTED = 8 - - # Consumer cannot access the service because the service requires active - # billing. - BILLING_NOT_ACTIVE = 107 - - # Consumer's project has been marked as deleted (soft deletion). - PROJECT_DELETED = 108 - - # Specified API key is invalid. - API_KEY_INVALID = 105 - - # Specified API Key has expired. - API_KEY_EXPIRED = 112 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/service_controller.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/service_controller.rb deleted file mode 100644 index c63f78cb240d..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/api/servicecontrol/v1/service_controller.rb +++ /dev/null @@ -1,217 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for 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 - module V1 - # Request message for the Check method. - # @!attribute [rw] service_name - # @return [::String] - # The service name as specified in its service configuration. For example, - # `"pubsub.googleapis.com"`. - # - # See - # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) - # for the definition of a service name. - # @!attribute [rw] operation - # @return [::Google::Cloud::ServiceControl::V1::Operation] - # The operation to be checked. - # @!attribute [rw] service_config_id - # @return [::String] - # Specifies which version of service configuration should be used to process - # the request. - # - # If unspecified or no matching version can be found, the - # latest one will be used. - class CheckRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the Check method. - # @!attribute [rw] operation_id - # @return [::String] - # The same operation_id value used in the - # {::Google::Cloud::ServiceControl::V1::CheckRequest CheckRequest}. Used for logging - # and diagnostics purposes. - # @!attribute [rw] check_errors - # @return [::Array<::Google::Cloud::ServiceControl::V1::CheckError>] - # Indicate the decision of the check. - # - # If no check errors are present, the service should process the operation. - # Otherwise the service should use the list of errors to determine the - # appropriate action. - # @!attribute [rw] service_config_id - # @return [::String] - # The actual config id used to process the request. - # @!attribute [rw] service_rollout_id - # @return [::String] - # The current service rollout id used to process the request. - # @!attribute [rw] check_info - # @return [::Google::Cloud::ServiceControl::V1::CheckResponse::CheckInfo] - # Feedback data returned from the server during processing a Check request. - class CheckResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains additional information about the check operation. - # @!attribute [rw] unused_arguments - # @return [::Array<::String>] - # A list of fields and label keys that are ignored by the server. - # The client doesn't need to send them for following requests to improve - # performance and allow better aggregation. - # @!attribute [rw] consumer_info - # @return [::Google::Cloud::ServiceControl::V1::CheckResponse::ConsumerInfo] - # Consumer info of this check. - # @!attribute [rw] api_key_uid - # @return [::String] - # The unique id of the api key in the format of "apikey:". - # This field will be populated when the consumer passed to Service Control - # is an API key and all the API key related validations are successful. - class CheckInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ConsumerInfo` provides information about the consumer. - # @!attribute [rw] project_number - # @return [::Integer] - # The Google cloud project number, e.g. 1234567890. A value of 0 indicates - # no project number is found. - # - # NOTE: This field is deprecated after we support flexible consumer - # id. New code should not depend on this field anymore. - # @!attribute [rw] type - # @return [::Google::Cloud::ServiceControl::V1::CheckResponse::ConsumerInfo::ConsumerType] - # The type of the consumer which should have been defined in - # [Google Resource Manager](https://cloud.google.com/resource-manager/). - # @!attribute [rw] consumer_number - # @return [::Integer] - # The consumer identity number, can be Google cloud project number, folder - # number or organization number e.g. 1234567890. A value of 0 indicates no - # consumer number is found. - class ConsumerInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the consumer as defined in - # [Google Resource Manager](https://cloud.google.com/resource-manager/). - module ConsumerType - # This is never used. - CONSUMER_TYPE_UNSPECIFIED = 0 - - # The consumer is a Google Cloud Project. - PROJECT = 1 - - # The consumer is a Google Cloud Folder. - FOLDER = 2 - - # The consumer is a Google Cloud Organization. - ORGANIZATION = 3 - - # Service-specific resource container which is defined by the service - # producer to offer their users the ability to manage service control - # functionalities at a finer level of granularity than the PROJECT. - SERVICE_SPECIFIC = 4 - end - end - end - - # Request message for the Report method. - # @!attribute [rw] service_name - # @return [::String] - # The service name as specified in its service configuration. For example, - # `"pubsub.googleapis.com"`. - # - # See - # [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) - # for the definition of a service name. - # @!attribute [rw] operations - # @return [::Array<::Google::Cloud::ServiceControl::V1::Operation>] - # Operations to be reported. - # - # Typically the service should report one operation per request. - # Putting multiple operations into a single request is allowed, but should - # be used only when multiple operations are natually available at the time - # of the report. - # - # There is no limit on the number of operations in the same ReportRequest, - # however the ReportRequest size should be no larger than 1MB. See - # {::Google::Cloud::ServiceControl::V1::ReportResponse#report_errors ReportResponse.report_errors} - # for partial failure behavior. - # @!attribute [rw] service_config_id - # @return [::String] - # Specifies which version of service config should be used to process the - # request. - # - # If unspecified or no matching version can be found, the - # latest one will be used. - class ReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the Report method. - # @!attribute [rw] report_errors - # @return [::Array<::Google::Cloud::ServiceControl::V1::ReportResponse::ReportError>] - # Partial failures, one for each `Operation` in the request that failed - # processing. There are three possible combinations of the RPC status: - # - # 1. The combination of a successful RPC status and an empty `report_errors` - # list indicates a complete success where all `Operations` in the - # request are processed successfully. - # 2. The combination of a successful RPC status and a non-empty - # `report_errors` list indicates a partial success where some - # `Operations` in the request succeeded. Each - # `Operation` that failed processing has a corresponding item - # in this list. - # 3. A failed RPC status indicates a general non-deterministic failure. - # When this happens, it's impossible to know which of the - # 'Operations' in the request succeeded or failed. - # @!attribute [rw] service_config_id - # @return [::String] - # The actual config id used to process the request. - # @!attribute [rw] service_rollout_id - # @return [::String] - # The current service rollout id used to process the request. - class ReportResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the processing error of one - # {::Google::Cloud::ServiceControl::V1::Operation Operation} in the request. - # @!attribute [rw] operation_id - # @return [::String] - # The - # {::Google::Cloud::ServiceControl::V1::Operation#operation_id Operation.operation_id} - # value from the request. - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # Details of the error when processing the - # {::Google::Cloud::ServiceControl::V1::Operation Operation}. - class ReportError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/logging/type/log_severity.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/logging/type/log_severity.rb deleted file mode 100644 index 63f6b0689a92..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/logging/type/log_severity.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Logging - module Type - # The severity of the event described in a log entry, expressed as one of the - # standard severity levels listed below. For your reference, the levels are - # assigned the listed numeric values. The effect of using numeric values other - # than those listed is undefined. - # - # You can filter for log entries by severity. For example, the following - # filter expression will match log entries with severities `INFO`, `NOTICE`, - # and `WARNING`: - # - # severity > DEBUG AND severity <= WARNING - # - # If you are writing log entries, you should map other severity encodings to - # one of these standard levels. For example, you might map all of Java's FINE, - # FINER, and FINEST levels to `LogSeverity.DEBUG`. You can preserve the - # original severity level in the log entry payload if you wish. - module LogSeverity - # (0) The log entry has no assigned severity level. - DEFAULT = 0 - - # (100) Debug or trace information. - DEBUG = 100 - - # (200) Routine information, such as ongoing status or performance. - INFO = 200 - - # (300) Normal but significant events, such as start up, shut down, or - # a configuration change. - NOTICE = 300 - - # (400) Warning events might cause problems. - WARNING = 400 - - # (500) Error events are likely to cause problems. - ERROR = 500 - - # (600) Critical events cause more severe problems or outages. - CRITICAL = 600 - - # (700) A person must take an action immediately. - ALERT = 700 - - # (800) One or more systems are unusable. - EMERGENCY = 800 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-service_control-v1/snippets/Gemfile deleted file mode 100644 index 2860c5bace9a..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-service_control-v1", path: "../" -else - gem "google-cloud-service_control-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/snippets/quota_controller/allocate_quota.rb b/owl-bot-staging/google-cloud-service_control-v1/snippets/quota_controller/allocate_quota.rb deleted file mode 100644 index 6b1f93d4a4b8..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/snippets/quota_controller/allocate_quota.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicecontrol_v1_generated_QuotaController_AllocateQuota_sync] -require "google/cloud/service_control/v1" - -## -# Snippet for the allocate_quota call in the QuotaController service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceControl::V1::QuotaController::Client#allocate_quota. -# -def allocate_quota - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceControl::V1::QuotaController::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new - - # Call the allocate_quota method. - result = client.allocate_quota request - - # The returned object is of type Google::Cloud::ServiceControl::V1::AllocateQuotaResponse. - p result -end -# [END servicecontrol_v1_generated_QuotaController_AllocateQuota_sync] diff --git a/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/check.rb b/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/check.rb deleted file mode 100644 index 2f26d0a78028..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/check.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicecontrol_v1_generated_ServiceController_Check_sync] -require "google/cloud/service_control/v1" - -## -# Snippet for the check call in the ServiceController service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceControl::V1::ServiceController::Client#check. -# -def check - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceControl::V1::ServiceController::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceControl::V1::CheckRequest.new - - # Call the check method. - result = client.check request - - # The returned object is of type Google::Cloud::ServiceControl::V1::CheckResponse. - p result -end -# [END servicecontrol_v1_generated_ServiceController_Check_sync] diff --git a/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/report.rb b/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/report.rb deleted file mode 100644 index cc7c77bb4409..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/snippets/service_controller/report.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicecontrol_v1_generated_ServiceController_Report_sync] -require "google/cloud/service_control/v1" - -## -# Snippet for the report call in the ServiceController service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceControl::V1::ServiceController::Client#report. -# -def report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceControl::V1::ServiceController::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceControl::V1::ReportRequest.new - - # Call the report method. - result = client.report request - - # The returned object is of type Google::Cloud::ServiceControl::V1::ReportResponse. - p result -end -# [END servicecontrol_v1_generated_ServiceController_Report_sync] diff --git a/owl-bot-staging/google-cloud-service_control-v1/snippets/snippet_metadata_google.api.servicecontrol.v1.json b/owl-bot-staging/google-cloud-service_control-v1/snippets/snippet_metadata_google.api.servicecontrol.v1.json deleted file mode 100644 index fc96d4a24ac2..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/snippets/snippet_metadata_google.api.servicecontrol.v1.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-service_control-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.api.servicecontrol.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "servicecontrol_v1_generated_QuotaController_AllocateQuota_sync", - "title": "Snippet for the allocate_quota call in the QuotaController service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceControl::V1::QuotaController::Client#allocate_quota.", - "file": "quota_controller/allocate_quota.rb", - "language": "RUBY", - "client_method": { - "short_name": "allocate_quota", - "full_name": "::Google::Cloud::ServiceControl::V1::QuotaController::Client#allocate_quota", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse", - "client": { - "short_name": "QuotaController::Client", - "full_name": "::Google::Cloud::ServiceControl::V1::QuotaController::Client" - }, - "method": { - "short_name": "AllocateQuota", - "full_name": "google.api.servicecontrol.v1.QuotaController.AllocateQuota", - "service": { - "short_name": "QuotaController", - "full_name": "google.api.servicecontrol.v1.QuotaController" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicecontrol_v1_generated_ServiceController_Check_sync", - "title": "Snippet for the check call in the ServiceController service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceControl::V1::ServiceController::Client#check.", - "file": "service_controller/check.rb", - "language": "RUBY", - "client_method": { - "short_name": "check", - "full_name": "::Google::Cloud::ServiceControl::V1::ServiceController::Client#check", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceControl::V1::CheckRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceControl::V1::CheckResponse", - "client": { - "short_name": "ServiceController::Client", - "full_name": "::Google::Cloud::ServiceControl::V1::ServiceController::Client" - }, - "method": { - "short_name": "Check", - "full_name": "google.api.servicecontrol.v1.ServiceController.Check", - "service": { - "short_name": "ServiceController", - "full_name": "google.api.servicecontrol.v1.ServiceController" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicecontrol_v1_generated_ServiceController_Report_sync", - "title": "Snippet for the report call in the ServiceController service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceControl::V1::ServiceController::Client#report.", - "file": "service_controller/report.rb", - "language": "RUBY", - "client_method": { - "short_name": "report", - "full_name": "::Google::Cloud::ServiceControl::V1::ServiceController::Client#report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceControl::V1::ReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceControl::V1::ReportResponse", - "client": { - "short_name": "ServiceController::Client", - "full_name": "::Google::Cloud::ServiceControl::V1::ServiceController::Client" - }, - "method": { - "short_name": "Report", - "full_name": "google.api.servicecontrol.v1.ServiceController.Report", - "service": { - "short_name": "ServiceController", - "full_name": "google.api.servicecontrol.v1.ServiceController" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_test.rb b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_test.rb deleted file mode 100644 index c1138f0bb2b2..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_rest_test.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/api/servicecontrol/v1/quota_controller_pb" -require "google/cloud/service_control/v1/quota_controller/rest" - - -class ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_allocate_quota - # Create test objects. - client_result = ::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - allocate_operation = {} - service_config_id = "hello world" - - allocate_quota_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::ServiceStub.stub :transcode_allocate_quota_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, allocate_quota_client_stub do - # Create client - c = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.allocate_quota({ service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.allocate_quota service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.allocate_quota ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new(service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.allocate_quota({ service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.allocate_quota(::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new(service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, allocate_quota_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceControl::V1::QuotaController::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_test.rb b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_test.rb deleted file mode 100644 index cdb7686f7d49..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/quota_controller_test.rb +++ /dev/null @@ -1,166 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/api/servicecontrol/v1/quota_controller_pb" -require "google/cloud/service_control/v1/quota_controller" - -class ::Google::Cloud::ServiceControl::V1::QuotaController::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_allocate_quota - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceControl::V1::AllocateQuotaResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - allocate_operation = {} - service_config_id = "hello world" - - allocate_quota_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :allocate_quota, name - assert_kind_of ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest, request - assert_equal "hello world", request["service_name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceControl::V1::QuotaOperation), request["allocate_operation"] - assert_equal "hello world", request["service_config_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, allocate_quota_client_stub do - # Create client - c = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.allocate_quota({ service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.allocate_quota service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.allocate_quota ::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new(service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.allocate_quota({ service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.allocate_quota(::Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new(service_name: service_name, allocate_operation: allocate_operation, service_config_id: service_config_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, allocate_quota_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceControl::V1::QuotaController::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ServiceControl::V1::QuotaController::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_rest_test.rb b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_rest_test.rb deleted file mode 100644 index 5136f3a08c4a..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_rest_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 "gapic/rest" -require "google/api/servicecontrol/v1/service_controller_pb" -require "google/cloud/service_control/v1/service_controller/rest" - - -class ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_check - # Create test objects. - client_result = ::Google::Cloud::ServiceControl::V1::CheckResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - operation = {} - service_config_id = "hello world" - - check_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::ServiceStub.stub :transcode_check_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, check_client_stub do - # Create client - c = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.check({ service_name: service_name, operation: operation, service_config_id: service_config_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.check service_name: service_name, operation: operation, service_config_id: service_config_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.check ::Google::Cloud::ServiceControl::V1::CheckRequest.new(service_name: service_name, operation: operation, service_config_id: service_config_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.check({ service_name: service_name, operation: operation, service_config_id: service_config_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.check(::Google::Cloud::ServiceControl::V1::CheckRequest.new(service_name: service_name, operation: operation, service_config_id: service_config_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, check_client_stub.call_count - end - end - end - - def test_report - # Create test objects. - client_result = ::Google::Cloud::ServiceControl::V1::ReportResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - operations = [{}] - service_config_id = "hello world" - - report_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::ServiceStub.stub :transcode_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, report_client_stub do - # Create client - c = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.report({ service_name: service_name, operations: operations, service_config_id: service_config_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.report service_name: service_name, operations: operations, service_config_id: service_config_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.report ::Google::Cloud::ServiceControl::V1::ReportRequest.new(service_name: service_name, operations: operations, service_config_id: service_config_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.report({ service_name: service_name, operations: operations, service_config_id: service_config_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.report(::Google::Cloud::ServiceControl::V1::ReportRequest.new(service_name: service_name, operations: operations, service_config_id: service_config_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, report_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceControl::V1::ServiceController::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_test.rb b/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_test.rb deleted file mode 100644 index 1c029c06965e..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/test/google/cloud/service_control/v1/service_controller_test.rb +++ /dev/null @@ -1,228 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/api/servicecontrol/v1/service_controller_pb" -require "google/cloud/service_control/v1/service_controller" - -class ::Google::Cloud::ServiceControl::V1::ServiceController::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_check - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceControl::V1::CheckResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - operation = {} - service_config_id = "hello world" - - check_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :check, name - assert_kind_of ::Google::Cloud::ServiceControl::V1::CheckRequest, request - assert_equal "hello world", request["service_name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceControl::V1::Operation), request["operation"] - assert_equal "hello world", request["service_config_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, check_client_stub do - # Create client - c = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.check({ service_name: service_name, operation: operation, service_config_id: service_config_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.check service_name: service_name, operation: operation, service_config_id: service_config_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.check ::Google::Cloud::ServiceControl::V1::CheckRequest.new(service_name: service_name, operation: operation, service_config_id: service_config_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.check({ service_name: service_name, operation: operation, service_config_id: service_config_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.check(::Google::Cloud::ServiceControl::V1::CheckRequest.new(service_name: service_name, operation: operation, service_config_id: service_config_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, check_client_stub.call_rpc_count - end - end - - def test_report - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceControl::V1::ReportResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - operations = [{}] - service_config_id = "hello world" - - report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :report, name - assert_kind_of ::Google::Cloud::ServiceControl::V1::ReportRequest, request - assert_equal "hello world", request["service_name"] - assert_kind_of ::Google::Cloud::ServiceControl::V1::Operation, request["operations"].first - assert_equal "hello world", request["service_config_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, report_client_stub do - # Create client - c = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.report({ service_name: service_name, operations: operations, service_config_id: service_config_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.report service_name: service_name, operations: operations, service_config_id: service_config_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.report ::Google::Cloud::ServiceControl::V1::ReportRequest.new(service_name: service_name, operations: operations, service_config_id: service_config_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.report({ service_name: service_name, operations: operations, service_config_id: service_config_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.report(::Google::Cloud::ServiceControl::V1::ReportRequest.new(service_name: service_name, operations: operations, service_config_id: service_config_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, report_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceControl::V1::ServiceController::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ServiceControl::V1::ServiceController::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-service_control-v1/test/helper.rb b/owl-bot-staging/google-cloud-service_control-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-service_control-v1/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_directory-v1beta1/.gitignore b/owl-bot-staging/google-cloud-service_directory-v1beta1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/.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_directory-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-service_directory-v1beta1/.repo-metadata.json deleted file mode 100644 index 0344f921c12e..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "servicedirectory.googleapis.com", - "api_shortname": "servicedirectory", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-service_directory-v1beta1/latest", - "distribution_name": "google-cloud-service_directory-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "servicedirectory", - "name_pretty": "Service Directory V1beta1 API", - "product_documentation": "https://cloud.google.com/service-directory", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Service directory is the single place to register, browse, and resolve application services. Note that google-cloud-service_directory-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_directory instead. See the readme for more details.", - "ruby-cloud-env-prefix": "SERVICE_DIRECTORY", - "ruby-cloud-product-url": "https://cloud.google.com/service-directory", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-service_directory-v1beta1/.rubocop.yml deleted file mode 100644 index d1efd0d6f24d..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-service_directory-v1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-service_directory-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/.yardopts b/owl-bot-staging/google-cloud-service_directory-v1beta1/.yardopts deleted file mode 100644 index c2eb327a2a4b..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Service Directory V1beta1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_directory-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 6a7d3111b2f5..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-service_directory-v1beta1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-service_directory-v1beta1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/service_directory/v1beta1" - -client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/service_directory/v1beta1" - -::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-service_directory-v1beta1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/service_directory/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-service_directory-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/Gemfile b/owl-bot-staging/google-cloud-service_directory-v1beta1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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_directory-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-service_directory-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/README.md b/owl-bot-staging/google-cloud-service_directory-v1beta1/README.md deleted file mode 100644 index ea0366ca7f26..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Service Directory V1beta1 API - -Service Directory is a platform for discovering, publishing, and connecting services. - -Service directory is the single place to register, browse, and resolve application services. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Service Directory V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-service_directory](https://rubygems.org/gems/google-cloud-service_directory). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-service_directory-v1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/servicedirectory.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/service_directory/v1beta1" - -client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new -request = ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new # (request fields as keyword arguments...) -response = client.resolve_service request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_directory-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/service-directory) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/service_directory/v1beta1" -require "logger" - -client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-service_directory`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-service_directory-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-service_directory`. -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_directory-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-service_directory-v1beta1/Rakefile b/owl-bot-staging/google-cloud-service_directory-v1beta1/Rakefile deleted file mode 100644 index 02b546ed1792..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-service_directory-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SERVICE_DIRECTORY_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SERVICE_DIRECTORY_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SERVICE_DIRECTORY_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_DIRECTORY_TEST_PROJECT=test123 SERVICE_DIRECTORY_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/service_directory/v1beta1/lookup_service/credentials" - ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SERVICE_DIRECTORY_PROJECT"] = project - ENV["SERVICE_DIRECTORY_TEST_PROJECT"] = project - ENV["SERVICE_DIRECTORY_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_directory-v1beta1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-service_directory-v1beta1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-service_directory-v1beta1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-service_directory-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-service_directory-v1beta1" - header "google-cloud-service_directory-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-service_directory-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-service_directory-v1beta1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-service_directory-v1beta1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-service_directory-v1beta1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-service_directory-v1beta1/gapic_metadata.json deleted file mode 100644 index 2ab2d2885e40..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.servicedirectory.v1beta1", - "libraryPackage": "::Google::Cloud::ServiceDirectory::V1beta1", - "services": { - "LookupService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client", - "rpcs": { - "ResolveService": { - "methods": [ - "resolve_service" - ] - } - } - } - } - }, - "RegistrationService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client", - "rpcs": { - "CreateNamespace": { - "methods": [ - "create_namespace" - ] - }, - "ListNamespaces": { - "methods": [ - "list_namespaces" - ] - }, - "GetNamespace": { - "methods": [ - "get_namespace" - ] - }, - "UpdateNamespace": { - "methods": [ - "update_namespace" - ] - }, - "DeleteNamespace": { - "methods": [ - "delete_namespace" - ] - }, - "CreateService": { - "methods": [ - "create_service" - ] - }, - "ListServices": { - "methods": [ - "list_services" - ] - }, - "GetService": { - "methods": [ - "get_service" - ] - }, - "UpdateService": { - "methods": [ - "update_service" - ] - }, - "DeleteService": { - "methods": [ - "delete_service" - ] - }, - "CreateEndpoint": { - "methods": [ - "create_endpoint" - ] - }, - "ListEndpoints": { - "methods": [ - "list_endpoints" - ] - }, - "GetEndpoint": { - "methods": [ - "get_endpoint" - ] - }, - "UpdateEndpoint": { - "methods": [ - "update_endpoint" - ] - }, - "DeleteEndpoint": { - "methods": [ - "delete_endpoint" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/google-cloud-service_directory-v1beta1.gemspec b/owl-bot-staging/google-cloud-service_directory-v1beta1/google-cloud-service_directory-v1beta1.gemspec deleted file mode 100644 index 119b813d7fc5..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/google-cloud-service_directory-v1beta1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/service_directory/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-service_directory-v1beta1" - gem.version = Google::Cloud::ServiceDirectory::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Service directory is the single place to register, browse, and resolve application services. Note that google-cloud-service_directory-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_directory instead. See the readme for more details." - gem.summary = "Service Directory is a platform for discovering, publishing, and connecting services." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.rb deleted file mode 100644 index c08367906250..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google-cloud-service_directory-v1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/service_directory/v1beta1" diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.rb deleted file mode 100644 index 6bcb343006c1..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/service_directory/v1beta1/lookup_service" -require "google/cloud/service_directory/v1beta1/registration_service" -require "google/cloud/service_directory/v1beta1/version" - -module Google - module Cloud - module ServiceDirectory - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/service_directory/v1beta1" - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/service_directory/v1beta1" - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/service_directory/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.rb deleted file mode 100644 index 59fc75fb480d..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module ServiceDirectory - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/service_directory/v1beta1/rest" - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new - # - module V1beta1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceDirectory"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.rb deleted file mode 100644 index 79639aca3a89..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_directory/v1beta1/version" - -require "google/cloud/service_directory/v1beta1/lookup_service/credentials" -require "google/cloud/service_directory/v1beta1/lookup_service/paths" -require "google/cloud/service_directory/v1beta1/lookup_service/client" -require "google/cloud/service_directory/v1beta1/lookup_service/rest" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - ## - # Service Directory API for looking up service data at runtime. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/service_directory/v1beta1/lookup_service" - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/service_directory/v1beta1/lookup_service/rest" - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new - # - module LookupService - end - end - end - end -end - -helper_path = ::File.join __dir__, "lookup_service", "helpers.rb" -require "google/cloud/service_directory/v1beta1/lookup_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb deleted file mode 100644 index 323fb64985c0..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/client.rb +++ /dev/null @@ -1,540 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/servicedirectory/v1beta1/lookup_service_pb" -require "google/cloud/location" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module LookupService - ## - # Client for the LookupService service. - # - # Service Directory API for looking up service data at runtime. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicedirectory.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lookup_service_stub - - ## - # Configure the LookupService Client class. - # - # See {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LookupService clients - # ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceDirectory", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 15.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LookupService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @lookup_service_stub.universe_domain - end - - ## - # Create a new LookupService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LookupService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/servicedirectory/v1beta1/lookup_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @lookup_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @lookup_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @lookup_service_stub.endpoint - config.universe_domain = @lookup_service_stub.universe_domain - config.logger = @lookup_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @lookup_service_stub.logger - end - - # Service calls - - ## - # Returns a {::Google::Cloud::ServiceDirectory::V1beta1::Service service} and its - # associated endpoints. - # Resolving a service is not considered an active developer method. - # - # @overload resolve_service(request, options = nil) - # Pass arguments to `resolve_service` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload resolve_service(name: nil, max_endpoints: nil, endpoint_filter: nil) - # Pass arguments to `resolve_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the service to resolve. - # @param max_endpoints [::Integer] - # Optional. The maximum number of endpoints to return. Defaults to 25. - # Maximum is 100. If a value less than one is specified, the Default is used. - # If a value greater than the Maximum is specified, the Maximum is used. - # @param endpoint_filter [::String] - # Optional. The filter applied to the endpoints of the resolved service. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name`, `address`, `port`, or `metadata.` for - # map field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `metadata.owner` returns endpoints that have a annotation with the key - # `owner`, this is the same as `metadata:owner` - # * `metadata.protocol=gRPC` returns endpoints that have key/value - # `protocol=gRPC` - # * `address=192.108.1.105` returns endpoints that have this address - # * `port>8080` returns endpoints that have port number larger than 8080 - # * - # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - # returns endpoints that have name that is alphabetically later than the - # string, so "endpoint-e" is returned but "endpoint-a" is not - # * - # `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` - # returns the endpoint that has an endpoint_id equal to `ep-1` - # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have - # `owner` in annotation key but value is not `sd` AND have key/value - # `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - # doesn't have a field called "doesnotexist". Since the filter does not - # match any endpoint, it returns no results - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new - # - # # Call the resolve_service method. - # result = client.resolve_service request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse. - # p result - # - def resolve_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.resolve_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.resolve_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.resolve_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lookup_service_stub.call_rpc :resolve_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LookupService API. - # - # This class represents the configuration for LookupService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # resolve_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.resolve_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.resolve_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicedirectory.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the LookupService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `resolve_service` - # @return [::Gapic::Config::Method] - # - attr_reader :resolve_service - - # @private - def initialize parent_rpcs = nil - resolve_service_config = parent_rpcs.resolve_service if parent_rpcs.respond_to? :resolve_service - @resolve_service = ::Gapic::Config::Method.new resolve_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.rb deleted file mode 100644 index 53cdf629fbe5..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module LookupService - # Credentials for the LookupService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SERVICE_DIRECTORY_CREDENTIALS", - "SERVICE_DIRECTORY_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SERVICE_DIRECTORY_CREDENTIALS_JSON", - "SERVICE_DIRECTORY_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.rb deleted file mode 100644 index 50d7bedddd03..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/paths.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module LookupService - # Path helper methods for the LookupService API. - module Paths - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param namespace [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, namespace:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" - - "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb deleted file mode 100644 index 8555356e42e7..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_directory/v1beta1/version" -require "google/cloud/service_directory/v1beta1/bindings_override" - -require "google/cloud/service_directory/v1beta1/lookup_service/credentials" -require "google/cloud/service_directory/v1beta1/lookup_service/paths" -require "google/cloud/service_directory/v1beta1/lookup_service/rest/client" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - ## - # Service Directory API for looking up service data at runtime. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/service_directory/v1beta1/lookup_service/rest" - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new - # - module LookupService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/service_directory/v1beta1/lookup_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb deleted file mode 100644 index f3e781d064b6..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/client.rb +++ /dev/null @@ -1,498 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/servicedirectory/v1beta1/lookup_service_pb" -require "google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module LookupService - module Rest - ## - # REST client for the LookupService service. - # - # Service Directory API for looking up service data at runtime. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicedirectory.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :lookup_service_stub - - ## - # Configure the LookupService Client class. - # - # See {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all LookupService clients - # ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceDirectory", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 15.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the LookupService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @lookup_service_stub.universe_domain - end - - ## - # Create a new LookupService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the LookupService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @lookup_service_stub = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @lookup_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @lookup_service_stub.endpoint - config.universe_domain = @lookup_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @lookup_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @lookup_service_stub.logger - end - - # Service calls - - ## - # Returns a {::Google::Cloud::ServiceDirectory::V1beta1::Service service} and its - # associated endpoints. - # Resolving a service is not considered an active developer method. - # - # @overload resolve_service(request, options = nil) - # Pass arguments to `resolve_service` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload resolve_service(name: nil, max_endpoints: nil, endpoint_filter: nil) - # Pass arguments to `resolve_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the service to resolve. - # @param max_endpoints [::Integer] - # Optional. The maximum number of endpoints to return. Defaults to 25. - # Maximum is 100. If a value less than one is specified, the Default is used. - # If a value greater than the Maximum is specified, the Maximum is used. - # @param endpoint_filter [::String] - # Optional. The filter applied to the endpoints of the resolved service. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name`, `address`, `port`, or `metadata.` for - # map field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `metadata.owner` returns endpoints that have a annotation with the key - # `owner`, this is the same as `metadata:owner` - # * `metadata.protocol=gRPC` returns endpoints that have key/value - # `protocol=gRPC` - # * `address=192.108.1.105` returns endpoints that have this address - # * `port>8080` returns endpoints that have port number larger than 8080 - # * - # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - # returns endpoints that have name that is alphabetically later than the - # string, so "endpoint-e" is returned but "endpoint-a" is not - # * - # `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` - # returns the endpoint that has an endpoint_id equal to `ep-1` - # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have - # `owner` in annotation key but value is not `sd` AND have key/value - # `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - # doesn't have a field called "doesnotexist". Since the filter does not - # match any endpoint, it returns no results - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new - # - # # Call the resolve_service method. - # result = client.resolve_service request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse. - # p result - # - def resolve_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.resolve_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.resolve_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.resolve_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @lookup_service_stub.resolve_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the LookupService REST API. - # - # This class represents the configuration for LookupService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # resolve_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.resolve_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.resolve_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicedirectory.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the LookupService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `resolve_service` - # @return [::Gapic::Config::Method] - # - attr_reader :resolve_service - - # @private - def initialize parent_rpcs = nil - resolve_service_config = parent_rpcs.resolve_service if parent_rpcs.respond_to? :resolve_service - @resolve_service = ::Gapic::Config::Method.new resolve_service_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb deleted file mode 100644 index b7c4ba7a4500..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/lookup_service/rest/service_stub.rb +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/servicedirectory/v1beta1/lookup_service_pb" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module LookupService - module Rest - ## - # REST service stub for the LookupService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the resolve_service REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse] - # A result object deserialized from the server's reply - def resolve_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_resolve_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "resolve_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the resolve_service REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_resolve_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:resolve", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.rb deleted file mode 100644 index 7acfe52f8b07..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_directory/v1beta1/version" - -require "google/cloud/service_directory/v1beta1/registration_service/credentials" -require "google/cloud/service_directory/v1beta1/registration_service/paths" -require "google/cloud/service_directory/v1beta1/registration_service/client" -require "google/cloud/service_directory/v1beta1/registration_service/rest" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - ## - # Service Directory API for registering services. It defines the following - # resource model: - # - # - The API has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Namespace Namespace} - # resources, named `projects/*/locations/*/namespaces/*`. - # - # - Each Namespace has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Service Service} resources, named - # `projects/*/locations/*/namespaces/*/services/*`. - # - # - Each Service has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Endpoint Endpoint} - # resources, named - # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/service_directory/v1beta1/registration_service" - # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/service_directory/v1beta1/registration_service/rest" - # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - module RegistrationService - end - end - end - end -end - -helper_path = ::File.join __dir__, "registration_service", "helpers.rb" -require "google/cloud/service_directory/v1beta1/registration_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb deleted file mode 100644 index 85c0fcefd890..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/client.rb +++ /dev/null @@ -1,2307 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/servicedirectory/v1beta1/registration_service_pb" -require "google/cloud/location" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module RegistrationService - ## - # Client for the RegistrationService service. - # - # Service Directory API for registering services. It defines the following - # resource model: - # - # - The API has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Namespace Namespace} - # resources, named `projects/*/locations/*/namespaces/*`. - # - # - Each Namespace has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Service Service} resources, named - # `projects/*/locations/*/namespaces/*/services/*`. - # - # - Each Service has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Endpoint Endpoint} - # resources, named - # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicedirectory.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :registration_service_stub - - ## - # Configure the RegistrationService Client class. - # - # See {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegistrationService clients - # ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceDirectory", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 15.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegistrationService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @registration_service_stub.universe_domain - end - - ## - # Create a new RegistrationService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegistrationService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/servicedirectory/v1beta1/registration_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @registration_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @registration_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @registration_service_stub.endpoint - config.universe_domain = @registration_service_stub.universe_domain - config.logger = @registration_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @registration_service_stub.logger - end - - # Service calls - - ## - # Creates a namespace, and returns the new namespace. - # - # @overload create_namespace(request, options = nil) - # Pass arguments to `create_namespace` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_namespace(parent: nil, namespace_id: nil, namespace: nil) - # Pass arguments to `create_namespace` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project and location the namespace - # will be created in. - # @param namespace_id [::String] - # Required. The Resource ID must be 1-63 characters long, and comply with - # RFC1035. - # Specifically, the name must be 1-63 characters long and match the regular - # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - # character must be a lowercase letter, and all following characters must - # be a dash, lowercase letter, or digit, except the last character, which - # cannot be a dash. - # @param namespace [::Google::Cloud::ServiceDirectory::V1beta1::Namespace, ::Hash] - # Required. A namespace with initial fields set. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new - # - # # Call the create_namespace method. - # result = client.create_namespace request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. - # p result - # - def create_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_namespace.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_namespace.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :create_namespace, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all namespaces. - # - # @overload list_namespaces(request, options = nil) - # Pass arguments to `list_namespaces` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_namespaces(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_namespaces` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project and location whose namespaces - # you'd like to list. - # @param page_size [::Integer] - # Optional. The maximum number of items to return. The default value is 100. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @param filter [::String] - # Optional. The filter to list results by. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name`, `labels.` for map field, or - # `attributes.` for attributes field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `labels.owner` returns namespaces that have a label with the key - # `owner`, this is the same as `labels:owner` - # * `labels.owner=sd` returns namespaces that have key/value `owner=sd` - # * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` - # returns namespaces that have name that is alphabetically later than the - # string, so "namespace-e" is returned but "namespace-a" is not - # * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have - # `owner` in label key but value is not `sd` AND have key/value `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that namespace - # doesn't have a field called "doesnotexist". Since the filter does not - # match any namespaces, it returns no results - # * `attributes.managed_registration=true` returns namespaces that are - # managed by a GCP product or service - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - # @param order_by [::String] - # Optional. The order to list results by. - # - # General `order_by` string syntax: ` () (,)` - # - # * `` allows value: `name` - # * `` ascending or descending order by ``. If this is - # left blank, `asc` is used - # - # Note that an empty `order_by` string results in default order, which is - # order by `name` in ascending order. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new - # - # # Call the list_namespaces method. - # result = client.list_namespaces request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Namespace. - # p item - # end - # - def list_namespaces request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_namespaces.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_namespaces.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_namespaces.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :list_namespaces, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_namespaces, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a namespace. - # - # @overload get_namespace(request, options = nil) - # Pass arguments to `get_namespace` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_namespace(name: nil) - # Pass arguments to `get_namespace` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the namespace to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new - # - # # Call the get_namespace method. - # result = client.get_namespace request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. - # p result - # - def get_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_namespace.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_namespace.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :get_namespace, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a namespace. - # - # @overload update_namespace(request, options = nil) - # Pass arguments to `update_namespace` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_namespace(namespace: nil, update_mask: nil) - # Pass arguments to `update_namespace` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param namespace [::Google::Cloud::ServiceDirectory::V1beta1::Namespace, ::Hash] - # Required. The updated namespace. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields to be updated in this request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new - # - # # Call the update_namespace method. - # result = client.update_namespace request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. - # p result - # - def update_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_namespace.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.namespace&.name - header_params["namespace.name"] = request.namespace.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_namespace.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :update_namespace, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a namespace. This also deletes all services and endpoints in - # the namespace. - # - # @overload delete_namespace(request, options = nil) - # Pass arguments to `delete_namespace` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_namespace(name: nil) - # Pass arguments to `delete_namespace` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the namespace to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new - # - # # Call the delete_namespace method. - # result = client.delete_namespace request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_namespace.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_namespace.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :delete_namespace, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a service, and returns the new service. - # - # @overload create_service(request, options = nil) - # Pass arguments to `create_service` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_service(parent: nil, service_id: nil, service: nil) - # Pass arguments to `create_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the namespace this service will belong to. - # @param service_id [::String] - # Required. The Resource ID must be 1-63 characters long, and comply with - # RFC1035. - # Specifically, the name must be 1-63 characters long and match the regular - # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - # character must be a lowercase letter, and all following characters must - # be a dash, lowercase letter, or digit, except the last character, which - # cannot be a dash. - # @param service [::Google::Cloud::ServiceDirectory::V1beta1::Service, ::Hash] - # Required. A service with initial fields set. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new - # - # # Call the create_service method. - # result = client.create_service request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. - # p result - # - def create_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :create_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all services belonging to a namespace. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the namespace whose services you'd - # like to list. - # @param page_size [::Integer] - # Optional. The maximum number of items to return. The default value is 100. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @param filter [::String] - # Optional. The filter to list results by. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name` or `metadata.` for map field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `metadata.owner` returns services that have a metadata with the key - # `owner`, this is the same as `metadata:owner` - # * `metadata.protocol=gRPC` returns services that have key/value - # `protocol=gRPC` - # * - # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` - # returns services that have name that is alphabetically later than the - # string, so "service-e" is returned but "service-a" is not - # * `metadata.owner!=sd AND metadata.foo=bar` returns services that have - # `owner` in metadata key but value is not `sd` AND have key/value - # `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that service - # doesn't have a field called "doesnotexist". Since the filter does not - # match any services, it returns no results - # * `attributes.managed_registration=true` returns services that are - # managed - # by a GCP product or service - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - # @param order_by [::String] - # Optional. The order to list results by. - # - # General `order_by` string syntax: ` () (,)` - # - # * `` allows value: `name` - # * `` ascending or descending order by ``. If this is - # left blank, `asc` is used - # - # Note that an empty `order_by` string results in default order, which is - # order by `name` in ascending order. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Service>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Service>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :list_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_services, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a service. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service(name: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the service to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :get_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a service. - # - # @overload update_service(request, options = nil) - # Pass arguments to `update_service` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_service(service: nil, update_mask: nil) - # Pass arguments to `update_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service [::Google::Cloud::ServiceDirectory::V1beta1::Service, ::Hash] - # Required. The updated service. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields to be updated in this request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new - # - # # Call the update_service method. - # result = client.update_service request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. - # p result - # - def update_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service&.name - header_params["service.name"] = request.service.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :update_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a service. This also deletes all endpoints associated with - # the service. - # - # @overload delete_service(request, options = nil) - # Pass arguments to `delete_service` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_service(name: nil) - # Pass arguments to `delete_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the service to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new - # - # # Call the delete_service method. - # result = client.delete_service request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :delete_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an endpoint, and returns the new endpoint. - # - # @overload create_endpoint(request, options = nil) - # Pass arguments to `create_endpoint` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_endpoint(parent: nil, endpoint_id: nil, endpoint: nil) - # Pass arguments to `create_endpoint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the service that this endpoint provides. - # @param endpoint_id [::String] - # Required. The Resource ID must be 1-63 characters long, and comply with - # RFC1035. - # Specifically, the name must be 1-63 characters long and match the regular - # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - # character must be a lowercase letter, and all following characters must - # be a dash, lowercase letter, or digit, except the last character, which - # cannot be a dash. - # @param endpoint [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint, ::Hash] - # Required. A endpoint with initial fields set. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new - # - # # Call the create_endpoint method. - # result = client.create_endpoint request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - # p result - # - def create_endpoint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_endpoint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_endpoint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_endpoint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :create_endpoint, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all endpoints. - # - # @overload list_endpoints(request, options = nil) - # Pass arguments to `list_endpoints` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_endpoints` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the service whose endpoints you'd like to - # list. - # @param page_size [::Integer] - # Optional. The maximum number of items to return. The default value is 100. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @param filter [::String] - # Optional. The filter to list results by. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name`, `address`, `port`, `metadata.` for map - # field, or `attributes.` for attributes field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `metadata.owner` returns endpoints that have a metadata with the key - # `owner`, this is the same as `metadata:owner` - # * `metadata.protocol=gRPC` returns endpoints that have key/value - # `protocol=gRPC` - # * `address=192.108.1.105` returns endpoints that have this address - # * `port>8080` returns endpoints that have port number larger than 8080 - # * - # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - # returns endpoints that have name that is alphabetically later than the - # string, so "endpoint-e" is returned but "endpoint-a" is not - # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have - # `owner` in metadata key but value is not `sd` AND have key/value - # `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - # doesn't have a field called "doesnotexist". Since the filter does not - # match any endpoints, it returns no results - # * `attributes.kubernetes_resource_type=KUBERNETES_RESOURCE_TYPE_CLUSTER_ - # IP` returns endpoints with the corresponding kubernetes_resource_type - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - # @param order_by [::String] - # Optional. The order to list results by. - # - # General `order_by` string syntax: ` () (,)` - # - # * `` allows values: `name`, `address`, `port` - # * `` ascending or descending order by ``. If this is - # left blank, `asc` is used - # - # Note that an empty `order_by` string results in default order, which is - # order by `name` in ascending order. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new - # - # # Call the list_endpoints method. - # result = client.list_endpoints request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - # p item - # end - # - def list_endpoints request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_endpoints.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_endpoints.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_endpoints.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :list_endpoints, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registration_service_stub, :list_endpoints, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an endpoint. - # - # @overload get_endpoint(request, options = nil) - # Pass arguments to `get_endpoint` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_endpoint(name: nil) - # Pass arguments to `get_endpoint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the endpoint to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new - # - # # Call the get_endpoint method. - # result = client.get_endpoint request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - # p result - # - def get_endpoint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_endpoint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_endpoint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_endpoint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :get_endpoint, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an endpoint. - # - # @overload update_endpoint(request, options = nil) - # Pass arguments to `update_endpoint` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_endpoint(endpoint: nil, update_mask: nil) - # Pass arguments to `update_endpoint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param endpoint [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint, ::Hash] - # Required. The updated endpoint. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields to be updated in this request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new - # - # # Call the update_endpoint method. - # result = client.update_endpoint request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - # p result - # - def update_endpoint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_endpoint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.endpoint&.name - header_params["endpoint.name"] = request.endpoint.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_endpoint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_endpoint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :update_endpoint, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an endpoint. - # - # @overload delete_endpoint(request, options = nil) - # Pass arguments to `delete_endpoint` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_endpoint(name: nil) - # Pass arguments to `delete_endpoint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the endpoint to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new - # - # # Call the delete_endpoint method. - # result = client.delete_endpoint request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_endpoint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_endpoint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_endpoint.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_endpoint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :delete_endpoint, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM Policy for a resource - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM Policy for a resource - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Tests IAM permissions for a resource (namespace, service or - # service workload only). - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the RegistrationService API. - # - # This class represents the configuration for RegistrationService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_namespace to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_namespace.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_namespace.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicedirectory.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the RegistrationService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :create_namespace - ## - # RPC-specific configuration for `list_namespaces` - # @return [::Gapic::Config::Method] - # - attr_reader :list_namespaces - ## - # RPC-specific configuration for `get_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :get_namespace - ## - # RPC-specific configuration for `update_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :update_namespace - ## - # RPC-specific configuration for `delete_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_namespace - ## - # RPC-specific configuration for `create_service` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `update_service` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service - ## - # RPC-specific configuration for `delete_service` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service - ## - # RPC-specific configuration for `create_endpoint` - # @return [::Gapic::Config::Method] - # - attr_reader :create_endpoint - ## - # RPC-specific configuration for `list_endpoints` - # @return [::Gapic::Config::Method] - # - attr_reader :list_endpoints - ## - # RPC-specific configuration for `get_endpoint` - # @return [::Gapic::Config::Method] - # - attr_reader :get_endpoint - ## - # RPC-specific configuration for `update_endpoint` - # @return [::Gapic::Config::Method] - # - attr_reader :update_endpoint - ## - # RPC-specific configuration for `delete_endpoint` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_endpoint - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - create_namespace_config = parent_rpcs.create_namespace if parent_rpcs.respond_to? :create_namespace - @create_namespace = ::Gapic::Config::Method.new create_namespace_config - list_namespaces_config = parent_rpcs.list_namespaces if parent_rpcs.respond_to? :list_namespaces - @list_namespaces = ::Gapic::Config::Method.new list_namespaces_config - get_namespace_config = parent_rpcs.get_namespace if parent_rpcs.respond_to? :get_namespace - @get_namespace = ::Gapic::Config::Method.new get_namespace_config - update_namespace_config = parent_rpcs.update_namespace if parent_rpcs.respond_to? :update_namespace - @update_namespace = ::Gapic::Config::Method.new update_namespace_config - delete_namespace_config = parent_rpcs.delete_namespace if parent_rpcs.respond_to? :delete_namespace - @delete_namespace = ::Gapic::Config::Method.new delete_namespace_config - create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service - @create_service = ::Gapic::Config::Method.new create_service_config - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service - @update_service = ::Gapic::Config::Method.new update_service_config - delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service - @delete_service = ::Gapic::Config::Method.new delete_service_config - create_endpoint_config = parent_rpcs.create_endpoint if parent_rpcs.respond_to? :create_endpoint - @create_endpoint = ::Gapic::Config::Method.new create_endpoint_config - list_endpoints_config = parent_rpcs.list_endpoints if parent_rpcs.respond_to? :list_endpoints - @list_endpoints = ::Gapic::Config::Method.new list_endpoints_config - get_endpoint_config = parent_rpcs.get_endpoint if parent_rpcs.respond_to? :get_endpoint - @get_endpoint = ::Gapic::Config::Method.new get_endpoint_config - update_endpoint_config = parent_rpcs.update_endpoint if parent_rpcs.respond_to? :update_endpoint - @update_endpoint = ::Gapic::Config::Method.new update_endpoint_config - delete_endpoint_config = parent_rpcs.delete_endpoint if parent_rpcs.respond_to? :delete_endpoint - @delete_endpoint = ::Gapic::Config::Method.new delete_endpoint_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.rb deleted file mode 100644 index d90bb79b2ad3..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module RegistrationService - # Credentials for the RegistrationService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SERVICE_DIRECTORY_CREDENTIALS", - "SERVICE_DIRECTORY_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SERVICE_DIRECTORY_CREDENTIALS_JSON", - "SERVICE_DIRECTORY_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb deleted file mode 100644 index 7d67a139666f..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/paths.rb +++ /dev/null @@ -1,130 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module RegistrationService - # Path helper methods for the RegistrationService API. - module Paths - ## - # Create a fully-qualified Endpoint resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint}` - # - # @param project [String] - # @param location [String] - # @param namespace [String] - # @param service [String] - # @param endpoint [String] - # - # @return [::String] - def endpoint_path project:, location:, namespace:, service:, endpoint: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" - raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/" - - "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}/endpoints/#{endpoint}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Namespace resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/namespaces/{namespace}` - # - # @param project [String] - # @param location [String] - # @param namespace [String] - # - # @return [::String] - def namespace_path project:, location:, namespace: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/namespaces/#{namespace}" - end - - ## - # Create a fully-qualified Network resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/global/networks/{network}` - # - # @param project [String] - # @param network [String] - # - # @return [::String] - def network_path project:, network: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/global/networks/#{network}" - end - - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param namespace [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, namespace:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" - - "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb deleted file mode 100644 index 3cf7fab4eda2..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_directory/v1beta1/version" -require "google/cloud/service_directory/v1beta1/bindings_override" - -require "google/cloud/service_directory/v1beta1/registration_service/credentials" -require "google/cloud/service_directory/v1beta1/registration_service/paths" -require "google/cloud/service_directory/v1beta1/registration_service/rest/client" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - ## - # Service Directory API for registering services. It defines the following - # resource model: - # - # - The API has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Namespace Namespace} - # resources, named `projects/*/locations/*/namespaces/*`. - # - # - Each Namespace has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Service Service} resources, named - # `projects/*/locations/*/namespaces/*/services/*`. - # - # - Each Service has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Endpoint Endpoint} - # resources, named - # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/service_directory/v1beta1/registration_service/rest" - # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - module RegistrationService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/service_directory/v1beta1/registration_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb deleted file mode 100644 index 6e0e19fc93b3..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/client.rb +++ /dev/null @@ -1,2146 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/servicedirectory/v1beta1/registration_service_pb" -require "google/cloud/service_directory/v1beta1/registration_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module RegistrationService - module Rest - ## - # REST client for the RegistrationService service. - # - # Service Directory API for registering services. It defines the following - # resource model: - # - # - The API has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Namespace Namespace} - # resources, named `projects/*/locations/*/namespaces/*`. - # - # - Each Namespace has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Service Service} resources, named - # `projects/*/locations/*/namespaces/*/services/*`. - # - # - Each Service has a collection of - # {::Google::Cloud::ServiceDirectory::V1beta1::Endpoint Endpoint} - # resources, named - # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicedirectory.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :registration_service_stub - - ## - # Configure the RegistrationService Client class. - # - # See {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RegistrationService clients - # ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceDirectory", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 15.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RegistrationService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @registration_service_stub.universe_domain - end - - ## - # Create a new RegistrationService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RegistrationService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @registration_service_stub = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @registration_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @registration_service_stub.endpoint - config.universe_domain = @registration_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @registration_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @registration_service_stub.logger - end - - # Service calls - - ## - # Creates a namespace, and returns the new namespace. - # - # @overload create_namespace(request, options = nil) - # Pass arguments to `create_namespace` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_namespace(parent: nil, namespace_id: nil, namespace: nil) - # Pass arguments to `create_namespace` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project and location the namespace - # will be created in. - # @param namespace_id [::String] - # Required. The Resource ID must be 1-63 characters long, and comply with - # RFC1035. - # Specifically, the name must be 1-63 characters long and match the regular - # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - # character must be a lowercase letter, and all following characters must - # be a dash, lowercase letter, or digit, except the last character, which - # cannot be a dash. - # @param namespace [::Google::Cloud::ServiceDirectory::V1beta1::Namespace, ::Hash] - # Required. A namespace with initial fields set. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new - # - # # Call the create_namespace method. - # result = client.create_namespace request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. - # p result - # - def create_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_namespace.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_namespace.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.create_namespace request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all namespaces. - # - # @overload list_namespaces(request, options = nil) - # Pass arguments to `list_namespaces` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_namespaces(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_namespaces` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project and location whose namespaces - # you'd like to list. - # @param page_size [::Integer] - # Optional. The maximum number of items to return. The default value is 100. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @param filter [::String] - # Optional. The filter to list results by. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name`, `labels.` for map field, or - # `attributes.` for attributes field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `labels.owner` returns namespaces that have a label with the key - # `owner`, this is the same as `labels:owner` - # * `labels.owner=sd` returns namespaces that have key/value `owner=sd` - # * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` - # returns namespaces that have name that is alphabetically later than the - # string, so "namespace-e" is returned but "namespace-a" is not - # * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have - # `owner` in label key but value is not `sd` AND have key/value `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that namespace - # doesn't have a field called "doesnotexist". Since the filter does not - # match any namespaces, it returns no results - # * `attributes.managed_registration=true` returns namespaces that are - # managed by a GCP product or service - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - # @param order_by [::String] - # Optional. The order to list results by. - # - # General `order_by` string syntax: ` () (,)` - # - # * `` allows value: `name` - # * `` ascending or descending order by ``. If this is - # left blank, `asc` is used - # - # Note that an empty `order_by` string results in default order, which is - # order by `name` in ascending order. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new - # - # # Call the list_namespaces method. - # result = client.list_namespaces request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Namespace. - # p item - # end - # - def list_namespaces request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_namespaces.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_namespaces.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_namespaces.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.list_namespaces request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registration_service_stub, :list_namespaces, "namespaces", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a namespace. - # - # @overload get_namespace(request, options = nil) - # Pass arguments to `get_namespace` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_namespace(name: nil) - # Pass arguments to `get_namespace` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the namespace to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new - # - # # Call the get_namespace method. - # result = client.get_namespace request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. - # p result - # - def get_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_namespace.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_namespace.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.get_namespace request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a namespace. - # - # @overload update_namespace(request, options = nil) - # Pass arguments to `update_namespace` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_namespace(namespace: nil, update_mask: nil) - # Pass arguments to `update_namespace` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param namespace [::Google::Cloud::ServiceDirectory::V1beta1::Namespace, ::Hash] - # Required. The updated namespace. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields to be updated in this request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new - # - # # Call the update_namespace method. - # result = client.update_namespace request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. - # p result - # - def update_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_namespace.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_namespace.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.update_namespace request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a namespace. This also deletes all services and endpoints in - # the namespace. - # - # @overload delete_namespace(request, options = nil) - # Pass arguments to `delete_namespace` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_namespace(name: nil) - # Pass arguments to `delete_namespace` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the namespace to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new - # - # # Call the delete_namespace method. - # result = client.delete_namespace request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_namespace.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_namespace.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.delete_namespace request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a service, and returns the new service. - # - # @overload create_service(request, options = nil) - # Pass arguments to `create_service` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_service(parent: nil, service_id: nil, service: nil) - # Pass arguments to `create_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the namespace this service will belong to. - # @param service_id [::String] - # Required. The Resource ID must be 1-63 characters long, and comply with - # RFC1035. - # Specifically, the name must be 1-63 characters long and match the regular - # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - # character must be a lowercase letter, and all following characters must - # be a dash, lowercase letter, or digit, except the last character, which - # cannot be a dash. - # @param service [::Google::Cloud::ServiceDirectory::V1beta1::Service, ::Hash] - # Required. A service with initial fields set. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new - # - # # Call the create_service method. - # result = client.create_service request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. - # p result - # - def create_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.create_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all services belonging to a namespace. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the namespace whose services you'd - # like to list. - # @param page_size [::Integer] - # Optional. The maximum number of items to return. The default value is 100. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @param filter [::String] - # Optional. The filter to list results by. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name` or `metadata.` for map field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `metadata.owner` returns services that have a metadata with the key - # `owner`, this is the same as `metadata:owner` - # * `metadata.protocol=gRPC` returns services that have key/value - # `protocol=gRPC` - # * - # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` - # returns services that have name that is alphabetically later than the - # string, so "service-e" is returned but "service-a" is not - # * `metadata.owner!=sd AND metadata.foo=bar` returns services that have - # `owner` in metadata key but value is not `sd` AND have key/value - # `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that service - # doesn't have a field called "doesnotexist". Since the filter does not - # match any services, it returns no results - # * `attributes.managed_registration=true` returns services that are - # managed - # by a GCP product or service - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - # @param order_by [::String] - # Optional. The order to list results by. - # - # General `order_by` string syntax: ` () (,)` - # - # * `` allows value: `name` - # * `` ascending or descending order by ``. If this is - # left blank, `asc` is used - # - # Note that an empty `order_by` string results in default order, which is - # order by `name` in ascending order. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Service>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Service>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.list_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registration_service_stub, :list_services, "services", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a service. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service(name: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the service to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.get_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a service. - # - # @overload update_service(request, options = nil) - # Pass arguments to `update_service` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_service(service: nil, update_mask: nil) - # Pass arguments to `update_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service [::Google::Cloud::ServiceDirectory::V1beta1::Service, ::Hash] - # Required. The updated service. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields to be updated in this request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new - # - # # Call the update_service method. - # result = client.update_service request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. - # p result - # - def update_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.update_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a service. This also deletes all endpoints associated with - # the service. - # - # @overload delete_service(request, options = nil) - # Pass arguments to `delete_service` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_service(name: nil) - # Pass arguments to `delete_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the service to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new - # - # # Call the delete_service method. - # result = client.delete_service request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.delete_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an endpoint, and returns the new endpoint. - # - # @overload create_endpoint(request, options = nil) - # Pass arguments to `create_endpoint` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_endpoint(parent: nil, endpoint_id: nil, endpoint: nil) - # Pass arguments to `create_endpoint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the service that this endpoint provides. - # @param endpoint_id [::String] - # Required. The Resource ID must be 1-63 characters long, and comply with - # RFC1035. - # Specifically, the name must be 1-63 characters long and match the regular - # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - # character must be a lowercase letter, and all following characters must - # be a dash, lowercase letter, or digit, except the last character, which - # cannot be a dash. - # @param endpoint [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint, ::Hash] - # Required. A endpoint with initial fields set. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new - # - # # Call the create_endpoint method. - # result = client.create_endpoint request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - # p result - # - def create_endpoint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_endpoint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_endpoint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_endpoint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.create_endpoint request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all endpoints. - # - # @overload list_endpoints(request, options = nil) - # Pass arguments to `list_endpoints` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_endpoints` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the service whose endpoints you'd like to - # list. - # @param page_size [::Integer] - # Optional. The maximum number of items to return. The default value is 100. - # @param page_token [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @param filter [::String] - # Optional. The filter to list results by. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name`, `address`, `port`, `metadata.` for map - # field, or `attributes.` for attributes field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `metadata.owner` returns endpoints that have a metadata with the key - # `owner`, this is the same as `metadata:owner` - # * `metadata.protocol=gRPC` returns endpoints that have key/value - # `protocol=gRPC` - # * `address=192.108.1.105` returns endpoints that have this address - # * `port>8080` returns endpoints that have port number larger than 8080 - # * - # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - # returns endpoints that have name that is alphabetically later than the - # string, so "endpoint-e" is returned but "endpoint-a" is not - # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have - # `owner` in metadata key but value is not `sd` AND have key/value - # `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - # doesn't have a field called "doesnotexist". Since the filter does not - # match any endpoints, it returns no results - # * `attributes.kubernetes_resource_type=KUBERNETES_RESOURCE_TYPE_CLUSTER_ - # IP` returns endpoints with the corresponding kubernetes_resource_type - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - # @param order_by [::String] - # Optional. The order to list results by. - # - # General `order_by` string syntax: ` () (,)` - # - # * `` allows values: `name`, `address`, `port` - # * `` ascending or descending order by ``. If this is - # left blank, `asc` is used - # - # Note that an empty `order_by` string results in default order, which is - # order by `name` in ascending order. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new - # - # # Call the list_endpoints method. - # result = client.list_endpoints request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - # p item - # end - # - def list_endpoints request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_endpoints.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_endpoints.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_endpoints.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.list_endpoints request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registration_service_stub, :list_endpoints, "endpoints", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an endpoint. - # - # @overload get_endpoint(request, options = nil) - # Pass arguments to `get_endpoint` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_endpoint(name: nil) - # Pass arguments to `get_endpoint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the endpoint to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new - # - # # Call the get_endpoint method. - # result = client.get_endpoint request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - # p result - # - def get_endpoint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_endpoint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_endpoint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_endpoint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.get_endpoint request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an endpoint. - # - # @overload update_endpoint(request, options = nil) - # Pass arguments to `update_endpoint` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_endpoint(endpoint: nil, update_mask: nil) - # Pass arguments to `update_endpoint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param endpoint [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint, ::Hash] - # Required. The updated endpoint. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. List of fields to be updated in this request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new - # - # # Call the update_endpoint method. - # result = client.update_endpoint request - # - # # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - # p result - # - def update_endpoint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_endpoint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_endpoint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_endpoint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.update_endpoint request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an endpoint. - # - # @overload delete_endpoint(request, options = nil) - # Pass arguments to `delete_endpoint` via a request object, either of type - # {::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_endpoint(name: nil) - # Pass arguments to `delete_endpoint` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the endpoint to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new - # - # # Call the delete_endpoint method. - # result = client.delete_endpoint request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_endpoint request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_endpoint.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_endpoint.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_endpoint.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.delete_endpoint request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM Policy for a resource - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM Policy for a resource - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Tests IAM permissions for a resource (namespace, service or - # service workload only). - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_directory/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceDirectory::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registration_service_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the RegistrationService REST API. - # - # This class represents the configuration for RegistrationService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_namespace to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_namespace.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_namespace.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicedirectory.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the RegistrationService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :create_namespace - ## - # RPC-specific configuration for `list_namespaces` - # @return [::Gapic::Config::Method] - # - attr_reader :list_namespaces - ## - # RPC-specific configuration for `get_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :get_namespace - ## - # RPC-specific configuration for `update_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :update_namespace - ## - # RPC-specific configuration for `delete_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_namespace - ## - # RPC-specific configuration for `create_service` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `update_service` - # @return [::Gapic::Config::Method] - # - attr_reader :update_service - ## - # RPC-specific configuration for `delete_service` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service - ## - # RPC-specific configuration for `create_endpoint` - # @return [::Gapic::Config::Method] - # - attr_reader :create_endpoint - ## - # RPC-specific configuration for `list_endpoints` - # @return [::Gapic::Config::Method] - # - attr_reader :list_endpoints - ## - # RPC-specific configuration for `get_endpoint` - # @return [::Gapic::Config::Method] - # - attr_reader :get_endpoint - ## - # RPC-specific configuration for `update_endpoint` - # @return [::Gapic::Config::Method] - # - attr_reader :update_endpoint - ## - # RPC-specific configuration for `delete_endpoint` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_endpoint - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - create_namespace_config = parent_rpcs.create_namespace if parent_rpcs.respond_to? :create_namespace - @create_namespace = ::Gapic::Config::Method.new create_namespace_config - list_namespaces_config = parent_rpcs.list_namespaces if parent_rpcs.respond_to? :list_namespaces - @list_namespaces = ::Gapic::Config::Method.new list_namespaces_config - get_namespace_config = parent_rpcs.get_namespace if parent_rpcs.respond_to? :get_namespace - @get_namespace = ::Gapic::Config::Method.new get_namespace_config - update_namespace_config = parent_rpcs.update_namespace if parent_rpcs.respond_to? :update_namespace - @update_namespace = ::Gapic::Config::Method.new update_namespace_config - delete_namespace_config = parent_rpcs.delete_namespace if parent_rpcs.respond_to? :delete_namespace - @delete_namespace = ::Gapic::Config::Method.new delete_namespace_config - create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service - @create_service = ::Gapic::Config::Method.new create_service_config - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - update_service_config = parent_rpcs.update_service if parent_rpcs.respond_to? :update_service - @update_service = ::Gapic::Config::Method.new update_service_config - delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service - @delete_service = ::Gapic::Config::Method.new delete_service_config - create_endpoint_config = parent_rpcs.create_endpoint if parent_rpcs.respond_to? :create_endpoint - @create_endpoint = ::Gapic::Config::Method.new create_endpoint_config - list_endpoints_config = parent_rpcs.list_endpoints if parent_rpcs.respond_to? :list_endpoints - @list_endpoints = ::Gapic::Config::Method.new list_endpoints_config - get_endpoint_config = parent_rpcs.get_endpoint if parent_rpcs.respond_to? :get_endpoint - @get_endpoint = ::Gapic::Config::Method.new get_endpoint_config - update_endpoint_config = parent_rpcs.update_endpoint if parent_rpcs.respond_to? :update_endpoint - @update_endpoint = ::Gapic::Config::Method.new update_endpoint_config - delete_endpoint_config = parent_rpcs.delete_endpoint if parent_rpcs.respond_to? :delete_endpoint - @delete_endpoint = ::Gapic::Config::Method.new delete_endpoint_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb deleted file mode 100644 index c4fcd4b792c1..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/registration_service/rest/service_stub.rb +++ /dev/null @@ -1,1236 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/servicedirectory/v1beta1/registration_service_pb" - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module RegistrationService - module Rest - ## - # REST service stub for the RegistrationService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_namespace REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # A result object deserialized from the server's reply - def create_namespace request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_namespace_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_namespace", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_namespaces REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse] - # A result object deserialized from the server's reply - def list_namespaces request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_namespaces_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_namespaces", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_namespace REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # A result object deserialized from the server's reply - def get_namespace request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_namespace_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_namespace", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_namespace REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # A result object deserialized from the server's reply - def update_namespace request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_namespace_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_namespace", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_namespace REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_namespace request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_namespace_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_namespace", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_service REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # A result object deserialized from the server's reply - def create_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_services REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse] - # A result object deserialized from the server's reply - def list_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # A result object deserialized from the server's reply - def get_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_service REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # A result object deserialized from the server's reply - def update_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_service REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_endpoint REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # A result object deserialized from the server's reply - def create_endpoint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_endpoint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_endpoint", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_endpoints REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse] - # A result object deserialized from the server's reply - def list_endpoints request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_endpoints_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_endpoints", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_endpoint REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # A result object deserialized from the server's reply - def get_endpoint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_endpoint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_endpoint", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_endpoint REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # A result object deserialized from the server's reply - def update_endpoint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_endpoint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_endpoint", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_endpoint REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_endpoint request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_endpoint_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_endpoint", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_namespace REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_namespace_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/namespaces", - body: "namespace", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_namespaces REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_namespaces_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/namespaces", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_namespace REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_namespace_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_namespace REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_namespace_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{namespace.name}", - body: "namespace", - matches: [ - ["namespace.name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_namespace REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_namespace_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/services", - body: "service", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_services REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/services", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_service REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{service.name}", - body: "service", - matches: [ - ["service.name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_endpoint REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_endpoint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/endpoints", - body: "endpoint", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_endpoints REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_endpoints_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/endpoints", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_endpoint REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_endpoint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_endpoint REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_endpoint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{endpoint.name}", - body: "endpoint", - matches: [ - ["endpoint.name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_endpoint REST call - # - # @param request_pb [::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_endpoint_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.rb deleted file mode 100644 index 134b4ad50df3..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/service_directory/v1beta1/lookup_service/rest" -require "google/cloud/service_directory/v1beta1/registration_service/rest" -require "google/cloud/service_directory/v1beta1/bindings_override" -require "google/cloud/service_directory/v1beta1/version" - -module Google - module Cloud - module ServiceDirectory - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/service_directory/v1beta1/rest" - # client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new - # - module V1beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/version.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/version.rb deleted file mode 100644 index 36b1b4ea06f2..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/service_directory/v1beta1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/endpoint_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/endpoint_pb.rb deleted file mode 100644 index cfaf5542a650..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/endpoint_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/servicedirectory/v1beta1/endpoint.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/servicedirectory/v1beta1/endpoint.proto\x12%google.cloud.servicedirectory.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x04\n\x08\x45ndpoint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04port\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12T\n\x08metadata\x18\x04 \x03(\x0b\x32=.google.cloud.servicedirectory.v1beta1.Endpoint.MetadataEntryB\x03\xe0\x41\x01\x12@\n\x07network\x18\x05 \x01(\tB/\xe0\x41\x05\xfa\x41)\n\'servicedirectory.googleapis.com/Network\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x96\x01\xea\x41\x92\x01\n(servicedirectory.googleapis.com/Endpoint\x12\x66projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint}B\xf2\x02\n)com.google.cloud.servicedirectory.v1beta1B\rEndpointProtoP\x01ZUcloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb;servicedirectorypb\xaa\x02%Google.Cloud.ServiceDirectory.V1Beta1\xca\x02%Google\\Cloud\\ServiceDirectory\\V1beta1\xea\x02(Google::Cloud::ServiceDirectory::V1beta1\xea\x41\x61\n\'servicedirectory.googleapis.com/Network\x12\x36projects/{project}/locations/global/networks/{network}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - Endpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.Endpoint").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_pb.rb deleted file mode 100644 index 02a971e3be35..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/servicedirectory/v1beta1/lookup_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/servicedirectory/v1beta1/service_pb' - - -descriptor_data = "\n:google/cloud/servicedirectory/v1beta1/lookup_service.proto\x12%google.cloud.servicedirectory.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/servicedirectory/v1beta1/service.proto\"\x90\x01\n\x15ResolveServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x1a\n\rmax_endpoints\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0f\x65ndpoint_filter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Y\n\x16ResolveServiceResponse\x12?\n\x07service\x18\x01 \x01(\x0b\x32..google.cloud.servicedirectory.v1beta1.Service2\xc7\x02\n\rLookupService\x12\xe0\x01\n\x0eResolveService\x12<.google.cloud.servicedirectory.v1beta1.ResolveServiceRequest\x1a=.google.cloud.servicedirectory.v1beta1.ResolveServiceResponse\"Q\x82\xd3\xe4\x93\x02K\"F/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*}:resolve:\x01*\x1aS\xca\x41\x1fservicedirectory.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x93\x02\n)com.google.cloud.servicedirectory.v1beta1B\x12LookupServiceProtoP\x01ZUcloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb;servicedirectorypb\xaa\x02%Google.Cloud.ServiceDirectory.V1Beta1\xca\x02%Google\\Cloud\\ServiceDirectory\\V1beta1\xea\x02(Google::Cloud::ServiceDirectory::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - ResolveServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ResolveServiceRequest").msgclass - ResolveServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ResolveServiceResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb deleted file mode 100644 index dd25c43fecfb..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/lookup_service_services_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/servicedirectory/v1beta1/lookup_service.proto for package 'Google.Cloud.ServiceDirectory.V1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/servicedirectory/v1beta1/lookup_service_pb' - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module LookupService - # Service Directory API for looking up service data at runtime. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.servicedirectory.v1beta1.LookupService' - - # Returns a [service][google.cloud.servicedirectory.v1beta1.Service] and its - # associated endpoints. - # Resolving a service is not considered an active developer method. - rpc :ResolveService, ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/namespace_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/namespace_pb.rb deleted file mode 100644 index 31939c1f5a8a..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/namespace_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/servicedirectory/v1beta1/namespace.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/servicedirectory/v1beta1/namespace.proto\x12%google.cloud.servicedirectory.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8e\x03\n\tNamespace\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12Q\n\x06labels\x18\x02 \x03(\x0b\x32<.google.cloud.servicedirectory.v1beta1.Namespace.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:n\xea\x41k\n)servicedirectory.googleapis.com/Namespace\x12>projects/{project}/locations/{location}/namespaces/{namespace}B\x8f\x02\n)com.google.cloud.servicedirectory.v1beta1B\x0eNamespaceProtoP\x01ZUcloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb;servicedirectorypb\xaa\x02%Google.Cloud.ServiceDirectory.V1Beta1\xca\x02%Google\\Cloud\\ServiceDirectory\\V1beta1\xea\x02(Google::Cloud::ServiceDirectory::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - Namespace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.Namespace").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_pb.rb deleted file mode 100644 index a9424447815d..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/servicedirectory/v1beta1/registration_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/servicedirectory/v1beta1/endpoint_pb' -require 'google/cloud/servicedirectory/v1beta1/namespace_pb' -require 'google/cloud/servicedirectory/v1beta1/service_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n@google/cloud/servicedirectory/v1beta1/registration_service.proto\x12%google.cloud.servicedirectory.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/servicedirectory/v1beta1/endpoint.proto\x1a\x35google/cloud/servicedirectory/v1beta1/namespace.proto\x1a\x33google/cloud/servicedirectory/v1beta1/service.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb8\x01\n\x16\x43reateNamespaceRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x19\n\x0cnamespace_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\tnamespace\x18\x03 \x01(\x0b\x32\x30.google.cloud.servicedirectory.v1beta1.NamespaceB\x03\xe0\x41\x02\"\xaf\x01\n\x15ListNamespacesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"w\n\x16ListNamespacesResponse\x12\x44\n\nnamespaces\x18\x01 \x03(\x0b\x32\x30.google.cloud.servicedirectory.v1beta1.Namespace\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"V\n\x13GetNamespaceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)servicedirectory.googleapis.com/Namespace\"\x98\x01\n\x16UpdateNamespaceRequest\x12H\n\tnamespace\x18\x01 \x01(\x0b\x32\x30.google.cloud.servicedirectory.v1beta1.NamespaceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"Y\n\x16\x44\x65leteNamespaceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)servicedirectory.googleapis.com/Namespace\"\xb8\x01\n\x14\x43reateServiceRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)servicedirectory.googleapis.com/Namespace\x12\x17\n\nservice_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x07service\x18\x03 \x01(\x0b\x32..google.cloud.servicedirectory.v1beta1.ServiceB\x03\xe0\x41\x02\"\xb5\x01\n\x13ListServicesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)servicedirectory.googleapis.com/Namespace\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"q\n\x14ListServicesResponse\x12@\n\x08services\x18\x01 \x03(\x0b\x32..google.cloud.servicedirectory.v1beta1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x11GetServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\x92\x01\n\x14UpdateServiceRequest\x12\x44\n\x07service\x18\x01 \x01(\x0b\x32..google.cloud.servicedirectory.v1beta1.ServiceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"U\n\x14\x44\x65leteServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\xba\x01\n\x15\x43reateEndpointRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x18\n\x0b\x65ndpoint_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x08\x65ndpoint\x18\x03 \x01(\x0b\x32/.google.cloud.servicedirectory.v1beta1.EndpointB\x03\xe0\x41\x02\"\xb4\x01\n\x14ListEndpointsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"t\n\x15ListEndpointsResponse\x12\x42\n\tendpoints\x18\x01 \x03(\x0b\x32/.google.cloud.servicedirectory.v1beta1.Endpoint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"T\n\x12GetEndpointRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(servicedirectory.googleapis.com/Endpoint\"\x95\x01\n\x15UpdateEndpointRequest\x12\x46\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32/.google.cloud.servicedirectory.v1beta1.EndpointB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"W\n\x15\x44\x65leteEndpointRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(servicedirectory.googleapis.com/Endpoint2\xda\"\n\x13RegistrationService\x12\xea\x01\n\x0f\x43reateNamespace\x12=.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest\x1a\x30.google.cloud.servicedirectory.v1beta1.Namespace\"f\xda\x41\x1dparent,namespace,namespace_id\x82\xd3\xe4\x93\x02@\"3/v1beta1/{parent=projects/*/locations/*}/namespaces:\tnamespace\x12\xd3\x01\n\x0eListNamespaces\x12<.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest\x1a=.google.cloud.servicedirectory.v1beta1.ListNamespacesResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1beta1/{parent=projects/*/locations/*}/namespaces\x12\xc0\x01\n\x0cGetNamespace\x12:.google.cloud.servicedirectory.v1beta1.GetNamespaceRequest\x1a\x30.google.cloud.servicedirectory.v1beta1.Namespace\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1beta1/{name=projects/*/locations/*/namespaces/*}\x12\xec\x01\n\x0fUpdateNamespace\x12=.google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest\x1a\x30.google.cloud.servicedirectory.v1beta1.Namespace\"h\xda\x41\x15namespace,update_mask\x82\xd3\xe4\x93\x02J2=/v1beta1/{namespace.name=projects/*/locations/*/namespaces/*}:\tnamespace\x12\xac\x01\n\x0f\x44\x65leteNamespace\x12=.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1beta1/{name=projects/*/locations/*/namespaces/*}\x12\xe9\x01\n\rCreateService\x12;.google.cloud.servicedirectory.v1beta1.CreateServiceRequest\x1a..google.cloud.servicedirectory.v1beta1.Service\"k\xda\x41\x19parent,service,service_id\x82\xd3\xe4\x93\x02I\">/v1beta1/{parent=projects/*/locations/*/namespaces/*}/services:\x07service\x12\xd8\x01\n\x0cListServices\x12:.google.cloud.servicedirectory.v1beta1.ListServicesRequest\x1a;.google.cloud.servicedirectory.v1beta1.ListServicesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1beta1/{parent=projects/*/locations/*/namespaces/*}/services\x12\xc5\x01\n\nGetService\x12\x38.google.cloud.servicedirectory.v1beta1.GetServiceRequest\x1a..google.cloud.servicedirectory.v1beta1.Service\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*}\x12\xeb\x01\n\rUpdateService\x12;.google.cloud.servicedirectory.v1beta1.UpdateServiceRequest\x1a..google.cloud.servicedirectory.v1beta1.Service\"m\xda\x41\x13service,update_mask\x82\xd3\xe4\x93\x02Q2F/v1beta1/{service.name=projects/*/locations/*/namespaces/*/services/*}:\x07service\x12\xb3\x01\n\rDeleteService\x12;.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*}\x12\xfb\x01\n\x0e\x43reateEndpoint\x12<.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest\x1a/.google.cloud.servicedirectory.v1beta1.Endpoint\"z\xda\x41\x1bparent,endpoint,endpoint_id\x82\xd3\xe4\x93\x02V\"J/v1beta1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints:\x08\x65ndpoint\x12\xe7\x01\n\rListEndpoints\x12;.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest\x1a<.google.cloud.servicedirectory.v1beta1.ListEndpointsResponse\"[\xda\x41\x06parent\x82\xd3\xe4\x93\x02L\x12J/v1beta1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints\x12\xd4\x01\n\x0bGetEndpoint\x12\x39.google.cloud.servicedirectory.v1beta1.GetEndpointRequest\x1a/.google.cloud.servicedirectory.v1beta1.Endpoint\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}\x12\xfd\x01\n\x0eUpdateEndpoint\x12<.google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest\x1a/.google.cloud.servicedirectory.v1beta1.Endpoint\"|\xda\x41\x14\x65ndpoint,update_mask\x82\xd3\xe4\x93\x02_2S/v1beta1/{endpoint.name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}:\x08\x65ndpoint\x12\xc1\x01\n\x0e\x44\x65leteEndpoint\x12<.google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L*J/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}\x12\xc9\x02\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xfd\x01\x82\xd3\xe4\x93\x02\xf6\x01\"D/v1beta1/{resource=projects/*/locations/*/namespaces/*}:getIamPolicy:\x01*ZT\"O/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:getIamPolicy:\x01*ZU\"P/v1beta1/{resource=projects/*/locations/*/namespaces/*/workloads/*}:getIamPolicy:\x01*\x12\xc9\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xfd\x01\x82\xd3\xe4\x93\x02\xf6\x01\"D/v1beta1/{resource=projects/*/locations/*/namespaces/*}:setIamPolicy:\x01*ZT\"O/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:setIamPolicy:\x01*ZU\"P/v1beta1/{resource=projects/*/locations/*/namespaces/*/workloads/*}:setIamPolicy:\x01*\x12\xfb\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\x8f\x02\x82\xd3\xe4\x93\x02\x88\x02\"J/v1beta1/{resource=projects/*/locations/*/namespaces/*}:testIamPermissions:\x01*ZZ\"U/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:testIamPermissions:\x01*Z[\"V/v1beta1/{resource=projects/*/locations/*/namespaces/*/workloads/*}:testIamPermissions:\x01*\x1aS\xca\x41\x1fservicedirectory.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x99\x02\n)com.google.cloud.servicedirectory.v1beta1B\x18RegistrationServiceProtoP\x01ZUcloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb;servicedirectorypb\xaa\x02%Google.Cloud.ServiceDirectory.V1Beta1\xca\x02%Google\\Cloud\\ServiceDirectory\\V1beta1\xea\x02(Google::Cloud::ServiceDirectory::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - CreateNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest").msgclass - ListNamespacesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListNamespacesRequest").msgclass - ListNamespacesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListNamespacesResponse").msgclass - GetNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.GetNamespaceRequest").msgclass - UpdateNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest").msgclass - DeleteNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest").msgclass - CreateServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.CreateServiceRequest").msgclass - ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListServicesRequest").msgclass - ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListServicesResponse").msgclass - GetServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.GetServiceRequest").msgclass - UpdateServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.UpdateServiceRequest").msgclass - DeleteServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.DeleteServiceRequest").msgclass - CreateEndpointRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.CreateEndpointRequest").msgclass - ListEndpointsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListEndpointsRequest").msgclass - ListEndpointsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.ListEndpointsResponse").msgclass - GetEndpointRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.GetEndpointRequest").msgclass - UpdateEndpointRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest").msgclass - DeleteEndpointRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb deleted file mode 100644 index 062c769d7350..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/registration_service_services_pb.rb +++ /dev/null @@ -1,96 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/servicedirectory/v1beta1/registration_service.proto for package 'Google.Cloud.ServiceDirectory.V1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/servicedirectory/v1beta1/registration_service_pb' - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - module RegistrationService - # Service Directory API for registering services. It defines the following - # resource model: - # - # - The API has a collection of - # [Namespace][google.cloud.servicedirectory.v1beta1.Namespace] - # resources, named `projects/*/locations/*/namespaces/*`. - # - # - Each Namespace has a collection of - # [Service][google.cloud.servicedirectory.v1beta1.Service] resources, named - # `projects/*/locations/*/namespaces/*/services/*`. - # - # - Each Service has a collection of - # [Endpoint][google.cloud.servicedirectory.v1beta1.Endpoint] - # resources, named - # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.servicedirectory.v1beta1.RegistrationService' - - # Creates a namespace, and returns the new namespace. - rpc :CreateNamespace, ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Namespace - # Lists all namespaces. - rpc :ListNamespaces, ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest, ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse - # Gets a namespace. - rpc :GetNamespace, ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Namespace - # Updates a namespace. - rpc :UpdateNamespace, ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Namespace - # Deletes a namespace. This also deletes all services and endpoints in - # the namespace. - rpc :DeleteNamespace, ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest, ::Google::Protobuf::Empty - # Creates a service, and returns the new service. - rpc :CreateService, ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Service - # Lists all services belonging to a namespace. - rpc :ListServices, ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest, ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse - # Gets a service. - rpc :GetService, ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Service - # Updates a service. - rpc :UpdateService, ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Service - # Deletes a service. This also deletes all endpoints associated with - # the service. - rpc :DeleteService, ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest, ::Google::Protobuf::Empty - # Creates an endpoint, and returns the new endpoint. - rpc :CreateEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint - # Lists all endpoints. - rpc :ListEndpoints, ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest, ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse - # Gets an endpoint. - rpc :GetEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint - # Updates an endpoint. - rpc :UpdateEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest, ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint - # Deletes an endpoint. - rpc :DeleteEndpoint, ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest, ::Google::Protobuf::Empty - # Gets the IAM Policy for a resource - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the IAM Policy for a resource - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Tests IAM permissions for a resource (namespace, service or - # service workload only). - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/service_pb.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/service_pb.rb deleted file mode 100644 index 9a7d25ed4376..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/lib/google/cloud/servicedirectory/v1beta1/service_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/servicedirectory/v1beta1/service.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/servicedirectory/v1beta1/endpoint_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/servicedirectory/v1beta1/service.proto\x12%google.cloud.servicedirectory.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/servicedirectory/v1beta1/endpoint.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xea\x03\n\x07Service\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12S\n\x08metadata\x18\x02 \x03(\x0b\x32<.google.cloud.servicedirectory.v1beta1.Service.MetadataEntryB\x03\xe0\x41\x01\x12G\n\tendpoints\x18\x03 \x03(\x0b\x32/.google.cloud.servicedirectory.v1beta1.EndpointB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x7f\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}B\x8d\x02\n)com.google.cloud.servicedirectory.v1beta1B\x0cServiceProtoP\x01ZUcloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb;servicedirectorypb\xaa\x02%Google.Cloud.ServiceDirectory.V1Beta1\xca\x02%Google\\Cloud\\ServiceDirectory\\V1beta1\xea\x02(Google::Cloud::ServiceDirectory::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicedirectory.v1beta1.Service").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/README.md deleted file mode 100644 index 93d67c3e7936..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Service Directory V1beta1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb deleted file mode 100644 index 711458f230d1..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/endpoint.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - # An individual endpoint that provides a - # {::Google::Cloud::ServiceDirectory::V1beta1::Service service}. The service must - # already exist to create an endpoint. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name for the endpoint in the format - # `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. - # @!attribute [rw] address - # @return [::String] - # Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses - # like: - # - # * `8.8.8` - # * `8.8.8.8:53` - # * `test:bad:address` - # * `[::1]` - # * `[::1]:8080` - # - # Limited to 45 characters. - # @!attribute [rw] port - # @return [::Integer] - # Optional. Service Directory rejects values outside of `[0, 65535]`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Metadata for the endpoint. This data can be consumed by service - # clients. - # - # Restrictions: - # - # * The entire metadata dictionary may contain up to 512 characters, - # spread accoss all key-value pairs. Metadata that goes beyond this - # limit are rejected - # * Valid metadata keys have two segments: an optional prefix and name, - # separated by a slash (/). The name segment is required and must be 63 - # characters or less, beginning and ending with an alphanumeric character - # ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and - # alphanumerics between. The prefix is optional. If specified, the prefix - # must be a DNS subdomain: a series of DNS labels separated by dots (.), - # not longer than 253 characters in total, followed by a slash (/). - # Metadata that fails to meet these requirements are rejected - # - # Note: This field is equivalent to the `annotations` field in the v1 API. - # They have the same syntax and read/write to the same location in Service - # Directory. - # @!attribute [rw] network - # @return [::String] - # Immutable. The Google Compute Engine network (VPC) of the endpoint in the - # format `projects//locations/global/networks/*`. - # - # The project must be specified by project number (project id is rejected). - # Incorrectly formatted networks are rejected, but no other validation - # is performed on this field (ex. network or project existence, reachability, - # or permissions). - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the endpoint was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the endpoint was last updated. - # @!attribute [r] uid - # @return [::String] - # Output only. A globally unique identifier (in UUID4 format) for this - # endpoint. - class Endpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb deleted file mode 100644 index 14fcc99f8faa..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/lookup_service.rb +++ /dev/null @@ -1,89 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service LookupService.ResolveService}. - # Looks up a service by its name, returns the service and its endpoints. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the service to resolve. - # @!attribute [rw] max_endpoints - # @return [::Integer] - # Optional. The maximum number of endpoints to return. Defaults to 25. - # Maximum is 100. If a value less than one is specified, the Default is used. - # If a value greater than the Maximum is specified, the Maximum is used. - # @!attribute [rw] endpoint_filter - # @return [::String] - # Optional. The filter applied to the endpoints of the resolved service. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name`, `address`, `port`, or `metadata.` for - # map field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `metadata.owner` returns endpoints that have a annotation with the key - # `owner`, this is the same as `metadata:owner` - # * `metadata.protocol=gRPC` returns endpoints that have key/value - # `protocol=gRPC` - # * `address=192.108.1.105` returns endpoints that have this address - # * `port>8080` returns endpoints that have port number larger than 8080 - # * - # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - # returns endpoints that have name that is alphabetically later than the - # string, so "endpoint-e" is returned but "endpoint-a" is not - # * - # `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` - # returns the endpoint that has an endpoint_id equal to `ep-1` - # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have - # `owner` in annotation key but value is not `sd` AND have key/value - # `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - # doesn't have a field called "doesnotexist". Since the filter does not - # match any endpoint, it returns no results - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - class ResolveServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service LookupService.ResolveService}. - # @!attribute [rw] service - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - class ResolveServiceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb deleted file mode 100644 index ccb58df1f634..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/namespace.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - # A container for {::Google::Cloud::ServiceDirectory::V1beta1::Service services}. - # Namespaces allow administrators to group services together and define - # permissions for a collection of services. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name for the namespace in the format - # `projects/*/locations/*/namespaces/*`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels associated with this namespace. - # No more than 64 user labels can be associated with a given resource. Label - # keys and values can be no longer than 63 characters. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the namespace was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the namespace was last updated. - # @!attribute [r] uid - # @return [::String] - # Output only. A globally unique identifier (in UUID4 format) for this - # namespace. - class Namespace - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb deleted file mode 100644 index 6db231e8d14a..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/registration_service.rb +++ /dev/null @@ -1,432 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_namespace RegistrationService.CreateNamespace}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project and location the namespace - # will be created in. - # @!attribute [rw] namespace_id - # @return [::String] - # Required. The Resource ID must be 1-63 characters long, and comply with - # RFC1035. - # Specifically, the name must be 1-63 characters long and match the regular - # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - # character must be a lowercase letter, and all following characters must - # be a dash, lowercase letter, or digit, except the last character, which - # cannot be a dash. - # @!attribute [rw] namespace - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # Required. A namespace with initial fields set. - class CreateNamespaceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_namespaces RegistrationService.ListNamespaces}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project and location whose namespaces - # you'd like to list. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. The default value is 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter to list results by. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name`, `labels.` for map field, or - # `attributes.` for attributes field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `labels.owner` returns namespaces that have a label with the key - # `owner`, this is the same as `labels:owner` - # * `labels.owner=sd` returns namespaces that have key/value `owner=sd` - # * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` - # returns namespaces that have name that is alphabetically later than the - # string, so "namespace-e" is returned but "namespace-a" is not - # * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have - # `owner` in label key but value is not `sd` AND have key/value `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that namespace - # doesn't have a field called "doesnotexist". Since the filter does not - # match any namespaces, it returns no results - # * `attributes.managed_registration=true` returns namespaces that are - # managed by a GCP product or service - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. The order to list results by. - # - # General `order_by` string syntax: ` () (,)` - # - # * `` allows value: `name` - # * `` ascending or descending order by ``. If this is - # left blank, `asc` is used - # - # Note that an empty `order_by` string results in default order, which is - # order by `name` in ascending order. - class ListNamespacesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_namespaces RegistrationService.ListNamespaces}. - # @!attribute [rw] namespaces - # @return [::Array<::Google::Cloud::ServiceDirectory::V1beta1::Namespace>] - # The list of namespaces. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class ListNamespacesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_namespace RegistrationService.GetNamespace}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the namespace to retrieve. - class GetNamespaceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_namespace RegistrationService.UpdateNamespace}. - # @!attribute [rw] namespace - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Namespace] - # Required. The updated namespace. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields to be updated in this request. - class UpdateNamespaceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_namespace RegistrationService.DeleteNamespace}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the namespace to delete. - class DeleteNamespaceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_service RegistrationService.CreateService}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the namespace this service will belong to. - # @!attribute [rw] service_id - # @return [::String] - # Required. The Resource ID must be 1-63 characters long, and comply with - # RFC1035. - # Specifically, the name must be 1-63 characters long and match the regular - # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - # character must be a lowercase letter, and all following characters must - # be a dash, lowercase letter, or digit, except the last character, which - # cannot be a dash. - # @!attribute [rw] service - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # Required. A service with initial fields set. - class CreateServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_services RegistrationService.ListServices}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the namespace whose services you'd - # like to list. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. The default value is 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter to list results by. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name` or `metadata.` for map field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `metadata.owner` returns services that have a metadata with the key - # `owner`, this is the same as `metadata:owner` - # * `metadata.protocol=gRPC` returns services that have key/value - # `protocol=gRPC` - # * - # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` - # returns services that have name that is alphabetically later than the - # string, so "service-e" is returned but "service-a" is not - # * `metadata.owner!=sd AND metadata.foo=bar` returns services that have - # `owner` in metadata key but value is not `sd` AND have key/value - # `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that service - # doesn't have a field called "doesnotexist". Since the filter does not - # match any services, it returns no results - # * `attributes.managed_registration=true` returns services that are - # managed - # by a GCP product or service - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. The order to list results by. - # - # General `order_by` string syntax: ` () (,)` - # - # * `` allows value: `name` - # * `` ascending or descending order by ``. If this is - # left blank, `asc` is used - # - # Note that an empty `order_by` string results in default order, which is - # order by `name` in ascending order. - class ListServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_services RegistrationService.ListServices}. - # @!attribute [rw] services - # @return [::Array<::Google::Cloud::ServiceDirectory::V1beta1::Service>] - # The list of services. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class ListServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_service RegistrationService.GetService}. - # This should not be used for looking up a service. Instead, use the `resolve` - # method as it contains all endpoints and associated metadata. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the service to get. - class GetServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_service RegistrationService.UpdateService}. - # @!attribute [rw] service - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Service] - # Required. The updated service. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields to be updated in this request. - class UpdateServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_service RegistrationService.DeleteService}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the service to delete. - class DeleteServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_endpoint RegistrationService.CreateEndpoint}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the service that this endpoint provides. - # @!attribute [rw] endpoint_id - # @return [::String] - # Required. The Resource ID must be 1-63 characters long, and comply with - # RFC1035. - # Specifically, the name must be 1-63 characters long and match the regular - # expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first - # character must be a lowercase letter, and all following characters must - # be a dash, lowercase letter, or digit, except the last character, which - # cannot be a dash. - # @!attribute [rw] endpoint - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # Required. A endpoint with initial fields set. - class CreateEndpointRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints RegistrationService.ListEndpoints}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the service whose endpoints you'd like to - # list. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. The default value is 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The next_page_token value returned from a previous List request, - # if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter to list results by. - # - # General `filter` string syntax: - # ` ()` - # - # * `` can be `name`, `address`, `port`, `metadata.` for map - # field, or `attributes.` for attributes field - # * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` - # means `HAS`, and is roughly the same as `=` - # * `` must be the same data type as field - # * `` can be `AND`, `OR`, `NOT` - # - # Examples of valid filters: - # - # * `metadata.owner` returns endpoints that have a metadata with the key - # `owner`, this is the same as `metadata:owner` - # * `metadata.protocol=gRPC` returns endpoints that have key/value - # `protocol=gRPC` - # * `address=192.108.1.105` returns endpoints that have this address - # * `port>8080` returns endpoints that have port number larger than 8080 - # * - # `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` - # returns endpoints that have name that is alphabetically later than the - # string, so "endpoint-e" is returned but "endpoint-a" is not - # * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have - # `owner` in metadata key but value is not `sd` AND have key/value - # `foo=bar` - # * `doesnotexist.foo=bar` returns an empty list. Note that endpoint - # doesn't have a field called "doesnotexist". Since the filter does not - # match any endpoints, it returns no results - # * `attributes.kubernetes_resource_type=KUBERNETES_RESOURCE_TYPE_CLUSTER_ - # IP` returns endpoints with the corresponding kubernetes_resource_type - # - # For more information about filtering, see - # [API Filtering](https://aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. The order to list results by. - # - # General `order_by` string syntax: ` () (,)` - # - # * `` allows values: `name`, `address`, `port` - # * `` ascending or descending order by ``. If this is - # left blank, `asc` is used - # - # Note that an empty `order_by` string results in default order, which is - # order by `name` in ascending order. - class ListEndpointsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints RegistrationService.ListEndpoints}. - # @!attribute [rw] endpoints - # @return [::Array<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] - # The list of endpoints. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class ListEndpointsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_endpoint RegistrationService.GetEndpoint}. - # This should not be used to lookup endpoints at runtime. Instead, use - # the `resolve` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the endpoint to get. - class GetEndpointRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_endpoint RegistrationService.UpdateEndpoint}. - # @!attribute [rw] endpoint - # @return [::Google::Cloud::ServiceDirectory::V1beta1::Endpoint] - # Required. The updated endpoint. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. List of fields to be updated in this request. - class UpdateEndpointRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_endpoint RegistrationService.DeleteEndpoint}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the endpoint to delete. - class DeleteEndpointRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb deleted file mode 100644 index 0f5ce424212a..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/cloud/servicedirectory/v1beta1/service.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceDirectory - module V1beta1 - # An individual service. A service contains a name and optional metadata. - # A service must exist before - # {::Google::Cloud::ServiceDirectory::V1beta1::Endpoint endpoints} can be - # added to it. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name for the service in the format - # `projects/*/locations/*/namespaces/*/services/*`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Metadata for the service. This data can be consumed by service - # clients. - # - # Restrictions: - # - # * The entire metadata dictionary may contain up to 2000 characters, - # spread accoss all key-value pairs. Metadata that goes beyond this - # limit are rejected - # * Valid metadata keys have two segments: an optional prefix and name, - # separated by a slash (/). The name segment is required and must be 63 - # characters or less, beginning and ending with an alphanumeric character - # ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and - # alphanumerics between. The prefix is optional. If specified, the prefix - # must be a DNS subdomain: a series of DNS labels separated by dots (.), - # not longer than 253 characters in total, followed by a slash (/). - # Metadata that fails to meet these requirements are rejected - # - # Note: This field is equivalent to the `annotations` field in the v1 API. - # They have the same syntax and read/write to the same location in Service - # Directory. - # @!attribute [r] endpoints - # @return [::Array<::Google::Cloud::ServiceDirectory::V1beta1::Endpoint>] - # Output only. Endpoints associated with this service. Returned on - # {::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service LookupService.ResolveService}. - # Control plane clients should use - # {::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints RegistrationService.ListEndpoints}. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the service was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the service was last updated. Note: - # endpoints being created/deleted/updated within the service are not - # considered service updates for the purpose of this timestamp. - # @!attribute [r] uid - # @return [::String] - # Output only. A globally unique identifier (in UUID4 format) for this - # service. - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/Gemfile deleted file mode 100644 index 97414f0ec896..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-service_directory-v1beta1", path: "../" -else - gem "google-cloud-service_directory-v1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/lookup_service/resolve_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/lookup_service/resolve_service.rb deleted file mode 100644 index d71eb3c1791d..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/lookup_service/resolve_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_LookupService_ResolveService_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the resolve_service call in the LookupService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service. -# -def resolve_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new - - # Call the resolve_service method. - result = client.resolve_service request - - # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse. - p result -end -# [END servicedirectory_v1beta1_generated_LookupService_ResolveService_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_endpoint.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_endpoint.rb deleted file mode 100644 index 3e2ad8dfb2e1..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_endpoint.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the create_endpoint call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_endpoint. -# -def create_endpoint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new - - # Call the create_endpoint method. - result = client.create_endpoint request - - # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_namespace.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_namespace.rb deleted file mode 100644 index ec054cee82d0..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_namespace.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the create_namespace call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_namespace. -# -def create_namespace - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new - - # Call the create_namespace method. - result = client.create_namespace request - - # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_service.rb deleted file mode 100644 index 25d40b538366..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/create_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_CreateService_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the create_service call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_service. -# -def create_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new - - # Call the create_service method. - result = client.create_service request - - # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_CreateService_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_endpoint.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_endpoint.rb deleted file mode 100644 index a0f9e22f857a..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_endpoint.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the delete_endpoint call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_endpoint. -# -def delete_endpoint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new - - # Call the delete_endpoint method. - result = client.delete_endpoint request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_namespace.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_namespace.rb deleted file mode 100644 index 6571a245cbe3..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_namespace.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the delete_namespace call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_namespace. -# -def delete_namespace - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new - - # Call the delete_namespace method. - result = client.delete_namespace request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_service.rb deleted file mode 100644 index d078459a4702..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/delete_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteService_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the delete_service call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_service. -# -def delete_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new - - # Call the delete_service method. - result = client.delete_service request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteService_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_endpoint.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_endpoint.rb deleted file mode 100644 index 54ec62254a8f..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_endpoint.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the get_endpoint call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_endpoint. -# -def get_endpoint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new - - # Call the get_endpoint method. - result = client.get_endpoint request - - # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_iam_policy.rb deleted file mode 100644 index 6c93e204b20f..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the get_iam_policy call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_namespace.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_namespace.rb deleted file mode 100644 index 5050a16a6530..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_namespace.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the get_namespace call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_namespace. -# -def get_namespace - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new - - # Call the get_namespace method. - result = client.get_namespace request - - # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_service.rb deleted file mode 100644 index 275196ffb4e1..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/get_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_GetService_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the get_service call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_service. -# -def get_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new - - # Call the get_service method. - result = client.get_service request - - # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_GetService_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_endpoints.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_endpoints.rb deleted file mode 100644 index 4793441f9ebf..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_endpoints.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the list_endpoints call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints. -# -def list_endpoints - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new - - # Call the list_endpoints method. - result = client.list_endpoints request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - p item - end -end -# [END servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_namespaces.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_namespaces.rb deleted file mode 100644 index 28f67143a5f7..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_namespaces.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the list_namespaces call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_namespaces. -# -def list_namespaces - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new - - # Call the list_namespaces method. - result = client.list_namespaces request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Namespace. - p item - end -end -# [END servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_services.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_services.rb deleted file mode 100644 index feec94510bd4..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/list_services.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_ListServices_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the list_services call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_services. -# -def list_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new - - # Call the list_services method. - result = client.list_services request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ServiceDirectory::V1beta1::Service. - p item - end -end -# [END servicedirectory_v1beta1_generated_RegistrationService_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/set_iam_policy.rb deleted file mode 100644 index fa2aa1005639..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the set_iam_policy call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.rb deleted file mode 100644 index acb3050b1c96..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the test_iam_permissions call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_endpoint.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_endpoint.rb deleted file mode 100644 index 43c96f11aaef..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_endpoint.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the update_endpoint call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_endpoint. -# -def update_endpoint - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new - - # Call the update_endpoint method. - result = client.update_endpoint request - - # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Endpoint. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_namespace.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_namespace.rb deleted file mode 100644 index 6e2d2ebcd57f..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_namespace.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the update_namespace call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_namespace. -# -def update_namespace - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new - - # Call the update_namespace method. - result = client.update_namespace request - - # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Namespace. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_service.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_service.rb deleted file mode 100644 index bd7b63693a51..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/registration_service/update_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateService_sync] -require "google/cloud/service_directory/v1beta1" - -## -# Snippet for the update_service call in the RegistrationService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_service. -# -def update_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new - - # Call the update_service method. - result = client.update_service request - - # The returned object is of type Google::Cloud::ServiceDirectory::V1beta1::Service. - p result -end -# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateService_sync] diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/snippet_metadata_google.cloud.servicedirectory.v1beta1.json b/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/snippet_metadata_google.cloud.servicedirectory.v1beta1.json deleted file mode 100644 index 3d9a66c9a57a..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/snippets/snippet_metadata_google.cloud.servicedirectory.v1beta1.json +++ /dev/null @@ -1,775 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-service_directory-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.servicedirectory.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "servicedirectory_v1beta1_generated_LookupService_ResolveService_sync", - "title": "Snippet for the resolve_service call in the LookupService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service.", - "file": "lookup_service/resolve_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "resolve_service", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client#resolve_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse", - "client": { - "short_name": "LookupService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client" - }, - "method": { - "short_name": "ResolveService", - "full_name": "google.cloud.servicedirectory.v1beta1.LookupService.ResolveService", - "service": { - "short_name": "LookupService", - "full_name": "google.cloud.servicedirectory.v1beta1.LookupService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_sync", - "title": "Snippet for the create_namespace call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_namespace.", - "file": "registration_service/create_namespace.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_namespace", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_namespace", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Namespace", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "CreateNamespace", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.CreateNamespace", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_sync", - "title": "Snippet for the list_namespaces call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_namespaces.", - "file": "registration_service/list_namespaces.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_namespaces", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_namespaces", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "ListNamespaces", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.ListNamespaces", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_sync", - "title": "Snippet for the get_namespace call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_namespace.", - "file": "registration_service/get_namespace.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_namespace", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_namespace", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Namespace", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "GetNamespace", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.GetNamespace", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_sync", - "title": "Snippet for the update_namespace call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_namespace.", - "file": "registration_service/update_namespace.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_namespace", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_namespace", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Namespace", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "UpdateNamespace", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateNamespace", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_sync", - "title": "Snippet for the delete_namespace call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_namespace.", - "file": "registration_service/delete_namespace.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_namespace", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_namespace", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "DeleteNamespace", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteNamespace", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_CreateService_sync", - "title": "Snippet for the create_service call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_service.", - "file": "registration_service/create_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Service", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "CreateService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.CreateService", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_ListServices_sync", - "title": "Snippet for the list_services call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_services.", - "file": "registration_service/list_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_services", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "ListServices", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.ListServices", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_GetService_sync", - "title": "Snippet for the get_service call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_service.", - "file": "registration_service/get_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Service", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "GetService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.GetService", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateService_sync", - "title": "Snippet for the update_service call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_service.", - "file": "registration_service/update_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_service", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Service", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "UpdateService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateService", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteService_sync", - "title": "Snippet for the delete_service call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_service.", - "file": "registration_service/delete_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "DeleteService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteService", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_sync", - "title": "Snippet for the create_endpoint call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_endpoint.", - "file": "registration_service/create_endpoint.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_endpoint", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#create_endpoint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Endpoint", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "CreateEndpoint", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.CreateEndpoint", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_sync", - "title": "Snippet for the list_endpoints call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints.", - "file": "registration_service/list_endpoints.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_endpoints", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#list_endpoints", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "ListEndpoints", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_sync", - "title": "Snippet for the get_endpoint call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_endpoint.", - "file": "registration_service/get_endpoint.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_endpoint", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_endpoint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Endpoint", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "GetEndpoint", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.GetEndpoint", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_sync", - "title": "Snippet for the update_endpoint call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_endpoint.", - "file": "registration_service/update_endpoint.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_endpoint", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#update_endpoint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceDirectory::V1beta1::Endpoint", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "UpdateEndpoint", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateEndpoint", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_sync", - "title": "Snippet for the delete_endpoint call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_endpoint.", - "file": "registration_service/delete_endpoint.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_endpoint", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#delete_endpoint", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "DeleteEndpoint", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteEndpoint", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_iam_policy.", - "file": "registration_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.GetIamPolicy", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#set_iam_policy.", - "file": "registration_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.SetIamPolicy", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the RegistrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#test_iam_permissions.", - "file": "registration_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "RegistrationService::Client", - "full_name": "::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService.TestIamPermissions", - "service": { - "short_name": "RegistrationService", - "full_name": "google.cloud.servicedirectory.v1beta1.RegistrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_test.rb deleted file mode 100644 index 6353a46aff02..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/service_directory/v1beta1/lookup_service" - -class ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" - assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_test.rb deleted file mode 100644 index cf67bf538ccd..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_rest_test.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/servicedirectory/v1beta1/lookup_service_pb" -require "google/cloud/service_directory/v1beta1/lookup_service/rest" - - -class ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_resolve_service - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - max_endpoints = 42 - endpoint_filter = "hello world" - - resolve_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::ServiceStub.stub :transcode_resolve_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, resolve_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.resolve_service({ name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.resolve_service name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.resolve_service ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new(name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.resolve_service({ name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.resolve_service(::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new(name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, resolve_service_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_test.rb deleted file mode 100644 index 09d6d0129b7b..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/lookup_service_test.rb +++ /dev/null @@ -1,166 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/servicedirectory/v1beta1/lookup_service_pb" -require "google/cloud/service_directory/v1beta1/lookup_service" - -class ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_resolve_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - max_endpoints = 42 - endpoint_filter = "hello world" - - resolve_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :resolve_service, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["max_endpoints"] - assert_equal "hello world", request["endpoint_filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, resolve_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.resolve_service({ name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.resolve_service name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.resolve_service ::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new(name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.resolve_service({ name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.resolve_service(::Google::Cloud::ServiceDirectory::V1beta1::ResolveServiceRequest.new(name: name, max_endpoints: max_endpoints, endpoint_filter: endpoint_filter), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, resolve_service_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::LookupService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_test.rb deleted file mode 100644 index 37f95cd118d4..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_paths_test.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/service_directory/v1beta1/registration_service" - -class ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_endpoint_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.endpoint_path project: "value0", location: "value1", namespace: "value2", service: "value3", endpoint: "value4" - assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3/endpoints/value4", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_namespace_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.namespace_path project: "value0", location: "value1", namespace: "value2" - assert_equal "projects/value0/locations/value1/namespaces/value2", path - end - end - - def test_network_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.network_path project: "value0", network: "value1" - assert_equal "projects/value0/locations/global/networks/value1", path - end - end - - def test_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" - assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_test.rb deleted file mode 100644 index eeecb1033ab3..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_rest_test.rb +++ /dev/null @@ -1,1096 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/servicedirectory/v1beta1/registration_service_pb" -require "google/cloud/service_directory/v1beta1/registration_service/rest" - - -class ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_namespace - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - namespace_id = "hello world" - namespace = {} - - create_namespace_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_create_namespace_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_namespace_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_namespace({ parent: parent, namespace_id: namespace_id, namespace: namespace }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_namespace parent: parent, namespace_id: namespace_id, namespace: namespace do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_namespace ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new(parent: parent, namespace_id: namespace_id, namespace: namespace) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_namespace({ parent: parent, namespace_id: namespace_id, namespace: namespace }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_namespace(::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new(parent: parent, namespace_id: namespace_id, namespace: namespace), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_namespace_client_stub.call_count - end - end - end - - def test_list_namespaces - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_namespaces_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_list_namespaces_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_namespaces_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_namespaces({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_namespaces parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_namespaces ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_namespaces({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_namespaces(::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_namespaces_client_stub.call_count - end - end - end - - def test_get_namespace - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_namespace_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_get_namespace_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_namespace_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_namespace({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_namespace name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_namespace ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_namespace({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_namespace(::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_namespace_client_stub.call_count - end - end - end - - def test_update_namespace - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - namespace = {} - update_mask = {} - - update_namespace_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_update_namespace_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_namespace_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_namespace({ namespace: namespace, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_namespace namespace: namespace, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_namespace ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new(namespace: namespace, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_namespace({ namespace: namespace, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_namespace(::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new(namespace: namespace, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_namespace_client_stub.call_count - end - end - end - - def test_delete_namespace - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_namespace_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_delete_namespace_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_namespace_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_namespace({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_namespace name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_namespace ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_namespace({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_namespace(::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_namespace_client_stub.call_count - end - end - end - - def test_create_service - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_id = "hello world" - service = {} - - create_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_create_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service({ parent: parent, service_id: service_id, service: service }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_service parent: parent, service_id: service_id, service: service do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_service({ parent: parent, service_id: service_id, service: service }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service(::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_client_stub.call_count - end - end - end - - def test_list_services - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_services_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_services ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_services(::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_count - end - end - end - - def test_get_service - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service(::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_count - end - end - end - - def test_update_service - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service = {} - update_mask = {} - - update_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_update_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_service({ service: service, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_service service: service, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_service ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new(service: service, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_service({ service: service, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_service(::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new(service: service, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_service_client_stub.call_count - end - end - end - - def test_delete_service - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_delete_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_service ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_service(::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_client_stub.call_count - end - end - end - - def test_create_endpoint - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - endpoint_id = "hello world" - endpoint = {} - - create_endpoint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_create_endpoint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_endpoint_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_endpoint({ parent: parent, endpoint_id: endpoint_id, endpoint: endpoint }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_endpoint parent: parent, endpoint_id: endpoint_id, endpoint: endpoint do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new(parent: parent, endpoint_id: endpoint_id, endpoint: endpoint) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_endpoint({ parent: parent, endpoint_id: endpoint_id, endpoint: endpoint }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new(parent: parent, endpoint_id: endpoint_id, endpoint: endpoint), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_endpoint_client_stub.call_count - end - end - end - - def test_list_endpoints - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_endpoints_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_list_endpoints_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_endpoints_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_endpoints({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_endpoints parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_endpoints ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_endpoints({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_endpoints(::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_endpoints_client_stub.call_count - end - end - end - - def test_get_endpoint - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_endpoint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_get_endpoint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_endpoint_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_endpoint({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_endpoint name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_endpoint({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_endpoint_client_stub.call_count - end - end - end - - def test_update_endpoint - # Create test objects. - client_result = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - endpoint = {} - update_mask = {} - - update_endpoint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_update_endpoint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_endpoint_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_endpoint({ endpoint: endpoint, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_endpoint endpoint: endpoint, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new(endpoint: endpoint, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_endpoint({ endpoint: endpoint, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new(endpoint: endpoint, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_endpoint_client_stub.call_count - end - end - end - - def test_delete_endpoint - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_endpoint_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_delete_endpoint_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_endpoint_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_endpoint({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_endpoint name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_endpoint({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_endpoint_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_test.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_test.rb deleted file mode 100644 index 2a649b61c8da..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/google/cloud/service_directory/v1beta1/registration_service_test.rb +++ /dev/null @@ -1,1213 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/servicedirectory/v1beta1/registration_service_pb" -require "google/cloud/service_directory/v1beta1/registration_service" - -class ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_namespace - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - namespace_id = "hello world" - namespace = {} - - create_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_namespace, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["namespace_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Namespace), request["namespace"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_namespace_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_namespace({ parent: parent, namespace_id: namespace_id, namespace: namespace }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_namespace parent: parent, namespace_id: namespace_id, namespace: namespace do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_namespace ::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new(parent: parent, namespace_id: namespace_id, namespace: namespace) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_namespace({ parent: parent, namespace_id: namespace_id, namespace: namespace }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_namespace(::Google::Cloud::ServiceDirectory::V1beta1::CreateNamespaceRequest.new(parent: parent, namespace_id: namespace_id, namespace: namespace), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_namespace_client_stub.call_rpc_count - end - end - - def test_list_namespaces - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_namespaces_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_namespaces, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_namespaces_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_namespaces({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_namespaces parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_namespaces ::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_namespaces({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_namespaces(::Google::Cloud::ServiceDirectory::V1beta1::ListNamespacesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_namespaces_client_stub.call_rpc_count - end - end - - def test_get_namespace - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_namespace, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_namespace_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_namespace({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_namespace name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_namespace ::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_namespace({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_namespace(::Google::Cloud::ServiceDirectory::V1beta1::GetNamespaceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_namespace_client_stub.call_rpc_count - end - end - - def test_update_namespace - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Namespace.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - namespace = {} - update_mask = {} - - update_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_namespace, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Namespace), request["namespace"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_namespace_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_namespace({ namespace: namespace, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_namespace namespace: namespace, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_namespace ::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new(namespace: namespace, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_namespace({ namespace: namespace, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_namespace(::Google::Cloud::ServiceDirectory::V1beta1::UpdateNamespaceRequest.new(namespace: namespace, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_namespace_client_stub.call_rpc_count - end - end - - def test_delete_namespace - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_namespace, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_namespace_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_namespace({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_namespace name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_namespace ::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_namespace({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_namespace(::Google::Cloud::ServiceDirectory::V1beta1::DeleteNamespaceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_namespace_client_stub.call_rpc_count - end - end - - def test_create_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_id = "hello world" - service = {} - - create_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["service_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Service), request["service"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service({ parent: parent, service_id: service_id, service: service }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_service parent: parent, service_id: service_id, service: service do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_service ::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_service({ parent: parent, service_id: service_id, service: service }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_service(::Google::Cloud::ServiceDirectory::V1beta1::CreateServiceRequest.new(parent: parent, service_id: service_id, service: service), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_service_client_stub.call_rpc_count - end - end - - def test_list_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_services, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_services_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_services ::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_services(::Google::Cloud::ServiceDirectory::V1beta1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_rpc_count - end - end - - def test_get_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service ::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service(::Google::Cloud::ServiceDirectory::V1beta1::GetServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_rpc_count - end - end - - def test_update_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Service.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service = {} - update_mask = {} - - update_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_service, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Service), request["service"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_service({ service: service, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_service service: service, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_service ::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new(service: service, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_service({ service: service, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_service(::Google::Cloud::ServiceDirectory::V1beta1::UpdateServiceRequest.new(service: service, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_service_client_stub.call_rpc_count - end - end - - def test_delete_service - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_service ::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_service({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_service(::Google::Cloud::ServiceDirectory::V1beta1::DeleteServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_service_client_stub.call_rpc_count - end - end - - def test_create_endpoint - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - endpoint_id = "hello world" - endpoint = {} - - create_endpoint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_endpoint, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["endpoint_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint), request["endpoint"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_endpoint_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_endpoint({ parent: parent, endpoint_id: endpoint_id, endpoint: endpoint }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_endpoint parent: parent, endpoint_id: endpoint_id, endpoint: endpoint do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new(parent: parent, endpoint_id: endpoint_id, endpoint: endpoint) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_endpoint({ parent: parent, endpoint_id: endpoint_id, endpoint: endpoint }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::CreateEndpointRequest.new(parent: parent, endpoint_id: endpoint_id, endpoint: endpoint), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_endpoint_client_stub.call_rpc_count - end - end - - def test_list_endpoints - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_endpoints_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_endpoints, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_endpoints_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_endpoints({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_endpoints parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_endpoints ::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_endpoints({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_endpoints(::Google::Cloud::ServiceDirectory::V1beta1::ListEndpointsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_endpoints_client_stub.call_rpc_count - end - end - - def test_get_endpoint - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_endpoint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_endpoint, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_endpoint_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_endpoint({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_endpoint name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_endpoint({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::GetEndpointRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_endpoint_client_stub.call_rpc_count - end - end - - def test_update_endpoint - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - endpoint = {} - update_mask = {} - - update_endpoint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_endpoint, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceDirectory::V1beta1::Endpoint), request["endpoint"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_endpoint_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_endpoint({ endpoint: endpoint, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_endpoint endpoint: endpoint, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new(endpoint: endpoint, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_endpoint({ endpoint: endpoint, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::UpdateEndpointRequest.new(endpoint: endpoint, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_endpoint_client_stub.call_rpc_count - end - end - - def test_delete_endpoint - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_endpoint_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_endpoint, name - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_endpoint_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_endpoint({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_endpoint name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_endpoint ::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_endpoint({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_endpoint(::Google::Cloud::ServiceDirectory::V1beta1::DeleteEndpointRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_endpoint_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ServiceDirectory::V1beta1::RegistrationService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-service_directory-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-service_directory-v1beta1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-service_directory-v1beta1/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_health-v1/.gitignore b/owl-bot-staging/google-cloud-service_health-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/.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_health-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-service_health-v1/.repo-metadata.json deleted file mode 100644 index e5a8dac5c000..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "servicehealth.googleapis.com", - "api_shortname": "servicehealth", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-service_health-v1/latest", - "distribution_name": "google-cloud-service_health-v1", - "is_cloud": true, - "language": "ruby", - "name": "servicehealth", - "name_pretty": "Service Health V1 API", - "product_documentation": "https://cloud.google.com/service-health/docs/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Personalized Service Health helps you gain visibility into disruptive events impacting Google Cloud products. Note that google-cloud-service_health-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_health instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/service-health/docs/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-service_health-v1/.rubocop.yml b/owl-bot-staging/google-cloud-service_health-v1/.rubocop.yml deleted file mode 100644 index 292707c824d6..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-service_health-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-service_health-v1.rb" diff --git a/owl-bot-staging/google-cloud-service_health-v1/.toys.rb b/owl-bot-staging/google-cloud-service_health-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/.yardopts b/owl-bot-staging/google-cloud-service_health-v1/.yardopts deleted file mode 100644 index 26f81cadbdb8..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Service Health V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-service_health-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_health-v1/AUTHENTICATION.md deleted file mode 100644 index 48d8d8aa8f78..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-service_health-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-service_health-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/service_health/v1" - -client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/service_health/v1" - -::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-service_health-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/service_health/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-service_health-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-service_health-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-service_health-v1/Gemfile b/owl-bot-staging/google-cloud-service_health-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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_health-v1/LICENSE.md b/owl-bot-staging/google-cloud-service_health-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-service_health-v1/README.md b/owl-bot-staging/google-cloud-service_health-v1/README.md deleted file mode 100644 index 384603b85a67..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Service Health V1 API - -Personalized Service Health helps you gain visibility into disruptive events impacting Google Cloud products. - -Personalized Service Health helps you gain visibility into disruptive events impacting Google Cloud products. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Service Health V1 API. Most users should consider using -the main client gem, -[google-cloud-service_health](https://rubygems.org/gems/google-cloud-service_health). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-service_health-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/servicehealth.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/service_health/v1" - -client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new -request = ::Google::Cloud::ServiceHealth::V1::ListEventsRequest.new # (request fields as keyword arguments...) -response = client.list_events request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_health-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/service-health/docs/overview) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/service_health/v1" -require "logger" - -client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-service_health`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-service_health-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_health`. -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_health-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_health-v1/Rakefile b/owl-bot-staging/google-cloud-service_health-v1/Rakefile deleted file mode 100644 index 516ae4796426..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-service_health-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/service_health/v1/service_health/credentials" - ::Google::Cloud::ServiceHealth::V1::ServiceHealth::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-service_health-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-service_health-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-service_health-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-service_health-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-service_health-v1" - header "google-cloud-service_health-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-service_health-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-service_health-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-service_health-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-service_health-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-service_health-v1/gapic_metadata.json deleted file mode 100644 index f6d45dcb69e9..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/gapic_metadata.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.servicehealth.v1", - "libraryPackage": "::Google::Cloud::ServiceHealth::V1", - "services": { - "ServiceHealth": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client", - "rpcs": { - "ListEvents": { - "methods": [ - "list_events" - ] - }, - "GetEvent": { - "methods": [ - "get_event" - ] - }, - "ListOrganizationEvents": { - "methods": [ - "list_organization_events" - ] - }, - "GetOrganizationEvent": { - "methods": [ - "get_organization_event" - ] - }, - "ListOrganizationImpacts": { - "methods": [ - "list_organization_impacts" - ] - }, - "GetOrganizationImpact": { - "methods": [ - "get_organization_impact" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-service_health-v1/google-cloud-service_health-v1.gemspec b/owl-bot-staging/google-cloud-service_health-v1/google-cloud-service_health-v1.gemspec deleted file mode 100644 index 8cf07f140906..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/google-cloud-service_health-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/service_health/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-service_health-v1" - gem.version = Google::Cloud::ServiceHealth::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Personalized Service Health helps you gain visibility into disruptive events impacting Google Cloud products. Note that google-cloud-service_health-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_health instead. See the readme for more details." - gem.summary = "Personalized Service Health helps you gain visibility into disruptive events impacting Google Cloud products." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google-cloud-service_health-v1.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google-cloud-service_health-v1.rb deleted file mode 100644 index 1fd09f220a8c..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google-cloud-service_health-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/service_health/v1" diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1.rb deleted file mode 100644 index 0450d1bde309..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/service_health/v1/service_health" -require "google/cloud/service_health/v1/version" - -module Google - module Cloud - module ServiceHealth - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/service_health/v1" - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/service_health/v1" - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/service_health/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/bindings_override.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/bindings_override.rb deleted file mode 100644 index 1d734180955c..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module ServiceHealth - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/service_health/v1/rest" - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceHealth"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/rest.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/rest.rb deleted file mode 100644 index 7c4fab8806ab..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/service_health/v1/service_health/rest" -require "google/cloud/service_health/v1/bindings_override" -require "google/cloud/service_health/v1/version" - -module Google - module Cloud - module ServiceHealth - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/service_health/v1/rest" - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health.rb deleted file mode 100644 index e2ae0bacf94a..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_health/v1/version" - -require "google/cloud/service_health/v1/service_health/credentials" -require "google/cloud/service_health/v1/service_health/paths" -require "google/cloud/service_health/v1/service_health/client" -require "google/cloud/service_health/v1/service_health/rest" - -module Google - module Cloud - module ServiceHealth - module V1 - ## - # Request service health events relevant to your Google Cloud project. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/service_health/v1/service_health" - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/service_health/v1/service_health/rest" - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - module ServiceHealth - end - end - end - end -end - -helper_path = ::File.join __dir__, "service_health", "helpers.rb" -require "google/cloud/service_health/v1/service_health/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/client.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/client.rb deleted file mode 100644 index 92dab2cd58d0..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/client.rb +++ /dev/null @@ -1,1144 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/servicehealth/v1/event_service_pb" -require "google/cloud/location" - -module Google - module Cloud - module ServiceHealth - module V1 - module ServiceHealth - ## - # Client for the ServiceHealth service. - # - # Request service health events relevant to your Google Cloud project. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicehealth.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :service_health_stub - - ## - # Configure the ServiceHealth Client class. - # - # See {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ServiceHealth clients - # ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceHealth", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_events.timeout = 60.0 - default_config.rpcs.list_events.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_event.timeout = 60.0 - default_config.rpcs.get_event.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_organization_events.timeout = 60.0 - default_config.rpcs.list_organization_events.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_organization_event.timeout = 60.0 - default_config.rpcs.get_organization_event.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_organization_impacts.timeout = 60.0 - default_config.rpcs.list_organization_impacts.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_organization_impact.timeout = 60.0 - default_config.rpcs.get_organization_impact.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceHealth Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @service_health_stub.universe_domain - end - - ## - # Create a new ServiceHealth client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ServiceHealth client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/servicehealth/v1/event_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @service_health_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @service_health_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @service_health_stub.endpoint - config.universe_domain = @service_health_stub.universe_domain - config.logger = @service_health_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @service_health_stub.logger - end - - # Service calls - - ## - # Lists events under a given project and location. - # - # @overload list_events(request, options = nil) - # Pass arguments to `list_events` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::ListEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::ListEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) - # Pass arguments to `list_events` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value using the form - # `projects/{project_id}/locations/{location}/events`. - # - # `project_id` - ID of the project for which to list service health - # events. - # `location` - The location to get the service health events from. - # To retrieve service health events of category = INCIDENT, use `location` = - # `global`. - # @param page_size [::Integer] - # Optional. The maximum number of events that should be returned. Acceptable - # values are 1 to 100, inclusive. (The default value is 10.) If more results - # are available, the service returns a next_page_token that you can use to - # get the next page of results in subsequent list requests. The service may - # return fewer events than the requested page_size. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # Provide Page token returned by a previous `ListEvents` call to retrieve the - # next page of results. When paginating, all other parameters provided to - # `ListEvents` must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters resources listed in the - # response. The expression takes the following forms:
- # * field=value for `category` and `state`
- # * field <, >, <=, or >= value for `update_time`
- # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, - # `event_impacts.product.product_name:"Eventarc"` - #
- # - # Multiple filter queries are separated by spaces. Example: - # `category=INCIDENT state=ACTIVE`. - # - # By default, each expression is an AND expression. However, you can include - # AND and OR expressions explicitly. - # - # Filter is supported for the following fields: `category`, `state`, - # `update_time`, `event_impacts.product.product_name` - # @param view [::Google::Cloud::ServiceHealth::V1::EventView] - # Optional. Event fields to include in response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::Event>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::Event>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::ListEventsRequest.new - # - # # Call the list_events method. - # result = client.list_events request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceHealth::V1::Event. - # p item - # end - # - def list_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_events.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_events.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.call_rpc :list_events, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @service_health_stub, :list_events, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a resource containing information about an event. - # - # @overload get_event(request, options = nil) - # Pass arguments to `get_event` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::GetEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::GetEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_event(name: nil) - # Pass arguments to `get_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Unique name of the event in this scope including project - # and location using the form - # `projects/{project_id}/locations/{location}/events/{event_id}`. - # - # `project_id` - Project ID of the project that contains the event.
- # `location` - The location to get the service health events from.
- # `event_id` - Event ID to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceHealth::V1::Event] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceHealth::V1::Event] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::GetEventRequest.new - # - # # Call the get_event method. - # result = client.get_event request - # - # # The returned object is of type Google::Cloud::ServiceHealth::V1::Event. - # p result - # - def get_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetEventRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_event.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.call_rpc :get_event, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists organization events under a given organization and location. - # - # @overload list_organization_events(request, options = nil) - # Pass arguments to `list_organization_events` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_organization_events(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) - # Pass arguments to `list_organization_events` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value using the form - # `organizations/{organization_id}/locations/{location}/organizationEvents`. - # - # `organization_id` - ID (number) of the project that contains the event. To - # get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- # `location` - The location to get the service health events from. To - # retrieve service health events of category = INCIDENT, use `location` = - # `global`. - # @param page_size [::Integer] - # Optional. The maximum number of events that should be returned. Acceptable - # values are `1` to `100`, inclusive. (The default value is `10`.) If more - # results are available, the service returns a `next_page_token` that you can - # use to get the next page of results in subsequent list requests. The - # service may return fewer events than the requested `page_size`. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # Provide Page token returned by a previous `ListOrganizationEvents` call to - # retrieve the next page of results. - # - # When paginating, all other parameters provided to - # `ListOrganizationEvents` must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters resources listed in the - # response. The expression takes the following forms: - # - # * field=value for `category` and `state` - # * field <, >, <=, or >= value for `update_time` - # - # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` - # - # Multiple filter queries are space-separated. Example: - # `category=INCIDENT state=ACTIVE`. - # - # By default, each expression is an AND expression. However, you can include - # AND and OR expressions explicitly. - # - # Filter is supported for the following fields: `category`, `state`, - # `update_time` - # @param view [::Google::Cloud::ServiceHealth::V1::OrganizationEventView] - # Optional. OrganizationEvent fields to include in response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationEvent>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationEvent>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new - # - # # Call the list_organization_events method. - # result = client.list_organization_events request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationEvent. - # p item - # end - # - def list_organization_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_organization_events.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_organization_events.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_organization_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.call_rpc :list_organization_events, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @service_health_stub, :list_organization_events, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a resource containing information about an event affecting an - # organization . - # - # @overload get_organization_event(request, options = nil) - # Pass arguments to `get_organization_event` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_organization_event(name: nil) - # Pass arguments to `get_organization_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Unique name of the event in this scope including organization and - # event ID using the form - # `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. - # - # `organization_id` - ID (number) of the project that contains the event. To - # get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- # `event_id` - Organization event ID to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new - # - # # Call the get_organization_event method. - # result = client.get_organization_event request - # - # # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationEvent. - # p result - # - def get_organization_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_organization_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_organization_event.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_organization_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.call_rpc :get_organization_event, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists assets impacted by organization events under a given organization and - # location. - # - # @overload list_organization_impacts(request, options = nil) - # Pass arguments to `list_organization_impacts` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_organization_impacts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_organization_impacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value using the form - # `organizations/{organization_id}/locations/{location}/organizationImpacts`. - # - # `organization_id` - ID (number) of the project that contains the event. To - # get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - # @param page_size [::Integer] - # Optional. The maximum number of events that should be returned. Acceptable - # values are `1` to `100`, inclusive. The default value is `10`. - # - # If more results are available, the service returns a - # `next_page_token` that can be used to get the next page of results in - # subsequent list requests. The service may return fewer - # [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - # than the requested `page_size`. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # Provide `page_token` returned by a previous `ListOrganizationImpacts` call - # to retrieve the next page of results. - # - # When paginating, all other parameters provided to `ListOrganizationImpacts` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters resources listed in the - # response. The expression is in the form of `field:value` for checking if a - # repeated field contains a value. - # - # Example: - # `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` - # - # To get your `{organization_id}`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - # - # Multiple filter queries are separated by spaces. - # - # By default, each expression is an AND expression. However, you can include - # AND and OR expressions explicitly. - # Filter is supported for the following fields: `events`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationImpact>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationImpact>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new - # - # # Call the list_organization_impacts method. - # result = client.list_organization_impacts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationImpact. - # p item - # end - # - def list_organization_impacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_organization_impacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_organization_impacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_organization_impacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.call_rpc :list_organization_impacts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @service_health_stub, :list_organization_impacts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a resource containing information about impact to an asset under - # an organization affected by a service health event. - # - # @overload get_organization_impact(request, options = nil) - # Pass arguments to `get_organization_impact` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_organization_impact(name: nil) - # Pass arguments to `get_organization_impact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource using the form - # `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. - # - # `organization_id` - ID (number) of the organization that contains the - # event. To get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- # `organization_impact_id` - ID of the [OrganizationImpact - # resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new - # - # # Call the get_organization_impact method. - # result = client.get_organization_impact request - # - # # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationImpact. - # p result - # - def get_organization_impact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_organization_impact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_organization_impact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_organization_impact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.call_rpc :get_organization_impact, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ServiceHealth API. - # - # This class represents the configuration for ServiceHealth, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_events to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_events.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_events.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicehealth.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ServiceHealth API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_events` - # @return [::Gapic::Config::Method] - # - attr_reader :list_events - ## - # RPC-specific configuration for `get_event` - # @return [::Gapic::Config::Method] - # - attr_reader :get_event - ## - # RPC-specific configuration for `list_organization_events` - # @return [::Gapic::Config::Method] - # - attr_reader :list_organization_events - ## - # RPC-specific configuration for `get_organization_event` - # @return [::Gapic::Config::Method] - # - attr_reader :get_organization_event - ## - # RPC-specific configuration for `list_organization_impacts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_organization_impacts - ## - # RPC-specific configuration for `get_organization_impact` - # @return [::Gapic::Config::Method] - # - attr_reader :get_organization_impact - - # @private - def initialize parent_rpcs = nil - list_events_config = parent_rpcs.list_events if parent_rpcs.respond_to? :list_events - @list_events = ::Gapic::Config::Method.new list_events_config - get_event_config = parent_rpcs.get_event if parent_rpcs.respond_to? :get_event - @get_event = ::Gapic::Config::Method.new get_event_config - list_organization_events_config = parent_rpcs.list_organization_events if parent_rpcs.respond_to? :list_organization_events - @list_organization_events = ::Gapic::Config::Method.new list_organization_events_config - get_organization_event_config = parent_rpcs.get_organization_event if parent_rpcs.respond_to? :get_organization_event - @get_organization_event = ::Gapic::Config::Method.new get_organization_event_config - list_organization_impacts_config = parent_rpcs.list_organization_impacts if parent_rpcs.respond_to? :list_organization_impacts - @list_organization_impacts = ::Gapic::Config::Method.new list_organization_impacts_config - get_organization_impact_config = parent_rpcs.get_organization_impact if parent_rpcs.respond_to? :get_organization_impact - @get_organization_impact = ::Gapic::Config::Method.new get_organization_impact_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.rb deleted file mode 100644 index 76ceb72eed21..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ServiceHealth - module V1 - module ServiceHealth - # Credentials for the ServiceHealth API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/paths.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/paths.rb deleted file mode 100644 index faffaa39fdf7..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/paths.rb +++ /dev/null @@ -1,124 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceHealth - module V1 - module ServiceHealth - # Path helper methods for the ServiceHealth API. - module Paths - ## - # Create a fully-qualified Event resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/events/{event}` - # - # @param project [String] - # @param location [String] - # @param event [String] - # - # @return [::String] - def event_path project:, location:, event: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/events/#{event}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationEvent resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/organizationEvents/{event}` - # - # @param organization [String] - # @param location [String] - # @param event [String] - # - # @return [::String] - def organization_event_path organization:, location:, event: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/organizationEvents/#{event}" - end - - ## - # Create a fully-qualified OrganizationImpact resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/organizationImpacts/{organization_impact}` - # - # @param organization [String] - # @param location [String] - # @param organization_impact [String] - # - # @return [::String] - def organization_impact_path organization:, location:, organization_impact: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/organizationImpacts/#{organization_impact}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest.rb deleted file mode 100644 index 205266530be8..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_health/v1/version" -require "google/cloud/service_health/v1/bindings_override" - -require "google/cloud/service_health/v1/service_health/credentials" -require "google/cloud/service_health/v1/service_health/paths" -require "google/cloud/service_health/v1/service_health/rest/client" - -module Google - module Cloud - module ServiceHealth - module V1 - ## - # Request service health events relevant to your Google Cloud project. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/service_health/v1/service_health/rest" - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - module ServiceHealth - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/service_health/v1/service_health/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.rb deleted file mode 100644 index d7232b43bd7f..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/client.rb +++ /dev/null @@ -1,1067 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/servicehealth/v1/event_service_pb" -require "google/cloud/service_health/v1/service_health/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module ServiceHealth - module V1 - module ServiceHealth - module Rest - ## - # REST client for the ServiceHealth service. - # - # Request service health events relevant to your Google Cloud project. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicehealth.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :service_health_stub - - ## - # Configure the ServiceHealth Client class. - # - # See {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ServiceHealth clients - # ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceHealth", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_events.timeout = 60.0 - default_config.rpcs.list_events.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_event.timeout = 60.0 - default_config.rpcs.get_event.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_organization_events.timeout = 60.0 - default_config.rpcs.list_organization_events.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_organization_event.timeout = 60.0 - default_config.rpcs.get_organization_event.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_organization_impacts.timeout = 60.0 - default_config.rpcs.list_organization_impacts.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_organization_impact.timeout = 60.0 - default_config.rpcs.get_organization_impact.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceHealth Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @service_health_stub.universe_domain - end - - ## - # Create a new ServiceHealth REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ServiceHealth client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @service_health_stub = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @service_health_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @service_health_stub.endpoint - config.universe_domain = @service_health_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @service_health_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @service_health_stub.logger - end - - # Service calls - - ## - # Lists events under a given project and location. - # - # @overload list_events(request, options = nil) - # Pass arguments to `list_events` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::ListEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::ListEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) - # Pass arguments to `list_events` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value using the form - # `projects/{project_id}/locations/{location}/events`. - # - # `project_id` - ID of the project for which to list service health - # events. - # `location` - The location to get the service health events from. - # To retrieve service health events of category = INCIDENT, use `location` = - # `global`. - # @param page_size [::Integer] - # Optional. The maximum number of events that should be returned. Acceptable - # values are 1 to 100, inclusive. (The default value is 10.) If more results - # are available, the service returns a next_page_token that you can use to - # get the next page of results in subsequent list requests. The service may - # return fewer events than the requested page_size. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # Provide Page token returned by a previous `ListEvents` call to retrieve the - # next page of results. When paginating, all other parameters provided to - # `ListEvents` must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters resources listed in the - # response. The expression takes the following forms:
- # * field=value for `category` and `state`
- # * field <, >, <=, or >= value for `update_time`
- # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, - # `event_impacts.product.product_name:"Eventarc"` - #
- # - # Multiple filter queries are separated by spaces. Example: - # `category=INCIDENT state=ACTIVE`. - # - # By default, each expression is an AND expression. However, you can include - # AND and OR expressions explicitly. - # - # Filter is supported for the following fields: `category`, `state`, - # `update_time`, `event_impacts.product.product_name` - # @param view [::Google::Cloud::ServiceHealth::V1::EventView] - # Optional. Event fields to include in response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::Event>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::Event>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::ListEventsRequest.new - # - # # Call the list_events method. - # result = client.list_events request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceHealth::V1::Event. - # p item - # end - # - def list_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_events.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_events.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.list_events request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @service_health_stub, :list_events, "events", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a resource containing information about an event. - # - # @overload get_event(request, options = nil) - # Pass arguments to `get_event` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::GetEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::GetEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_event(name: nil) - # Pass arguments to `get_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Unique name of the event in this scope including project - # and location using the form - # `projects/{project_id}/locations/{location}/events/{event_id}`. - # - # `project_id` - Project ID of the project that contains the event.
- # `location` - The location to get the service health events from.
- # `event_id` - Event ID to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceHealth::V1::Event] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceHealth::V1::Event] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::GetEventRequest.new - # - # # Call the get_event method. - # result = client.get_event request - # - # # The returned object is of type Google::Cloud::ServiceHealth::V1::Event. - # p result - # - def get_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetEventRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_event.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.get_event request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists organization events under a given organization and location. - # - # @overload list_organization_events(request, options = nil) - # Pass arguments to `list_organization_events` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_organization_events(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) - # Pass arguments to `list_organization_events` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value using the form - # `organizations/{organization_id}/locations/{location}/organizationEvents`. - # - # `organization_id` - ID (number) of the project that contains the event. To - # get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- # `location` - The location to get the service health events from. To - # retrieve service health events of category = INCIDENT, use `location` = - # `global`. - # @param page_size [::Integer] - # Optional. The maximum number of events that should be returned. Acceptable - # values are `1` to `100`, inclusive. (The default value is `10`.) If more - # results are available, the service returns a `next_page_token` that you can - # use to get the next page of results in subsequent list requests. The - # service may return fewer events than the requested `page_size`. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # Provide Page token returned by a previous `ListOrganizationEvents` call to - # retrieve the next page of results. - # - # When paginating, all other parameters provided to - # `ListOrganizationEvents` must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters resources listed in the - # response. The expression takes the following forms: - # - # * field=value for `category` and `state` - # * field <, >, <=, or >= value for `update_time` - # - # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` - # - # Multiple filter queries are space-separated. Example: - # `category=INCIDENT state=ACTIVE`. - # - # By default, each expression is an AND expression. However, you can include - # AND and OR expressions explicitly. - # - # Filter is supported for the following fields: `category`, `state`, - # `update_time` - # @param view [::Google::Cloud::ServiceHealth::V1::OrganizationEventView] - # Optional. OrganizationEvent fields to include in response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationEvent>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationEvent>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new - # - # # Call the list_organization_events method. - # result = client.list_organization_events request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationEvent. - # p item - # end - # - def list_organization_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_organization_events.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_organization_events.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_organization_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.list_organization_events request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @service_health_stub, :list_organization_events, "organization_events", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a resource containing information about an event affecting an - # organization . - # - # @overload get_organization_event(request, options = nil) - # Pass arguments to `get_organization_event` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_organization_event(name: nil) - # Pass arguments to `get_organization_event` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Unique name of the event in this scope including organization and - # event ID using the form - # `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. - # - # `organization_id` - ID (number) of the project that contains the event. To - # get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- # `event_id` - Organization event ID to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new - # - # # Call the get_organization_event method. - # result = client.get_organization_event request - # - # # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationEvent. - # p result - # - def get_organization_event request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_organization_event.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_organization_event.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_organization_event.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.get_organization_event request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists assets impacted by organization events under a given organization and - # location. - # - # @overload list_organization_impacts(request, options = nil) - # Pass arguments to `list_organization_impacts` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_organization_impacts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_organization_impacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value using the form - # `organizations/{organization_id}/locations/{location}/organizationImpacts`. - # - # `organization_id` - ID (number) of the project that contains the event. To - # get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - # @param page_size [::Integer] - # Optional. The maximum number of events that should be returned. Acceptable - # values are `1` to `100`, inclusive. The default value is `10`. - # - # If more results are available, the service returns a - # `next_page_token` that can be used to get the next page of results in - # subsequent list requests. The service may return fewer - # [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - # than the requested `page_size`. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # Provide `page_token` returned by a previous `ListOrganizationImpacts` call - # to retrieve the next page of results. - # - # When paginating, all other parameters provided to `ListOrganizationImpacts` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. A filter expression that filters resources listed in the - # response. The expression is in the form of `field:value` for checking if a - # repeated field contains a value. - # - # Example: - # `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` - # - # To get your `{organization_id}`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - # - # Multiple filter queries are separated by spaces. - # - # By default, each expression is an AND expression. However, you can include - # AND and OR expressions explicitly. - # Filter is supported for the following fields: `events`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationImpact>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceHealth::V1::OrganizationImpact>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new - # - # # Call the list_organization_impacts method. - # result = client.list_organization_impacts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationImpact. - # p item - # end - # - def list_organization_impacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_organization_impacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_organization_impacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_organization_impacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.list_organization_impacts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @service_health_stub, :list_organization_impacts, "organization_impacts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a resource containing information about impact to an asset under - # an organization affected by a service health event. - # - # @overload get_organization_impact(request, options = nil) - # Pass arguments to `get_organization_impact` via a request object, either of type - # {::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_organization_impact(name: nil) - # Pass arguments to `get_organization_impact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource using the form - # `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. - # - # `organization_id` - ID (number) of the organization that contains the - # event. To get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- # `organization_impact_id` - ID of the [OrganizationImpact - # resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_health/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new - # - # # Call the get_organization_impact method. - # result = client.get_organization_impact request - # - # # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationImpact. - # p result - # - def get_organization_impact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_organization_impact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceHealth::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_organization_impact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_organization_impact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_health_stub.get_organization_impact request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ServiceHealth REST API. - # - # This class represents the configuration for ServiceHealth REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_events to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_events.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_events.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicehealth.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ServiceHealth API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_events` - # @return [::Gapic::Config::Method] - # - attr_reader :list_events - ## - # RPC-specific configuration for `get_event` - # @return [::Gapic::Config::Method] - # - attr_reader :get_event - ## - # RPC-specific configuration for `list_organization_events` - # @return [::Gapic::Config::Method] - # - attr_reader :list_organization_events - ## - # RPC-specific configuration for `get_organization_event` - # @return [::Gapic::Config::Method] - # - attr_reader :get_organization_event - ## - # RPC-specific configuration for `list_organization_impacts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_organization_impacts - ## - # RPC-specific configuration for `get_organization_impact` - # @return [::Gapic::Config::Method] - # - attr_reader :get_organization_impact - - # @private - def initialize parent_rpcs = nil - list_events_config = parent_rpcs.list_events if parent_rpcs.respond_to? :list_events - @list_events = ::Gapic::Config::Method.new list_events_config - get_event_config = parent_rpcs.get_event if parent_rpcs.respond_to? :get_event - @get_event = ::Gapic::Config::Method.new get_event_config - list_organization_events_config = parent_rpcs.list_organization_events if parent_rpcs.respond_to? :list_organization_events - @list_organization_events = ::Gapic::Config::Method.new list_organization_events_config - get_organization_event_config = parent_rpcs.get_organization_event if parent_rpcs.respond_to? :get_organization_event - @get_organization_event = ::Gapic::Config::Method.new get_organization_event_config - list_organization_impacts_config = parent_rpcs.list_organization_impacts if parent_rpcs.respond_to? :list_organization_impacts - @list_organization_impacts = ::Gapic::Config::Method.new list_organization_impacts_config - get_organization_impact_config = parent_rpcs.get_organization_impact if parent_rpcs.respond_to? :get_organization_impact - @get_organization_impact = ::Gapic::Config::Method.new get_organization_impact_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.rb deleted file mode 100644 index 334b7953ff5e..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/service_health/rest/service_stub.rb +++ /dev/null @@ -1,447 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/servicehealth/v1/event_service_pb" - -module Google - module Cloud - module ServiceHealth - module V1 - module ServiceHealth - module Rest - ## - # REST service stub for the ServiceHealth service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_events REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListEventsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceHealth::V1::ListEventsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceHealth::V1::ListEventsResponse] - # A result object deserialized from the server's reply - def list_events request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_events_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_events", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceHealth::V1::ListEventsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_event REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetEventRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceHealth::V1::Event] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceHealth::V1::Event] - # A result object deserialized from the server's reply - def get_event request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_event_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_event", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceHealth::V1::Event.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_organization_events REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse] - # A result object deserialized from the server's reply - def list_organization_events request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_organization_events_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_organization_events", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_organization_event REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent] - # A result object deserialized from the server's reply - def get_organization_event request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_organization_event_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_organization_event", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceHealth::V1::OrganizationEvent.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_organization_impacts REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse] - # A result object deserialized from the server's reply - def list_organization_impacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_organization_impacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_organization_impacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_organization_impact REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceHealth::V1::OrganizationImpact] - # A result object deserialized from the server's reply - def get_organization_impact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_organization_impact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_organization_impact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceHealth::V1::OrganizationImpact.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_events REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListEventsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_events_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/events", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_event REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetEventRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_event_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/events/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_organization_events REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_organization_events_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/organizationEvents", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_organization_event REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_organization_event_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/organizationEvents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_organization_impacts REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_organization_impacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/organizationImpacts", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_organization_impact REST call - # - # @param request_pb [::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_organization_impact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/organizationImpacts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/version.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/version.rb deleted file mode 100644 index 1a6b3fe921b3..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/service_health/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceHealth - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_resources_pb.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_resources_pb.rb deleted file mode 100644 index 0b6bc5e2a840..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_resources_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/servicehealth/v1/event_resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/servicehealth/v1/event_resources.proto\x12\x1dgoogle.cloud.servicehealth.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x93\x0b\n\x05\x45vent\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12I\n\x08\x63\x61tegory\x18\x04 \x01(\x0e\x32\x32.google.cloud.servicehealth.v1.Event.EventCategoryB\x03\xe0\x41\x03\x12U\n\x11\x64\x65tailed_category\x18\x15 \x01(\x0e\x32\x35.google.cloud.servicehealth.v1.Event.DetailedCategoryB\x03\xe0\x41\x03\x12>\n\x05state\x18\x05 \x01(\x0e\x32*.google.cloud.servicehealth.v1.Event.StateB\x03\xe0\x41\x03\x12O\n\x0e\x64\x65tailed_state\x18\x13 \x01(\x0e\x32\x32.google.cloud.servicehealth.v1.Event.DetailedStateB\x03\xe0\x41\x03\x12\x41\n\revent_impacts\x18\x14 \x03(\x0b\x32*.google.cloud.servicehealth.v1.EventImpact\x12\x46\n\trelevance\x18\x08 \x01(\x0e\x32..google.cloud.servicehealth.v1.Event.RelevanceB\x03\xe0\x41\x03\x12@\n\x07updates\x18\t \x03(\x0b\x32*.google.cloud.servicehealth.v1.EventUpdateB\x03\xe0\x41\x03\x12\x19\n\x0cparent_event\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10next_update_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"=\n\rEventCategory\x12\x1e\n\x1a\x45VENT_CATEGORY_UNSPECIFIED\x10\x00\x12\x0c\n\x08INCIDENT\x10\x02\"d\n\x10\x44\x65tailedCategory\x12!\n\x1d\x44\x45TAILED_CATEGORY_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43ONFIRMED_INCIDENT\x10\x01\x12\x15\n\x11\x45MERGING_INCIDENT\x10\x02\"6\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\n\n\x06\x43LOSED\x10\x02\"\x8b\x01\n\rDetailedState\x12\x1e\n\x1a\x44\x45TAILED_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45MERGING\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\x0c\n\x08RESOLVED\x10\x03\x12\n\n\x06MERGED\x10\x04\x12\x0f\n\x0b\x41UTO_CLOSED\x10\t\x12\x12\n\x0e\x46\x41LSE_POSITIVE\x10\n\"w\n\tRelevance\x12\x19\n\x15RELEVANCE_UNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x02\x12\x10\n\x0cNOT_IMPACTED\x10\x06\x12\x15\n\x11PARTIALLY_RELATED\x10\x07\x12\x0b\n\x07RELATED\x10\x08\x12\x0c\n\x08IMPACTED\x10\t:n\xea\x41k\n\"servicehealth.googleapis.com/Event\x12\x36projects/{project}/locations/{location}/events/{event}*\x06\x65vents2\x05\x65vent\"\xcf\n\n\x11OrganizationEvent\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12U\n\x08\x63\x61tegory\x18\x04 \x01(\x0e\x32>.google.cloud.servicehealth.v1.OrganizationEvent.EventCategoryB\x03\xe0\x41\x03\x12\x61\n\x11\x64\x65tailed_category\x18\x11 \x01(\x0e\x32\x41.google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategoryB\x03\xe0\x41\x03\x12J\n\x05state\x18\x05 \x01(\x0e\x32\x36.google.cloud.servicehealth.v1.OrganizationEvent.StateB\x03\xe0\x41\x03\x12[\n\x0e\x64\x65tailed_state\x18\x10 \x01(\x0e\x32>.google.cloud.servicehealth.v1.OrganizationEvent.DetailedStateB\x03\xe0\x41\x03\x12\x46\n\revent_impacts\x18\x0f \x03(\x0b\x32*.google.cloud.servicehealth.v1.EventImpactB\x03\xe0\x41\x03\x12@\n\x07updates\x18\x08 \x03(\x0b\x32*.google.cloud.servicehealth.v1.EventUpdateB\x03\xe0\x41\x03\x12\x19\n\x0cparent_event\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10next_update_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"=\n\rEventCategory\x12\x1e\n\x1a\x45VENT_CATEGORY_UNSPECIFIED\x10\x00\x12\x0c\n\x08INCIDENT\x10\x02\"d\n\x10\x44\x65tailedCategory\x12!\n\x1d\x44\x45TAILED_CATEGORY_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43ONFIRMED_INCIDENT\x10\x01\x12\x15\n\x11\x45MERGING_INCIDENT\x10\x02\"6\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\n\n\x06\x43LOSED\x10\x02\"\x8b\x01\n\rDetailedState\x12\x1e\n\x1a\x44\x45TAILED_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45MERGING\x10\x01\x12\r\n\tCONFIRMED\x10\x02\x12\x0c\n\x08RESOLVED\x10\x03\x12\n\n\x06MERGED\x10\x04\x12\x0f\n\x0b\x41UTO_CLOSED\x10\t\x12\x12\n\x0e\x46\x41LSE_POSITIVE\x10\n:\xa9\x01\xea\x41\xa5\x01\n.servicehealth.googleapis.com/OrganizationEvent\x12Lorganizations/{organization}/locations/{location}/organizationEvents/{event}*\x12organizationEvents2\x11organizationEvent\"\xa0\x01\n\x0b\x45ventUpdate\x12\x34\n\x0bupdate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07symptom\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nworkaround\x18\x05 \x01(\tB\x03\xe0\x41\x03\"!\n\x08Location\x12\x15\n\rlocation_name\x18\x01 \x01(\t\"+\n\x07Product\x12\x14\n\x0cproduct_name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\"\x81\x01\n\x0b\x45ventImpact\x12\x37\n\x07product\x18\x01 \x01(\x0b\x32&.google.cloud.servicehealth.v1.Product\x12\x39\n\x08location\x18\x02 \x01(\x0b\x32\'.google.cloud.servicehealth.v1.Location\"\x94\x03\n\x12OrganizationImpact\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x08\x12:\n\x06\x65vents\x18\x02 \x03(\tB*\xe0\x41\x03\xfa\x41$\n\"servicehealth.googleapis.com/Event\x12\x38\n\x05\x61sset\x18\x03 \x01(\x0b\x32$.google.cloud.servicehealth.v1.AssetB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xbb\x01\xea\x41\xb7\x01\n/servicehealth.googleapis.com/OrganizationImpact\x12[organizations/{organization}/locations/{location}/organizationImpacts/{organization_impact}*\x13organizationImpacts2\x12organizationImpact\"9\n\x05\x41sset\x12\x17\n\nasset_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nasset_type\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xd2\x01\n\x11ListEventsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"servicehealth.googleapis.com/Event\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12;\n\x04view\x18\x06 \x01(\x0e\x32(.google.cloud.servicehealth.v1.EventViewB\x03\xe0\x41\x01\"\x87\x01\n\x12ListEventsResponse\x12\x39\n\x06\x65vents\x18\x01 \x03(\x0b\x32$.google.cloud.servicehealth.v1.EventB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x03\"K\n\x0fGetEventRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"servicehealth.googleapis.com/Event\"\xf6\x01\n\x1dListOrganizationEventsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.servicehealth.googleapis.com/OrganizationEvent\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12G\n\x04view\x18\x06 \x01(\x0e\x32\x34.google.cloud.servicehealth.v1.OrganizationEventViewB\x03\xe0\x41\x01\"\xac\x01\n\x1eListOrganizationEventsResponse\x12R\n\x13organization_events\x18\x01 \x03(\x0b\x32\x30.google.cloud.servicehealth.v1.OrganizationEventB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x03\"c\n\x1bGetOrganizationEventRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.servicehealth.googleapis.com/OrganizationEvent\"\xaf\x01\n\x1eListOrganizationImpactsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/servicehealth.googleapis.com/OrganizationImpact\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n\x1fListOrganizationImpactsResponse\x12T\n\x14organization_impacts\x18\x01 \x03(\x0b\x32\x31.google.cloud.servicehealth.v1.OrganizationImpactB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x03\"e\n\x1cGetOrganizationImpactRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/servicehealth.googleapis.com/OrganizationImpact*R\n\tEventView\x12\x1a\n\x16\x45VENT_VIEW_UNSPECIFIED\x10\x00\x12\x14\n\x10\x45VENT_VIEW_BASIC\x10\x01\x12\x13\n\x0f\x45VENT_VIEW_FULL\x10\x02*\x85\x01\n\x15OrganizationEventView\x12\'\n#ORGANIZATION_EVENT_VIEW_UNSPECIFIED\x10\x00\x12!\n\x1dORGANIZATION_EVENT_VIEW_BASIC\x10\x01\x12 \n\x1cORGANIZATION_EVENT_VIEW_FULL\x10\x02\x42\xcf\x02\n!com.google.cloud.servicehealth.v1B\x13\x45ventResourcesProtoP\x01ZGcloud.google.com/go/servicehealth/apiv1/servicehealthpb;servicehealthpb\xaa\x02\x1dGoogle.Cloud.ServiceHealth.V1\xca\x02\x1dGoogle\\Cloud\\ServiceHealth\\V1\xea\x02 Google::Cloud::ServiceHealth::V1\xea\x41\x66\n1servicehealth.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceHealth - module V1 - Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event").msgclass - Event::EventCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event.EventCategory").enummodule - Event::DetailedCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event.DetailedCategory").enummodule - Event::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event.State").enummodule - Event::DetailedState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event.DetailedState").enummodule - Event::Relevance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Event.Relevance").enummodule - OrganizationEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEvent").msgclass - OrganizationEvent::EventCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEvent.EventCategory").enummodule - OrganizationEvent::DetailedCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEvent.DetailedCategory").enummodule - OrganizationEvent::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEvent.State").enummodule - OrganizationEvent::DetailedState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEvent.DetailedState").enummodule - EventUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.EventUpdate").msgclass - Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Location").msgclass - Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Product").msgclass - EventImpact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.EventImpact").msgclass - OrganizationImpact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationImpact").msgclass - Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.Asset").msgclass - ListEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListEventsRequest").msgclass - ListEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListEventsResponse").msgclass - GetEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.GetEventRequest").msgclass - ListOrganizationEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListOrganizationEventsRequest").msgclass - ListOrganizationEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListOrganizationEventsResponse").msgclass - GetOrganizationEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.GetOrganizationEventRequest").msgclass - ListOrganizationImpactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListOrganizationImpactsRequest").msgclass - ListOrganizationImpactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.ListOrganizationImpactsResponse").msgclass - GetOrganizationImpactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.GetOrganizationImpactRequest").msgclass - EventView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.EventView").enummodule - OrganizationEventView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.servicehealth.v1.OrganizationEventView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_pb.rb b/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_pb.rb deleted file mode 100644 index f23b23184afe..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/lib/google/cloud/servicehealth/v1/event_service_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/servicehealth/v1/event_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/cloud/servicehealth/v1/event_resources_pb' - - -descriptor_data = "\n1google/cloud/servicehealth/v1/event_service.proto\x12\x1dgoogle.cloud.servicehealth.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x33google/cloud/servicehealth/v1/event_resources.proto2\xaa\n\n\rServiceHealth\x12\xae\x01\n\nListEvents\x12\x30.google.cloud.servicehealth.v1.ListEventsRequest\x1a\x31.google.cloud.servicehealth.v1.ListEventsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/events\x12\x9b\x01\n\x08GetEvent\x12..google.cloud.servicehealth.v1.GetEventRequest\x1a$.google.cloud.servicehealth.v1.Event\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/events/*}\x12\xe3\x01\n\x16ListOrganizationEvents\x12<.google.cloud.servicehealth.v1.ListOrganizationEventsRequest\x1a=.google.cloud.servicehealth.v1.ListOrganizationEventsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=organizations/*/locations/*}/organizationEvents\x12\xd0\x01\n\x14GetOrganizationEvent\x12:.google.cloud.servicehealth.v1.GetOrganizationEventRequest\x1a\x30.google.cloud.servicehealth.v1.OrganizationEvent\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=organizations/*/locations/*/organizationEvents/*}\x12\xe7\x01\n\x17ListOrganizationImpacts\x12=.google.cloud.servicehealth.v1.ListOrganizationImpactsRequest\x1a>.google.cloud.servicehealth.v1.ListOrganizationImpactsResponse\"M\xda\x41\x06parent\x82\xd3\xe4\x93\x02>\x12\x12] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.rb deleted file mode 100644 index 60b89ba52554..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/cloud/servicehealth/v1/event_resources.rb +++ /dev/null @@ -1,718 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceHealth - module V1 - # Represents service health events that may affect Google Cloud products. - # Event resource is a read-only view and does not allow any modifications. All - # fields are output only. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Name of the event. Unique name of the event in - # this scope including project and location using the form - # `projects/{project_id}/locations/{location}/events/{event_id}`. - # @!attribute [r] title - # @return [::String] - # Output only. Brief description for the event. - # @!attribute [r] description - # @return [::String] - # Output only. Free-form, human-readable description. - # @!attribute [r] category - # @return [::Google::Cloud::ServiceHealth::V1::Event::EventCategory] - # Output only. The category of the event. - # @!attribute [r] detailed_category - # @return [::Google::Cloud::ServiceHealth::V1::Event::DetailedCategory] - # Output only. The detailed category of the event. - # @!attribute [r] state - # @return [::Google::Cloud::ServiceHealth::V1::Event::State] - # Output only. The current state of the event. - # @!attribute [r] detailed_state - # @return [::Google::Cloud::ServiceHealth::V1::Event::DetailedState] - # Output only. The current detailed state of the incident. - # @!attribute [rw] event_impacts - # @return [::Array<::Google::Cloud::ServiceHealth::V1::EventImpact>] - # Google Cloud products and locations impacted by the event. - # @!attribute [r] relevance - # @return [::Google::Cloud::ServiceHealth::V1::Event::Relevance] - # Output only. Communicates why a given event is deemed relevant in the - # context of a given project. - # @!attribute [r] updates - # @return [::Array<::Google::Cloud::ServiceHealth::V1::EventUpdate>] - # Output only. Event updates are correspondence from Google. - # @!attribute [r] parent_event - # @return [::String] - # Output only. When `detailed_state`=`MERGED`, `parent_event` contains the - # name of the parent event. All further updates will be published to the - # parent event. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the event was last modified. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The start time of the event, if applicable. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The end time of the event, if applicable. - # @!attribute [r] next_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the next update can be expected. - class Event - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The category of the event. This enum lists all possible categories of - # event. - module EventCategory - # Unspecified category. - EVENT_CATEGORY_UNSPECIFIED = 0 - - # Event category for service outage or degradation. - INCIDENT = 2 - end - - # The detailed category of an event. Contains all possible states for all - # event categories. - module DetailedCategory - # Unspecified detailed category. - DETAILED_CATEGORY_UNSPECIFIED = 0 - - # Indicates an event with category INCIDENT has a confirmed impact to at - # least one Google Cloud product. - CONFIRMED_INCIDENT = 1 - - # Indicates an event with category INCIDENT is under investigation to - # determine if it has a confirmed impact on any Google Cloud products. - EMERGING_INCIDENT = 2 - end - - # The state of the event. This enum lists all possible states of event. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # Event is actively affecting a Google Cloud product and will continue to - # receive updates. - ACTIVE = 1 - - # Event is no longer affecting the Google Cloud product or has been merged - # with another event. - CLOSED = 2 - end - - # The detailed state of the incident. This enum lists all possible detailed - # states of an incident. - module DetailedState - # Unspecified detail state. - DETAILED_STATE_UNSPECIFIED = 0 - - # Google engineers are actively investigating the event to determine the - # impact. - EMERGING = 1 - - # The incident is confirmed and impacting at least one Google Cloud - # product. Ongoing status updates will be provided until it is resolved. - CONFIRMED = 2 - - # The incident is no longer affecting any Google Cloud product, and there - # will be no further updates. - RESOLVED = 3 - - # The incident was merged into a parent incident. All further updates will - # be published to the parent only. The `parent_event` field contains the - # name of the parent. - MERGED = 4 - - # The incident was automatically closed because of the following reasons: - # - # * The impact of the incident could not be confirmed. - # * The incident was intermittent or resolved itself. - # - # The incident does not have a resolution because no action or - # investigation happened. If it is intermittent, the incident may reopen. - AUTO_CLOSED = 9 - - # Upon investigation, Google engineers concluded that the incident is not - # affecting a Google Cloud product. This state can change if the incident - # is reviewed again. - FALSE_POSITIVE = 10 - end - - # Communicates why a given incident is deemed relevant in the context of a - # given project. This enum lists all possible detailed states of relevance. - module Relevance - # Unspecified relevance. - RELEVANCE_UNSPECIFIED = 0 - - # The relevance of the incident to the project is unknown. - UNKNOWN = 2 - - # The incident does not impact the project. - NOT_IMPACTED = 6 - - # The incident is associated with a Google Cloud product your project uses, - # but the incident may not be impacting your project. For example, the - # incident may be impacting a Google Cloud product that your project uses, - # but in a location that your project does not use. - PARTIALLY_RELATED = 7 - - # The incident has a direct connection with your project and impacts a - # Google Cloud product in a location your project uses. - RELATED = 8 - - # The incident is verified to be impacting your project. - IMPACTED = 9 - end - end - - # Represents service health events that may affect Google Cloud products used - # across the organization. It is a read-only view and does not allow any - # modifications. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Name of the event. Unique name of the event in - # this scope including organization ID and location using the form - # `organizations/{organization_id}/locations/{location}/organizationEvents/{event_id}`. - # - # `organization_id` - see [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- # `location` - The location to get the service health events from.
- # `event_id` - Organization event ID to retrieve. - # @!attribute [r] title - # @return [::String] - # Output only. Brief description for the event. - # @!attribute [r] description - # @return [::String] - # Output only. Free-form, human-readable description. - # @!attribute [r] category - # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent::EventCategory] - # Output only. The category of the event. - # @!attribute [r] detailed_category - # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent::DetailedCategory] - # Output only. The detailed category of the event. - # @!attribute [r] state - # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent::State] - # Output only. The current state of the event. - # @!attribute [r] detailed_state - # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEvent::DetailedState] - # Output only. The current detailed state of the incident. - # @!attribute [r] event_impacts - # @return [::Array<::Google::Cloud::ServiceHealth::V1::EventImpact>] - # Output only. Represents the Google Cloud products and locations impacted by - # the event. - # @!attribute [r] updates - # @return [::Array<::Google::Cloud::ServiceHealth::V1::EventUpdate>] - # Output only. Incident-only field. Event updates are correspondence from - # Google. - # @!attribute [r] parent_event - # @return [::String] - # Output only. When `detailed_state`=`MERGED`, `parent_event` contains the - # name of the parent event. All further updates will be published to the - # parent event. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the update was posted. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The start time of the event, if applicable. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The end time of the event, if applicable. - # @!attribute [r] next_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Incident-only field. The time when the next update can be - # expected. - class OrganizationEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The category of the event. This enum lists all possible categories of - # event. - module EventCategory - # Unspecified category. - EVENT_CATEGORY_UNSPECIFIED = 0 - - # Event category for service outage or degradation. - INCIDENT = 2 - end - - # The detailed category of an event. Contains all possible states for all - # event categories. - module DetailedCategory - # Unspecified detailed category. - DETAILED_CATEGORY_UNSPECIFIED = 0 - - # Indicates an event with category INCIDENT has a confirmed impact to at - # least one Google Cloud product. - CONFIRMED_INCIDENT = 1 - - # Indicates an event with category INCIDENT is under investigation to - # determine if it has a confirmed impact on any Google Cloud products. - EMERGING_INCIDENT = 2 - end - - # The state of the organization event. This enum lists all possible states of - # event. - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # Event is actively affecting a Google Cloud product and will continue to - # receive updates. - ACTIVE = 1 - - # Event is no longer affecting the Google Cloud product or has been merged - # with another event. - CLOSED = 2 - end - - # The detailed state of the incident. This enum lists all possible detailed - # states of an incident. - module DetailedState - # Unspecified detail state. - DETAILED_STATE_UNSPECIFIED = 0 - - # Google engineers are actively investigating the incident to determine the - # impact. - EMERGING = 1 - - # The incident is confirmed and impacting at least one Google Cloud - # product. Ongoing status updates will be provided until it is resolved. - CONFIRMED = 2 - - # The incident is no longer affecting any Google Cloud product, and there - # will be no further updates. - RESOLVED = 3 - - # The incident was merged into a parent event. All further updates will be - # published to the parent only. The `parent_event` contains the name of the - # parent. - MERGED = 4 - - # The incident was automatically closed because of the following reasons: - # - # * The impact of the incident could not be confirmed. - # * The incident was intermittent or resolved itself. - # - # The incident does not have a resolution because no action or - # investigation happened. If it is intermittent, the incident may reopen. - AUTO_CLOSED = 9 - - # Upon investigation, Google engineers concluded that the incident is not - # affecting a Google Cloud product. This state can change if the incident - # is reviewed again. - FALSE_POSITIVE = 10 - end - end - - # Records an update made to the event. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the update was posted. - # @!attribute [r] title - # @return [::String] - # Output only. Brief title for the event. - # @!attribute [r] description - # @return [::String] - # Output only. Free-form, human-readable description. - # @!attribute [r] symptom - # @return [::String] - # Output only. Symptoms of the event, if available. - # @!attribute [r] workaround - # @return [::String] - # Output only. Workaround steps to remediate the event impact, if available. - class EventUpdate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the locations impacted by the event. - # @!attribute [rw] location_name - # @return [::String] - # Location impacted by the event. Example: `"us-central1"` - class Location - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the Google Cloud product impacted by the event. - # @!attribute [rw] product_name - # @return [::String] - # Google Cloud product impacted by the event. Example: `"Google Cloud SQL"` - # @!attribute [rw] id - # @return [::String] - # Unique identifier for the product. - class Product - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the Google Cloud products and locations impacted by the event. - # @!attribute [rw] product - # @return [::Google::Cloud::ServiceHealth::V1::Product] - # Google Cloud product impacted by the event. - # @!attribute [rw] location - # @return [::Google::Cloud::ServiceHealth::V1::Location] - # Location impacted by the event. - class EventImpact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents impact to assets at organizational level. It is a read-only view - # and does not allow any modifications. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Unique name of the organization impact in this - # scope including organization and location using the form - # `organizations/{organization_id}/locations/{location}/organizationImpacts/{organization_impact_id}`. - # - # `organization_id` - ID (number) of the organization that contains the - # event. To get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- # `organization_impact_id` - ID of the [OrganizationImpact - # resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - # @!attribute [r] events - # @return [::Array<::String>] - # Output only. A list of event names impacting the asset. - # @!attribute [r] asset - # @return [::Google::Cloud::ServiceHealth::V1::Asset] - # Output only. Google Cloud asset possibly impacted by the specified events. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the affected project was last modified. - class OrganizationImpact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the asset impacted by the events. - # @!attribute [r] asset_name - # @return [::String] - # Output only. Full name of the resource as defined in - # [Resource - # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name). - # @!attribute [r] asset_type - # @return [::String] - # Output only. Type of the asset. Example: - # `"cloudresourcemanager.googleapis.com/Project"` - class Asset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Requests list of events. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value using the form - # `projects/{project_id}/locations/{location}/events`. - # - # `project_id` - ID of the project for which to list service health - # events. - # `location` - The location to get the service health events from. - # To retrieve service health events of category = INCIDENT, use `location` = - # `global`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of events that should be returned. Acceptable - # values are 1 to 100, inclusive. (The default value is 10.) If more results - # are available, the service returns a next_page_token that you can use to - # get the next page of results in subsequent list requests. The service may - # return fewer events than the requested page_size. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # Provide Page token returned by a previous `ListEvents` call to retrieve the - # next page of results. When paginating, all other parameters provided to - # `ListEvents` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters resources listed in the - # response. The expression takes the following forms:
- # * field=value for `category` and `state`
- # * field <, >, <=, or >= value for `update_time`
- # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"`, - # `event_impacts.product.product_name:"Eventarc"` - #
- # - # Multiple filter queries are separated by spaces. Example: - # `category=INCIDENT state=ACTIVE`. - # - # By default, each expression is an AND expression. However, you can include - # AND and OR expressions explicitly. - # - # Filter is supported for the following fields: `category`, `state`, - # `update_time`, `event_impacts.product.product_name` - # @!attribute [rw] view - # @return [::Google::Cloud::ServiceHealth::V1::EventView] - # Optional. Event fields to include in response. - class ListEventsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to request for listing events. - # @!attribute [r] events - # @return [::Array<::Google::Cloud::ServiceHealth::V1::Event>] - # Output only. List of events. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The continuation token, used to page through large result - # sets. Provide this value in a subsequent request as page_token to retrieve - # the next page. - # - # If this field is not present, there are no subsequent results. - # @!attribute [r] unreachable - # @return [::Array<::String>] - # Output only. Locations that could not be reached. - class ListEventsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Gets information about a specific event. - # @!attribute [rw] name - # @return [::String] - # Required. Unique name of the event in this scope including project - # and location using the form - # `projects/{project_id}/locations/{location}/events/{event_id}`. - # - # `project_id` - Project ID of the project that contains the event.
- # `location` - The location to get the service health events from.
- # `event_id` - Event ID to retrieve. - class GetEventRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Requests list of events that affect an organization. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value using the form - # `organizations/{organization_id}/locations/{location}/organizationEvents`. - # - # `organization_id` - ID (number) of the project that contains the event. To - # get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- # `location` - The location to get the service health events from. To - # retrieve service health events of category = INCIDENT, use `location` = - # `global`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of events that should be returned. Acceptable - # values are `1` to `100`, inclusive. (The default value is `10`.) If more - # results are available, the service returns a `next_page_token` that you can - # use to get the next page of results in subsequent list requests. The - # service may return fewer events than the requested `page_size`. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # - # Provide Page token returned by a previous `ListOrganizationEvents` call to - # retrieve the next page of results. - # - # When paginating, all other parameters provided to - # `ListOrganizationEvents` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters resources listed in the - # response. The expression takes the following forms: - # - # * field=value for `category` and `state` - # * field <, >, <=, or >= value for `update_time` - # - # Examples: `category=INCIDENT`, `update_time>="2000-01-01T11:30:00-04:00"` - # - # Multiple filter queries are space-separated. Example: - # `category=INCIDENT state=ACTIVE`. - # - # By default, each expression is an AND expression. However, you can include - # AND and OR expressions explicitly. - # - # Filter is supported for the following fields: `category`, `state`, - # `update_time` - # @!attribute [rw] view - # @return [::Google::Cloud::ServiceHealth::V1::OrganizationEventView] - # Optional. OrganizationEvent fields to include in response. - class ListOrganizationEventsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to request for listing organization events. - # @!attribute [r] organization_events - # @return [::Array<::Google::Cloud::ServiceHealth::V1::OrganizationEvent>] - # Output only. List of organization events affecting an organization. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The continuation token, used to page through large result - # sets. Provide this value in a subsequent request as `page_token` to - # retrieve the next page. - # - # If this field is not present, there are no subsequent results. - # @!attribute [r] unreachable - # @return [::Array<::String>] - # Output only. Locations that could not be reached. - class ListOrganizationEventsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Gets information about a specific event affecting an organization. - # @!attribute [rw] name - # @return [::String] - # Required. Unique name of the event in this scope including organization and - # event ID using the form - # `organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}`. - # - # `organization_id` - ID (number) of the project that contains the event. To - # get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- # `event_id` - Organization event ID to retrieve. - class GetOrganizationEventRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Requests list of projects under an organization affected by an event. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value using the form - # `organizations/{organization_id}/locations/{location}/organizationImpacts`. - # - # `organization_id` - ID (number) of the project that contains the event. To - # get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of events that should be returned. Acceptable - # values are `1` to `100`, inclusive. The default value is `10`. - # - # If more results are available, the service returns a - # `next_page_token` that can be used to get the next page of results in - # subsequent list requests. The service may return fewer - # [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - # than the requested `page_size`. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # - # Provide `page_token` returned by a previous `ListOrganizationImpacts` call - # to retrieve the next page of results. - # - # When paginating, all other parameters provided to `ListOrganizationImpacts` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter expression that filters resources listed in the - # response. The expression is in the form of `field:value` for checking if a - # repeated field contains a value. - # - # Example: - # `events:organizations%2F{organization_id}%2Flocations%2Fglobal%2ForganizationEvents%2Fevent-id` - # - # To get your `{organization_id}`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - # - # Multiple filter queries are separated by spaces. - # - # By default, each expression is an AND expression. However, you can include - # AND and OR expressions explicitly. - # Filter is supported for the following fields: `events`. - class ListOrganizationImpactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to request for listing projects under an organization affected by an - # event. - # @!attribute [r] organization_impacts - # @return [::Array<::Google::Cloud::ServiceHealth::V1::OrganizationImpact>] - # Output only. List of - # [impacts](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact) - # for an organization affected by service health events. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The continuation token, used to page through large result - # sets. Provide this value in a subsequent request as `page_token` to - # retrieve the next page. - # - # If this field is not present, there are no subsequent results. - # @!attribute [r] unreachable - # @return [::Array<::String>] - # Output only. Locations that could not be reached. - class ListOrganizationImpactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Gets information about an event that affects a project under an organization. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource using the form - # `organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}`. - # - # `organization_id` - ID (number) of the organization that contains the - # event. To get your `organization_id`, see - # [Getting your organization resource - # ID](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
- # `organization_impact_id` - ID of the [OrganizationImpact - # resource](/service-health/docs/reference/rest/v1beta/organizations.locations.organizationImpacts#OrganizationImpact). - class GetOrganizationImpactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The event fields to include in ListEvents API response. This enum lists all - # possible event views. - module EventView - # Unspecified event view. Default to `EVENT_VIEW_BASIC`. - EVENT_VIEW_UNSPECIFIED = 0 - - # Includes all fields except `updates`. This view is the default for - # ListEvents API. - EVENT_VIEW_BASIC = 1 - - # Includes all event fields. - EVENT_VIEW_FULL = 2 - end - - # The organization event fields to include in ListOrganizationEvents API - # response. This enum lists all possible organization event views. - module OrganizationEventView - # Unspecified event view. Default to `ORGANIZATION_EVENT_VIEW_BASIC`. - ORGANIZATION_EVENT_VIEW_UNSPECIFIED = 0 - - # Includes all organization event fields except `updates`. This view is the - # default for ListOrganizationEvents API. - ORGANIZATION_EVENT_VIEW_BASIC = 1 - - # Includes all organization event fields. - ORGANIZATION_EVENT_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-service_health-v1/snippets/Gemfile deleted file mode 100644 index 299f6cda7aba..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-service_health-v1", path: "../" -else - gem "google-cloud-service_health-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_event.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_event.rb deleted file mode 100644 index 23479740a8e0..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_event.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicehealth_v1_generated_ServiceHealth_GetEvent_sync] -require "google/cloud/service_health/v1" - -## -# Snippet for the get_event call in the ServiceHealth service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_event. -# -def get_event - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceHealth::V1::GetEventRequest.new - - # Call the get_event method. - result = client.get_event request - - # The returned object is of type Google::Cloud::ServiceHealth::V1::Event. - p result -end -# [END servicehealth_v1_generated_ServiceHealth_GetEvent_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_event.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_event.rb deleted file mode 100644 index df9646decbc0..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_event.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicehealth_v1_generated_ServiceHealth_GetOrganizationEvent_sync] -require "google/cloud/service_health/v1" - -## -# Snippet for the get_organization_event call in the ServiceHealth service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_event. -# -def get_organization_event - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new - - # Call the get_organization_event method. - result = client.get_organization_event request - - # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationEvent. - p result -end -# [END servicehealth_v1_generated_ServiceHealth_GetOrganizationEvent_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_impact.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_impact.rb deleted file mode 100644 index f0a376741737..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/get_organization_impact.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicehealth_v1_generated_ServiceHealth_GetOrganizationImpact_sync] -require "google/cloud/service_health/v1" - -## -# Snippet for the get_organization_impact call in the ServiceHealth service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_impact. -# -def get_organization_impact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new - - # Call the get_organization_impact method. - result = client.get_organization_impact request - - # The returned object is of type Google::Cloud::ServiceHealth::V1::OrganizationImpact. - p result -end -# [END servicehealth_v1_generated_ServiceHealth_GetOrganizationImpact_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_events.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_events.rb deleted file mode 100644 index 53e9fc3e5458..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_events.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicehealth_v1_generated_ServiceHealth_ListEvents_sync] -require "google/cloud/service_health/v1" - -## -# Snippet for the list_events call in the ServiceHealth service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_events. -# -def list_events - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceHealth::V1::ListEventsRequest.new - - # Call the list_events method. - result = client.list_events request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ServiceHealth::V1::Event. - p item - end -end -# [END servicehealth_v1_generated_ServiceHealth_ListEvents_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_events.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_events.rb deleted file mode 100644 index 9d25933b9164..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_events.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicehealth_v1_generated_ServiceHealth_ListOrganizationEvents_sync] -require "google/cloud/service_health/v1" - -## -# Snippet for the list_organization_events call in the ServiceHealth service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_events. -# -def list_organization_events - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new - - # Call the list_organization_events method. - result = client.list_organization_events request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationEvent. - p item - end -end -# [END servicehealth_v1_generated_ServiceHealth_ListOrganizationEvents_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_impacts.rb b/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_impacts.rb deleted file mode 100644 index 2fdbd490e47d..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/snippets/service_health/list_organization_impacts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicehealth_v1_generated_ServiceHealth_ListOrganizationImpacts_sync] -require "google/cloud/service_health/v1" - -## -# Snippet for the list_organization_impacts call in the ServiceHealth service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_impacts. -# -def list_organization_impacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new - - # Call the list_organization_impacts method. - result = client.list_organization_impacts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ServiceHealth::V1::OrganizationImpact. - p item - end -end -# [END servicehealth_v1_generated_ServiceHealth_ListOrganizationImpacts_sync] diff --git a/owl-bot-staging/google-cloud-service_health-v1/snippets/snippet_metadata_google.cloud.servicehealth.v1.json b/owl-bot-staging/google-cloud-service_health-v1/snippets/snippet_metadata_google.cloud.servicehealth.v1.json deleted file mode 100644 index 64879231d0a8..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/snippets/snippet_metadata_google.cloud.servicehealth.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-service_health-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.servicehealth.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "servicehealth_v1_generated_ServiceHealth_ListEvents_sync", - "title": "Snippet for the list_events call in the ServiceHealth service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_events.", - "file": "service_health/list_events.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_events", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_events", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceHealth::V1::ListEventsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceHealth::V1::ListEventsResponse", - "client": { - "short_name": "ServiceHealth::Client", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" - }, - "method": { - "short_name": "ListEvents", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth.ListEvents", - "service": { - "short_name": "ServiceHealth", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicehealth_v1_generated_ServiceHealth_GetEvent_sync", - "title": "Snippet for the get_event call in the ServiceHealth service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_event.", - "file": "service_health/get_event.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_event", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_event", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceHealth::V1::GetEventRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceHealth::V1::Event", - "client": { - "short_name": "ServiceHealth::Client", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" - }, - "method": { - "short_name": "GetEvent", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth.GetEvent", - "service": { - "short_name": "ServiceHealth", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicehealth_v1_generated_ServiceHealth_ListOrganizationEvents_sync", - "title": "Snippet for the list_organization_events call in the ServiceHealth service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_events.", - "file": "service_health/list_organization_events.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_organization_events", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_events", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse", - "client": { - "short_name": "ServiceHealth::Client", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" - }, - "method": { - "short_name": "ListOrganizationEvents", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth.ListOrganizationEvents", - "service": { - "short_name": "ServiceHealth", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicehealth_v1_generated_ServiceHealth_GetOrganizationEvent_sync", - "title": "Snippet for the get_organization_event call in the ServiceHealth service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_event.", - "file": "service_health/get_organization_event.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_organization_event", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_event", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceHealth::V1::OrganizationEvent", - "client": { - "short_name": "ServiceHealth::Client", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" - }, - "method": { - "short_name": "GetOrganizationEvent", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth.GetOrganizationEvent", - "service": { - "short_name": "ServiceHealth", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicehealth_v1_generated_ServiceHealth_ListOrganizationImpacts_sync", - "title": "Snippet for the list_organization_impacts call in the ServiceHealth service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_impacts.", - "file": "service_health/list_organization_impacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_organization_impacts", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#list_organization_impacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse", - "client": { - "short_name": "ServiceHealth::Client", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" - }, - "method": { - "short_name": "ListOrganizationImpacts", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth.ListOrganizationImpacts", - "service": { - "short_name": "ServiceHealth", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicehealth_v1_generated_ServiceHealth_GetOrganizationImpact_sync", - "title": "Snippet for the get_organization_impact call in the ServiceHealth service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_impact.", - "file": "service_health/get_organization_impact.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_organization_impact", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client#get_organization_impact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceHealth::V1::OrganizationImpact", - "client": { - "short_name": "ServiceHealth::Client", - "full_name": "::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client" - }, - "method": { - "short_name": "GetOrganizationImpact", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth.GetOrganizationImpact", - "service": { - "short_name": "ServiceHealth", - "full_name": "google.cloud.servicehealth.v1.ServiceHealth" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_paths_test.rb b/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_paths_test.rb deleted file mode 100644 index 230902f0df17..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_paths_test.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/service_health/v1/service_health" - -class ::Google::Cloud::ServiceHealth::V1::ServiceHealth::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_event_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.event_path project: "value0", location: "value1", event: "value2" - assert_equal "projects/value0/locations/value1/events/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_event_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_event_path organization: "value0", location: "value1", event: "value2" - assert_equal "organizations/value0/locations/value1/organizationEvents/value2", path - end - end - - def test_organization_impact_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_impact_path organization: "value0", location: "value1", organization_impact: "value2" - assert_equal "organizations/value0/locations/value1/organizationImpacts/value2", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_test.rb b/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_test.rb deleted file mode 100644 index d7fb92ff8f2d..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_rest_test.rb +++ /dev/null @@ -1,434 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/servicehealth/v1/event_service_pb" -require "google/cloud/service_health/v1/service_health/rest" - - -class ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_events - # Create test objects. - client_result = ::Google::Cloud::ServiceHealth::V1::ListEventsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - view = :EVENT_VIEW_UNSPECIFIED - - list_events_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_list_events_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_events_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_events parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_events ::Google::Cloud::ServiceHealth::V1::ListEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_events(::Google::Cloud::ServiceHealth::V1::ListEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_events_client_stub.call_count - end - end - end - - def test_get_event - # Create test objects. - client_result = ::Google::Cloud::ServiceHealth::V1::Event.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_get_event_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_event_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_event({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_event name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_event ::Google::Cloud::ServiceHealth::V1::GetEventRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_event({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_event(::Google::Cloud::ServiceHealth::V1::GetEventRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_event_client_stub.call_count - end - end - end - - def test_list_organization_events - # Create test objects. - client_result = ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - view = :ORGANIZATION_EVENT_VIEW_UNSPECIFIED - - list_organization_events_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_list_organization_events_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_organization_events_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_organization_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_organization_events parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_organization_events ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_organization_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_organization_events(::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_organization_events_client_stub.call_count - end - end - end - - def test_get_organization_event - # Create test objects. - client_result = ::Google::Cloud::ServiceHealth::V1::OrganizationEvent.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_organization_event_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_get_organization_event_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_organization_event_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_organization_event({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_organization_event name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_organization_event ::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_organization_event({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_organization_event(::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_organization_event_client_stub.call_count - end - end - end - - def test_list_organization_impacts - # Create test objects. - client_result = ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_organization_impacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_list_organization_impacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_organization_impacts_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_organization_impacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_organization_impacts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_organization_impacts ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_organization_impacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_organization_impacts(::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_organization_impacts_client_stub.call_count - end - end - end - - def test_get_organization_impact - # Create test objects. - client_result = ::Google::Cloud::ServiceHealth::V1::OrganizationImpact.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_organization_impact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::ServiceStub.stub :transcode_get_organization_impact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_organization_impact_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_organization_impact({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_organization_impact name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_organization_impact ::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_organization_impact({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_organization_impact(::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_organization_impact_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_test.rb b/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_test.rb deleted file mode 100644 index 3112ba40ae62..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/test/google/cloud/service_health/v1/service_health_test.rb +++ /dev/null @@ -1,489 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/servicehealth/v1/event_service_pb" -require "google/cloud/service_health/v1/service_health" - -class ::Google::Cloud::ServiceHealth::V1::ServiceHealth::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_events - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceHealth::V1::ListEventsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - view = :EVENT_VIEW_UNSPECIFIED - - list_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_events, name - assert_kind_of ::Google::Cloud::ServiceHealth::V1::ListEventsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal :EVENT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_events_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_events parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_events ::Google::Cloud::ServiceHealth::V1::ListEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_events(::Google::Cloud::ServiceHealth::V1::ListEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_events_client_stub.call_rpc_count - end - end - - def test_get_event - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceHealth::V1::Event.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_event, name - assert_kind_of ::Google::Cloud::ServiceHealth::V1::GetEventRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_event_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_event({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_event name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_event ::Google::Cloud::ServiceHealth::V1::GetEventRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_event({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_event(::Google::Cloud::ServiceHealth::V1::GetEventRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_event_client_stub.call_rpc_count - end - end - - def test_list_organization_events - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - view = :ORGANIZATION_EVENT_VIEW_UNSPECIFIED - - list_organization_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_organization_events, name - assert_kind_of ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal :ORGANIZATION_EVENT_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_organization_events_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_organization_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_organization_events parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_organization_events ::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_organization_events({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_organization_events(::Google::Cloud::ServiceHealth::V1::ListOrganizationEventsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_organization_events_client_stub.call_rpc_count - end - end - - def test_get_organization_event - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceHealth::V1::OrganizationEvent.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_organization_event_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_organization_event, name - assert_kind_of ::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_organization_event_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_organization_event({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_organization_event name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_organization_event ::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_organization_event({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_organization_event(::Google::Cloud::ServiceHealth::V1::GetOrganizationEventRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_organization_event_client_stub.call_rpc_count - end - end - - def test_list_organization_impacts - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_organization_impacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_organization_impacts, name - assert_kind_of ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_organization_impacts_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_organization_impacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_organization_impacts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_organization_impacts ::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_organization_impacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_organization_impacts(::Google::Cloud::ServiceHealth::V1::ListOrganizationImpactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_organization_impacts_client_stub.call_rpc_count - end - end - - def test_get_organization_impact - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceHealth::V1::OrganizationImpact.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_organization_impact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_organization_impact, name - assert_kind_of ::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_organization_impact_client_stub do - # Create client - c = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_organization_impact({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_organization_impact name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_organization_impact ::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_organization_impact({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_organization_impact(::Google::Cloud::ServiceHealth::V1::GetOrganizationImpactRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_organization_impact_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ServiceHealth::V1::ServiceHealth::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-service_health-v1/test/helper.rb b/owl-bot-staging/google-cloud-service_health-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-service_health-v1/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_management-v1/.gitignore b/owl-bot-staging/google-cloud-service_management-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/.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_management-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-service_management-v1/.repo-metadata.json deleted file mode 100644 index 966c229fd1cf..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "servicemanagement.googleapis.com", - "api_shortname": "servicemanagement", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest", - "distribution_name": "google-cloud-service_management-v1", - "is_cloud": true, - "language": "ruby", - "name": "servicemanagement", - "name_pretty": "Service Management V1 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": "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers. Note that google-cloud-service_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_management instead. See the readme for more details.", - "ruby-cloud-env-prefix": "SERVICE_MANAGEMENT", - "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_management-v1/.rubocop.yml b/owl-bot-staging/google-cloud-service_management-v1/.rubocop.yml deleted file mode 100644 index af3b43f29aeb..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-service_management-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-service_management-v1.rb" diff --git a/owl-bot-staging/google-cloud-service_management-v1/.toys.rb b/owl-bot-staging/google-cloud-service_management-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/.yardopts b/owl-bot-staging/google-cloud-service_management-v1/.yardopts deleted file mode 100644 index 50c42b3fcd2e..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Service Management V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-service_management-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_management-v1/AUTHENTICATION.md deleted file mode 100644 index cf5a3d474532..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-service_management-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-service_management-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/service_management/v1" - -client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/service_management/v1" - -::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-service_management-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/service_management/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-service_management-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-service_management-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-service_management-v1/Gemfile b/owl-bot-staging/google-cloud-service_management-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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_management-v1/LICENSE.md b/owl-bot-staging/google-cloud-service_management-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-service_management-v1/README.md b/owl-bot-staging/google-cloud-service_management-v1/README.md deleted file mode 100644 index 75cba9a061ce..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Service Management V1 API - -Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Service Management V1 API. Most users should consider using -the main client gem, -[google-cloud-service_management](https://rubygems.org/gems/google-cloud-service_management). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-service_management-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/servicemanagement.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/service_management/v1" - -client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new -request = ::Google::Cloud::ServiceManagement::V1::ListServicesRequest.new # (request fields as keyword arguments...) -response = client.list_services request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_management-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/service-infrastructure/docs/overview/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/service_management/v1" -require "logger" - -client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-service_management`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-service_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-service_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-service_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-service_management-v1/Rakefile b/owl-bot-staging/google-cloud-service_management-v1/Rakefile deleted file mode 100644 index 2de06523c37d..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-service_management-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SERVICE_MANAGEMENT_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SERVICE_MANAGEMENT_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SERVICE_MANAGEMENT_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_MANAGEMENT_TEST_PROJECT=test123 SERVICE_MANAGEMENT_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/service_management/v1/service_manager/credentials" - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SERVICE_MANAGEMENT_PROJECT"] = project - ENV["SERVICE_MANAGEMENT_TEST_PROJECT"] = project - ENV["SERVICE_MANAGEMENT_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_management-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-service_management-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-service_management-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-service_management-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-service_management-v1" - header "google-cloud-service_management-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-service_management-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-service_management-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-service_management-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-service_management-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-service_management-v1/gapic_metadata.json deleted file mode 100644 index 329aa618c796..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/gapic_metadata.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.api.servicemanagement.v1", - "libraryPackage": "::Google::Cloud::ServiceManagement::V1", - "services": { - "ServiceManager": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client", - "rpcs": { - "ListServices": { - "methods": [ - "list_services" - ] - }, - "GetService": { - "methods": [ - "get_service" - ] - }, - "CreateService": { - "methods": [ - "create_service" - ] - }, - "DeleteService": { - "methods": [ - "delete_service" - ] - }, - "UndeleteService": { - "methods": [ - "undelete_service" - ] - }, - "ListServiceConfigs": { - "methods": [ - "list_service_configs" - ] - }, - "GetServiceConfig": { - "methods": [ - "get_service_config" - ] - }, - "CreateServiceConfig": { - "methods": [ - "create_service_config" - ] - }, - "SubmitConfigSource": { - "methods": [ - "submit_config_source" - ] - }, - "ListServiceRollouts": { - "methods": [ - "list_service_rollouts" - ] - }, - "GetServiceRollout": { - "methods": [ - "get_service_rollout" - ] - }, - "CreateServiceRollout": { - "methods": [ - "create_service_rollout" - ] - }, - "GenerateConfigReport": { - "methods": [ - "generate_config_report" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-service_management-v1/google-cloud-service_management-v1.gemspec b/owl-bot-staging/google-cloud-service_management-v1/google-cloud-service_management-v1.gemspec deleted file mode 100644 index 2307d1cd8ad4..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/google-cloud-service_management-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/service_management/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-service_management-v1" - gem.version = Google::Cloud::ServiceManagement::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers. Note that google-cloud-service_management-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_management instead. See the readme for more details." - gem.summary = "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google-cloud-service_management-v1.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google-cloud-service_management-v1.rb deleted file mode 100644 index 49cad33ce88e..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google-cloud-service_management-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/service_management/v1" diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/resources_pb.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/resources_pb.rb deleted file mode 100644 index 314a07cea044..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/resources_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/servicemanagement/v1/resources.proto - -require 'google/protobuf' - -require 'google/api/config_change_pb' -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/api/servicemanagement/v1/resources.proto\x12\x1fgoogle.api.servicemanagement.v1\x1a\x1egoogle/api/config_change.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"C\n\x0eManagedService\x12\x14\n\x0cservice_name\x18\x02 \x01(\t\x12\x1b\n\x13producer_project_id\x18\x03 \x01(\t\"\x91\x03\n\x11OperationMetadata\x12\x16\n\x0eresource_names\x18\x01 \x03(\t\x12\x46\n\x05steps\x18\x02 \x03(\x0b\x32\x37.google.api.servicemanagement.v1.OperationMetadata.Step\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x05\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x66\n\x04Step\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12I\n\x06status\x18\x04 \x01(\x0e\x32\x39.google.api.servicemanagement.v1.OperationMetadata.Status\"g\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44ONE\x10\x01\x12\x0f\n\x0bNOT_STARTED\x10\x02\x12\x0f\n\x0bIN_PROGRESS\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tCANCELLED\x10\x05\"\x8f\x01\n\nDiagnostic\x12\x10\n\x08location\x18\x01 \x01(\t\x12>\n\x04kind\x18\x02 \x01(\x0e\x32\x30.google.api.servicemanagement.v1.Diagnostic.Kind\x12\x0f\n\x07message\x18\x03 \x01(\t\"\x1e\n\x04Kind\x12\x0b\n\x07WARNING\x10\x00\x12\t\n\x05\x45RROR\x10\x01\"V\n\x0c\x43onfigSource\x12\n\n\x02id\x18\x05 \x01(\t\x12:\n\x05\x66iles\x18\x02 \x03(\x0b\x32+.google.api.servicemanagement.v1.ConfigFile\"\x95\x02\n\nConfigFile\x12\x11\n\tfile_path\x18\x01 \x01(\t\x12\x15\n\rfile_contents\x18\x03 \x01(\x0c\x12G\n\tfile_type\x18\x04 \x01(\x0e\x32\x34.google.api.servicemanagement.v1.ConfigFile.FileType\"\x93\x01\n\x08\x46ileType\x12\x19\n\x15\x46ILE_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13SERVICE_CONFIG_YAML\x10\x01\x12\x11\n\rOPEN_API_JSON\x10\x02\x12\x11\n\rOPEN_API_YAML\x10\x03\x12\x1d\n\x19\x46ILE_DESCRIPTOR_SET_PROTO\x10\x04\x12\x0e\n\nPROTO_FILE\x10\x06\"\x19\n\tConfigRef\x12\x0c\n\x04name\x18\x01 \x01(\t\"@\n\x0c\x43hangeReport\x12\x30\n\x0e\x63onfig_changes\x18\x01 \x03(\x0b\x32\x18.google.api.ConfigChange\"\xf9\x05\n\x07Rollout\x12\x17\n\nrollout_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ncreated_by\x18\x03 \x01(\t\x12\x46\n\x06status\x18\x04 \x01(\x0e\x32\x36.google.api.servicemanagement.v1.Rollout.RolloutStatus\x12\x63\n\x18traffic_percent_strategy\x18\x05 \x01(\x0b\x32?.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategyH\x00\x12\x62\n\x17\x64\x65lete_service_strategy\x18\xc8\x01 \x01(\x0b\x32>.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategyH\x00\x12\x14\n\x0cservice_name\x18\x08 \x01(\t\x1a\xb3\x01\n\x16TrafficPercentStrategy\x12\x65\n\x0bpercentages\x18\x01 \x03(\x0b\x32P.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.PercentagesEntry\x1a\x32\n\x10PercentagesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x17\n\x15\x44\x65leteServiceStrategy\"\x8d\x01\n\rRolloutStatus\x12\x1e\n\x1aROLLOUT_STATUS_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\x0b\n\x07SUCCESS\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0b\n\x07PENDING\x10\x05\x12\x16\n\x12\x46\x41ILED_ROLLED_BACK\x10\x06\x42\n\n\x08strategyB\x82\x02\n#com.google.api.servicemanagement.v1B\x0eResourcesProtoP\x01ZScloud.google.com/go/servicemanagement/apiv1/servicemanagementpb;servicemanagementpb\xa2\x02\x04GASM\xaa\x02!Google.Cloud.ServiceManagement.V1\xca\x02!Google\\Cloud\\ServiceManagement\\V1\xea\x02$Google::Cloud::ServiceManagement::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceManagement - module V1 - ManagedService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ManagedService").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.OperationMetadata").msgclass - OperationMetadata::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.OperationMetadata.Step").msgclass - OperationMetadata::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.OperationMetadata.Status").enummodule - Diagnostic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Diagnostic").msgclass - Diagnostic::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Diagnostic.Kind").enummodule - ConfigSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ConfigSource").msgclass - ConfigFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ConfigFile").msgclass - ConfigFile::FileType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ConfigFile.FileType").enummodule - ConfigRef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ConfigRef").msgclass - ChangeReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ChangeReport").msgclass - Rollout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Rollout").msgclass - Rollout::TrafficPercentStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy").msgclass - Rollout::DeleteServiceStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy").msgclass - Rollout::RolloutStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.Rollout.RolloutStatus").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_pb.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_pb.rb deleted file mode 100644 index 6e78a42d7363..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/servicemanagement/v1/servicemanager.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/service_pb' -require 'google/api/servicemanagement/v1/resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/any_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n4google/api/servicemanagement/v1/servicemanager.proto\x12\x1fgoogle.api.servicemanagement.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x18google/api/service.proto\x1a/google/api/servicemanagement/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\"r\n\x13ListServicesRequest\x12\x1b\n\x13producer_project_id\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\x12\x17\n\x0b\x63onsumer_id\x18\x07 \x01(\tB\x02\x18\x01\"r\n\x14ListServicesResponse\x12\x41\n\x08services\x18\x01 \x03(\x0b\x32/.google.api.servicemanagement.v1.ManagedService\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\".\n\x11GetServiceRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"]\n\x14\x43reateServiceRequest\x12\x45\n\x07service\x18\x01 \x01(\x0b\x32/.google.api.servicemanagement.v1.ManagedServiceB\x03\xe0\x41\x02\"1\n\x14\x44\x65leteServiceRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"3\n\x16UndeleteServiceRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"[\n\x17UndeleteServiceResponse\x12@\n\x07service\x18\x01 \x01(\x0b\x32/.google.api.servicemanagement.v1.ManagedService\"\xc2\x01\n\x17GetServiceConfigRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tconfig_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x04view\x18\x03 \x01(\x0e\x32\x43.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView\"!\n\nConfigView\x12\t\n\x05\x42\x41SIC\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\"]\n\x19ListServiceConfigsRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"c\n\x1aListServiceConfigsResponse\x12,\n\x0fservice_configs\x18\x01 \x03(\x0b\x32\x13.google.api.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"i\n\x1a\x43reateServiceConfigRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x30\n\x0eservice_config\x18\x02 \x01(\x0b\x32\x13.google.api.ServiceB\x03\xe0\x41\x02\"\x9d\x01\n\x19SubmitConfigSourceRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\rconfig_source\x18\x02 \x01(\x0b\x32-.google.api.servicemanagement.v1.ConfigSourceB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"I\n\x1aSubmitConfigSourceResponse\x12+\n\x0eservice_config\x18\x01 \x01(\x0b\x32\x13.google.api.Service\"x\n\x1b\x43reateServiceRolloutRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12>\n\x07rollout\x18\x02 \x01(\x0b\x32(.google.api.servicemanagement.v1.RolloutB\x03\xe0\x41\x02\"s\n\x1aListServiceRolloutsRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x02\"r\n\x1bListServiceRolloutsResponse\x12:\n\x08rollouts\x18\x01 \x03(\x0b\x32(.google.api.servicemanagement.v1.Rollout\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x18GetServiceRolloutRequest\x12\x19\n\x0cservice_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrollout_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15\x45nableServiceResponse\"{\n\x1bGenerateConfigReportRequest\x12-\n\nnew_config\x18\x01 \x01(\x0b\x32\x14.google.protobuf.AnyB\x03\xe0\x41\x02\x12-\n\nold_config\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyB\x03\xe0\x41\x01\"\xc9\x01\n\x1cGenerateConfigReportResponse\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x45\n\x0e\x63hange_reports\x18\x03 \x03(\x0b\x32-.google.api.servicemanagement.v1.ChangeReport\x12@\n\x0b\x64iagnostics\x18\x04 \x03(\x0b\x32+.google.api.servicemanagement.v1.Diagnostic2\xc8\x19\n\x0eServiceManager\x12\xb3\x01\n\x0cListServices\x12\x34.google.api.servicemanagement.v1.ListServicesRequest\x1a\x35.google.api.servicemanagement.v1.ListServicesResponse\"6\xda\x41\x1fproducer_project_id,consumer_id\x82\xd3\xe4\x93\x02\x0e\x12\x0c/v1/services\x12\xa5\x01\n\nGetService\x12\x32.google.api.servicemanagement.v1.GetServiceRequest\x1a/.google.api.servicemanagement.v1.ManagedService\"2\xda\x41\x0cservice_name\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/services/{service_name}\x12\xf5\x01\n\rCreateService\x12\x35.google.api.servicemanagement.v1.CreateServiceRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x63\n.google.api.servicemanagement.v1.ManagedService\x12\x31google.api.servicemanagement.v1.OperationMetadata\xda\x41\x07service\x82\xd3\xe4\x93\x02\x17\"\x0c/v1/services:\x07service\x12\xe6\x01\n\rDeleteService\x12\x35.google.api.servicemanagement.v1.DeleteServiceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41J\n\x15google.protobuf.Empty\x12\x31google.api.servicemanagement.v1.OperationMetadata\xda\x41\x0cservice_name\x82\xd3\xe4\x93\x02\x1d*\x1b/v1/services/{service_name}\x12\x96\x02\n\x0fUndeleteService\x12\x37.google.api.servicemanagement.v1.UndeleteServiceRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41l\n7google.api.servicemanagement.v1.UndeleteServiceResponse\x12\x31google.api.servicemanagement.v1.OperationMetadata\xda\x41\x0cservice_name\x82\xd3\xe4\x93\x02&\"$/v1/services/{service_name}:undelete\x12\xc9\x01\n\x12ListServiceConfigs\x12:.google.api.servicemanagement.v1.ListServiceConfigsRequest\x1a;.google.api.servicemanagement.v1.ListServiceConfigsResponse\":\xda\x41\x0cservice_name\x82\xd3\xe4\x93\x02%\x12#/v1/services/{service_name}/configs\x12\xde\x01\n\x10GetServiceConfig\x12\x38.google.api.servicemanagement.v1.GetServiceConfigRequest\x1a\x13.google.api.Service\"{\xda\x41\x1bservice_name,config_id,view\x82\xd3\xe4\x93\x02W\x12//v1/services/{service_name}/configs/{config_id}Z$\x12\"/v1/services/{service_name}/config\x12\xc2\x01\n\x13\x43reateServiceConfig\x12;.google.api.servicemanagement.v1.CreateServiceConfigRequest\x1a\x13.google.api.Service\"Y\xda\x41\x1bservice_name,service_config\x82\xd3\xe4\x93\x02\x35\"#/v1/services/{service_name}/configs:\x0eservice_config\x12\xc4\x02\n\x12SubmitConfigSource\x12:.google.api.servicemanagement.v1.SubmitConfigSourceRequest\x1a\x1d.google.longrunning.Operation\"\xd2\x01\xca\x41o\n:google.api.servicemanagement.v1.SubmitConfigSourceResponse\x12\x31google.api.servicemanagement.v1.OperationMetadata\xda\x41(service_name,config_source,validate_only\x82\xd3\xe4\x93\x02/\"*/v1/services/{service_name}/configs:submit:\x01*\x12\xd4\x01\n\x13ListServiceRollouts\x12;.google.api.servicemanagement.v1.ListServiceRolloutsRequest\x1a<.google.api.servicemanagement.v1.ListServiceRolloutsResponse\"B\xda\x41\x13service_name,filter\x82\xd3\xe4\x93\x02&\x12$/v1/services/{service_name}/rollouts\x12\xcd\x01\n\x11GetServiceRollout\x12\x39.google.api.servicemanagement.v1.GetServiceRolloutRequest\x1a(.google.api.servicemanagement.v1.Rollout\"S\xda\x41\x17service_name,rollout_id\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/services/{service_name}/rollouts/{rollout_id}\x12\xa1\x02\n\x14\x43reateServiceRollout\x12<.google.api.servicemanagement.v1.CreateServiceRolloutRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41\\\n\'google.api.servicemanagement.v1.Rollout\x12\x31google.api.servicemanagement.v1.OperationMetadata\xda\x41\x14service_name,rollout\x82\xd3\xe4\x93\x02/\"$/v1/services/{service_name}/rollouts:\x07rollout\x12\xd9\x01\n\x14GenerateConfigReport\x12<.google.api.servicemanagement.v1.GenerateConfigReportRequest\x1a=.google.api.servicemanagement.v1.GenerateConfigReportResponse\"D\xda\x41\x15new_config,old_config\x82\xd3\xe4\x93\x02&\"!/v1/services:generateConfigReport:\x01*\x1a\xfd\x01\xca\x41 servicemanagement.googleapis.com\xd2\x41\xd6\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/service.management,https://www.googleapis.com/auth/service.management.readonlyB\x87\x02\n#com.google.api.servicemanagement.v1B\x13ServiceManagerProtoP\x01ZScloud.google.com/go/servicemanagement/apiv1/servicemanagementpb;servicemanagementpb\xa2\x02\x04GASM\xaa\x02!Google.Cloud.ServiceManagement.V1\xca\x02!Google\\Cloud\\ServiceManagement\\V1\xea\x02$Google::Cloud::ServiceManagement::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceManagement - module V1 - ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServicesRequest").msgclass - ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServicesResponse").msgclass - GetServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GetServiceRequest").msgclass - CreateServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.CreateServiceRequest").msgclass - DeleteServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.DeleteServiceRequest").msgclass - UndeleteServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.UndeleteServiceRequest").msgclass - UndeleteServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.UndeleteServiceResponse").msgclass - GetServiceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GetServiceConfigRequest").msgclass - GetServiceConfigRequest::ConfigView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView").enummodule - ListServiceConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServiceConfigsRequest").msgclass - ListServiceConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServiceConfigsResponse").msgclass - CreateServiceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.CreateServiceConfigRequest").msgclass - SubmitConfigSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.SubmitConfigSourceRequest").msgclass - SubmitConfigSourceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.SubmitConfigSourceResponse").msgclass - CreateServiceRolloutRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.CreateServiceRolloutRequest").msgclass - ListServiceRolloutsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServiceRolloutsRequest").msgclass - ListServiceRolloutsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.ListServiceRolloutsResponse").msgclass - GetServiceRolloutRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GetServiceRolloutRequest").msgclass - EnableServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.EnableServiceResponse").msgclass - GenerateConfigReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GenerateConfigReportRequest").msgclass - GenerateConfigReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicemanagement.v1.GenerateConfigReportResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb deleted file mode 100644 index 12d089c4f77e..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb +++ /dev/null @@ -1,143 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/api/servicemanagement/v1/servicemanager.proto for package 'Google.Cloud.ServiceManagement.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/api/servicemanagement/v1/servicemanager_pb' - -module Google - module Cloud - module ServiceManagement - module V1 - module ServiceManager - # [Google Service Management - # API](https://cloud.google.com/service-infrastructure/docs/overview) - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.api.servicemanagement.v1.ServiceManager' - - # Lists managed services. - # - # Returns all public services. For authenticated users, also returns all - # services the calling user has "servicemanagement.services.get" permission - # for. - rpc :ListServices, ::Google::Cloud::ServiceManagement::V1::ListServicesRequest, ::Google::Cloud::ServiceManagement::V1::ListServicesResponse - # Gets a managed service. Authentication is required unless the service is - # public. - rpc :GetService, ::Google::Cloud::ServiceManagement::V1::GetServiceRequest, ::Google::Cloud::ServiceManagement::V1::ManagedService - # Creates a new managed service. - # - # A managed service is immutable, and is subject to mandatory 30-day - # data retention. You cannot move a service or recreate it within 30 days - # after deletion. - # - # One producer project can own no more than 500 services. For security and - # reliability purposes, a production service should be hosted in a - # dedicated producer project. - # - # Operation - rpc :CreateService, ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest, ::Google::Longrunning::Operation - # Deletes a managed service. This method will change the service to the - # `Soft-Delete` state for 30 days. Within this period, service producers may - # call - # [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] - # to restore the service. After 30 days, the service will be permanently - # deleted. - # - # Operation - rpc :DeleteService, ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest, ::Google::Longrunning::Operation - # Revives a previously deleted managed service. The method restores the - # service using the configuration at the time the service was deleted. - # The target service must exist and must have been deleted within the - # last 30 days. - # - # Operation - rpc :UndeleteService, ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest, ::Google::Longrunning::Operation - # Lists the history of the service configuration for a managed service, - # from the newest to the oldest. - rpc :ListServiceConfigs, ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest, ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse - # Gets a service configuration (version) for a managed service. - rpc :GetServiceConfig, ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest, ::Google::Api::Service - # Creates a new service configuration (version) for a managed service. - # This method only stores the service configuration. To roll out the service - # configuration to backend systems please call - # [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. - # - # Only the 100 most recent service configurations and ones referenced by - # existing rollouts are kept for each service. The rest will be deleted - # eventually. - rpc :CreateServiceConfig, ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest, ::Google::Api::Service - # Creates a new service configuration (version) for a managed service based - # on - # user-supplied configuration source files (for example: OpenAPI - # Specification). This method stores the source configurations as well as the - # generated service configuration. To rollout the service configuration to - # other services, - # please call - # [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. - # - # Only the 100 most recent configuration sources and ones referenced by - # existing service configurtions are kept for each service. The rest will be - # deleted eventually. - # - # Operation - rpc :SubmitConfigSource, ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest, ::Google::Longrunning::Operation - # Lists the history of the service configuration rollouts for a managed - # service, from the newest to the oldest. - rpc :ListServiceRollouts, ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest, ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse - # Gets a service configuration - # [rollout][google.api.servicemanagement.v1.Rollout]. - rpc :GetServiceRollout, ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest, ::Google::Cloud::ServiceManagement::V1::Rollout - # Creates a new service configuration rollout. Based on rollout, the - # Google Service Management will roll out the service configurations to - # different backend services. For example, the logging configuration will be - # pushed to Google Cloud Logging. - # - # Please note that any previous pending and running Rollouts and associated - # Operations will be automatically cancelled so that the latest Rollout will - # not be blocked by previous Rollouts. - # - # Only the 100 most recent (in any state) and the last 10 successful (if not - # already part of the set of 100 most recent) rollouts are kept for each - # service. The rest will be deleted eventually. - # - # Operation - rpc :CreateServiceRollout, ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest, ::Google::Longrunning::Operation - # Generates and returns a report (errors, warnings and changes from - # existing configurations) associated with - # GenerateConfigReportRequest.new_value - # - # If GenerateConfigReportRequest.old_value is specified, - # GenerateConfigReportRequest will contain a single ChangeReport based on the - # comparison between GenerateConfigReportRequest.new_value and - # GenerateConfigReportRequest.old_value. - # If GenerateConfigReportRequest.old_value is not specified, this method - # will compare GenerateConfigReportRequest.new_value with the last pushed - # service configuration. - rpc :GenerateConfigReport, ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest, ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.rb deleted file mode 100644 index 741429ff6b3d..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/service_management/v1/service_manager" -require "google/cloud/service_management/v1/version" - -module Google - module Cloud - module ServiceManagement - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/service_management/v1" - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/service_management/v1" - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/service_management/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/bindings_override.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/bindings_override.rb deleted file mode 100644 index 8f225f8662b6..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/bindings_override.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module ServiceManagement - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/service_management/v1/rest" - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceManagement"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^services/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^services/[^/]+/consumers/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^services/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^services/[^/]+/consumers/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^services/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^services/[^/]+/consumers/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/rest.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/rest.rb deleted file mode 100644 index 76294f210607..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/service_management/v1/service_manager/rest" -require "google/cloud/service_management/v1/bindings_override" -require "google/cloud/service_management/v1/version" - -module Google - module Cloud - module ServiceManagement - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/service_management/v1/rest" - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager.rb deleted file mode 100644 index 675475e70222..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_management/v1/version" - -require "google/cloud/service_management/v1/service_manager/credentials" -require "google/cloud/service_management/v1/service_manager/operations" -require "google/cloud/service_management/v1/service_manager/client" -require "google/cloud/service_management/v1/service_manager/rest" - -module Google - module Cloud - module ServiceManagement - module V1 - ## - # [Google Service Management - # API](https://cloud.google.com/service-infrastructure/docs/overview) - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/service_management/v1/service_manager" - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/service_management/v1/service_manager/rest" - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - module ServiceManager - end - end - end - end -end - -helper_path = ::File.join __dir__, "service_manager", "helpers.rb" -require "google/cloud/service_management/v1/service_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.rb deleted file mode 100644 index c370b0cbaa39..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/client.rb +++ /dev/null @@ -1,1811 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/api/servicemanagement/v1/servicemanager_pb" -require "google/iam/v1" - -module Google - module Cloud - module ServiceManagement - module V1 - module ServiceManager - ## - # Client for the ServiceManager service. - # - # [Google Service Management - # API](https://cloud.google.com/service-infrastructure/docs/overview) - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicemanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :service_manager_stub - - ## - # Configure the ServiceManager Client class. - # - # See {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ServiceManager clients - # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceManagement", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 10.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @service_manager_stub.universe_domain - end - - ## - # Create a new ServiceManager client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ServiceManager client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/api/servicemanagement/v1/servicemanager_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @service_manager_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @service_manager_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @service_manager_stub.endpoint - config.universe_domain = @service_manager_stub.universe_domain - config.logger = @service_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @service_manager_stub.logger - end - - # Service calls - - ## - # Lists managed services. - # - # Returns all public services. For authenticated users, also returns all - # services the calling user has "servicemanagement.services.get" permission - # for. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_services(producer_project_id: nil, page_size: nil, page_token: nil, consumer_id: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param producer_project_id [::String] - # Include services produced by the specified project. - # @param page_size [::Integer] - # The max number of items to include in the response list. Page size is 50 - # if not specified. Maximum value is 500. - # @param page_token [::String] - # Token identifying which result to start with; returned by a previous list - # call. - # @param consumer_id [::String] - # Include services consumed by the specified consumer. - # - # The Google Service Management implementation accepts the following - # forms: - # - project: - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::ManagedService>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::ManagedService>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceManagement::V1::ManagedService. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :list_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @service_manager_stub, :list_services, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a managed service. Authentication is required unless the service is - # public. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service(service_name: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the `ServiceManager` overview for - # naming requirements. For example: `example.googleapis.com`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceManagement::V1::ManagedService] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceManagement::V1::ManagedService] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::ServiceManagement::V1::ManagedService. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :get_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new managed service. - # - # A managed service is immutable, and is subject to mandatory 30-day - # data retention. You cannot move a service or recreate it within 30 days - # after deletion. - # - # One producer project can own no more than 500 services. For security and - # reliability purposes, a production service should be hosted in a - # dedicated producer project. - # - # Operation - # - # @overload create_service(request, options = nil) - # Pass arguments to `create_service` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::CreateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_service(service: nil) - # Pass arguments to `create_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service [::Google::Cloud::ServiceManagement::V1::ManagedService, ::Hash] - # Required. Initial values for the service resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new - # - # # Call the create_service method. - # result = client.create_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :create_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a managed service. This method will change the service to the - # `Soft-Delete` state for 30 days. Within this period, service producers may - # call - # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#undelete_service UndeleteService} - # to restore the service. After 30 days, the service will be permanently - # deleted. - # - # Operation - # - # @overload delete_service(request, options = nil) - # Pass arguments to `delete_service` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_service(service_name: nil) - # Pass arguments to `delete_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new - # - # # Call the delete_service method. - # result = client.delete_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :delete_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Revives a previously deleted managed service. The method restores the - # service using the configuration at the time the service was deleted. - # The target service must exist and must have been deleted within the - # last 30 days. - # - # Operation - # - # @overload undelete_service(request, options = nil) - # Pass arguments to `undelete_service` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undelete_service(service_name: nil) - # Pass arguments to `undelete_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new - # - # # Call the undelete_service method. - # result = client.undelete_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undelete_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undelete_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.undelete_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undelete_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :undelete_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the history of the service configuration for a managed service, - # from the newest to the oldest. - # - # @overload list_service_configs(request, options = nil) - # Pass arguments to `list_service_configs` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_service_configs(service_name: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_service_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param page_token [::String] - # The token of the page to retrieve. - # @param page_size [::Integer] - # The max number of items to include in the response list. Page size is 50 - # if not specified. Maximum value is 100. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Api::Service>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Api::Service>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new - # - # # Call the list_service_configs method. - # result = client.list_service_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Api::Service. - # p item - # end - # - def list_service_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_service_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_service_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_service_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :list_service_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @service_manager_stub, :list_service_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a service configuration (version) for a managed service. - # - # @overload get_service_config(request, options = nil) - # Pass arguments to `get_service_config` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service_config(service_name: nil, config_id: nil, view: nil) - # Pass arguments to `get_service_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param config_id [::String] - # Required. The id of the service configuration resource. - # - # This field must be specified for the server to return all fields, including - # `SourceInfo`. - # @param view [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest::ConfigView] - # Specifies which parts of the Service Config should be returned in the - # response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Api::Service] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Api::Service] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new - # - # # Call the get_service_config method. - # result = client.get_service_config request - # - # # The returned object is of type Google::Api::Service. - # p result - # - def get_service_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - if request.config_id - header_params["config_id"] = request.config_id - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :get_service_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new service configuration (version) for a managed service. - # This method only stores the service configuration. To roll out the service - # configuration to backend systems please call - # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_rollout CreateServiceRollout}. - # - # Only the 100 most recent service configurations and ones referenced by - # existing rollouts are kept for each service. The rest will be deleted - # eventually. - # - # @overload create_service_config(request, options = nil) - # Pass arguments to `create_service_config` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_service_config(service_name: nil, service_config: nil) - # Pass arguments to `create_service_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param service_config [::Google::Api::Service, ::Hash] - # Required. The service configuration resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Api::Service] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Api::Service] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new - # - # # Call the create_service_config method. - # result = client.create_service_config request - # - # # The returned object is of type Google::Api::Service. - # p result - # - def create_service_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_service_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_service_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :create_service_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new service configuration (version) for a managed service based - # on - # user-supplied configuration source files (for example: OpenAPI - # Specification). This method stores the source configurations as well as the - # generated service configuration. To rollout the service configuration to - # other services, - # please call - # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_rollout CreateServiceRollout}. - # - # Only the 100 most recent configuration sources and ones referenced by - # existing service configurtions are kept for each service. The rest will be - # deleted eventually. - # - # Operation - # - # @overload submit_config_source(request, options = nil) - # Pass arguments to `submit_config_source` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload submit_config_source(service_name: nil, config_source: nil, validate_only: nil) - # Pass arguments to `submit_config_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param config_source [::Google::Cloud::ServiceManagement::V1::ConfigSource, ::Hash] - # Required. The source configuration for the service. - # @param validate_only [::Boolean] - # Optional. If set, this will result in the generation of a - # `google.api.Service` configuration based on the `ConfigSource` provided, - # but the generated config and the sources will NOT be persisted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new - # - # # Call the submit_config_source method. - # result = client.submit_config_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def submit_config_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.submit_config_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.submit_config_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.submit_config_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :submit_config_source, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the history of the service configuration rollouts for a managed - # service, from the newest to the oldest. - # - # @overload list_service_rollouts(request, options = nil) - # Pass arguments to `list_service_rollouts` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_service_rollouts(service_name: nil, page_token: nil, page_size: nil, filter: nil) - # Pass arguments to `list_service_rollouts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param page_token [::String] - # The token of the page to retrieve. - # @param page_size [::Integer] - # The max number of items to include in the response list. Page size is 50 - # if not specified. Maximum value is 100. - # @param filter [::String] - # Required. Use `filter` to return subset of rollouts. - # The following filters are supported: - # - # -- By [status] - # [google.api.servicemanagement.v1.Rollout.RolloutStatus]. For example, - # `filter='status=SUCCESS'` - # - # -- By [strategy] - # [google.api.servicemanagement.v1.Rollout.strategy]. For example, - # `filter='strategy=TrafficPercentStrategy'` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::Rollout>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::Rollout>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new - # - # # Call the list_service_rollouts method. - # result = client.list_service_rollouts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceManagement::V1::Rollout. - # p item - # end - # - def list_service_rollouts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_service_rollouts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_service_rollouts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_service_rollouts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :list_service_rollouts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @service_manager_stub, :list_service_rollouts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a service configuration - # {::Google::Cloud::ServiceManagement::V1::Rollout rollout}. - # - # @overload get_service_rollout(request, options = nil) - # Pass arguments to `get_service_rollout` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service_rollout(service_name: nil, rollout_id: nil) - # Pass arguments to `get_service_rollout` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param rollout_id [::String] - # Required. The id of the rollout resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceManagement::V1::Rollout] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceManagement::V1::Rollout] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new - # - # # Call the get_service_rollout method. - # result = client.get_service_rollout request - # - # # The returned object is of type Google::Cloud::ServiceManagement::V1::Rollout. - # p result - # - def get_service_rollout request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service_rollout.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - if request.rollout_id - header_params["rollout_id"] = request.rollout_id - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service_rollout.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service_rollout.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :get_service_rollout, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new service configuration rollout. Based on rollout, the - # Google Service Management will roll out the service configurations to - # different backend services. For example, the logging configuration will be - # pushed to Google Cloud Logging. - # - # Please note that any previous pending and running Rollouts and associated - # Operations will be automatically cancelled so that the latest Rollout will - # not be blocked by previous Rollouts. - # - # Only the 100 most recent (in any state) and the last 10 successful (if not - # already part of the set of 100 most recent) rollouts are kept for each - # service. The rest will be deleted eventually. - # - # Operation - # - # @overload create_service_rollout(request, options = nil) - # Pass arguments to `create_service_rollout` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_service_rollout(service_name: nil, rollout: nil) - # Pass arguments to `create_service_rollout` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param rollout [::Google::Cloud::ServiceManagement::V1::Rollout, ::Hash] - # Required. The rollout resource. The `service_name` field is output only. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new - # - # # Call the create_service_rollout method. - # result = client.create_service_rollout request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service_rollout request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_service_rollout.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.service_name - header_params["service_name"] = request.service_name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_service_rollout.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_service_rollout.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :create_service_rollout, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Generates and returns a report (errors, warnings and changes from - # existing configurations) associated with - # GenerateConfigReportRequest.new_value - # - # If GenerateConfigReportRequest.old_value is specified, - # GenerateConfigReportRequest will contain a single ChangeReport based on the - # comparison between GenerateConfigReportRequest.new_value and - # GenerateConfigReportRequest.old_value. - # If GenerateConfigReportRequest.old_value is not specified, this method - # will compare GenerateConfigReportRequest.new_value with the last pushed - # service configuration. - # - # @overload generate_config_report(request, options = nil) - # Pass arguments to `generate_config_report` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload generate_config_report(new_config: nil, old_config: nil) - # Pass arguments to `generate_config_report` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param new_config [::Google::Protobuf::Any, ::Hash] - # Required. Service configuration for which we want to generate the report. - # For this version of API, the supported types are - # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, - # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, - # and {::Google::Api::Service google.api.Service} - # @param old_config [::Google::Protobuf::Any, ::Hash] - # Optional. Service configuration against which the comparison will be done. - # For this version of API, the supported types are - # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, - # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, - # and {::Google::Api::Service google.api.Service} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new - # - # # Call the generate_config_report method. - # result = client.generate_config_report request - # - # # The returned object is of type Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse. - # p result - # - def generate_config_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.generate_config_report.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.generate_config_report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_config_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.call_rpc :generate_config_report, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ServiceManager API. - # - # This class represents the configuration for ServiceManager, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_services to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicemanagement.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ServiceManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `create_service` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service - ## - # RPC-specific configuration for `delete_service` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service - ## - # RPC-specific configuration for `undelete_service` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_service - ## - # RPC-specific configuration for `list_service_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_configs - ## - # RPC-specific configuration for `get_service_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_config - ## - # RPC-specific configuration for `create_service_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_config - ## - # RPC-specific configuration for `submit_config_source` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_config_source - ## - # RPC-specific configuration for `list_service_rollouts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_rollouts - ## - # RPC-specific configuration for `get_service_rollout` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_rollout - ## - # RPC-specific configuration for `create_service_rollout` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_rollout - ## - # RPC-specific configuration for `generate_config_report` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_config_report - - # @private - def initialize parent_rpcs = nil - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service - @create_service = ::Gapic::Config::Method.new create_service_config - delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service - @delete_service = ::Gapic::Config::Method.new delete_service_config - undelete_service_config = parent_rpcs.undelete_service if parent_rpcs.respond_to? :undelete_service - @undelete_service = ::Gapic::Config::Method.new undelete_service_config - list_service_configs_config = parent_rpcs.list_service_configs if parent_rpcs.respond_to? :list_service_configs - @list_service_configs = ::Gapic::Config::Method.new list_service_configs_config - get_service_config_config = parent_rpcs.get_service_config if parent_rpcs.respond_to? :get_service_config - @get_service_config = ::Gapic::Config::Method.new get_service_config_config - create_service_config_config = parent_rpcs.create_service_config if parent_rpcs.respond_to? :create_service_config - @create_service_config = ::Gapic::Config::Method.new create_service_config_config - submit_config_source_config = parent_rpcs.submit_config_source if parent_rpcs.respond_to? :submit_config_source - @submit_config_source = ::Gapic::Config::Method.new submit_config_source_config - list_service_rollouts_config = parent_rpcs.list_service_rollouts if parent_rpcs.respond_to? :list_service_rollouts - @list_service_rollouts = ::Gapic::Config::Method.new list_service_rollouts_config - get_service_rollout_config = parent_rpcs.get_service_rollout if parent_rpcs.respond_to? :get_service_rollout - @get_service_rollout = ::Gapic::Config::Method.new get_service_rollout_config - create_service_rollout_config = parent_rpcs.create_service_rollout if parent_rpcs.respond_to? :create_service_rollout - @create_service_rollout = ::Gapic::Config::Method.new create_service_rollout_config - generate_config_report_config = parent_rpcs.generate_config_report if parent_rpcs.respond_to? :generate_config_report - @generate_config_report = ::Gapic::Config::Method.new generate_config_report_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.rb deleted file mode 100644 index a4c9815cf939..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/credentials.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ServiceManagement - module V1 - module ServiceManager - # Credentials for the ServiceManager API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ] - self.env_vars = [ - "SERVICE_MANAGEMENT_CREDENTIALS", - "SERVICE_MANAGEMENT_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SERVICE_MANAGEMENT_CREDENTIALS_JSON", - "SERVICE_MANAGEMENT_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.rb deleted file mode 100644 index 21aa897cfe85..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/operations.rb +++ /dev/null @@ -1,835 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module ServiceManagement - module V1 - module ServiceManager - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicemanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ServiceManager Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceManager Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicemanagement.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.rb deleted file mode 100644 index 7c6d55e49768..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_management/v1/version" -require "google/cloud/service_management/v1/bindings_override" - -require "google/cloud/service_management/v1/service_manager/credentials" -require "google/cloud/service_management/v1/service_manager/rest/operations" -require "google/cloud/service_management/v1/service_manager/rest/client" - -module Google - module Cloud - module ServiceManagement - module V1 - ## - # [Google Service Management - # API](https://cloud.google.com/service-infrastructure/docs/overview) - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/service_management/v1/service_manager/rest" - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - module ServiceManager - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/service_management/v1/service_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.rb deleted file mode 100644 index 1a1ac451fa89..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/client.rb +++ /dev/null @@ -1,1703 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/api/servicemanagement/v1/servicemanager_pb" -require "google/cloud/service_management/v1/service_manager/rest/service_stub" -require "google/iam/v1/rest" - -module Google - module Cloud - module ServiceManagement - module V1 - module ServiceManager - module Rest - ## - # REST client for the ServiceManager service. - # - # [Google Service Management - # API](https://cloud.google.com/service-infrastructure/docs/overview) - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicemanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :service_manager_stub - - ## - # Configure the ServiceManager Client class. - # - # See {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ServiceManager clients - # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceManagement", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 10.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceManager Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @service_manager_stub.universe_domain - end - - ## - # Create a new ServiceManager REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ServiceManager client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @service_manager_stub = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @service_manager_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @service_manager_stub.endpoint - config.universe_domain = @service_manager_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @service_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @service_manager_stub.logger - end - - # Service calls - - ## - # Lists managed services. - # - # Returns all public services. For authenticated users, also returns all - # services the calling user has "servicemanagement.services.get" permission - # for. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_services(producer_project_id: nil, page_size: nil, page_token: nil, consumer_id: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param producer_project_id [::String] - # Include services produced by the specified project. - # @param page_size [::Integer] - # The max number of items to include in the response list. Page size is 50 - # if not specified. Maximum value is 500. - # @param page_token [::String] - # Token identifying which result to start with; returned by a previous list - # call. - # @param consumer_id [::String] - # Include services consumed by the specified consumer. - # - # The Google Service Management implementation accepts the following - # forms: - # - project: - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::ManagedService>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::ManagedService>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceManagement::V1::ManagedService. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.list_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @service_manager_stub, :list_services, "services", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a managed service. Authentication is required unless the service is - # public. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service(service_name: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the `ServiceManager` overview for - # naming requirements. For example: `example.googleapis.com`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceManagement::V1::ManagedService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceManagement::V1::ManagedService] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::ServiceManagement::V1::ManagedService. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.get_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new managed service. - # - # A managed service is immutable, and is subject to mandatory 30-day - # data retention. You cannot move a service or recreate it within 30 days - # after deletion. - # - # One producer project can own no more than 500 services. For security and - # reliability purposes, a production service should be hosted in a - # dedicated producer project. - # - # Operation - # - # @overload create_service(request, options = nil) - # Pass arguments to `create_service` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::CreateServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_service(service: nil) - # Pass arguments to `create_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service [::Google::Cloud::ServiceManagement::V1::ManagedService, ::Hash] - # Required. Initial values for the service resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new - # - # # Call the create_service method. - # result = client.create_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.create_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a managed service. This method will change the service to the - # `Soft-Delete` state for 30 days. Within this period, service producers may - # call - # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client#undelete_service UndeleteService} - # to restore the service. After 30 days, the service will be permanently - # deleted. - # - # Operation - # - # @overload delete_service(request, options = nil) - # Pass arguments to `delete_service` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_service(service_name: nil) - # Pass arguments to `delete_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new - # - # # Call the delete_service method. - # result = client.delete_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.delete_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Revives a previously deleted managed service. The method restores the - # service using the configuration at the time the service was deleted. - # The target service must exist and must have been deleted within the - # last 30 days. - # - # Operation - # - # @overload undelete_service(request, options = nil) - # Pass arguments to `undelete_service` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undelete_service(service_name: nil) - # Pass arguments to `undelete_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new - # - # # Call the undelete_service method. - # result = client.undelete_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undelete_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undelete_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.undelete_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undelete_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.undelete_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the history of the service configuration for a managed service, - # from the newest to the oldest. - # - # @overload list_service_configs(request, options = nil) - # Pass arguments to `list_service_configs` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_service_configs(service_name: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_service_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param page_token [::String] - # The token of the page to retrieve. - # @param page_size [::Integer] - # The max number of items to include in the response list. Page size is 50 - # if not specified. Maximum value is 100. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Api::Service>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Api::Service>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new - # - # # Call the list_service_configs method. - # result = client.list_service_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Api::Service. - # p item - # end - # - def list_service_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_service_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_service_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_service_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.list_service_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @service_manager_stub, :list_service_configs, "service_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a service configuration (version) for a managed service. - # - # @overload get_service_config(request, options = nil) - # Pass arguments to `get_service_config` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service_config(service_name: nil, config_id: nil, view: nil) - # Pass arguments to `get_service_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param config_id [::String] - # Required. The id of the service configuration resource. - # - # This field must be specified for the server to return all fields, including - # `SourceInfo`. - # @param view [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest::ConfigView] - # Specifies which parts of the Service Config should be returned in the - # response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::Service] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new - # - # # Call the get_service_config method. - # result = client.get_service_config request - # - # # The returned object is of type Google::Api::Service. - # p result - # - def get_service_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.get_service_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new service configuration (version) for a managed service. - # This method only stores the service configuration. To roll out the service - # configuration to backend systems please call - # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client#create_service_rollout CreateServiceRollout}. - # - # Only the 100 most recent service configurations and ones referenced by - # existing rollouts are kept for each service. The rest will be deleted - # eventually. - # - # @overload create_service_config(request, options = nil) - # Pass arguments to `create_service_config` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_service_config(service_name: nil, service_config: nil) - # Pass arguments to `create_service_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param service_config [::Google::Api::Service, ::Hash] - # Required. The service configuration resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::Service] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new - # - # # Call the create_service_config method. - # result = client.create_service_config request - # - # # The returned object is of type Google::Api::Service. - # p result - # - def create_service_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_service_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_service_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.create_service_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new service configuration (version) for a managed service based - # on - # user-supplied configuration source files (for example: OpenAPI - # Specification). This method stores the source configurations as well as the - # generated service configuration. To rollout the service configuration to - # other services, - # please call - # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client#create_service_rollout CreateServiceRollout}. - # - # Only the 100 most recent configuration sources and ones referenced by - # existing service configurtions are kept for each service. The rest will be - # deleted eventually. - # - # Operation - # - # @overload submit_config_source(request, options = nil) - # Pass arguments to `submit_config_source` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload submit_config_source(service_name: nil, config_source: nil, validate_only: nil) - # Pass arguments to `submit_config_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param config_source [::Google::Cloud::ServiceManagement::V1::ConfigSource, ::Hash] - # Required. The source configuration for the service. - # @param validate_only [::Boolean] - # Optional. If set, this will result in the generation of a - # `google.api.Service` configuration based on the `ConfigSource` provided, - # but the generated config and the sources will NOT be persisted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new - # - # # Call the submit_config_source method. - # result = client.submit_config_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def submit_config_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.submit_config_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.submit_config_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.submit_config_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.submit_config_source request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the history of the service configuration rollouts for a managed - # service, from the newest to the oldest. - # - # @overload list_service_rollouts(request, options = nil) - # Pass arguments to `list_service_rollouts` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_service_rollouts(service_name: nil, page_token: nil, page_size: nil, filter: nil) - # Pass arguments to `list_service_rollouts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param page_token [::String] - # The token of the page to retrieve. - # @param page_size [::Integer] - # The max number of items to include in the response list. Page size is 50 - # if not specified. Maximum value is 100. - # @param filter [::String] - # Required. Use `filter` to return subset of rollouts. - # The following filters are supported: - # - # -- By [status] - # [google.api.servicemanagement.v1.Rollout.RolloutStatus]. For example, - # `filter='status=SUCCESS'` - # - # -- By [strategy] - # [google.api.servicemanagement.v1.Rollout.strategy]. For example, - # `filter='strategy=TrafficPercentStrategy'` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::Rollout>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceManagement::V1::Rollout>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new - # - # # Call the list_service_rollouts method. - # result = client.list_service_rollouts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceManagement::V1::Rollout. - # p item - # end - # - def list_service_rollouts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_service_rollouts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_service_rollouts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_service_rollouts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.list_service_rollouts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @service_manager_stub, :list_service_rollouts, "rollouts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a service configuration - # {::Google::Cloud::ServiceManagement::V1::Rollout rollout}. - # - # @overload get_service_rollout(request, options = nil) - # Pass arguments to `get_service_rollout` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service_rollout(service_name: nil, rollout_id: nil) - # Pass arguments to `get_service_rollout` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param rollout_id [::String] - # Required. The id of the rollout resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceManagement::V1::Rollout] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceManagement::V1::Rollout] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new - # - # # Call the get_service_rollout method. - # result = client.get_service_rollout request - # - # # The returned object is of type Google::Cloud::ServiceManagement::V1::Rollout. - # p result - # - def get_service_rollout request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service_rollout.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service_rollout.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service_rollout.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.get_service_rollout request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new service configuration rollout. Based on rollout, the - # Google Service Management will roll out the service configurations to - # different backend services. For example, the logging configuration will be - # pushed to Google Cloud Logging. - # - # Please note that any previous pending and running Rollouts and associated - # Operations will be automatically cancelled so that the latest Rollout will - # not be blocked by previous Rollouts. - # - # Only the 100 most recent (in any state) and the last 10 successful (if not - # already part of the set of 100 most recent) rollouts are kept for each - # service. The rest will be deleted eventually. - # - # Operation - # - # @overload create_service_rollout(request, options = nil) - # Pass arguments to `create_service_rollout` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_service_rollout(service_name: nil, rollout: nil) - # Pass arguments to `create_service_rollout` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param service_name [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @param rollout [::Google::Cloud::ServiceManagement::V1::Rollout, ::Hash] - # Required. The rollout resource. The `service_name` field is output only. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new - # - # # Call the create_service_rollout method. - # result = client.create_service_rollout request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_service_rollout request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_service_rollout.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_service_rollout.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_service_rollout.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.create_service_rollout request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Generates and returns a report (errors, warnings and changes from - # existing configurations) associated with - # GenerateConfigReportRequest.new_value - # - # If GenerateConfigReportRequest.old_value is specified, - # GenerateConfigReportRequest will contain a single ChangeReport based on the - # comparison between GenerateConfigReportRequest.new_value and - # GenerateConfigReportRequest.old_value. - # If GenerateConfigReportRequest.old_value is not specified, this method - # will compare GenerateConfigReportRequest.new_value with the last pushed - # service configuration. - # - # @overload generate_config_report(request, options = nil) - # Pass arguments to `generate_config_report` via a request object, either of type - # {::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload generate_config_report(new_config: nil, old_config: nil) - # Pass arguments to `generate_config_report` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param new_config [::Google::Protobuf::Any, ::Hash] - # Required. Service configuration for which we want to generate the report. - # For this version of API, the supported types are - # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, - # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, - # and {::Google::Api::Service google.api.Service} - # @param old_config [::Google::Protobuf::Any, ::Hash] - # Optional. Service configuration against which the comparison will be done. - # For this version of API, the supported types are - # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, - # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, - # and {::Google::Api::Service google.api.Service} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_management/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new - # - # # Call the generate_config_report method. - # result = client.generate_config_report request - # - # # The returned object is of type Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse. - # p result - # - def generate_config_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.generate_config_report.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.generate_config_report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_config_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_manager_stub.generate_config_report request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ServiceManager REST API. - # - # This class represents the configuration for ServiceManager REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_services to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicemanagement.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ServiceManager API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `create_service` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service - ## - # RPC-specific configuration for `delete_service` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_service - ## - # RPC-specific configuration for `undelete_service` - # @return [::Gapic::Config::Method] - # - attr_reader :undelete_service - ## - # RPC-specific configuration for `list_service_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_configs - ## - # RPC-specific configuration for `get_service_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_config - ## - # RPC-specific configuration for `create_service_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_config - ## - # RPC-specific configuration for `submit_config_source` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_config_source - ## - # RPC-specific configuration for `list_service_rollouts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_service_rollouts - ## - # RPC-specific configuration for `get_service_rollout` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service_rollout - ## - # RPC-specific configuration for `create_service_rollout` - # @return [::Gapic::Config::Method] - # - attr_reader :create_service_rollout - ## - # RPC-specific configuration for `generate_config_report` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_config_report - - # @private - def initialize parent_rpcs = nil - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - create_service_config = parent_rpcs.create_service if parent_rpcs.respond_to? :create_service - @create_service = ::Gapic::Config::Method.new create_service_config - delete_service_config = parent_rpcs.delete_service if parent_rpcs.respond_to? :delete_service - @delete_service = ::Gapic::Config::Method.new delete_service_config - undelete_service_config = parent_rpcs.undelete_service if parent_rpcs.respond_to? :undelete_service - @undelete_service = ::Gapic::Config::Method.new undelete_service_config - list_service_configs_config = parent_rpcs.list_service_configs if parent_rpcs.respond_to? :list_service_configs - @list_service_configs = ::Gapic::Config::Method.new list_service_configs_config - get_service_config_config = parent_rpcs.get_service_config if parent_rpcs.respond_to? :get_service_config - @get_service_config = ::Gapic::Config::Method.new get_service_config_config - create_service_config_config = parent_rpcs.create_service_config if parent_rpcs.respond_to? :create_service_config - @create_service_config = ::Gapic::Config::Method.new create_service_config_config - submit_config_source_config = parent_rpcs.submit_config_source if parent_rpcs.respond_to? :submit_config_source - @submit_config_source = ::Gapic::Config::Method.new submit_config_source_config - list_service_rollouts_config = parent_rpcs.list_service_rollouts if parent_rpcs.respond_to? :list_service_rollouts - @list_service_rollouts = ::Gapic::Config::Method.new list_service_rollouts_config - get_service_rollout_config = parent_rpcs.get_service_rollout if parent_rpcs.respond_to? :get_service_rollout - @get_service_rollout = ::Gapic::Config::Method.new get_service_rollout_config - create_service_rollout_config = parent_rpcs.create_service_rollout if parent_rpcs.respond_to? :create_service_rollout - @create_service_rollout = ::Gapic::Config::Method.new create_service_rollout_config - generate_config_report_config = parent_rpcs.generate_config_report if parent_rpcs.respond_to? :generate_config_report - @generate_config_report = ::Gapic::Config::Method.new generate_config_report_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb deleted file mode 100644 index c8a9916924a4..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module ServiceManagement - module V1 - module ServiceManager - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "servicemanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ServiceManager Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceManager Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "servicemanagement.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/operations", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb deleted file mode 100644 index 7f7177af359f..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb +++ /dev/null @@ -1,882 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/api/servicemanagement/v1/servicemanager_pb" - -module Google - module Cloud - module ServiceManagement - module V1 - module ServiceManager - module Rest - ## - # REST service stub for the ServiceManager service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_services REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceManagement::V1::ListServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceManagement::V1::ListServicesResponse] - # A result object deserialized from the server's reply - def list_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceManagement::V1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceManagement::V1::ManagedService] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceManagement::V1::ManagedService] - # A result object deserialized from the server's reply - def get_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceManagement::V1::ManagedService.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_service REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_service REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the undelete_service REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def undelete_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undelete_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undelete_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_service_configs REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse] - # A result object deserialized from the server's reply - def list_service_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_service_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_service_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service_config REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::Service] - # A result object deserialized from the server's reply - def get_service_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Api::Service.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_service_config REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::Service] - # A result object deserialized from the server's reply - def create_service_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_service_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Api::Service.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the submit_config_source REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def submit_config_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_submit_config_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "submit_config_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_service_rollouts REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse] - # A result object deserialized from the server's reply - def list_service_rollouts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_service_rollouts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_service_rollouts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service_rollout REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceManagement::V1::Rollout] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceManagement::V1::Rollout] - # A result object deserialized from the server's reply - def get_service_rollout request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_rollout_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service_rollout", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceManagement::V1::Rollout.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_service_rollout REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_service_rollout request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_service_rollout_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_service_rollout", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the generate_config_report REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse] - # A result object deserialized from the server's reply - def generate_config_report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_config_report_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "generate_config_report", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_services REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/services", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/services/{service_name}", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/services", - body: "service", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_service REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/services/{service_name}", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undelete_service REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undelete_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/services/{service_name}:undelete", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_service_configs REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_service_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/services/{service_name}/configs", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service_config REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/services/{service_name}/configs/{config_id}", - matches: [ - ["service_name", %r{^[^/]+/?$}, false], - ["config_id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/services/{service_name}/config", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service_config REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_service_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/services/{service_name}/configs", - body: "service_config", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the submit_config_source REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_submit_config_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/services/{service_name}/configs:submit", - body: "*", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_service_rollouts REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_service_rollouts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/services/{service_name}/rollouts", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service_rollout REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_rollout_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/services/{service_name}/rollouts/{rollout_id}", - matches: [ - ["service_name", %r{^[^/]+/?$}, false], - ["rollout_id", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_service_rollout REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_service_rollout_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/services/{service_name}/rollouts", - body: "rollout", - matches: [ - ["service_name", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_config_report REST call - # - # @param request_pb [::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_generate_config_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/services:generateConfigReport", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/version.rb b/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/version.rb deleted file mode 100644 index b07821095257..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/lib/google/cloud/service_management/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceManagement - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/README.md deleted file mode 100644 index b2331f606235..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Service Management V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/auth.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/auth.rb deleted file mode 100644 index 2f1afd9a7f19..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/auth.rb +++ /dev/null @@ -1,259 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # `Authentication` defines the authentication configuration for API methods - # provided by an API service. - # - # Example: - # - # name: calendar.googleapis.com - # authentication: - # providers: - # - id: google_calendar_auth - # jwks_uri: https://www.googleapis.com/oauth2/v1/certs - # issuer: https://securetoken.google.com - # rules: - # - selector: "*" - # requirements: - # provider_id: google_calendar_auth - # - selector: google.calendar.Delegate - # oauth: - # canonical_scopes: https://www.googleapis.com/auth/calendar.read - # @!attribute [rw] rules - # @return [::Array<::Google::Api::AuthenticationRule>] - # A list of authentication rules that apply to individual API methods. - # - # **NOTE:** All service configuration rules follow "last one wins" order. - # @!attribute [rw] providers - # @return [::Array<::Google::Api::AuthProvider>] - # Defines a set of authentication providers that a service supports. - class Authentication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Authentication rules for the service. - # - # By default, if a method has any authentication requirements, every request - # must include a valid credential matching one of the requirements. - # It's an error to include more than one kind of credential in a single - # request. - # - # If a method doesn't have any auth requirements, request credentials will be - # ignored. - # @!attribute [rw] selector - # @return [::String] - # Selects the methods to which this rule applies. - # - # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax - # details. - # @!attribute [rw] oauth - # @return [::Google::Api::OAuthRequirements] - # The requirements for OAuth credentials. - # @!attribute [rw] allow_without_credential - # @return [::Boolean] - # If true, the service accepts API keys without any other credential. - # This flag only applies to HTTP and gRPC requests. - # @!attribute [rw] requirements - # @return [::Array<::Google::Api::AuthRequirement>] - # Requirements for additional authentication providers. - class AuthenticationRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a location to extract JWT from an API request. - # @!attribute [rw] header - # @return [::String] - # Specifies HTTP header name to extract JWT token. - # - # Note: The following fields are mutually exclusive: `header`, `query`, `cookie`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] query - # @return [::String] - # Specifies URL query parameter name to extract JWT token. - # - # Note: The following fields are mutually exclusive: `query`, `header`, `cookie`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cookie - # @return [::String] - # Specifies cookie name to extract JWT token. - # - # Note: The following fields are mutually exclusive: `cookie`, `header`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] value_prefix - # @return [::String] - # The value prefix. The value format is "value_prefix\\{token}" - # Only applies to "in" header type. Must be empty for "in" query type. - # If not empty, the header value has to match (case sensitive) this prefix. - # If not matched, JWT will not be extracted. If matched, JWT will be - # extracted after the prefix is removed. - # - # For example, for "Authorization: Bearer \\{JWT}", - # value_prefix="Bearer " with a space at the end. - class JwtLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for an authentication provider, including support for - # [JSON Web Token - # (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). - # @!attribute [rw] id - # @return [::String] - # The unique identifier of the auth provider. It will be referred to by - # `AuthRequirement.provider_id`. - # - # Example: "bookstore_auth". - # @!attribute [rw] issuer - # @return [::String] - # Identifies the principal that issued the JWT. See - # https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 - # Usually a URL or an email address. - # - # Example: https://securetoken.google.com - # Example: 1234567-compute@developer.gserviceaccount.com - # @!attribute [rw] jwks_uri - # @return [::String] - # URL of the provider's public key set to validate signature of the JWT. See - # [OpenID - # Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). - # Optional if the key set document: - # - can be retrieved from - # [OpenID - # Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) - # of the issuer. - # - can be inferred from the email domain of the issuer (e.g. a Google - # service account). - # - # Example: https://www.googleapis.com/oauth2/v1/certs - # @!attribute [rw] audiences - # @return [::String] - # The list of JWT - # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). - # that are allowed to access. A JWT containing any of these audiences will - # be accepted. When this setting is absent, JWTs with audiences: - # - "https://[service.name]/[google.protobuf.Api.name]" - # - "https://[service.name]/" - # will be accepted. - # For example, if no audiences are in the setting, LibraryService API will - # accept JWTs with the following audiences: - # - - # https://library-example.googleapis.com/google.example.library.v1.LibraryService - # - https://library-example.googleapis.com/ - # - # Example: - # - # audiences: bookstore_android.apps.googleusercontent.com, - # bookstore_web.apps.googleusercontent.com - # @!attribute [rw] authorization_url - # @return [::String] - # Redirect URL if JWT token is required but not present or is expired. - # Implement authorizationUrl of securityDefinitions in OpenAPI spec. - # @!attribute [rw] jwt_locations - # @return [::Array<::Google::Api::JwtLocation>] - # Defines the locations to extract the JWT. For now it is only used by the - # Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] - # (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) - # - # JWT locations can be one of HTTP headers, URL query parameters or - # cookies. The rule is that the first match wins. - # - # If not specified, default to use following 3 locations: - # 1) Authorization: Bearer - # 2) x-goog-iap-jwt-assertion - # 3) access_token query parameter - # - # Default locations can be specified as followings: - # jwt_locations: - # - header: Authorization - # value_prefix: "Bearer " - # - header: x-goog-iap-jwt-assertion - # - query: access_token - class AuthProvider - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # OAuth scopes are a way to define data and permissions on data. For example, - # there are scopes defined for "Read-only access to Google Calendar" and - # "Access to Cloud Platform". Users can consent to a scope for an application, - # giving it permission to access that data on their behalf. - # - # OAuth scope specifications should be fairly coarse grained; a user will need - # to see and understand the text description of what your scope means. - # - # In most cases: use one or at most two OAuth scopes for an entire family of - # products. If your product has multiple APIs, you should probably be sharing - # the OAuth scope across all of those APIs. - # - # When you need finer grained OAuth consent screens: talk with your product - # management about how developers will use them in practice. - # - # Please note that even though each of the canonical scopes is enough for a - # request to be accepted and passed to the backend, a request can still fail - # due to the backend requiring additional scopes or permissions. - # @!attribute [rw] canonical_scopes - # @return [::String] - # The list of publicly documented OAuth scopes that are allowed access. An - # OAuth token containing any of these scopes will be accepted. - # - # - # Example: - # - # canonical_scopes: https://www.googleapis.com/auth/calendar, - # https://www.googleapis.com/auth/calendar.read - class OAuthRequirements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # User-defined authentication requirements, including support for - # [JSON Web Token - # (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). - # @!attribute [rw] provider_id - # @return [::String] - # {::Google::Api::AuthProvider#id id} from authentication provider. - # - # Example: - # - # provider_id: bookstore_auth - # @!attribute [rw] audiences - # @return [::String] - # NOTE: This will be deprecated soon, once AuthProvider.audiences is - # implemented and accepted in all the runtime components. - # - # The list of JWT - # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). - # that are allowed to access. A JWT containing any of these audiences will - # be accepted. When this setting is absent, only JWTs with audience - # "https://{::Google::Api::Service#name Service_name}/{::Google::Protobuf::Api#name API_name}" - # will be accepted. For example, if no audiences are in the setting, - # LibraryService API will only accept JWTs with the following audience - # "https://library-example.googleapis.com/google.example.library.v1.LibraryService". - # - # Example: - # - # audiences: bookstore_android.apps.googleusercontent.com, - # bookstore_web.apps.googleusercontent.com - class AuthRequirement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/backend.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/backend.rb deleted file mode 100644 index 7d69596fe349..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/backend.rb +++ /dev/null @@ -1,199 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # `Backend` defines the backend configuration for a service. - # @!attribute [rw] rules - # @return [::Array<::Google::Api::BackendRule>] - # A list of API backend rules that apply to individual API methods. - # - # **NOTE:** All service configuration rules follow "last one wins" order. - class Backend - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A backend rule provides configuration for an individual API element. - # @!attribute [rw] selector - # @return [::String] - # Selects the methods to which this rule applies. - # - # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax - # details. - # @!attribute [rw] address - # @return [::String] - # The address of the API backend. - # - # The scheme is used to determine the backend protocol and security. - # The following schemes are accepted: - # - # SCHEME PROTOCOL SECURITY - # http:// HTTP None - # https:// HTTP TLS - # grpc:// gRPC None - # grpcs:// gRPC TLS - # - # It is recommended to explicitly include a scheme. Leaving out the scheme - # may cause constrasting behaviors across platforms. - # - # If the port is unspecified, the default is: - # - 80 for schemes without TLS - # - 443 for schemes with TLS - # - # For HTTP backends, use {::Google::Api::BackendRule#protocol protocol} - # to specify the protocol version. - # @!attribute [rw] deadline - # @return [::Float] - # The number of seconds to wait for a response from a request. The default - # varies based on the request protocol and deployment environment. - # @!attribute [rw] min_deadline - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Float] - # Deprecated, do not use. - # @!attribute [rw] operation_deadline - # @return [::Float] - # The number of seconds to wait for the completion of a long running - # operation. The default is no deadline. - # @!attribute [rw] path_translation - # @return [::Google::Api::BackendRule::PathTranslation] - # Path translation specifies how to combine the backend address with the - # request path in order to produce the appropriate forwarding URL for the - # request. See {::Google::Api::BackendRule::PathTranslation PathTranslation} for - # more details. - # @!attribute [rw] jwt_audience - # @return [::String] - # The JWT audience is used when generating a JWT ID token for the backend. - # This ID token will be added in the HTTP "authorization" header, and sent - # to the backend. - # - # Note: The following fields are mutually exclusive: `jwt_audience`, `disable_auth`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] disable_auth - # @return [::Boolean] - # When disable_auth is true, a JWT ID token won't be generated and the - # original "Authorization" HTTP header will be preserved. If the header is - # used to carry the original token and is expected by the backend, this - # field must be set to true to preserve the header. - # - # Note: The following fields are mutually exclusive: `disable_auth`, `jwt_audience`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] protocol - # @return [::String] - # The protocol used for sending a request to the backend. - # The supported values are "http/1.1" and "h2". - # - # The default value is inferred from the scheme in the - # {::Google::Api::BackendRule#address address} field: - # - # SCHEME PROTOCOL - # http:// http/1.1 - # https:// http/1.1 - # grpc:// h2 - # grpcs:// h2 - # - # For secure HTTP backends (https://) that support HTTP/2, set this field - # to "h2" for improved performance. - # - # Configuring this field to non-default values is only supported for secure - # HTTP backends. This field will be ignored for all other backends. - # - # See - # https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids - # for more details on the supported values. - # @!attribute [rw] overrides_by_request_protocol - # @return [::Google::Protobuf::Map{::String => ::Google::Api::BackendRule}] - # The map between request protocol and the backend address. - # @!attribute [rw] load_balancing_policy - # @return [::String] - # The load balancing policy used for connection to the application backend. - # - # Defined as an arbitrary string to accomondate custom load balancing - # policies supported by the underlying channel, but suggest most users use - # one of the standard policies, such as the default, "RoundRobin". - class BackendRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Api::BackendRule] - class OverridesByRequestProtocolEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Path Translation specifies how to combine the backend address with the - # request path in order to produce the appropriate forwarding URL for the - # request. - # - # Path Translation is applicable only to HTTP-based backends. Backends which - # do not accept requests over HTTP/HTTPS should leave `path_translation` - # unspecified. - module PathTranslation - PATH_TRANSLATION_UNSPECIFIED = 0 - - # Use the backend address as-is, with no modification to the path. If the - # URL pattern contains variables, the variable names and values will be - # appended to the query string. If a query string parameter and a URL - # pattern variable have the same name, this may result in duplicate keys in - # the query string. - # - # # Examples - # - # Given the following operation config: - # - # Method path: /api/company/{cid}/user/{uid} - # Backend address: https://example.cloudfunctions.net/getUser - # - # Requests to the following request paths will call the backend at the - # translated path: - # - # Request path: /api/company/widgetworks/user/johndoe - # Translated: - # https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe - # - # Request path: /api/company/widgetworks/user/johndoe?timezone=EST - # Translated: - # https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe - CONSTANT_ADDRESS = 1 - - # The request path will be appended to the backend address. - # - # # Examples - # - # Given the following operation config: - # - # Method path: /api/company/{cid}/user/{uid} - # Backend address: https://example.appspot.com - # - # Requests to the following request paths will call the backend at the - # translated path: - # - # Request path: /api/company/widgetworks/user/johndoe - # Translated: - # https://example.appspot.com/api/company/widgetworks/user/johndoe - # - # Request path: /api/company/widgetworks/user/johndoe?timezone=EST - # Translated: - # https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST - APPEND_PATH_TO_ADDRESS = 2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/billing.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/billing.rb deleted file mode 100644 index 75d55089e3a3..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/billing.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Billing related configuration of the service. - # - # The following example shows how to configure monitored resources and metrics - # for billing, `consumer_destinations` is the only supported destination and - # the monitored resources need at least one label key - # `cloud.googleapis.com/location` to indicate the location of the billing - # usage, using different monitored resources between monitoring and billing is - # recommended so they can be evolved independently: - # - # - # monitored_resources: - # - type: library.googleapis.com/billing_branch - # labels: - # - key: cloud.googleapis.com/location - # description: | - # Predefined label to support billing location restriction. - # - key: city - # description: | - # Custom label to define the city where the library branch is located - # in. - # - key: name - # description: Custom label to define the name of the library branch. - # metrics: - # - name: library.googleapis.com/book/borrowed_count - # metric_kind: DELTA - # value_type: INT64 - # unit: "1" - # billing: - # consumer_destinations: - # - monitored_resource: library.googleapis.com/billing_branch - # metrics: - # - library.googleapis.com/book/borrowed_count - # @!attribute [rw] consumer_destinations - # @return [::Array<::Google::Api::Billing::BillingDestination>] - # Billing configurations for sending metrics to the consumer project. - # There can be multiple consumer destinations per service, each one must have - # a different monitored resource type. A metric can be used in at most - # one consumer destination. - class Billing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration of a specific billing destination (Currently only support - # bill against consumer project). - # @!attribute [rw] monitored_resource - # @return [::String] - # The monitored resource type. The type must be defined in - # {::Google::Api::Service#monitored_resources Service.monitored_resources} - # section. - # @!attribute [rw] metrics - # @return [::Array<::String>] - # Names of the metrics to report to this billing destination. - # Each name must be defined in - # {::Google::Api::Service#metrics Service.metrics} section. - class BillingDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/config_change.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/config_change.rb deleted file mode 100644 index ca20a231d6b4..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/config_change.rb +++ /dev/null @@ -1,89 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Output generated from semantically comparing two versions of a service - # configuration. - # - # Includes detailed information about a field that have changed with - # applicable advice about potential consequences for the change, such as - # backwards-incompatibility. - # @!attribute [rw] element - # @return [::String] - # Object hierarchy path to the change, with levels separated by a '.' - # character. For repeated fields, an applicable unique identifier field is - # used for the index (usually selector, name, or id). For maps, the term - # 'key' is used. If the field has no unique identifier, the numeric index - # is used. - # Examples: - # - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction - # - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value - # - logging.producer_destinations[0] - # @!attribute [rw] old_value - # @return [::String] - # Value of the changed object in the old Service configuration, - # in JSON format. This field will not be populated if ChangeType == ADDED. - # @!attribute [rw] new_value - # @return [::String] - # Value of the changed object in the new Service configuration, - # in JSON format. This field will not be populated if ChangeType == REMOVED. - # @!attribute [rw] change_type - # @return [::Google::Api::ChangeType] - # The type for this change, either ADDED, REMOVED, or MODIFIED. - # @!attribute [rw] advices - # @return [::Array<::Google::Api::Advice>] - # Collection of advice provided for this change, useful for determining the - # possible impact of this change. - class ConfigChange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Generated advice about this change, used for providing more - # information about how a change will affect the existing service. - # @!attribute [rw] description - # @return [::String] - # Useful description for why this advice was applied and what actions should - # be taken to mitigate any implied risks. - class Advice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Classifies set of possible modifications to an object in the service - # configuration. - module ChangeType - # No value was provided. - CHANGE_TYPE_UNSPECIFIED = 0 - - # The changed object exists in the 'new' service configuration, but not - # in the 'old' service configuration. - ADDED = 1 - - # The changed object exists in the 'old' service configuration, but not - # in the 'new' service configuration. - REMOVED = 2 - - # The changed object exists in both service configurations, but its value - # is different. - MODIFIED = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/context.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/context.rb deleted file mode 100644 index 871ef9830982..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/context.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # `Context` defines which contexts an API requests. - # - # Example: - # - # context: - # rules: - # - selector: "*" - # requested: - # - google.rpc.context.ProjectContext - # - google.rpc.context.OriginContext - # - # The above specifies that all methods in the API request - # `google.rpc.context.ProjectContext` and - # `google.rpc.context.OriginContext`. - # - # Available context types are defined in package - # `google.rpc.context`. - # - # This also provides mechanism to allowlist any protobuf message extension that - # can be sent in grpc metadata using “x-goog-ext--bin” and - # “x-goog-ext--jspb” format. For example, list any service - # specific protobuf types that can appear in grpc metadata as follows in your - # yaml file: - # - # Example: - # - # context: - # rules: - # - selector: "google.example.library.v1.LibraryService.CreateBook" - # allowed_request_extensions: - # - google.foo.v1.NewExtension - # allowed_response_extensions: - # - google.foo.v1.NewExtension - # - # You can also specify extension ID instead of fully qualified extension name - # here. - # @!attribute [rw] rules - # @return [::Array<::Google::Api::ContextRule>] - # A list of RPC context rules that apply to individual API methods. - # - # **NOTE:** All service configuration rules follow "last one wins" order. - class Context - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A context rule provides information about the context for an individual API - # element. - # @!attribute [rw] selector - # @return [::String] - # Selects the methods to which this rule applies. - # - # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax - # details. - # @!attribute [rw] requested - # @return [::Array<::String>] - # A list of full type names of requested contexts, only the requested context - # will be made available to the backend. - # @!attribute [rw] provided - # @return [::Array<::String>] - # A list of full type names of provided contexts. It is used to support - # propagating HTTP headers and ETags from the response extension. - # @!attribute [rw] allowed_request_extensions - # @return [::Array<::String>] - # A list of full type names or extension IDs of extensions allowed in grpc - # side channel from client to backend. - # @!attribute [rw] allowed_response_extensions - # @return [::Array<::String>] - # A list of full type names or extension IDs of extensions allowed in grpc - # side channel from backend to client. - class ContextRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/control.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/control.rb deleted file mode 100644 index ad857f7a1157..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/control.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Selects and configures the service controller used by the service. - # - # Example: - # - # control: - # environment: servicecontrol.googleapis.com - # @!attribute [rw] environment - # @return [::String] - # The service controller environment to use. If empty, no control plane - # features (like quota and billing) will be enabled. The recommended value - # for most services is servicecontrol.googleapis.com. - # @!attribute [rw] method_policies - # @return [::Array<::Google::Api::MethodPolicy>] - # Defines policies applying to the API methods of the service. - class Control - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/documentation.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/documentation.rb deleted file mode 100644 index ccefcdf22809..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/documentation.rb +++ /dev/null @@ -1,176 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # `Documentation` provides the information for describing a service. - # - # Example: - #
documentation:
-    #   summary: >
-    #     The Google Calendar API gives access
-    #     to most calendar features.
-    #   pages:
-    #   - name: Overview
-    #     content: (== include google/foo/overview.md ==)
-    #   - name: Tutorial
-    #     content: (== include google/foo/tutorial.md ==)
-    #     subpages:
-    #     - name: Java
-    #       content: (== include google/foo/tutorial_java.md ==)
-    #   rules:
-    #   - selector: google.calendar.Calendar.Get
-    #     description: >
-    #       ...
-    #   - selector: google.calendar.Calendar.Put
-    #     description: >
-    #       ...
-    # 
- # Documentation is provided in markdown syntax. In addition to - # standard markdown features, definition lists, tables and fenced - # code blocks are supported. Section headers can be provided and are - # interpreted relative to the section nesting of the context where - # a documentation fragment is embedded. - # - # Documentation from the IDL is merged with documentation defined - # via the config at normalization time, where documentation provided - # by config rules overrides IDL provided. - # - # A number of constructs specific to the API platform are supported - # in documentation text. - # - # In order to reference a proto element, the following - # notation can be used: - #
[fully.qualified.proto.name][]
- # To override the display text used for the link, this can be used: - #
[display text][fully.qualified.proto.name]
- # Text can be excluded from doc using the following notation: - #
(-- internal comment --)
- # - # A few directives are available in documentation. Note that - # directives must appear on a single line to be properly - # identified. The `include` directive includes a markdown file from - # an external source: - #
(== include path/to/file ==)
- # The `resource_for` directive marks a message to be the resource of - # a collection in REST view. If it is not specified, tools attempt - # to infer the resource from the operations in a collection: - #
(== resource_for v1.shelves.books ==)
- # The directive `suppress_warning` does not directly affect documentation - # and is documented together with service config validation. - # @!attribute [rw] summary - # @return [::String] - # A short description of what the service does. The summary must be plain - # text. It becomes the overview of the service displayed in Google Cloud - # Console. - # NOTE: This field is equivalent to the standard field `description`. - # @!attribute [rw] pages - # @return [::Array<::Google::Api::Page>] - # The top level pages for the documentation set. - # @!attribute [rw] rules - # @return [::Array<::Google::Api::DocumentationRule>] - # A list of documentation rules that apply to individual API elements. - # - # **NOTE:** All service configuration rules follow "last one wins" order. - # @!attribute [rw] documentation_root_url - # @return [::String] - # The URL to the root of documentation. - # @!attribute [rw] service_root_url - # @return [::String] - # Specifies the service root url if the default one (the service name - # from the yaml file) is not suitable. This can be seen in any fully - # specified service urls as well as sections that show a base that other - # urls are relative to. - # @!attribute [rw] overview - # @return [::String] - # Declares a single overview page. For example: - #
documentation:
-    #       summary: ...
-    #       overview: (== include overview.md ==)
-    #     
- # This is a shortcut for the following declaration (using pages style): - #
documentation:
-    #       summary: ...
-    #       pages:
-    #       - name: Overview
-    #         content: (== include overview.md ==)
-    #     
- # Note: you cannot specify both `overview` field and `pages` field. - class Documentation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A documentation rule provides information about individual API elements. - # @!attribute [rw] selector - # @return [::String] - # The selector is a comma-separated list of patterns for any element such as - # a method, a field, an enum value. Each pattern is a qualified name of the - # element which may end in "*", indicating a wildcard. Wildcards are only - # allowed at the end and for a whole component of the qualified name, - # i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match - # one or more components. To specify a default for all applicable elements, - # the whole pattern "*" is used. - # @!attribute [rw] description - # @return [::String] - # Description of the selected proto element (e.g. a message, a method, a - # 'service' definition, or a field). Defaults to leading & trailing comments - # taken from the proto source definition of the proto element. - # @!attribute [rw] deprecation_description - # @return [::String] - # Deprecation description of the selected element(s). It can be provided if - # an element is marked as `deprecated`. - class DocumentationRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a documentation page. A page can contain subpages to represent - # nested documentation set structure. - # @!attribute [rw] name - # @return [::String] - # The name of the page. It will be used as an identity of the page to - # generate URI of the page, text of the link to this page in navigation, - # etc. The full page name (start from the root page name to this page - # concatenated with `.`) can be used as reference to the page in your - # documentation. For example: - #
pages:
-    #     - name: Tutorial
-    #       content: (== include tutorial.md ==)
-    #       subpages:
-    #       - name: Java
-    #         content: (== include tutorial_java.md ==)
-    #     
- # You can reference `Java` page using Markdown reference link syntax: - # `[Java][Tutorial.Java]`. - # @!attribute [rw] content - # @return [::String] - # The Markdown content of the page. You can use ```(== include {path} - # ==)``` to include content from a Markdown file. The content can be used - # to produce the documentation page such as HTML format page. - # @!attribute [rw] subpages - # @return [::Array<::Google::Api::Page>] - # Subpages of this page. The order of subpages specified here will be - # honored in the generated docset. - class Page - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/endpoint.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/endpoint.rb deleted file mode 100644 index 57d040a793ab..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/endpoint.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # `Endpoint` describes a network address of a service that serves a set of - # APIs. It is commonly known as a service endpoint. A service may expose - # any number of service endpoints, and all service endpoints share the same - # service definition, such as quota limits and monitoring metrics. - # - # Example: - # - # type: google.api.Service - # name: library-example.googleapis.com - # endpoints: - # # Declares network address `https://library-example.googleapis.com` - # # for service `library-example.googleapis.com`. The `https` scheme - # # is implicit for all service endpoints. Other schemes may be - # # supported in the future. - # - name: library-example.googleapis.com - # allow_cors: false - # - name: content-staging-library-example.googleapis.com - # # Allows HTTP OPTIONS calls to be passed to the API frontend, for it - # # to decide whether the subsequent cross-origin request is allowed - # # to proceed. - # allow_cors: true - # @!attribute [rw] name - # @return [::String] - # The canonical name of this endpoint. - # @!attribute [rw] aliases - # @return [::Array<::String>] - # Aliases for this endpoint, these will be served by the same UrlMap as the - # parent endpoint, and will be provisioned in the GCP stack for the Regional - # Endpoints. - # @!attribute [rw] target - # @return [::String] - # The specification of an Internet routable address of API frontend that will - # handle requests to this [API - # Endpoint](https://cloud.google.com/apis/design/glossary). It should be - # either a valid IPv4 address or a fully-qualified domain name. For example, - # "8.8.8.8" or "myservice.appspot.com". - # @!attribute [rw] allow_cors - # @return [::Boolean] - # Allowing - # [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka - # cross-domain traffic, would allow the backends served from this endpoint to - # receive and respond to HTTP OPTIONS requests. The response will be used by - # the browser to determine whether the subsequent cross-origin request is - # allowed to proceed. - class Endpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/label.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/label.rb deleted file mode 100644 index 02d2f8d451f9..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/label.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A description of a label. - # @!attribute [rw] key - # @return [::String] - # The label key. - # @!attribute [rw] value_type - # @return [::Google::Api::LabelDescriptor::ValueType] - # The type of data that can be assigned to the label. - # @!attribute [rw] description - # @return [::String] - # A human-readable description for the label. - class LabelDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Value types that can be used as label values. - module ValueType - # A variable-length string. This is the default. - STRING = 0 - - # Boolean; true or false. - BOOL = 1 - - # A 64-bit signed integer. - INT64 = 2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/log.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/log.rb deleted file mode 100644 index e977a6844da3..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/log.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A description of a log type. Example in YAML format: - # - # - name: library.googleapis.com/activity_history - # description: The history of borrowing and returning library items. - # display_name: Activity - # labels: - # - key: /customer_id - # description: Identifier of a library customer - # @!attribute [rw] name - # @return [::String] - # The name of the log. It must be less than 512 characters long and can - # include the following characters: upper- and lower-case alphanumeric - # characters [A-Za-z0-9], and punctuation characters including - # slash, underscore, hyphen, period [/_-.]. - # @!attribute [rw] labels - # @return [::Array<::Google::Api::LabelDescriptor>] - # The set of labels that are available to describe a specific log entry. - # Runtime requests that contain labels not specified here are - # considered invalid. - # @!attribute [rw] description - # @return [::String] - # A human-readable description of this log. This information appears in - # the documentation and can contain details. - # @!attribute [rw] display_name - # @return [::String] - # The human-readable name for this log. This information appears on - # the user interface and should be concise. - class LogDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/logging.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/logging.rb deleted file mode 100644 index 7a784dd32332..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/logging.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Logging configuration of the service. - # - # The following example shows how to configure logs to be sent to the - # producer and consumer projects. In the example, the `activity_history` - # log is sent to both the producer and consumer projects, whereas the - # `purchase_history` log is only sent to the producer project. - # - # monitored_resources: - # - type: library.googleapis.com/branch - # labels: - # - key: /city - # description: The city where the library branch is located in. - # - key: /name - # description: The name of the branch. - # logs: - # - name: activity_history - # labels: - # - key: /customer_id - # - name: purchase_history - # logging: - # producer_destinations: - # - monitored_resource: library.googleapis.com/branch - # logs: - # - activity_history - # - purchase_history - # consumer_destinations: - # - monitored_resource: library.googleapis.com/branch - # logs: - # - activity_history - # @!attribute [rw] producer_destinations - # @return [::Array<::Google::Api::Logging::LoggingDestination>] - # Logging configurations for sending logs to the producer project. - # There can be multiple producer destinations, each one must have a - # different monitored resource type. A log can be used in at most - # one producer destination. - # @!attribute [rw] consumer_destinations - # @return [::Array<::Google::Api::Logging::LoggingDestination>] - # Logging configurations for sending logs to the consumer project. - # There can be multiple consumer destinations, each one must have a - # different monitored resource type. A log can be used in at most - # one consumer destination. - class Logging - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration of a specific logging destination (the producer project - # or the consumer project). - # @!attribute [rw] monitored_resource - # @return [::String] - # The monitored resource type. The type must be defined in the - # {::Google::Api::Service#monitored_resources Service.monitored_resources} - # section. - # @!attribute [rw] logs - # @return [::Array<::String>] - # Names of the logs to be sent to this destination. Each name must - # be defined in the {::Google::Api::Service#logs Service.logs} section. If the - # log name is not a domain scoped name, it will be automatically prefixed - # with the service name followed by "/". - class LoggingDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/metric.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/metric.rb deleted file mode 100644 index 329058c374d6..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/metric.rb +++ /dev/null @@ -1,299 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Defines a metric type and its schema. Once a metric descriptor is created, - # deleting or altering it stops data collection and makes the metric type's - # existing data unusable. - # @!attribute [rw] name - # @return [::String] - # The resource name of the metric descriptor. - # @!attribute [rw] type - # @return [::String] - # The metric type, including its DNS name prefix. The type is not - # URL-encoded. All user-defined metric types have the DNS name - # `custom.googleapis.com` or `external.googleapis.com`. Metric types should - # use a natural hierarchical grouping. For example: - # - # "custom.googleapis.com/invoice/paid/amount" - # "external.googleapis.com/prometheus/up" - # "appengine.googleapis.com/http/server/response_latencies" - # @!attribute [rw] labels - # @return [::Array<::Google::Api::LabelDescriptor>] - # The set of labels that can be used to describe a specific - # instance of this metric type. For example, the - # `appengine.googleapis.com/http/server/response_latencies` metric - # type has a label for the HTTP response code, `response_code`, so - # you can look at latencies for successful responses or just - # for responses that failed. - # @!attribute [rw] metric_kind - # @return [::Google::Api::MetricDescriptor::MetricKind] - # Whether the metric records instantaneous values, changes to a value, etc. - # Some combinations of `metric_kind` and `value_type` might not be supported. - # @!attribute [rw] value_type - # @return [::Google::Api::MetricDescriptor::ValueType] - # Whether the measurement is an integer, a floating-point number, etc. - # Some combinations of `metric_kind` and `value_type` might not be supported. - # @!attribute [rw] unit - # @return [::String] - # The units in which the metric value is reported. It is only applicable - # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` - # defines the representation of the stored metric values. - # - # Different systems might scale the values to be more easily displayed (so a - # value of `0.02kBy` _might_ be displayed as `20By`, and a value of - # `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is - # `kBy`, then the value of the metric is always in thousands of bytes, no - # matter how it might be displayed. - # - # If you want a custom metric to record the exact number of CPU-seconds used - # by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is - # `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 - # CPU-seconds, then the value is written as `12005`. - # - # Alternatively, if you want a custom metric to record data in a more - # granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is - # `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), - # or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). - # - # The supported units are a subset of [The Unified Code for Units of - # Measure](https://unitsofmeasure.org/ucum.html) standard: - # - # **Basic units (UNIT)** - # - # * `bit` bit - # * `By` byte - # * `s` second - # * `min` minute - # * `h` hour - # * `d` day - # * `1` dimensionless - # - # **Prefixes (PREFIX)** - # - # * `k` kilo (10^3) - # * `M` mega (10^6) - # * `G` giga (10^9) - # * `T` tera (10^12) - # * `P` peta (10^15) - # * `E` exa (10^18) - # * `Z` zetta (10^21) - # * `Y` yotta (10^24) - # - # * `m` milli (10^-3) - # * `u` micro (10^-6) - # * `n` nano (10^-9) - # * `p` pico (10^-12) - # * `f` femto (10^-15) - # * `a` atto (10^-18) - # * `z` zepto (10^-21) - # * `y` yocto (10^-24) - # - # * `Ki` kibi (2^10) - # * `Mi` mebi (2^20) - # * `Gi` gibi (2^30) - # * `Ti` tebi (2^40) - # * `Pi` pebi (2^50) - # - # **Grammar** - # - # The grammar also includes these connectors: - # - # * `/` division or ratio (as an infix operator). For examples, - # `kBy/{email}` or `MiBy/10ms` (although you should almost never - # have `/s` in a metric `unit`; rates should always be computed at - # query time from the underlying cumulative or delta value). - # * `.` multiplication or composition (as an infix operator). For - # examples, `GBy.d` or `k{watt}.h`. - # - # The grammar for a unit is as follows: - # - # Expression = Component { "." Component } { "/" Component } ; - # - # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] - # | Annotation - # | "1" - # ; - # - # Annotation = "{" NAME "}" ; - # - # Notes: - # - # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation - # is used alone, then the unit is equivalent to `1`. For examples, - # `{request}/s == 1/s`, `By{transmitted}/s == By/s`. - # * `NAME` is a sequence of non-blank printable ASCII characters not - # containing `{` or `}`. - # * `1` represents a unitary [dimensionless - # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such - # as in `1/s`. It is typically used when none of the basic units are - # appropriate. For example, "new users per day" can be represented as - # `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new - # users). Alternatively, "thousands of page views per day" would be - # represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric - # value of `5.3` would mean "5300 page views per day"). - # * `%` represents dimensionless value of 1/100, and annotates values giving - # a percentage (so the metric values are typically in the range of 0..100, - # and a metric value `3` means "3 percent"). - # * `10^2.%` indicates a metric contains a ratio, typically in the range - # 0..1, that will be multiplied by 100 and displayed as a percentage - # (so a metric value `0.03` means "3 percent"). - # @!attribute [rw] description - # @return [::String] - # A detailed description of the metric, which can be used in documentation. - # @!attribute [rw] display_name - # @return [::String] - # A concise name for the metric, which can be displayed in user interfaces. - # Use sentence case without an ending period, for example "Request count". - # This field is optional but it is recommended to be set for any metrics - # associated with user-visible concepts, such as Quota. - # @!attribute [rw] metadata - # @return [::Google::Api::MetricDescriptor::MetricDescriptorMetadata] - # Optional. Metadata which can be used to guide usage of the metric. - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Optional. The launch stage of the metric definition. - # @!attribute [rw] monitored_resource_types - # @return [::Array<::String>] - # Read-only. If present, then a [time - # series][google.monitoring.v3.TimeSeries], which is identified partially by - # a metric type and a - # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor}, that - # is associated with this metric type can only be associated with one of the - # monitored resource types listed here. - class MetricDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional annotations that can be used to guide the usage of a metric. - # @!attribute [rw] launch_stage - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Api::LaunchStage] - # Deprecated. Must use the - # {::Google::Api::MetricDescriptor#launch_stage MetricDescriptor.launch_stage} - # instead. - # @!attribute [rw] sample_period - # @return [::Google::Protobuf::Duration] - # The sampling period of metric data points. For metrics which are written - # periodically, consecutive data points are stored at this time interval, - # excluding data loss due to errors. Metrics with a higher granularity have - # a smaller sampling period. - # @!attribute [rw] ingest_delay - # @return [::Google::Protobuf::Duration] - # The delay of data points caused by ingestion. Data points older than this - # age are guaranteed to be ingested and available to be read, excluding - # data loss due to errors. - # @!attribute [rw] time_series_resource_hierarchy_level - # @return [::Array<::Google::Api::MetricDescriptor::MetricDescriptorMetadata::TimeSeriesResourceHierarchyLevel>] - # The scope of the timeseries data of the metric. - class MetricDescriptorMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The resource hierarchy level of the timeseries data of a metric. - module TimeSeriesResourceHierarchyLevel - # Do not use this default value. - TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0 - - # Scopes a metric to a project. - PROJECT = 1 - - # Scopes a metric to an organization. - ORGANIZATION = 2 - - # Scopes a metric to a folder. - FOLDER = 3 - end - end - - # The kind of measurement. It describes how the data is reported. - # For information on setting the start time and end time based on - # the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval]. - module MetricKind - # Do not use this default value. - METRIC_KIND_UNSPECIFIED = 0 - - # An instantaneous measurement of a value. - GAUGE = 1 - - # The change in a value during a time interval. - DELTA = 2 - - # A value accumulated over a time interval. Cumulative - # measurements in a time series should have the same start time - # and increasing end times, until an event resets the cumulative - # value to zero and sets a new start time for the following - # points. - CUMULATIVE = 3 - end - - # The value type of a metric. - module ValueType - # Do not use this default value. - VALUE_TYPE_UNSPECIFIED = 0 - - # The value is a boolean. - # This value type can be used only if the metric kind is `GAUGE`. - BOOL = 1 - - # The value is a signed 64-bit integer. - INT64 = 2 - - # The value is a double precision floating point number. - DOUBLE = 3 - - # The value is a text string. - # This value type can be used only if the metric kind is `GAUGE`. - STRING = 4 - - # The value is a [`Distribution`][google.api.Distribution]. - DISTRIBUTION = 5 - - # The value is money. - MONEY = 6 - end - end - - # A specific metric, identified by specifying values for all of the - # labels of a {::Google::Api::MetricDescriptor `MetricDescriptor`}. - # @!attribute [rw] type - # @return [::String] - # An existing metric type, see - # {::Google::Api::MetricDescriptor google.api.MetricDescriptor}. For example, - # `custom.googleapis.com/invoice/paid/amount`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The set of label values that uniquely identify this metric. All - # labels listed in the `MetricDescriptor` must be assigned values. - class Metric - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitored_resource.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitored_resource.rb deleted file mode 100644 index 4d1ec410ddac..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitored_resource.rb +++ /dev/null @@ -1,150 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An object that describes the schema of a - # {::Google::Api::MonitoredResource MonitoredResource} object using a type name - # and a set of labels. For example, the monitored resource descriptor for - # Google Compute Engine VM instances has a type of - # `"gce_instance"` and specifies the use of the labels `"instance_id"` and - # `"zone"` to identify particular VM instances. - # - # Different APIs can support different monitored resource types. APIs generally - # provide a `list` method that returns the monitored resource descriptors used - # by the API. - # @!attribute [rw] name - # @return [::String] - # Optional. The resource name of the monitored resource descriptor: - # `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where - # \\{type} is the value of the `type` field in this object and - # \\{project_id} is a project ID that provides API-specific context for - # accessing the type. APIs that do not use project information can use the - # resource name format `"monitoredResourceDescriptors/{type}"`. - # @!attribute [rw] type - # @return [::String] - # Required. The monitored resource type. For example, the type - # `"cloudsql_database"` represents databases in Google Cloud SQL. - # For a list of types, see [Monitored resource - # types](https://cloud.google.com/monitoring/api/resources) - # and [Logging resource - # types](https://cloud.google.com/logging/docs/api/v2/resource-list). - # @!attribute [rw] display_name - # @return [::String] - # Optional. A concise name for the monitored resource type that might be - # displayed in user interfaces. It should be a Title Cased Noun Phrase, - # without any article or other determiners. For example, - # `"Google Cloud SQL Database"`. - # @!attribute [rw] description - # @return [::String] - # Optional. A detailed description of the monitored resource type that might - # be used in documentation. - # @!attribute [rw] labels - # @return [::Array<::Google::Api::LabelDescriptor>] - # Required. A set of labels used to describe instances of this monitored - # resource type. For example, an individual Google Cloud SQL database is - # identified by values for the labels `"database_id"` and `"zone"`. - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Optional. The launch stage of the monitored resource definition. - class MonitoredResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The `type` field identifies a - # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} object - # that describes the resource's schema. Information in the `labels` field - # identifies the actual resource and its attributes according to the schema. - # For example, a particular Compute Engine VM instance could be represented by - # the following object, because the - # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} for - # `"gce_instance"` has labels - # `"project_id"`, `"instance_id"` and `"zone"`: - # - # { "type": "gce_instance", - # "labels": { "project_id": "my-project", - # "instance_id": "12345678901234", - # "zone": "us-central1-a" }} - # @!attribute [rw] type - # @return [::String] - # Required. The monitored resource type. This field must match - # the `type` field of a - # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} - # object. For example, the type of a Compute Engine VM instance is - # `gce_instance`. Some descriptors include the service name in the type; for - # example, the type of a Datastream stream is - # `datastream.googleapis.com/Stream`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Required. Values for all of the labels listed in the associated monitored - # resource descriptor. For example, Compute Engine VM instances use the - # labels `"project_id"`, `"instance_id"`, and `"zone"`. - class MonitoredResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Auxiliary metadata for a {::Google::Api::MonitoredResource MonitoredResource} - # object. {::Google::Api::MonitoredResource MonitoredResource} objects contain the - # minimum set of information to uniquely identify a monitored resource - # instance. There is some other useful auxiliary metadata. Monitoring and - # Logging use an ingestion pipeline to extract metadata for cloud resources of - # all types, and store the metadata in this message. - # @!attribute [rw] system_labels - # @return [::Google::Protobuf::Struct] - # Output only. Values for predefined system metadata labels. - # System labels are a kind of metadata extracted by Google, including - # "machine_image", "vpc", "subnet_id", - # "security_group", "name", etc. - # System label values can be only strings, Boolean values, or a list of - # strings. For example: - # - # { "name": "my-test-instance", - # "security_group": ["a", "b", "c"], - # "spot_instance": false } - # @!attribute [rw] user_labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. A map of user-defined metadata labels. - class MonitoredResourceMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class UserLabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitoring.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitoring.rb deleted file mode 100644 index 09aaf1885816..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/monitoring.rb +++ /dev/null @@ -1,112 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Monitoring configuration of the service. - # - # The example below shows how to configure monitored resources and metrics - # for monitoring. In the example, a monitored resource and two metrics are - # defined. The `library.googleapis.com/book/returned_count` metric is sent - # to both producer and consumer projects, whereas the - # `library.googleapis.com/book/num_overdue` metric is only sent to the - # consumer project. - # - # monitored_resources: - # - type: library.googleapis.com/Branch - # display_name: "Library Branch" - # description: "A branch of a library." - # launch_stage: GA - # labels: - # - key: resource_container - # description: "The Cloud container (ie. project id) for the Branch." - # - key: location - # description: "The location of the library branch." - # - key: branch_id - # description: "The id of the branch." - # metrics: - # - name: library.googleapis.com/book/returned_count - # display_name: "Books Returned" - # description: "The count of books that have been returned." - # launch_stage: GA - # metric_kind: DELTA - # value_type: INT64 - # unit: "1" - # labels: - # - key: customer_id - # description: "The id of the customer." - # - name: library.googleapis.com/book/num_overdue - # display_name: "Books Overdue" - # description: "The current number of overdue books." - # launch_stage: GA - # metric_kind: GAUGE - # value_type: INT64 - # unit: "1" - # labels: - # - key: customer_id - # description: "The id of the customer." - # monitoring: - # producer_destinations: - # - monitored_resource: library.googleapis.com/Branch - # metrics: - # - library.googleapis.com/book/returned_count - # consumer_destinations: - # - monitored_resource: library.googleapis.com/Branch - # metrics: - # - library.googleapis.com/book/returned_count - # - library.googleapis.com/book/num_overdue - # @!attribute [rw] producer_destinations - # @return [::Array<::Google::Api::Monitoring::MonitoringDestination>] - # Monitoring configurations for sending metrics to the producer project. - # There can be multiple producer destinations. A monitored resource type may - # appear in multiple monitoring destinations if different aggregations are - # needed for different sets of metrics associated with that monitored - # resource type. A monitored resource and metric pair may only be used once - # in the Monitoring configuration. - # @!attribute [rw] consumer_destinations - # @return [::Array<::Google::Api::Monitoring::MonitoringDestination>] - # Monitoring configurations for sending metrics to the consumer project. - # There can be multiple consumer destinations. A monitored resource type may - # appear in multiple monitoring destinations if different aggregations are - # needed for different sets of metrics associated with that monitored - # resource type. A monitored resource and metric pair may only be used once - # in the Monitoring configuration. - class Monitoring - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration of a specific monitoring destination (the producer project - # or the consumer project). - # @!attribute [rw] monitored_resource - # @return [::String] - # The monitored resource type. The type must be defined in - # {::Google::Api::Service#monitored_resources Service.monitored_resources} - # section. - # @!attribute [rw] metrics - # @return [::Array<::String>] - # Types of the metrics to report to this monitoring destination. - # Each type must be defined in - # {::Google::Api::Service#metrics Service.metrics} section. - class MonitoringDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/policy.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/policy.rb deleted file mode 100644 index eb5db26fc933..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/policy.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Google API Policy Annotation - # - # This message defines a simple API policy annotation that can be used to - # annotate API request and response message fields with applicable policies. - # One field may have multiple applicable policies that must all be satisfied - # before a request can be processed. This policy annotation is used to - # generate the overall policy that will be used for automatic runtime - # policy enforcement and documentation generation. - # @!attribute [rw] selector - # @return [::String] - # Selects one or more request or response message fields to apply this - # `FieldPolicy`. - # - # When a `FieldPolicy` is used in proto annotation, the selector must - # be left as empty. The service config generator will automatically fill - # the correct value. - # - # When a `FieldPolicy` is used in service config, the selector must be a - # comma-separated string with valid request or response field paths, - # such as "foo.bar" or "foo.bar,foo.baz". - # @!attribute [rw] resource_permission - # @return [::String] - # Specifies the required permission(s) for the resource referred to by the - # field. It requires the field contains a valid resource reference, and - # the request must pass the permission checks to proceed. For example, - # "resourcemanager.projects.get". - # @!attribute [rw] resource_type - # @return [::String] - # Specifies the resource type for the resource referred to by the field. - class FieldPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines policies applying to an RPC method. - # @!attribute [rw] selector - # @return [::String] - # Selects a method to which these policies should be enforced, for example, - # "google.pubsub.v1.Subscriber.CreateSubscription". - # - # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax - # details. - # - # NOTE: This field must not be set in the proto annotation. It will be - # automatically filled by the service config compiler . - # @!attribute [rw] request_policies - # @return [::Array<::Google::Api::FieldPolicy>] - # Policies that are applicable to the request message. - class MethodPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/quota.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/quota.rb deleted file mode 100644 index 606c3036c888..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/quota.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Quota configuration helps to achieve fairness and budgeting in service - # usage. - # - # The metric based quota configuration works this way: - # - The service configuration defines a set of metrics. - # - For API calls, the quota.metric_rules maps methods to metrics with - # corresponding costs. - # - The quota.limits defines limits on the metrics, which will be used for - # quota checks at runtime. - # - # An example quota configuration in yaml format: - # - # quota: - # limits: - # - # - name: apiWriteQpsPerProject - # metric: library.googleapis.com/write_calls - # unit: "1/min/\\{project}" # rate limit for consumer projects - # values: - # STANDARD: 10000 - # - # - # (The metric rules bind all methods to the read_calls metric, - # except for the UpdateBook and DeleteBook methods. These two methods - # are mapped to the write_calls metric, with the UpdateBook method - # consuming at twice rate as the DeleteBook method.) - # metric_rules: - # - selector: "*" - # metric_costs: - # library.googleapis.com/read_calls: 1 - # - selector: google.example.library.v1.LibraryService.UpdateBook - # metric_costs: - # library.googleapis.com/write_calls: 2 - # - selector: google.example.library.v1.LibraryService.DeleteBook - # metric_costs: - # library.googleapis.com/write_calls: 1 - # - # Corresponding Metric definition: - # - # metrics: - # - name: library.googleapis.com/read_calls - # display_name: Read requests - # metric_kind: DELTA - # value_type: INT64 - # - # - name: library.googleapis.com/write_calls - # display_name: Write requests - # metric_kind: DELTA - # value_type: INT64 - # @!attribute [rw] limits - # @return [::Array<::Google::Api::QuotaLimit>] - # List of QuotaLimit definitions for the service. - # @!attribute [rw] metric_rules - # @return [::Array<::Google::Api::MetricRule>] - # List of MetricRule definitions, each one mapping a selected method to one - # or more metrics. - class Quota - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Bind API methods to metrics. Binding a method to a metric causes that - # metric's configured quota behaviors to apply to the method call. - # @!attribute [rw] selector - # @return [::String] - # Selects the methods to which this rule applies. - # - # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax - # details. - # @!attribute [rw] metric_costs - # @return [::Google::Protobuf::Map{::String => ::Integer}] - # Metrics to update when the selected methods are called, and the associated - # cost applied to each metric. - # - # The key of the map is the metric name, and the values are the amount - # increased for the metric against which the quota limits are defined. - # The value must not be negative. - class MetricRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Integer] - class MetricCostsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `QuotaLimit` defines a specific limit that applies over a specified duration - # for a limit type. There can be at most one limit for a duration and limit - # type combination defined within a `QuotaGroup`. - # @!attribute [rw] name - # @return [::String] - # Name of the quota limit. - # - # The name must be provided, and it must be unique within the service. The - # name can only include alphanumeric characters as well as '-'. - # - # The maximum length of the limit name is 64 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. User-visible, extended description for this quota limit. - # Should be used only when more context is needed to understand this limit - # than provided by the limit's display name (see: `display_name`). - # @!attribute [rw] default_limit - # @return [::Integer] - # Default number of tokens that can be consumed during the specified - # duration. This is the number of tokens assigned when a client - # application developer activates the service for his/her project. - # - # Specifying a value of 0 will block all requests. This can be used if you - # are provisioning quota to selected consumers and blocking others. - # Similarly, a value of -1 will indicate an unlimited quota. No other - # negative values are allowed. - # - # Used by group-based quotas only. - # @!attribute [rw] max_limit - # @return [::Integer] - # Maximum number of tokens that can be consumed during the specified - # duration. Client application developers can override the default limit up - # to this maximum. If specified, this value cannot be set to a value less - # than the default limit. If not specified, it is set to the default limit. - # - # To allow clients to apply overrides with no upper bound, set this to -1, - # indicating unlimited maximum quota. - # - # Used by group-based quotas only. - # @!attribute [rw] free_tier - # @return [::Integer] - # Free tier value displayed in the Developers Console for this limit. - # The free tier is the number of tokens that will be subtracted from the - # billed amount when billing is enabled. - # This field can only be set on a limit with duration "1d", in a billable - # group; it is invalid on any other limit. If this field is not set, it - # defaults to 0, indicating that there is no free tier for this service. - # - # Used by group-based quotas only. - # @!attribute [rw] duration - # @return [::String] - # Duration of this limit in textual notation. Must be "100s" or "1d". - # - # Used by group-based quotas only. - # @!attribute [rw] metric - # @return [::String] - # The name of the metric this quota limit applies to. The quota limits with - # the same metric will be checked together during runtime. The metric must be - # defined within the service config. - # @!attribute [rw] unit - # @return [::String] - # Specify the unit of the quota limit. It uses the same syntax as - # {::Google::Api::MetricDescriptor#unit MetricDescriptor.unit}. The supported - # unit kinds are determined by the quota backend system. - # - # Here are some examples: - # * "1/min/\\{project}" for quota per minute per project. - # - # Note: the order of unit components is insignificant. - # The "1" at the beginning is required to follow the metric unit syntax. - # @!attribute [rw] values - # @return [::Google::Protobuf::Map{::String => ::Integer}] - # Tiered limit values. You must specify this as a key:value pair, with an - # integer value that is the maximum number of requests allowed for the - # specified unit. Currently only STANDARD is supported. - # @!attribute [rw] display_name - # @return [::String] - # User-visible display name for this limit. - # Optional. If not set, the UI will provide a default display name based on - # the quota configuration. This field can be used to override the default - # display name generated from the configuration. - class QuotaLimit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Integer] - class ValuesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/service.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/service.rb deleted file mode 100644 index 49f36f188207..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/service.rb +++ /dev/null @@ -1,170 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # `Service` is the root object of Google API service configuration (service - # config). It describes the basic information about a logical service, - # such as the service name and the user-facing title, and delegates other - # aspects to sub-sections. Each sub-section is either a proto message or a - # repeated proto message that configures a specific aspect, such as auth. - # For more information, see each proto message definition. - # - # Example: - # - # type: google.api.Service - # name: calendar.googleapis.com - # title: Google Calendar API - # apis: - # - name: google.calendar.v3.Calendar - # - # visibility: - # rules: - # - selector: "google.calendar.v3.*" - # restriction: PREVIEW - # backend: - # rules: - # - selector: "google.calendar.v3.*" - # address: calendar.example.com - # - # authentication: - # providers: - # - id: google_calendar_auth - # jwks_uri: https://www.googleapis.com/oauth2/v1/certs - # issuer: https://securetoken.google.com - # rules: - # - selector: "*" - # requirements: - # provider_id: google_calendar_auth - # @!attribute [rw] name - # @return [::String] - # The service name, which is a DNS-like logical identifier for the - # service, such as `calendar.googleapis.com`. The service name - # typically goes through DNS verification to make sure the owner - # of the service also owns the DNS name. - # @!attribute [rw] title - # @return [::String] - # The product title for this service, it is the name displayed in Google - # Cloud Console. - # @!attribute [rw] producer_project_id - # @return [::String] - # The Google project that owns this service. - # @!attribute [rw] id - # @return [::String] - # A unique ID for a specific instance of this message, typically assigned - # by the client for tracking purpose. Must be no longer than 63 characters - # and only lower case letters, digits, '.', '_' and '-' are allowed. If - # empty, the server may choose to generate one instead. - # @!attribute [rw] apis - # @return [::Array<::Google::Protobuf::Api>] - # A list of API interfaces exported by this service. Only the `name` field - # of the {::Google::Protobuf::Api google.protobuf.Api} needs to be provided by - # the configuration author, as the remaining fields will be derived from the - # IDL during the normalization process. It is an error to specify an API - # interface here which cannot be resolved against the associated IDL files. - # @!attribute [rw] types - # @return [::Array<::Google::Protobuf::Type>] - # A list of all proto message types included in this API service. - # Types referenced directly or indirectly by the `apis` are automatically - # included. Messages which are not referenced but shall be included, such as - # types used by the `google.protobuf.Any` type, should be listed here by - # name by the configuration author. Example: - # - # types: - # - name: google.protobuf.Int32 - # @!attribute [rw] enums - # @return [::Array<::Google::Protobuf::Enum>] - # A list of all enum types included in this API service. Enums referenced - # directly or indirectly by the `apis` are automatically included. Enums - # which are not referenced but shall be included should be listed here by - # name by the configuration author. Example: - # - # enums: - # - name: google.someapi.v1.SomeEnum - # @!attribute [rw] documentation - # @return [::Google::Api::Documentation] - # Additional API documentation. - # @!attribute [rw] backend - # @return [::Google::Api::Backend] - # API backend configuration. - # @!attribute [rw] http - # @return [::Google::Api::Http] - # HTTP configuration. - # @!attribute [rw] quota - # @return [::Google::Api::Quota] - # Quota configuration. - # @!attribute [rw] authentication - # @return [::Google::Api::Authentication] - # Auth configuration. - # @!attribute [rw] context - # @return [::Google::Api::Context] - # Context configuration. - # @!attribute [rw] usage - # @return [::Google::Api::Usage] - # Configuration controlling usage of this service. - # @!attribute [rw] endpoints - # @return [::Array<::Google::Api::Endpoint>] - # Configuration for network endpoints. If this is empty, then an endpoint - # with the same name as the service is automatically generated to service all - # defined APIs. - # @!attribute [rw] control - # @return [::Google::Api::Control] - # Configuration for the service control plane. - # @!attribute [rw] logs - # @return [::Array<::Google::Api::LogDescriptor>] - # Defines the logs used by this service. - # @!attribute [rw] metrics - # @return [::Array<::Google::Api::MetricDescriptor>] - # Defines the metrics used by this service. - # @!attribute [rw] monitored_resources - # @return [::Array<::Google::Api::MonitoredResourceDescriptor>] - # Defines the monitored resources used by this service. This is required - # by the `Service.monitoring` and `Service.logging` configurations. - # @!attribute [rw] billing - # @return [::Google::Api::Billing] - # Billing configuration. - # @!attribute [rw] logging - # @return [::Google::Api::Logging] - # Logging configuration. - # @!attribute [rw] monitoring - # @return [::Google::Api::Monitoring] - # Monitoring configuration. - # @!attribute [rw] system_parameters - # @return [::Google::Api::SystemParameters] - # System parameter configuration. - # @!attribute [rw] source_info - # @return [::Google::Api::SourceInfo] - # Output only. The source information for this configuration if available. - # @!attribute [rw] publishing - # @return [::Google::Api::Publishing] - # Settings for [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from APIs defined as protocol buffers. - # @!attribute [rw] config_version - # @return [::Google::Protobuf::UInt32Value] - # Obsolete. Do not use. - # - # This field has no semantic meaning. The service config compiler always - # sets this field to `3`. - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/resources.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/resources.rb deleted file mode 100644 index a314ecbf57fa..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/resources.rb +++ /dev/null @@ -1,332 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceManagement - module V1 - # The full representation of a Service that is managed by - # Google Service Management. - # @!attribute [rw] service_name - # @return [::String] - # The name of the service. See the - # [overview](https://cloud.google.com/service-infrastructure/docs/overview) - # for naming requirements. - # @!attribute [rw] producer_project_id - # @return [::String] - # ID of the project that produces and owns this service. - class ManagedService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The metadata associated with a long running operation resource. - # @!attribute [rw] resource_names - # @return [::Array<::String>] - # The full name of the resources that this operation is directly - # associated with. - # @!attribute [rw] steps - # @return [::Array<::Google::Cloud::ServiceManagement::V1::OperationMetadata::Step>] - # Detailed status information for each step. The order is undetermined. - # @!attribute [rw] progress_percentage - # @return [::Integer] - # Percentage of completion of this operation, ranging from 0 to 100. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The start time of the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the status of one operation step. - # @!attribute [rw] description - # @return [::String] - # The short description of the step. - # @!attribute [rw] status - # @return [::Google::Cloud::ServiceManagement::V1::OperationMetadata::Status] - # The status code. - class Step - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Code describes the status of the operation (or one of its steps). - module Status - # Unspecifed code. - STATUS_UNSPECIFIED = 0 - - # The operation or step has completed without errors. - DONE = 1 - - # The operation or step has not started yet. - NOT_STARTED = 2 - - # The operation or step is in progress. - IN_PROGRESS = 3 - - # The operation or step has completed with errors. If the operation is - # rollbackable, the rollback completed with errors too. - FAILED = 4 - - # The operation or step has completed with cancellation. - CANCELLED = 5 - end - end - - # Represents a diagnostic message (error or warning) - # @!attribute [rw] location - # @return [::String] - # File name and line number of the error or warning. - # @!attribute [rw] kind - # @return [::Google::Cloud::ServiceManagement::V1::Diagnostic::Kind] - # The kind of diagnostic information provided. - # @!attribute [rw] message - # @return [::String] - # Message describing the error or warning. - class Diagnostic - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The kind of diagnostic information possible. - module Kind - # Warnings and errors - WARNING = 0 - - # Only errors - ERROR = 1 - end - end - - # Represents a source file which is used to generate the service configuration - # defined by `google.api.Service`. - # @!attribute [rw] id - # @return [::String] - # A unique ID for a specific instance of this message, typically assigned - # by the client for tracking purpose. If empty, the server may choose to - # generate one instead. - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::ServiceManagement::V1::ConfigFile>] - # Set of source configuration files that are used to generate a service - # configuration (`google.api.Service`). - class ConfigSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Generic specification of a source configuration file - # @!attribute [rw] file_path - # @return [::String] - # The file name of the configuration file (full or relative path). - # @!attribute [rw] file_contents - # @return [::String] - # The bytes that constitute the file. - # @!attribute [rw] file_type - # @return [::Google::Cloud::ServiceManagement::V1::ConfigFile::FileType] - # The type of configuration file this represents. - class ConfigFile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module FileType - # Unknown file type. - FILE_TYPE_UNSPECIFIED = 0 - - # YAML-specification of service. - SERVICE_CONFIG_YAML = 1 - - # OpenAPI specification, serialized in JSON. - OPEN_API_JSON = 2 - - # OpenAPI specification, serialized in YAML. - OPEN_API_YAML = 3 - - # FileDescriptorSet, generated by protoc. - # - # To generate, use protoc with imports and source info included. - # For an example test.proto file, the following command would put the value - # in a new file named out.pb. - # - # $protoc --include_imports --include_source_info test.proto -o out.pb - FILE_DESCRIPTOR_SET_PROTO = 4 - - # Uncompiled Proto file. Used for storage and display purposes only, - # currently server-side compilation is not supported. Should match the - # inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A - # file of this type can only be included if at least one file of type - # FILE_DESCRIPTOR_SET_PROTO is included. - PROTO_FILE = 6 - end - end - - # Represents a service configuration with its name and id. - # @!attribute [rw] name - # @return [::String] - # Resource name of a service config. It must have the following - # format: "services/\\{service name}/configs/\\{config id}". - class ConfigRef - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Change report associated with a particular service configuration. - # - # It contains a list of ConfigChanges based on the comparison between - # two service configurations. - # @!attribute [rw] config_changes - # @return [::Array<::Google::Api::ConfigChange>] - # List of changes between two service configurations. - # The changes will be alphabetically sorted based on the identifier - # of each change. - # A ConfigChange identifier is a dot separated path to the configuration. - # Example: visibility.rules[selector='LibraryService.CreateBook'].restriction - class ChangeReport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A rollout resource that defines how service configuration versions are pushed - # to control plane systems. Typically, you create a new version of the - # service config, and then create a Rollout to push the service config. - # @!attribute [rw] rollout_id - # @return [::String] - # Optional. Unique identifier of this Rollout. Must be no longer than 63 - # characters and only lower case letters, digits, '.', '_' and '-' are - # allowed. - # - # If not specified by client, the server will generate one. The generated id - # will have the form of , where "date" is the create - # date in ISO 8601 format. "revision number" is a monotonically increasing - # positive number that is reset every day for each service. - # An example of the generated rollout_id is '2016-02-16r1' - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Creation time of the rollout. Readonly. - # @!attribute [rw] created_by - # @return [::String] - # The user who created the Rollout. Readonly. - # @!attribute [rw] status - # @return [::Google::Cloud::ServiceManagement::V1::Rollout::RolloutStatus] - # The status of this rollout. Readonly. In case of a failed rollout, - # the system will automatically rollback to the current Rollout - # version. Readonly. - # @!attribute [rw] traffic_percent_strategy - # @return [::Google::Cloud::ServiceManagement::V1::Rollout::TrafficPercentStrategy] - # Google Service Control selects service configurations based on - # traffic percentage. - # - # Note: The following fields are mutually exclusive: `traffic_percent_strategy`, `delete_service_strategy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] delete_service_strategy - # @return [::Google::Cloud::ServiceManagement::V1::Rollout::DeleteServiceStrategy] - # The strategy associated with a rollout to delete a `ManagedService`. - # Readonly. - # - # Note: The following fields are mutually exclusive: `delete_service_strategy`, `traffic_percent_strategy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] service_name - # @return [::String] - # The name of the service associated with this Rollout. - class Rollout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Strategy that specifies how clients of Google Service Controller want to - # send traffic to use different config versions. This is generally - # used by API proxy to split traffic based on your configured percentage for - # each config version. - # - # One example of how to gradually rollout a new service configuration using - # this - # strategy: - # Day 1 - # - # Rollout { - # id: "example.googleapis.com/rollout_20160206" - # traffic_percent_strategy { - # percentages: { - # "example.googleapis.com/20160201": 70.00 - # "example.googleapis.com/20160206": 30.00 - # } - # } - # } - # - # Day 2 - # - # Rollout { - # id: "example.googleapis.com/rollout_20160207" - # traffic_percent_strategy: { - # percentages: { - # "example.googleapis.com/20160206": 100.00 - # } - # } - # } - # @!attribute [rw] percentages - # @return [::Google::Protobuf::Map{::String => ::Float}] - # Maps service configuration IDs to their corresponding traffic percentage. - # Key is the service configuration ID, Value is the traffic percentage - # which must be greater than 0.0 and the sum must equal to 100.0. - class TrafficPercentStrategy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Float] - class PercentagesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Strategy used to delete a service. This strategy is a placeholder only - # used by the system generated rollout to delete a service. - class DeleteServiceStrategy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of a Rollout. - module RolloutStatus - # No status specified. - ROLLOUT_STATUS_UNSPECIFIED = 0 - - # The Rollout is in progress. - IN_PROGRESS = 1 - - # The Rollout has completed successfully. - SUCCESS = 2 - - # The Rollout has been cancelled. This can happen if you have overlapping - # Rollout pushes, and the previous ones will be cancelled. - CANCELLED = 3 - - # The Rollout has failed and the rollback attempt has failed too. - FAILED = 4 - - # The Rollout has not started yet and is pending for execution. - PENDING = 5 - - # The Rollout has failed and rolled back to the previous successful - # Rollout. - FAILED_ROLLED_BACK = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.rb deleted file mode 100644 index 8d0f61c93e76..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/servicemanagement/v1/servicemanager.rb +++ /dev/null @@ -1,334 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceManagement - module V1 - # Request message for `ListServices` method. - # @!attribute [rw] producer_project_id - # @return [::String] - # Include services produced by the specified project. - # @!attribute [rw] page_size - # @return [::Integer] - # The max number of items to include in the response list. Page size is 50 - # if not specified. Maximum value is 500. - # @!attribute [rw] page_token - # @return [::String] - # Token identifying which result to start with; returned by a previous list - # call. - # @!attribute [rw] consumer_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Include services consumed by the specified consumer. - # - # The Google Service Management implementation accepts the following - # forms: - # - project: - class ListServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `ListServices` method. - # @!attribute [rw] services - # @return [::Array<::Google::Cloud::ServiceManagement::V1::ManagedService>] - # The returned services will only have the name field set. - # @!attribute [rw] next_page_token - # @return [::String] - # Token that can be passed to `ListServices` to resume a paginated query. - class ListServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetService` method. - # @!attribute [rw] service_name - # @return [::String] - # Required. The name of the service. See the `ServiceManager` overview for - # naming requirements. For example: `example.googleapis.com`. - class GetServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateService method. - # @!attribute [rw] service - # @return [::Google::Cloud::ServiceManagement::V1::ManagedService] - # Required. Initial values for the service resource. - class CreateServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteService method. - # @!attribute [rw] service_name - # @return [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - class DeleteServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UndeleteService method. - # @!attribute [rw] service_name - # @return [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - class UndeleteServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for UndeleteService method. - # @!attribute [rw] service - # @return [::Google::Cloud::ServiceManagement::V1::ManagedService] - # Revived service resource. - class UndeleteServiceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetServiceConfig method. - # @!attribute [rw] service_name - # @return [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @!attribute [rw] config_id - # @return [::String] - # Required. The id of the service configuration resource. - # - # This field must be specified for the server to return all fields, including - # `SourceInfo`. - # @!attribute [rw] view - # @return [::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest::ConfigView] - # Specifies which parts of the Service Config should be returned in the - # response. - class GetServiceConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module ConfigView - # Server response includes all fields except SourceInfo. - BASIC = 0 - - # Server response includes all fields including SourceInfo. - # SourceFiles are of type 'google.api.servicemanagement.v1.ConfigFile' - # and are only available for configs created using the - # SubmitConfigSource method. - FULL = 1 - end - end - - # Request message for ListServiceConfigs method. - # @!attribute [rw] service_name - # @return [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @!attribute [rw] page_token - # @return [::String] - # The token of the page to retrieve. - # @!attribute [rw] page_size - # @return [::Integer] - # The max number of items to include in the response list. Page size is 50 - # if not specified. Maximum value is 100. - class ListServiceConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListServiceConfigs method. - # @!attribute [rw] service_configs - # @return [::Array<::Google::Api::Service>] - # The list of service configuration resources. - # @!attribute [rw] next_page_token - # @return [::String] - # The token of the next page of results. - class ListServiceConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateServiceConfig method. - # @!attribute [rw] service_name - # @return [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @!attribute [rw] service_config - # @return [::Google::Api::Service] - # Required. The service configuration resource. - class CreateServiceConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for SubmitConfigSource method. - # @!attribute [rw] service_name - # @return [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @!attribute [rw] config_source - # @return [::Google::Cloud::ServiceManagement::V1::ConfigSource] - # Required. The source configuration for the service. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, this will result in the generation of a - # `google.api.Service` configuration based on the `ConfigSource` provided, - # but the generated config and the sources will NOT be persisted. - class SubmitConfigSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for SubmitConfigSource method. - # @!attribute [rw] service_config - # @return [::Google::Api::Service] - # The generated service configuration. - class SubmitConfigSourceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for 'CreateServiceRollout' - # @!attribute [rw] service_name - # @return [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @!attribute [rw] rollout - # @return [::Google::Cloud::ServiceManagement::V1::Rollout] - # Required. The rollout resource. The `service_name` field is output only. - class CreateServiceRolloutRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for 'ListServiceRollouts' - # @!attribute [rw] service_name - # @return [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @!attribute [rw] page_token - # @return [::String] - # The token of the page to retrieve. - # @!attribute [rw] page_size - # @return [::Integer] - # The max number of items to include in the response list. Page size is 50 - # if not specified. Maximum value is 100. - # @!attribute [rw] filter - # @return [::String] - # Required. Use `filter` to return subset of rollouts. - # The following filters are supported: - # - # -- By [status] - # [google.api.servicemanagement.v1.Rollout.RolloutStatus]. For example, - # `filter='status=SUCCESS'` - # - # -- By [strategy] - # [google.api.servicemanagement.v1.Rollout.strategy]. For example, - # `filter='strategy=TrafficPercentStrategy'` - class ListServiceRolloutsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListServiceRollouts method. - # @!attribute [rw] rollouts - # @return [::Array<::Google::Cloud::ServiceManagement::V1::Rollout>] - # The list of rollout resources. - # @!attribute [rw] next_page_token - # @return [::String] - # The token of the next page of results. - class ListServiceRolloutsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetServiceRollout method. - # @!attribute [rw] service_name - # @return [::String] - # Required. The name of the service. See the - # [overview](https://cloud.google.com/service-management/overview) for naming - # requirements. For example: `example.googleapis.com`. - # @!attribute [rw] rollout_id - # @return [::String] - # Required. The id of the rollout resource. - class GetServiceRolloutRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Operation payload for EnableService method. - class EnableServiceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GenerateConfigReport method. - # @!attribute [rw] new_config - # @return [::Google::Protobuf::Any] - # Required. Service configuration for which we want to generate the report. - # For this version of API, the supported types are - # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, - # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, - # and {::Google::Api::Service google.api.Service} - # @!attribute [rw] old_config - # @return [::Google::Protobuf::Any] - # Optional. Service configuration against which the comparison will be done. - # For this version of API, the supported types are - # {::Google::Cloud::ServiceManagement::V1::ConfigRef google.api.servicemanagement.v1.ConfigRef}, - # {::Google::Cloud::ServiceManagement::V1::ConfigSource google.api.servicemanagement.v1.ConfigSource}, - # and {::Google::Api::Service google.api.Service} - class GenerateConfigReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for GenerateConfigReport method. - # @!attribute [rw] service_name - # @return [::String] - # Name of the service this report belongs to. - # @!attribute [rw] id - # @return [::String] - # ID of the service configuration this report belongs to. - # @!attribute [rw] change_reports - # @return [::Array<::Google::Cloud::ServiceManagement::V1::ChangeReport>] - # list of ChangeReport, each corresponding to comparison between two - # service configurations. - # @!attribute [rw] diagnostics - # @return [::Array<::Google::Cloud::ServiceManagement::V1::Diagnostic>] - # Errors / Linter warnings associated with the service definition this - # report - # belongs to. - class GenerateConfigReportResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/source_info.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/source_info.rb deleted file mode 100644 index c7bfc8db0769..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/source_info.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Source information used to create a Service Config - # @!attribute [rw] source_files - # @return [::Array<::Google::Protobuf::Any>] - # All files used during config generation. - class SourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/system_parameter.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/system_parameter.rb deleted file mode 100644 index 4bb72da7b22c..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/system_parameter.rb +++ /dev/null @@ -1,104 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # ### System parameter configuration - # - # A system parameter is a special kind of parameter defined by the API - # system, not by an individual API. It is typically mapped to an HTTP header - # and/or a URL query parameter. This configuration specifies which methods - # change the names of the system parameters. - # @!attribute [rw] rules - # @return [::Array<::Google::Api::SystemParameterRule>] - # Define system parameters. - # - # The parameters defined here will override the default parameters - # implemented by the system. If this field is missing from the service - # config, default system parameters will be used. Default system parameters - # and names is implementation-dependent. - # - # Example: define api key for all methods - # - # system_parameters - # rules: - # - selector: "*" - # parameters: - # - name: api_key - # url_query_parameter: api_key - # - # - # Example: define 2 api key names for a specific method. - # - # system_parameters - # rules: - # - selector: "/ListShelves" - # parameters: - # - name: api_key - # http_header: Api-Key1 - # - name: api_key - # http_header: Api-Key2 - # - # **NOTE:** All service configuration rules follow "last one wins" order. - class SystemParameters - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Define a system parameter rule mapping system parameter definitions to - # methods. - # @!attribute [rw] selector - # @return [::String] - # Selects the methods to which this rule applies. Use '*' to indicate all - # methods in all APIs. - # - # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax - # details. - # @!attribute [rw] parameters - # @return [::Array<::Google::Api::SystemParameter>] - # Define parameters. Multiple names may be defined for a parameter. - # For a given method call, only one of them should be used. If multiple - # names are used the behavior is implementation-dependent. - # If none of the specified names are present the behavior is - # parameter-dependent. - class SystemParameterRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Define a parameter's name and location. The parameter may be passed as either - # an HTTP header or a URL query parameter, and if both are passed the behavior - # is implementation-dependent. - # @!attribute [rw] name - # @return [::String] - # Define the name of the parameter, such as "api_key" . It is case sensitive. - # @!attribute [rw] http_header - # @return [::String] - # Define the HTTP header name to use for the parameter. It is case - # insensitive. - # @!attribute [rw] url_query_parameter - # @return [::String] - # Define the URL query parameter name to use for the parameter. It is case - # sensitive. - class SystemParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/usage.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/usage.rb deleted file mode 100644 index 42ed23536d71..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/api/usage.rb +++ /dev/null @@ -1,81 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Configuration controlling usage of a service. - # @!attribute [rw] requirements - # @return [::Array<::String>] - # Requirements that must be satisfied before a consumer project can use the - # service. Each requirement is of the form /; - # for example 'serviceusage.googleapis.com/billing-enabled'. - # - # For Google APIs, a Terms of Service requirement must be included here. - # Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". - # Other Google APIs should include - # "serviceusage.googleapis.com/tos/universal". Additional ToS can be - # included based on the business needs. - # @!attribute [rw] rules - # @return [::Array<::Google::Api::UsageRule>] - # A list of usage rules that apply to individual API methods. - # - # **NOTE:** All service configuration rules follow "last one wins" order. - # @!attribute [rw] producer_notification_channel - # @return [::String] - # The full resource name of a channel used for sending notifications to the - # service producer. - # - # Google Service Management currently only supports - # [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification - # channel. To use Google Cloud Pub/Sub as the channel, this must be the name - # of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format - # documented in https://cloud.google.com/pubsub/docs/overview. - class Usage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Usage configuration rules for the service. - # @!attribute [rw] selector - # @return [::String] - # Selects the methods to which this rule applies. Use '*' to indicate all - # methods in all APIs. - # - # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax - # details. - # @!attribute [rw] allow_unregistered_calls - # @return [::Boolean] - # Use this rule to configure unregistered calls for the service. Unregistered - # calls are calls that do not contain consumer project identity. - # (Example: calls that do not contain an API key). - # - # WARNING: By default, API methods do not allow unregistered calls, and each - # method call must be identified by a consumer project identity. - # @!attribute [rw] skip_service_control - # @return [::Boolean] - # If true, the selected method should skip service control and the control - # plane features, such as quota and billing, will not be available. - # This flag is used by Google Cloud Endpoints to bypass checks for internal - # methods, such as service health check methods. - class UsageRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/api.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/api.rb deleted file mode 100644 index e6e576b4cf8a..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/api.rb +++ /dev/null @@ -1,218 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Api is a light-weight descriptor for an API Interface. - # - # Interfaces are also described as "protocol buffer services" in some contexts, - # such as by the "service" keyword in a .proto file, but they are different - # from API Services, which represent a concrete implementation of an interface - # as opposed to simply a description of methods and bindings. They are also - # sometimes simply referred to as "APIs" in other contexts, such as the name of - # this message itself. See https://cloud.google.com/apis/design/glossary for - # detailed terminology. - # - # New usages of this message as an alternative to ServiceDescriptorProto are - # strongly discouraged. This message does not reliability preserve all - # information necessary to model the schema and preserve semantics. Instead - # make use of FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] name - # @return [::String] - # The fully qualified name of this interface, including package name - # followed by the interface's simple name. - # @!attribute [rw] methods - # @return [::Array<::Google::Protobuf::Method>] - # The methods of this interface, in unspecified order. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # Any metadata attached to the interface. - # @!attribute [rw] version - # @return [::String] - # A version string for this interface. If specified, must have the form - # `major-version.minor-version`, as in `1.10`. If the minor version is - # omitted, it defaults to zero. If the entire version field is empty, the - # major version is derived from the package name, as outlined below. If the - # field is not empty, the version in the package name will be verified to be - # consistent with what is provided here. - # - # The versioning schema uses [semantic - # versioning](http://semver.org) where the major version number - # indicates a breaking change and the minor version an additive, - # non-breaking change. Both version numbers are signals to users - # what to expect from different versions, and should be carefully - # chosen based on the product plan. - # - # The major version is also reflected in the package name of the - # interface, which must end in `v`, as in - # `google.feature.v1`. For major versions 0 and 1, the suffix can - # be omitted. Zero major versions must only be used for - # experimental, non-GA interfaces. - # @!attribute [rw] source_context - # @return [::Google::Protobuf::SourceContext] - # Source context for the protocol buffer service represented by this - # message. - # @!attribute [rw] mixins - # @return [::Array<::Google::Protobuf::Mixin>] - # Included interfaces. See [Mixin][]. - # @!attribute [rw] syntax - # @return [::Google::Protobuf::Syntax] - # The source syntax of the service. - # @!attribute [rw] edition - # @return [::String] - # The source edition string, only valid when syntax is SYNTAX_EDITIONS. - class Api - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Method represents a method of an API interface. - # - # New usages of this message as an alternative to MethodDescriptorProto are - # strongly discouraged. This message does not reliability preserve all - # information necessary to model the schema and preserve semantics. Instead - # make use of FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] name - # @return [::String] - # The simple name of this method. - # @!attribute [rw] request_type_url - # @return [::String] - # A URL of the input message type. - # @!attribute [rw] request_streaming - # @return [::Boolean] - # If true, the request is streamed. - # @!attribute [rw] response_type_url - # @return [::String] - # The URL of the output message type. - # @!attribute [rw] response_streaming - # @return [::Boolean] - # If true, the response is streamed. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # Any metadata attached to the method. - # @!attribute [rw] syntax - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Syntax] - # The source syntax of this method. - # - # This field should be ignored, instead the syntax should be inherited from - # Api. This is similar to Field and EnumValue. - # @!attribute [rw] edition - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # The source edition string, only valid when syntax is SYNTAX_EDITIONS. - # - # This field should be ignored, instead the edition should be inherited from - # Api. This is similar to Field and EnumValue. - class Method - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Declares an API Interface to be included in this interface. The including - # interface must redeclare all the methods from the included interface, but - # documentation and options are inherited as follows: - # - # - If after comment and whitespace stripping, the documentation - # string of the redeclared method is empty, it will be inherited - # from the original method. - # - # - Each annotation belonging to the service config (http, - # visibility) which is not set in the redeclared method will be - # inherited. - # - # - If an http annotation is inherited, the path pattern will be - # modified as follows. Any version prefix will be replaced by the - # version of the including interface plus the [root][] path if - # specified. - # - # Example of a simple mixin: - # - # package google.acl.v1; - # service AccessControl { - # // Get the underlying ACL object. - # rpc GetAcl(GetAclRequest) returns (Acl) { - # option (google.api.http).get = "/v1/{resource=**}:getAcl"; - # } - # } - # - # package google.storage.v2; - # service Storage { - # rpc GetAcl(GetAclRequest) returns (Acl); - # - # // Get a data record. - # rpc GetData(GetDataRequest) returns (Data) { - # option (google.api.http).get = "/v2/{resource=**}"; - # } - # } - # - # Example of a mixin configuration: - # - # apis: - # - name: google.storage.v2.Storage - # mixins: - # - name: google.acl.v1.AccessControl - # - # The mixin construct implies that all methods in `AccessControl` are - # also declared with same name and request/response types in - # `Storage`. A documentation generator or annotation processor will - # see the effective `Storage.GetAcl` method after inheriting - # documentation and annotations as follows: - # - # service Storage { - # // Get the underlying ACL object. - # rpc GetAcl(GetAclRequest) returns (Acl) { - # option (google.api.http).get = "/v2/{resource=**}:getAcl"; - # } - # ... - # } - # - # Note how the version in the path pattern changed from `v1` to `v2`. - # - # If the `root` field in the mixin is specified, it should be a - # relative path under which inherited HTTP paths are placed. Example: - # - # apis: - # - name: google.storage.v2.Storage - # mixins: - # - name: google.acl.v1.AccessControl - # root: acls - # - # This implies the following inherited HTTP annotation: - # - # service Storage { - # // Get the underlying ACL object. - # rpc GetAcl(GetAclRequest) returns (Acl) { - # option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; - # } - # ... - # } - # @!attribute [rw] name - # @return [::String] - # The fully qualified name of the interface which is included. - # @!attribute [rw] root - # @return [::String] - # If non-empty specifies a path under which inherited HTTP paths - # are rooted. - class Mixin - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/source_context.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/source_context.rb deleted file mode 100644 index 1bc7c0900aec..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/source_context.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `SourceContext` represents information about the source of a - # protobuf element, like the file in which it is defined. - # @!attribute [rw] file_name - # @return [::String] - # The path-qualified name of the .proto file that contained the associated - # protobuf element. For example: `"google/protobuf/source_context.proto"`. - class SourceContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/type.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/type.rb deleted file mode 100644 index c9c8ea649289..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/type.rb +++ /dev/null @@ -1,256 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A protocol buffer message type. - # - # New usages of this message as an alternative to DescriptorProto are strongly - # discouraged. This message does not reliability preserve all information - # necessary to model the schema and preserve semantics. Instead make use of - # FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] name - # @return [::String] - # The fully qualified message name. - # @!attribute [rw] fields - # @return [::Array<::Google::Protobuf::Field>] - # The list of fields. - # @!attribute [rw] oneofs - # @return [::Array<::String>] - # The list of types appearing in `oneof` definitions in this type. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # The protocol buffer options. - # @!attribute [rw] source_context - # @return [::Google::Protobuf::SourceContext] - # The source context. - # @!attribute [rw] syntax - # @return [::Google::Protobuf::Syntax] - # The source syntax. - # @!attribute [rw] edition - # @return [::String] - # The source edition string, only valid when syntax is SYNTAX_EDITIONS. - class Type - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single field of a message type. - # - # New usages of this message as an alternative to FieldDescriptorProto are - # strongly discouraged. This message does not reliability preserve all - # information necessary to model the schema and preserve semantics. Instead - # make use of FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] kind - # @return [::Google::Protobuf::Field::Kind] - # The field type. - # @!attribute [rw] cardinality - # @return [::Google::Protobuf::Field::Cardinality] - # The field cardinality. - # @!attribute [rw] number - # @return [::Integer] - # The field number. - # @!attribute [rw] name - # @return [::String] - # The field name. - # @!attribute [rw] type_url - # @return [::String] - # The field type URL, without the scheme, for message or enumeration - # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. - # @!attribute [rw] oneof_index - # @return [::Integer] - # The index of the field type in `Type.oneofs`, for message or enumeration - # types. The first type has index 1; zero means the type is not in the list. - # @!attribute [rw] packed - # @return [::Boolean] - # Whether to use alternative packed wire representation. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # The protocol buffer options. - # @!attribute [rw] json_name - # @return [::String] - # The field JSON name. - # @!attribute [rw] default_value - # @return [::String] - # The string value of the default value of this field. Proto2 syntax only. - class Field - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Basic field types. - module Kind - # Field type unknown. - TYPE_UNKNOWN = 0 - - # Field type double. - TYPE_DOUBLE = 1 - - # Field type float. - TYPE_FLOAT = 2 - - # Field type int64. - TYPE_INT64 = 3 - - # Field type uint64. - TYPE_UINT64 = 4 - - # Field type int32. - TYPE_INT32 = 5 - - # Field type fixed64. - TYPE_FIXED64 = 6 - - # Field type fixed32. - TYPE_FIXED32 = 7 - - # Field type bool. - TYPE_BOOL = 8 - - # Field type string. - TYPE_STRING = 9 - - # Field type group. Proto2 syntax only, and deprecated. - TYPE_GROUP = 10 - - # Field type message. - TYPE_MESSAGE = 11 - - # Field type bytes. - TYPE_BYTES = 12 - - # Field type uint32. - TYPE_UINT32 = 13 - - # Field type enum. - TYPE_ENUM = 14 - - # Field type sfixed32. - TYPE_SFIXED32 = 15 - - # Field type sfixed64. - TYPE_SFIXED64 = 16 - - # Field type sint32. - TYPE_SINT32 = 17 - - # Field type sint64. - TYPE_SINT64 = 18 - end - - # Whether a field is optional, required, or repeated. - module Cardinality - # For fields with unknown cardinality. - CARDINALITY_UNKNOWN = 0 - - # For optional fields. - CARDINALITY_OPTIONAL = 1 - - # For required fields. Proto2 syntax only. - CARDINALITY_REQUIRED = 2 - - # For repeated fields. - CARDINALITY_REPEATED = 3 - end - end - - # Enum type definition. - # - # New usages of this message as an alternative to EnumDescriptorProto are - # strongly discouraged. This message does not reliability preserve all - # information necessary to model the schema and preserve semantics. Instead - # make use of FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] name - # @return [::String] - # Enum type name. - # @!attribute [rw] enumvalue - # @return [::Array<::Google::Protobuf::EnumValue>] - # Enum value definitions. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # Protocol buffer options. - # @!attribute [rw] source_context - # @return [::Google::Protobuf::SourceContext] - # The source context. - # @!attribute [rw] syntax - # @return [::Google::Protobuf::Syntax] - # The source syntax. - # @!attribute [rw] edition - # @return [::String] - # The source edition string, only valid when syntax is SYNTAX_EDITIONS. - class Enum - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum value definition. - # - # New usages of this message as an alternative to EnumValueDescriptorProto are - # strongly discouraged. This message does not reliability preserve all - # information necessary to model the schema and preserve semantics. Instead - # make use of FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] name - # @return [::String] - # Enum value name. - # @!attribute [rw] number - # @return [::Integer] - # Enum value number. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # Protocol buffer options. - class EnumValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A protocol buffer option, which can be attached to a message, field, - # enumeration, etc. - # - # New usages of this message as an alternative to FileOptions, MessageOptions, - # FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions - # are strongly discouraged. - # @!attribute [rw] name - # @return [::String] - # The option's name. For protobuf built-in options (options defined in - # descriptor.proto), this is the short name. For example, `"map_entry"`. - # For custom options, it should be the fully-qualified name. For example, - # `"google.api.http"`. - # @!attribute [rw] value - # @return [::Google::Protobuf::Any] - # The option's value packed in an Any message. If the value is a primitive, - # the corresponding wrapper type defined in google/protobuf/wrappers.proto - # should be used. If the value is an enum, it should be stored as an int32 - # value using the google.protobuf.Int32Value type. - class Option - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The syntax in which a protocol buffer element is defined. - module Syntax - # Syntax `proto2`. - SYNTAX_PROTO2 = 0 - - # Syntax `proto3`. - SYNTAX_PROTO3 = 1 - - # Syntax `editions`. - SYNTAX_EDITIONS = 2 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-service_management-v1/snippets/Gemfile deleted file mode 100644 index c216e7e1548e..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-service_management-v1", path: "../" -else - gem "google-cloud-service_management-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service.rb deleted file mode 100644 index 1c68ff74701c..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_CreateService_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the create_service call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service. -# -def create_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new - - # Call the create_service method. - result = client.create_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END servicemanagement_v1_generated_ServiceManager_CreateService_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_config.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_config.rb deleted file mode 100644 index 11c36e9ef1af..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the create_service_config call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_config. -# -def create_service_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new - - # Call the create_service_config method. - result = client.create_service_config request - - # The returned object is of type Google::Api::Service. - p result -end -# [END servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_rollout.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_rollout.rb deleted file mode 100644 index 3676dfc62845..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/create_service_rollout.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the create_service_rollout call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_rollout. -# -def create_service_rollout - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new - - # Call the create_service_rollout method. - result = client.create_service_rollout request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/delete_service.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/delete_service.rb deleted file mode 100644 index 510fb8a4ad39..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/delete_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_DeleteService_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the delete_service call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#delete_service. -# -def delete_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new - - # Call the delete_service method. - result = client.delete_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END servicemanagement_v1_generated_ServiceManager_DeleteService_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/generate_config_report.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/generate_config_report.rb deleted file mode 100644 index 842fe0c160e1..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/generate_config_report.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the generate_config_report call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#generate_config_report. -# -def generate_config_report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new - - # Call the generate_config_report method. - result = client.generate_config_report request - - # The returned object is of type Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse. - p result -end -# [END servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service.rb deleted file mode 100644 index 467349ad1ee9..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_GetService_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the get_service call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service. -# -def get_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::GetServiceRequest.new - - # Call the get_service method. - result = client.get_service request - - # The returned object is of type Google::Cloud::ServiceManagement::V1::ManagedService. - p result -end -# [END servicemanagement_v1_generated_ServiceManager_GetService_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_config.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_config.rb deleted file mode 100644 index 610df5b47573..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_GetServiceConfig_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the get_service_config call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_config. -# -def get_service_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new - - # Call the get_service_config method. - result = client.get_service_config request - - # The returned object is of type Google::Api::Service. - p result -end -# [END servicemanagement_v1_generated_ServiceManager_GetServiceConfig_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_rollout.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_rollout.rb deleted file mode 100644 index 3dda230e49fb..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/get_service_rollout.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_GetServiceRollout_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the get_service_rollout call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_rollout. -# -def get_service_rollout - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new - - # Call the get_service_rollout method. - result = client.get_service_rollout request - - # The returned object is of type Google::Cloud::ServiceManagement::V1::Rollout. - p result -end -# [END servicemanagement_v1_generated_ServiceManager_GetServiceRollout_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_configs.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_configs.rb deleted file mode 100644 index eeb38ca2aff8..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the list_service_configs call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_configs. -# -def list_service_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new - - # Call the list_service_configs method. - result = client.list_service_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Api::Service. - p item - end -end -# [END servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_rollouts.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_rollouts.rb deleted file mode 100644 index 589785deffe7..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_service_rollouts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the list_service_rollouts call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_rollouts. -# -def list_service_rollouts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new - - # Call the list_service_rollouts method. - result = client.list_service_rollouts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ServiceManagement::V1::Rollout. - p item - end -end -# [END servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_services.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_services.rb deleted file mode 100644 index eb978eb8fc46..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/list_services.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_ListServices_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the list_services call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_services. -# -def list_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::ListServicesRequest.new - - # Call the list_services method. - result = client.list_services request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ServiceManagement::V1::ManagedService. - p item - end -end -# [END servicemanagement_v1_generated_ServiceManager_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/submit_config_source.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/submit_config_source.rb deleted file mode 100644 index 329b0d68e2f1..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/submit_config_source.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the submit_config_source call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#submit_config_source. -# -def submit_config_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new - - # Call the submit_config_source method. - result = client.submit_config_source request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/undelete_service.rb b/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/undelete_service.rb deleted file mode 100644 index e6831d656f74..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/service_manager/undelete_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START servicemanagement_v1_generated_ServiceManager_UndeleteService_sync] -require "google/cloud/service_management/v1" - -## -# Snippet for the undelete_service call in the ServiceManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceManagement::V1::ServiceManager::Client#undelete_service. -# -def undelete_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new - - # Call the undelete_service method. - result = client.undelete_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END servicemanagement_v1_generated_ServiceManager_UndeleteService_sync] diff --git a/owl-bot-staging/google-cloud-service_management-v1/snippets/snippet_metadata_google.api.servicemanagement.v1.json b/owl-bot-staging/google-cloud-service_management-v1/snippets/snippet_metadata_google.api.servicemanagement.v1.json deleted file mode 100644 index 6e3a8680e282..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/snippets/snippet_metadata_google.api.servicemanagement.v1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-service_management-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.api.servicemanagement.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_ListServices_sync", - "title": "Snippet for the list_services call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_services.", - "file": "service_manager/list_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_services", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::ListServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceManagement::V1::ListServicesResponse", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "ListServices", - "full_name": "google.api.servicemanagement.v1.ServiceManager.ListServices", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_GetService_sync", - "title": "Snippet for the get_service call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service.", - "file": "service_manager/get_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::GetServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceManagement::V1::ManagedService", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "GetService", - "full_name": "google.api.servicemanagement.v1.ServiceManager.GetService", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_CreateService_sync", - "title": "Snippet for the create_service call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service.", - "file": "service_manager/create_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::CreateServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "CreateService", - "full_name": "google.api.servicemanagement.v1.ServiceManager.CreateService", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_DeleteService_sync", - "title": "Snippet for the delete_service call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#delete_service.", - "file": "service_manager/delete_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_service", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#delete_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "DeleteService", - "full_name": "google.api.servicemanagement.v1.ServiceManager.DeleteService", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_UndeleteService_sync", - "title": "Snippet for the undelete_service call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#undelete_service.", - "file": "service_manager/undelete_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "undelete_service", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#undelete_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "UndeleteService", - "full_name": "google.api.servicemanagement.v1.ServiceManager.UndeleteService", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_sync", - "title": "Snippet for the list_service_configs call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_configs.", - "file": "service_manager/list_service_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_service_configs", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "ListServiceConfigs", - "full_name": "google.api.servicemanagement.v1.ServiceManager.ListServiceConfigs", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_GetServiceConfig_sync", - "title": "Snippet for the get_service_config call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_config.", - "file": "service_manager/get_service_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service_config", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Api::Service", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "GetServiceConfig", - "full_name": "google.api.servicemanagement.v1.ServiceManager.GetServiceConfig", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_sync", - "title": "Snippet for the create_service_config call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_config.", - "file": "service_manager/create_service_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service_config", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Api::Service", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "CreateServiceConfig", - "full_name": "google.api.servicemanagement.v1.ServiceManager.CreateServiceConfig", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_sync", - "title": "Snippet for the submit_config_source call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#submit_config_source.", - "file": "service_manager/submit_config_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "submit_config_source", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#submit_config_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "SubmitConfigSource", - "full_name": "google.api.servicemanagement.v1.ServiceManager.SubmitConfigSource", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_sync", - "title": "Snippet for the list_service_rollouts call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_rollouts.", - "file": "service_manager/list_service_rollouts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_service_rollouts", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#list_service_rollouts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "ListServiceRollouts", - "full_name": "google.api.servicemanagement.v1.ServiceManager.ListServiceRollouts", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_GetServiceRollout_sync", - "title": "Snippet for the get_service_rollout call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_rollout.", - "file": "service_manager/get_service_rollout.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service_rollout", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#get_service_rollout", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceManagement::V1::Rollout", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "GetServiceRollout", - "full_name": "google.api.servicemanagement.v1.ServiceManager.GetServiceRollout", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_sync", - "title": "Snippet for the create_service_rollout call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_rollout.", - "file": "service_manager/create_service_rollout.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_service_rollout", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#create_service_rollout", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "CreateServiceRollout", - "full_name": "google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_sync", - "title": "Snippet for the generate_config_report call in the ServiceManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceManagement::V1::ServiceManager::Client#generate_config_report.", - "file": "service_manager/generate_config_report.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_config_report", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client#generate_config_report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse", - "client": { - "short_name": "ServiceManager::Client", - "full_name": "::Google::Cloud::ServiceManagement::V1::ServiceManager::Client" - }, - "method": { - "short_name": "GenerateConfigReport", - "full_name": "google.api.servicemanagement.v1.ServiceManager.GenerateConfigReport", - "service": { - "short_name": "ServiceManager", - "full_name": "google.api.servicemanagement.v1.ServiceManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_test.rb b/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_test.rb deleted file mode 100644 index a7e637722b9c..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/api/servicemanagement/v1/servicemanager_pb" -require "google/api/servicemanagement/v1/servicemanager_services_pb" -require "google/cloud/service_management/v1/service_manager" - -class ::Google::Cloud::ServiceManagement::V1::ServiceManager::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_rest_test.rb b/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_rest_test.rb deleted file mode 100644 index 6ca859efecf7..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_rest_test.rb +++ /dev/null @@ -1,817 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/api/servicemanagement/v1/servicemanager_pb" -require "google/cloud/service_management/v1/service_manager/rest" - - -class ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_services - # Create test objects. - client_result = ::Google::Cloud::ServiceManagement::V1::ListServicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - producer_project_id = "hello world" - page_size = 42 - page_token = "hello world" - consumer_id = "hello world" - - list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_services_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_services({ producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_services producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_services ::Google::Cloud::ServiceManagement::V1::ListServicesRequest.new(producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_services({ producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_services(::Google::Cloud::ServiceManagement::V1::ListServicesRequest.new(producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_count - end - end - end - - def test_get_service - # Create test objects. - client_result = ::Google::Cloud::ServiceManagement::V1::ManagedService.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - - get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service({ service_name: service_name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service service_name: service_name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service ::Google::Cloud::ServiceManagement::V1::GetServiceRequest.new(service_name: service_name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service({ service_name: service_name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service(::Google::Cloud::ServiceManagement::V1::GetServiceRequest.new(service_name: service_name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_count - end - end - end - - def test_create_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service = {} - - create_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_create_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service({ service: service }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_service service: service do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new(service: service) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_service({ service: service }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service(::Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new(service: service), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_client_stub.call_count - end - end - end - - def test_delete_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - - delete_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_delete_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_service({ service_name: service_name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_service service_name: service_name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_service ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new(service_name: service_name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_service({ service_name: service_name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_service(::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new(service_name: service_name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_service_client_stub.call_count - end - end - end - - def test_undelete_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - - undelete_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_undelete_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undelete_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.undelete_service({ service_name: service_name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.undelete_service service_name: service_name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.undelete_service ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new(service_name: service_name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.undelete_service({ service_name: service_name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.undelete_service(::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new(service_name: service_name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undelete_service_client_stub.call_count - end - end - end - - def test_list_service_configs - # Create test objects. - client_result = ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - page_token = "hello world" - page_size = 42 - - list_service_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_list_service_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_service_configs_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_service_configs({ service_name: service_name, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_service_configs service_name: service_name, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_service_configs ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_service_configs({ service_name: service_name, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_service_configs(::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_service_configs_client_stub.call_count - end - end - end - - def test_get_service_config - # Create test objects. - client_result = ::Google::Api::Service.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - config_id = "hello world" - view = :BASIC - - get_service_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_get_service_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_config_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service_config({ service_name: service_name, config_id: config_id, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service_config service_name: service_name, config_id: config_id, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service_config ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new(service_name: service_name, config_id: config_id, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service_config({ service_name: service_name, config_id: config_id, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service_config(::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new(service_name: service_name, config_id: config_id, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_config_client_stub.call_count - end - end - end - - def test_create_service_config - # Create test objects. - client_result = ::Google::Api::Service.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - service_config = {} - - create_service_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_create_service_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_config_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service_config({ service_name: service_name, service_config: service_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_service_config service_name: service_name, service_config: service_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service_config ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new(service_name: service_name, service_config: service_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_service_config({ service_name: service_name, service_config: service_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service_config(::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new(service_name: service_name, service_config: service_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_config_client_stub.call_count - end - end - end - - def test_submit_config_source - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - config_source = {} - validate_only = true - - submit_config_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_submit_config_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, submit_config_source_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.submit_config_source({ service_name: service_name, config_source: config_source, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.submit_config_source service_name: service_name, config_source: config_source, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.submit_config_source ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new(service_name: service_name, config_source: config_source, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.submit_config_source({ service_name: service_name, config_source: config_source, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.submit_config_source(::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new(service_name: service_name, config_source: config_source, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, submit_config_source_client_stub.call_count - end - end - end - - def test_list_service_rollouts - # Create test objects. - client_result = ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - page_token = "hello world" - page_size = 42 - filter = "hello world" - - list_service_rollouts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_list_service_rollouts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_service_rollouts_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_service_rollouts({ service_name: service_name, page_token: page_token, page_size: page_size, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_service_rollouts service_name: service_name, page_token: page_token, page_size: page_size, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_service_rollouts ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_service_rollouts({ service_name: service_name, page_token: page_token, page_size: page_size, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_service_rollouts(::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_service_rollouts_client_stub.call_count - end - end - end - - def test_get_service_rollout - # Create test objects. - client_result = ::Google::Cloud::ServiceManagement::V1::Rollout.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - rollout_id = "hello world" - - get_service_rollout_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_get_service_rollout_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_rollout_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service_rollout({ service_name: service_name, rollout_id: rollout_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service_rollout service_name: service_name, rollout_id: rollout_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service_rollout ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new(service_name: service_name, rollout_id: rollout_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service_rollout({ service_name: service_name, rollout_id: rollout_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service_rollout(::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new(service_name: service_name, rollout_id: rollout_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_rollout_client_stub.call_count - end - end - end - - def test_create_service_rollout - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - rollout = {} - - create_service_rollout_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_create_service_rollout_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_service_rollout_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_service_rollout({ service_name: service_name, rollout: rollout }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_service_rollout service_name: service_name, rollout: rollout do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_service_rollout ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new(service_name: service_name, rollout: rollout) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_service_rollout({ service_name: service_name, rollout: rollout }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_service_rollout(::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new(service_name: service_name, rollout: rollout), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_service_rollout_client_stub.call_count - end - end - end - - def test_generate_config_report - # Create test objects. - client_result = ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - new_config = {} - old_config = {} - - generate_config_report_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::ServiceStub.stub :transcode_generate_config_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_config_report_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.generate_config_report({ new_config: new_config, old_config: old_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.generate_config_report new_config: new_config, old_config: old_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.generate_config_report ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new(new_config: new_config, old_config: old_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.generate_config_report({ new_config: new_config, old_config: old_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.generate_config_report(::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new(new_config: new_config, old_config: old_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_config_report_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_test.rb b/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_test.rb deleted file mode 100644 index 97e3b6131b65..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/test/google/cloud/service_management/v1/service_manager_test.rb +++ /dev/null @@ -1,944 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/api/servicemanagement/v1/servicemanager_pb" -require "google/cloud/service_management/v1/service_manager" - -class ::Google::Cloud::ServiceManagement::V1::ServiceManager::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceManagement::V1::ListServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - producer_project_id = "hello world" - page_size = 42 - page_token = "hello world" - consumer_id = "hello world" - - list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_services, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::ListServicesRequest, request - assert_equal "hello world", request["producer_project_id"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["consumer_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_services_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_services({ producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_services producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_services ::Google::Cloud::ServiceManagement::V1::ListServicesRequest.new(producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_services({ producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_services(::Google::Cloud::ServiceManagement::V1::ListServicesRequest.new(producer_project_id: producer_project_id, page_size: page_size, page_token: page_token, consumer_id: consumer_id), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_rpc_count - end - end - - def test_get_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceManagement::V1::ManagedService.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - - get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::GetServiceRequest, request - assert_equal "hello world", request["service_name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service({ service_name: service_name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service service_name: service_name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service ::Google::Cloud::ServiceManagement::V1::GetServiceRequest.new(service_name: service_name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service({ service_name: service_name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service(::Google::Cloud::ServiceManagement::V1::GetServiceRequest.new(service_name: service_name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_rpc_count - end - end - - def test_create_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service = {} - - create_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceManagement::V1::ManagedService), request["service"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service({ service: service }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_service service: service do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_service ::Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new(service: service) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_service({ service: service }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_service(::Google::Cloud::ServiceManagement::V1::CreateServiceRequest.new(service: service), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_service_client_stub.call_rpc_count - end - end - - def test_delete_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - - delete_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_service, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest, request - assert_equal "hello world", request["service_name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_service({ service_name: service_name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_service service_name: service_name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_service ::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new(service_name: service_name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_service({ service_name: service_name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_service(::Google::Cloud::ServiceManagement::V1::DeleteServiceRequest.new(service_name: service_name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_service_client_stub.call_rpc_count - end - end - - def test_undelete_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - - undelete_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undelete_service, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest, request - assert_equal "hello world", request["service_name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undelete_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.undelete_service({ service_name: service_name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.undelete_service service_name: service_name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.undelete_service ::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new(service_name: service_name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.undelete_service({ service_name: service_name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.undelete_service(::Google::Cloud::ServiceManagement::V1::UndeleteServiceRequest.new(service_name: service_name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, undelete_service_client_stub.call_rpc_count - end - end - - def test_list_service_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - page_token = "hello world" - page_size = 42 - - list_service_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_service_configs, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest, request - assert_equal "hello world", request["service_name"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_service_configs_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_service_configs({ service_name: service_name, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_service_configs service_name: service_name, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_service_configs ::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_service_configs({ service_name: service_name, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_service_configs(::Google::Cloud::ServiceManagement::V1::ListServiceConfigsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_service_configs_client_stub.call_rpc_count - end - end - - def test_get_service_config - # Create GRPC objects. - grpc_response = ::Google::Api::Service.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - config_id = "hello world" - view = :BASIC - - get_service_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service_config, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest, request - assert_equal "hello world", request["service_name"] - assert_equal "hello world", request["config_id"] - assert_equal :BASIC, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_config_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service_config({ service_name: service_name, config_id: config_id, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service_config service_name: service_name, config_id: config_id, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service_config ::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new(service_name: service_name, config_id: config_id, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service_config({ service_name: service_name, config_id: config_id, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service_config(::Google::Cloud::ServiceManagement::V1::GetServiceConfigRequest.new(service_name: service_name, config_id: config_id, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_config_client_stub.call_rpc_count - end - end - - def test_create_service_config - # Create GRPC objects. - grpc_response = ::Google::Api::Service.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - service_config = {} - - create_service_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service_config, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest, request - assert_equal "hello world", request["service_name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Api::Service), request["service_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_config_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service_config({ service_name: service_name, service_config: service_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_service_config service_name: service_name, service_config: service_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_service_config ::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new(service_name: service_name, service_config: service_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_service_config({ service_name: service_name, service_config: service_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_service_config(::Google::Cloud::ServiceManagement::V1::CreateServiceConfigRequest.new(service_name: service_name, service_config: service_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_service_config_client_stub.call_rpc_count - end - end - - def test_submit_config_source - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - config_source = {} - validate_only = true - - submit_config_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :submit_config_source, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest, request - assert_equal "hello world", request["service_name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceManagement::V1::ConfigSource), request["config_source"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, submit_config_source_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.submit_config_source({ service_name: service_name, config_source: config_source, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.submit_config_source service_name: service_name, config_source: config_source, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.submit_config_source ::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new(service_name: service_name, config_source: config_source, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.submit_config_source({ service_name: service_name, config_source: config_source, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.submit_config_source(::Google::Cloud::ServiceManagement::V1::SubmitConfigSourceRequest.new(service_name: service_name, config_source: config_source, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, submit_config_source_client_stub.call_rpc_count - end - end - - def test_list_service_rollouts - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - page_token = "hello world" - page_size = 42 - filter = "hello world" - - list_service_rollouts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_service_rollouts, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest, request - assert_equal "hello world", request["service_name"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_service_rollouts_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_service_rollouts({ service_name: service_name, page_token: page_token, page_size: page_size, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_service_rollouts service_name: service_name, page_token: page_token, page_size: page_size, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_service_rollouts ::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_service_rollouts({ service_name: service_name, page_token: page_token, page_size: page_size, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_service_rollouts(::Google::Cloud::ServiceManagement::V1::ListServiceRolloutsRequest.new(service_name: service_name, page_token: page_token, page_size: page_size, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_service_rollouts_client_stub.call_rpc_count - end - end - - def test_get_service_rollout - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceManagement::V1::Rollout.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - rollout_id = "hello world" - - get_service_rollout_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service_rollout, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest, request - assert_equal "hello world", request["service_name"] - assert_equal "hello world", request["rollout_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_rollout_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service_rollout({ service_name: service_name, rollout_id: rollout_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service_rollout service_name: service_name, rollout_id: rollout_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service_rollout ::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new(service_name: service_name, rollout_id: rollout_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service_rollout({ service_name: service_name, rollout_id: rollout_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service_rollout(::Google::Cloud::ServiceManagement::V1::GetServiceRolloutRequest.new(service_name: service_name, rollout_id: rollout_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_rollout_client_stub.call_rpc_count - end - end - - def test_create_service_rollout - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - service_name = "hello world" - rollout = {} - - create_service_rollout_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_service_rollout, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest, request - assert_equal "hello world", request["service_name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ServiceManagement::V1::Rollout), request["rollout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_service_rollout_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_service_rollout({ service_name: service_name, rollout: rollout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_service_rollout service_name: service_name, rollout: rollout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_service_rollout ::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new(service_name: service_name, rollout: rollout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_service_rollout({ service_name: service_name, rollout: rollout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_service_rollout(::Google::Cloud::ServiceManagement::V1::CreateServiceRolloutRequest.new(service_name: service_name, rollout: rollout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_service_rollout_client_stub.call_rpc_count - end - end - - def test_generate_config_report - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - new_config = {} - old_config = {} - - generate_config_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_config_report, name - assert_kind_of ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Any), request["new_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Any), request["old_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_config_report_client_stub do - # Create client - c = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.generate_config_report({ new_config: new_config, old_config: old_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.generate_config_report new_config: new_config, old_config: old_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.generate_config_report ::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new(new_config: new_config, old_config: old_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.generate_config_report({ new_config: new_config, old_config: old_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.generate_config_report(::Google::Cloud::ServiceManagement::V1::GenerateConfigReportRequest.new(new_config: new_config, old_config: old_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_config_report_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::ServiceManagement::V1::ServiceManager::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-service_management-v1/test/helper.rb b/owl-bot-staging/google-cloud-service_management-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-service_management-v1/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_usage-v1/.gitignore b/owl-bot-staging/google-cloud-service_usage-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/.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_usage-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-service_usage-v1/.repo-metadata.json deleted file mode 100644 index 8e59ad13577b..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "serviceusage.googleapis.com", - "api_shortname": "serviceusage", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest", - "distribution_name": "google-cloud-service_usage-v1", - "is_cloud": true, - "language": "ruby", - "name": "serviceusage", - "name_pretty": "Service Usage V1 API", - "product_documentation": "https://cloud.google.com/service-usage/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Service Usage is an infrastructure service of Google Cloud that lets you list and manage other APIs and services in your Cloud projects. You can list and manage Google Cloud services and their APIs, as well as services created using Cloud Endpoints. Note that google-cloud-service_usage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_usage instead. See the readme for more details.", - "ruby-cloud-env-prefix": "SERVICE_USAGE", - "ruby-cloud-product-url": "https://cloud.google.com/service-usage/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-service_usage-v1/.rubocop.yml b/owl-bot-staging/google-cloud-service_usage-v1/.rubocop.yml deleted file mode 100644 index e4a9da8eab3b..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-service_usage-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-service_usage-v1.rb" diff --git a/owl-bot-staging/google-cloud-service_usage-v1/.toys.rb b/owl-bot-staging/google-cloud-service_usage-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/.yardopts b/owl-bot-staging/google-cloud-service_usage-v1/.yardopts deleted file mode 100644 index 082c42437dcc..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Service Usage V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-service_usage-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-service_usage-v1/AUTHENTICATION.md deleted file mode 100644 index ac6fd4e7ead4..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-service_usage-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-service_usage-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/service_usage/v1" - -client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/service_usage/v1" - -::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-service_usage-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/service_usage/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-service_usage-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-service_usage-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-service_usage-v1/Gemfile b/owl-bot-staging/google-cloud-service_usage-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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_usage-v1/LICENSE.md b/owl-bot-staging/google-cloud-service_usage-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-service_usage-v1/README.md b/owl-bot-staging/google-cloud-service_usage-v1/README.md deleted file mode 100644 index 391b55f8975b..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Service Usage V1 API - -Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use. - -Service Usage is an infrastructure service of Google Cloud that lets you list and manage other APIs and services in your Cloud projects. You can list and manage Google Cloud services and their APIs, as well as services created using Cloud Endpoints. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Service Usage V1 API. Most users should consider using -the main client gem, -[google-cloud-service_usage](https://rubygems.org/gems/google-cloud-service_usage). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-service_usage-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/serviceusage.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/service_usage/v1" - -client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new -request = ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new # (request fields as keyword arguments...) -response = client.enable_service request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_usage-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/service-usage/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/service_usage/v1" -require "logger" - -client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-service_usage`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-service_usage-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_usage`. -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_usage-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_usage-v1/Rakefile b/owl-bot-staging/google-cloud-service_usage-v1/Rakefile deleted file mode 100644 index aa26e213bd12..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-service_usage-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SERVICE_USAGE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SERVICE_USAGE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SERVICE_USAGE_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_USAGE_TEST_PROJECT=test123 SERVICE_USAGE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/service_usage/v1/service_usage/credentials" - ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SERVICE_USAGE_PROJECT"] = project - ENV["SERVICE_USAGE_TEST_PROJECT"] = project - ENV["SERVICE_USAGE_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_usage-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-service_usage-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-service_usage-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-service_usage-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-service_usage-v1" - header "google-cloud-service_usage-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-service_usage-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-service_usage-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-service_usage-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-service_usage-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-service_usage-v1/gapic_metadata.json deleted file mode 100644 index 343aa839bde6..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/gapic_metadata.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.api.serviceusage.v1", - "libraryPackage": "::Google::Cloud::ServiceUsage::V1", - "services": { - "ServiceUsage": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client", - "rpcs": { - "EnableService": { - "methods": [ - "enable_service" - ] - }, - "DisableService": { - "methods": [ - "disable_service" - ] - }, - "GetService": { - "methods": [ - "get_service" - ] - }, - "ListServices": { - "methods": [ - "list_services" - ] - }, - "BatchEnableServices": { - "methods": [ - "batch_enable_services" - ] - }, - "BatchGetServices": { - "methods": [ - "batch_get_services" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-service_usage-v1/google-cloud-service_usage-v1.gemspec b/owl-bot-staging/google-cloud-service_usage-v1/google-cloud-service_usage-v1.gemspec deleted file mode 100644 index 7a93057bd6ff..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/google-cloud-service_usage-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/service_usage/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-service_usage-v1" - gem.version = Google::Cloud::ServiceUsage::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Service Usage is an infrastructure service of Google Cloud that lets you list and manage other APIs and services in your Cloud projects. You can list and manage Google Cloud services and their APIs, as well as services created using Cloud Endpoints. Note that google-cloud-service_usage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-service_usage instead. See the readme for more details." - gem.summary = "Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google-cloud-service_usage-v1.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google-cloud-service_usage-v1.rb deleted file mode 100644 index 024e67974bb5..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google-cloud-service_usage-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/service_usage/v1" diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/resources_pb.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/resources_pb.rb deleted file mode 100644 index 9c7b8777ba6e..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/resources_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/serviceusage/v1/resources.proto - -require 'google/protobuf' - -require 'google/api/auth_pb' -require 'google/api/documentation_pb' -require 'google/api/endpoint_pb' -require 'google/api/monitored_resource_pb' -require 'google/api/monitoring_pb' -require 'google/api/quota_pb' -require 'google/api/resource_pb' -require 'google/api/usage_pb' -require 'google/protobuf/api_pb' - - -descriptor_data = "\n*google/api/serviceusage/v1/resources.proto\x12\x1agoogle.api.serviceusage.v1\x1a\x15google/api/auth.proto\x1a\x1egoogle/api/documentation.proto\x1a\x19google/api/endpoint.proto\x1a#google/api/monitored_resource.proto\x1a\x1bgoogle/api/monitoring.proto\x1a\x16google/api/quota.proto\x1a\x19google/api/resource.proto\x1a\x16google/api/usage.proto\x1a\x19google/protobuf/api.proto\"\xbd\x02\n\x07Service\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12\x39\n\x06\x63onfig\x18\x02 \x01(\x0b\x32).google.api.serviceusage.v1.ServiceConfig\x12\x30\n\x05state\x18\x04 \x01(\x0e\x32!.google.api.serviceusage.v1.State:\xa6\x01\xea\x41\xa2\x01\n#serviceusage.googleapis.com/Service\x12%projects/{project}/services/{service}\x12#folders/{folder}/services/{service}\x12/organizations/{organization}/services/{service}\"\x95\x03\n\rServiceConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\"\n\x04\x61pis\x18\x03 \x03(\x0b\x32\x14.google.protobuf.Api\x12\x30\n\rdocumentation\x18\x06 \x01(\x0b\x32\x19.google.api.Documentation\x12 \n\x05quota\x18\n \x01(\x0b\x32\x11.google.api.Quota\x12\x32\n\x0e\x61uthentication\x18\x0b \x01(\x0b\x32\x1a.google.api.Authentication\x12 \n\x05usage\x18\x0f \x01(\x0b\x32\x11.google.api.Usage\x12\'\n\tendpoints\x18\x12 \x03(\x0b\x32\x14.google.api.Endpoint\x12\x44\n\x13monitored_resources\x18\x19 \x03(\x0b\x32\'.google.api.MonitoredResourceDescriptor\x12*\n\nmonitoring\x18\x1c \x01(\x0b\x32\x16.google.api.Monitoring\"+\n\x11OperationMetadata\x12\x16\n\x0eresource_names\x18\x02 \x03(\t*9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x42\xd8\x01\n\x1e\x63om.google.api.serviceusage.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/serviceusage/apiv1/serviceusagepb;serviceusagepb\xaa\x02\x1cGoogle.Cloud.ServiceUsage.V1\xca\x02\x1cGoogle\\Cloud\\ServiceUsage\\V1\xea\x02\x1fGoogle::Cloud::ServiceUsage::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceUsage - module V1 - Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.Service").msgclass - ServiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.ServiceConfig").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.OperationMetadata").msgclass - State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_pb.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_pb.rb deleted file mode 100644 index 3a926161d952..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/api/serviceusage/v1/serviceusage.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/serviceusage/v1/resources_pb' -require 'google/longrunning/operations_pb' - - -descriptor_data = "\n-google/api/serviceusage/v1/serviceusage.proto\x12\x1agoogle.api.serviceusage.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a*google/api/serviceusage/v1/resources.proto\x1a#google/longrunning/operations.proto\"$\n\x14\x45nableServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"M\n\x15\x45nableServiceResponse\x12\x34\n\x07service\x18\x01 \x01(\x0b\x32#.google.api.serviceusage.v1.Service\"\x92\x02\n\x15\x44isableServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\"\n\x1a\x64isable_dependent_services\x18\x02 \x01(\x08\x12l\n\x1a\x63heck_if_service_has_usage\x18\x03 \x01(\x0e\x32H.google.api.serviceusage.v1.DisableServiceRequest.CheckIfServiceHasUsage\"Y\n\x16\x43heckIfServiceHasUsage\x12*\n&CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED\x10\x00\x12\x08\n\x04SKIP\x10\x01\x12\t\n\x05\x43HECK\x10\x02\"N\n\x16\x44isableServiceResponse\x12\x34\n\x07service\x18\x01 \x01(\x0b\x32#.google.api.serviceusage.v1.Service\"!\n\x11GetServiceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\\\n\x13ListServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"f\n\x14ListServicesResponse\x12\x35\n\x08services\x18\x01 \x03(\x0b\x32#.google.api.serviceusage.v1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"A\n\x1a\x42\x61tchEnableServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x13\n\x0bservice_ids\x18\x02 \x03(\t\"\xe9\x01\n\x1b\x42\x61tchEnableServicesResponse\x12\x35\n\x08services\x18\x01 \x03(\x0b\x32#.google.api.serviceusage.v1.Service\x12W\n\x08\x66\x61ilures\x18\x02 \x03(\x0b\x32\x45.google.api.serviceusage.v1.BatchEnableServicesResponse.EnableFailure\x1a:\n\rEnableFailure\x12\x12\n\nservice_id\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\"8\n\x17\x42\x61tchGetServicesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\r\n\x05names\x18\x02 \x03(\t\"Q\n\x18\x42\x61tchGetServicesResponse\x12\x35\n\x08services\x18\x01 \x03(\x0b\x32#.google.api.serviceusage.v1.Service2\xe8\t\n\x0cServiceUsage\x12\xba\x01\n\rEnableService\x12\x30.google.api.serviceusage.v1.EnableServiceRequest\x1a\x1d.google.longrunning.Operation\"X\xca\x41*\n\x15\x45nableServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02%\" /v1/{name=*/*/services/*}:enable:\x01*\x12\xbe\x01\n\x0e\x44isableService\x12\x31.google.api.serviceusage.v1.DisableServiceRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41+\n\x16\x44isableServiceResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02&\"!/v1/{name=*/*/services/*}:disable:\x01*\x12\x83\x01\n\nGetService\x12-.google.api.serviceusage.v1.GetServiceRequest\x1a#.google.api.serviceusage.v1.Service\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{name=*/*/services/*}\x12\x94\x01\n\x0cListServices\x12/.google.api.serviceusage.v1.ListServicesRequest\x1a\x30.google.api.serviceusage.v1.ListServicesResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{parent=*/*}/services\x12\xd1\x01\n\x13\x42\x61tchEnableServices\x12\x36.google.api.serviceusage.v1.BatchEnableServicesRequest\x1a\x1d.google.longrunning.Operation\"c\xca\x41\x30\n\x1b\x42\x61tchEnableServicesResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02*\"%/v1/{parent=*/*}/services:batchEnable:\x01*\x12\xa9\x01\n\x10\x42\x61tchGetServices\x12\x33.google.api.serviceusage.v1.BatchGetServicesRequest\x1a\x34.google.api.serviceusage.v1.BatchGetServicesResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/{parent=*/*}/services:batchGet\x1a\xbc\x01\xca\x41\x1bserviceusage.googleapis.com\xd2\x41\x9a\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/service.managementB\xdb\x01\n\x1e\x63om.google.api.serviceusage.v1B\x11ServiceUsageProtoP\x01ZDcloud.google.com/go/serviceusage/apiv1/serviceusagepb;serviceusagepb\xaa\x02\x1cGoogle.Cloud.ServiceUsage.V1\xca\x02\x1cGoogle\\Cloud\\ServiceUsage\\V1\xea\x02\x1fGoogle::Cloud::ServiceUsage::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ServiceUsage - module V1 - EnableServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.EnableServiceRequest").msgclass - EnableServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.EnableServiceResponse").msgclass - DisableServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.DisableServiceRequest").msgclass - DisableServiceRequest::CheckIfServiceHasUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.DisableServiceRequest.CheckIfServiceHasUsage").enummodule - DisableServiceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.DisableServiceResponse").msgclass - GetServiceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.GetServiceRequest").msgclass - ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.ListServicesRequest").msgclass - ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.ListServicesResponse").msgclass - BatchEnableServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.BatchEnableServicesRequest").msgclass - BatchEnableServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.BatchEnableServicesResponse").msgclass - BatchEnableServicesResponse::EnableFailure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.BatchEnableServicesResponse.EnableFailure").msgclass - BatchGetServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.BatchGetServicesRequest").msgclass - BatchGetServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.serviceusage.v1.BatchGetServicesResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb deleted file mode 100644 index 77a57299004d..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb +++ /dev/null @@ -1,80 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/api/serviceusage/v1/serviceusage.proto for package 'Google.Cloud.ServiceUsage.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/api/serviceusage/v1/serviceusage_pb' - -module Google - module Cloud - module ServiceUsage - module V1 - module ServiceUsage - # Enables services that service consumers want to use on Google Cloud Platform, - # lists the available or enabled services, or disables services that service - # consumers no longer use. - # - # See [Service Usage API](https://cloud.google.com/service-usage/docs/overview) - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.api.serviceusage.v1.ServiceUsage' - - # Enable a service so that it can be used with a project. - rpc :EnableService, ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest, ::Google::Longrunning::Operation - # Disable a service so that it can no longer be used with a project. - # This prevents unintended usage that may cause unexpected billing - # charges or security leaks. - # - # It is not valid to call the disable method on a service that is not - # currently enabled. Callers will receive a `FAILED_PRECONDITION` status if - # the target service is not currently enabled. - rpc :DisableService, ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest, ::Google::Longrunning::Operation - # Returns the service configuration and enabled state for a given service. - rpc :GetService, ::Google::Cloud::ServiceUsage::V1::GetServiceRequest, ::Google::Cloud::ServiceUsage::V1::Service - # List all services available to the specified project, and the current - # state of those services with respect to the project. The list includes - # all public services, all services for which the calling user has the - # `servicemanagement.services.bind` permission, and all services that have - # already been enabled on the project. The list can be filtered to - # only include services in a specific state, for example to only include - # services enabled on the project. - # - # WARNING: If you need to query enabled services frequently or across - # an organization, you should use - # [Cloud Asset Inventory - # API](https://cloud.google.com/asset-inventory/docs/apis), which provides - # higher throughput and richer filtering capability. - rpc :ListServices, ::Google::Cloud::ServiceUsage::V1::ListServicesRequest, ::Google::Cloud::ServiceUsage::V1::ListServicesResponse - # Enable multiple services on a project. The operation is atomic: if enabling - # any service fails, then the entire batch fails, and no state changes occur. - # To enable a single service, use the `EnableService` method instead. - rpc :BatchEnableServices, ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest, ::Google::Longrunning::Operation - # Returns the service configurations and enabled states for a given list of - # services. - rpc :BatchGetServices, ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest, ::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.rb deleted file mode 100644 index 6574d05185b2..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/service_usage/v1/service_usage" -require "google/cloud/service_usage/v1/version" - -module Google - module Cloud - module ServiceUsage - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/service_usage/v1" - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/service_usage/v1" - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/service_usage/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/rest.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/rest.rb deleted file mode 100644 index 30771378b1cd..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/service_usage/v1/service_usage/rest" -require "google/cloud/service_usage/v1/version" - -module Google - module Cloud - module ServiceUsage - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/service_usage/v1/rest" - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.rb deleted file mode 100644 index 47ad7fc9b613..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_usage/v1/version" - -require "google/cloud/service_usage/v1/service_usage/credentials" -require "google/cloud/service_usage/v1/service_usage/operations" -require "google/cloud/service_usage/v1/service_usage/client" -require "google/cloud/service_usage/v1/service_usage/rest" - -module Google - module Cloud - module ServiceUsage - module V1 - ## - # Enables services that service consumers want to use on Google Cloud Platform, - # lists the available or enabled services, or disables services that service - # consumers no longer use. - # - # See [Service Usage API](https://cloud.google.com/service-usage/docs/overview) - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/service_usage/v1/service_usage" - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/service_usage/v1/service_usage/rest" - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new - # - module ServiceUsage - end - end - end - end -end - -helper_path = ::File.join __dir__, "service_usage", "helpers.rb" -require "google/cloud/service_usage/v1/service_usage/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.rb deleted file mode 100644 index 4230f5ca16e7..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/client.rb +++ /dev/null @@ -1,1077 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/api/serviceusage/v1/serviceusage_pb" - -module Google - module Cloud - module ServiceUsage - module V1 - module ServiceUsage - ## - # Client for the ServiceUsage service. - # - # Enables services that service consumers want to use on Google Cloud Platform, - # lists the available or enabled services, or disables services that service - # consumers no longer use. - # - # See [Service Usage API](https://cloud.google.com/service-usage/docs/overview) - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "serviceusage.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :service_usage_stub - - ## - # Configure the ServiceUsage Client class. - # - # See {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ServiceUsage clients - # ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceUsage", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceUsage Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @service_usage_stub.universe_domain - end - - ## - # Create a new ServiceUsage client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ServiceUsage client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/api/serviceusage/v1/serviceusage_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @service_usage_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @service_usage_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @service_usage_stub.logger - end - - # Service calls - - ## - # Enable a service so that it can be used with a project. - # - # @overload enable_service(request, options = nil) - # Pass arguments to `enable_service` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::EnableServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::EnableServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enable_service(name: nil) - # Pass arguments to `enable_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the consumer and service to enable the service on. - # - # The `EnableService` and `DisableService` methods currently only support - # projects. - # - # Enabling a service requires that the service is public or is shared with - # the user enabling the service. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new - # - # # Call the enable_service method. - # result = client.enable_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def enable_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enable_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.enable_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.call_rpc :enable_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable a service so that it can no longer be used with a project. - # This prevents unintended usage that may cause unexpected billing - # charges or security leaks. - # - # It is not valid to call the disable method on a service that is not - # currently enabled. Callers will receive a `FAILED_PRECONDITION` status if - # the target service is not currently enabled. - # - # @overload disable_service(request, options = nil) - # Pass arguments to `disable_service` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::DisableServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload disable_service(name: nil, disable_dependent_services: nil, check_if_service_has_usage: nil) - # Pass arguments to `disable_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the consumer and service to disable the service on. - # - # The enable and disable methods currently only support projects. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - # @param disable_dependent_services [::Boolean] - # Indicates if services that are enabled and which depend on this service - # should also be disabled. If not set, an error will be generated if any - # enabled services depend on the service to be disabled. When set, the - # service, and any enabled services that depend on it, will be disabled - # together. - # @param check_if_service_has_usage [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest::CheckIfServiceHasUsage] - # Defines the behavior for checking service usage when disabling a service. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new - # - # # Call the disable_service method. - # result = client.disable_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def disable_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.disable_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.disable_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.call_rpc :disable_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the service configuration and enabled state for a given service. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service(name: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the consumer and service to get the `ConsumerState` for. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceUsage::V1::Service] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceUsage::V1::Service] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::ServiceUsage::V1::Service. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.call_rpc :get_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all services available to the specified project, and the current - # state of those services with respect to the project. The list includes - # all public services, all services for which the calling user has the - # `servicemanagement.services.bind` permission, and all services that have - # already been enabled on the project. The list can be filtered to - # only include services in a specific state, for example to only include - # services enabled on the project. - # - # WARNING: If you need to query enabled services frequently or across - # an organization, you should use - # [Cloud Asset Inventory - # API](https://cloud.google.com/asset-inventory/docs/apis), which provides - # higher throughput and richer filtering capability. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent to search for services on. - # - # An example name would be: - # `projects/123` where `123` is the project number. - # @param page_size [::Integer] - # Requested size of the next page of data. - # Requested page size cannot exceed 200. - # If not set, the default page size is 50. - # @param page_token [::String] - # Token identifying which result to start with, which is returned by a - # previous list call. - # @param filter [::String] - # Only list services that conform to the given filter. - # The allowed filter strings are `state:ENABLED` and `state:DISABLED`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ServiceUsage::V1::Service>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ServiceUsage::V1::Service>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceUsage::V1::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.call_rpc :list_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @service_usage_stub, :list_services, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable multiple services on a project. The operation is atomic: if enabling - # any service fails, then the entire batch fails, and no state changes occur. - # To enable a single service, use the `EnableService` method instead. - # - # @overload batch_enable_services(request, options = nil) - # Pass arguments to `batch_enable_services` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_enable_services(parent: nil, service_ids: nil) - # Pass arguments to `batch_enable_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent to enable services on. - # - # An example name would be: - # `projects/123` where `123` is the project number. - # - # The `BatchEnableServices` method currently only supports projects. - # @param service_ids [::Array<::String>] - # The identifiers of the services to enable on the project. - # - # A valid identifier would be: - # serviceusage.googleapis.com - # - # Enabling services requires that each service is public or is shared with - # the user enabling the service. - # - # A single request can enable a maximum of 20 services at a time. If more - # than 20 services are specified, the request will fail, and no state changes - # will occur. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new - # - # # Call the batch_enable_services method. - # result = client.batch_enable_services request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_enable_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_enable_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_enable_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_enable_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.call_rpc :batch_enable_services, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the service configurations and enabled states for a given list of - # services. - # - # @overload batch_get_services(request, options = nil) - # Pass arguments to `batch_get_services` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_get_services(parent: nil, names: nil) - # Pass arguments to `batch_get_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent to retrieve services from. - # If this is set, the parent of all of the services specified in `names` must - # match this field. An example name would be: `projects/123` where `123` is - # the project number. The `BatchGetServices` method currently only supports - # projects. - # @param names [::Array<::String>] - # Names of the services to retrieve. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - # A single request can get a maximum of 30 services at a time. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new - # - # # Call the batch_get_services method. - # result = client.batch_get_services request - # - # # The returned object is of type Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse. - # p result - # - def batch_get_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_get_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_get_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_get_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.call_rpc :batch_get_services, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ServiceUsage API. - # - # This class represents the configuration for ServiceUsage, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # enable_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.enable_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.enable_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "serviceusage.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ServiceUsage API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `enable_service` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_service - ## - # RPC-specific configuration for `disable_service` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_service - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `batch_enable_services` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_enable_services - ## - # RPC-specific configuration for `batch_get_services` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_services - - # @private - def initialize parent_rpcs = nil - enable_service_config = parent_rpcs.enable_service if parent_rpcs.respond_to? :enable_service - @enable_service = ::Gapic::Config::Method.new enable_service_config - disable_service_config = parent_rpcs.disable_service if parent_rpcs.respond_to? :disable_service - @disable_service = ::Gapic::Config::Method.new disable_service_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - batch_enable_services_config = parent_rpcs.batch_enable_services if parent_rpcs.respond_to? :batch_enable_services - @batch_enable_services = ::Gapic::Config::Method.new batch_enable_services_config - batch_get_services_config = parent_rpcs.batch_get_services if parent_rpcs.respond_to? :batch_get_services - @batch_get_services = ::Gapic::Config::Method.new batch_get_services_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.rb deleted file mode 100644 index d29b072c389d..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/credentials.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ServiceUsage - module V1 - module ServiceUsage - # Credentials for the ServiceUsage API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management" - ] - self.env_vars = [ - "SERVICE_USAGE_CREDENTIALS", - "SERVICE_USAGE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SERVICE_USAGE_CREDENTIALS_JSON", - "SERVICE_USAGE_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.rb deleted file mode 100644 index 3dddbf825634..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/operations.rb +++ /dev/null @@ -1,835 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module ServiceUsage - module V1 - module ServiceUsage - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "serviceusage.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ServiceUsage Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceUsage Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "serviceusage.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.rb deleted file mode 100644 index 33ff36f88f2c..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/service_usage/v1/version" - -require "google/cloud/service_usage/v1/service_usage/credentials" -require "google/cloud/service_usage/v1/service_usage/rest/operations" -require "google/cloud/service_usage/v1/service_usage/rest/client" - -module Google - module Cloud - module ServiceUsage - module V1 - ## - # Enables services that service consumers want to use on Google Cloud Platform, - # lists the available or enabled services, or disables services that service - # consumers no longer use. - # - # See [Service Usage API](https://cloud.google.com/service-usage/docs/overview) - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/service_usage/v1/service_usage/rest" - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new - # - module ServiceUsage - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/service_usage/v1/service_usage/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.rb deleted file mode 100644 index c6bf1ad93ac0..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/client.rb +++ /dev/null @@ -1,992 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/api/serviceusage/v1/serviceusage_pb" -require "google/cloud/service_usage/v1/service_usage/rest/service_stub" - -module Google - module Cloud - module ServiceUsage - module V1 - module ServiceUsage - module Rest - ## - # REST client for the ServiceUsage service. - # - # Enables services that service consumers want to use on Google Cloud Platform, - # lists the available or enabled services, or disables services that service - # consumers no longer use. - # - # See [Service Usage API](https://cloud.google.com/service-usage/docs/overview) - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "serviceusage.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :service_usage_stub - - ## - # Configure the ServiceUsage Client class. - # - # See {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ServiceUsage clients - # ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ServiceUsage", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceUsage Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @service_usage_stub.universe_domain - end - - ## - # Create a new ServiceUsage REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ServiceUsage client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @service_usage_stub = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @service_usage_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @service_usage_stub.logger - end - - # Service calls - - ## - # Enable a service so that it can be used with a project. - # - # @overload enable_service(request, options = nil) - # Pass arguments to `enable_service` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::EnableServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::EnableServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enable_service(name: nil) - # Pass arguments to `enable_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the consumer and service to enable the service on. - # - # The `EnableService` and `DisableService` methods currently only support - # projects. - # - # Enabling a service requires that the service is public or is shared with - # the user enabling the service. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new - # - # # Call the enable_service method. - # result = client.enable_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def enable_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enable_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.enable_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.enable_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Disable a service so that it can no longer be used with a project. - # This prevents unintended usage that may cause unexpected billing - # charges or security leaks. - # - # It is not valid to call the disable method on a service that is not - # currently enabled. Callers will receive a `FAILED_PRECONDITION` status if - # the target service is not currently enabled. - # - # @overload disable_service(request, options = nil) - # Pass arguments to `disable_service` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::DisableServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload disable_service(name: nil, disable_dependent_services: nil, check_if_service_has_usage: nil) - # Pass arguments to `disable_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the consumer and service to disable the service on. - # - # The enable and disable methods currently only support projects. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - # @param disable_dependent_services [::Boolean] - # Indicates if services that are enabled and which depend on this service - # should also be disabled. If not set, an error will be generated if any - # enabled services depend on the service to be disabled. When set, the - # service, and any enabled services that depend on it, will be disabled - # together. - # @param check_if_service_has_usage [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest::CheckIfServiceHasUsage] - # Defines the behavior for checking service usage when disabling a service. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new - # - # # Call the disable_service method. - # result = client.disable_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def disable_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.disable_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.disable_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.disable_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the service configuration and enabled state for a given service. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service(name: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the consumer and service to get the `ConsumerState` for. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceUsage::V1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceUsage::V1::Service] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::ServiceUsage::V1::Service. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.get_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all services available to the specified project, and the current - # state of those services with respect to the project. The list includes - # all public services, all services for which the calling user has the - # `servicemanagement.services.bind` permission, and all services that have - # already been enabled on the project. The list can be filtered to - # only include services in a specific state, for example to only include - # services enabled on the project. - # - # WARNING: If you need to query enabled services frequently or across - # an organization, you should use - # [Cloud Asset Inventory - # API](https://cloud.google.com/asset-inventory/docs/apis), which provides - # higher throughput and richer filtering capability. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_services(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent to search for services on. - # - # An example name would be: - # `projects/123` where `123` is the project number. - # @param page_size [::Integer] - # Requested size of the next page of data. - # Requested page size cannot exceed 200. - # If not set, the default page size is 50. - # @param page_token [::String] - # Token identifying which result to start with, which is returned by a - # previous list call. - # @param filter [::String] - # Only list services that conform to the given filter. - # The allowed filter strings are `state:ENABLED` and `state:DISABLED`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceUsage::V1::Service>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ServiceUsage::V1::Service>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ServiceUsage::V1::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.list_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @service_usage_stub, :list_services, "services", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Enable multiple services on a project. The operation is atomic: if enabling - # any service fails, then the entire batch fails, and no state changes occur. - # To enable a single service, use the `EnableService` method instead. - # - # @overload batch_enable_services(request, options = nil) - # Pass arguments to `batch_enable_services` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_enable_services(parent: nil, service_ids: nil) - # Pass arguments to `batch_enable_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent to enable services on. - # - # An example name would be: - # `projects/123` where `123` is the project number. - # - # The `BatchEnableServices` method currently only supports projects. - # @param service_ids [::Array<::String>] - # The identifiers of the services to enable on the project. - # - # A valid identifier would be: - # serviceusage.googleapis.com - # - # Enabling services requires that each service is public or is shared with - # the user enabling the service. - # - # A single request can enable a maximum of 20 services at a time. If more - # than 20 services are specified, the request will fail, and no state changes - # will occur. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new - # - # # Call the batch_enable_services method. - # result = client.batch_enable_services request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_enable_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_enable_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_enable_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_enable_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.batch_enable_services request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the service configurations and enabled states for a given list of - # services. - # - # @overload batch_get_services(request, options = nil) - # Pass arguments to `batch_get_services` via a request object, either of type - # {::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_get_services(parent: nil, names: nil) - # Pass arguments to `batch_get_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Parent to retrieve services from. - # If this is set, the parent of all of the services specified in `names` must - # match this field. An example name would be: `projects/123` where `123` is - # the project number. The `BatchGetServices` method currently only supports - # projects. - # @param names [::Array<::String>] - # Names of the services to retrieve. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - # A single request can get a maximum of 30 services at a time. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/service_usage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new - # - # # Call the batch_get_services method. - # result = client.batch_get_services request - # - # # The returned object is of type Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse. - # p result - # - def batch_get_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_get_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_get_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_get_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @service_usage_stub.batch_get_services request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ServiceUsage REST API. - # - # This class represents the configuration for ServiceUsage REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # enable_service to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.enable_service.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.enable_service.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "serviceusage.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the ServiceUsage API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `enable_service` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_service - ## - # RPC-specific configuration for `disable_service` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_service - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `batch_enable_services` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_enable_services - ## - # RPC-specific configuration for `batch_get_services` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_services - - # @private - def initialize parent_rpcs = nil - enable_service_config = parent_rpcs.enable_service if parent_rpcs.respond_to? :enable_service - @enable_service = ::Gapic::Config::Method.new enable_service_config - disable_service_config = parent_rpcs.disable_service if parent_rpcs.respond_to? :disable_service - @disable_service = ::Gapic::Config::Method.new disable_service_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - batch_enable_services_config = parent_rpcs.batch_enable_services if parent_rpcs.respond_to? :batch_enable_services - @batch_enable_services = ::Gapic::Config::Method.new batch_enable_services_config - batch_get_services_config = parent_rpcs.batch_get_services if parent_rpcs.respond_to? :batch_get_services - @batch_get_services = ::Gapic::Config::Method.new batch_get_services_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.rb deleted file mode 100644 index e634e343da18..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module ServiceUsage - module V1 - module ServiceUsage - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "serviceusage.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the ServiceUsage Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the ServiceUsage Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ServiceUsage::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "serviceusage.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/operations", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.rb deleted file mode 100644 index c4a05bd4b705..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/service_usage/rest/service_stub.rb +++ /dev/null @@ -1,450 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/api/serviceusage/v1/serviceusage_pb" - -module Google - module Cloud - module ServiceUsage - module V1 - module ServiceUsage - module Rest - ## - # REST service stub for the ServiceUsage service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the enable_service REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::EnableServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def enable_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enable_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the disable_service REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def disable_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "disable_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::GetServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceUsage::V1::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceUsage::V1::Service] - # A result object deserialized from the server's reply - def get_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceUsage::V1::Service.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_services REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceUsage::V1::ListServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceUsage::V1::ListServicesResponse] - # A result object deserialized from the server's reply - def list_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceUsage::V1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_enable_services REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def batch_enable_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_enable_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_enable_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_get_services REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse] - # A result object deserialized from the server's reply - def batch_get_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_get_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_service REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::EnableServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enable_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:enable", - body: "*", - matches: [ - ["name", %r{^[^/]+/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_service REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_disable_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:disable", - body: "*", - matches: [ - ["name", %r{^[^/]+/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::GetServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^[^/]+/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_services REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/services", - matches: [ - ["parent", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_enable_services REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_enable_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/services:batchEnable", - body: "*", - matches: [ - ["parent", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_get_services REST call - # - # @param request_pb [::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_get_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/services:batchGet", - matches: [ - ["parent", %r{^[^/]+/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/version.rb b/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/version.rb deleted file mode 100644 index 6a3e3ab95ccd..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/lib/google/cloud/service_usage/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceUsage - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/README.md deleted file mode 100644 index a60825fd97db..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Service Usage V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/auth.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/auth.rb deleted file mode 100644 index c71d3c7421d7..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/auth.rb +++ /dev/null @@ -1,259 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # `Authentication` defines the authentication configuration for API methods - # provided by an API service. - # - # Example: - # - # name: calendar.googleapis.com - # authentication: - # providers: - # - id: google_calendar_auth - # jwks_uri: https://www.googleapis.com/oauth2/v1/certs - # issuer: https://securetoken.google.com - # rules: - # - selector: "*" - # requirements: - # provider_id: google_calendar_auth - # - selector: google.calendar.Delegate - # oauth: - # canonical_scopes: https://www.googleapis.com/auth/calendar.read - # @!attribute [rw] rules - # @return [::Array<::Google::Api::AuthenticationRule>] - # A list of authentication rules that apply to individual API methods. - # - # **NOTE:** All service configuration rules follow "last one wins" order. - # @!attribute [rw] providers - # @return [::Array<::Google::Api::AuthProvider>] - # Defines a set of authentication providers that a service supports. - class Authentication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Authentication rules for the service. - # - # By default, if a method has any authentication requirements, every request - # must include a valid credential matching one of the requirements. - # It's an error to include more than one kind of credential in a single - # request. - # - # If a method doesn't have any auth requirements, request credentials will be - # ignored. - # @!attribute [rw] selector - # @return [::String] - # Selects the methods to which this rule applies. - # - # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax - # details. - # @!attribute [rw] oauth - # @return [::Google::Api::OAuthRequirements] - # The requirements for OAuth credentials. - # @!attribute [rw] allow_without_credential - # @return [::Boolean] - # If true, the service accepts API keys without any other credential. - # This flag only applies to HTTP and gRPC requests. - # @!attribute [rw] requirements - # @return [::Array<::Google::Api::AuthRequirement>] - # Requirements for additional authentication providers. - class AuthenticationRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a location to extract JWT from an API request. - # @!attribute [rw] header - # @return [::String] - # Specifies HTTP header name to extract JWT token. - # - # Note: The following fields are mutually exclusive: `header`, `query`, `cookie`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] query - # @return [::String] - # Specifies URL query parameter name to extract JWT token. - # - # Note: The following fields are mutually exclusive: `query`, `header`, `cookie`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cookie - # @return [::String] - # Specifies cookie name to extract JWT token. - # - # Note: The following fields are mutually exclusive: `cookie`, `header`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] value_prefix - # @return [::String] - # The value prefix. The value format is "value_prefix\\{token}" - # Only applies to "in" header type. Must be empty for "in" query type. - # If not empty, the header value has to match (case sensitive) this prefix. - # If not matched, JWT will not be extracted. If matched, JWT will be - # extracted after the prefix is removed. - # - # For example, for "Authorization: Bearer \\{JWT}", - # value_prefix="Bearer " with a space at the end. - class JwtLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for an authentication provider, including support for - # [JSON Web Token - # (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). - # @!attribute [rw] id - # @return [::String] - # The unique identifier of the auth provider. It will be referred to by - # `AuthRequirement.provider_id`. - # - # Example: "bookstore_auth". - # @!attribute [rw] issuer - # @return [::String] - # Identifies the principal that issued the JWT. See - # https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 - # Usually a URL or an email address. - # - # Example: https://securetoken.google.com - # Example: 1234567-compute@developer.gserviceaccount.com - # @!attribute [rw] jwks_uri - # @return [::String] - # URL of the provider's public key set to validate signature of the JWT. See - # [OpenID - # Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). - # Optional if the key set document: - # - can be retrieved from - # [OpenID - # Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) - # of the issuer. - # - can be inferred from the email domain of the issuer (e.g. a Google - # service account). - # - # Example: https://www.googleapis.com/oauth2/v1/certs - # @!attribute [rw] audiences - # @return [::String] - # The list of JWT - # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). - # that are allowed to access. A JWT containing any of these audiences will - # be accepted. When this setting is absent, JWTs with audiences: - # - "https://[service.name]/[google.protobuf.Api.name]" - # - "https://[service.name]/" - # will be accepted. - # For example, if no audiences are in the setting, LibraryService API will - # accept JWTs with the following audiences: - # - - # https://library-example.googleapis.com/google.example.library.v1.LibraryService - # - https://library-example.googleapis.com/ - # - # Example: - # - # audiences: bookstore_android.apps.googleusercontent.com, - # bookstore_web.apps.googleusercontent.com - # @!attribute [rw] authorization_url - # @return [::String] - # Redirect URL if JWT token is required but not present or is expired. - # Implement authorizationUrl of securityDefinitions in OpenAPI spec. - # @!attribute [rw] jwt_locations - # @return [::Array<::Google::Api::JwtLocation>] - # Defines the locations to extract the JWT. For now it is only used by the - # Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] - # (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) - # - # JWT locations can be one of HTTP headers, URL query parameters or - # cookies. The rule is that the first match wins. - # - # If not specified, default to use following 3 locations: - # 1) Authorization: Bearer - # 2) x-goog-iap-jwt-assertion - # 3) access_token query parameter - # - # Default locations can be specified as followings: - # jwt_locations: - # - header: Authorization - # value_prefix: "Bearer " - # - header: x-goog-iap-jwt-assertion - # - query: access_token - class AuthProvider - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # OAuth scopes are a way to define data and permissions on data. For example, - # there are scopes defined for "Read-only access to Google Calendar" and - # "Access to Cloud Platform". Users can consent to a scope for an application, - # giving it permission to access that data on their behalf. - # - # OAuth scope specifications should be fairly coarse grained; a user will need - # to see and understand the text description of what your scope means. - # - # In most cases: use one or at most two OAuth scopes for an entire family of - # products. If your product has multiple APIs, you should probably be sharing - # the OAuth scope across all of those APIs. - # - # When you need finer grained OAuth consent screens: talk with your product - # management about how developers will use them in practice. - # - # Please note that even though each of the canonical scopes is enough for a - # request to be accepted and passed to the backend, a request can still fail - # due to the backend requiring additional scopes or permissions. - # @!attribute [rw] canonical_scopes - # @return [::String] - # The list of publicly documented OAuth scopes that are allowed access. An - # OAuth token containing any of these scopes will be accepted. - # - # - # Example: - # - # canonical_scopes: https://www.googleapis.com/auth/calendar, - # https://www.googleapis.com/auth/calendar.read - class OAuthRequirements - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # User-defined authentication requirements, including support for - # [JSON Web Token - # (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). - # @!attribute [rw] provider_id - # @return [::String] - # {::Google::Api::AuthProvider#id id} from authentication provider. - # - # Example: - # - # provider_id: bookstore_auth - # @!attribute [rw] audiences - # @return [::String] - # NOTE: This will be deprecated soon, once AuthProvider.audiences is - # implemented and accepted in all the runtime components. - # - # The list of JWT - # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). - # that are allowed to access. A JWT containing any of these audiences will - # be accepted. When this setting is absent, only JWTs with audience - # "https://[Service_name][google.api.Service.name]/{::Google::Protobuf::Api#name API_name}" - # will be accepted. For example, if no audiences are in the setting, - # LibraryService API will only accept JWTs with the following audience - # "https://library-example.googleapis.com/google.example.library.v1.LibraryService". - # - # Example: - # - # audiences: bookstore_android.apps.googleusercontent.com, - # bookstore_web.apps.googleusercontent.com - class AuthRequirement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/documentation.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/documentation.rb deleted file mode 100644 index ccefcdf22809..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/documentation.rb +++ /dev/null @@ -1,176 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # `Documentation` provides the information for describing a service. - # - # Example: - #
documentation:
-    #   summary: >
-    #     The Google Calendar API gives access
-    #     to most calendar features.
-    #   pages:
-    #   - name: Overview
-    #     content: (== include google/foo/overview.md ==)
-    #   - name: Tutorial
-    #     content: (== include google/foo/tutorial.md ==)
-    #     subpages:
-    #     - name: Java
-    #       content: (== include google/foo/tutorial_java.md ==)
-    #   rules:
-    #   - selector: google.calendar.Calendar.Get
-    #     description: >
-    #       ...
-    #   - selector: google.calendar.Calendar.Put
-    #     description: >
-    #       ...
-    # 
- # Documentation is provided in markdown syntax. In addition to - # standard markdown features, definition lists, tables and fenced - # code blocks are supported. Section headers can be provided and are - # interpreted relative to the section nesting of the context where - # a documentation fragment is embedded. - # - # Documentation from the IDL is merged with documentation defined - # via the config at normalization time, where documentation provided - # by config rules overrides IDL provided. - # - # A number of constructs specific to the API platform are supported - # in documentation text. - # - # In order to reference a proto element, the following - # notation can be used: - #
[fully.qualified.proto.name][]
- # To override the display text used for the link, this can be used: - #
[display text][fully.qualified.proto.name]
- # Text can be excluded from doc using the following notation: - #
(-- internal comment --)
- # - # A few directives are available in documentation. Note that - # directives must appear on a single line to be properly - # identified. The `include` directive includes a markdown file from - # an external source: - #
(== include path/to/file ==)
- # The `resource_for` directive marks a message to be the resource of - # a collection in REST view. If it is not specified, tools attempt - # to infer the resource from the operations in a collection: - #
(== resource_for v1.shelves.books ==)
- # The directive `suppress_warning` does not directly affect documentation - # and is documented together with service config validation. - # @!attribute [rw] summary - # @return [::String] - # A short description of what the service does. The summary must be plain - # text. It becomes the overview of the service displayed in Google Cloud - # Console. - # NOTE: This field is equivalent to the standard field `description`. - # @!attribute [rw] pages - # @return [::Array<::Google::Api::Page>] - # The top level pages for the documentation set. - # @!attribute [rw] rules - # @return [::Array<::Google::Api::DocumentationRule>] - # A list of documentation rules that apply to individual API elements. - # - # **NOTE:** All service configuration rules follow "last one wins" order. - # @!attribute [rw] documentation_root_url - # @return [::String] - # The URL to the root of documentation. - # @!attribute [rw] service_root_url - # @return [::String] - # Specifies the service root url if the default one (the service name - # from the yaml file) is not suitable. This can be seen in any fully - # specified service urls as well as sections that show a base that other - # urls are relative to. - # @!attribute [rw] overview - # @return [::String] - # Declares a single overview page. For example: - #
documentation:
-    #       summary: ...
-    #       overview: (== include overview.md ==)
-    #     
- # This is a shortcut for the following declaration (using pages style): - #
documentation:
-    #       summary: ...
-    #       pages:
-    #       - name: Overview
-    #         content: (== include overview.md ==)
-    #     
- # Note: you cannot specify both `overview` field and `pages` field. - class Documentation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A documentation rule provides information about individual API elements. - # @!attribute [rw] selector - # @return [::String] - # The selector is a comma-separated list of patterns for any element such as - # a method, a field, an enum value. Each pattern is a qualified name of the - # element which may end in "*", indicating a wildcard. Wildcards are only - # allowed at the end and for a whole component of the qualified name, - # i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match - # one or more components. To specify a default for all applicable elements, - # the whole pattern "*" is used. - # @!attribute [rw] description - # @return [::String] - # Description of the selected proto element (e.g. a message, a method, a - # 'service' definition, or a field). Defaults to leading & trailing comments - # taken from the proto source definition of the proto element. - # @!attribute [rw] deprecation_description - # @return [::String] - # Deprecation description of the selected element(s). It can be provided if - # an element is marked as `deprecated`. - class DocumentationRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a documentation page. A page can contain subpages to represent - # nested documentation set structure. - # @!attribute [rw] name - # @return [::String] - # The name of the page. It will be used as an identity of the page to - # generate URI of the page, text of the link to this page in navigation, - # etc. The full page name (start from the root page name to this page - # concatenated with `.`) can be used as reference to the page in your - # documentation. For example: - #
pages:
-    #     - name: Tutorial
-    #       content: (== include tutorial.md ==)
-    #       subpages:
-    #       - name: Java
-    #         content: (== include tutorial_java.md ==)
-    #     
- # You can reference `Java` page using Markdown reference link syntax: - # `[Java][Tutorial.Java]`. - # @!attribute [rw] content - # @return [::String] - # The Markdown content of the page. You can use ```(== include {path} - # ==)``` to include content from a Markdown file. The content can be used - # to produce the documentation page such as HTML format page. - # @!attribute [rw] subpages - # @return [::Array<::Google::Api::Page>] - # Subpages of this page. The order of subpages specified here will be - # honored in the generated docset. - class Page - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/endpoint.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/endpoint.rb deleted file mode 100644 index 57d040a793ab..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/endpoint.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # `Endpoint` describes a network address of a service that serves a set of - # APIs. It is commonly known as a service endpoint. A service may expose - # any number of service endpoints, and all service endpoints share the same - # service definition, such as quota limits and monitoring metrics. - # - # Example: - # - # type: google.api.Service - # name: library-example.googleapis.com - # endpoints: - # # Declares network address `https://library-example.googleapis.com` - # # for service `library-example.googleapis.com`. The `https` scheme - # # is implicit for all service endpoints. Other schemes may be - # # supported in the future. - # - name: library-example.googleapis.com - # allow_cors: false - # - name: content-staging-library-example.googleapis.com - # # Allows HTTP OPTIONS calls to be passed to the API frontend, for it - # # to decide whether the subsequent cross-origin request is allowed - # # to proceed. - # allow_cors: true - # @!attribute [rw] name - # @return [::String] - # The canonical name of this endpoint. - # @!attribute [rw] aliases - # @return [::Array<::String>] - # Aliases for this endpoint, these will be served by the same UrlMap as the - # parent endpoint, and will be provisioned in the GCP stack for the Regional - # Endpoints. - # @!attribute [rw] target - # @return [::String] - # The specification of an Internet routable address of API frontend that will - # handle requests to this [API - # Endpoint](https://cloud.google.com/apis/design/glossary). It should be - # either a valid IPv4 address or a fully-qualified domain name. For example, - # "8.8.8.8" or "myservice.appspot.com". - # @!attribute [rw] allow_cors - # @return [::Boolean] - # Allowing - # [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka - # cross-domain traffic, would allow the backends served from this endpoint to - # receive and respond to HTTP OPTIONS requests. The response will be used by - # the browser to determine whether the subsequent cross-origin request is - # allowed to proceed. - class Endpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/label.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/label.rb deleted file mode 100644 index 02d2f8d451f9..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/label.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A description of a label. - # @!attribute [rw] key - # @return [::String] - # The label key. - # @!attribute [rw] value_type - # @return [::Google::Api::LabelDescriptor::ValueType] - # The type of data that can be assigned to the label. - # @!attribute [rw] description - # @return [::String] - # A human-readable description for the label. - class LabelDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Value types that can be used as label values. - module ValueType - # A variable-length string. This is the default. - STRING = 0 - - # Boolean; true or false. - BOOL = 1 - - # A 64-bit signed integer. - INT64 = 2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitored_resource.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitored_resource.rb deleted file mode 100644 index 4d1ec410ddac..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitored_resource.rb +++ /dev/null @@ -1,150 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An object that describes the schema of a - # {::Google::Api::MonitoredResource MonitoredResource} object using a type name - # and a set of labels. For example, the monitored resource descriptor for - # Google Compute Engine VM instances has a type of - # `"gce_instance"` and specifies the use of the labels `"instance_id"` and - # `"zone"` to identify particular VM instances. - # - # Different APIs can support different monitored resource types. APIs generally - # provide a `list` method that returns the monitored resource descriptors used - # by the API. - # @!attribute [rw] name - # @return [::String] - # Optional. The resource name of the monitored resource descriptor: - # `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where - # \\{type} is the value of the `type` field in this object and - # \\{project_id} is a project ID that provides API-specific context for - # accessing the type. APIs that do not use project information can use the - # resource name format `"monitoredResourceDescriptors/{type}"`. - # @!attribute [rw] type - # @return [::String] - # Required. The monitored resource type. For example, the type - # `"cloudsql_database"` represents databases in Google Cloud SQL. - # For a list of types, see [Monitored resource - # types](https://cloud.google.com/monitoring/api/resources) - # and [Logging resource - # types](https://cloud.google.com/logging/docs/api/v2/resource-list). - # @!attribute [rw] display_name - # @return [::String] - # Optional. A concise name for the monitored resource type that might be - # displayed in user interfaces. It should be a Title Cased Noun Phrase, - # without any article or other determiners. For example, - # `"Google Cloud SQL Database"`. - # @!attribute [rw] description - # @return [::String] - # Optional. A detailed description of the monitored resource type that might - # be used in documentation. - # @!attribute [rw] labels - # @return [::Array<::Google::Api::LabelDescriptor>] - # Required. A set of labels used to describe instances of this monitored - # resource type. For example, an individual Google Cloud SQL database is - # identified by values for the labels `"database_id"` and `"zone"`. - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Optional. The launch stage of the monitored resource definition. - class MonitoredResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The `type` field identifies a - # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} object - # that describes the resource's schema. Information in the `labels` field - # identifies the actual resource and its attributes according to the schema. - # For example, a particular Compute Engine VM instance could be represented by - # the following object, because the - # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} for - # `"gce_instance"` has labels - # `"project_id"`, `"instance_id"` and `"zone"`: - # - # { "type": "gce_instance", - # "labels": { "project_id": "my-project", - # "instance_id": "12345678901234", - # "zone": "us-central1-a" }} - # @!attribute [rw] type - # @return [::String] - # Required. The monitored resource type. This field must match - # the `type` field of a - # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} - # object. For example, the type of a Compute Engine VM instance is - # `gce_instance`. Some descriptors include the service name in the type; for - # example, the type of a Datastream stream is - # `datastream.googleapis.com/Stream`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Required. Values for all of the labels listed in the associated monitored - # resource descriptor. For example, Compute Engine VM instances use the - # labels `"project_id"`, `"instance_id"`, and `"zone"`. - class MonitoredResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Auxiliary metadata for a {::Google::Api::MonitoredResource MonitoredResource} - # object. {::Google::Api::MonitoredResource MonitoredResource} objects contain the - # minimum set of information to uniquely identify a monitored resource - # instance. There is some other useful auxiliary metadata. Monitoring and - # Logging use an ingestion pipeline to extract metadata for cloud resources of - # all types, and store the metadata in this message. - # @!attribute [rw] system_labels - # @return [::Google::Protobuf::Struct] - # Output only. Values for predefined system metadata labels. - # System labels are a kind of metadata extracted by Google, including - # "machine_image", "vpc", "subnet_id", - # "security_group", "name", etc. - # System label values can be only strings, Boolean values, or a list of - # strings. For example: - # - # { "name": "my-test-instance", - # "security_group": ["a", "b", "c"], - # "spot_instance": false } - # @!attribute [rw] user_labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. A map of user-defined metadata labels. - class MonitoredResourceMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class UserLabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitoring.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitoring.rb deleted file mode 100644 index 666ca63971d3..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/monitoring.rb +++ /dev/null @@ -1,112 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Monitoring configuration of the service. - # - # The example below shows how to configure monitored resources and metrics - # for monitoring. In the example, a monitored resource and two metrics are - # defined. The `library.googleapis.com/book/returned_count` metric is sent - # to both producer and consumer projects, whereas the - # `library.googleapis.com/book/num_overdue` metric is only sent to the - # consumer project. - # - # monitored_resources: - # - type: library.googleapis.com/Branch - # display_name: "Library Branch" - # description: "A branch of a library." - # launch_stage: GA - # labels: - # - key: resource_container - # description: "The Cloud container (ie. project id) for the Branch." - # - key: location - # description: "The location of the library branch." - # - key: branch_id - # description: "The id of the branch." - # metrics: - # - name: library.googleapis.com/book/returned_count - # display_name: "Books Returned" - # description: "The count of books that have been returned." - # launch_stage: GA - # metric_kind: DELTA - # value_type: INT64 - # unit: "1" - # labels: - # - key: customer_id - # description: "The id of the customer." - # - name: library.googleapis.com/book/num_overdue - # display_name: "Books Overdue" - # description: "The current number of overdue books." - # launch_stage: GA - # metric_kind: GAUGE - # value_type: INT64 - # unit: "1" - # labels: - # - key: customer_id - # description: "The id of the customer." - # monitoring: - # producer_destinations: - # - monitored_resource: library.googleapis.com/Branch - # metrics: - # - library.googleapis.com/book/returned_count - # consumer_destinations: - # - monitored_resource: library.googleapis.com/Branch - # metrics: - # - library.googleapis.com/book/returned_count - # - library.googleapis.com/book/num_overdue - # @!attribute [rw] producer_destinations - # @return [::Array<::Google::Api::Monitoring::MonitoringDestination>] - # Monitoring configurations for sending metrics to the producer project. - # There can be multiple producer destinations. A monitored resource type may - # appear in multiple monitoring destinations if different aggregations are - # needed for different sets of metrics associated with that monitored - # resource type. A monitored resource and metric pair may only be used once - # in the Monitoring configuration. - # @!attribute [rw] consumer_destinations - # @return [::Array<::Google::Api::Monitoring::MonitoringDestination>] - # Monitoring configurations for sending metrics to the consumer project. - # There can be multiple consumer destinations. A monitored resource type may - # appear in multiple monitoring destinations if different aggregations are - # needed for different sets of metrics associated with that monitored - # resource type. A monitored resource and metric pair may only be used once - # in the Monitoring configuration. - class Monitoring - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration of a specific monitoring destination (the producer project - # or the consumer project). - # @!attribute [rw] monitored_resource - # @return [::String] - # The monitored resource type. The type must be defined in - # [Service.monitored_resources][google.api.Service.monitored_resources] - # section. - # @!attribute [rw] metrics - # @return [::Array<::String>] - # Types of the metrics to report to this monitoring destination. - # Each type must be defined in - # [Service.metrics][google.api.Service.metrics] section. - class MonitoringDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/quota.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/quota.rb deleted file mode 100644 index 410251c03d80..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/quota.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Quota configuration helps to achieve fairness and budgeting in service - # usage. - # - # The metric based quota configuration works this way: - # - The service configuration defines a set of metrics. - # - For API calls, the quota.metric_rules maps methods to metrics with - # corresponding costs. - # - The quota.limits defines limits on the metrics, which will be used for - # quota checks at runtime. - # - # An example quota configuration in yaml format: - # - # quota: - # limits: - # - # - name: apiWriteQpsPerProject - # metric: library.googleapis.com/write_calls - # unit: "1/min/\\{project}" # rate limit for consumer projects - # values: - # STANDARD: 10000 - # - # - # (The metric rules bind all methods to the read_calls metric, - # except for the UpdateBook and DeleteBook methods. These two methods - # are mapped to the write_calls metric, with the UpdateBook method - # consuming at twice rate as the DeleteBook method.) - # metric_rules: - # - selector: "*" - # metric_costs: - # library.googleapis.com/read_calls: 1 - # - selector: google.example.library.v1.LibraryService.UpdateBook - # metric_costs: - # library.googleapis.com/write_calls: 2 - # - selector: google.example.library.v1.LibraryService.DeleteBook - # metric_costs: - # library.googleapis.com/write_calls: 1 - # - # Corresponding Metric definition: - # - # metrics: - # - name: library.googleapis.com/read_calls - # display_name: Read requests - # metric_kind: DELTA - # value_type: INT64 - # - # - name: library.googleapis.com/write_calls - # display_name: Write requests - # metric_kind: DELTA - # value_type: INT64 - # @!attribute [rw] limits - # @return [::Array<::Google::Api::QuotaLimit>] - # List of QuotaLimit definitions for the service. - # @!attribute [rw] metric_rules - # @return [::Array<::Google::Api::MetricRule>] - # List of MetricRule definitions, each one mapping a selected method to one - # or more metrics. - class Quota - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Bind API methods to metrics. Binding a method to a metric causes that - # metric's configured quota behaviors to apply to the method call. - # @!attribute [rw] selector - # @return [::String] - # Selects the methods to which this rule applies. - # - # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax - # details. - # @!attribute [rw] metric_costs - # @return [::Google::Protobuf::Map{::String => ::Integer}] - # Metrics to update when the selected methods are called, and the associated - # cost applied to each metric. - # - # The key of the map is the metric name, and the values are the amount - # increased for the metric against which the quota limits are defined. - # The value must not be negative. - class MetricRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Integer] - class MetricCostsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `QuotaLimit` defines a specific limit that applies over a specified duration - # for a limit type. There can be at most one limit for a duration and limit - # type combination defined within a `QuotaGroup`. - # @!attribute [rw] name - # @return [::String] - # Name of the quota limit. - # - # The name must be provided, and it must be unique within the service. The - # name can only include alphanumeric characters as well as '-'. - # - # The maximum length of the limit name is 64 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. User-visible, extended description for this quota limit. - # Should be used only when more context is needed to understand this limit - # than provided by the limit's display name (see: `display_name`). - # @!attribute [rw] default_limit - # @return [::Integer] - # Default number of tokens that can be consumed during the specified - # duration. This is the number of tokens assigned when a client - # application developer activates the service for his/her project. - # - # Specifying a value of 0 will block all requests. This can be used if you - # are provisioning quota to selected consumers and blocking others. - # Similarly, a value of -1 will indicate an unlimited quota. No other - # negative values are allowed. - # - # Used by group-based quotas only. - # @!attribute [rw] max_limit - # @return [::Integer] - # Maximum number of tokens that can be consumed during the specified - # duration. Client application developers can override the default limit up - # to this maximum. If specified, this value cannot be set to a value less - # than the default limit. If not specified, it is set to the default limit. - # - # To allow clients to apply overrides with no upper bound, set this to -1, - # indicating unlimited maximum quota. - # - # Used by group-based quotas only. - # @!attribute [rw] free_tier - # @return [::Integer] - # Free tier value displayed in the Developers Console for this limit. - # The free tier is the number of tokens that will be subtracted from the - # billed amount when billing is enabled. - # This field can only be set on a limit with duration "1d", in a billable - # group; it is invalid on any other limit. If this field is not set, it - # defaults to 0, indicating that there is no free tier for this service. - # - # Used by group-based quotas only. - # @!attribute [rw] duration - # @return [::String] - # Duration of this limit in textual notation. Must be "100s" or "1d". - # - # Used by group-based quotas only. - # @!attribute [rw] metric - # @return [::String] - # The name of the metric this quota limit applies to. The quota limits with - # the same metric will be checked together during runtime. The metric must be - # defined within the service config. - # @!attribute [rw] unit - # @return [::String] - # Specify the unit of the quota limit. It uses the same syntax as - # [MetricDescriptor.unit][google.api.MetricDescriptor.unit]. The supported - # unit kinds are determined by the quota backend system. - # - # Here are some examples: - # * "1/min/\\{project}" for quota per minute per project. - # - # Note: the order of unit components is insignificant. - # The "1" at the beginning is required to follow the metric unit syntax. - # @!attribute [rw] values - # @return [::Google::Protobuf::Map{::String => ::Integer}] - # Tiered limit values. You must specify this as a key:value pair, with an - # integer value that is the maximum number of requests allowed for the - # specified unit. Currently only STANDARD is supported. - # @!attribute [rw] display_name - # @return [::String] - # User-visible display name for this limit. - # Optional. If not set, the UI will provide a default display name based on - # the quota configuration. This field can be used to override the default - # display name generated from the configuration. - class QuotaLimit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Integer] - class ValuesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.rb deleted file mode 100644 index 7895c440ea25..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/resources.rb +++ /dev/null @@ -1,123 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceUsage - module V1 - # A service that is available for use by the consumer. - # @!attribute [rw] name - # @return [::String] - # The resource name of the consumer and service. - # - # A valid name would be: - # - projects/123/services/serviceusage.googleapis.com - # @!attribute [rw] parent - # @return [::String] - # The resource name of the consumer. - # - # A valid name would be: - # - projects/123 - # @!attribute [rw] config - # @return [::Google::Cloud::ServiceUsage::V1::ServiceConfig] - # The service configuration of the available service. - # Some fields may be filtered out of the configuration in responses to - # the `ListServices` method. These fields are present only in responses to - # the `GetService` method. - # @!attribute [rw] state - # @return [::Google::Cloud::ServiceUsage::V1::State] - # Whether or not the service has been enabled for use by the consumer. - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration of the service. - # @!attribute [rw] name - # @return [::String] - # The DNS address at which this service is available. - # - # An example DNS address would be: - # `calendar.googleapis.com`. - # @!attribute [rw] title - # @return [::String] - # The product title for this service. - # @!attribute [rw] apis - # @return [::Array<::Google::Protobuf::Api>] - # A list of API interfaces exported by this service. Contains only the names, - # versions, and method names of the interfaces. - # @!attribute [rw] documentation - # @return [::Google::Api::Documentation] - # Additional API documentation. Contains only the summary and the - # documentation URL. - # @!attribute [rw] quota - # @return [::Google::Api::Quota] - # Quota configuration. - # @!attribute [rw] authentication - # @return [::Google::Api::Authentication] - # Auth configuration. Contains only the OAuth rules. - # @!attribute [rw] usage - # @return [::Google::Api::Usage] - # Configuration controlling usage of this service. - # @!attribute [rw] endpoints - # @return [::Array<::Google::Api::Endpoint>] - # Configuration for network endpoints. Contains only the names and aliases - # of the endpoints. - # @!attribute [rw] monitored_resources - # @return [::Array<::Google::Api::MonitoredResourceDescriptor>] - # Defines the monitored resources used by this service. This is required - # by the [Service.monitoring][google.api.Service.monitoring] and - # [Service.logging][google.api.Service.logging] configurations. - # @!attribute [rw] monitoring - # @return [::Google::Api::Monitoring] - # Monitoring configuration. - # This should not include the 'producer_destinations' field. - class ServiceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The operation metadata returned for the batchend services operation. - # @!attribute [rw] resource_names - # @return [::Array<::String>] - # The full name of the resources that this operation is directly - # associated with. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Whether or not a service has been enabled for use by a consumer. - module State - # The default value, which indicates that the enabled state of the service - # is unspecified or not meaningful. Currently, all consumers other than - # projects (such as folders and organizations) are always in this state. - STATE_UNSPECIFIED = 0 - - # The service cannot be used by this consumer. It has either been explicitly - # disabled, or has never been enabled. - DISABLED = 1 - - # The service has been explicitly enabled for use by this consumer. - ENABLED = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.rb deleted file mode 100644 index ac900c98b599..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/serviceusage/v1/serviceusage.rb +++ /dev/null @@ -1,242 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ServiceUsage - module V1 - # Request message for the `EnableService` method. - # @!attribute [rw] name - # @return [::String] - # Name of the consumer and service to enable the service on. - # - # The `EnableService` and `DisableService` methods currently only support - # projects. - # - # Enabling a service requires that the service is public or is shared with - # the user enabling the service. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - class EnableServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `EnableService` method. - # This response message is assigned to the `response` field of the returned - # Operation when that operation is done. - # @!attribute [rw] service - # @return [::Google::Cloud::ServiceUsage::V1::Service] - # The new state of the service after enabling. - class EnableServiceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `DisableService` method. - # @!attribute [rw] name - # @return [::String] - # Name of the consumer and service to disable the service on. - # - # The enable and disable methods currently only support projects. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - # @!attribute [rw] disable_dependent_services - # @return [::Boolean] - # Indicates if services that are enabled and which depend on this service - # should also be disabled. If not set, an error will be generated if any - # enabled services depend on the service to be disabled. When set, the - # service, and any enabled services that depend on it, will be disabled - # together. - # @!attribute [rw] check_if_service_has_usage - # @return [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest::CheckIfServiceHasUsage] - # Defines the behavior for checking service usage when disabling a service. - class DisableServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum to determine if service usage should be checked when disabling a - # service. - module CheckIfServiceHasUsage - # When unset, the default behavior is used, which is SKIP. - CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED = 0 - - # If set, skip checking service usage when disabling a service. - SKIP = 1 - - # If set, service usage is checked when disabling the service. If a - # service, or its dependents, has usage in the last 30 days, the request - # returns a FAILED_PRECONDITION error. - CHECK = 2 - end - end - - # Response message for the `DisableService` method. - # This response message is assigned to the `response` field of the returned - # Operation when that operation is done. - # @!attribute [rw] service - # @return [::Google::Cloud::ServiceUsage::V1::Service] - # The new state of the service after disabling. - class DisableServiceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GetService` method. - # @!attribute [rw] name - # @return [::String] - # Name of the consumer and service to get the `ConsumerState` for. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - class GetServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `ListServices` method. - # @!attribute [rw] parent - # @return [::String] - # Parent to search for services on. - # - # An example name would be: - # `projects/123` where `123` is the project number. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested size of the next page of data. - # Requested page size cannot exceed 200. - # If not set, the default page size is 50. - # @!attribute [rw] page_token - # @return [::String] - # Token identifying which result to start with, which is returned by a - # previous list call. - # @!attribute [rw] filter - # @return [::String] - # Only list services that conform to the given filter. - # The allowed filter strings are `state:ENABLED` and `state:DISABLED`. - class ListServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `ListServices` method. - # @!attribute [rw] services - # @return [::Array<::Google::Cloud::ServiceUsage::V1::Service>] - # The available services for the requested project. - # @!attribute [rw] next_page_token - # @return [::String] - # Token that can be passed to `ListServices` to resume a paginated - # query. - class ListServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `BatchEnableServices` method. - # @!attribute [rw] parent - # @return [::String] - # Parent to enable services on. - # - # An example name would be: - # `projects/123` where `123` is the project number. - # - # The `BatchEnableServices` method currently only supports projects. - # @!attribute [rw] service_ids - # @return [::Array<::String>] - # The identifiers of the services to enable on the project. - # - # A valid identifier would be: - # serviceusage.googleapis.com - # - # Enabling services requires that each service is public or is shared with - # the user enabling the service. - # - # A single request can enable a maximum of 20 services at a time. If more - # than 20 services are specified, the request will fail, and no state changes - # will occur. - class BatchEnableServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `BatchEnableServices` method. - # This response message is assigned to the `response` field of the returned - # Operation when that operation is done. - # @!attribute [rw] services - # @return [::Array<::Google::Cloud::ServiceUsage::V1::Service>] - # The new state of the services after enabling. - # @!attribute [rw] failures - # @return [::Array<::Google::Cloud::ServiceUsage::V1::BatchEnableServicesResponse::EnableFailure>] - # If allow_partial_success is true, and one or more services could not be - # enabled, this field contains the details about each failure. - class BatchEnableServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Provides error messages for the failing services. - # @!attribute [rw] service_id - # @return [::String] - # The service id of a service that could not be enabled. - # @!attribute [rw] error_message - # @return [::String] - # An error message describing why the service could not be enabled. - class EnableFailure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for the `BatchGetServices` method. - # @!attribute [rw] parent - # @return [::String] - # Parent to retrieve services from. - # If this is set, the parent of all of the services specified in `names` must - # match this field. An example name would be: `projects/123` where `123` is - # the project number. The `BatchGetServices` method currently only supports - # projects. - # @!attribute [rw] names - # @return [::Array<::String>] - # Names of the services to retrieve. - # - # An example name would be: - # `projects/123/services/serviceusage.googleapis.com` where `123` is the - # project number. - # A single request can get a maximum of 30 services at a time. - class BatchGetServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `BatchGetServices` method. - # @!attribute [rw] services - # @return [::Array<::Google::Cloud::ServiceUsage::V1::Service>] - # The requested Service states. - class BatchGetServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/usage.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/usage.rb deleted file mode 100644 index 42ed23536d71..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/api/usage.rb +++ /dev/null @@ -1,81 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Configuration controlling usage of a service. - # @!attribute [rw] requirements - # @return [::Array<::String>] - # Requirements that must be satisfied before a consumer project can use the - # service. Each requirement is of the form /; - # for example 'serviceusage.googleapis.com/billing-enabled'. - # - # For Google APIs, a Terms of Service requirement must be included here. - # Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". - # Other Google APIs should include - # "serviceusage.googleapis.com/tos/universal". Additional ToS can be - # included based on the business needs. - # @!attribute [rw] rules - # @return [::Array<::Google::Api::UsageRule>] - # A list of usage rules that apply to individual API methods. - # - # **NOTE:** All service configuration rules follow "last one wins" order. - # @!attribute [rw] producer_notification_channel - # @return [::String] - # The full resource name of a channel used for sending notifications to the - # service producer. - # - # Google Service Management currently only supports - # [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification - # channel. To use Google Cloud Pub/Sub as the channel, this must be the name - # of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format - # documented in https://cloud.google.com/pubsub/docs/overview. - class Usage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Usage configuration rules for the service. - # @!attribute [rw] selector - # @return [::String] - # Selects the methods to which this rule applies. Use '*' to indicate all - # methods in all APIs. - # - # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax - # details. - # @!attribute [rw] allow_unregistered_calls - # @return [::Boolean] - # Use this rule to configure unregistered calls for the service. Unregistered - # calls are calls that do not contain consumer project identity. - # (Example: calls that do not contain an API key). - # - # WARNING: By default, API methods do not allow unregistered calls, and each - # method call must be identified by a consumer project identity. - # @!attribute [rw] skip_service_control - # @return [::Boolean] - # If true, the selected method should skip service control and the control - # plane features, such as quota and billing, will not be available. - # This flag is used by Google Cloud Endpoints to bypass checks for internal - # methods, such as service health check methods. - class UsageRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/api.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/api.rb deleted file mode 100644 index e6e576b4cf8a..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/api.rb +++ /dev/null @@ -1,218 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Api is a light-weight descriptor for an API Interface. - # - # Interfaces are also described as "protocol buffer services" in some contexts, - # such as by the "service" keyword in a .proto file, but they are different - # from API Services, which represent a concrete implementation of an interface - # as opposed to simply a description of methods and bindings. They are also - # sometimes simply referred to as "APIs" in other contexts, such as the name of - # this message itself. See https://cloud.google.com/apis/design/glossary for - # detailed terminology. - # - # New usages of this message as an alternative to ServiceDescriptorProto are - # strongly discouraged. This message does not reliability preserve all - # information necessary to model the schema and preserve semantics. Instead - # make use of FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] name - # @return [::String] - # The fully qualified name of this interface, including package name - # followed by the interface's simple name. - # @!attribute [rw] methods - # @return [::Array<::Google::Protobuf::Method>] - # The methods of this interface, in unspecified order. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # Any metadata attached to the interface. - # @!attribute [rw] version - # @return [::String] - # A version string for this interface. If specified, must have the form - # `major-version.minor-version`, as in `1.10`. If the minor version is - # omitted, it defaults to zero. If the entire version field is empty, the - # major version is derived from the package name, as outlined below. If the - # field is not empty, the version in the package name will be verified to be - # consistent with what is provided here. - # - # The versioning schema uses [semantic - # versioning](http://semver.org) where the major version number - # indicates a breaking change and the minor version an additive, - # non-breaking change. Both version numbers are signals to users - # what to expect from different versions, and should be carefully - # chosen based on the product plan. - # - # The major version is also reflected in the package name of the - # interface, which must end in `v`, as in - # `google.feature.v1`. For major versions 0 and 1, the suffix can - # be omitted. Zero major versions must only be used for - # experimental, non-GA interfaces. - # @!attribute [rw] source_context - # @return [::Google::Protobuf::SourceContext] - # Source context for the protocol buffer service represented by this - # message. - # @!attribute [rw] mixins - # @return [::Array<::Google::Protobuf::Mixin>] - # Included interfaces. See [Mixin][]. - # @!attribute [rw] syntax - # @return [::Google::Protobuf::Syntax] - # The source syntax of the service. - # @!attribute [rw] edition - # @return [::String] - # The source edition string, only valid when syntax is SYNTAX_EDITIONS. - class Api - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Method represents a method of an API interface. - # - # New usages of this message as an alternative to MethodDescriptorProto are - # strongly discouraged. This message does not reliability preserve all - # information necessary to model the schema and preserve semantics. Instead - # make use of FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] name - # @return [::String] - # The simple name of this method. - # @!attribute [rw] request_type_url - # @return [::String] - # A URL of the input message type. - # @!attribute [rw] request_streaming - # @return [::Boolean] - # If true, the request is streamed. - # @!attribute [rw] response_type_url - # @return [::String] - # The URL of the output message type. - # @!attribute [rw] response_streaming - # @return [::Boolean] - # If true, the response is streamed. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # Any metadata attached to the method. - # @!attribute [rw] syntax - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Syntax] - # The source syntax of this method. - # - # This field should be ignored, instead the syntax should be inherited from - # Api. This is similar to Field and EnumValue. - # @!attribute [rw] edition - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # The source edition string, only valid when syntax is SYNTAX_EDITIONS. - # - # This field should be ignored, instead the edition should be inherited from - # Api. This is similar to Field and EnumValue. - class Method - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Declares an API Interface to be included in this interface. The including - # interface must redeclare all the methods from the included interface, but - # documentation and options are inherited as follows: - # - # - If after comment and whitespace stripping, the documentation - # string of the redeclared method is empty, it will be inherited - # from the original method. - # - # - Each annotation belonging to the service config (http, - # visibility) which is not set in the redeclared method will be - # inherited. - # - # - If an http annotation is inherited, the path pattern will be - # modified as follows. Any version prefix will be replaced by the - # version of the including interface plus the [root][] path if - # specified. - # - # Example of a simple mixin: - # - # package google.acl.v1; - # service AccessControl { - # // Get the underlying ACL object. - # rpc GetAcl(GetAclRequest) returns (Acl) { - # option (google.api.http).get = "/v1/{resource=**}:getAcl"; - # } - # } - # - # package google.storage.v2; - # service Storage { - # rpc GetAcl(GetAclRequest) returns (Acl); - # - # // Get a data record. - # rpc GetData(GetDataRequest) returns (Data) { - # option (google.api.http).get = "/v2/{resource=**}"; - # } - # } - # - # Example of a mixin configuration: - # - # apis: - # - name: google.storage.v2.Storage - # mixins: - # - name: google.acl.v1.AccessControl - # - # The mixin construct implies that all methods in `AccessControl` are - # also declared with same name and request/response types in - # `Storage`. A documentation generator or annotation processor will - # see the effective `Storage.GetAcl` method after inheriting - # documentation and annotations as follows: - # - # service Storage { - # // Get the underlying ACL object. - # rpc GetAcl(GetAclRequest) returns (Acl) { - # option (google.api.http).get = "/v2/{resource=**}:getAcl"; - # } - # ... - # } - # - # Note how the version in the path pattern changed from `v1` to `v2`. - # - # If the `root` field in the mixin is specified, it should be a - # relative path under which inherited HTTP paths are placed. Example: - # - # apis: - # - name: google.storage.v2.Storage - # mixins: - # - name: google.acl.v1.AccessControl - # root: acls - # - # This implies the following inherited HTTP annotation: - # - # service Storage { - # // Get the underlying ACL object. - # rpc GetAcl(GetAclRequest) returns (Acl) { - # option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; - # } - # ... - # } - # @!attribute [rw] name - # @return [::String] - # The fully qualified name of the interface which is included. - # @!attribute [rw] root - # @return [::String] - # If non-empty specifies a path under which inherited HTTP paths - # are rooted. - class Mixin - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/source_context.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/source_context.rb deleted file mode 100644 index 1bc7c0900aec..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/source_context.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `SourceContext` represents information about the source of a - # protobuf element, like the file in which it is defined. - # @!attribute [rw] file_name - # @return [::String] - # The path-qualified name of the .proto file that contained the associated - # protobuf element. For example: `"google/protobuf/source_context.proto"`. - class SourceContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/type.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/type.rb deleted file mode 100644 index c9c8ea649289..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/protobuf/type.rb +++ /dev/null @@ -1,256 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A protocol buffer message type. - # - # New usages of this message as an alternative to DescriptorProto are strongly - # discouraged. This message does not reliability preserve all information - # necessary to model the schema and preserve semantics. Instead make use of - # FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] name - # @return [::String] - # The fully qualified message name. - # @!attribute [rw] fields - # @return [::Array<::Google::Protobuf::Field>] - # The list of fields. - # @!attribute [rw] oneofs - # @return [::Array<::String>] - # The list of types appearing in `oneof` definitions in this type. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # The protocol buffer options. - # @!attribute [rw] source_context - # @return [::Google::Protobuf::SourceContext] - # The source context. - # @!attribute [rw] syntax - # @return [::Google::Protobuf::Syntax] - # The source syntax. - # @!attribute [rw] edition - # @return [::String] - # The source edition string, only valid when syntax is SYNTAX_EDITIONS. - class Type - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single field of a message type. - # - # New usages of this message as an alternative to FieldDescriptorProto are - # strongly discouraged. This message does not reliability preserve all - # information necessary to model the schema and preserve semantics. Instead - # make use of FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] kind - # @return [::Google::Protobuf::Field::Kind] - # The field type. - # @!attribute [rw] cardinality - # @return [::Google::Protobuf::Field::Cardinality] - # The field cardinality. - # @!attribute [rw] number - # @return [::Integer] - # The field number. - # @!attribute [rw] name - # @return [::String] - # The field name. - # @!attribute [rw] type_url - # @return [::String] - # The field type URL, without the scheme, for message or enumeration - # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. - # @!attribute [rw] oneof_index - # @return [::Integer] - # The index of the field type in `Type.oneofs`, for message or enumeration - # types. The first type has index 1; zero means the type is not in the list. - # @!attribute [rw] packed - # @return [::Boolean] - # Whether to use alternative packed wire representation. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # The protocol buffer options. - # @!attribute [rw] json_name - # @return [::String] - # The field JSON name. - # @!attribute [rw] default_value - # @return [::String] - # The string value of the default value of this field. Proto2 syntax only. - class Field - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Basic field types. - module Kind - # Field type unknown. - TYPE_UNKNOWN = 0 - - # Field type double. - TYPE_DOUBLE = 1 - - # Field type float. - TYPE_FLOAT = 2 - - # Field type int64. - TYPE_INT64 = 3 - - # Field type uint64. - TYPE_UINT64 = 4 - - # Field type int32. - TYPE_INT32 = 5 - - # Field type fixed64. - TYPE_FIXED64 = 6 - - # Field type fixed32. - TYPE_FIXED32 = 7 - - # Field type bool. - TYPE_BOOL = 8 - - # Field type string. - TYPE_STRING = 9 - - # Field type group. Proto2 syntax only, and deprecated. - TYPE_GROUP = 10 - - # Field type message. - TYPE_MESSAGE = 11 - - # Field type bytes. - TYPE_BYTES = 12 - - # Field type uint32. - TYPE_UINT32 = 13 - - # Field type enum. - TYPE_ENUM = 14 - - # Field type sfixed32. - TYPE_SFIXED32 = 15 - - # Field type sfixed64. - TYPE_SFIXED64 = 16 - - # Field type sint32. - TYPE_SINT32 = 17 - - # Field type sint64. - TYPE_SINT64 = 18 - end - - # Whether a field is optional, required, or repeated. - module Cardinality - # For fields with unknown cardinality. - CARDINALITY_UNKNOWN = 0 - - # For optional fields. - CARDINALITY_OPTIONAL = 1 - - # For required fields. Proto2 syntax only. - CARDINALITY_REQUIRED = 2 - - # For repeated fields. - CARDINALITY_REPEATED = 3 - end - end - - # Enum type definition. - # - # New usages of this message as an alternative to EnumDescriptorProto are - # strongly discouraged. This message does not reliability preserve all - # information necessary to model the schema and preserve semantics. Instead - # make use of FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] name - # @return [::String] - # Enum type name. - # @!attribute [rw] enumvalue - # @return [::Array<::Google::Protobuf::EnumValue>] - # Enum value definitions. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # Protocol buffer options. - # @!attribute [rw] source_context - # @return [::Google::Protobuf::SourceContext] - # The source context. - # @!attribute [rw] syntax - # @return [::Google::Protobuf::Syntax] - # The source syntax. - # @!attribute [rw] edition - # @return [::String] - # The source edition string, only valid when syntax is SYNTAX_EDITIONS. - class Enum - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum value definition. - # - # New usages of this message as an alternative to EnumValueDescriptorProto are - # strongly discouraged. This message does not reliability preserve all - # information necessary to model the schema and preserve semantics. Instead - # make use of FileDescriptorSet which preserves the necessary information. - # @!attribute [rw] name - # @return [::String] - # Enum value name. - # @!attribute [rw] number - # @return [::Integer] - # Enum value number. - # @!attribute [rw] options - # @return [::Array<::Google::Protobuf::Option>] - # Protocol buffer options. - class EnumValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A protocol buffer option, which can be attached to a message, field, - # enumeration, etc. - # - # New usages of this message as an alternative to FileOptions, MessageOptions, - # FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions - # are strongly discouraged. - # @!attribute [rw] name - # @return [::String] - # The option's name. For protobuf built-in options (options defined in - # descriptor.proto), this is the short name. For example, `"map_entry"`. - # For custom options, it should be the fully-qualified name. For example, - # `"google.api.http"`. - # @!attribute [rw] value - # @return [::Google::Protobuf::Any] - # The option's value packed in an Any message. If the value is a primitive, - # the corresponding wrapper type defined in google/protobuf/wrappers.proto - # should be used. If the value is an enum, it should be stored as an int32 - # value using the google.protobuf.Int32Value type. - class Option - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The syntax in which a protocol buffer element is defined. - module Syntax - # Syntax `proto2`. - SYNTAX_PROTO2 = 0 - - # Syntax `proto3`. - SYNTAX_PROTO3 = 1 - - # Syntax `editions`. - SYNTAX_EDITIONS = 2 - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-service_usage-v1/snippets/Gemfile deleted file mode 100644 index d5e54b2240b0..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-service_usage-v1", path: "../" -else - gem "google-cloud-service_usage-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_enable_services.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_enable_services.rb deleted file mode 100644 index 3dca1ec69065..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_enable_services.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START serviceusage_v1_generated_ServiceUsage_BatchEnableServices_sync] -require "google/cloud/service_usage/v1" - -## -# Snippet for the batch_enable_services call in the ServiceUsage service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_enable_services. -# -def batch_enable_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new - - # Call the batch_enable_services method. - result = client.batch_enable_services request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END serviceusage_v1_generated_ServiceUsage_BatchEnableServices_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_get_services.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_get_services.rb deleted file mode 100644 index 86456494e1ce..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/batch_get_services.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START serviceusage_v1_generated_ServiceUsage_BatchGetServices_sync] -require "google/cloud/service_usage/v1" - -## -# Snippet for the batch_get_services call in the ServiceUsage service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_get_services. -# -def batch_get_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new - - # Call the batch_get_services method. - result = client.batch_get_services request - - # The returned object is of type Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse. - p result -end -# [END serviceusage_v1_generated_ServiceUsage_BatchGetServices_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/disable_service.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/disable_service.rb deleted file mode 100644 index 5bc9366a51e6..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/disable_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START serviceusage_v1_generated_ServiceUsage_DisableService_sync] -require "google/cloud/service_usage/v1" - -## -# Snippet for the disable_service call in the ServiceUsage service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#disable_service. -# -def disable_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new - - # Call the disable_service method. - result = client.disable_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END serviceusage_v1_generated_ServiceUsage_DisableService_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/enable_service.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/enable_service.rb deleted file mode 100644 index 9d41562dd5d0..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/enable_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START serviceusage_v1_generated_ServiceUsage_EnableService_sync] -require "google/cloud/service_usage/v1" - -## -# Snippet for the enable_service call in the ServiceUsage service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#enable_service. -# -def enable_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new - - # Call the enable_service method. - result = client.enable_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END serviceusage_v1_generated_ServiceUsage_EnableService_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/get_service.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/get_service.rb deleted file mode 100644 index 81f2e0dc7fb9..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/get_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START serviceusage_v1_generated_ServiceUsage_GetService_sync] -require "google/cloud/service_usage/v1" - -## -# Snippet for the get_service call in the ServiceUsage service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#get_service. -# -def get_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceUsage::V1::GetServiceRequest.new - - # Call the get_service method. - result = client.get_service request - - # The returned object is of type Google::Cloud::ServiceUsage::V1::Service. - p result -end -# [END serviceusage_v1_generated_ServiceUsage_GetService_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/list_services.rb b/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/list_services.rb deleted file mode 100644 index 13e90b729e12..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/snippets/service_usage/list_services.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START serviceusage_v1_generated_ServiceUsage_ListServices_sync] -require "google/cloud/service_usage/v1" - -## -# Snippet for the list_services call in the ServiceUsage service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#list_services. -# -def list_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ServiceUsage::V1::ListServicesRequest.new - - # Call the list_services method. - result = client.list_services request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ServiceUsage::V1::Service. - p item - end -end -# [END serviceusage_v1_generated_ServiceUsage_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-service_usage-v1/snippets/snippet_metadata_google.api.serviceusage.v1.json b/owl-bot-staging/google-cloud-service_usage-v1/snippets/snippet_metadata_google.api.serviceusage.v1.json deleted file mode 100644 index 633aac1aafdf..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/snippets/snippet_metadata_google.api.serviceusage.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-service_usage-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.api.serviceusage.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "serviceusage_v1_generated_ServiceUsage_EnableService_sync", - "title": "Snippet for the enable_service call in the ServiceUsage service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#enable_service.", - "file": "service_usage/enable_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_service", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#enable_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceUsage::V1::EnableServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ServiceUsage::Client", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" - }, - "method": { - "short_name": "EnableService", - "full_name": "google.api.serviceusage.v1.ServiceUsage.EnableService", - "service": { - "short_name": "ServiceUsage", - "full_name": "google.api.serviceusage.v1.ServiceUsage" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "serviceusage_v1_generated_ServiceUsage_DisableService_sync", - "title": "Snippet for the disable_service call in the ServiceUsage service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#disable_service.", - "file": "service_usage/disable_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_service", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#disable_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceUsage::V1::DisableServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ServiceUsage::Client", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" - }, - "method": { - "short_name": "DisableService", - "full_name": "google.api.serviceusage.v1.ServiceUsage.DisableService", - "service": { - "short_name": "ServiceUsage", - "full_name": "google.api.serviceusage.v1.ServiceUsage" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "serviceusage_v1_generated_ServiceUsage_GetService_sync", - "title": "Snippet for the get_service call in the ServiceUsage service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#get_service.", - "file": "service_usage/get_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#get_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceUsage::V1::GetServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceUsage::V1::Service", - "client": { - "short_name": "ServiceUsage::Client", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" - }, - "method": { - "short_name": "GetService", - "full_name": "google.api.serviceusage.v1.ServiceUsage.GetService", - "service": { - "short_name": "ServiceUsage", - "full_name": "google.api.serviceusage.v1.ServiceUsage" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "serviceusage_v1_generated_ServiceUsage_ListServices_sync", - "title": "Snippet for the list_services call in the ServiceUsage service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#list_services.", - "file": "service_usage/list_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_services", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#list_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceUsage::V1::ListServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceUsage::V1::ListServicesResponse", - "client": { - "short_name": "ServiceUsage::Client", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" - }, - "method": { - "short_name": "ListServices", - "full_name": "google.api.serviceusage.v1.ServiceUsage.ListServices", - "service": { - "short_name": "ServiceUsage", - "full_name": "google.api.serviceusage.v1.ServiceUsage" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "serviceusage_v1_generated_ServiceUsage_BatchEnableServices_sync", - "title": "Snippet for the batch_enable_services call in the ServiceUsage service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_enable_services.", - "file": "service_usage/batch_enable_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_enable_services", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_enable_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "ServiceUsage::Client", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" - }, - "method": { - "short_name": "BatchEnableServices", - "full_name": "google.api.serviceusage.v1.ServiceUsage.BatchEnableServices", - "service": { - "short_name": "ServiceUsage", - "full_name": "google.api.serviceusage.v1.ServiceUsage" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "serviceusage_v1_generated_ServiceUsage_BatchGetServices_sync", - "title": "Snippet for the batch_get_services call in the ServiceUsage service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_get_services.", - "file": "service_usage/batch_get_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_get_services", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client#batch_get_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse", - "client": { - "short_name": "ServiceUsage::Client", - "full_name": "::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client" - }, - "method": { - "short_name": "BatchGetServices", - "full_name": "google.api.serviceusage.v1.ServiceUsage.BatchGetServices", - "service": { - "short_name": "ServiceUsage", - "full_name": "google.api.serviceusage.v1.ServiceUsage" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_test.rb b/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_test.rb deleted file mode 100644 index a553f01fc551..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/api/serviceusage/v1/serviceusage_pb" -require "google/api/serviceusage/v1/serviceusage_services_pb" -require "google/cloud/service_usage/v1/service_usage" - -class ::Google::Cloud::ServiceUsage::V1::ServiceUsage::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_test.rb b/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_test.rb deleted file mode 100644 index adc9b2fb6a9b..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_rest_test.rb +++ /dev/null @@ -1,430 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/api/serviceusage/v1/serviceusage_pb" -require "google/cloud/service_usage/v1/service_usage/rest" - - -class ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_enable_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_enable_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.enable_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.enable_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.enable_service ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.enable_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.enable_service(::Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_service_client_stub.call_count - end - end - end - - def test_disable_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - disable_dependent_services = true - check_if_service_has_usage = :CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED - - disable_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_disable_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.disable_service({ name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.disable_service name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.disable_service ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new(name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.disable_service({ name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.disable_service(::Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new(name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_service_client_stub.call_count - end - end - end - - def test_get_service - # Create test objects. - client_result = ::Google::Cloud::ServiceUsage::V1::Service.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service ::Google::Cloud::ServiceUsage::V1::GetServiceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service(::Google::Cloud::ServiceUsage::V1::GetServiceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_count - end - end - end - - def test_list_services - # Create test objects. - client_result = ::Google::Cloud::ServiceUsage::V1::ListServicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_services_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_services ::Google::Cloud::ServiceUsage::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_services(::Google::Cloud::ServiceUsage::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_count - end - end - end - - def test_batch_enable_services - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_ids = ["hello world"] - - batch_enable_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_batch_enable_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_enable_services_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_enable_services({ parent: parent, service_ids: service_ids }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_enable_services parent: parent, service_ids: service_ids do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_enable_services ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new(parent: parent, service_ids: service_ids) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_enable_services({ parent: parent, service_ids: service_ids }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_enable_services(::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new(parent: parent, service_ids: service_ids), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_enable_services_client_stub.call_count - end - end - end - - def test_batch_get_services - # Create test objects. - client_result = ::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - names = ["hello world"] - - batch_get_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::ServiceStub.stub :transcode_batch_get_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_get_services_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_get_services({ parent: parent, names: names }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_get_services parent: parent, names: names do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_get_services ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new(parent: parent, names: names) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_get_services({ parent: parent, names: names }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_get_services(::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new(parent: parent, names: names), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_get_services_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_test.rb b/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_test.rb deleted file mode 100644 index 450e6e083a28..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/test/google/cloud/service_usage/v1/service_usage_test.rb +++ /dev/null @@ -1,500 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/api/serviceusage/v1/serviceusage_pb" -require "google/cloud/service_usage/v1/service_usage" - -class ::Google::Cloud::ServiceUsage::V1::ServiceUsage::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_enable_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_service, name - assert_kind_of ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.enable_service({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.enable_service name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.enable_service ::Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.enable_service({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.enable_service(::Google::Cloud::ServiceUsage::V1::EnableServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enable_service_client_stub.call_rpc_count - end - end - - def test_disable_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - disable_dependent_services = true - check_if_service_has_usage = :CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED - - disable_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_service, name - assert_kind_of ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["disable_dependent_services"] - assert_equal :CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED, request["check_if_service_has_usage"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.disable_service({ name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.disable_service name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.disable_service ::Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new(name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.disable_service({ name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.disable_service(::Google::Cloud::ServiceUsage::V1::DisableServiceRequest.new(name: name, disable_dependent_services: disable_dependent_services, check_if_service_has_usage: check_if_service_has_usage), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, disable_service_client_stub.call_rpc_count - end - end - - def test_get_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceUsage::V1::Service.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service, name - assert_kind_of ::Google::Cloud::ServiceUsage::V1::GetServiceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service ::Google::Cloud::ServiceUsage::V1::GetServiceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service(::Google::Cloud::ServiceUsage::V1::GetServiceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_rpc_count - end - end - - def test_list_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceUsage::V1::ListServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_services, name - assert_kind_of ::Google::Cloud::ServiceUsage::V1::ListServicesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_services_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_services parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_services ::Google::Cloud::ServiceUsage::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_services({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_services(::Google::Cloud::ServiceUsage::V1::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_rpc_count - end - end - - def test_batch_enable_services - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - service_ids = ["hello world"] - - batch_enable_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_enable_services, name - assert_kind_of ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["service_ids"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_enable_services_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_enable_services({ parent: parent, service_ids: service_ids }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_enable_services parent: parent, service_ids: service_ids do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_enable_services ::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new(parent: parent, service_ids: service_ids) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_enable_services({ parent: parent, service_ids: service_ids }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_enable_services(::Google::Cloud::ServiceUsage::V1::BatchEnableServicesRequest.new(parent: parent, service_ids: service_ids), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_enable_services_client_stub.call_rpc_count - end - end - - def test_batch_get_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::ServiceUsage::V1::BatchGetServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - names = ["hello world"] - - batch_get_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_get_services, name - assert_kind_of ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["names"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_get_services_client_stub do - # Create client - c = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_get_services({ parent: parent, names: names }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_get_services parent: parent, names: names do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_get_services ::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new(parent: parent, names: names) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_get_services({ parent: parent, names: names }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_get_services(::Google::Cloud::ServiceUsage::V1::BatchGetServicesRequest.new(parent: parent, names: names), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_get_services_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::ServiceUsage::V1::ServiceUsage::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-service_usage-v1/test/helper.rb b/owl-bot-staging/google-cloud-service_usage-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-service_usage-v1/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-shell-v1/.gitignore b/owl-bot-staging/google-cloud-shell-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/.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-shell-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-shell-v1/.repo-metadata.json deleted file mode 100644 index 928c50bb2ebd..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudshell.googleapis.com", - "api_shortname": "cloudshell", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-shell-v1/latest", - "distribution_name": "google-cloud-shell-v1", - "is_cloud": true, - "language": "ruby", - "name": "cloudshell", - "name_pretty": "Cloud Shell V1 API", - "product_documentation": "https://cloud.google.com/shell/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Shell is an interactive shell environment for Google Cloud that makes it easy for you to learn and experiment with Google Cloud and manage your projects and resources from your web browser. Note that google-cloud-shell-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-shell instead. See the readme for more details.", - "ruby-cloud-env-prefix": "CLOUD_SHELL", - "ruby-cloud-product-url": "https://cloud.google.com/shell/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-shell-v1/.rubocop.yml b/owl-bot-staging/google-cloud-shell-v1/.rubocop.yml deleted file mode 100644 index 63ca4175e823..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-shell-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-shell-v1.rb" diff --git a/owl-bot-staging/google-cloud-shell-v1/.toys.rb b/owl-bot-staging/google-cloud-shell-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-shell-v1/.yardopts b/owl-bot-staging/google-cloud-shell-v1/.yardopts deleted file mode 100644 index eac9d9000676..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Shell V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-shell-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-shell-v1/AUTHENTICATION.md deleted file mode 100644 index 4d8d9081cbb9..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-shell-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-shell-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/shell/v1" - -client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/shell/v1" - -::Google::Cloud::Shell::V1::CloudShellService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-shell-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/shell/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-shell-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-shell-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-shell-v1/Gemfile b/owl-bot-staging/google-cloud-shell-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-shell-v1/LICENSE.md b/owl-bot-staging/google-cloud-shell-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-shell-v1/README.md b/owl-bot-staging/google-cloud-shell-v1/README.md deleted file mode 100644 index f4715201f927..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Shell V1 API - -Allows users to start, configure, and connect to interactive shell sessions running in the cloud. - -Cloud Shell is an interactive shell environment for Google Cloud that makes it easy for you to learn and experiment with Google Cloud and manage your projects and resources from your web browser. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Shell V1 API. Most users should consider using -the main client gem, -[google-cloud-shell](https://rubygems.org/gems/google-cloud-shell). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-shell-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudshell.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/shell/v1" - -client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new -request = ::Google::Cloud::Shell::V1::GetEnvironmentRequest.new # (request fields as keyword arguments...) -response = client.get_environment request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-shell-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/shell/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/shell/v1" -require "logger" - -client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-shell`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-shell-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-shell`. -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-shell-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-shell-v1/Rakefile b/owl-bot-staging/google-cloud-shell-v1/Rakefile deleted file mode 100644 index fec628dc4e26..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-shell-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["CLOUD_SHELL_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["CLOUD_SHELL_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["CLOUD_SHELL_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or CLOUD_SHELL_TEST_PROJECT=test123 CLOUD_SHELL_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/shell/v1/cloud_shell_service/credentials" - ::Google::Cloud::Shell::V1::CloudShellService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["CLOUD_SHELL_PROJECT"] = project - ENV["CLOUD_SHELL_TEST_PROJECT"] = project - ENV["CLOUD_SHELL_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-shell-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-shell-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-shell-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-shell-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-shell-v1" - header "google-cloud-shell-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-shell-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-shell-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-shell-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-shell-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-shell-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-shell-v1/gapic_metadata.json deleted file mode 100644 index 23f6c55881ac..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/gapic_metadata.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.shell.v1", - "libraryPackage": "::Google::Cloud::Shell::V1", - "services": { - "CloudShellService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Shell::V1::CloudShellService::Client", - "rpcs": { - "GetEnvironment": { - "methods": [ - "get_environment" - ] - }, - "StartEnvironment": { - "methods": [ - "start_environment" - ] - }, - "AuthorizeEnvironment": { - "methods": [ - "authorize_environment" - ] - }, - "AddPublicKey": { - "methods": [ - "add_public_key" - ] - }, - "RemovePublicKey": { - "methods": [ - "remove_public_key" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-shell-v1/google-cloud-shell-v1.gemspec b/owl-bot-staging/google-cloud-shell-v1/google-cloud-shell-v1.gemspec deleted file mode 100644 index aad7467f0c24..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/google-cloud-shell-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/shell/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-shell-v1" - gem.version = Google::Cloud::Shell::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Shell is an interactive shell environment for Google Cloud that makes it easy for you to learn and experiment with Google Cloud and manage your projects and resources from your web browser. Note that google-cloud-shell-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-shell instead. See the readme for more details." - gem.summary = "Allows users to start, configure, and connect to interactive shell sessions running in the 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") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google-cloud-shell-v1.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google-cloud-shell-v1.rb deleted file mode 100644 index 4f94ddb87d3e..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google-cloud-shell-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/shell/v1" diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1.rb deleted file mode 100644 index c94c21ed2929..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/shell/v1/cloud_shell_service" -require "google/cloud/shell/v1/version" - -module Google - module Cloud - module Shell - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/shell/v1" - # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/shell/v1" - # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/shell/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.rb deleted file mode 100644 index 7e5d994d8637..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/shell/v1/version" - -require "google/cloud/shell/v1/cloud_shell_service/credentials" -require "google/cloud/shell/v1/cloud_shell_service/paths" -require "google/cloud/shell/v1/cloud_shell_service/operations" -require "google/cloud/shell/v1/cloud_shell_service/client" -require "google/cloud/shell/v1/cloud_shell_service/rest" - -module Google - module Cloud - module Shell - module V1 - ## - # API for interacting with Google Cloud Shell. Each user of Cloud Shell has at - # least one environment, which has the ID "default". Environment consists of a - # Docker image defining what is installed on the environment and a home - # directory containing the user's data that will remain across sessions. - # Clients use this API to start and fetch information about their environment, - # which can then be used to connect to that environment via a separate SSH - # client. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/shell/v1/cloud_shell_service" - # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/shell/v1/cloud_shell_service/rest" - # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new - # - module CloudShellService - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_shell_service", "helpers.rb" -require "google/cloud/shell/v1/cloud_shell_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.rb deleted file mode 100644 index 4051e0f1f3fb..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/client.rb +++ /dev/null @@ -1,956 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/shell/v1/cloudshell_pb" - -module Google - module Cloud - module Shell - module V1 - module CloudShellService - ## - # Client for the CloudShellService service. - # - # API for interacting with Google Cloud Shell. Each user of Cloud Shell has at - # least one environment, which has the ID "default". Environment consists of a - # Docker image defining what is installed on the environment and a home - # directory containing the user's data that will remain across sessions. - # Clients use this API to start and fetch information about their environment, - # which can then be used to connect to that environment via a separate SSH - # client. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudshell.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_shell_service_stub - - ## - # Configure the CloudShellService Client class. - # - # See {::Google::Cloud::Shell::V1::CloudShellService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudShellService clients - # ::Google::Cloud::Shell::V1::CloudShellService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Shell", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_environment.timeout = 60.0 - default_config.rpcs.get_environment.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.start_environment.timeout = 60.0 - - default_config.rpcs.authorize_environment.timeout = 60.0 - - default_config.rpcs.add_public_key.timeout = 60.0 - - default_config.rpcs.remove_public_key.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudShellService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Shell::V1::CloudShellService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_shell_service_stub.universe_domain - end - - ## - # Create a new CloudShellService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudShellService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/shell/v1/cloudshell_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @cloud_shell_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Shell::V1::CloudShellService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @cloud_shell_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Shell::V1::CloudShellService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_shell_service_stub.logger - end - - # Service calls - - ## - # Gets an environment. Returns NOT_FOUND if the environment does not exist. - # - # @overload get_environment(request, options = nil) - # Pass arguments to `get_environment` via a request object, either of type - # {::Google::Cloud::Shell::V1::GetEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Shell::V1::GetEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_environment(name: nil) - # Pass arguments to `get_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested resource, for example `users/me/environments/default` - # or `users/someone@example.com/environments/default`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Shell::V1::Environment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Shell::V1::Environment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/shell/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Shell::V1::CloudShellService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Shell::V1::GetEnvironmentRequest.new - # - # # Call the get_environment method. - # result = client.get_environment request - # - # # The returned object is of type Google::Cloud::Shell::V1::Environment. - # p result - # - def get_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::GetEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_environment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_environment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_shell_service_stub.call_rpc :get_environment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts an existing environment, allowing clients to connect to it. The - # returned operation will contain an instance of StartEnvironmentMetadata in - # its metadata field. Users can wait for the environment to start by polling - # this operation via GetOperation. Once the environment has finished starting - # and is ready to accept connections, the operation will contain a - # StartEnvironmentResponse in its response field. - # - # @overload start_environment(request, options = nil) - # Pass arguments to `start_environment` via a request object, either of type - # {::Google::Cloud::Shell::V1::StartEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Shell::V1::StartEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload start_environment(name: nil, access_token: nil, public_keys: nil) - # Pass arguments to `start_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource that should be started, for example - # `users/me/environments/default` or - # `users/someone@example.com/environments/default`. - # @param access_token [::String] - # The initial access token passed to the environment. If this is present and - # valid, the environment will be pre-authenticated with gcloud so that the - # user can run gcloud commands in Cloud Shell without having to log in. This - # code can be updated later by calling AuthorizeEnvironment. - # @param public_keys [::Array<::String>] - # Public keys that should be added to the environment before it is started. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/shell/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Shell::V1::CloudShellService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Shell::V1::StartEnvironmentRequest.new - # - # # Call the start_environment method. - # result = client.start_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def start_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::StartEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.start_environment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.start_environment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_shell_service_stub.call_rpc :start_environment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sends OAuth credentials to a running environment on behalf of a user. When - # this completes, the environment will be authorized to run various Google - # Cloud command line tools without requiring the user to manually - # authenticate. - # - # @overload authorize_environment(request, options = nil) - # Pass arguments to `authorize_environment` via a request object, either of type - # {::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload authorize_environment(name: nil, access_token: nil, id_token: nil, expire_time: nil) - # Pass arguments to `authorize_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource that should receive the credentials, for example - # `users/me/environments/default` or - # `users/someone@example.com/environments/default`. - # @param access_token [::String] - # The OAuth access token that should be sent to the environment. - # @param id_token [::String] - # The OAuth ID token that should be sent to the environment. - # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] - # The time when the credentials expire. If not set, defaults to one hour from - # when the server received the request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/shell/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Shell::V1::CloudShellService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new - # - # # Call the authorize_environment method. - # result = client.authorize_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def authorize_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.authorize_environment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.authorize_environment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.authorize_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_shell_service_stub.call_rpc :authorize_environment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a public SSH key to an environment, allowing clients with the - # corresponding private key to connect to that environment via SSH. If a key - # with the same content already exists, this will error with ALREADY_EXISTS. - # - # @overload add_public_key(request, options = nil) - # Pass arguments to `add_public_key` via a request object, either of type - # {::Google::Cloud::Shell::V1::AddPublicKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Shell::V1::AddPublicKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload add_public_key(environment: nil, key: nil) - # Pass arguments to `add_public_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param environment [::String] - # Environment this key should be added to, e.g. - # `users/me/environments/default`. - # @param key [::String] - # Key that should be added to the environment. Supported formats are - # `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` - # (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and - # `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as - # <format> <content>, where <content> part is encoded with - # Base64. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/shell/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Shell::V1::CloudShellService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Shell::V1::AddPublicKeyRequest.new - # - # # Call the add_public_key method. - # result = client.add_public_key request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def add_public_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::AddPublicKeyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.add_public_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.environment - header_params["environment"] = request.environment - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.add_public_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.add_public_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_shell_service_stub.call_rpc :add_public_key, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a public SSH key from an environment. Clients will no longer be - # able to connect to the environment using the corresponding private key. - # If a key with the same content is not present, this will error with - # NOT_FOUND. - # - # @overload remove_public_key(request, options = nil) - # Pass arguments to `remove_public_key` via a request object, either of type - # {::Google::Cloud::Shell::V1::RemovePublicKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Shell::V1::RemovePublicKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload remove_public_key(environment: nil, key: nil) - # Pass arguments to `remove_public_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param environment [::String] - # Environment this key should be removed from, e.g. - # `users/me/environments/default`. - # @param key [::String] - # Key that should be removed from the environment. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/shell/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Shell::V1::CloudShellService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Shell::V1::RemovePublicKeyRequest.new - # - # # Call the remove_public_key method. - # result = client.remove_public_key request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def remove_public_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::RemovePublicKeyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.remove_public_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.environment - header_params["environment"] = request.environment - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.remove_public_key.timeout, - metadata: metadata, - retry_policy: @config.rpcs.remove_public_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_shell_service_stub.call_rpc :remove_public_key, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudShellService API. - # - # This class represents the configuration for CloudShellService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Shell::V1::CloudShellService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_environment to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Shell::V1::CloudShellService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_environment.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_environment.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudshell.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CloudShellService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_environment - ## - # RPC-specific configuration for `start_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :start_environment - ## - # RPC-specific configuration for `authorize_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :authorize_environment - ## - # RPC-specific configuration for `add_public_key` - # @return [::Gapic::Config::Method] - # - attr_reader :add_public_key - ## - # RPC-specific configuration for `remove_public_key` - # @return [::Gapic::Config::Method] - # - attr_reader :remove_public_key - - # @private - def initialize parent_rpcs = nil - get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment - @get_environment = ::Gapic::Config::Method.new get_environment_config - start_environment_config = parent_rpcs.start_environment if parent_rpcs.respond_to? :start_environment - @start_environment = ::Gapic::Config::Method.new start_environment_config - authorize_environment_config = parent_rpcs.authorize_environment if parent_rpcs.respond_to? :authorize_environment - @authorize_environment = ::Gapic::Config::Method.new authorize_environment_config - add_public_key_config = parent_rpcs.add_public_key if parent_rpcs.respond_to? :add_public_key - @add_public_key = ::Gapic::Config::Method.new add_public_key_config - remove_public_key_config = parent_rpcs.remove_public_key if parent_rpcs.respond_to? :remove_public_key - @remove_public_key = ::Gapic::Config::Method.new remove_public_key_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.rb deleted file mode 100644 index c19294dbdf8e..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Shell - module V1 - module CloudShellService - # Credentials for the CloudShellService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "CLOUD_SHELL_CREDENTIALS", - "CLOUD_SHELL_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "CLOUD_SHELL_CREDENTIALS_JSON", - "CLOUD_SHELL_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.rb deleted file mode 100644 index e11349338763..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Shell - module V1 - module CloudShellService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudshell.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudShellService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudShellService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudshell.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.rb deleted file mode 100644 index f03f93ba390f..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/paths.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Shell - module V1 - module CloudShellService - # Path helper methods for the CloudShellService API. - module Paths - ## - # Create a fully-qualified Environment resource string. - # - # The resource will be in the following format: - # - # `users/{user}/environments/{environment}` - # - # @param user [String] - # @param environment [String] - # - # @return [::String] - def environment_path user:, environment: - raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/" - - "users/#{user}/environments/#{environment}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.rb deleted file mode 100644 index 478c24d2218a..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/shell/v1/version" - -require "google/cloud/shell/v1/cloud_shell_service/credentials" -require "google/cloud/shell/v1/cloud_shell_service/paths" -require "google/cloud/shell/v1/cloud_shell_service/rest/operations" -require "google/cloud/shell/v1/cloud_shell_service/rest/client" - -module Google - module Cloud - module Shell - module V1 - ## - # API for interacting with Google Cloud Shell. Each user of Cloud Shell has at - # least one environment, which has the ID "default". Environment consists of a - # Docker image defining what is installed on the environment and a home - # directory containing the user's data that will remain across sessions. - # Clients use this API to start and fetch information about their environment, - # which can then be used to connect to that environment via a separate SSH - # client. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/shell/v1/cloud_shell_service/rest" - # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new - # - module CloudShellService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/shell/v1/cloud_shell_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.rb deleted file mode 100644 index 3e117501069f..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/client.rb +++ /dev/null @@ -1,878 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/shell/v1/cloudshell_pb" -require "google/cloud/shell/v1/cloud_shell_service/rest/service_stub" - -module Google - module Cloud - module Shell - module V1 - module CloudShellService - module Rest - ## - # REST client for the CloudShellService service. - # - # API for interacting with Google Cloud Shell. Each user of Cloud Shell has at - # least one environment, which has the ID "default". Environment consists of a - # Docker image defining what is installed on the environment and a home - # directory containing the user's data that will remain across sessions. - # Clients use this API to start and fetch information about their environment, - # which can then be used to connect to that environment via a separate SSH - # client. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudshell.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_shell_service_stub - - ## - # Configure the CloudShellService Client class. - # - # See {::Google::Cloud::Shell::V1::CloudShellService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudShellService clients - # ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Shell", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_environment.timeout = 60.0 - default_config.rpcs.get_environment.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.start_environment.timeout = 60.0 - - default_config.rpcs.authorize_environment.timeout = 60.0 - - default_config.rpcs.add_public_key.timeout = 60.0 - - default_config.rpcs.remove_public_key.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudShellService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Shell::V1::CloudShellService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_shell_service_stub.universe_domain - end - - ## - # Create a new CloudShellService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudShellService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @cloud_shell_service_stub = ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_shell_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Shell::V1::CloudShellService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_shell_service_stub.logger - end - - # Service calls - - ## - # Gets an environment. Returns NOT_FOUND if the environment does not exist. - # - # @overload get_environment(request, options = nil) - # Pass arguments to `get_environment` via a request object, either of type - # {::Google::Cloud::Shell::V1::GetEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Shell::V1::GetEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_environment(name: nil) - # Pass arguments to `get_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested resource, for example `users/me/environments/default` - # or `users/someone@example.com/environments/default`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Shell::V1::Environment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Shell::V1::Environment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/shell/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Shell::V1::GetEnvironmentRequest.new - # - # # Call the get_environment method. - # result = client.get_environment request - # - # # The returned object is of type Google::Cloud::Shell::V1::Environment. - # p result - # - def get_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::GetEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_environment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_environment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_shell_service_stub.get_environment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts an existing environment, allowing clients to connect to it. The - # returned operation will contain an instance of StartEnvironmentMetadata in - # its metadata field. Users can wait for the environment to start by polling - # this operation via GetOperation. Once the environment has finished starting - # and is ready to accept connections, the operation will contain a - # StartEnvironmentResponse in its response field. - # - # @overload start_environment(request, options = nil) - # Pass arguments to `start_environment` via a request object, either of type - # {::Google::Cloud::Shell::V1::StartEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Shell::V1::StartEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload start_environment(name: nil, access_token: nil, public_keys: nil) - # Pass arguments to `start_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource that should be started, for example - # `users/me/environments/default` or - # `users/someone@example.com/environments/default`. - # @param access_token [::String] - # The initial access token passed to the environment. If this is present and - # valid, the environment will be pre-authenticated with gcloud so that the - # user can run gcloud commands in Cloud Shell without having to log in. This - # code can be updated later by calling AuthorizeEnvironment. - # @param public_keys [::Array<::String>] - # Public keys that should be added to the environment before it is started. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/shell/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Shell::V1::StartEnvironmentRequest.new - # - # # Call the start_environment method. - # result = client.start_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def start_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::StartEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.start_environment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.start_environment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_shell_service_stub.start_environment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sends OAuth credentials to a running environment on behalf of a user. When - # this completes, the environment will be authorized to run various Google - # Cloud command line tools without requiring the user to manually - # authenticate. - # - # @overload authorize_environment(request, options = nil) - # Pass arguments to `authorize_environment` via a request object, either of type - # {::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload authorize_environment(name: nil, access_token: nil, id_token: nil, expire_time: nil) - # Pass arguments to `authorize_environment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Name of the resource that should receive the credentials, for example - # `users/me/environments/default` or - # `users/someone@example.com/environments/default`. - # @param access_token [::String] - # The OAuth access token that should be sent to the environment. - # @param id_token [::String] - # The OAuth ID token that should be sent to the environment. - # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] - # The time when the credentials expire. If not set, defaults to one hour from - # when the server received the request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/shell/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new - # - # # Call the authorize_environment method. - # result = client.authorize_environment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def authorize_environment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.authorize_environment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.authorize_environment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.authorize_environment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_shell_service_stub.authorize_environment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a public SSH key to an environment, allowing clients with the - # corresponding private key to connect to that environment via SSH. If a key - # with the same content already exists, this will error with ALREADY_EXISTS. - # - # @overload add_public_key(request, options = nil) - # Pass arguments to `add_public_key` via a request object, either of type - # {::Google::Cloud::Shell::V1::AddPublicKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Shell::V1::AddPublicKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload add_public_key(environment: nil, key: nil) - # Pass arguments to `add_public_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param environment [::String] - # Environment this key should be added to, e.g. - # `users/me/environments/default`. - # @param key [::String] - # Key that should be added to the environment. Supported formats are - # `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` - # (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and - # `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as - # <format> <content>, where <content> part is encoded with - # Base64. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/shell/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Shell::V1::AddPublicKeyRequest.new - # - # # Call the add_public_key method. - # result = client.add_public_key request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def add_public_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::AddPublicKeyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.add_public_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.add_public_key.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.add_public_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_shell_service_stub.add_public_key request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a public SSH key from an environment. Clients will no longer be - # able to connect to the environment using the corresponding private key. - # If a key with the same content is not present, this will error with - # NOT_FOUND. - # - # @overload remove_public_key(request, options = nil) - # Pass arguments to `remove_public_key` via a request object, either of type - # {::Google::Cloud::Shell::V1::RemovePublicKeyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Shell::V1::RemovePublicKeyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload remove_public_key(environment: nil, key: nil) - # Pass arguments to `remove_public_key` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param environment [::String] - # Environment this key should be removed from, e.g. - # `users/me/environments/default`. - # @param key [::String] - # Key that should be removed from the environment. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/shell/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Shell::V1::RemovePublicKeyRequest.new - # - # # Call the remove_public_key method. - # result = client.remove_public_key request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def remove_public_key request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Shell::V1::RemovePublicKeyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.remove_public_key.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.remove_public_key.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.remove_public_key.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_shell_service_stub.remove_public_key request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudShellService REST API. - # - # This class represents the configuration for CloudShellService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Shell::V1::CloudShellService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_environment to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_environment.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_environment.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudshell.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the CloudShellService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_environment - ## - # RPC-specific configuration for `start_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :start_environment - ## - # RPC-specific configuration for `authorize_environment` - # @return [::Gapic::Config::Method] - # - attr_reader :authorize_environment - ## - # RPC-specific configuration for `add_public_key` - # @return [::Gapic::Config::Method] - # - attr_reader :add_public_key - ## - # RPC-specific configuration for `remove_public_key` - # @return [::Gapic::Config::Method] - # - attr_reader :remove_public_key - - # @private - def initialize parent_rpcs = nil - get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment - @get_environment = ::Gapic::Config::Method.new get_environment_config - start_environment_config = parent_rpcs.start_environment if parent_rpcs.respond_to? :start_environment - @start_environment = ::Gapic::Config::Method.new start_environment_config - authorize_environment_config = parent_rpcs.authorize_environment if parent_rpcs.respond_to? :authorize_environment - @authorize_environment = ::Gapic::Config::Method.new authorize_environment_config - add_public_key_config = parent_rpcs.add_public_key if parent_rpcs.respond_to? :add_public_key - @add_public_key = ::Gapic::Config::Method.new add_public_key_config - remove_public_key_config = parent_rpcs.remove_public_key if parent_rpcs.respond_to? :remove_public_key - @remove_public_key = ::Gapic::Config::Method.new remove_public_key_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.rb deleted file mode 100644 index 3187ad80f71c..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Shell - module V1 - module CloudShellService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudshell.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudShellService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudShellService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Shell::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudshell.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.rb deleted file mode 100644 index 6b15a0548b64..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloud_shell_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/shell/v1/cloudshell_pb" - -module Google - module Cloud - module Shell - module V1 - module CloudShellService - module Rest - ## - # REST service stub for the CloudShellService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_environment REST call - # - # @param request_pb [::Google::Cloud::Shell::V1::GetEnvironmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Shell::V1::Environment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Shell::V1::Environment] - # A result object deserialized from the server's reply - def get_environment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_environment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_environment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Shell::V1::Environment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the start_environment REST call - # - # @param request_pb [::Google::Cloud::Shell::V1::StartEnvironmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def start_environment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_environment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "start_environment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the authorize_environment REST call - # - # @param request_pb [::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def authorize_environment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_authorize_environment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "authorize_environment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the add_public_key REST call - # - # @param request_pb [::Google::Cloud::Shell::V1::AddPublicKeyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def add_public_key request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_add_public_key_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "add_public_key", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the remove_public_key REST call - # - # @param request_pb [::Google::Cloud::Shell::V1::RemovePublicKeyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def remove_public_key request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_remove_public_key_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "remove_public_key", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_environment REST call - # - # @param request_pb [::Google::Cloud::Shell::V1::GetEnvironmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_environment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^users/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_environment REST call - # - # @param request_pb [::Google::Cloud::Shell::V1::StartEnvironmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_start_environment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:start", - body: "*", - matches: [ - ["name", %r{^users/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the authorize_environment REST call - # - # @param request_pb [::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_authorize_environment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:authorize", - body: "*", - matches: [ - ["name", %r{^users/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the add_public_key REST call - # - # @param request_pb [::Google::Cloud::Shell::V1::AddPublicKeyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_add_public_key_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{environment}:addPublicKey", - body: "*", - matches: [ - ["environment", %r{^users/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the remove_public_key REST call - # - # @param request_pb [::Google::Cloud::Shell::V1::RemovePublicKeyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_remove_public_key_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{environment}:removePublicKey", - body: "*", - matches: [ - ["environment", %r{^users/[^/]+/environments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_pb.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_pb.rb deleted file mode 100644 index 553b989af184..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/shell/v1/cloudshell.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/shell/v1/cloudshell.proto\x12\x15google.cloud.shell.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x03\n\x0b\x45nvironment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0c\x64ocker_image\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12<\n\x05state\x18\x04 \x01(\x0e\x32(.google.cloud.shell.v1.Environment.StateB\x03\xe0\x41\x03\x12\x15\n\x08web_host\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cssh_username\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08ssh_host\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08ssh_port\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0bpublic_keys\x18\x08 \x03(\tB\x03\xe0\x41\x03\"U\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUSPENDED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04:S\xea\x41P\n%cloudshell.googleapis.com/Environment\x12\'users/{user}/environments/{environment}\"T\n\x15GetEnvironmentRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%cloudshell.googleapis.com/Environment\"\x1b\n\x19\x43reateEnvironmentMetadata\"\x1b\n\x19\x44\x65leteEnvironmentMetadata\"R\n\x17StartEnvironmentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x02 \x01(\t\x12\x13\n\x0bpublic_keys\x18\x03 \x03(\t\"\x84\x01\n\x1b\x41uthorizeEnvironmentRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x02 \x01(\t\x12\x10\n\x08id_token\x18\x04 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x1e\n\x1c\x41uthorizeEnvironmentResponse\"\x1e\n\x1c\x41uthorizeEnvironmentMetadata\"\xd2\x01\n\x18StartEnvironmentMetadata\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x35.google.cloud.shell.v1.StartEnvironmentMetadata.State\"p\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08STARTING\x10\x01\x12\x14\n\x10UNARCHIVING_DISK\x10\x02\x12\x1e\n\x1a\x41WAITING_COMPUTE_RESOURCES\x10\x04\x12\x0c\n\x08\x46INISHED\x10\x03\"S\n\x18StartEnvironmentResponse\x12\x37\n\x0b\x65nvironment\x18\x01 \x01(\x0b\x32\".google.cloud.shell.v1.Environment\"7\n\x13\x41\x64\x64PublicKeyRequest\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\"#\n\x14\x41\x64\x64PublicKeyResponse\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x16\n\x14\x41\x64\x64PublicKeyMetadata\":\n\x16RemovePublicKeyRequest\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\"\x19\n\x17RemovePublicKeyResponse\"\x19\n\x17RemovePublicKeyMetadata\"\x9e\x02\n\x16\x43loudShellErrorDetails\x12O\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x41.google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode\"\xb2\x01\n\x13\x43loudShellErrorCode\x12&\n\"CLOUD_SHELL_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x15\n\x11IMAGE_UNAVAILABLE\x10\x01\x12\x18\n\x14\x43LOUD_SHELL_DISABLED\x10\x02\x12\x11\n\rTOS_VIOLATION\x10\x04\x12\x12\n\x0eQUOTA_EXCEEDED\x10\x05\x12\x1b\n\x17\x45NVIRONMENT_UNAVAILABLE\x10\x06\x32\xd4\x08\n\x11\x43loudShellService\x12\x94\x01\n\x0eGetEnvironment\x12,.google.cloud.shell.v1.GetEnvironmentRequest\x1a\".google.cloud.shell.v1.Environment\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=users/*/environments/*}\x12\xcc\x01\n\x10StartEnvironment\x12..google.cloud.shell.v1.StartEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41\x34\n\x18StartEnvironmentResponse\x12\x18StartEnvironmentMetadata\x82\xd3\xe4\x93\x02,\"\'/v1/{name=users/*/environments/*}:start:\x01*\x12\xe0\x01\n\x14\x41uthorizeEnvironment\x12\x32.google.cloud.shell.v1.AuthorizeEnvironmentRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41<\n\x1c\x41uthorizeEnvironmentResponse\x12\x1c\x41uthorizeEnvironmentMetadata\x82\xd3\xe4\x93\x02\x30\"+/v1/{name=users/*/environments/*}:authorize:\x01*\x12\xca\x01\n\x0c\x41\x64\x64PublicKey\x12*.google.cloud.shell.v1.AddPublicKeyRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41,\n\x14\x41\x64\x64PublicKeyResponse\x12\x14\x41\x64\x64PublicKeyMetadata\x82\xd3\xe4\x93\x02:\"5/v1/{environment=users/*/environments/*}:addPublicKey:\x01*\x12\xd9\x01\n\x0fRemovePublicKey\x12-.google.cloud.shell.v1.RemovePublicKeyRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x32\n\x17RemovePublicKeyResponse\x12\x17RemovePublicKeyMetadata\x82\xd3\xe4\x93\x02=\"8/v1/{environment=users/*/environments/*}:removePublicKey:\x01*\x1aM\xca\x41\x19\x63loudshell.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB_\n\x19\x63om.google.cloud.shell.v1B\x0f\x43loudShellProtoP\x01Z/cloud.google.com/go/shell/apiv1/shellpb;shellpbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Shell - module V1 - Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.Environment").msgclass - Environment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.Environment.State").enummodule - GetEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.GetEnvironmentRequest").msgclass - CreateEnvironmentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.CreateEnvironmentMetadata").msgclass - DeleteEnvironmentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.DeleteEnvironmentMetadata").msgclass - StartEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.StartEnvironmentRequest").msgclass - AuthorizeEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AuthorizeEnvironmentRequest").msgclass - AuthorizeEnvironmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AuthorizeEnvironmentResponse").msgclass - AuthorizeEnvironmentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AuthorizeEnvironmentMetadata").msgclass - StartEnvironmentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.StartEnvironmentMetadata").msgclass - StartEnvironmentMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.StartEnvironmentMetadata.State").enummodule - StartEnvironmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.StartEnvironmentResponse").msgclass - AddPublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AddPublicKeyRequest").msgclass - AddPublicKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AddPublicKeyResponse").msgclass - AddPublicKeyMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.AddPublicKeyMetadata").msgclass - RemovePublicKeyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.RemovePublicKeyRequest").msgclass - RemovePublicKeyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.RemovePublicKeyResponse").msgclass - RemovePublicKeyMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.RemovePublicKeyMetadata").msgclass - CloudShellErrorDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.CloudShellErrorDetails").msgclass - CloudShellErrorDetails::CloudShellErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb deleted file mode 100644 index a9cf73ced654..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/cloudshell_services_pb.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/shell/v1/cloudshell.proto for package 'google.cloud.shell.v1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/shell/v1/cloudshell_pb' - -module Google - module Cloud - module Shell - module V1 - module CloudShellService - # API for interacting with Google Cloud Shell. Each user of Cloud Shell has at - # least one environment, which has the ID "default". Environment consists of a - # Docker image defining what is installed on the environment and a home - # directory containing the user's data that will remain across sessions. - # Clients use this API to start and fetch information about their environment, - # which can then be used to connect to that environment via a separate SSH - # client. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.shell.v1.CloudShellService' - - # Gets an environment. Returns NOT_FOUND if the environment does not exist. - rpc :GetEnvironment, ::Google::Cloud::Shell::V1::GetEnvironmentRequest, ::Google::Cloud::Shell::V1::Environment - # Starts an existing environment, allowing clients to connect to it. The - # returned operation will contain an instance of StartEnvironmentMetadata in - # its metadata field. Users can wait for the environment to start by polling - # this operation via GetOperation. Once the environment has finished starting - # and is ready to accept connections, the operation will contain a - # StartEnvironmentResponse in its response field. - rpc :StartEnvironment, ::Google::Cloud::Shell::V1::StartEnvironmentRequest, ::Google::Longrunning::Operation - # Sends OAuth credentials to a running environment on behalf of a user. When - # this completes, the environment will be authorized to run various Google - # Cloud command line tools without requiring the user to manually - # authenticate. - rpc :AuthorizeEnvironment, ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest, ::Google::Longrunning::Operation - # Adds a public SSH key to an environment, allowing clients with the - # corresponding private key to connect to that environment via SSH. If a key - # with the same content already exists, this will error with ALREADY_EXISTS. - rpc :AddPublicKey, ::Google::Cloud::Shell::V1::AddPublicKeyRequest, ::Google::Longrunning::Operation - # Removes a public SSH key from an environment. Clients will no longer be - # able to connect to the environment using the corresponding private key. - # If a key with the same content is not present, this will error with - # NOT_FOUND. - rpc :RemovePublicKey, ::Google::Cloud::Shell::V1::RemovePublicKeyRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.rb deleted file mode 100644 index a29fd5893233..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/shell/v1/cloud_shell_service/rest" -require "google/cloud/shell/v1/version" - -module Google - module Cloud - module Shell - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/shell/v1/rest" - # client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/version.rb b/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/version.rb deleted file mode 100644 index b3e028a7b6d5..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/lib/google/cloud/shell/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Shell - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-shell-v1/proto_docs/README.md deleted file mode 100644 index b2196eb48b44..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Shell V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.rb deleted file mode 100644 index 56848a1f0233..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/cloud/shell/v1/cloudshell.rb +++ /dev/null @@ -1,331 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Shell - module V1 - # A Cloud Shell environment, which is defined as the combination of a Docker - # image specifying what is installed on the environment and a home directory - # containing the user's data that will remain across sessions. Each user has - # at least an environment with the ID "default". - # @!attribute [rw] name - # @return [::String] - # Immutable. Full name of this resource, in the format - # `users/{owner_email}/environments/{environment_id}`. `{owner_email}` is the - # email address of the user to whom this environment belongs, and - # `{environment_id}` is the identifier of this environment. For example, - # `users/someone@example.com/environments/default`. - # @!attribute [r] id - # @return [::String] - # Output only. The environment's identifier, unique among the user's - # environments. - # @!attribute [rw] docker_image - # @return [::String] - # Required. Immutable. Full path to the Docker image used to run this environment, e.g. - # "gcr.io/dev-con/cloud-devshell:latest". - # @!attribute [r] state - # @return [::Google::Cloud::Shell::V1::Environment::State] - # Output only. Current execution state of this environment. - # @!attribute [r] web_host - # @return [::String] - # Output only. Host to which clients can connect to initiate HTTPS or WSS - # connections with the environment. - # @!attribute [r] ssh_username - # @return [::String] - # Output only. Username that clients should use when initiating SSH sessions - # with the environment. - # @!attribute [r] ssh_host - # @return [::String] - # Output only. Host to which clients can connect to initiate SSH sessions - # with the environment. - # @!attribute [r] ssh_port - # @return [::Integer] - # Output only. Port to which clients can connect to initiate SSH sessions - # with the environment. - # @!attribute [r] public_keys - # @return [::Array<::String>] - # Output only. Public keys associated with the environment. Clients can - # connect to this environment via SSH only if they possess a private key - # corresponding to at least one of these public keys. Keys can be added to or - # removed from the environment using the AddPublicKey and RemovePublicKey - # methods. - class Environment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible execution states for an environment. - module State - # The environment's states is unknown. - STATE_UNSPECIFIED = 0 - - # The environment is not running and can't be connected to. Starting the - # environment will transition it to the PENDING state. - SUSPENDED = 1 - - # The environment is being started but is not yet ready to accept - # connections. - PENDING = 2 - - # The environment is running and ready to accept connections. It will - # automatically transition back to DISABLED after a period of inactivity or - # if another environment is started. - RUNNING = 3 - - # The environment is being deleted and can't be connected to. - DELETING = 4 - end - end - - # Request message for - # {::Google::Cloud::Shell::V1::CloudShellService::Client#get_environment GetEnvironment}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the requested resource, for example `users/me/environments/default` - # or `users/someone@example.com/environments/default`. - class GetEnvironmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message included in the metadata field of operations returned from - # [CreateEnvironment][google.cloud.shell.v1.CloudShellService.CreateEnvironment]. - class CreateEnvironmentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message included in the metadata field of operations returned from - # [DeleteEnvironment][google.cloud.shell.v1.CloudShellService.DeleteEnvironment]. - class DeleteEnvironmentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Shell::V1::CloudShellService::Client#start_environment StartEnvironment}. - # @!attribute [rw] name - # @return [::String] - # Name of the resource that should be started, for example - # `users/me/environments/default` or - # `users/someone@example.com/environments/default`. - # @!attribute [rw] access_token - # @return [::String] - # The initial access token passed to the environment. If this is present and - # valid, the environment will be pre-authenticated with gcloud so that the - # user can run gcloud commands in Cloud Shell without having to log in. This - # code can be updated later by calling AuthorizeEnvironment. - # @!attribute [rw] public_keys - # @return [::Array<::String>] - # Public keys that should be added to the environment before it is started. - class StartEnvironmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment AuthorizeEnvironment}. - # @!attribute [rw] name - # @return [::String] - # Name of the resource that should receive the credentials, for example - # `users/me/environments/default` or - # `users/someone@example.com/environments/default`. - # @!attribute [rw] access_token - # @return [::String] - # The OAuth access token that should be sent to the environment. - # @!attribute [rw] id_token - # @return [::String] - # The OAuth ID token that should be sent to the environment. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # The time when the credentials expire. If not set, defaults to one hour from - # when the server received the request. - class AuthorizeEnvironmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment AuthorizeEnvironment}. - class AuthorizeEnvironmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message included in the metadata field of operations returned from - # {::Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment AuthorizeEnvironment}. - class AuthorizeEnvironmentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message included in the metadata field of operations returned from - # {::Google::Cloud::Shell::V1::CloudShellService::Client#start_environment StartEnvironment}. - # @!attribute [rw] state - # @return [::Google::Cloud::Shell::V1::StartEnvironmentMetadata::State] - # Current state of the environment being started. - class StartEnvironmentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states an environment might transition between during startup. - # These states are not normally actionable by clients, but may be used to - # show a progress message to the user. An environment won't necessarily go - # through all of these states when starting. More states are likely to be - # added in the future. - module State - # The environment's start state is unknown. - STATE_UNSPECIFIED = 0 - - # The environment is in the process of being started, but no additional - # details are available. - STARTING = 1 - - # Startup is waiting for the user's disk to be unarchived. This can happen - # when the user returns to Cloud Shell after not having used it for a - # while, and suggests that startup will take longer than normal. - UNARCHIVING_DISK = 2 - - # Startup is waiting for compute resources to be assigned to the - # environment. This should normally happen very quickly, but an environment - # might stay in this state for an extended period of time if the system is - # experiencing heavy load. - AWAITING_COMPUTE_RESOURCES = 4 - - # Startup has completed. If the start operation was successful, the user - # should be able to establish an SSH connection to their environment. - # Otherwise, the operation will contain details of the failure. - FINISHED = 3 - end - end - - # Message included in the response field of operations returned from - # {::Google::Cloud::Shell::V1::CloudShellService::Client#start_environment StartEnvironment} - # once the operation is complete. - # @!attribute [rw] environment - # @return [::Google::Cloud::Shell::V1::Environment] - # Environment that was started. - class StartEnvironmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key AddPublicKey}. - # @!attribute [rw] environment - # @return [::String] - # Environment this key should be added to, e.g. - # `users/me/environments/default`. - # @!attribute [rw] key - # @return [::String] - # Key that should be added to the environment. Supported formats are - # `ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256` - # (see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and - # `ecdsa-sha2-nistp521` (see RFC5656). It should be structured as - # <format> <content>, where <content> part is encoded with - # Base64. - class AddPublicKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key AddPublicKey}. - # @!attribute [rw] key - # @return [::String] - # Key that was added to the environment. - class AddPublicKeyResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message included in the metadata field of operations returned from - # {::Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key AddPublicKey}. - class AddPublicKeyMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key RemovePublicKey}. - # @!attribute [rw] environment - # @return [::String] - # Environment this key should be removed from, e.g. - # `users/me/environments/default`. - # @!attribute [rw] key - # @return [::String] - # Key that should be removed from the environment. - class RemovePublicKeyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key RemovePublicKey}. - class RemovePublicKeyResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message included in the metadata field of operations returned from - # {::Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key RemovePublicKey}. - class RemovePublicKeyMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Cloud-shell specific information that will be included as details in failure - # responses. - # @!attribute [rw] code - # @return [::Google::Cloud::Shell::V1::CloudShellErrorDetails::CloudShellErrorCode] - # Code indicating the specific error the occurred. - class CloudShellErrorDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Set of possible errors returned from API calls. - module CloudShellErrorCode - # An unknown error occurred. - CLOUD_SHELL_ERROR_CODE_UNSPECIFIED = 0 - - # The image used by the Cloud Shell environment either does not exist or - # the user does not have access to it. - IMAGE_UNAVAILABLE = 1 - - # Cloud Shell has been disabled by an administrator for the user making the - # request. - CLOUD_SHELL_DISABLED = 2 - - # Cloud Shell has been permanently disabled due to a Terms of Service - # violation by the user. - TOS_VIOLATION = 4 - - # The user has exhausted their weekly Cloud Shell quota, and Cloud Shell - # will be disabled until the quota resets. - QUOTA_EXCEEDED = 5 - - # The Cloud Shell environment is unavailable and cannot be connected to at - # the moment. - ENVIRONMENT_UNAVAILABLE = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-shell-v1/snippets/Gemfile deleted file mode 100644 index bf1674af9c6d..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-shell-v1", path: "../" -else - gem "google-cloud-shell-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/add_public_key.rb b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/add_public_key.rb deleted file mode 100644 index da6e75c81361..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/add_public_key.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudshell_v1_generated_CloudShellService_AddPublicKey_sync] -require "google/cloud/shell/v1" - -## -# Snippet for the add_public_key call in the CloudShellService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key. -# -def add_public_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Shell::V1::CloudShellService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Shell::V1::AddPublicKeyRequest.new - - # Call the add_public_key method. - result = client.add_public_key request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudshell_v1_generated_CloudShellService_AddPublicKey_sync] diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/authorize_environment.rb b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/authorize_environment.rb deleted file mode 100644 index b16bf5d9babc..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/authorize_environment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudshell_v1_generated_CloudShellService_AuthorizeEnvironment_sync] -require "google/cloud/shell/v1" - -## -# Snippet for the authorize_environment call in the CloudShellService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment. -# -def authorize_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Shell::V1::CloudShellService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new - - # Call the authorize_environment method. - result = client.authorize_environment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudshell_v1_generated_CloudShellService_AuthorizeEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/get_environment.rb b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/get_environment.rb deleted file mode 100644 index c36b2f501286..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/get_environment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudshell_v1_generated_CloudShellService_GetEnvironment_sync] -require "google/cloud/shell/v1" - -## -# Snippet for the get_environment call in the CloudShellService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Shell::V1::CloudShellService::Client#get_environment. -# -def get_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Shell::V1::CloudShellService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Shell::V1::GetEnvironmentRequest.new - - # Call the get_environment method. - result = client.get_environment request - - # The returned object is of type Google::Cloud::Shell::V1::Environment. - p result -end -# [END cloudshell_v1_generated_CloudShellService_GetEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/remove_public_key.rb b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/remove_public_key.rb deleted file mode 100644 index aefbd90a0735..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/remove_public_key.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudshell_v1_generated_CloudShellService_RemovePublicKey_sync] -require "google/cloud/shell/v1" - -## -# Snippet for the remove_public_key call in the CloudShellService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key. -# -def remove_public_key - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Shell::V1::CloudShellService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Shell::V1::RemovePublicKeyRequest.new - - # Call the remove_public_key method. - result = client.remove_public_key request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudshell_v1_generated_CloudShellService_RemovePublicKey_sync] diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/start_environment.rb b/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/start_environment.rb deleted file mode 100644 index 4f91952a7a8c..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/snippets/cloud_shell_service/start_environment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudshell_v1_generated_CloudShellService_StartEnvironment_sync] -require "google/cloud/shell/v1" - -## -# Snippet for the start_environment call in the CloudShellService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Shell::V1::CloudShellService::Client#start_environment. -# -def start_environment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Shell::V1::CloudShellService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Shell::V1::StartEnvironmentRequest.new - - # Call the start_environment method. - result = client.start_environment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudshell_v1_generated_CloudShellService_StartEnvironment_sync] diff --git a/owl-bot-staging/google-cloud-shell-v1/snippets/snippet_metadata_google.cloud.shell.v1.json b/owl-bot-staging/google-cloud-shell-v1/snippets/snippet_metadata_google.cloud.shell.v1.json deleted file mode 100644 index 5f8796a64fec..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/snippets/snippet_metadata_google.cloud.shell.v1.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-shell-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.shell.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudshell_v1_generated_CloudShellService_GetEnvironment_sync", - "title": "Snippet for the get_environment call in the CloudShellService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Shell::V1::CloudShellService::Client#get_environment.", - "file": "cloud_shell_service/get_environment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_environment", - "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client#get_environment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Shell::V1::GetEnvironmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Shell::V1::Environment", - "client": { - "short_name": "CloudShellService::Client", - "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client" - }, - "method": { - "short_name": "GetEnvironment", - "full_name": "google.cloud.shell.v1.CloudShellService.GetEnvironment", - "service": { - "short_name": "CloudShellService", - "full_name": "google.cloud.shell.v1.CloudShellService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudshell_v1_generated_CloudShellService_StartEnvironment_sync", - "title": "Snippet for the start_environment call in the CloudShellService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Shell::V1::CloudShellService::Client#start_environment.", - "file": "cloud_shell_service/start_environment.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_environment", - "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client#start_environment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Shell::V1::StartEnvironmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudShellService::Client", - "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client" - }, - "method": { - "short_name": "StartEnvironment", - "full_name": "google.cloud.shell.v1.CloudShellService.StartEnvironment", - "service": { - "short_name": "CloudShellService", - "full_name": "google.cloud.shell.v1.CloudShellService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudshell_v1_generated_CloudShellService_AuthorizeEnvironment_sync", - "title": "Snippet for the authorize_environment call in the CloudShellService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment.", - "file": "cloud_shell_service/authorize_environment.rb", - "language": "RUBY", - "client_method": { - "short_name": "authorize_environment", - "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client#authorize_environment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudShellService::Client", - "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client" - }, - "method": { - "short_name": "AuthorizeEnvironment", - "full_name": "google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment", - "service": { - "short_name": "CloudShellService", - "full_name": "google.cloud.shell.v1.CloudShellService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudshell_v1_generated_CloudShellService_AddPublicKey_sync", - "title": "Snippet for the add_public_key call in the CloudShellService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key.", - "file": "cloud_shell_service/add_public_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "add_public_key", - "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client#add_public_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Shell::V1::AddPublicKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudShellService::Client", - "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client" - }, - "method": { - "short_name": "AddPublicKey", - "full_name": "google.cloud.shell.v1.CloudShellService.AddPublicKey", - "service": { - "short_name": "CloudShellService", - "full_name": "google.cloud.shell.v1.CloudShellService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudshell_v1_generated_CloudShellService_RemovePublicKey_sync", - "title": "Snippet for the remove_public_key call in the CloudShellService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key.", - "file": "cloud_shell_service/remove_public_key.rb", - "language": "RUBY", - "client_method": { - "short_name": "remove_public_key", - "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client#remove_public_key", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Shell::V1::RemovePublicKeyRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudShellService::Client", - "full_name": "::Google::Cloud::Shell::V1::CloudShellService::Client" - }, - "method": { - "short_name": "RemovePublicKey", - "full_name": "google.cloud.shell.v1.CloudShellService.RemovePublicKey", - "service": { - "short_name": "CloudShellService", - "full_name": "google.cloud.shell.v1.CloudShellService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_test.rb b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_test.rb deleted file mode 100644 index 5749a70f2d54..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/shell/v1/cloudshell_pb" -require "google/cloud/shell/v1/cloudshell_services_pb" -require "google/cloud/shell/v1/cloud_shell_service" - -class ::Google::Cloud::Shell::V1::CloudShellService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Shell::V1::CloudShellService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Shell::V1::CloudShellService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_test.rb b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_test.rb deleted file mode 100644 index 04962e8b8cea..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/shell/v1/cloud_shell_service" - -class ::Google::Cloud::Shell::V1::CloudShellService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_environment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.environment_path user: "value0", environment: "value1" - assert_equal "users/value0/environments/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_test.rb b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_test.rb deleted file mode 100644 index bf9df56a12a7..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_rest_test.rb +++ /dev/null @@ -1,376 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/shell/v1/cloudshell_pb" -require "google/cloud/shell/v1/cloud_shell_service/rest" - - -class ::Google::Cloud::Shell::V1::CloudShellService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_environment - # Create test objects. - client_result = ::Google::Cloud::Shell::V1::Environment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.stub :transcode_get_environment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_environment_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_environment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_environment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_environment ::Google::Cloud::Shell::V1::GetEnvironmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_environment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_environment(::Google::Cloud::Shell::V1::GetEnvironmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_environment_client_stub.call_count - end - end - end - - def test_start_environment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - access_token = "hello world" - public_keys = ["hello world"] - - start_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.stub :transcode_start_environment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_environment_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.start_environment({ name: name, access_token: access_token, public_keys: public_keys }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.start_environment name: name, access_token: access_token, public_keys: public_keys do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.start_environment ::Google::Cloud::Shell::V1::StartEnvironmentRequest.new(name: name, access_token: access_token, public_keys: public_keys) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.start_environment({ name: name, access_token: access_token, public_keys: public_keys }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.start_environment(::Google::Cloud::Shell::V1::StartEnvironmentRequest.new(name: name, access_token: access_token, public_keys: public_keys), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_environment_client_stub.call_count - end - end - end - - def test_authorize_environment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - access_token = "hello world" - id_token = "hello world" - expire_time = {} - - authorize_environment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.stub :transcode_authorize_environment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, authorize_environment_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.authorize_environment({ name: name, access_token: access_token, id_token: id_token, expire_time: expire_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.authorize_environment name: name, access_token: access_token, id_token: id_token, expire_time: expire_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.authorize_environment ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new(name: name, access_token: access_token, id_token: id_token, expire_time: expire_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.authorize_environment({ name: name, access_token: access_token, id_token: id_token, expire_time: expire_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.authorize_environment(::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new(name: name, access_token: access_token, id_token: id_token, expire_time: expire_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, authorize_environment_client_stub.call_count - end - end - end - - def test_add_public_key - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - environment = "hello world" - key = "hello world" - - add_public_key_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.stub :transcode_add_public_key_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, add_public_key_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.add_public_key({ environment: environment, key: key }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.add_public_key environment: environment, key: key do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.add_public_key ::Google::Cloud::Shell::V1::AddPublicKeyRequest.new(environment: environment, key: key) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.add_public_key({ environment: environment, key: key }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.add_public_key(::Google::Cloud::Shell::V1::AddPublicKeyRequest.new(environment: environment, key: key), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, add_public_key_client_stub.call_count - end - end - end - - def test_remove_public_key - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - environment = "hello world" - key = "hello world" - - remove_public_key_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Shell::V1::CloudShellService::Rest::ServiceStub.stub :transcode_remove_public_key_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, remove_public_key_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.remove_public_key({ environment: environment, key: key }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.remove_public_key environment: environment, key: key do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.remove_public_key ::Google::Cloud::Shell::V1::RemovePublicKeyRequest.new(environment: environment, key: key) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.remove_public_key({ environment: environment, key: key }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.remove_public_key(::Google::Cloud::Shell::V1::RemovePublicKeyRequest.new(environment: environment, key: key), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, remove_public_key_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Shell::V1::CloudShellService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_test.rb b/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_test.rb deleted file mode 100644 index a2ff907f6c85..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/test/google/cloud/shell/v1/cloud_shell_service_test.rb +++ /dev/null @@ -1,442 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/shell/v1/cloudshell_pb" -require "google/cloud/shell/v1/cloud_shell_service" - -class ::Google::Cloud::Shell::V1::CloudShellService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_environment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Shell::V1::Environment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_environment, name - assert_kind_of ::Google::Cloud::Shell::V1::GetEnvironmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_environment_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_environment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_environment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_environment ::Google::Cloud::Shell::V1::GetEnvironmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_environment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_environment(::Google::Cloud::Shell::V1::GetEnvironmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_environment_client_stub.call_rpc_count - end - end - - def test_start_environment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - access_token = "hello world" - public_keys = ["hello world"] - - start_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_environment, name - assert_kind_of ::Google::Cloud::Shell::V1::StartEnvironmentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["access_token"] - assert_equal ["hello world"], request["public_keys"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_environment_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.start_environment({ name: name, access_token: access_token, public_keys: public_keys }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.start_environment name: name, access_token: access_token, public_keys: public_keys do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.start_environment ::Google::Cloud::Shell::V1::StartEnvironmentRequest.new(name: name, access_token: access_token, public_keys: public_keys) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.start_environment({ name: name, access_token: access_token, public_keys: public_keys }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.start_environment(::Google::Cloud::Shell::V1::StartEnvironmentRequest.new(name: name, access_token: access_token, public_keys: public_keys), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, start_environment_client_stub.call_rpc_count - end - end - - def test_authorize_environment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - access_token = "hello world" - id_token = "hello world" - expire_time = {} - - authorize_environment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :authorize_environment, name - assert_kind_of ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["access_token"] - assert_equal "hello world", request["id_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["expire_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, authorize_environment_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.authorize_environment({ name: name, access_token: access_token, id_token: id_token, expire_time: expire_time }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.authorize_environment name: name, access_token: access_token, id_token: id_token, expire_time: expire_time do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.authorize_environment ::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new(name: name, access_token: access_token, id_token: id_token, expire_time: expire_time) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.authorize_environment({ name: name, access_token: access_token, id_token: id_token, expire_time: expire_time }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.authorize_environment(::Google::Cloud::Shell::V1::AuthorizeEnvironmentRequest.new(name: name, access_token: access_token, id_token: id_token, expire_time: expire_time), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, authorize_environment_client_stub.call_rpc_count - end - end - - def test_add_public_key - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - environment = "hello world" - key = "hello world" - - add_public_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :add_public_key, name - assert_kind_of ::Google::Cloud::Shell::V1::AddPublicKeyRequest, request - assert_equal "hello world", request["environment"] - assert_equal "hello world", request["key"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, add_public_key_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.add_public_key({ environment: environment, key: key }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.add_public_key environment: environment, key: key do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.add_public_key ::Google::Cloud::Shell::V1::AddPublicKeyRequest.new(environment: environment, key: key) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.add_public_key({ environment: environment, key: key }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.add_public_key(::Google::Cloud::Shell::V1::AddPublicKeyRequest.new(environment: environment, key: key), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, add_public_key_client_stub.call_rpc_count - end - end - - def test_remove_public_key - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - environment = "hello world" - key = "hello world" - - remove_public_key_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :remove_public_key, name - assert_kind_of ::Google::Cloud::Shell::V1::RemovePublicKeyRequest, request - assert_equal "hello world", request["environment"] - assert_equal "hello world", request["key"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, remove_public_key_client_stub do - # Create client - c = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.remove_public_key({ environment: environment, key: key }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.remove_public_key environment: environment, key: key do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.remove_public_key ::Google::Cloud::Shell::V1::RemovePublicKeyRequest.new(environment: environment, key: key) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.remove_public_key({ environment: environment, key: key }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.remove_public_key(::Google::Cloud::Shell::V1::RemovePublicKeyRequest.new(environment: environment, key: key), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, remove_public_key_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Shell::V1::CloudShellService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Shell::V1::CloudShellService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Shell::V1::CloudShellService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Shell::V1::CloudShellService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-shell-v1/test/helper.rb b/owl-bot-staging/google-cloud-shell-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-shell-v1/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-spanner-admin-database-v1/.gitignore b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/.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-spanner-admin-database-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.repo-metadata.json deleted file mode 100644 index e3f41ff59e96..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "spanner.googleapis.com", - "api_shortname": "spanner", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-database-v1/latest", - "distribution_name": "google-cloud-spanner-admin-database-v1", - "is_cloud": true, - "language": "ruby", - "name": "spanner", - "name_pretty": "Cloud Spanner Database Admin V1 API", - "product_documentation": "https://cloud.google.com/spanner", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-admin-database-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details.", - "ruby-cloud-env-prefix": "SPANNER", - "ruby-cloud-product-url": "https://cloud.google.com/spanner", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/.rubocop.yml b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.rubocop.yml deleted file mode 100644 index 7278d0340d48..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-spanner-admin-database-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-spanner-admin-database-v1.rb" diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/.toys.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/.yardopts b/owl-bot-staging/google-cloud-spanner-admin-database-v1/.yardopts deleted file mode 100644 index 11ef47976a02..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Spanner Database Admin V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-spanner-admin-database-v1/AUTHENTICATION.md deleted file mode 100644 index dff234acc315..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-spanner-admin-database-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-spanner-admin-database-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/spanner/admin/database/v1" - -client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/spanner/admin/database/v1" - -::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-spanner-admin-database-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/spanner/admin/database/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-spanner-admin-database-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/Gemfile b/owl-bot-staging/google-cloud-spanner-admin-database-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-spanner-admin-database-v1/LICENSE.md b/owl-bot-staging/google-cloud-spanner-admin-database-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/README.md b/owl-bot-staging/google-cloud-spanner-admin-database-v1/README.md deleted file mode 100644 index 48f2166e6611..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Spanner Database Admin V1 API - -Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Spanner Database Admin V1 API. Most users should consider using -the main client gem, -[google-cloud-spanner](https://rubygems.org/gems/google-cloud-spanner). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-spanner-admin-database-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/spanner.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/spanner/admin/database/v1" - -client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new -request = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new # (request fields as keyword arguments...) -response = client.list_databases request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-database-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/spanner) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/spanner/admin/database/v1" -require "logger" - -client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-spanner`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-spanner-admin-database-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-spanner`. -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-spanner-admin-database-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-spanner-admin-database-v1/Rakefile b/owl-bot-staging/google-cloud-spanner-admin-database-v1/Rakefile deleted file mode 100644 index 49214abd44ec..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-spanner-admin-database-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SPANNER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SPANNER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SPANNER_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 SPANNER_TEST_PROJECT=test123 SPANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/spanner/admin/database/v1/database_admin/credentials" - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SPANNER_PROJECT"] = project - ENV["SPANNER_TEST_PROJECT"] = project - ENV["SPANNER_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-spanner-admin-database-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-spanner-admin-database-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-spanner-admin-database-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-spanner-admin-database-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-spanner-admin-database-v1" - header "google-cloud-spanner-admin-database-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-spanner-admin-database-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-spanner-admin-database-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-spanner-admin-database-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-spanner-admin-database-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-spanner-admin-database-v1/gapic_metadata.json deleted file mode 100644 index d7aa9420ad18..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/gapic_metadata.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.spanner.admin.database.v1", - "libraryPackage": "::Google::Cloud::Spanner::Admin::Database::V1", - "services": { - "DatabaseAdmin": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client", - "rpcs": { - "ListDatabases": { - "methods": [ - "list_databases" - ] - }, - "CreateDatabase": { - "methods": [ - "create_database" - ] - }, - "GetDatabase": { - "methods": [ - "get_database" - ] - }, - "UpdateDatabase": { - "methods": [ - "update_database" - ] - }, - "UpdateDatabaseDdl": { - "methods": [ - "update_database_ddl" - ] - }, - "DropDatabase": { - "methods": [ - "drop_database" - ] - }, - "GetDatabaseDdl": { - "methods": [ - "get_database_ddl" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "CreateBackup": { - "methods": [ - "create_backup" - ] - }, - "CopyBackup": { - "methods": [ - "copy_backup" - ] - }, - "GetBackup": { - "methods": [ - "get_backup" - ] - }, - "UpdateBackup": { - "methods": [ - "update_backup" - ] - }, - "DeleteBackup": { - "methods": [ - "delete_backup" - ] - }, - "ListBackups": { - "methods": [ - "list_backups" - ] - }, - "RestoreDatabase": { - "methods": [ - "restore_database" - ] - }, - "ListDatabaseOperations": { - "methods": [ - "list_database_operations" - ] - }, - "ListBackupOperations": { - "methods": [ - "list_backup_operations" - ] - }, - "ListDatabaseRoles": { - "methods": [ - "list_database_roles" - ] - }, - "AddSplitPoints": { - "methods": [ - "add_split_points" - ] - }, - "CreateBackupSchedule": { - "methods": [ - "create_backup_schedule" - ] - }, - "GetBackupSchedule": { - "methods": [ - "get_backup_schedule" - ] - }, - "UpdateBackupSchedule": { - "methods": [ - "update_backup_schedule" - ] - }, - "DeleteBackupSchedule": { - "methods": [ - "delete_backup_schedule" - ] - }, - "ListBackupSchedules": { - "methods": [ - "list_backup_schedules" - ] - }, - "InternalUpdateGraphOperation": { - "methods": [ - "internal_update_graph_operation" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/google-cloud-spanner-admin-database-v1.gemspec b/owl-bot-staging/google-cloud-spanner-admin-database-v1/google-cloud-spanner-admin-database-v1.gemspec deleted file mode 100644 index b5a16dfeef6c..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/google-cloud-spanner-admin-database-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/spanner/admin/database/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-spanner-admin-database-v1" - gem.version = Google::Cloud::Spanner::Admin::Database::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-admin-database-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details." - gem.summary = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.rb deleted file mode 100644 index 4a1420305d7f..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google-cloud-spanner-admin-database-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/spanner/admin/database/v1" diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.rb deleted file mode 100644 index ab4f375dca61..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/spanner/admin/database/v1/database_admin" -require "google/cloud/spanner/admin/database/v1/version" - -module Google - module Cloud - module Spanner - module Admin - module Database - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/spanner/admin/database/v1" - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/spanner/admin/database/v1" - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - module V1 - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/spanner/admin/database/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.rb deleted file mode 100644 index 31d5189b1b85..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/spanner/admin/database/v1/version" - -require "google/cloud/spanner/admin/database/v1/database_admin/credentials" -require "google/cloud/spanner/admin/database/v1/database_admin/paths" -require "google/cloud/spanner/admin/database/v1/database_admin/operations" -require "google/cloud/spanner/admin/database/v1/database_admin/client" -require "google/cloud/spanner/admin/database/v1/database_admin/rest" - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - ## - # Cloud Spanner Database Admin API - # - # The Cloud Spanner Database Admin API can be used to: - # * create, drop, and list databases - # * update the schema of pre-existing databases - # * create, delete, copy and list backups for a database - # * restore a database from an existing backup - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/spanner/admin/database/v1/database_admin" - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/spanner/admin/database/v1/database_admin/rest" - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - module DatabaseAdmin - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "database_admin", "helpers.rb" -require "google/cloud/spanner/admin/database/v1/database_admin/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb deleted file mode 100644 index 8ce5e1e179bd..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +++ /dev/null @@ -1,3660 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/spanner/admin/database/v1/spanner_database_admin_pb" - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - module DatabaseAdmin - ## - # Client for the DatabaseAdmin service. - # - # Cloud Spanner Database Admin API - # - # The Cloud Spanner Database Admin API can be used to: - # * create, drop, and list databases - # * update the schema of pre-existing databases - # * create, delete, copy and list backups for a database - # * restore a database from an existing backup - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :database_admin_stub - - ## - # Configure the DatabaseAdmin Client class. - # - # See {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DatabaseAdmin clients - # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Spanner", "Admin", "Database", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_databases.timeout = 3600.0 - default_config.rpcs.list_databases.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_database.timeout = 3600.0 - - default_config.rpcs.get_database.timeout = 3600.0 - default_config.rpcs.get_database.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_database.timeout = 3600.0 - default_config.rpcs.update_database.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_database_ddl.timeout = 3600.0 - default_config.rpcs.update_database_ddl.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.drop_database.timeout = 3600.0 - default_config.rpcs.drop_database.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_database_ddl.timeout = 3600.0 - default_config.rpcs.get_database_ddl.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.set_iam_policy.timeout = 30.0 - - default_config.rpcs.get_iam_policy.timeout = 30.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.test_iam_permissions.timeout = 30.0 - - default_config.rpcs.create_backup.timeout = 3600.0 - - default_config.rpcs.copy_backup.timeout = 3600.0 - - default_config.rpcs.get_backup.timeout = 3600.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_backup.timeout = 3600.0 - default_config.rpcs.update_backup.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_backup.timeout = 3600.0 - default_config.rpcs.delete_backup.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_backups.timeout = 3600.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.restore_database.timeout = 3600.0 - - default_config.rpcs.list_database_operations.timeout = 3600.0 - default_config.rpcs.list_database_operations.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_backup_operations.timeout = 3600.0 - default_config.rpcs.list_backup_operations.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_database_roles.timeout = 3600.0 - default_config.rpcs.list_database_roles.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.add_split_points.timeout = 3600.0 - default_config.rpcs.add_split_points.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_backup_schedule.timeout = 3600.0 - default_config.rpcs.create_backup_schedule.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_backup_schedule.timeout = 3600.0 - default_config.rpcs.get_backup_schedule.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_backup_schedule.timeout = 3600.0 - default_config.rpcs.update_backup_schedule.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_backup_schedule.timeout = 3600.0 - default_config.rpcs.delete_backup_schedule.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_backup_schedules.timeout = 3600.0 - default_config.rpcs.list_backup_schedules.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DatabaseAdmin Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @database_admin_stub.universe_domain - end - - ## - # Create a new DatabaseAdmin client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DatabaseAdmin client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/spanner/admin/database/v1/spanner_database_admin_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @database_admin_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @database_admin_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @database_admin_stub.logger - end - - # Service calls - - ## - # Lists Cloud Spanner databases. - # - # @overload list_databases(request, options = nil) - # Pass arguments to `list_databases` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_databases(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_databases` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance whose databases should be listed. - # Values are of the form `projects//instances/`. - # @param page_size [::Integer] - # Number of databases to be returned in the response. If 0 or less, - # defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new - # - # # Call the list_databases method. - # result = client.list_databases request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Database. - # p item - # end - # - def list_databases request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_databases.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_databases.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_databases.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :list_databases, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_databases, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new Cloud Spanner database and starts to prepare it for serving. - # The returned {::Google::Longrunning::Operation long-running operation} will - # have a name of the format `/operations/` and - # can be used to track preparation of the database. The - # {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}. - # The {::Google::Longrunning::Operation#response response} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful. - # - # @overload create_database(request, options = nil) - # Pass arguments to `create_database` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_database(parent: nil, create_statement: nil, extra_statements: nil, encryption_config: nil, database_dialect: nil, proto_descriptors: nil) - # Pass arguments to `create_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the instance that will serve the new database. - # Values are of the form `projects//instances/`. - # @param create_statement [::String] - # Required. A `CREATE DATABASE` statement, which specifies the ID of the - # new database. The database ID must conform to the regular expression - # `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length. - # If the database ID is a reserved word or if it contains a hyphen, the - # database ID must be enclosed in backticks (`` ` ``). - # @param extra_statements [::Array<::String>] - # Optional. A list of DDL statements to run inside the newly created - # database. Statements can create tables, indexes, etc. These - # statements execute atomically with the creation of the database: - # if there is an error in any statement, the database is not created. - # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig, ::Hash] - # Optional. The encryption configuration for the database. If this field is - # not specified, Cloud Spanner will encrypt/decrypt all data at rest using - # Google default encryption. - # @param database_dialect [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect] - # Optional. The dialect of the Cloud Spanner Database. - # @param proto_descriptors [::String] - # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in - # 'extra_statements' above. - # Contains a protobuf-serialized - # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). - # To generate it, [install](https://grpc.io/docs/protoc-installation/) and - # run `protoc` with --include_imports and --descriptor_set_out. For example, - # to generate for moon/shot/app.proto, run - # ``` - # $protoc --proto_path=/app_path --proto_path=/lib_path \ - # --include_imports \ - # --descriptor_set_out=descriptors.data \ - # moon/shot/app.proto - # ``` - # For more details, see protobuffer [self - # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new - # - # # Call the create_database method. - # result = client.create_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_database.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :create_database, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the state of a Cloud Spanner database. - # - # @overload get_database(request, options = nil) - # Pass arguments to `get_database` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_database(name: nil) - # Pass arguments to `get_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the requested database. Values are of the form - # `projects//instances//databases/`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::Database] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Database] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new - # - # # Call the get_database method. - # result = client.get_database request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Database. - # p result - # - def get_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_database.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :get_database, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Cloud Spanner database. The returned - # {::Google::Longrunning::Operation long-running operation} can be used to track - # the progress of updating the database. If the named database does not - # exist, returns `NOT_FOUND`. - # - # While the operation is pending: - # - # * The database's - # {::Google::Cloud::Spanner::Admin::Database::V1::Database#reconciling reconciling} - # field is set to true. - # * Cancelling the operation is best-effort. If the cancellation succeeds, - # the operation metadata's - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseMetadata#cancel_time cancel_time} - # is set, the updates are reverted, and the operation terminates with a - # `CANCELLED` status. - # * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error - # until the pending operation is done (returns successfully or with - # error). - # * Reading the database via the API continues to give the pre-request - # values. - # - # Upon completion of the returned operation: - # - # * The new values are in effect and readable via the API. - # * The database's - # {::Google::Cloud::Spanner::Admin::Database::V1::Database#reconciling reconciling} - # field becomes false. - # - # The returned {::Google::Longrunning::Operation long-running operation} will - # have a name of the format - # `projects//instances//databases//operations/` - # and can be used to track the database modification. The - # {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseMetadata UpdateDatabaseMetadata}. - # The {::Google::Longrunning::Operation#response response} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful. - # - # @overload update_database(request, options = nil) - # Pass arguments to `update_database` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_database(database: nil, update_mask: nil) - # Pass arguments to `update_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::Google::Cloud::Spanner::Admin::Database::V1::Database, ::Hash] - # Required. The database to update. - # The `name` field of the database is of the form - # `projects//instances//databases/`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. Currently, only - # `enable_drop_protection` field can be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new - # - # # Call the update_database method. - # result = client.update_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database&.name - header_params["database.name"] = request.database.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_database.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :update_database, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the schema of a Cloud Spanner database by - # creating/altering/dropping tables, columns, indexes, etc. The returned - # {::Google::Longrunning::Operation long-running operation} will have a name of - # the format `/operations/` and can be used to - # track execution of the schema change(s). The - # {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}. - # The operation has no response. - # - # @overload update_database_ddl(request, options = nil) - # Pass arguments to `update_database_ddl` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_database_ddl(database: nil, statements: nil, operation_id: nil, proto_descriptors: nil, throughput_mode: nil) - # Pass arguments to `update_database_ddl` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database to update. - # @param statements [::Array<::String>] - # Required. DDL statements to be applied to the database. - # @param operation_id [::String] - # If empty, the new update request is assigned an - # automatically-generated operation ID. Otherwise, `operation_id` - # is used to construct the name of the resulting - # {::Google::Longrunning::Operation Operation}. - # - # Specifying an explicit operation ID simplifies determining - # whether the statements were executed in the event that the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} - # call is replayed, or the return value is otherwise lost: the - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} - # and `operation_id` fields can be combined to form the - # {::Google::Longrunning::Operation#name name} of the resulting - # {::Google::Longrunning::Operation longrunning.Operation}: - # `/operations/`. - # - # `operation_id` should be unique within the database, and must be - # a valid identifier: `[a-z][a-z0-9_]*`. Note that - # automatically-generated operation IDs always begin with an - # underscore. If the named operation already exists, - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} - # returns `ALREADY_EXISTS`. - # @param proto_descriptors [::String] - # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. - # Contains a protobuf-serialized - # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). - # To generate it, [install](https://grpc.io/docs/protoc-installation/) and - # run `protoc` with --include_imports and --descriptor_set_out. For example, - # to generate for moon/shot/app.proto, run - # ``` - # $protoc --proto_path=/app_path --proto_path=/lib_path \ - # --include_imports \ - # --descriptor_set_out=descriptors.data \ - # moon/shot/app.proto - # ``` - # For more details, see protobuffer [self - # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). - # @param throughput_mode [::Boolean] - # Optional. This field is exposed to be used by the Spanner Migration Tool. - # For more details, see - # [SMT](https://github.com/GoogleCloudPlatform/spanner-migration-tool). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new - # - # # Call the update_database_ddl method. - # result = client.update_database_ddl request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_database_ddl request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_database_ddl.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_database_ddl.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_database_ddl.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :update_database_ddl, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Drops (aka deletes) a Cloud Spanner database. - # Completed backups for the database will be retained according to their - # `expire_time`. - # Note: Cloud Spanner might continue to accept requests for a few seconds - # after the database has been deleted. - # - # @overload drop_database(request, options = nil) - # Pass arguments to `drop_database` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload drop_database(database: nil) - # Pass arguments to `drop_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database to be dropped. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new - # - # # Call the drop_database method. - # result = client.drop_database request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def drop_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.drop_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.drop_database.timeout, - metadata: metadata, - retry_policy: @config.rpcs.drop_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :drop_database, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the schema of a Cloud Spanner database as a list of formatted - # DDL statements. This method does not show pending schema updates, those may - # be queried using the Operations API. - # - # @overload get_database_ddl(request, options = nil) - # Pass arguments to `get_database_ddl` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_database_ddl(database: nil) - # Pass arguments to `get_database_ddl` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database whose schema we wish to get. - # Values are of the form - # `projects//instances//databases/` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new - # - # # Call the get_database_ddl method. - # result = client.get_database_ddl request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse. - # p result - # - def get_database_ddl request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_database_ddl.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_database_ddl.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_database_ddl.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :get_database_ddl, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on a database or backup resource. - # Replaces any existing policy. - # - # Authorization requires `spanner.databases.setIamPolicy` - # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. - # For backups, authorization requires `spanner.backups.setIamPolicy` - # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a database or backup resource. - # Returns an empty policy if a database or backup exists but does not have a - # policy set. - # - # Authorization requires `spanner.databases.getIamPolicy` permission on - # [resource][google.iam.v1.GetIamPolicyRequest.resource]. - # For backups, authorization requires `spanner.backups.getIamPolicy` - # permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that the caller has on the specified database or backup - # resource. - # - # Attempting this RPC on a non-existent Cloud Spanner database will - # result in a NOT_FOUND error if the user has - # `spanner.databases.list` permission on the containing Cloud - # Spanner instance. Otherwise returns an empty set of permissions. - # Calling this method on a backup that does not exist will - # result in a NOT_FOUND error if the user has - # `spanner.backups.list` permission on the containing instance. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts creating a new Cloud Spanner Backup. - # The returned backup {::Google::Longrunning::Operation long-running operation} - # will have a name of the format - # `projects//instances//backups//operations/` - # and can be used to track creation of the backup. The - # {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. - # The {::Google::Longrunning::Operation#response response} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. - # Cancelling the returned operation will stop the creation and delete the - # backup. There can be only one pending backup creation per database. Backup - # creation of different databases can run concurrently. - # - # @overload create_backup(request, options = nil) - # Pass arguments to `create_backup` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_backup(parent: nil, backup_id: nil, backup: nil, encryption_config: nil) - # Pass arguments to `create_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the instance in which the backup will be - # created. This must be the same instance that contains the database the - # backup will be created from. The backup will be stored in the - # location(s) specified in the instance configuration of this - # instance. Values are of the form - # `projects//instances/`. - # @param backup_id [::String] - # Required. The id of the backup to be created. The `backup_id` appended to - # `parent` forms the full backup name of the form - # `projects//instances//backups/`. - # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash] - # Required. The backup to create. - # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig, ::Hash] - # Optional. The encryption configuration used to encrypt the backup. If this - # field is not specified, the backup will use the same encryption - # configuration as the database by default, namely - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} - # = `USE_DATABASE_ENCRYPTION`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new - # - # # Call the create_backup method. - # result = client.create_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :create_backup, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts copying a Cloud Spanner Backup. - # The returned backup {::Google::Longrunning::Operation long-running operation} - # will have a name of the format - # `projects//instances//backups//operations/` - # and can be used to track copying of the backup. The operation is associated - # with the destination backup. - # The {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}. - # The {::Google::Longrunning::Operation#response response} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. - # Cancelling the returned operation will stop the copying and delete the - # destination backup. Concurrent CopyBackup requests can run on the same - # source backup. - # - # @overload copy_backup(request, options = nil) - # Pass arguments to `copy_backup` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload copy_backup(parent: nil, backup_id: nil, source_backup: nil, expire_time: nil, encryption_config: nil) - # Pass arguments to `copy_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the destination instance that will contain the backup - # copy. Values are of the form: `projects//instances/`. - # @param backup_id [::String] - # Required. The id of the backup copy. - # The `backup_id` appended to `parent` forms the full backup_uri of the form - # `projects//instances//backups/`. - # @param source_backup [::String] - # Required. The source backup to be copied. - # The source backup needs to be in READY state for it to be copied. - # Once CopyBackup is in progress, the source backup cannot be deleted or - # cleaned up on expiration until CopyBackup is finished. - # Values are of the form: - # `projects//instances//backups/`. - # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The expiration time of the backup in microsecond granularity. - # The expiration time must be at least 6 hours and at most 366 days - # from the `create_time` of the source backup. Once the `expire_time` has - # passed, the backup is eligible to be automatically deleted by Cloud Spanner - # to free the resources used by the backup. - # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig, ::Hash] - # Optional. The encryption configuration used to encrypt the backup. If this - # field is not specified, the backup will use the same encryption - # configuration as the source backup by default, namely - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type} - # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new - # - # # Call the copy_backup method. - # result = client.copy_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def copy_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.copy_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.copy_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.copy_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :copy_backup, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata on a pending or completed - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup(name: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup. - # Values are of the form - # `projects//instances//backups/`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :get_backup, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a pending or completed - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_backup(backup: nil, update_mask: nil) - # Pass arguments to `update_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash] - # Required. The backup to update. `backup.name`, and the fields to be updated - # as specified by `update_mask` are required. Other fields are ignored. - # Update is only supported for the following fields: - # * `backup.expire_time`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask specifying which fields (e.g. `expire_time`) in the - # Backup resource should be updated. This mask is relative to the Backup - # resource, not to the request message. The field mask must always be - # specified; this prevents any future fields from being erased accidentally - # by clients that do not know about them. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_backup request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. - # p result - # - def update_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup&.name - header_params["backup.name"] = request.backup.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :update_backup, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a pending or completed - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup(name: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup to delete. - # Values are of the form - # `projects//instances//backups/`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists completed and pending backups. - # Backups returned are ordered by `create_time` in descending order, - # starting from the most recent `create_time`. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backups(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance to list backups from. Values are of the - # form `projects//instances/`. - # @param filter [::String] - # An expression that filters the list of returned backups. - # - # A filter expression consists of a field name, a comparison operator, and a - # value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for - # filtering: - # - # * `name` - # * `database` - # * `state` - # * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - # * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - # * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - # * `size_bytes` - # * `backup_schedules` - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic, but - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `name:Howl` - The backup's name contains the string "howl". - # * `database:prod` - # - The database's name contains the string "prod". - # * `state:CREATING` - The backup is pending creation. - # * `state:READY` - The backup is fully created and ready for use. - # * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - # - The backup name contains the string "howl" and `create_time` - # of the backup is before 2018-03-28T14:50:00Z. - # * `expire_time < \"2018-03-28T14:50:00Z\"` - # - The backup `expire_time` is before 2018-03-28T14:50:00Z. - # * `size_bytes > 10000000000` - The backup's size is greater than 10GB - # * `backup_schedules:daily` - # - The backup is created from a schedule with "daily" in its name. - # @param page_size [::Integer] - # Number of backups to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} - # to the same `parent` and with the same `filter`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Backup. - # p item - # end - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :list_backups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_backups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a new database by restoring from a completed backup. The new - # database must be in the same project and in an instance with the same - # instance configuration as the instance containing - # the backup. The returned database [long-running - # operation][google.longrunning.Operation] has a name of the format - # `projects//instances//databases//operations/`, - # and can be used to track the progress of the operation, and to cancel it. - # The {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. - # The {::Google::Longrunning::Operation#response response} type - # is {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if - # successful. Cancelling the returned operation will stop the restore and - # delete the database. - # There can be only one database being restored into an instance at a time. - # Once the restore operation completes, a new restore operation can be - # initiated, without waiting for the optimize operation associated with the - # first restore to complete. - # - # @overload restore_database(request, options = nil) - # Pass arguments to `restore_database` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil) - # Pass arguments to `restore_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the instance in which to create the - # restored database. This instance must be in the same project and - # have the same instance configuration as the instance containing - # the source backup. Values are of the form - # `projects//instances/`. - # @param database_id [::String] - # Required. The id of the database to create and restore to. This - # database must not already exist. The `database_id` appended to - # `parent` forms the full database name of the form - # `projects//instances//databases/`. - # @param backup [::String] - # Name of the backup from which to restore. Values are of the form - # `projects//instances//backups/`. - # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig, ::Hash] - # Optional. An encryption configuration describing the encryption type and - # key resources in Cloud KMS used to encrypt/decrypt the database to restore - # to. If this field is not specified, the restored database will use the same - # encryption configuration as the backup by default, namely - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} - # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new - # - # # Call the restore_database method. - # result = client.restore_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restore_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.restore_database.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restore_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :restore_database, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists database {::Google::Longrunning::Operation longrunning-operations}. - # A database operation has a name of the form - # `projects//instances//databases//operations/`. - # The long-running operation - # {::Google::Longrunning::Operation#metadata metadata} field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. - # - # @overload list_database_operations(request, options = nil) - # Pass arguments to `list_database_operations` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_database_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_database_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance of the database operations. - # Values are of the form `projects//instances/`. - # @param filter [::String] - # An expression that filters the list of returned operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the {::Google::Longrunning::Operation Operation} - # are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} - # is - # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first, if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic. However, - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - # `(metadata.source_type:BACKUP) AND` \ - # `(metadata.backup_info.backup:backup_howl) AND` \ - # `(metadata.name:restored_howl) AND` \ - # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Return operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. - # * The database is restored from a backup. - # * The backup name contains "backup_howl". - # * The restored database's name contains "restored_howl". - # * The operation started before 2018-03-28T14:50:00Z. - # * The operation resulted in an error. - # @param page_size [::Integer] - # Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} - # to the same `parent` and with the same `filter`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new - # - # # Call the list_database_operations method. - # result = client.list_database_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_database_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_database_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_database_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_database_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :list_database_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_database_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the backup {::Google::Longrunning::Operation long-running operations} in - # the given instance. A backup operation has a name of the form - # `projects//instances//backups//operations/`. - # The long-running operation - # {::Google::Longrunning::Operation#metadata metadata} field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. Operations returned are ordered by - # `operation.metadata.value.progress.start_time` in descending order starting - # from the most recently started operation. - # - # @overload list_backup_operations(request, options = nil) - # Pass arguments to `list_backup_operations` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backup_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance of the backup operations. Values are of - # the form `projects//instances/`. - # @param filter [::String] - # An expression that filters the list of returned backup operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the {::Google::Longrunning::Operation operation} - # are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} - # is - # `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic, but - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - # `metadata.database:prod` - Returns operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. - # * The source database name of backup contains the string "prod". - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - # `(metadata.name:howl) AND` \ - # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Returns operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. - # * The backup name contains the string "howl". - # * The operation started before 2018-03-28T14:50:00Z. - # * The operation resulted in an error. - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - # `(metadata.source_backup:test) AND` \ - # `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - # `(error:*)` - Returns operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}. - # * The source backup name contains the string "test". - # * The operation started before 2022-01-18T14:50:00Z. - # * The operation resulted in an error. - # * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - # `(metadata.database:test_db)) OR` \ - # `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - # AND` \ - # `(metadata.source_backup:test_bkp)) AND` \ - # `(error:*)` - Returns operations where: - # * The operation's metadata matches either of criteria: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} - # AND the source database name of the backup contains the string - # "test_db" - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata} - # AND the source backup name contains the string "test_bkp" - # * The operation resulted in an error. - # @param page_size [::Integer] - # Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} - # to the same `parent` and with the same `filter`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new - # - # # Call the list_backup_operations method. - # result = client.list_backup_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_backup_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backup_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backup_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :list_backup_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_backup_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Cloud Spanner database roles. - # - # @overload list_database_roles(request, options = nil) - # Pass arguments to `list_database_roles` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_database_roles(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_database_roles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The database whose roles should be listed. - # Values are of the form - # `projects//instances//databases/`. - # @param page_size [::Integer] - # Number of database roles to be returned in the response. If 0 or less, - # defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new - # - # # Call the list_database_roles method. - # result = client.list_database_roles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole. - # p item - # end - # - def list_database_roles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_database_roles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_database_roles.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_database_roles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :list_database_roles, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_database_roles, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds split points to specified tables, indexes of a database. - # - # @overload add_split_points(request, options = nil) - # Pass arguments to `add_split_points` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload add_split_points(database: nil, split_points: nil, initiator: nil) - # Pass arguments to `add_split_points` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database on whose tables/indexes split points are to be - # added. Values are of the form - # `projects//instances//databases/`. - # @param split_points [::Array<::Google::Cloud::Spanner::Admin::Database::V1::SplitPoints, ::Hash>] - # Required. The split points to add. - # @param initiator [::String] - # Optional. A user-supplied tag associated with the split points. - # For example, "intital_data_load", "special_event_1". - # Defaults to "CloudAddSplitPointsAPI" if not specified. - # The length of the tag must not exceed 50 characters,else will be trimmed. - # Only valid UTF8 characters are allowed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new - # - # # Call the add_split_points method. - # result = client.add_split_points request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse. - # p result - # - def add_split_points request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.add_split_points.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.add_split_points.timeout, - metadata: metadata, - retry_policy: @config.rpcs.add_split_points.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :add_split_points, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new backup schedule. - # - # @overload create_backup_schedule(request, options = nil) - # Pass arguments to `create_backup_schedule` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_backup_schedule(parent: nil, backup_schedule_id: nil, backup_schedule: nil) - # Pass arguments to `create_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the database that this backup schedule applies to. - # @param backup_schedule_id [::String] - # Required. The Id to use for the backup schedule. The `backup_schedule_id` - # appended to `parent` forms the full backup schedule name of the form - # `projects//instances//databases//backupSchedules/`. - # @param backup_schedule [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule, ::Hash] - # Required. The backup schedule to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new - # - # # Call the create_backup_schedule method. - # result = client.create_backup_schedule request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - # p result - # - def create_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_backup_schedule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :create_backup_schedule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets backup schedule for the input schedule name. - # - # @overload get_backup_schedule(request, options = nil) - # Pass arguments to `get_backup_schedule` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_schedule(name: nil) - # Pass arguments to `get_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the schedule to retrieve. - # Values are of the form - # `projects//instances//databases//backupSchedules/`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new - # - # # Call the get_backup_schedule method. - # result = client.get_backup_schedule request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - # p result - # - def get_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_backup_schedule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :get_backup_schedule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a backup schedule. - # - # @overload update_backup_schedule(request, options = nil) - # Pass arguments to `update_backup_schedule` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_backup_schedule(backup_schedule: nil, update_mask: nil) - # Pass arguments to `update_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_schedule [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule, ::Hash] - # Required. The backup schedule to update. `backup_schedule.name`, and the - # fields to be updated as specified by `update_mask` are required. Other - # fields are ignored. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask specifying which fields in the BackupSchedule resource - # should be updated. This mask is relative to the BackupSchedule resource, - # not to the request message. The field mask must always be - # specified; this prevents any future fields from being erased - # accidentally. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new - # - # # Call the update_backup_schedule method. - # result = client.update_backup_schedule request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - # p result - # - def update_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup_schedule&.name - header_params["backup_schedule.name"] = request.backup_schedule.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_backup_schedule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :update_backup_schedule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a backup schedule. - # - # @overload delete_backup_schedule(request, options = nil) - # Pass arguments to `delete_backup_schedule` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup_schedule(name: nil) - # Pass arguments to `delete_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the schedule to delete. - # Values are of the form - # `projects//instances//databases//backupSchedules/`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new - # - # # Call the delete_backup_schedule method. - # result = client.delete_backup_schedule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_backup_schedule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :delete_backup_schedule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the backup schedules for the database. - # - # @overload list_backup_schedules(request, options = nil) - # Pass arguments to `list_backup_schedules` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_schedules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backup_schedules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Database is the parent resource whose backup schedules should be - # listed. Values are of the form - # projects//instances//databases/ - # @param page_size [::Integer] - # Optional. Number of backup schedules to be returned in the response. If 0 - # or less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # Optional. If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse ListBackupSchedulesResponse} - # to the same `parent`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new - # - # # Call the list_backup_schedules method. - # result = client.list_backup_schedules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - # p item - # end - # - def list_backup_schedules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_backup_schedules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_backup_schedules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_schedules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :list_backup_schedules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @database_admin_stub, :list_backup_schedules, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # This is an internal API called by Spanner Graph jobs. You should never need - # to call this API directly. - # - # @overload internal_update_graph_operation(request, options = nil) - # Pass arguments to `internal_update_graph_operation` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload internal_update_graph_operation(database: nil, operation_id: nil, vm_identity_token: nil, progress: nil, status: nil) - # Pass arguments to `internal_update_graph_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Internal field, do not use directly. - # @param operation_id [::String] - # Internal field, do not use directly. - # @param vm_identity_token [::String] - # Internal field, do not use directly. - # @param progress [::Float] - # Internal field, do not use directly. - # @param status [::Google::Rpc::Status, ::Hash] - # Internal field, do not use directly. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new - # - # # Call the internal_update_graph_operation method. - # result = client.internal_update_graph_operation request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse. - # p result - # - def internal_update_graph_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.internal_update_graph_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.internal_update_graph_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.internal_update_graph_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.call_rpc :internal_update_graph_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DatabaseAdmin API. - # - # This class represents the configuration for DatabaseAdmin, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_databases to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_databases.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_databases.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "spanner.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the DatabaseAdmin API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_databases` - # @return [::Gapic::Config::Method] - # - attr_reader :list_databases - ## - # RPC-specific configuration for `create_database` - # @return [::Gapic::Config::Method] - # - attr_reader :create_database - ## - # RPC-specific configuration for `get_database` - # @return [::Gapic::Config::Method] - # - attr_reader :get_database - ## - # RPC-specific configuration for `update_database` - # @return [::Gapic::Config::Method] - # - attr_reader :update_database - ## - # RPC-specific configuration for `update_database_ddl` - # @return [::Gapic::Config::Method] - # - attr_reader :update_database_ddl - ## - # RPC-specific configuration for `drop_database` - # @return [::Gapic::Config::Method] - # - attr_reader :drop_database - ## - # RPC-specific configuration for `get_database_ddl` - # @return [::Gapic::Config::Method] - # - attr_reader :get_database_ddl - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `create_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup - ## - # RPC-specific configuration for `copy_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :copy_backup - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `update_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `restore_database` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_database - ## - # RPC-specific configuration for `list_database_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_database_operations - ## - # RPC-specific configuration for `list_backup_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_operations - ## - # RPC-specific configuration for `list_database_roles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_database_roles - ## - # RPC-specific configuration for `add_split_points` - # @return [::Gapic::Config::Method] - # - attr_reader :add_split_points - ## - # RPC-specific configuration for `create_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_schedule - ## - # RPC-specific configuration for `get_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_schedule - ## - # RPC-specific configuration for `update_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_schedule - ## - # RPC-specific configuration for `delete_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_schedule - ## - # RPC-specific configuration for `list_backup_schedules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_schedules - ## - # RPC-specific configuration for `internal_update_graph_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :internal_update_graph_operation - - # @private - def initialize parent_rpcs = nil - list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases - @list_databases = ::Gapic::Config::Method.new list_databases_config - create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database - @create_database = ::Gapic::Config::Method.new create_database_config - get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database - @get_database = ::Gapic::Config::Method.new get_database_config - update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database - @update_database = ::Gapic::Config::Method.new update_database_config - update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl - @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config - drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database - @drop_database = ::Gapic::Config::Method.new drop_database_config - get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl - @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup - @create_backup = ::Gapic::Config::Method.new create_backup_config - copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup - @copy_backup = ::Gapic::Config::Method.new copy_backup_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup - @update_backup = ::Gapic::Config::Method.new update_backup_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database - @restore_database = ::Gapic::Config::Method.new restore_database_config - list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations - @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config - list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations - @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config - list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles - @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config - add_split_points_config = parent_rpcs.add_split_points if parent_rpcs.respond_to? :add_split_points - @add_split_points = ::Gapic::Config::Method.new add_split_points_config - create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule - @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config - get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule - @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config - update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule - @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config - delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule - @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config - list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules - @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config - internal_update_graph_operation_config = parent_rpcs.internal_update_graph_operation if parent_rpcs.respond_to? :internal_update_graph_operation - @internal_update_graph_operation = ::Gapic::Config::Method.new internal_update_graph_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb deleted file mode 100644 index b3c941a3dbff..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - module DatabaseAdmin - # Credentials for the DatabaseAdmin API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ] - self.env_vars = [ - "SPANNER_CREDENTIALS", - "SPANNER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SPANNER_CREDENTIALS_JSON", - "SPANNER_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb deleted file mode 100644 index 1ab3e2d17a2c..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +++ /dev/null @@ -1,847 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - module DatabaseAdmin - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DatabaseAdmin Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DatabaseAdmin Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "spanner.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb deleted file mode 100644 index ca3d3e310737..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb +++ /dev/null @@ -1,176 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - module DatabaseAdmin - # Path helper methods for the DatabaseAdmin API. - module Paths - ## - # Create a fully-qualified Backup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}/backups/{backup}` - # - # @param project [String] - # @param instance [String] - # @param backup [String] - # - # @return [::String] - def backup_path project:, instance:, backup: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/instances/#{instance}/backups/#{backup}" - end - - ## - # Create a fully-qualified BackupSchedule resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}/databases/{database}/backupSchedules/{schedule}` - # - # @param project [String] - # @param instance [String] - # @param database [String] - # @param schedule [String] - # - # @return [::String] - def backup_schedule_path project:, instance:, database:, schedule: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" - - "projects/#{project}/instances/#{instance}/databases/#{database}/backupSchedules/#{schedule}" - end - - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # - # @return [::String] - def crypto_key_path project:, location:, key_ring:, crypto_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" - end - - ## - # Create a fully-qualified CryptoKeyVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # @param crypto_key_version [String] - # - # @return [::String] - def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" - end - - ## - # Create a fully-qualified Database resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}/databases/{database}` - # - # @param project [String] - # @param instance [String] - # @param database [String] - # - # @return [::String] - def database_path project:, instance:, database: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/instances/#{instance}/databases/#{database}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}` - # - # @param project [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/instances/#{instance}" - end - - ## - # Create a fully-qualified InstancePartition resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` - # - # @param project [String] - # @param instance [String] - # @param instance_partition [String] - # - # @return [::String] - def instance_partition_path project:, instance:, instance_partition: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/instances/#{instance}/instancePartitions/#{instance_partition}" - end - - extend self - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb deleted file mode 100644 index 1d9a8d24707b..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/spanner/admin/database/v1/version" - -require "google/cloud/spanner/admin/database/v1/database_admin/credentials" -require "google/cloud/spanner/admin/database/v1/database_admin/paths" -require "google/cloud/spanner/admin/database/v1/database_admin/rest/operations" -require "google/cloud/spanner/admin/database/v1/database_admin/rest/client" - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - ## - # Cloud Spanner Database Admin API - # - # The Cloud Spanner Database Admin API can be used to: - # * create, drop, and list databases - # * update the schema of pre-existing databases - # * create, delete, copy and list backups for a database - # * restore a database from an existing backup - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/spanner/admin/database/v1/database_admin/rest" - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - module DatabaseAdmin - # Client for the REST transport - module Rest - end - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/spanner/admin/database/v1/database_admin/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb deleted file mode 100644 index d691caea026c..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb +++ /dev/null @@ -1,3340 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/spanner/admin/database/v1/spanner_database_admin_pb" -require "google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub" - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - module DatabaseAdmin - module Rest - ## - # REST client for the DatabaseAdmin service. - # - # Cloud Spanner Database Admin API - # - # The Cloud Spanner Database Admin API can be used to: - # * create, drop, and list databases - # * update the schema of pre-existing databases - # * create, delete, copy and list backups for a database - # * restore a database from an existing backup - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :database_admin_stub - - ## - # Configure the DatabaseAdmin Client class. - # - # See {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DatabaseAdmin clients - # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Spanner", "Admin", "Database", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_databases.timeout = 3600.0 - default_config.rpcs.list_databases.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_database.timeout = 3600.0 - - default_config.rpcs.get_database.timeout = 3600.0 - default_config.rpcs.get_database.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_database.timeout = 3600.0 - default_config.rpcs.update_database.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_database_ddl.timeout = 3600.0 - default_config.rpcs.update_database_ddl.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.drop_database.timeout = 3600.0 - default_config.rpcs.drop_database.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_database_ddl.timeout = 3600.0 - default_config.rpcs.get_database_ddl.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.set_iam_policy.timeout = 30.0 - - default_config.rpcs.get_iam_policy.timeout = 30.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.test_iam_permissions.timeout = 30.0 - - default_config.rpcs.create_backup.timeout = 3600.0 - - default_config.rpcs.copy_backup.timeout = 3600.0 - - default_config.rpcs.get_backup.timeout = 3600.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_backup.timeout = 3600.0 - default_config.rpcs.update_backup.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_backup.timeout = 3600.0 - default_config.rpcs.delete_backup.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_backups.timeout = 3600.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.restore_database.timeout = 3600.0 - - default_config.rpcs.list_database_operations.timeout = 3600.0 - default_config.rpcs.list_database_operations.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_backup_operations.timeout = 3600.0 - default_config.rpcs.list_backup_operations.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_database_roles.timeout = 3600.0 - default_config.rpcs.list_database_roles.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.add_split_points.timeout = 3600.0 - default_config.rpcs.add_split_points.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_backup_schedule.timeout = 3600.0 - default_config.rpcs.create_backup_schedule.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_backup_schedule.timeout = 3600.0 - default_config.rpcs.get_backup_schedule.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_backup_schedule.timeout = 3600.0 - default_config.rpcs.update_backup_schedule.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_backup_schedule.timeout = 3600.0 - default_config.rpcs.delete_backup_schedule.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_backup_schedules.timeout = 3600.0 - default_config.rpcs.list_backup_schedules.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DatabaseAdmin Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @database_admin_stub.universe_domain - end - - ## - # Create a new DatabaseAdmin REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DatabaseAdmin client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @database_admin_stub = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @database_admin_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @database_admin_stub.logger - end - - # Service calls - - ## - # Lists Cloud Spanner databases. - # - # @overload list_databases(request, options = nil) - # Pass arguments to `list_databases` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_databases(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_databases` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance whose databases should be listed. - # Values are of the form `projects//instances/`. - # @param page_size [::Integer] - # Number of databases to be returned in the response. If 0 or less, - # defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Database>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new - # - # # Call the list_databases method. - # result = client.list_databases request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Database. - # p item - # end - # - def list_databases request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_databases.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_databases.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_databases.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.list_databases request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_databases, "databases", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new Cloud Spanner database and starts to prepare it for serving. - # The returned {::Google::Longrunning::Operation long-running operation} will - # have a name of the format `/operations/` and - # can be used to track preparation of the database. The - # {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseMetadata CreateDatabaseMetadata}. - # The {::Google::Longrunning::Operation#response response} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful. - # - # @overload create_database(request, options = nil) - # Pass arguments to `create_database` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_database(parent: nil, create_statement: nil, extra_statements: nil, encryption_config: nil, database_dialect: nil, proto_descriptors: nil) - # Pass arguments to `create_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the instance that will serve the new database. - # Values are of the form `projects//instances/`. - # @param create_statement [::String] - # Required. A `CREATE DATABASE` statement, which specifies the ID of the - # new database. The database ID must conform to the regular expression - # `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length. - # If the database ID is a reserved word or if it contains a hyphen, the - # database ID must be enclosed in backticks (`` ` ``). - # @param extra_statements [::Array<::String>] - # Optional. A list of DDL statements to run inside the newly created - # database. Statements can create tables, indexes, etc. These - # statements execute atomically with the creation of the database: - # if there is an error in any statement, the database is not created. - # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig, ::Hash] - # Optional. The encryption configuration for the database. If this field is - # not specified, Cloud Spanner will encrypt/decrypt all data at rest using - # Google default encryption. - # @param database_dialect [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect] - # Optional. The dialect of the Cloud Spanner Database. - # @param proto_descriptors [::String] - # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in - # 'extra_statements' above. - # Contains a protobuf-serialized - # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). - # To generate it, [install](https://grpc.io/docs/protoc-installation/) and - # run `protoc` with --include_imports and --descriptor_set_out. For example, - # to generate for moon/shot/app.proto, run - # ``` - # $protoc --proto_path=/app_path --proto_path=/lib_path \ - # --include_imports \ - # --descriptor_set_out=descriptors.data \ - # moon/shot/app.proto - # ``` - # For more details, see protobuffer [self - # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new - # - # # Call the create_database method. - # result = client.create_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_database.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.create_database request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the state of a Cloud Spanner database. - # - # @overload get_database(request, options = nil) - # Pass arguments to `get_database` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_database(name: nil) - # Pass arguments to `get_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the requested database. Values are of the form - # `projects//instances//databases/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Database] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Database] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new - # - # # Call the get_database method. - # result = client.get_database request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Database. - # p result - # - def get_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_database.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.get_database request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Cloud Spanner database. The returned - # {::Google::Longrunning::Operation long-running operation} can be used to track - # the progress of updating the database. If the named database does not - # exist, returns `NOT_FOUND`. - # - # While the operation is pending: - # - # * The database's - # {::Google::Cloud::Spanner::Admin::Database::V1::Database#reconciling reconciling} - # field is set to true. - # * Cancelling the operation is best-effort. If the cancellation succeeds, - # the operation metadata's - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseMetadata#cancel_time cancel_time} - # is set, the updates are reverted, and the operation terminates with a - # `CANCELLED` status. - # * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error - # until the pending operation is done (returns successfully or with - # error). - # * Reading the database via the API continues to give the pre-request - # values. - # - # Upon completion of the returned operation: - # - # * The new values are in effect and readable via the API. - # * The database's - # {::Google::Cloud::Spanner::Admin::Database::V1::Database#reconciling reconciling} - # field becomes false. - # - # The returned {::Google::Longrunning::Operation long-running operation} will - # have a name of the format - # `projects//instances//databases//operations/` - # and can be used to track the database modification. The - # {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseMetadata UpdateDatabaseMetadata}. - # The {::Google::Longrunning::Operation#response response} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if successful. - # - # @overload update_database(request, options = nil) - # Pass arguments to `update_database` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_database(database: nil, update_mask: nil) - # Pass arguments to `update_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::Google::Cloud::Spanner::Admin::Database::V1::Database, ::Hash] - # Required. The database to update. - # The `name` field of the database is of the form - # `projects//instances//databases/`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. Currently, only - # `enable_drop_protection` field can be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new - # - # # Call the update_database method. - # result = client.update_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_database.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.update_database request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the schema of a Cloud Spanner database by - # creating/altering/dropping tables, columns, indexes, etc. The returned - # {::Google::Longrunning::Operation long-running operation} will have a name of - # the format `/operations/` and can be used to - # track execution of the schema change(s). The - # {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlMetadata UpdateDatabaseDdlMetadata}. - # The operation has no response. - # - # @overload update_database_ddl(request, options = nil) - # Pass arguments to `update_database_ddl` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_database_ddl(database: nil, statements: nil, operation_id: nil, proto_descriptors: nil, throughput_mode: nil) - # Pass arguments to `update_database_ddl` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database to update. - # @param statements [::Array<::String>] - # Required. DDL statements to be applied to the database. - # @param operation_id [::String] - # If empty, the new update request is assigned an - # automatically-generated operation ID. Otherwise, `operation_id` - # is used to construct the name of the resulting - # {::Google::Longrunning::Operation Operation}. - # - # Specifying an explicit operation ID simplifies determining - # whether the statements were executed in the event that the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client#update_database_ddl UpdateDatabaseDdl} - # call is replayed, or the return value is otherwise lost: the - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} - # and `operation_id` fields can be combined to form the - # {::Google::Longrunning::Operation#name name} of the resulting - # {::Google::Longrunning::Operation longrunning.Operation}: - # `/operations/`. - # - # `operation_id` should be unique within the database, and must be - # a valid identifier: `[a-z][a-z0-9_]*`. Note that - # automatically-generated operation IDs always begin with an - # underscore. If the named operation already exists, - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client#update_database_ddl UpdateDatabaseDdl} - # returns `ALREADY_EXISTS`. - # @param proto_descriptors [::String] - # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. - # Contains a protobuf-serialized - # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). - # To generate it, [install](https://grpc.io/docs/protoc-installation/) and - # run `protoc` with --include_imports and --descriptor_set_out. For example, - # to generate for moon/shot/app.proto, run - # ``` - # $protoc --proto_path=/app_path --proto_path=/lib_path \ - # --include_imports \ - # --descriptor_set_out=descriptors.data \ - # moon/shot/app.proto - # ``` - # For more details, see protobuffer [self - # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). - # @param throughput_mode [::Boolean] - # Optional. This field is exposed to be used by the Spanner Migration Tool. - # For more details, see - # [SMT](https://github.com/GoogleCloudPlatform/spanner-migration-tool). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new - # - # # Call the update_database_ddl method. - # result = client.update_database_ddl request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_database_ddl request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_database_ddl.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_database_ddl.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_database_ddl.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.update_database_ddl request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Drops (aka deletes) a Cloud Spanner database. - # Completed backups for the database will be retained according to their - # `expire_time`. - # Note: Cloud Spanner might continue to accept requests for a few seconds - # after the database has been deleted. - # - # @overload drop_database(request, options = nil) - # Pass arguments to `drop_database` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload drop_database(database: nil) - # Pass arguments to `drop_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database to be dropped. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new - # - # # Call the drop_database method. - # result = client.drop_database request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def drop_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.drop_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.drop_database.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.drop_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.drop_database request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the schema of a Cloud Spanner database as a list of formatted - # DDL statements. This method does not show pending schema updates, those may - # be queried using the Operations API. - # - # @overload get_database_ddl(request, options = nil) - # Pass arguments to `get_database_ddl` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_database_ddl(database: nil) - # Pass arguments to `get_database_ddl` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database whose schema we wish to get. - # Values are of the form - # `projects//instances//databases/` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new - # - # # Call the get_database_ddl method. - # result = client.get_database_ddl request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse. - # p result - # - def get_database_ddl request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_database_ddl.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_database_ddl.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_database_ddl.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.get_database_ddl request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on a database or backup resource. - # Replaces any existing policy. - # - # Authorization requires `spanner.databases.setIamPolicy` - # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. - # For backups, authorization requires `spanner.backups.setIamPolicy` - # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for a database or backup resource. - # Returns an empty policy if a database or backup exists but does not have a - # policy set. - # - # Authorization requires `spanner.databases.getIamPolicy` permission on - # [resource][google.iam.v1.GetIamPolicyRequest.resource]. - # For backups, authorization requires `spanner.backups.getIamPolicy` - # permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that the caller has on the specified database or backup - # resource. - # - # Attempting this RPC on a non-existent Cloud Spanner database will - # result in a NOT_FOUND error if the user has - # `spanner.databases.list` permission on the containing Cloud - # Spanner instance. Otherwise returns an empty set of permissions. - # Calling this method on a backup that does not exist will - # result in a NOT_FOUND error if the user has - # `spanner.backups.list` permission on the containing instance. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts creating a new Cloud Spanner Backup. - # The returned backup {::Google::Longrunning::Operation long-running operation} - # will have a name of the format - # `projects//instances//backups//operations/` - # and can be used to track creation of the backup. The - # {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. - # The {::Google::Longrunning::Operation#response response} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. - # Cancelling the returned operation will stop the creation and delete the - # backup. There can be only one pending backup creation per database. Backup - # creation of different databases can run concurrently. - # - # @overload create_backup(request, options = nil) - # Pass arguments to `create_backup` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_backup(parent: nil, backup_id: nil, backup: nil, encryption_config: nil) - # Pass arguments to `create_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the instance in which the backup will be - # created. This must be the same instance that contains the database the - # backup will be created from. The backup will be stored in the - # location(s) specified in the instance configuration of this - # instance. Values are of the form - # `projects//instances/`. - # @param backup_id [::String] - # Required. The id of the backup to be created. The `backup_id` appended to - # `parent` forms the full backup name of the form - # `projects//instances//backups/`. - # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash] - # Required. The backup to create. - # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig, ::Hash] - # Optional. The encryption configuration used to encrypt the backup. If this - # field is not specified, the backup will use the same encryption - # configuration as the database by default, namely - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} - # = `USE_DATABASE_ENCRYPTION`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new - # - # # Call the create_backup method. - # result = client.create_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.create_backup request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts copying a Cloud Spanner Backup. - # The returned backup {::Google::Longrunning::Operation long-running operation} - # will have a name of the format - # `projects//instances//backups//operations/` - # and can be used to track copying of the backup. The operation is associated - # with the destination backup. - # The {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}. - # The {::Google::Longrunning::Operation#response response} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}, if successful. - # Cancelling the returned operation will stop the copying and delete the - # destination backup. Concurrent CopyBackup requests can run on the same - # source backup. - # - # @overload copy_backup(request, options = nil) - # Pass arguments to `copy_backup` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload copy_backup(parent: nil, backup_id: nil, source_backup: nil, expire_time: nil, encryption_config: nil) - # Pass arguments to `copy_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the destination instance that will contain the backup - # copy. Values are of the form: `projects//instances/`. - # @param backup_id [::String] - # Required. The id of the backup copy. - # The `backup_id` appended to `parent` forms the full backup_uri of the form - # `projects//instances//backups/`. - # @param source_backup [::String] - # Required. The source backup to be copied. - # The source backup needs to be in READY state for it to be copied. - # Once CopyBackup is in progress, the source backup cannot be deleted or - # cleaned up on expiration until CopyBackup is finished. - # Values are of the form: - # `projects//instances//backups/`. - # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. The expiration time of the backup in microsecond granularity. - # The expiration time must be at least 6 hours and at most 366 days - # from the `create_time` of the source backup. Once the `expire_time` has - # passed, the backup is eligible to be automatically deleted by Cloud Spanner - # to free the resources used by the backup. - # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig, ::Hash] - # Optional. The encryption configuration used to encrypt the backup. If this - # field is not specified, the backup will use the same encryption - # configuration as the source backup by default, namely - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type} - # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new - # - # # Call the copy_backup method. - # result = client.copy_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def copy_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.copy_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.copy_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.copy_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.copy_backup request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets metadata on a pending or completed - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup(name: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup. - # Values are of the form - # `projects//instances//backups/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.get_backup request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a pending or completed - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_backup(backup: nil, update_mask: nil) - # Pass arguments to `update_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup [::Google::Cloud::Spanner::Admin::Database::V1::Backup, ::Hash] - # Required. The backup to update. `backup.name`, and the fields to be updated - # as specified by `update_mask` are required. Other fields are ignored. - # Update is only supported for the following fields: - # * `backup.expire_time`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask specifying which fields (e.g. `expire_time`) in the - # Backup resource should be updated. This mask is relative to the Backup - # resource, not to the request message. The field mask must always be - # specified; this prevents any future fields from being erased accidentally - # by clients that do not know about them. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_backup request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. - # p result - # - def update_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.update_backup request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a pending or completed - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup}. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup(name: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup to delete. - # Values are of the form - # `projects//instances//backups/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.delete_backup request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists completed and pending backups. - # Backups returned are ordered by `create_time` in descending order, - # starting from the most recent `create_time`. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backups(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance to list backups from. Values are of the - # form `projects//instances/`. - # @param filter [::String] - # An expression that filters the list of returned backups. - # - # A filter expression consists of a field name, a comparison operator, and a - # value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for - # filtering: - # - # * `name` - # * `database` - # * `state` - # * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - # * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - # * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - # * `size_bytes` - # * `backup_schedules` - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic, but - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `name:Howl` - The backup's name contains the string "howl". - # * `database:prod` - # - The database's name contains the string "prod". - # * `state:CREATING` - The backup is pending creation. - # * `state:READY` - The backup is fully created and ready for use. - # * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - # - The backup name contains the string "howl" and `create_time` - # of the backup is before 2018-03-28T14:50:00Z. - # * `expire_time < \"2018-03-28T14:50:00Z\"` - # - The backup `expire_time` is before 2018-03-28T14:50:00Z. - # * `size_bytes > 10000000000` - The backup's size is greater than 10GB - # * `backup_schedules:daily` - # - The backup is created from a schedule with "daily" in its name. - # @param page_size [::Integer] - # Number of backups to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} - # to the same `parent` and with the same `filter`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Backup. - # p item - # end - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.list_backups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_backups, "backups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a new database by restoring from a completed backup. The new - # database must be in the same project and in an instance with the same - # instance configuration as the instance containing - # the backup. The returned database [long-running - # operation][google.longrunning.Operation] has a name of the format - # `projects//instances//databases//operations/`, - # and can be used to track the progress of the operation, and to cancel it. - # The {::Google::Longrunning::Operation#metadata metadata} field type is - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. - # The {::Google::Longrunning::Operation#response response} type - # is {::Google::Cloud::Spanner::Admin::Database::V1::Database Database}, if - # successful. Cancelling the returned operation will stop the restore and - # delete the database. - # There can be only one database being restored into an instance at a time. - # Once the restore operation completes, a new restore operation can be - # initiated, without waiting for the optimize operation associated with the - # first restore to complete. - # - # @overload restore_database(request, options = nil) - # Pass arguments to `restore_database` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil) - # Pass arguments to `restore_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the instance in which to create the - # restored database. This instance must be in the same project and - # have the same instance configuration as the instance containing - # the source backup. Values are of the form - # `projects//instances/`. - # @param database_id [::String] - # Required. The id of the database to create and restore to. This - # database must not already exist. The `database_id` appended to - # `parent` forms the full database name of the form - # `projects//instances//databases/`. - # @param backup [::String] - # Name of the backup from which to restore. Values are of the form - # `projects//instances//backups/`. - # @param encryption_config [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig, ::Hash] - # Optional. An encryption configuration describing the encryption type and - # key resources in Cloud KMS used to encrypt/decrypt the database to restore - # to. If this field is not specified, the restored database will use the same - # encryption configuration as the backup by default, namely - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} - # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new - # - # # Call the restore_database method. - # result = client.restore_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restore_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.restore_database.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restore_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.restore_database request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists database {::Google::Longrunning::Operation longrunning-operations}. - # A database operation has a name of the form - # `projects//instances//databases//operations/`. - # The long-running operation - # {::Google::Longrunning::Operation#metadata metadata} field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. - # - # @overload list_database_operations(request, options = nil) - # Pass arguments to `list_database_operations` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_database_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_database_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance of the database operations. - # Values are of the form `projects//instances/`. - # @param filter [::String] - # An expression that filters the list of returned operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the {::Google::Longrunning::Operation Operation} - # are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} - # is - # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first, if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic. However, - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - # `(metadata.source_type:BACKUP) AND` \ - # `(metadata.backup_info.backup:backup_howl) AND` \ - # `(metadata.name:restored_howl) AND` \ - # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Return operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. - # * The database is restored from a backup. - # * The backup name contains "backup_howl". - # * The restored database's name contains "restored_howl". - # * The operation started before 2018-03-28T14:50:00Z. - # * The operation resulted in an error. - # @param page_size [::Integer] - # Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} - # to the same `parent` and with the same `filter`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new - # - # # Call the list_database_operations method. - # result = client.list_database_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_database_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_database_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_database_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_database_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.list_database_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_database_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the backup {::Google::Longrunning::Operation long-running operations} in - # the given instance. A backup operation has a name of the form - # `projects//instances//backups//operations/`. - # The long-running operation - # {::Google::Longrunning::Operation#metadata metadata} field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. Operations returned are ordered by - # `operation.metadata.value.progress.start_time` in descending order starting - # from the most recently started operation. - # - # @overload list_backup_operations(request, options = nil) - # Pass arguments to `list_backup_operations` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backup_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance of the backup operations. Values are of - # the form `projects//instances/`. - # @param filter [::String] - # An expression that filters the list of returned backup operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the {::Google::Longrunning::Operation operation} - # are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} - # is - # `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic, but - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - # `metadata.database:prod` - Returns operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. - # * The source database name of backup contains the string "prod". - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - # `(metadata.name:howl) AND` \ - # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Returns operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. - # * The backup name contains the string "howl". - # * The operation started before 2018-03-28T14:50:00Z. - # * The operation resulted in an error. - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - # `(metadata.source_backup:test) AND` \ - # `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - # `(error:*)` - Returns operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}. - # * The source backup name contains the string "test". - # * The operation started before 2022-01-18T14:50:00Z. - # * The operation resulted in an error. - # * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - # `(metadata.database:test_db)) OR` \ - # `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - # AND` \ - # `(metadata.source_backup:test_bkp)) AND` \ - # `(error:*)` - Returns operations where: - # * The operation's metadata matches either of criteria: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} - # AND the source database name of the backup contains the string - # "test_db" - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata} - # AND the source backup name contains the string "test_bkp" - # * The operation resulted in an error. - # @param page_size [::Integer] - # Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} - # to the same `parent` and with the same `filter`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new - # - # # Call the list_backup_operations method. - # result = client.list_backup_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_backup_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backup_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backup_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.list_backup_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_backup_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Cloud Spanner database roles. - # - # @overload list_database_roles(request, options = nil) - # Pass arguments to `list_database_roles` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_database_roles(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_database_roles` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The database whose roles should be listed. - # Values are of the form - # `projects//instances//databases/`. - # @param page_size [::Integer] - # Number of database roles to be returned in the response. If 0 or less, - # defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new - # - # # Call the list_database_roles method. - # result = client.list_database_roles request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole. - # p item - # end - # - def list_database_roles request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_database_roles.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_database_roles.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_database_roles.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.list_database_roles request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_database_roles, "database_roles", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds split points to specified tables, indexes of a database. - # - # @overload add_split_points(request, options = nil) - # Pass arguments to `add_split_points` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload add_split_points(database: nil, split_points: nil, initiator: nil) - # Pass arguments to `add_split_points` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database on whose tables/indexes split points are to be - # added. Values are of the form - # `projects//instances//databases/`. - # @param split_points [::Array<::Google::Cloud::Spanner::Admin::Database::V1::SplitPoints, ::Hash>] - # Required. The split points to add. - # @param initiator [::String] - # Optional. A user-supplied tag associated with the split points. - # For example, "intital_data_load", "special_event_1". - # Defaults to "CloudAddSplitPointsAPI" if not specified. - # The length of the tag must not exceed 50 characters,else will be trimmed. - # Only valid UTF8 characters are allowed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new - # - # # Call the add_split_points method. - # result = client.add_split_points request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse. - # p result - # - def add_split_points request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.add_split_points.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.add_split_points.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.add_split_points.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.add_split_points request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new backup schedule. - # - # @overload create_backup_schedule(request, options = nil) - # Pass arguments to `create_backup_schedule` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_backup_schedule(parent: nil, backup_schedule_id: nil, backup_schedule: nil) - # Pass arguments to `create_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the database that this backup schedule applies to. - # @param backup_schedule_id [::String] - # Required. The Id to use for the backup schedule. The `backup_schedule_id` - # appended to `parent` forms the full backup schedule name of the form - # `projects//instances//databases//backupSchedules/`. - # @param backup_schedule [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule, ::Hash] - # Required. The backup schedule to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new - # - # # Call the create_backup_schedule method. - # result = client.create_backup_schedule request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - # p result - # - def create_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_backup_schedule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.create_backup_schedule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets backup schedule for the input schedule name. - # - # @overload get_backup_schedule(request, options = nil) - # Pass arguments to `get_backup_schedule` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_schedule(name: nil) - # Pass arguments to `get_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the schedule to retrieve. - # Values are of the form - # `projects//instances//databases//backupSchedules/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new - # - # # Call the get_backup_schedule method. - # result = client.get_backup_schedule request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - # p result - # - def get_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_backup_schedule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.get_backup_schedule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a backup schedule. - # - # @overload update_backup_schedule(request, options = nil) - # Pass arguments to `update_backup_schedule` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_backup_schedule(backup_schedule: nil, update_mask: nil) - # Pass arguments to `update_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_schedule [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule, ::Hash] - # Required. The backup schedule to update. `backup_schedule.name`, and the - # fields to be updated as specified by `update_mask` are required. Other - # fields are ignored. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask specifying which fields in the BackupSchedule resource - # should be updated. This mask is relative to the BackupSchedule resource, - # not to the request message. The field mask must always be - # specified; this prevents any future fields from being erased - # accidentally. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new - # - # # Call the update_backup_schedule method. - # result = client.update_backup_schedule request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - # p result - # - def update_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_backup_schedule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.update_backup_schedule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a backup schedule. - # - # @overload delete_backup_schedule(request, options = nil) - # Pass arguments to `delete_backup_schedule` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup_schedule(name: nil) - # Pass arguments to `delete_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the schedule to delete. - # Values are of the form - # `projects//instances//databases//backupSchedules/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new - # - # # Call the delete_backup_schedule method. - # result = client.delete_backup_schedule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_backup_schedule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.delete_backup_schedule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the backup schedules for the database. - # - # @overload list_backup_schedules(request, options = nil) - # Pass arguments to `list_backup_schedules` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_schedules(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backup_schedules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Database is the parent resource whose backup schedules should be - # listed. Values are of the form - # projects//instances//databases/ - # @param page_size [::Integer] - # Optional. Number of backup schedules to be returned in the response. If 0 - # or less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # Optional. If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse ListBackupSchedulesResponse} - # to the same `parent`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/database/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new - # - # # Call the list_backup_schedules method. - # result = client.list_backup_schedules request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - # p item - # end - # - def list_backup_schedules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_backup_schedules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_backup_schedules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_schedules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @database_admin_stub.list_backup_schedules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @database_admin_stub, :list_backup_schedules, "backup_schedules", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the DatabaseAdmin REST API. - # - # This class represents the configuration for DatabaseAdmin REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_databases to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_databases.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_databases.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "spanner.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DatabaseAdmin API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_databases` - # @return [::Gapic::Config::Method] - # - attr_reader :list_databases - ## - # RPC-specific configuration for `create_database` - # @return [::Gapic::Config::Method] - # - attr_reader :create_database - ## - # RPC-specific configuration for `get_database` - # @return [::Gapic::Config::Method] - # - attr_reader :get_database - ## - # RPC-specific configuration for `update_database` - # @return [::Gapic::Config::Method] - # - attr_reader :update_database - ## - # RPC-specific configuration for `update_database_ddl` - # @return [::Gapic::Config::Method] - # - attr_reader :update_database_ddl - ## - # RPC-specific configuration for `drop_database` - # @return [::Gapic::Config::Method] - # - attr_reader :drop_database - ## - # RPC-specific configuration for `get_database_ddl` - # @return [::Gapic::Config::Method] - # - attr_reader :get_database_ddl - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `create_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup - ## - # RPC-specific configuration for `copy_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :copy_backup - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `update_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `restore_database` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_database - ## - # RPC-specific configuration for `list_database_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_database_operations - ## - # RPC-specific configuration for `list_backup_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_operations - ## - # RPC-specific configuration for `list_database_roles` - # @return [::Gapic::Config::Method] - # - attr_reader :list_database_roles - ## - # RPC-specific configuration for `add_split_points` - # @return [::Gapic::Config::Method] - # - attr_reader :add_split_points - ## - # RPC-specific configuration for `create_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_schedule - ## - # RPC-specific configuration for `get_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_schedule - ## - # RPC-specific configuration for `update_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_schedule - ## - # RPC-specific configuration for `delete_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_schedule - ## - # RPC-specific configuration for `list_backup_schedules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_schedules - - # @private - def initialize parent_rpcs = nil - list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases - @list_databases = ::Gapic::Config::Method.new list_databases_config - create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database - @create_database = ::Gapic::Config::Method.new create_database_config - get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database - @get_database = ::Gapic::Config::Method.new get_database_config - update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database - @update_database = ::Gapic::Config::Method.new update_database_config - update_database_ddl_config = parent_rpcs.update_database_ddl if parent_rpcs.respond_to? :update_database_ddl - @update_database_ddl = ::Gapic::Config::Method.new update_database_ddl_config - drop_database_config = parent_rpcs.drop_database if parent_rpcs.respond_to? :drop_database - @drop_database = ::Gapic::Config::Method.new drop_database_config - get_database_ddl_config = parent_rpcs.get_database_ddl if parent_rpcs.respond_to? :get_database_ddl - @get_database_ddl = ::Gapic::Config::Method.new get_database_ddl_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup - @create_backup = ::Gapic::Config::Method.new create_backup_config - copy_backup_config = parent_rpcs.copy_backup if parent_rpcs.respond_to? :copy_backup - @copy_backup = ::Gapic::Config::Method.new copy_backup_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup - @update_backup = ::Gapic::Config::Method.new update_backup_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database - @restore_database = ::Gapic::Config::Method.new restore_database_config - list_database_operations_config = parent_rpcs.list_database_operations if parent_rpcs.respond_to? :list_database_operations - @list_database_operations = ::Gapic::Config::Method.new list_database_operations_config - list_backup_operations_config = parent_rpcs.list_backup_operations if parent_rpcs.respond_to? :list_backup_operations - @list_backup_operations = ::Gapic::Config::Method.new list_backup_operations_config - list_database_roles_config = parent_rpcs.list_database_roles if parent_rpcs.respond_to? :list_database_roles - @list_database_roles = ::Gapic::Config::Method.new list_database_roles_config - add_split_points_config = parent_rpcs.add_split_points if parent_rpcs.respond_to? :add_split_points - @add_split_points = ::Gapic::Config::Method.new add_split_points_config - create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule - @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config - get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule - @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config - update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule - @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config - delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule - @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config - list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules - @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb deleted file mode 100644 index 59a81545701e..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb +++ /dev/null @@ -1,1014 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - module DatabaseAdmin - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DatabaseAdmin Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the DatabaseAdmin Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Database::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "spanner.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/operations/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb deleted file mode 100644 index 1322d594b811..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb +++ /dev/null @@ -1,1740 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/spanner/admin/database/v1/spanner_database_admin_pb" - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - module DatabaseAdmin - module Rest - ## - # REST service stub for the DatabaseAdmin service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_databases REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse] - # A result object deserialized from the server's reply - def list_databases request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_databases_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_databases", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_database REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_database request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_database_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_database", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_database REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Database] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Database] - # A result object deserialized from the server's reply - def get_database request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_database_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_database", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::Database.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_database REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_database request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_database_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_database", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_database_ddl REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_database_ddl request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_database_ddl_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_database_ddl", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the drop_database REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def drop_database request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_drop_database_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "drop_database", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_database_ddl REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse] - # A result object deserialized from the server's reply - def get_database_ddl request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_database_ddl_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_database_ddl", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_backup REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the copy_backup REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def copy_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_copy_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "copy_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # A result object deserialized from the server's reply - def get_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_backup REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # A result object deserialized from the server's reply - def update_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_backup REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backups REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse] - # A result object deserialized from the server's reply - def list_backups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the restore_database REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def restore_database request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restore_database_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "restore_database", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_database_operations REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse] - # A result object deserialized from the server's reply - def list_database_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_database_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_database_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backup_operations REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse] - # A result object deserialized from the server's reply - def list_backup_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backup_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_database_roles REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse] - # A result object deserialized from the server's reply - def list_database_roles request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_database_roles_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_database_roles", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the add_split_points REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse] - # A result object deserialized from the server's reply - def add_split_points request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_add_split_points_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "add_split_points", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # A result object deserialized from the server's reply - def create_backup_schedule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_schedule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_backup_schedule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # A result object deserialized from the server's reply - def get_backup_schedule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_schedule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_backup_schedule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # A result object deserialized from the server's reply - def update_backup_schedule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_schedule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_backup_schedule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_backup_schedule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_schedule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_backup_schedule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_backup_schedules REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse] - # A result object deserialized from the server's reply - def list_backup_schedules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_schedules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_backup_schedules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_databases REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_databases_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/databases", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_database REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_database_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/databases", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_database REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_database_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_database REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_database_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{database.name}", - body: "database", - matches: [ - ["database.name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_database_ddl REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_database_ddl_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{database}/ddl", - body: "*", - matches: [ - ["database", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the drop_database REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_drop_database_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{database}", - matches: [ - ["database", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_database_ddl REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_database_ddl_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{database}/ddl", - matches: [ - ["database", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/databaseRoles/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backups", - body: "backup", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the copy_backup REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_copy_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backups:copy", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup.name}", - body: "backup", - matches: [ - ["backup.name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backups REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backups", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restore_database REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restore_database_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/databases:restore", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_database_operations REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_database_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/databaseOperations", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_operations REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backup_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupOperations", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_database_roles REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_database_roles_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/databaseRoles", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the add_split_points REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_add_split_points_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{database}:addSplitPoints", - body: "*", - matches: [ - ["database", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_backup_schedule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupSchedules", - body: "backup_schedule", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_backup_schedule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_backup_schedule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_schedule.name}", - body: "backup_schedule", - matches: [ - ["backup_schedule.name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_backup_schedule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_schedules REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_backup_schedules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupSchedules", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.rb deleted file mode 100644 index d33ad82d059e..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/rest.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/spanner/admin/database/v1/database_admin/rest" -require "google/cloud/spanner/admin/database/v1/version" - -module Google - module Cloud - module Spanner - module Admin - module Database - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/spanner/admin/database/v1/rest" - # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new - # - module V1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb deleted file mode 100644 index 112d0b089460..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/cloud/spanner/admin/database/v1/version.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - VERSION = "0.0.1" - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_pb.rb deleted file mode 100644 index 6435707649ba..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/admin/database/v1/backup.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/spanner/admin/database/v1/common_pb' - - -descriptor_data = "\n-google/spanner/admin/database/v1/backup.proto\x12 google.spanner.admin.database.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a-google/spanner/admin/database/v1/common.proto\"\xed\t\n\x06\x42\x61\x63kup\x12\x36\n\x08\x64\x61tabase\x18\x02 \x01(\tB$\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x30\n\x0cversion_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12 \n\x13\x66reeable_size_bytes\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03\x12!\n\x14\x65xclusive_size_bytes\x18\x10 \x01(\x03\x42\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x06 \x01(\x0e\x32..google.spanner.admin.database.v1.Backup.StateB\x03\xe0\x41\x03\x12\x46\n\x15referencing_databases\x18\x07 \x03(\tB\'\xe0\x41\x03\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12N\n\x0f\x65ncryption_info\x18\x08 \x01(\x0b\x32\x30.google.spanner.admin.database.v1.EncryptionInfoB\x03\xe0\x41\x03\x12U\n\x16\x65ncryption_information\x18\r \x03(\x0b\x32\x30.google.spanner.admin.database.v1.EncryptionInfoB\x03\xe0\x41\x03\x12P\n\x10\x64\x61tabase_dialect\x18\n \x01(\x0e\x32\x31.google.spanner.admin.database.v1.DatabaseDialectB\x03\xe0\x41\x03\x12\x42\n\x13referencing_backups\x18\x0b \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x38\n\x0fmax_expire_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x10\x62\x61\x63kup_schedules\x18\x0e \x03(\tB-\xe0\x41\x03\xfa\x41\'\n%spanner.googleapis.com/BackupSchedule\x12(\n\x1bincremental_backup_chain_id\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12<\n\x13oldest_version_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x13instance_partitions\x18\x13 \x03(\x0b\x32\x39.google.spanner.admin.database.v1.BackupInstancePartitionB\x03\xe0\x41\x03\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02:\\\xea\x41Y\n\x1dspanner.googleapis.com/Backup\x12\x38projects/{project}/instances/{instance}/backups/{backup}\"\x85\x02\n\x13\x43reateBackupRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x16\n\tbackup_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x06\x62\x61\x63kup\x18\x03 \x01(\x0b\x32(.google.spanner.admin.database.v1.BackupB\x03\xe0\x41\x02\x12^\n\x11\x65ncryption_config\x18\x04 \x01(\x0b\x32>.google.spanner.admin.database.v1.CreateBackupEncryptionConfigB\x03\xe0\x41\x01\"\xf8\x01\n\x14\x43reateBackupMetadata\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x36\n\x08\x64\x61tabase\x18\x02 \x01(\tB$\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x45\n\x08progress\x18\x03 \x01(\x0b\x32\x33.google.spanner.admin.database.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xb6\x02\n\x11\x43opyBackupRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x16\n\tbackup_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\rsource_backup\x18\x03 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x34\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\\\n\x11\x65ncryption_config\x18\x05 \x01(\x0b\x32<.google.spanner.admin.database.v1.CopyBackupEncryptionConfigB\x03\xe0\x41\x01\"\xf9\x01\n\x12\x43opyBackupMetadata\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x39\n\rsource_backup\x18\x02 \x01(\tB\"\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x45\n\x08progress\x18\x03 \x01(\x0b\x32\x33.google.spanner.admin.database.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8a\x01\n\x13UpdateBackupRequest\x12=\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32(.google.spanner.admin.database.v1.BackupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"G\n\x10GetBackupRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\"J\n\x13\x44\x65leteBackupRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\"\x84\x01\n\x12ListBackupsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"i\n\x13ListBackupsResponse\x12\x39\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32(.google.spanner.admin.database.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8d\x01\n\x1bListBackupOperationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"j\n\x1cListBackupOperationsResponse\x12\x31\n\noperations\x18\x01 \x03(\x0b\x32\x1d.google.longrunning.Operation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe2\x01\n\nBackupInfo\x12\x32\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dspanner.googleapis.com/Backup\x12\x30\n\x0cversion_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12=\n\x0fsource_database\x18\x03 \x01(\tB$\xfa\x41!\n\x1fspanner.googleapis.com/Database\"\x9f\x03\n\x1c\x43reateBackupEncryptionConfig\x12k\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32M.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionTypeB\x03\xe0\x41\x02\x12?\n\x0ckms_key_name\x18\x02 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12@\n\rkms_key_names\x18\x03 \x03(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\x8e\x01\n\x0e\x45ncryptionType\x12\x1f\n\x1b\x45NCRYPTION_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17USE_DATABASE_ENCRYPTION\x10\x01\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x02\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x03\"\xab\x03\n\x1a\x43opyBackupEncryptionConfig\x12i\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32K.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionTypeB\x03\xe0\x41\x02\x12?\n\x0ckms_key_name\x18\x02 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12@\n\rkms_key_names\x18\x03 \x03(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\x9e\x01\n\x0e\x45ncryptionType\x12\x1f\n\x1b\x45NCRYPTION_TYPE_UNSPECIFIED\x10\x00\x12+\n\'USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION\x10\x01\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x02\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x03\"\x10\n\x0e\x46ullBackupSpec\"\x17\n\x15IncrementalBackupSpec\"d\n\x17\x42\x61\x63kupInstancePartition\x12I\n\x12instance_partition\x18\x01 \x01(\tB-\xfa\x41*\n(spanner.googleapis.com/InstancePartitionB\xfd\x01\n$com.google.spanner.admin.database.v1B\x0b\x42\x61\x63kupProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Backup").msgclass - Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Backup.State").enummodule - CreateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupRequest").msgclass - CreateBackupMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupMetadata").msgclass - CopyBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CopyBackupRequest").msgclass - CopyBackupMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CopyBackupMetadata").msgclass - UpdateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateBackupRequest").msgclass - GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetBackupRequest").msgclass - DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DeleteBackupRequest").msgclass - ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupsRequest").msgclass - ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupsResponse").msgclass - ListBackupOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsRequest").msgclass - ListBackupOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupOperationsResponse").msgclass - BackupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupInfo").msgclass - CreateBackupEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupEncryptionConfig").msgclass - CreateBackupEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType").enummodule - CopyBackupEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CopyBackupEncryptionConfig").msgclass - CopyBackupEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType").enummodule - FullBackupSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.FullBackupSpec").msgclass - IncrementalBackupSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.IncrementalBackupSpec").msgclass - BackupInstancePartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupInstancePartition").msgclass - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_schedule_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_schedule_pb.rb deleted file mode 100644 index 1a24f3b3670a..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/backup_schedule_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/admin/database/v1/backup_schedule.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/spanner/admin/database/v1/backup_pb' - - -descriptor_data = "\n6google/spanner/admin/database/v1/backup_schedule.proto\x12 google.spanner.admin.database.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a-google/spanner/admin/database/v1/backup.proto\"i\n\x12\x42\x61\x63kupScheduleSpec\x12\x42\n\tcron_spec\x18\x01 \x01(\x0b\x32-.google.spanner.admin.database.v1.CrontabSpecH\x00\x42\x0f\n\rschedule_spec\"\xa4\x05\n\x0e\x42\x61\x63kupSchedule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12G\n\x04spec\x18\x06 \x01(\x0b\x32\x34.google.spanner.admin.database.v1.BackupScheduleSpecB\x03\xe0\x41\x01\x12:\n\x12retention_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12^\n\x11\x65ncryption_config\x18\x04 \x01(\x0b\x32>.google.spanner.admin.database.v1.CreateBackupEncryptionConfigB\x03\xe0\x41\x01\x12L\n\x10\x66ull_backup_spec\x18\x07 \x01(\x0b\x32\x30.google.spanner.admin.database.v1.FullBackupSpecH\x00\x12Z\n\x17incremental_backup_spec\x18\x08 \x01(\x0b\x32\x37.google.spanner.admin.database.v1.IncrementalBackupSpecH\x00\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xa5\x01\xea\x41\xa1\x01\n%spanner.googleapis.com/BackupSchedule\x12Wprojects/{project}/instances/{instance}/databases/{database}/backupSchedules/{schedule}*\x0f\x62\x61\x63kupSchedules2\x0e\x62\x61\x63kupScheduleB\x12\n\x10\x62\x61\x63kup_type_spec\"q\n\x0b\x43rontabSpec\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\ttime_zone\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x37\n\x0f\x63reation_window\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\"\xc7\x01\n\x1b\x43reateBackupScheduleRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x1f\n\x12\x62\x61\x63kup_schedule_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\x0f\x62\x61\x63kup_schedule\x18\x03 \x01(\x0b\x32\x30.google.spanner.admin.database.v1.BackupScheduleB\x03\xe0\x41\x02\"W\n\x18GetBackupScheduleRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/BackupSchedule\"Z\n\x1b\x44\x65leteBackupScheduleRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/BackupSchedule\"\x86\x01\n\x1aListBackupSchedulesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\x1bListBackupSchedulesResponse\x12J\n\x10\x62\x61\x63kup_schedules\x18\x01 \x03(\x0b\x32\x30.google.spanner.admin.database.v1.BackupSchedule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa3\x01\n\x1bUpdateBackupScheduleRequest\x12N\n\x0f\x62\x61\x63kup_schedule\x18\x01 \x01(\x0b\x32\x30.google.spanner.admin.database.v1.BackupScheduleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x42\x85\x02\n$com.google.spanner.admin.database.v1B\x13\x42\x61\x63kupScheduleProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - BackupScheduleSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupScheduleSpec").msgclass - BackupSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.BackupSchedule").msgclass - CrontabSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CrontabSpec").msgclass - CreateBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateBackupScheduleRequest").msgclass - GetBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetBackupScheduleRequest").msgclass - DeleteBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DeleteBackupScheduleRequest").msgclass - ListBackupSchedulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupSchedulesRequest").msgclass - ListBackupSchedulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListBackupSchedulesResponse").msgclass - UpdateBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateBackupScheduleRequest").msgclass - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/common_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/common_pb.rb deleted file mode 100644 index 407157236bdf..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/common_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/admin/database/v1/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n-google/spanner/admin/database/v1/common.proto\x12 google.spanner.admin.database.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8b\x01\n\x11OperationProgress\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8f\x01\n\x10\x45ncryptionConfig\x12<\n\x0ckms_key_name\x18\x02 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12=\n\rkms_key_names\x18\x03 \x03(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\xc2\x02\n\x0e\x45ncryptionInfo\x12S\n\x0f\x65ncryption_type\x18\x03 \x01(\x0e\x32\x35.google.spanner.admin.database.v1.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12\x32\n\x11\x65ncryption_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12I\n\x0fkms_key_version\x18\x02 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02*\\\n\x0f\x44\x61tabaseDialect\x12 \n\x1c\x44\x41TABASE_DIALECT_UNSPECIFIED\x10\x00\x12\x17\n\x13GOOGLE_STANDARD_SQL\x10\x01\x12\x0e\n\nPOSTGRESQL\x10\x02\x42\xa2\x04\n$com.google.spanner.admin.database.v1B\x0b\x43ommonProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - OperationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OperationProgress").msgclass - EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionConfig").msgclass - EncryptionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionInfo").msgclass - EncryptionInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.EncryptionInfo.Type").enummodule - DatabaseDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DatabaseDialect").enummodule - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb deleted file mode 100644 index 5cccf7377b63..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/admin/database/v1/spanner_database_admin.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' -require 'google/spanner/admin/database/v1/backup_pb' -require 'google/spanner/admin/database/v1/backup_schedule_pb' -require 'google/spanner/admin/database/v1/common_pb' - - -descriptor_data = "\n=google/spanner/admin/database/v1/spanner_database_admin.proto\x12 google.spanner.admin.database.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a-google/spanner/admin/database/v1/backup.proto\x1a\x36google/spanner/admin/database/v1/backup_schedule.proto\x1a-google/spanner/admin/database/v1/common.proto\"\xab\x01\n\x0bRestoreInfo\x12H\n\x0bsource_type\x18\x01 \x01(\x0e\x32\x33.google.spanner.admin.database.v1.RestoreSourceType\x12\x43\n\x0b\x62\x61\x63kup_info\x18\x02 \x01(\x0b\x32,.google.spanner.admin.database.v1.BackupInfoH\x00\x42\r\n\x0bsource_info\"\xca\x06\n\x08\x44\x61tabase\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x05state\x18\x02 \x01(\x0e\x32\x30.google.spanner.admin.database.v1.Database.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0crestore_info\x18\x04 \x01(\x0b\x32-.google.spanner.admin.database.v1.RestoreInfoB\x03\xe0\x41\x03\x12R\n\x11\x65ncryption_config\x18\x05 \x01(\x0b\x32\x32.google.spanner.admin.database.v1.EncryptionConfigB\x03\xe0\x41\x03\x12N\n\x0f\x65ncryption_info\x18\x08 \x03(\x0b\x32\x30.google.spanner.admin.database.v1.EncryptionInfoB\x03\xe0\x41\x03\x12%\n\x18version_retention_period\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12>\n\x15\x65\x61rliest_version_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0e\x64\x65\x66\x61ult_leader\x18\t \x01(\tB\x03\xe0\x41\x03\x12P\n\x10\x64\x61tabase_dialect\x18\n \x01(\x0e\x32\x31.google.spanner.admin.database.v1.DatabaseDialectB\x03\xe0\x41\x03\x12\x1e\n\x16\x65nable_drop_protection\x18\x0b \x01(\x08\x12\x18\n\x0breconciling\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\"M\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x14\n\x10READY_OPTIMIZING\x10\x03:b\xea\x41_\n\x1fspanner.googleapis.com/Database\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/instances/*}/databases\x12\xa4\x02\n\x0e\x43reateDatabase\x12\x37.google.spanner.admin.database.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41\x64\n)google.spanner.admin.database.v1.Database\x12\x37google.spanner.admin.database.v1.CreateDatabaseMetadata\xda\x41\x17parent,create_statement\x82\xd3\xe4\x93\x02\x32\"-/v1/{parent=projects/*/instances/*}/databases:\x01*\x12\xad\x01\n\x0bGetDatabase\x12\x34.google.spanner.admin.database.v1.GetDatabaseRequest\x1a*.google.spanner.admin.database.v1.Database\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/instances/*/databases/*}\x12\xef\x01\n\x0eUpdateDatabase\x12\x37.google.spanner.admin.database.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{database.name=projects/*/instances/*/databases/*}:\x08\x64\x61tabase\x12\x9d\x02\n\x11UpdateDatabaseDdl\x12:.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41S\n\x15google.protobuf.Empty\x12:google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata\xda\x41\x13\x64\x61tabase,statements\x82\xd3\xe4\x93\x02:25/v1/{database=projects/*/instances/*/databases/*}/ddl:\x01*\x12\xa3\x01\n\x0c\x44ropDatabase\x12\x35.google.spanner.admin.database.v1.DropDatabaseRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x33*1/v1/{database=projects/*/instances/*/databases/*}\x12\xcd\x01\n\x0eGetDatabaseDdl\x12\x37.google.spanner.admin.database.v1.GetDatabaseDdlRequest\x1a\x38.google.spanner.admin.database.v1.GetDatabaseDdlResponse\"H\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{database=projects/*/instances/*/databases/*}/ddl\x12\xc2\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xf6\x01\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\xdd\x01\">/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy:\x01*ZA\"/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy:\x01*ZA\".google.spanner.admin.database.v1.ListBackupOperationsResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/instances/*}/backupOperations\x12\xdc\x01\n\x11ListDatabaseRoles\x12:.google.spanner.admin.database.v1.ListDatabaseRolesRequest\x1a;.google.spanner.admin.database.v1.ListDatabaseRolesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/instances/*/databases/*}/databaseRoles\x12\xe8\x01\n\x0e\x41\x64\x64SplitPoints\x12\x37.google.spanner.admin.database.v1.AddSplitPointsRequest\x1a\x38.google.spanner.admin.database.v1.AddSplitPointsResponse\"c\xda\x41\x15\x64\x61tabase,split_points\x82\xd3\xe4\x93\x02\x45\"@/v1/{database=projects/*/instances/*/databases/*}:addSplitPoints:\x01*\x12\x8e\x02\n\x14\x43reateBackupSchedule\x12=.google.spanner.admin.database.v1.CreateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x84\x01\xda\x41)parent,backup_schedule,backup_schedule_id\x82\xd3\xe4\x93\x02R\"?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xd1\x01\n\x11GetBackupSchedule\x12:.google.spanner.admin.database.v1.GetBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\x90\x02\n\x14UpdateBackupSchedule\x12=.google.spanner.admin.database.v1.UpdateBackupScheduleRequest\x1a\x30.google.spanner.admin.database.v1.BackupSchedule\"\x86\x01\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02\x62\x32O/v1/{backup_schedule.name=projects/*/instances/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xbd\x01\n\x14\x44\x65leteBackupSchedule\x12=.google.spanner.admin.database.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/instances/*/databases/*/backupSchedules/*}\x12\xe4\x01\n\x13ListBackupSchedules\x12<.google.spanner.admin.database.v1.ListBackupSchedulesRequest\x1a=.google.spanner.admin.database.v1.ListBackupSchedulesResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/instances/*/databases/*}/backupSchedules\x12\xc7\x01\n\x1cInternalUpdateGraphOperation\x12\x45.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest\x1a\x46.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse\"\x18\xda\x41\x15\x64\x61tabase,operation_id\x1ax\xca\x41\x16spanner.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.adminB\xd6\x03\n$com.google.spanner.admin.database.v1B\x19SpannerDatabaseAdminProtoP\x01ZFcloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb\xaa\x02&Google.Cloud.Spanner.Admin.Database.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Database\\V1\xea\x02+Google::Cloud::Spanner::Admin::Database::V1\xea\x41J\n\x1fspanner.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41{\n(spanner.googleapis.com/InstancePartition\x12Oprojects/{project}/instances/{instance}/instancePartitions/{instance_partition}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - RestoreInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreInfo").msgclass - Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Database").msgclass - Database::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.Database.State").enummodule - ListDatabasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabasesRequest").msgclass - ListDatabasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabasesResponse").msgclass - CreateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateDatabaseRequest").msgclass - CreateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.CreateDatabaseMetadata").msgclass - GetDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseRequest").msgclass - UpdateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseRequest").msgclass - UpdateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseMetadata").msgclass - UpdateDatabaseDdlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseDdlRequest").msgclass - DdlStatementActionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DdlStatementActionInfo").msgclass - UpdateDatabaseDdlMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata").msgclass - DropDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DropDatabaseRequest").msgclass - GetDatabaseDdlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseDdlRequest").msgclass - GetDatabaseDdlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.GetDatabaseDdlResponse").msgclass - ListDatabaseOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsRequest").msgclass - ListDatabaseOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseOperationsResponse").msgclass - RestoreDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseRequest").msgclass - RestoreDatabaseEncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig").msgclass - RestoreDatabaseEncryptionConfig::EncryptionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType").enummodule - RestoreDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreDatabaseMetadata").msgclass - OptimizeRestoredDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata").msgclass - DatabaseRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.DatabaseRole").msgclass - ListDatabaseRolesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseRolesRequest").msgclass - ListDatabaseRolesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.ListDatabaseRolesResponse").msgclass - AddSplitPointsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.AddSplitPointsRequest").msgclass - AddSplitPointsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.AddSplitPointsResponse").msgclass - SplitPoints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.SplitPoints").msgclass - SplitPoints::Key = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.SplitPoints.Key").msgclass - InternalUpdateGraphOperationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest").msgclass - InternalUpdateGraphOperationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse").msgclass - RestoreSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.database.v1.RestoreSourceType").enummodule - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb deleted file mode 100644 index 84dcc83177fd..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +++ /dev/null @@ -1,245 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/spanner/admin/database/v1/spanner_database_admin.proto for package 'Google.Cloud.Spanner.Admin.Database.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/spanner/admin/database/v1/spanner_database_admin_pb' - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - module DatabaseAdmin - # Cloud Spanner Database Admin API - # - # The Cloud Spanner Database Admin API can be used to: - # * create, drop, and list databases - # * update the schema of pre-existing databases - # * create, delete, copy and list backups for a database - # * restore a database from an existing backup - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.spanner.admin.database.v1.DatabaseAdmin' - - # Lists Cloud Spanner databases. - rpc :ListDatabases, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse - # Creates a new Cloud Spanner database and starts to prepare it for serving. - # The returned [long-running operation][google.longrunning.Operation] will - # have a name of the format `/operations/` and - # can be used to track preparation of the database. The - # [metadata][google.longrunning.Operation.metadata] field type is - # [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. - # The [response][google.longrunning.Operation.response] field type is - # [Database][google.spanner.admin.database.v1.Database], if successful. - rpc :CreateDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, ::Google::Longrunning::Operation - # Gets the state of a Cloud Spanner database. - rpc :GetDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Database - # Updates a Cloud Spanner database. The returned - # [long-running operation][google.longrunning.Operation] can be used to track - # the progress of updating the database. If the named database does not - # exist, returns `NOT_FOUND`. - # - # While the operation is pending: - # - # * The database's - # [reconciling][google.spanner.admin.database.v1.Database.reconciling] - # field is set to true. - # * Cancelling the operation is best-effort. If the cancellation succeeds, - # the operation metadata's - # [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time] - # is set, the updates are reverted, and the operation terminates with a - # `CANCELLED` status. - # * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error - # until the pending operation is done (returns successfully or with - # error). - # * Reading the database via the API continues to give the pre-request - # values. - # - # Upon completion of the returned operation: - # - # * The new values are in effect and readable via the API. - # * The database's - # [reconciling][google.spanner.admin.database.v1.Database.reconciling] - # field becomes false. - # - # The returned [long-running operation][google.longrunning.Operation] will - # have a name of the format - # `projects//instances//databases//operations/` - # and can be used to track the database modification. The - # [metadata][google.longrunning.Operation.metadata] field type is - # [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata]. - # The [response][google.longrunning.Operation.response] field type is - # [Database][google.spanner.admin.database.v1.Database], if successful. - rpc :UpdateDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest, ::Google::Longrunning::Operation - # Updates the schema of a Cloud Spanner database by - # creating/altering/dropping tables, columns, indexes, etc. The returned - # [long-running operation][google.longrunning.Operation] will have a name of - # the format `/operations/` and can be used to - # track execution of the schema change(s). The - # [metadata][google.longrunning.Operation.metadata] field type is - # [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. - # The operation has no response. - rpc :UpdateDatabaseDdl, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, ::Google::Longrunning::Operation - # Drops (aka deletes) a Cloud Spanner database. - # Completed backups for the database will be retained according to their - # `expire_time`. - # Note: Cloud Spanner might continue to accept requests for a few seconds - # after the database has been deleted. - rpc :DropDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest, ::Google::Protobuf::Empty - # Returns the schema of a Cloud Spanner database as a list of formatted - # DDL statements. This method does not show pending schema updates, those may - # be queried using the [Operations][google.longrunning.Operations] API. - rpc :GetDatabaseDdl, ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest, ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse - # Sets the access control policy on a database or backup resource. - # Replaces any existing policy. - # - # Authorization requires `spanner.databases.setIamPolicy` - # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. - # For backups, authorization requires `spanner.backups.setIamPolicy` - # permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the access control policy for a database or backup resource. - # Returns an empty policy if a database or backup exists but does not have a - # policy set. - # - # Authorization requires `spanner.databases.getIamPolicy` permission on - # [resource][google.iam.v1.GetIamPolicyRequest.resource]. - # For backups, authorization requires `spanner.backups.getIamPolicy` - # permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns permissions that the caller has on the specified database or backup - # resource. - # - # Attempting this RPC on a non-existent Cloud Spanner database will - # result in a NOT_FOUND error if the user has - # `spanner.databases.list` permission on the containing Cloud - # Spanner instance. Otherwise returns an empty set of permissions. - # Calling this method on a backup that does not exist will - # result in a NOT_FOUND error if the user has - # `spanner.backups.list` permission on the containing instance. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Starts creating a new Cloud Spanner Backup. - # The returned backup [long-running operation][google.longrunning.Operation] - # will have a name of the format - # `projects//instances//backups//operations/` - # and can be used to track creation of the backup. The - # [metadata][google.longrunning.Operation.metadata] field type is - # [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. - # The [response][google.longrunning.Operation.response] field type is - # [Backup][google.spanner.admin.database.v1.Backup], if successful. - # Cancelling the returned operation will stop the creation and delete the - # backup. There can be only one pending backup creation per database. Backup - # creation of different databases can run concurrently. - rpc :CreateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, ::Google::Longrunning::Operation - # Starts copying a Cloud Spanner Backup. - # The returned backup [long-running operation][google.longrunning.Operation] - # will have a name of the format - # `projects//instances//backups//operations/` - # and can be used to track copying of the backup. The operation is associated - # with the destination backup. - # The [metadata][google.longrunning.Operation.metadata] field type is - # [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. - # The [response][google.longrunning.Operation.response] field type is - # [Backup][google.spanner.admin.database.v1.Backup], if successful. - # Cancelling the returned operation will stop the copying and delete the - # destination backup. Concurrent CopyBackup requests can run on the same - # source backup. - rpc :CopyBackup, ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest, ::Google::Longrunning::Operation - # Gets metadata on a pending or completed - # [Backup][google.spanner.admin.database.v1.Backup]. - rpc :GetBackup, ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup - # Updates a pending or completed - # [Backup][google.spanner.admin.database.v1.Backup]. - rpc :UpdateBackup, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, ::Google::Cloud::Spanner::Admin::Database::V1::Backup - # Deletes a pending or completed - # [Backup][google.spanner.admin.database.v1.Backup]. - rpc :DeleteBackup, ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, ::Google::Protobuf::Empty - # Lists completed and pending backups. - # Backups returned are ordered by `create_time` in descending order, - # starting from the most recent `create_time`. - rpc :ListBackups, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse - # Create a new database by restoring from a completed backup. The new - # database must be in the same project and in an instance with the same - # instance configuration as the instance containing - # the backup. The returned database [long-running - # operation][google.longrunning.Operation] has a name of the format - # `projects//instances//databases//operations/`, - # and can be used to track the progress of the operation, and to cancel it. - # The [metadata][google.longrunning.Operation.metadata] field type is - # [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. - # The [response][google.longrunning.Operation.response] type - # is [Database][google.spanner.admin.database.v1.Database], if - # successful. Cancelling the returned operation will stop the restore and - # delete the database. - # There can be only one database being restored into an instance at a time. - # Once the restore operation completes, a new restore operation can be - # initiated, without waiting for the optimize operation associated with the - # first restore to complete. - rpc :RestoreDatabase, ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest, ::Google::Longrunning::Operation - # Lists database [longrunning-operations][google.longrunning.Operation]. - # A database operation has a name of the form - # `projects//instances//databases//operations/`. - # The long-running operation - # [metadata][google.longrunning.Operation.metadata] field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. - rpc :ListDatabaseOperations, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse - # Lists the backup [long-running operations][google.longrunning.Operation] in - # the given instance. A backup operation has a name of the form - # `projects//instances//backups//operations/`. - # The long-running operation - # [metadata][google.longrunning.Operation.metadata] field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. Operations returned are ordered by - # `operation.metadata.value.progress.start_time` in descending order starting - # from the most recently started operation. - rpc :ListBackupOperations, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse - # Lists Cloud Spanner database roles. - rpc :ListDatabaseRoles, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse - # Adds split points to specified tables, indexes of a database. - rpc :AddSplitPoints, ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest, ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse - # Creates a new backup schedule. - rpc :CreateBackupSchedule, ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest, ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule - # Gets backup schedule for the input schedule name. - rpc :GetBackupSchedule, ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest, ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule - # Updates a backup schedule. - rpc :UpdateBackupSchedule, ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest, ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule - # Deletes a backup schedule. - rpc :DeleteBackupSchedule, ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest, ::Google::Protobuf::Empty - # Lists all the backup schedules for the database. - rpc :ListBackupSchedules, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest, ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse - # This is an internal API called by Spanner Graph jobs. You should never need - # to call this API directly. - rpc :InternalUpdateGraphOperation, ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest, ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/README.md deleted file mode 100644 index c27a38fa2526..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Spanner Database Admin V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.rb deleted file mode 100644 index e94d6cbaa8e3..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup.rb +++ /dev/null @@ -1,730 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - # A backup of a Cloud Spanner database. - # @!attribute [rw] database - # @return [::String] - # Required for the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} - # operation. Name of the database from which this backup was created. This - # needs to be in the same instance as the backup. Values are of the form - # `projects//instances//databases/`. - # @!attribute [rw] version_time - # @return [::Google::Protobuf::Timestamp] - # The backup will contain an externally consistent copy of the database at - # the timestamp specified by `version_time`. If `version_time` is not - # specified, the system will set `version_time` to the `create_time` of the - # backup. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Required for the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} - # operation. The expiration time of the backup, with microseconds - # granularity that must be at least 6 hours and at most 366 days - # from the time the CreateBackup request is processed. Once the `expire_time` - # has passed, the backup is eligible to be automatically deleted by Cloud - # Spanner to free the resources used by the backup. - # @!attribute [rw] name - # @return [::String] - # Output only for the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} - # operation. Required for the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup} - # operation. - # - # A globally unique identifier for the backup which cannot be - # changed. Values are of the form - # `projects//instances//backups/[a-z][a-z0-9_\-]*[a-z0-9]` - # The final segment of the name must be between 2 and 60 characters - # in length. - # - # The backup is stored in the location(s) specified in the instance - # configuration of the instance containing the backup, identified - # by the prefix of the backup name of the form - # `projects//instances/`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} - # request is received. If the request does not specify `version_time`, the - # `version_time` of the backup will be equivalent to the `create_time`. - # @!attribute [r] size_bytes - # @return [::Integer] - # Output only. Size of the backup in bytes. - # @!attribute [r] freeable_size_bytes - # @return [::Integer] - # Output only. The number of bytes that will be freed by deleting this - # backup. This value will be zero if, for example, this backup is part of an - # incremental backup chain and younger backups in the chain require that we - # keep its data. For backups not in an incremental backup chain, this is - # always the size of the backup. This value may change if backups on the same - # chain get created, deleted or expired. - # @!attribute [r] exclusive_size_bytes - # @return [::Integer] - # Output only. For a backup in an incremental backup chain, this is the - # storage space needed to keep the data that has changed since the previous - # backup. For all other backups, this is always the size of the backup. This - # value may change if backups on the same chain get deleted or expired. - # - # This field can be used to calculate the total storage space used by a set - # of backups. For example, the total space used by all backups of a database - # can be computed by summing up this field. - # @!attribute [r] state - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup::State] - # Output only. The current state of the backup. - # @!attribute [r] referencing_databases - # @return [::Array<::String>] - # Output only. The names of the restored databases that reference the backup. - # The database names are of - # the form `projects//instances//databases/`. - # Referencing databases may exist in different instances. The existence of - # any referencing database prevents the backup from being deleted. When a - # restored database from the backup enters the `READY` state, the reference - # to the backup is removed. - # @!attribute [r] encryption_info - # @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo] - # Output only. The encryption information for the backup. - # @!attribute [r] encryption_information - # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo>] - # Output only. The encryption information for the backup, whether it is - # protected by one or more KMS keys. The information includes all Cloud - # KMS key versions used to encrypt the backup. The `encryption_status' field - # inside of each `EncryptionInfo` is not populated. At least one of the key - # versions must be available for the backup to be restored. If a key version - # is revoked in the middle of a restore, the restore behavior is undefined. - # @!attribute [r] database_dialect - # @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect] - # Output only. The database dialect information for the backup. - # @!attribute [r] referencing_backups - # @return [::Array<::String>] - # Output only. The names of the destination backups being created by copying - # this source backup. The backup names are of the form - # `projects//instances//backups/`. - # Referencing backups may exist in different instances. The existence of - # any referencing backup prevents the backup from being deleted. When the - # copy operation is done (either successfully completed or cancelled or the - # destination backup is deleted), the reference to the backup is removed. - # @!attribute [r] max_expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The max allowed expiration time of the backup, with - # microseconds granularity. A backup's expiration time can be configured in - # multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or - # copying an existing backup, the expiration time specified must be - # less than `Backup.max_expire_time`. - # @!attribute [r] backup_schedules - # @return [::Array<::String>] - # Output only. List of backup schedule URIs that are associated with - # creating this backup. This is only applicable for scheduled backups, and - # is empty for on-demand backups. - # - # To optimize for storage, whenever possible, multiple schedules are - # collapsed together to create one backup. In such cases, this field captures - # the list of all backup schedule URIs that are associated with creating - # this backup. If collapsing is not done, then this field captures the - # single backup schedule URI associated with creating this backup. - # @!attribute [r] incremental_backup_chain_id - # @return [::String] - # Output only. Populated only for backups in an incremental backup chain. - # Backups share the same chain id if and only if they belong to the same - # incremental backup chain. Use this field to determine which backups are - # part of the same incremental backup chain. The ordering of backups in the - # chain can be determined by ordering the backup `version_time`. - # @!attribute [r] oldest_version_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Data deleted at a time older than this is guaranteed not to be - # retained in order to support this backup. For a backup in an incremental - # backup chain, this is the version time of the oldest backup that exists or - # ever existed in the chain. For all other backups, this is the version time - # of the backup. This field can be used to understand what data is being - # retained by the backup system. - # @!attribute [r] instance_partitions - # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::BackupInstancePartition>] - # Output only. The instance partition(s) storing the backup. - # - # This is the same as the list of the instance partition(s) that the database - # had footprint in at the backup's `version_time`. - class Backup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates the current state of the backup. - module State - # Not specified. - STATE_UNSPECIFIED = 0 - - # The pending backup is still being created. Operations on the - # backup may fail with `FAILED_PRECONDITION` in this state. - CREATING = 1 - - # The backup is complete and ready for use. - READY = 2 - end - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the instance in which the backup will be - # created. This must be the same instance that contains the database the - # backup will be created from. The backup will be stored in the - # location(s) specified in the instance configuration of this - # instance. Values are of the form - # `projects//instances/`. - # @!attribute [rw] backup_id - # @return [::String] - # Required. The id of the backup to be created. The `backup_id` appended to - # `parent` forms the full backup name of the form - # `projects//instances//backups/`. - # @!attribute [rw] backup - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # Required. The backup to create. - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig] - # Optional. The encryption configuration used to encrypt the backup. If this - # field is not specified, the backup will use the same encryption - # configuration as the database by default, namely - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} - # = `USE_DATABASE_ENCRYPTION`. - class CreateBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}. - # @!attribute [rw] name - # @return [::String] - # The name of the backup being created. - # @!attribute [rw] database - # @return [::String] - # The name of the database the backup is created from. - # @!attribute [rw] progress - # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress] - # The progress of the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} - # operation. - # @!attribute [rw] cancel_time - # @return [::Google::Protobuf::Timestamp] - # The time at which cancellation of this operation was received. - # Operations.CancelOperation - # starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not guaranteed. - # Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - class CreateBackupMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup}. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the destination instance that will contain the backup - # copy. Values are of the form: `projects//instances/`. - # @!attribute [rw] backup_id - # @return [::String] - # Required. The id of the backup copy. - # The `backup_id` appended to `parent` forms the full backup_uri of the form - # `projects//instances//backups/`. - # @!attribute [rw] source_backup - # @return [::String] - # Required. The source backup to be copied. - # The source backup needs to be in READY state for it to be copied. - # Once CopyBackup is in progress, the source backup cannot be deleted or - # cleaned up on expiration until CopyBackup is finished. - # Values are of the form: - # `projects//instances//backups/`. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Required. The expiration time of the backup in microsecond granularity. - # The expiration time must be at least 6 hours and at most 366 days - # from the `create_time` of the source backup. Once the `expire_time` has - # passed, the backup is eligible to be automatically deleted by Cloud Spanner - # to free the resources used by the backup. - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig] - # Optional. The encryption configuration used to encrypt the backup. If this - # field is not specified, the backup will use the same encryption - # configuration as the source backup by default, namely - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type} - # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. - class CopyBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup}. - # @!attribute [rw] name - # @return [::String] - # The name of the backup being created through the copy operation. - # Values are of the form - # `projects//instances//backups/`. - # @!attribute [rw] source_backup - # @return [::String] - # The name of the source backup that is being copied. - # Values are of the form - # `projects//instances//backups/`. - # @!attribute [rw] progress - # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress] - # The progress of the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup} - # operation. - # @!attribute [rw] cancel_time - # @return [::Google::Protobuf::Timestamp] - # The time at which cancellation of CopyBackup operation was received. - # Operations.CancelOperation - # starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not guaranteed. - # Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - class CopyBackupMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}. - # @!attribute [rw] backup - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup] - # Required. The backup to update. `backup.name`, and the fields to be updated - # as specified by `update_mask` are required. Other fields are ignored. - # Update is only supported for the following fields: - # * `backup.expire_time`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A mask specifying which fields (e.g. `expire_time`) in the - # Backup resource should be updated. This mask is relative to the Backup - # resource, not to the request message. The field mask must always be - # specified; this prevents any future fields from being erased accidentally - # by clients that do not know about them. - class UpdateBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup GetBackup}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup. - # Values are of the form - # `projects//instances//backups/`. - class GetBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup DeleteBackup}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup to delete. - # Values are of the form - # `projects//instances//backups/`. - class DeleteBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}. - # @!attribute [rw] parent - # @return [::String] - # Required. The instance to list backups from. Values are of the - # form `projects//instances/`. - # @!attribute [rw] filter - # @return [::String] - # An expression that filters the list of returned backups. - # - # A filter expression consists of a field name, a comparison operator, and a - # value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the - # {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for - # filtering: - # - # * `name` - # * `database` - # * `state` - # * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - # * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - # * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - # * `size_bytes` - # * `backup_schedules` - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic, but - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `name:Howl` - The backup's name contains the string "howl". - # * `database:prod` - # - The database's name contains the string "prod". - # * `state:CREATING` - The backup is pending creation. - # * `state:READY` - The backup is fully created and ready for use. - # * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - # - The backup name contains the string "howl" and `create_time` - # of the backup is before 2018-03-28T14:50:00Z. - # * `expire_time < \"2018-03-28T14:50:00Z\"` - # - The backup `expire_time` is before 2018-03-28T14:50:00Z. - # * `size_bytes > 10000000000` - The backup's size is greater than 10GB - # * `backup_schedules:daily` - # - The backup is created from a schedule with "daily" in its name. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of backups to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} - # to the same `parent` and with the same `filter`. - class ListBackupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}. - # @!attribute [rw] backups - # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Backup>] - # The list of matching backups. Backups returned are ordered by `create_time` - # in descending order, starting from the most recent `create_time`. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups} - # call to fetch more of the matching backups. - class ListBackupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations ListBackupOperations}. - # @!attribute [rw] parent - # @return [::String] - # Required. The instance of the backup operations. Values are of - # the form `projects//instances/`. - # @!attribute [rw] filter - # @return [::String] - # An expression that filters the list of returned backup operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the {::Google::Longrunning::Operation operation} - # are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} - # is - # `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic, but - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - # `metadata.database:prod` - Returns operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. - # * The source database name of backup contains the string "prod". - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - # `(metadata.name:howl) AND` \ - # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Returns operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. - # * The backup name contains the string "howl". - # * The operation started before 2018-03-28T14:50:00Z. - # * The operation resulted in an error. - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \ - # `(metadata.source_backup:test) AND` \ - # `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ - # `(error:*)` - Returns operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}. - # * The source backup name contains the string "test". - # * The operation started before 2022-01-18T14:50:00Z. - # * The operation resulted in an error. - # * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ - # `(metadata.database:test_db)) OR` \ - # `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) - # AND` \ - # `(metadata.source_backup:test_bkp)) AND` \ - # `(error:*)` - Returns operations where: - # * The operation's metadata matches either of criteria: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} - # AND the source database name of the backup contains the string - # "test_db" - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata} - # AND the source backup name contains the string "test_bkp" - # * The operation resulted in an error. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} - # to the same `parent` and with the same `filter`. - class ListBackupOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations ListBackupOperations}. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # The list of matching backup [long-running - # operations][google.longrunning.Operation]. Each operation's name will be - # prefixed by the backup's name. The operation's - # {::Google::Longrunning::Operation#metadata metadata} field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that are pending or have completed/failed/canceled within the - # last 7 days. Operations returned are ordered by - # `operation.metadata.value.progress.start_time` in descending order starting - # from the most recently started operation. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations ListBackupOperations} - # call to fetch more of the matching metadata. - class ListBackupOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about a backup. - # @!attribute [rw] backup - # @return [::String] - # Name of the backup. - # @!attribute [rw] version_time - # @return [::Google::Protobuf::Timestamp] - # The backup contains an externally consistent copy of `source_database` at - # the timestamp specified by `version_time`. If the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} - # request did not specify `version_time`, the `version_time` of the backup is - # equivalent to the `create_time`. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} - # request was received. - # @!attribute [rw] source_database - # @return [::String] - # Name of the database the backup was created from. - class BackupInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Encryption configuration for the backup to create. - # @!attribute [rw] encryption_type - # @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig::EncryptionType] - # Required. The encryption type of the backup. - # @!attribute [rw] kms_key_name - # @return [::String] - # Optional. The Cloud KMS key that will be used to protect the backup. - # This field should be set only when - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type} - # is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form - # `projects//locations//keyRings//cryptoKeys/`. - # @!attribute [rw] kms_key_names - # @return [::Array<::String>] - # Optional. Specifies the KMS configuration for the one or more keys used to - # protect the backup. Values are of the form - # `projects//locations//keyRings//cryptoKeys/`. - # - # The keys referenced by kms_key_names must fully cover all - # regions of the backup's instance configuration. Some examples: - # * For single region instance configs, specify a single regional - # location KMS key. - # * For multi-regional instance configs of type GOOGLE_MANAGED, - # either specify a multi-regional location KMS key or multiple regional - # location KMS keys that cover all regions in the instance config. - # * For an instance config of type USER_MANAGED, please specify only - # regional location KMS keys to cover each region in the instance config. - # Multi-regional location KMS keys are not supported for USER_MANAGED - # instance configs. - class CreateBackupEncryptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Encryption types for the backup. - module EncryptionType - # Unspecified. Do not use. - ENCRYPTION_TYPE_UNSPECIFIED = 0 - - # Use the same encryption configuration as the database. This is the - # default option when - # {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig encryption_config} - # is empty. For example, if the database is using - # `Customer_Managed_Encryption`, the backup will be using the same Cloud - # KMS key as the database. - USE_DATABASE_ENCRYPTION = 1 - - # Use Google default encryption. - GOOGLE_DEFAULT_ENCRYPTION = 2 - - # Use customer managed encryption. If specified, `kms_key_name` - # must contain a valid Cloud KMS key. - CUSTOMER_MANAGED_ENCRYPTION = 3 - end - end - - # Encryption configuration for the copied backup. - # @!attribute [rw] encryption_type - # @return [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig::EncryptionType] - # Required. The encryption type of the backup. - # @!attribute [rw] kms_key_name - # @return [::String] - # Optional. The Cloud KMS key that will be used to protect the backup. - # This field should be set only when - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type} - # is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form - # `projects//locations//keyRings//cryptoKeys/`. - # @!attribute [rw] kms_key_names - # @return [::Array<::String>] - # Optional. Specifies the KMS configuration for the one or more keys used to - # protect the backup. Values are of the form - # `projects//locations//keyRings//cryptoKeys/`. - # Kms keys specified can be in any order. - # - # The keys referenced by kms_key_names must fully cover all - # regions of the backup's instance configuration. Some examples: - # * For single region instance configs, specify a single regional - # location KMS key. - # * For multi-regional instance configs of type GOOGLE_MANAGED, - # either specify a multi-regional location KMS key or multiple regional - # location KMS keys that cover all regions in the instance config. - # * For an instance config of type USER_MANAGED, please specify only - # regional location KMS keys to cover each region in the instance config. - # Multi-regional location KMS keys are not supported for USER_MANAGED - # instance configs. - class CopyBackupEncryptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Encryption types for the backup. - module EncryptionType - # Unspecified. Do not use. - ENCRYPTION_TYPE_UNSPECIFIED = 0 - - # This is the default option for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup} - # when - # {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig encryption_config} - # is not specified. For example, if the source backup is using - # `Customer_Managed_Encryption`, the backup will be using the same Cloud - # KMS key as the source backup. - USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1 - - # Use Google default encryption. - GOOGLE_DEFAULT_ENCRYPTION = 2 - - # Use customer managed encryption. If specified, either `kms_key_name` or - # `kms_key_names` must contain valid Cloud KMS key(s). - CUSTOMER_MANAGED_ENCRYPTION = 3 - end - end - - # The specification for full backups. - # A full backup stores the entire contents of the database at a given - # version time. - class FullBackupSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The specification for incremental backup chains. - # An incremental backup stores the delta of changes between a previous - # backup and the database contents at a given version time. An - # incremental backup chain consists of a full backup and zero or more - # successive incremental backups. The first backup created for an - # incremental backup chain is always a full backup. - class IncrementalBackupSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Instance partition information for the backup. - # @!attribute [rw] instance_partition - # @return [::String] - # A unique identifier for the instance partition. Values are of the form - # `projects//instances//instancePartitions/` - class BackupInstancePartition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb deleted file mode 100644 index 99370211c6c5..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb +++ /dev/null @@ -1,220 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - # Defines specifications of the backup schedule. - # @!attribute [rw] cron_spec - # @return [::Google::Cloud::Spanner::Admin::Database::V1::CrontabSpec] - # Cron style schedule specification. - class BackupScheduleSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupSchedule expresses the automated backup creation specification for a - # Spanner database. - # Next ID: 10 - # @!attribute [rw] name - # @return [::String] - # Identifier. Output only for the - # [CreateBackupSchedule][DatabaseAdmin.CreateBackupSchededule] operation. - # Required for the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule UpdateBackupSchedule} - # operation. A globally unique identifier for the backup schedule which - # cannot be changed. Values are of the form - # `projects//instances//databases//backupSchedules/[a-z][a-z0-9_\-]*[a-z0-9]` - # The final segment of the name must be between 2 and 60 characters in - # length. - # @!attribute [rw] spec - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupScheduleSpec] - # Optional. The schedule specification based on which the backup creations - # are triggered. - # @!attribute [rw] retention_duration - # @return [::Google::Protobuf::Duration] - # Optional. The retention duration of a backup that must be at least 6 hours - # and at most 366 days. The backup is eligible to be automatically deleted - # once the retention period has elapsed. - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig] - # Optional. The encryption configuration that will be used to encrypt the - # backup. If this field is not specified, the backup will use the same - # encryption configuration as the database. - # @!attribute [rw] full_backup_spec - # @return [::Google::Cloud::Spanner::Admin::Database::V1::FullBackupSpec] - # The schedule creates only full backups. - # - # Note: The following fields are mutually exclusive: `full_backup_spec`, `incremental_backup_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] incremental_backup_spec - # @return [::Google::Cloud::Spanner::Admin::Database::V1::IncrementalBackupSpec] - # The schedule creates incremental backup chains. - # - # Note: The following fields are mutually exclusive: `incremental_backup_spec`, `full_backup_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp at which the schedule was last updated. - # If the schedule has never been updated, this field contains the timestamp - # when the schedule was first created. - class BackupSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CrontabSpec can be used to specify the version time and frequency at - # which the backup should be created. - # @!attribute [rw] text - # @return [::String] - # Required. Textual representation of the crontab. User can customize the - # backup frequency and the backup version time using the cron - # expression. The version time must be in UTC timezone. - # - # The backup will contain an externally consistent copy of the - # database at the version time. Allowed frequencies are 12 hour, 1 day, - # 1 week and 1 month. Examples of valid cron specifications: - # * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. - # * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. - # * `0 2 * * * ` : once a day at 2 past midnight in UTC. - # * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. - # * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. - # @!attribute [r] time_zone - # @return [::String] - # Output only. The time zone of the times in `CrontabSpec.text`. Currently - # only UTC is supported. - # @!attribute [r] creation_window - # @return [::Google::Protobuf::Duration] - # Output only. Schedule backups will contain an externally consistent copy - # of the database at the version time specified in - # `schedule_spec.cron_spec`. However, Spanner may not initiate the creation - # of the scheduled backups at that version time. Spanner will initiate - # the creation of scheduled backups within the time window bounded by the - # version_time specified in `schedule_spec.cron_spec` and version_time + - # `creation_window`. - class CrontabSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup_schedule CreateBackupSchedule}. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the database that this backup schedule applies to. - # @!attribute [rw] backup_schedule_id - # @return [::String] - # Required. The Id to use for the backup schedule. The `backup_schedule_id` - # appended to `parent` forms the full backup schedule name of the form - # `projects//instances//databases//backupSchedules/`. - # @!attribute [rw] backup_schedule - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # Required. The backup schedule to create. - class CreateBackupScheduleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup_schedule GetBackupSchedule}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the schedule to retrieve. - # Values are of the form - # `projects//instances//databases//backupSchedules/`. - class GetBackupScheduleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup_schedule DeleteBackupSchedule}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the schedule to delete. - # Values are of the form - # `projects//instances//databases//backupSchedules/`. - class DeleteBackupScheduleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules ListBackupSchedules}. - # @!attribute [rw] parent - # @return [::String] - # Required. Database is the parent resource whose backup schedules should be - # listed. Values are of the form - # projects//instances//databases/ - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of backup schedules to be returned in the response. If 0 - # or less, defaults to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # Optional. If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse ListBackupSchedulesResponse} - # to the same `parent`. - class ListBackupSchedulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules ListBackupSchedules}. - # @!attribute [rw] backup_schedules - # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule>] - # The list of backup schedules for a database. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules ListBackupSchedules} - # call to fetch more of the schedules. - class ListBackupSchedulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule UpdateBackupScheduleRequest}. - # @!attribute [rw] backup_schedule - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule] - # Required. The backup schedule to update. `backup_schedule.name`, and the - # fields to be updated as specified by `update_mask` are required. Other - # fields are ignored. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A mask specifying which fields in the BackupSchedule resource - # should be updated. This mask is relative to the BackupSchedule resource, - # not to the request message. The field mask must always be - # specified; this prevents any future fields from being erased - # accidentally. - class UpdateBackupScheduleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.rb deleted file mode 100644 index 7deaa30f1933..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/common.rb +++ /dev/null @@ -1,123 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - # Encapsulates progress related information for a Cloud Spanner long - # running operation. - # @!attribute [rw] progress_percent - # @return [::Integer] - # Percent completion of the operation. - # Values are between 0 and 100 inclusive. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time the request was received. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # If set, the time at which this operation failed or was completed - # successfully. - class OperationProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Encryption configuration for a Cloud Spanner database. - # @!attribute [rw] kms_key_name - # @return [::String] - # The Cloud KMS key to be used for encrypting and decrypting - # the database. Values are of the form - # `projects//locations//keyRings//cryptoKeys/`. - # @!attribute [rw] kms_key_names - # @return [::Array<::String>] - # Specifies the KMS configuration for the one or more keys used to encrypt - # the database. Values are of the form - # `projects//locations//keyRings//cryptoKeys/`. - # - # The keys referenced by kms_key_names must fully cover all - # regions of the database instance configuration. Some examples: - # * For single region database instance configs, specify a single regional - # location KMS key. - # * For multi-regional database instance configs of type GOOGLE_MANAGED, - # either specify a multi-regional location KMS key or multiple regional - # location KMS keys that cover all regions in the instance config. - # * For a database instance config of type USER_MANAGED, please specify only - # regional location KMS keys to cover each region in the instance config. - # Multi-regional location KMS keys are not supported for USER_MANAGED - # instance configs. - class EncryptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Encryption information for a Cloud Spanner database or backup. - # @!attribute [r] encryption_type - # @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo::Type] - # Output only. The type of encryption. - # @!attribute [r] encryption_status - # @return [::Google::Rpc::Status] - # Output only. If present, the status of a recent encrypt/decrypt call on - # underlying data for this database or backup. Regardless of status, data is - # always encrypted at rest. - # @!attribute [r] kms_key_version - # @return [::String] - # Output only. A Cloud KMS key version that is being used to protect the - # database or backup. - class EncryptionInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible encryption types. - module Type - # Encryption type was not specified, though data at rest remains encrypted. - TYPE_UNSPECIFIED = 0 - - # The data is encrypted at rest with a key that is - # fully managed by Google. No key version or status will be populated. - # This is the default state. - GOOGLE_DEFAULT_ENCRYPTION = 1 - - # The data is encrypted at rest with a key that is - # managed by the customer. The active version of the key. `kms_key_version` - # will be populated, and `encryption_status` may be populated. - CUSTOMER_MANAGED_ENCRYPTION = 2 - end - end - - # Indicates the dialect type of a database. - module DatabaseDialect - # Default value. This value will create a database with the - # GOOGLE_STANDARD_SQL dialect. - DATABASE_DIALECT_UNSPECIFIED = 0 - - # GoogleSQL supported SQL. - GOOGLE_STANDARD_SQL = 1 - - # PostgreSQL supported SQL. - POSTGRESQL = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb deleted file mode 100644 index 4c996f50b61f..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +++ /dev/null @@ -1,834 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module Admin - module Database - module V1 - # Information about the database restore. - # @!attribute [rw] source_type - # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreSourceType] - # The type of the restore source. - # @!attribute [rw] backup_info - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupInfo] - # Information about the backup used to restore the database. The backup - # may no longer exist. - class RestoreInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Cloud Spanner database. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the database. Values are of the form - # `projects//instances//databases/`, - # where `` is as specified in the `CREATE DATABASE` - # statement. This name can be passed to other API methods to - # identify the database. - # @!attribute [r] state - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Database::State] - # Output only. The current database state. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. If exists, the time at which the database creation started. - # @!attribute [r] restore_info - # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreInfo] - # Output only. Applicable only for restored databases. Contains information - # about the restore source. - # @!attribute [r] encryption_config - # @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig] - # Output only. For databases that are using customer managed encryption, this - # field contains the encryption configuration for the database. - # For databases that are using Google default or other types of encryption, - # this field is empty. - # @!attribute [r] encryption_info - # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo>] - # Output only. For databases that are using customer managed encryption, this - # field contains the encryption information for the database, such as - # all Cloud KMS key versions that are in use. The `encryption_status' field - # inside of each `EncryptionInfo` is not populated. - # - # For databases that are using Google default or other types of encryption, - # this field is empty. - # - # This field is propagated lazily from the backend. There might be a delay - # from when a key version is being used and when it appears in this field. - # @!attribute [r] version_retention_period - # @return [::String] - # Output only. The period in which Cloud Spanner retains all versions of data - # for the database. This is the same as the value of version_retention_period - # database option set using - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}. - # Defaults to 1 hour, if not set. - # @!attribute [r] earliest_version_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Earliest timestamp at which older versions of the data can be - # read. This value is continuously updated by Cloud Spanner and becomes stale - # the moment it is queried. If you are using this value to recover data, make - # sure to account for the time from the moment when the value is queried to - # the moment when you initiate the recovery. - # @!attribute [r] default_leader - # @return [::String] - # Output only. The read-write region which contains the database's leader - # replicas. - # - # This is the same as the value of default_leader - # database option set using DatabaseAdmin.CreateDatabase or - # DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty. - # @!attribute [r] database_dialect - # @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect] - # Output only. The dialect of the Cloud Spanner Database. - # @!attribute [rw] enable_drop_protection - # @return [::Boolean] - # Whether drop protection is enabled for this database. Defaults to false, - # if not set. For more details, please see how to [prevent accidental - # database - # deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion). - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. If true, the database is being updated. If false, there are no - # ongoing update operations for the database. - class Database - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates the current state of the database. - module State - # Not specified. - STATE_UNSPECIFIED = 0 - - # The database is still being created. Operations on the database may fail - # with `FAILED_PRECONDITION` in this state. - CREATING = 1 - - # The database is fully created and ready for use. - READY = 2 - - # The database is fully created and ready for use, but is still - # being optimized for performance and cannot handle full load. - # - # In this state, the database still references the backup - # it was restore from, preventing the backup - # from being deleted. When optimizations are complete, the full performance - # of the database will be restored, and the database will transition to - # `READY` state. - READY_OPTIMIZING = 3 - end - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}. - # @!attribute [rw] parent - # @return [::String] - # Required. The instance whose databases should be listed. - # Values are of the form `projects//instances/`. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of databases to be returned in the response. If 0 or less, - # defaults to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}. - class ListDatabasesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}. - # @!attribute [rw] databases - # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Database>] - # Databases that matched the request. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases} - # call to fetch more of the matching databases. - class ListDatabasesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database CreateDatabase}. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the instance that will serve the new database. - # Values are of the form `projects//instances/`. - # @!attribute [rw] create_statement - # @return [::String] - # Required. A `CREATE DATABASE` statement, which specifies the ID of the - # new database. The database ID must conform to the regular expression - # `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length. - # If the database ID is a reserved word or if it contains a hyphen, the - # database ID must be enclosed in backticks (`` ` ``). - # @!attribute [rw] extra_statements - # @return [::Array<::String>] - # Optional. A list of DDL statements to run inside the newly created - # database. Statements can create tables, indexes, etc. These - # statements execute atomically with the creation of the database: - # if there is an error in any statement, the database is not created. - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig] - # Optional. The encryption configuration for the database. If this field is - # not specified, Cloud Spanner will encrypt/decrypt all data at rest using - # Google default encryption. - # @!attribute [rw] database_dialect - # @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect] - # Optional. The dialect of the Cloud Spanner Database. - # @!attribute [rw] proto_descriptors - # @return [::String] - # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in - # 'extra_statements' above. - # Contains a protobuf-serialized - # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). - # To generate it, [install](https://grpc.io/docs/protoc-installation/) and - # run `protoc` with --include_imports and --descriptor_set_out. For example, - # to generate for moon/shot/app.proto, run - # ``` - # $protoc --proto_path=/app_path --proto_path=/lib_path \ - # --include_imports \ - # --descriptor_set_out=descriptors.data \ - # moon/shot/app.proto - # ``` - # For more details, see protobuffer [self - # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). - class CreateDatabaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database CreateDatabase}. - # @!attribute [rw] database - # @return [::String] - # The database being created. - class CreateDatabaseMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database GetDatabase}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the requested database. Values are of the form - # `projects//instances//databases/`. - class GetDatabaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database UpdateDatabase}. - # @!attribute [rw] database - # @return [::Google::Cloud::Spanner::Admin::Database::V1::Database] - # Required. The database to update. - # The `name` field of the database is of the form - # `projects//instances//databases/`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. Currently, only - # `enable_drop_protection` field can be updated. - class UpdateDatabaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database UpdateDatabase}. - # @!attribute [rw] request - # @return [::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest] - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database UpdateDatabase}. - # @!attribute [rw] progress - # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress] - # The progress of the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database UpdateDatabase} - # operation. - # @!attribute [rw] cancel_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation was cancelled. If set, this operation is - # in the process of undoing itself (which is best-effort). - class UpdateDatabaseMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enqueues the given DDL statements to be applied, in order but not - # necessarily all at once, to the database schema at some point (or - # points) in the future. The server checks that the statements - # are executable (syntactically valid, name tables that exist, etc.) - # before enqueueing them, but they may still fail upon - # later execution (e.g., if a statement from another batch of - # statements is applied first and it conflicts in some way, or if - # there is some data-related problem like a `NULL` value in a column to - # which `NOT NULL` would be added). If a statement fails, all - # subsequent statements in the batch are automatically cancelled. - # - # Each batch of statements is assigned a name which can be used with - # the Operations API to monitor - # progress. See the - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#operation_id operation_id} - # field for more details. - # @!attribute [rw] database - # @return [::String] - # Required. The database to update. - # @!attribute [rw] statements - # @return [::Array<::String>] - # Required. DDL statements to be applied to the database. - # @!attribute [rw] operation_id - # @return [::String] - # If empty, the new update request is assigned an - # automatically-generated operation ID. Otherwise, `operation_id` - # is used to construct the name of the resulting - # {::Google::Longrunning::Operation Operation}. - # - # Specifying an explicit operation ID simplifies determining - # whether the statements were executed in the event that the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} - # call is replayed, or the return value is otherwise lost: the - # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} - # and `operation_id` fields can be combined to form the - # {::Google::Longrunning::Operation#name name} of the resulting - # {::Google::Longrunning::Operation longrunning.Operation}: - # `/operations/`. - # - # `operation_id` should be unique within the database, and must be - # a valid identifier: `[a-z][a-z0-9_]*`. Note that - # automatically-generated operation IDs always begin with an - # underscore. If the named operation already exists, - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} - # returns `ALREADY_EXISTS`. - # @!attribute [rw] proto_descriptors - # @return [::String] - # Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. - # Contains a protobuf-serialized - # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). - # To generate it, [install](https://grpc.io/docs/protoc-installation/) and - # run `protoc` with --include_imports and --descriptor_set_out. For example, - # to generate for moon/shot/app.proto, run - # ``` - # $protoc --proto_path=/app_path --proto_path=/lib_path \ - # --include_imports \ - # --descriptor_set_out=descriptors.data \ - # moon/shot/app.proto - # ``` - # For more details, see protobuffer [self - # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). - # @!attribute [rw] throughput_mode - # @return [::Boolean] - # Optional. This field is exposed to be used by the Spanner Migration Tool. - # For more details, see - # [SMT](https://github.com/GoogleCloudPlatform/spanner-migration-tool). - class UpdateDatabaseDdlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Action information extracted from a DDL statement. This proto is used to - # display the brief info of the DDL statement for the operation - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}. - # @!attribute [rw] action - # @return [::String] - # The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. - # This field is a non-empty string. - # @!attribute [rw] entity_type - # @return [::String] - # The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. - # This field can be empty string for some DDL statement, - # e.g. for statement "ANALYZE", `entity_type` = "". - # @!attribute [rw] entity_names - # @return [::Array<::String>] - # The entity name(s) being operated on the DDL statement. - # E.g. - # 1. For statement "CREATE TABLE t1(...)", `entity_names` = ["t1"]. - # 2. For statement "GRANT ROLE r1, r2 ...", `entity_names` = ["r1", "r2"]. - # 3. For statement "ANALYZE", `entity_names` = []. - class DdlStatementActionInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}. - # @!attribute [rw] database - # @return [::String] - # The database being modified. - # @!attribute [rw] statements - # @return [::Array<::String>] - # For an update this list contains all the statements. For an - # individual statement, this list contains only that statement. - # @!attribute [rw] commit_timestamps - # @return [::Array<::Google::Protobuf::Timestamp>] - # Reports the commit timestamps of all statements that have - # succeeded so far, where `commit_timestamps[i]` is the commit - # timestamp for the statement `statements[i]`. - # @!attribute [r] throttled - # @return [::Boolean] - # Output only. When true, indicates that the operation is throttled e.g. - # due to resource constraints. When resources become available the operation - # will resume and this field will be false again. - # @!attribute [rw] progress - # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress>] - # The progress of the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} - # operations. All DDL statements will have continuously updating progress, - # and `progress[i]` is the operation progress for `statements[i]`. Also, - # `progress[i]` will have start time and end time populated with commit - # timestamp of operation, as well as a progress of 100% once the operation - # has completed. - # @!attribute [rw] actions - # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::DdlStatementActionInfo>] - # The brief action info for the DDL statements. - # `actions[i]` is the brief info for `statements[i]`. - class UpdateDatabaseDdlMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database DropDatabase}. - # @!attribute [rw] database - # @return [::String] - # Required. The database to be dropped. - class DropDatabaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}. - # @!attribute [rw] database - # @return [::String] - # Required. The database whose schema we wish to get. - # Values are of the form - # `projects//instances//databases/` - class GetDatabaseDdlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}. - # @!attribute [rw] statements - # @return [::Array<::String>] - # A list of formatted DDL statements defining the schema of the database - # specified in the request. - # @!attribute [rw] proto_descriptors - # @return [::String] - # Proto descriptors stored in the database. - # Contains a protobuf-serialized - # [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). - # For more details, see protobuffer [self - # description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). - class GetDatabaseDdlResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations ListDatabaseOperations}. - # @!attribute [rw] parent - # @return [::String] - # Required. The instance of the database operations. - # Values are of the form `projects//instances/`. - # @!attribute [rw] filter - # @return [::String] - # An expression that filters the list of returned operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the {::Google::Longrunning::Operation Operation} - # are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} - # is - # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first, if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic. However, - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \ - # `(metadata.source_type:BACKUP) AND` \ - # `(metadata.backup_info.backup:backup_howl) AND` \ - # `(metadata.name:restored_howl) AND` \ - # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Return operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. - # * The database is restored from a backup. - # * The backup name contains "backup_howl". - # * The restored database's name contains "restored_howl". - # * The operation started before 2018-03-28T14:50:00Z. - # * The operation resulted in an error. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} - # to the same `parent` and with the same `filter`. - class ListDatabaseOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations ListDatabaseOperations}. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # The list of matching database [long-running - # operations][google.longrunning.Operation]. Each operation's name will be - # prefixed by the database's name. The operation's - # {::Google::Longrunning::Operation#metadata metadata} field type - # `metadata.type_url` describes the type of the metadata. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations ListDatabaseOperations} - # call to fetch more of the matching metadata. - class ListDatabaseOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database RestoreDatabase}. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the instance in which to create the - # restored database. This instance must be in the same project and - # have the same instance configuration as the instance containing - # the source backup. Values are of the form - # `projects//instances/`. - # @!attribute [rw] database_id - # @return [::String] - # Required. The id of the database to create and restore to. This - # database must not already exist. The `database_id` appended to - # `parent` forms the full database name of the form - # `projects//instances//databases/`. - # @!attribute [rw] backup - # @return [::String] - # Name of the backup from which to restore. Values are of the form - # `projects//instances//backups/`. - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig] - # Optional. An encryption configuration describing the encryption type and - # key resources in Cloud KMS used to encrypt/decrypt the database to restore - # to. If this field is not specified, the restored database will use the same - # encryption configuration as the backup by default, namely - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} - # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`. - class RestoreDatabaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Encryption configuration for the restored database. - # @!attribute [rw] encryption_type - # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig::EncryptionType] - # Required. The encryption type of the restored database. - # @!attribute [rw] kms_key_name - # @return [::String] - # Optional. The Cloud KMS key that will be used to encrypt/decrypt the - # restored database. This field should be set only when - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} - # is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form - # `projects//locations//keyRings//cryptoKeys/`. - # @!attribute [rw] kms_key_names - # @return [::Array<::String>] - # Optional. Specifies the KMS configuration for the one or more keys used to - # encrypt the database. Values are of the form - # `projects//locations//keyRings//cryptoKeys/`. - # - # The keys referenced by kms_key_names must fully cover all - # regions of the database instance configuration. Some examples: - # * For single region database instance configs, specify a single regional - # location KMS key. - # * For multi-regional database instance configs of type GOOGLE_MANAGED, - # either specify a multi-regional location KMS key or multiple regional - # location KMS keys that cover all regions in the instance config. - # * For a database instance config of type USER_MANAGED, please specify only - # regional location KMS keys to cover each region in the instance config. - # Multi-regional location KMS keys are not supported for USER_MANAGED - # instance configs. - class RestoreDatabaseEncryptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Encryption types for the database to be restored. - module EncryptionType - # Unspecified. Do not use. - ENCRYPTION_TYPE_UNSPECIFIED = 0 - - # This is the default option when - # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig encryption_config} - # is not specified. - USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1 - - # Use Google default encryption. - GOOGLE_DEFAULT_ENCRYPTION = 2 - - # Use customer managed encryption. If specified, `kms_key_name` must - # must contain a valid Cloud KMS key. - CUSTOMER_MANAGED_ENCRYPTION = 3 - end - end - - # Metadata type for the long-running operation returned by - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database RestoreDatabase}. - # @!attribute [rw] name - # @return [::String] - # Name of the database being created and restored to. - # @!attribute [rw] source_type - # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreSourceType] - # The type of the restore source. - # @!attribute [rw] backup_info - # @return [::Google::Cloud::Spanner::Admin::Database::V1::BackupInfo] - # Information about the backup used to restore the database. - # @!attribute [rw] progress - # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress] - # The progress of the - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database RestoreDatabase} - # operation. - # @!attribute [rw] cancel_time - # @return [::Google::Protobuf::Timestamp] - # The time at which cancellation of this operation was received. - # Operations.CancelOperation - # starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not guaranteed. - # Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [rw] optimize_database_operation_name - # @return [::String] - # If exists, the name of the long-running operation that will be used to - # track the post-restore optimization process to optimize the performance of - # the restored database, and remove the dependency on the restore source. - # The name is of the form - # `projects//instances//databases//operations/` - # where the is the name of database being created and restored to. - # The metadata type of the long-running operation is - # {::Google::Cloud::Spanner::Admin::Database::V1::OptimizeRestoredDatabaseMetadata OptimizeRestoredDatabaseMetadata}. - # This long-running operation will be automatically created by the system - # after the RestoreDatabase long-running operation completes successfully. - # This operation will not be created if the restore was not successful. - class RestoreDatabaseMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata type for the long-running operation used to track the progress - # of optimizations performed on a newly restored database. This long-running - # operation is automatically created by the system after the successful - # completion of a database restore, and cannot be cancelled. - # @!attribute [rw] name - # @return [::String] - # Name of the restored database being optimized. - # @!attribute [rw] progress - # @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress] - # The progress of the post-restore optimizations. - class OptimizeRestoredDatabaseMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Cloud Spanner database role. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the database role. Values are of the form - # `projects//instances//databases//databaseRoles/` - # where `` is as specified in the `CREATE ROLE` DDL statement. - class DatabaseRole - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles ListDatabaseRoles}. - # @!attribute [rw] parent - # @return [::String] - # Required. The database whose roles should be listed. - # Values are of the form - # `projects//instances//databases/`. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of database roles to be returned in the response. If 0 or less, - # defaults to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse ListDatabaseRolesResponse}. - class ListDatabaseRolesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles ListDatabaseRoles}. - # @!attribute [rw] database_roles - # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole>] - # Database roles that matched the request. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles ListDatabaseRoles} - # call to fetch more of the matching roles. - class ListDatabaseRolesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#add_split_points AddSplitPoints}. - # @!attribute [rw] database - # @return [::String] - # Required. The database on whose tables/indexes split points are to be - # added. Values are of the form - # `projects//instances//databases/`. - # @!attribute [rw] split_points - # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::SplitPoints>] - # Required. The split points to add. - # @!attribute [rw] initiator - # @return [::String] - # Optional. A user-supplied tag associated with the split points. - # For example, "intital_data_load", "special_event_1". - # Defaults to "CloudAddSplitPointsAPI" if not specified. - # The length of the tag must not exceed 50 characters,else will be trimmed. - # Only valid UTF8 characters are allowed. - class AddSplitPointsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#add_split_points AddSplitPoints}. - class AddSplitPointsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The split points of a table/index. - # @!attribute [rw] table - # @return [::String] - # The table to split. - # @!attribute [rw] index - # @return [::String] - # The index to split. - # If specified, the `table` field must refer to the index's base table. - # @!attribute [rw] keys - # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::SplitPoints::Key>] - # Required. The list of split keys, i.e., the split boundaries. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The expiration timestamp of the split points. - # A timestamp in the past means immediate expiration. - # The maximum value can be 30 days in the future. - # Defaults to 10 days in the future if not specified. - class SplitPoints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A split key. - # @!attribute [rw] key_parts - # @return [::Google::Protobuf::ListValue] - # Required. The column values making up the split key. - class Key - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Internal request proto, do not use directly. - # @!attribute [rw] database - # @return [::String] - # Internal field, do not use directly. - # @!attribute [rw] operation_id - # @return [::String] - # Internal field, do not use directly. - # @!attribute [rw] vm_identity_token - # @return [::String] - # Internal field, do not use directly. - # @!attribute [rw] progress - # @return [::Float] - # Internal field, do not use directly. - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # Internal field, do not use directly. - class InternalUpdateGraphOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Internal response proto, do not use directly. - class InternalUpdateGraphOperationResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicates the type of the restore source. - module RestoreSourceType - # No restore associated. - TYPE_UNSPECIFIED = 0 - - # A backup was used as the source of the restore. - BACKUP = 1 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/Gemfile deleted file mode 100644 index 9f880b7cd501..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-spanner-admin-database-v1", path: "../" -else - gem "google-cloud-spanner-admin-database-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/add_split_points.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/add_split_points.rb deleted file mode 100644 index b40f9ed68996..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/add_split_points.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_AddSplitPoints_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the add_split_points call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#add_split_points. -# -def add_split_points - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new - - # Call the add_split_points method. - result = client.add_split_points request - - # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_AddSplitPoints_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/copy_backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/copy_backup.rb deleted file mode 100644 index 4f5d4e196698..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/copy_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_CopyBackup_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the copy_backup call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup. -# -def copy_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new - - # Call the copy_backup method. - result = client.copy_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_DatabaseAdmin_CopyBackup_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup.rb deleted file mode 100644 index 7bdb66daafbb..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_CreateBackup_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the create_backup call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup. -# -def create_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new - - # Call the create_backup method. - result = client.create_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_DatabaseAdmin_CreateBackup_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.rb deleted file mode 100644 index 0e52ad4acecc..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_backup_schedule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_CreateBackupSchedule_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the create_backup_schedule call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup_schedule. -# -def create_backup_schedule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new - - # Call the create_backup_schedule method. - result = client.create_backup_schedule request - - # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_CreateBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_database.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_database.rb deleted file mode 100644 index 7071ecb8f557..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/create_database.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_CreateDatabase_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the create_database call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database. -# -def create_database - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new - - # Call the create_database method. - result = client.create_database request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_DatabaseAdmin_CreateDatabase_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup.rb deleted file mode 100644 index 4193a0014644..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_DeleteBackup_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the delete_backup call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup. -# -def delete_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new - - # Call the delete_backup method. - result = client.delete_backup request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.rb deleted file mode 100644 index 60427f4241f3..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/delete_backup_schedule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_DeleteBackupSchedule_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the delete_backup_schedule call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup_schedule. -# -def delete_backup_schedule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new - - # Call the delete_backup_schedule method. - result = client.delete_backup_schedule request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_DeleteBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/drop_database.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/drop_database.rb deleted file mode 100644 index 7d960d68517c..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/drop_database.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_DropDatabase_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the drop_database call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database. -# -def drop_database - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new - - # Call the drop_database method. - result = client.drop_database request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_DropDatabase_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup.rb deleted file mode 100644 index 45401693ebdb..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_GetBackup_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the get_backup call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup. -# -def get_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new - - # Call the get_backup method. - result = client.get_backup request - - # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.rb deleted file mode 100644 index 29edea9a86fa..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_backup_schedule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_GetBackupSchedule_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the get_backup_schedule call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup_schedule. -# -def get_backup_schedule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new - - # Call the get_backup_schedule method. - result = client.get_backup_schedule request - - # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_GetBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database.rb deleted file mode 100644 index cee9d27e148b..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_GetDatabase_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the get_database call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database. -# -def get_database - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new - - # Call the get_database method. - result = client.get_database request - - # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Database. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_GetDatabase_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.rb deleted file mode 100644 index 0bcdf7f40932..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_database_ddl.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_GetDatabaseDdl_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the get_database_ddl call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl. -# -def get_database_ddl - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new - - # Call the get_database_ddl method. - result = client.get_database_ddl request - - # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_GetDatabaseDdl_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.rb deleted file mode 100644 index ec196400f896..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_GetIamPolicy_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the get_iam_policy call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb deleted file mode 100644 index d28d071db2e0..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/internal_update_graph_operation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_InternalUpdateGraphOperation_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the internal_update_graph_operation call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#internal_update_graph_operation. -# -def internal_update_graph_operation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new - - # Call the internal_update_graph_operation method. - result = client.internal_update_graph_operation request - - # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_InternalUpdateGraphOperation_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.rb deleted file mode 100644 index aa01ffea3aca..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_operations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_ListBackupOperations_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the list_backup_operations call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations. -# -def list_backup_operations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new - - # Call the list_backup_operations method. - result = client.list_backup_operations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Longrunning::Operation. - p item - end -end -# [END spanner_v1_generated_DatabaseAdmin_ListBackupOperations_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.rb deleted file mode 100644 index bbb680f5318f..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backup_schedules.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_ListBackupSchedules_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the list_backup_schedules call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules. -# -def list_backup_schedules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new - - # Call the list_backup_schedules method. - result = client.list_backup_schedules request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - p item - end -end -# [END spanner_v1_generated_DatabaseAdmin_ListBackupSchedules_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backups.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backups.rb deleted file mode 100644 index db27cb097f7c..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_backups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_ListBackups_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the list_backups call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups. -# -def list_backups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new - - # Call the list_backups method. - result = client.list_backups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Backup. - p item - end -end -# [END spanner_v1_generated_DatabaseAdmin_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_operations.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_operations.rb deleted file mode 100644 index 2bc09405f027..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_operations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_ListDatabaseOperations_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the list_database_operations call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations. -# -def list_database_operations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new - - # Call the list_database_operations method. - result = client.list_database_operations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Longrunning::Operation. - p item - end -end -# [END spanner_v1_generated_DatabaseAdmin_ListDatabaseOperations_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_roles.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_roles.rb deleted file mode 100644 index 0c3f79067aae..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_database_roles.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_ListDatabaseRoles_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the list_database_roles call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles. -# -def list_database_roles - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new - - # Call the list_database_roles method. - result = client.list_database_roles request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseRole. - p item - end -end -# [END spanner_v1_generated_DatabaseAdmin_ListDatabaseRoles_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_databases.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_databases.rb deleted file mode 100644 index 6fc0fc085df9..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/list_databases.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_ListDatabases_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the list_databases call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases. -# -def list_databases - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new - - # Call the list_databases method. - result = client.list_databases request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Spanner::Admin::Database::V1::Database. - p item - end -end -# [END spanner_v1_generated_DatabaseAdmin_ListDatabases_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/restore_database.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/restore_database.rb deleted file mode 100644 index 29fba6511896..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/restore_database.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_RestoreDatabase_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the restore_database call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database. -# -def restore_database - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new - - # Call the restore_database method. - result = client.restore_database request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_DatabaseAdmin_RestoreDatabase_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.rb deleted file mode 100644 index c009dea6b085..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_SetIamPolicy_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the set_iam_policy call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.rb deleted file mode 100644 index 0758fe97ccf3..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_TestIamPermissions_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the test_iam_permissions call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup.rb deleted file mode 100644 index 0d378479ff72..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_UpdateBackup_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the update_backup call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup. -# -def update_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new - - # Call the update_backup method. - result = client.update_backup request - - # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::Backup. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.rb deleted file mode 100644 index 25c121a40b2e..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_backup_schedule.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_UpdateBackupSchedule_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the update_backup_schedule call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule. -# -def update_backup_schedule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new - - # Call the update_backup_schedule method. - result = client.update_backup_schedule request - - # The returned object is of type Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule. - p result -end -# [END spanner_v1_generated_DatabaseAdmin_UpdateBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database.rb deleted file mode 100644 index 7e8b003939c4..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_UpdateDatabase_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the update_database call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database. -# -def update_database - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new - - # Call the update_database method. - result = client.update_database request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_DatabaseAdmin_UpdateDatabase_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.rb deleted file mode 100644 index 16bc289eab58..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/database_admin/update_database_ddl.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_DatabaseAdmin_UpdateDatabaseDdl_sync] -require "google/cloud/spanner/admin/database/v1" - -## -# Snippet for the update_database_ddl call in the DatabaseAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl. -# -def update_database_ddl - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new - - # Call the update_database_ddl method. - result = client.update_database_ddl request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_DatabaseAdmin_UpdateDatabaseDdl_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json b/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json deleted file mode 100644 index 804d69497d76..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/snippets/snippet_metadata_google.spanner.admin.database.v1.json +++ /dev/null @@ -1,1095 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-spanner-admin-database-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.spanner.admin.database.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_ListDatabases_sync", - "title": "Snippet for the list_databases call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases.", - "file": "database_admin/list_databases.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_databases", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "ListDatabases", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_CreateDatabase_sync", - "title": "Snippet for the create_database call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database.", - "file": "database_admin/create_database.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_database", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "CreateDatabase", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_GetDatabase_sync", - "title": "Snippet for the get_database call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database.", - "file": "database_admin/get_database.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_database", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::Database", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "GetDatabase", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_UpdateDatabase_sync", - "title": "Snippet for the update_database call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database.", - "file": "database_admin/update_database.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_database", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "UpdateDatabase", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabase", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_UpdateDatabaseDdl_sync", - "title": "Snippet for the update_database_ddl call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl.", - "file": "database_admin/update_database_ddl.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_database_ddl", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "UpdateDatabaseDdl", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_DropDatabase_sync", - "title": "Snippet for the drop_database call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database.", - "file": "database_admin/drop_database.rb", - "language": "RUBY", - "client_method": { - "short_name": "drop_database", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "DropDatabase", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_GetDatabaseDdl_sync", - "title": "Snippet for the get_database_ddl call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl.", - "file": "database_admin/get_database_ddl.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_database_ddl", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "GetDatabaseDdl", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#set_iam_policy.", - "file": "database_admin/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.SetIamPolicy", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_iam_policy.", - "file": "database_admin/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.GetIamPolicy", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#test_iam_permissions.", - "file": "database_admin/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.TestIamPermissions", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_CreateBackup_sync", - "title": "Snippet for the create_backup call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup.", - "file": "database_admin/create_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "CreateBackup", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_CopyBackup_sync", - "title": "Snippet for the copy_backup call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup.", - "file": "database_admin/copy_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "copy_backup", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "CopyBackup", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_GetBackup_sync", - "title": "Snippet for the get_backup call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup.", - "file": "database_admin/get_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::Backup", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "GetBackup", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.GetBackup", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_UpdateBackup_sync", - "title": "Snippet for the update_backup call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup.", - "file": "database_admin/update_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::Backup", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "UpdateBackup", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_DeleteBackup_sync", - "title": "Snippet for the delete_backup call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup.", - "file": "database_admin/delete_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "DeleteBackup", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_ListBackups_sync", - "title": "Snippet for the list_backups call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups.", - "file": "database_admin/list_backups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backups", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "ListBackups", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListBackups", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_RestoreDatabase_sync", - "title": "Snippet for the restore_database call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database.", - "file": "database_admin/restore_database.rb", - "language": "RUBY", - "client_method": { - "short_name": "restore_database", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "RestoreDatabase", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_ListDatabaseOperations_sync", - "title": "Snippet for the list_database_operations call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations.", - "file": "database_admin/list_database_operations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_database_operations", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_operations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "ListDatabaseOperations", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_ListBackupOperations_sync", - "title": "Snippet for the list_backup_operations call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations.", - "file": "database_admin/list_backup_operations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_operations", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "ListBackupOperations", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_ListDatabaseRoles_sync", - "title": "Snippet for the list_database_roles call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles.", - "file": "database_admin/list_database_roles.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_database_roles", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_database_roles", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "ListDatabaseRoles", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_AddSplitPoints_sync", - "title": "Snippet for the add_split_points call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#add_split_points.", - "file": "database_admin/add_split_points.rb", - "language": "RUBY", - "client_method": { - "short_name": "add_split_points", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#add_split_points", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "AddSplitPoints", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_CreateBackupSchedule_sync", - "title": "Snippet for the create_backup_schedule call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup_schedule.", - "file": "database_admin/create_backup_schedule.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_schedule", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup_schedule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "CreateBackupSchedule", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.CreateBackupSchedule", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_GetBackupSchedule_sync", - "title": "Snippet for the get_backup_schedule call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup_schedule.", - "file": "database_admin/get_backup_schedule.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_schedule", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup_schedule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "GetBackupSchedule", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.GetBackupSchedule", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_UpdateBackupSchedule_sync", - "title": "Snippet for the update_backup_schedule call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule.", - "file": "database_admin/update_backup_schedule.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_schedule", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup_schedule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "UpdateBackupSchedule", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackupSchedule", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_DeleteBackupSchedule_sync", - "title": "Snippet for the delete_backup_schedule call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup_schedule.", - "file": "database_admin/delete_backup_schedule.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_schedule", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup_schedule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "DeleteBackupSchedule", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackupSchedule", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_ListBackupSchedules_sync", - "title": "Snippet for the list_backup_schedules call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules.", - "file": "database_admin/list_backup_schedules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_schedules", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_schedules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "ListBackupSchedules", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.ListBackupSchedules", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_DatabaseAdmin_InternalUpdateGraphOperation_sync", - "title": "Snippet for the internal_update_graph_operation call in the DatabaseAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#internal_update_graph_operation.", - "file": "database_admin/internal_update_graph_operation.rb", - "language": "RUBY", - "client_method": { - "short_name": "internal_update_graph_operation", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#internal_update_graph_operation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse", - "client": { - "short_name": "DatabaseAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client" - }, - "method": { - "short_name": "InternalUpdateGraphOperation", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin.InternalUpdateGraphOperation", - "service": { - "short_name": "DatabaseAdmin", - "full_name": "google.spanner.admin.database.v1.DatabaseAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_test.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_test.rb deleted file mode 100644 index 4761219864bf..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/spanner/admin/database/v1/spanner_database_admin_pb" -require "google/spanner/admin/database/v1/spanner_database_admin_services_pb" -require "google/cloud/spanner/admin/database/v1/database_admin" - -class ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_test.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_test.rb deleted file mode 100644 index 5c96b14460f0..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_paths_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 "gapic/grpc/service_stub" - -require "google/cloud/spanner/admin/database/v1/database_admin" - -class ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_backup_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_path project: "value0", instance: "value1", backup: "value2" - assert_equal "projects/value0/instances/value1/backups/value2", path - end - end - - def test_backup_schedule_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_schedule_path project: "value0", instance: "value1", database: "value2", schedule: "value3" - assert_equal "projects/value0/instances/value1/databases/value2/backupSchedules/value3", path - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path - end - end - - def test_crypto_key_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_version_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path - end - end - - def test_database_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.database_path project: "value0", instance: "value1", database: "value2" - assert_equal "projects/value0/instances/value1/databases/value2", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", instance: "value1" - assert_equal "projects/value0/instances/value1", path - end - end - - def test_instance_partition_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_partition_path project: "value0", instance: "value1", instance_partition: "value2" - assert_equal "projects/value0/instances/value1/instancePartitions/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb deleted file mode 100644 index 143ae5b632e5..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_rest_test.rb +++ /dev/null @@ -1,1548 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/spanner/admin/database/v1/spanner_database_admin_pb" -require "google/cloud/spanner/admin/database/v1/database_admin/rest" - - -class ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_databases - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_databases_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_databases_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_databases_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_databases({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_databases parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_databases ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_databases({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_databases(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_databases_client_stub.call_count - end - end - end - - def test_create_database - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - create_statement = "hello world" - extra_statements = ["hello world"] - encryption_config = {} - database_dialect = :DATABASE_DIALECT_UNSPECIFIED - proto_descriptors = "hello world" - - create_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_create_database_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_database_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_database({ parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_database parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_database ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new(parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_database({ parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_database(::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new(parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_database_client_stub.call_count - end - end - end - - def test_get_database - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::Database.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_get_database_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_database_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_database({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_database name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_database ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_database({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_database(::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_database_client_stub.call_count - end - end - end - - def test_update_database - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - database = {} - update_mask = {} - - update_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_update_database_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_database_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_database({ database: database, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_database database: database, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_database ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_database({ database: database, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_database(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_database_client_stub.call_count - end - end - end - - def test_update_database_ddl - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - database = "hello world" - statements = ["hello world"] - operation_id = "hello world" - proto_descriptors = "hello world" - throughput_mode = true - - update_database_ddl_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_update_database_ddl_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_database_ddl_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_database_ddl database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_database_ddl_client_stub.call_count - end - end - end - - def test_drop_database - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - database = "hello world" - - drop_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_drop_database_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, drop_database_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.drop_database({ database: database }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.drop_database database: database do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.drop_database ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new(database: database) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.drop_database({ database: database }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.drop_database(::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new(database: database), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, drop_database_client_stub.call_count - end - end - end - - def test_get_database_ddl - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - database = "hello world" - - get_database_ddl_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_get_database_ddl_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_database_ddl_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_database_ddl({ database: database }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_database_ddl database: database do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new(database: database) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_database_ddl({ database: database }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new(database: database), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_database_ddl_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_create_backup - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_id = "hello world" - backup = {} - encryption_config = {} - - create_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_create_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_backup({ parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_backup parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_backup ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new(parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_backup({ parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_backup(::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new(parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_client_stub.call_count - end - end - end - - def test_copy_backup - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_id = "hello world" - source_backup = "hello world" - expire_time = {} - encryption_config = {} - - copy_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_copy_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, copy_backup_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.copy_backup({ parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.copy_backup parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.copy_backup ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new(parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.copy_backup({ parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.copy_backup(::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new(parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, copy_backup_client_stub.call_count - end - end - end - - def test_get_backup - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_backup({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_backup name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_backup ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_backup({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_backup(::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_count - end - end - end - - def test_update_backup - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - backup = {} - update_mask = {} - - update_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_backup({ backup: backup, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_backup backup: backup, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_backup ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_backup({ backup: backup, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_backup(::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_client_stub.call_count - end - end - end - - def test_delete_backup - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_backup({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_backup name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_backup ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_backup({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_backup(::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_client_stub.call_count - end - end - end - - def test_list_backups - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_backups({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_backups parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_backups ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_backups({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_backups(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backups_client_stub.call_count - end - end - end - - def test_restore_database - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - database_id = "hello world" - backup = "hello world" - encryption_config = {} - - restore_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_restore_database_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restore_database_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.restore_database ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.restore_database(::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restore_database_client_stub.call_count - end - end - end - - def test_list_database_operations - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_database_operations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_database_operations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_database_operations_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_database_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_database_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_database_operations ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_database_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_database_operations(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_database_operations_client_stub.call_count - end - end - end - - def test_list_backup_operations - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_backup_operations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_backup_operations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_operations_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_backup_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_backup_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_backup_operations ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_backup_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_backup_operations(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_operations_client_stub.call_count - end - end - end - - def test_list_database_roles - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_database_roles_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_database_roles_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_database_roles_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_database_roles({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_database_roles parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_database_roles ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_database_roles({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_database_roles(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_database_roles_client_stub.call_count - end - end - end - - def test_add_split_points - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - database = "hello world" - split_points = [{}] - initiator = "hello world" - - add_split_points_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_add_split_points_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, add_split_points_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.add_split_points({ database: database, split_points: split_points, initiator: initiator }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.add_split_points database: database, split_points: split_points, initiator: initiator do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.add_split_points ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new(database: database, split_points: split_points, initiator: initiator) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.add_split_points({ database: database, split_points: split_points, initiator: initiator }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.add_split_points(::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new(database: database, split_points: split_points, initiator: initiator), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, add_split_points_client_stub.call_count - end - end - end - - def test_create_backup_schedule - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_schedule_id = "hello world" - backup_schedule = {} - - create_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_create_backup_schedule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_schedule_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_backup_schedule({ parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_backup_schedule parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_backup_schedule({ parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_schedule_client_stub.call_count - end - end - end - - def test_get_backup_schedule - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_get_backup_schedule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_schedule_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_backup_schedule({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_backup_schedule name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_backup_schedule({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_schedule_client_stub.call_count - end - end - end - - def test_update_backup_schedule - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - backup_schedule = {} - update_mask = {} - - update_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_update_backup_schedule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_schedule_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_backup_schedule backup_schedule: backup_schedule, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_schedule_client_stub.call_count - end - end - end - - def test_delete_backup_schedule - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_delete_backup_schedule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_schedule_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_backup_schedule({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_backup_schedule name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_backup_schedule({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_schedule_client_stub.call_count - end - end - end - - def test_list_backup_schedules - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_backup_schedules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::ServiceStub.stub :transcode_list_backup_schedules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_schedules_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_backup_schedules({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_backup_schedules parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_backup_schedules ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_backup_schedules({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_backup_schedules(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_schedules_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb deleted file mode 100644 index c684ea03954b..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/google/cloud/spanner/admin/database/v1/database_admin_test.rb +++ /dev/null @@ -1,1843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/spanner/admin/database/v1/spanner_database_admin_pb" -require "google/cloud/spanner/admin/database/v1/database_admin" - -class ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_databases - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_databases_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_databases, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_databases_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_databases({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_databases parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_databases ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_databases({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_databases(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_databases_client_stub.call_rpc_count - end - end - - def test_create_database - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - create_statement = "hello world" - extra_statements = ["hello world"] - encryption_config = {} - database_dialect = :DATABASE_DIALECT_UNSPECIFIED - proto_descriptors = "hello world" - - create_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_database, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["create_statement"] - assert_equal ["hello world"], request["extra_statements"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig), request["encryption_config"] - assert_equal :DATABASE_DIALECT_UNSPECIFIED, request["database_dialect"] - assert_equal "hello world", request["proto_descriptors"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_database_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_database({ parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_database parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_database ::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new(parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_database({ parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_database(::Google::Cloud::Spanner::Admin::Database::V1::CreateDatabaseRequest.new(parent: parent, create_statement: create_statement, extra_statements: extra_statements, encryption_config: encryption_config, database_dialect: database_dialect, proto_descriptors: proto_descriptors), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_database_client_stub.call_rpc_count - end - end - - def test_get_database - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::Database.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_database, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_database_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_database({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_database name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_database ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_database({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_database(::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_database_client_stub.call_rpc_count - end - end - - def test_update_database - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = {} - update_mask = {} - - update_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_database, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::Database), request["database"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_database_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_database({ database: database, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_database database: database, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_database ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_database({ database: database, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_database(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_database_client_stub.call_rpc_count - end - end - - def test_update_database_ddl - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = "hello world" - statements = ["hello world"] - operation_id = "hello world" - proto_descriptors = "hello world" - throughput_mode = true - - update_database_ddl_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_database_ddl, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest, request - assert_equal "hello world", request["database"] - assert_equal ["hello world"], request["statements"] - assert_equal "hello world", request["operation_id"] - assert_equal "hello world", request["proto_descriptors"] - assert_equal true, request["throughput_mode"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_database_ddl_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_database_ddl database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_database_ddl({ database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest.new(database: database, statements: statements, operation_id: operation_id, proto_descriptors: proto_descriptors, throughput_mode: throughput_mode), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_database_ddl_client_stub.call_rpc_count - end - end - - def test_drop_database - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = "hello world" - - drop_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :drop_database, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest, request - assert_equal "hello world", request["database"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, drop_database_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.drop_database({ database: database }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.drop_database database: database do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.drop_database ::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new(database: database) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.drop_database({ database: database }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.drop_database(::Google::Cloud::Spanner::Admin::Database::V1::DropDatabaseRequest.new(database: database), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, drop_database_client_stub.call_rpc_count - end - end - - def test_get_database_ddl - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = "hello world" - - get_database_ddl_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_database_ddl, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest, request - assert_equal "hello world", request["database"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_database_ddl_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_database_ddl({ database: database }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_database_ddl database: database do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_database_ddl ::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new(database: database) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_database_ddl({ database: database }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_database_ddl(::Google::Cloud::Spanner::Admin::Database::V1::GetDatabaseDdlRequest.new(database: database), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_database_ddl_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_create_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_id = "hello world" - backup = {} - encryption_config = {} - - create_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::Backup), request["backup"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig), request["encryption_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_backup({ parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_backup parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_backup ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new(parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_backup({ parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_backup(::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupRequest.new(parent: parent, backup_id: backup_id, backup: backup, encryption_config: encryption_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_backup_client_stub.call_rpc_count - end - end - - def test_copy_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_id = "hello world" - source_backup = "hello world" - expire_time = {} - encryption_config = {} - - copy_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :copy_backup, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_id"] - assert_equal "hello world", request["source_backup"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["expire_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig), request["encryption_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, copy_backup_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.copy_backup({ parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.copy_backup parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.copy_backup ::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new(parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.copy_backup({ parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.copy_backup(::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupRequest.new(parent: parent, backup_id: backup_id, source_backup: source_backup, expire_time: expire_time, encryption_config: encryption_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, copy_backup_client_stub.call_rpc_count - end - end - - def test_get_backup - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_backup({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_backup name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_backup ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_backup({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_backup(::Google::Cloud::Spanner::Admin::Database::V1::GetBackupRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_rpc_count - end - end - - def test_update_backup - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::Backup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup = {} - update_mask = {} - - update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::Backup), request["backup"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_backup({ backup: backup, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_backup backup: backup, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_backup ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_backup({ backup: backup, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_backup(::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_backup_client_stub.call_rpc_count - end - end - - def test_delete_backup - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_backup({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_backup name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_backup ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_backup({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_backup(::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_backup_client_stub.call_rpc_count - end - end - - def test_list_backups - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backups, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backups_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_backups({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_backups parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_backups ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_backups({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_backups(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backups_client_stub.call_rpc_count - end - end - - def test_restore_database - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - database_id = "hello world" - backup = "hello world" - encryption_config = {} - - restore_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restore_database, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["database_id"] - assert_equal "hello world", request["backup"] - assert_equal :backup, request.source - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig), request["encryption_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, restore_database_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.restore_database ::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.restore_database(::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, restore_database_client_stub.call_rpc_count - end - end - - def test_list_database_operations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_database_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_database_operations, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_database_operations_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_database_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_database_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_database_operations ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_database_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_database_operations(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_database_operations_client_stub.call_rpc_count - end - end - - def test_list_backup_operations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_backup_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_operations, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_operations_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_backup_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_backup_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_backup_operations ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_backup_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_backup_operations(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backup_operations_client_stub.call_rpc_count - end - end - - def test_list_database_roles - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_database_roles_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_database_roles, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_database_roles_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_database_roles({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_database_roles parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_database_roles ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_database_roles({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_database_roles(::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseRolesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_database_roles_client_stub.call_rpc_count - end - end - - def test_add_split_points - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = "hello world" - split_points = [{}] - initiator = "hello world" - - add_split_points_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :add_split_points, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest, request - assert_equal "hello world", request["database"] - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::SplitPoints, request["split_points"].first - assert_equal "hello world", request["initiator"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, add_split_points_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.add_split_points({ database: database, split_points: split_points, initiator: initiator }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.add_split_points database: database, split_points: split_points, initiator: initiator do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.add_split_points ::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new(database: database, split_points: split_points, initiator: initiator) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.add_split_points({ database: database, split_points: split_points, initiator: initiator }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.add_split_points(::Google::Cloud::Spanner::Admin::Database::V1::AddSplitPointsRequest.new(database: database, split_points: split_points, initiator: initiator), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, add_split_points_client_stub.call_rpc_count - end - end - - def test_create_backup_schedule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_schedule_id = "hello world" - backup_schedule = {} - - create_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_schedule, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backup_schedule_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule), request["backup_schedule"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_schedule_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_backup_schedule({ parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_backup_schedule parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_backup_schedule({ parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule_id: backup_schedule_id, backup_schedule: backup_schedule), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_backup_schedule_client_stub.call_rpc_count - end - end - - def test_get_backup_schedule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_schedule, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_schedule_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_backup_schedule({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_backup_schedule name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_backup_schedule({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::GetBackupScheduleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_schedule_client_stub.call_rpc_count - end - end - - def test_update_backup_schedule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup_schedule = {} - update_mask = {} - - update_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_schedule, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Database::V1::BackupSchedule), request["backup_schedule"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_schedule_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_backup_schedule backup_schedule: backup_schedule, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_backup_schedule_client_stub.call_rpc_count - end - end - - def test_delete_backup_schedule - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_schedule, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_schedule_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_backup_schedule({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_backup_schedule name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_backup_schedule ::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_backup_schedule({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_backup_schedule(::Google::Cloud::Spanner::Admin::Database::V1::DeleteBackupScheduleRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_backup_schedule_client_stub.call_rpc_count - end - end - - def test_list_backup_schedules - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_backup_schedules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_schedules, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_schedules_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_backup_schedules({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_backup_schedules parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_backup_schedules ::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_backup_schedules({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_backup_schedules(::Google::Cloud::Spanner::Admin::Database::V1::ListBackupSchedulesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backup_schedules_client_stub.call_rpc_count - end - end - - def test_internal_update_graph_operation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = "hello world" - operation_id = "hello world" - vm_identity_token = "hello world" - progress = 3.5 - status = {} - - internal_update_graph_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :internal_update_graph_operation, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest, request - assert_equal "hello world", request["database"] - assert_equal "hello world", request["operation_id"] - assert_equal "hello world", request["vm_identity_token"] - assert_equal 3.5, request["progress"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Rpc::Status), request["status"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, internal_update_graph_operation_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.internal_update_graph_operation({ database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.internal_update_graph_operation database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.internal_update_graph_operation ::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new(database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.internal_update_graph_operation({ database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.internal_update_graph_operation(::Google::Cloud::Spanner::Admin::Database::V1::InternalUpdateGraphOperationRequest.new(database: database, operation_id: operation_id, vm_identity_token: vm_identity_token, progress: progress, status: status), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, internal_update_graph_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/helper.rb b/owl-bot-staging/google-cloud-spanner-admin-database-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-database-v1/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-spanner-admin-instance-v1/.gitignore b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.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-spanner-admin-instance-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.repo-metadata.json deleted file mode 100644 index f5020bbedc04..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "spanner.googleapis.com", - "api_shortname": "spanner", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-instance-v1/latest", - "distribution_name": "google-cloud-spanner-admin-instance-v1", - "is_cloud": true, - "language": "ruby", - "name": "spanner", - "name_pretty": "Cloud Spanner Instance Admin V1 API", - "product_documentation": "https://cloud.google.com/spanner", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-admin-instance-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details.", - "ruby-cloud-env-prefix": "SPANNER", - "ruby-cloud-product-url": "https://cloud.google.com/spanner", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.rubocop.yml b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.rubocop.yml deleted file mode 100644 index d1a683d9ac76..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-spanner-admin-instance-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-spanner-admin-instance-v1.rb" diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.toys.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.yardopts b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.yardopts deleted file mode 100644 index 5a169a006a69..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Spanner Instance Admin V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/AUTHENTICATION.md deleted file mode 100644 index cfb0ca7fb54f..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-spanner-admin-instance-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-spanner-admin-instance-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/spanner/admin/instance/v1" - -client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/spanner/admin/instance/v1" - -::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-spanner-admin-instance-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/spanner/admin/instance/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/Gemfile b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-spanner-admin-instance-v1/LICENSE.md b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/README.md b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/README.md deleted file mode 100644 index b5822cdbe42b..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Spanner Instance Admin V1 API - -Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Spanner Instance Admin V1 API. Most users should consider using -the main client gem, -[google-cloud-spanner](https://rubygems.org/gems/google-cloud-spanner). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-spanner-admin-instance-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/spanner.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/spanner/admin/instance/v1" - -client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new -request = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new # (request fields as keyword arguments...) -response = client.list_instance_configs request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-admin-instance-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/spanner) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/spanner/admin/instance/v1" -require "logger" - -client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-spanner`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-spanner-admin-instance-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-spanner`. -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-spanner-admin-instance-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-spanner-admin-instance-v1/Rakefile b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/Rakefile deleted file mode 100644 index ec4f0e71b11c..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-spanner-admin-instance-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SPANNER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SPANNER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SPANNER_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 SPANNER_TEST_PROJECT=test123 SPANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/spanner/admin/instance/v1/instance_admin/credentials" - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SPANNER_PROJECT"] = project - ENV["SPANNER_TEST_PROJECT"] = project - ENV["SPANNER_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-spanner-admin-instance-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-spanner-admin-instance-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-spanner-admin-instance-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-spanner-admin-instance-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-spanner-admin-instance-v1" - header "google-cloud-spanner-admin-instance-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-spanner-admin-instance-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-spanner-admin-instance-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-spanner-admin-instance-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-spanner-admin-instance-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/gapic_metadata.json deleted file mode 100644 index 2e44d0f21e72..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/gapic_metadata.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.spanner.admin.instance.v1", - "libraryPackage": "::Google::Cloud::Spanner::Admin::Instance::V1", - "services": { - "InstanceAdmin": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client", - "rpcs": { - "ListInstanceConfigs": { - "methods": [ - "list_instance_configs" - ] - }, - "GetInstanceConfig": { - "methods": [ - "get_instance_config" - ] - }, - "CreateInstanceConfig": { - "methods": [ - "create_instance_config" - ] - }, - "UpdateInstanceConfig": { - "methods": [ - "update_instance_config" - ] - }, - "DeleteInstanceConfig": { - "methods": [ - "delete_instance_config" - ] - }, - "ListInstanceConfigOperations": { - "methods": [ - "list_instance_config_operations" - ] - }, - "ListInstances": { - "methods": [ - "list_instances" - ] - }, - "ListInstancePartitions": { - "methods": [ - "list_instance_partitions" - ] - }, - "GetInstance": { - "methods": [ - "get_instance" - ] - }, - "CreateInstance": { - "methods": [ - "create_instance" - ] - }, - "UpdateInstance": { - "methods": [ - "update_instance" - ] - }, - "DeleteInstance": { - "methods": [ - "delete_instance" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "GetInstancePartition": { - "methods": [ - "get_instance_partition" - ] - }, - "CreateInstancePartition": { - "methods": [ - "create_instance_partition" - ] - }, - "DeleteInstancePartition": { - "methods": [ - "delete_instance_partition" - ] - }, - "UpdateInstancePartition": { - "methods": [ - "update_instance_partition" - ] - }, - "ListInstancePartitionOperations": { - "methods": [ - "list_instance_partition_operations" - ] - }, - "MoveInstance": { - "methods": [ - "move_instance" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec deleted file mode 100644 index 7023112563df..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/google-cloud-spanner-admin-instance-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/spanner/admin/instance/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-spanner-admin-instance-v1" - gem.version = Google::Cloud::Spanner::Admin::Instance::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-admin-instance-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details." - gem.summary = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.rb deleted file mode 100644 index 31e76b3589b3..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google-cloud-spanner-admin-instance-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/spanner/admin/instance/v1" diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.rb deleted file mode 100644 index 36a77f21a4d3..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/spanner/admin/instance/v1/instance_admin" -require "google/cloud/spanner/admin/instance/v1/version" - -module Google - module Cloud - module Spanner - module Admin - module Instance - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/spanner/admin/instance/v1" - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/spanner/admin/instance/v1" - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - module V1 - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/spanner/admin/instance/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb deleted file mode 100644 index 80c300501ca9..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/spanner/admin/instance/v1/version" - -require "google/cloud/spanner/admin/instance/v1/instance_admin/credentials" -require "google/cloud/spanner/admin/instance/v1/instance_admin/paths" -require "google/cloud/spanner/admin/instance/v1/instance_admin/operations" -require "google/cloud/spanner/admin/instance/v1/instance_admin/client" -require "google/cloud/spanner/admin/instance/v1/instance_admin/rest" - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - ## - # Cloud Spanner Instance Admin API - # - # The Cloud Spanner Instance Admin API can be used to create, delete, - # modify and list instances. Instances are dedicated Cloud Spanner serving - # and storage resources to be used by Cloud Spanner databases. - # - # Each instance has a "configuration", which dictates where the - # serving resources for the Cloud Spanner instance are located (e.g., - # US-central, Europe). Configurations are created by Google based on - # resource availability. - # - # Cloud Spanner billing is based on the instances that exist and their - # sizes. After an instance exists, there are no additional - # per-database or per-operation charges for use of the instance - # (though there may be additional network bandwidth charges). - # Instances offer isolation: problems with databases in one instance - # will not affect other instances. However, within an instance - # databases can affect each other. For example, if one database in an - # instance receives a lot of requests and consumes most of the - # instance resources, fewer resources are available for other - # databases in that instance, and their performance may suffer. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/spanner/admin/instance/v1/instance_admin" - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/spanner/admin/instance/v1/instance_admin/rest" - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - module InstanceAdmin - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "instance_admin", "helpers.rb" -require "google/cloud/spanner/admin/instance/v1/instance_admin/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb deleted file mode 100644 index 0d6216cdec1f..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb +++ /dev/null @@ -1,3142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - module InstanceAdmin - ## - # Client for the InstanceAdmin service. - # - # Cloud Spanner Instance Admin API - # - # The Cloud Spanner Instance Admin API can be used to create, delete, - # modify and list instances. Instances are dedicated Cloud Spanner serving - # and storage resources to be used by Cloud Spanner databases. - # - # Each instance has a "configuration", which dictates where the - # serving resources for the Cloud Spanner instance are located (e.g., - # US-central, Europe). Configurations are created by Google based on - # resource availability. - # - # Cloud Spanner billing is based on the instances that exist and their - # sizes. After an instance exists, there are no additional - # per-database or per-operation charges for use of the instance - # (though there may be additional network bandwidth charges). - # Instances offer isolation: problems with databases in one instance - # will not affect other instances. However, within an instance - # databases can affect each other. For example, if one database in an - # instance receives a lot of requests and consumes most of the - # instance resources, fewer resources are available for other - # databases in that instance, and their performance may suffer. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :instance_admin_stub - - ## - # Configure the InstanceAdmin Client class. - # - # See {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all InstanceAdmin clients - # ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Spanner", "Admin", "Instance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_instance_configs.timeout = 3600.0 - default_config.rpcs.list_instance_configs.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_instance_config.timeout = 3600.0 - default_config.rpcs.get_instance_config.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_instances.timeout = 3600.0 - default_config.rpcs.list_instances.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_instance.timeout = 3600.0 - default_config.rpcs.get_instance.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_instance.timeout = 3600.0 - - default_config.rpcs.update_instance.timeout = 3600.0 - - default_config.rpcs.delete_instance.timeout = 3600.0 - default_config.rpcs.delete_instance.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.set_iam_policy.timeout = 30.0 - - default_config.rpcs.get_iam_policy.timeout = 30.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.test_iam_permissions.timeout = 30.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the InstanceAdmin Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @instance_admin_stub.universe_domain - end - - ## - # Create a new InstanceAdmin client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the InstanceAdmin client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/spanner/admin/instance/v1/spanner_instance_admin_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @instance_admin_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @instance_admin_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @instance_admin_stub.logger - end - - # Service calls - - ## - # Lists the supported instance configurations for a given project. - # - # Returns both Google-managed configurations and user-managed - # configurations. - # - # @overload list_instance_configs(request, options = nil) - # Pass arguments to `list_instance_configs` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_instance_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_instance_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project for which a list of supported instance - # configurations is requested. Values are of the form - # `projects/`. - # @param page_size [::Integer] - # Number of instance configurations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse ListInstanceConfigsResponse}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new - # - # # Call the list_instance_configs method. - # result = client.list_instance_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. - # p item - # end - # - def list_instance_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_instance_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_instance_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_instance_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :list_instance_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information about a particular instance configuration. - # - # @overload get_instance_config(request, options = nil) - # Pass arguments to `get_instance_config` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_instance_config(name: nil) - # Pass arguments to `get_instance_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the requested instance configuration. Values are of - # the form `projects//instanceConfigs/`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new - # - # # Call the get_instance_config method. - # result = client.get_instance_config request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. - # p result - # - def get_instance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_instance_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_instance_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_instance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :get_instance_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an instance configuration and begins preparing it to be used. The - # returned long-running operation - # can be used to track the progress of preparing the new - # instance configuration. The instance configuration name is assigned by the - # caller. If the named instance configuration already exists, - # `CreateInstanceConfig` returns `ALREADY_EXISTS`. - # - # Immediately after the request returns: - # - # * The instance configuration is readable via the API, with all requested - # attributes. The instance configuration's - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} - # field is set to true. Its state is `CREATING`. - # - # While the operation is pending: - # - # * Cancelling the operation renders the instance configuration immediately - # unreadable via the API. - # * Except for deleting the creating resource, all other attempts to modify - # the instance configuration are rejected. - # - # Upon completion of the returned operation: - # - # * Instances can be created using the instance configuration. - # * The instance configuration's - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} - # field becomes false. Its state becomes `READY`. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to track - # creation of the instance configuration. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if - # successful. - # - # Authorization requires `spanner.instanceConfigs.create` permission on - # the resource - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest#parent parent}. - # - # @overload create_instance_config(request, options = nil) - # Pass arguments to `create_instance_config` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_instance_config(parent: nil, instance_config_id: nil, instance_config: nil, validate_only: nil) - # Pass arguments to `create_instance_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project in which to create the instance - # configuration. Values are of the form `projects/`. - # @param instance_config_id [::String] - # Required. The ID of the instance configuration to create. Valid identifiers - # are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 - # characters in length. The `custom-` prefix is required to avoid name - # conflicts with Google-managed configurations. - # @param instance_config [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig, ::Hash] - # Required. The `InstanceConfig` proto of the configuration to create. - # `instance_config.name` must be - # `/instanceConfigs/`. - # `instance_config.base_config` must be a Google-managed configuration name, - # e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3. - # @param validate_only [::Boolean] - # An option to validate, but not actually execute, a request, - # and provide the same response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new - # - # # Call the create_instance_config method. - # result = client.create_instance_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_instance_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_instance_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_instance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :create_instance_config, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an instance configuration. The returned - # long-running operation can be used to track - # the progress of updating the instance. If the named instance configuration - # does not exist, returns `NOT_FOUND`. - # - # Only user-managed configurations can be updated. - # - # Immediately after the request returns: - # - # * The instance configuration's - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} - # field is set to true. - # - # While the operation is pending: - # - # * Cancelling the operation sets its metadata's - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigMetadata#cancel_time cancel_time}. - # The operation is guaranteed to succeed at undoing all changes, after - # which point it terminates with a `CANCELLED` status. - # * All other attempts to modify the instance configuration are rejected. - # * Reading the instance configuration via the API continues to give the - # pre-request values. - # - # Upon completion of the returned operation: - # - # * Creating instances using the instance configuration uses the new - # values. - # * The new values of the instance configuration are readable via the API. - # * The instance configuration's - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} - # field becomes false. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to track - # the instance configuration modification. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigMetadata UpdateInstanceConfigMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if - # successful. - # - # Authorization requires `spanner.instanceConfigs.update` permission on - # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#name name}. - # - # @overload update_instance_config(request, options = nil) - # Pass arguments to `update_instance_config` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_instance_config(instance_config: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_instance_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance_config [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig, ::Hash] - # Required. The user instance configuration to update, which must always - # include the instance configuration name. Otherwise, only fields mentioned - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest#update_mask update_mask} - # need be included. To prevent conflicts of concurrent updates, - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling etag} can - # be used. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask specifying which fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} should be - # updated. The field mask must always be specified; this prevents any future - # fields in {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} - # from being erased accidentally by clients that do not know about them. Only - # display_name and labels can be updated. - # @param validate_only [::Boolean] - # An option to validate, but not actually execute, a request, - # and provide the same response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new - # - # # Call the update_instance_config method. - # result = client.update_instance_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_instance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_instance_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.instance_config&.name - header_params["instance_config.name"] = request.instance_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_instance_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_instance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :update_instance_config, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the instance configuration. Deletion is only allowed when no - # instances are using the configuration. If any instances are using - # the configuration, returns `FAILED_PRECONDITION`. - # - # Only user-managed configurations can be deleted. - # - # Authorization requires `spanner.instanceConfigs.delete` permission on - # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#name name}. - # - # @overload delete_instance_config(request, options = nil) - # Pass arguments to `delete_instance_config` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_instance_config(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_instance_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the instance configuration to be deleted. - # Values are of the form - # `projects//instanceConfigs/` - # @param etag [::String] - # Used for optimistic concurrency control as a way to help prevent - # simultaneous deletes of an instance configuration from overwriting each - # other. If not empty, the API - # only deletes the instance configuration when the etag provided matches the - # current status of the requested instance configuration. Otherwise, deletes - # the instance configuration without checking the current status of the - # requested instance configuration. - # @param validate_only [::Boolean] - # An option to validate, but not actually execute, a request, - # and provide the same response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new - # - # # Call the delete_instance_config method. - # result = client.delete_instance_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_instance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_instance_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_instance_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_instance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :delete_instance_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the user-managed instance configuration long-running - # operations in the given project. An instance - # configuration operation has a name of the form - # `projects//instanceConfigs//operations/`. - # The long-running operation - # metadata field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. Operations returned are ordered by - # `operation.metadata.value.start_time` in descending order starting - # from the most recently started operation. - # - # @overload list_instance_config_operations(request, options = nil) - # Pass arguments to `list_instance_config_operations` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_instance_config_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_instance_config_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project of the instance configuration operations. - # Values are of the form `projects/`. - # @param filter [::String] - # An expression that filters the list of returned operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the Operation are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata} - # is - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first, if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic. However, - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=` \ - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - # AND` \ - # `(metadata.instance_config.name:custom-config) AND` \ - # `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Return operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}. - # * The instance configuration name contains "custom-config". - # * The operation started before 2021-03-28T14:50:00Z. - # * The operation resulted in an error. - # @param page_size [::Integer] - # Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse ListInstanceConfigOperationsResponse} - # to the same `parent` and with the same `filter`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new - # - # # Call the list_instance_config_operations method. - # result = client.list_instance_config_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_instance_config_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_instance_config_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_instance_config_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_instance_config_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :list_instance_config_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_config_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all instances in the given project. - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, instance_deadline: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project for which a list of instances is - # requested. Values are of the form `projects/`. - # @param page_size [::Integer] - # Number of instances to be returned in the response. If 0 or less, defaults - # to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `display_name` - # * `labels.key` where key is the name of a label - # - # Some examples of using filters are: - # - # * `name:*` --> The instance has a name. - # * `name:Howl` --> The instance's name contains the string "howl". - # * `name:HOWL` --> Equivalent to above. - # * `NAME:howl` --> Equivalent to above. - # * `labels.env:*` --> The instance has the label "env". - # * `labels.env:dev` --> The instance has the label "env" and the value of - # the label contains the string "dev". - # * `name:howl labels.env:dev` --> The instance's name contains "howl" and - # it has the label "env" with its value - # containing "dev". - # @param instance_deadline [::Google::Protobuf::Timestamp, ::Hash] - # Deadline used while retrieving metadata for instances. - # Instances whose metadata cannot be retrieved within this deadline will be - # added to - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#unreachable unreachable} - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::Instance>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::Instance>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_instances.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :list_instances, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instances, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all instance partitions for the given instance. - # - # @overload list_instance_partitions(request, options = nil) - # Pass arguments to `list_instance_partitions` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_instance_partitions(parent: nil, page_size: nil, page_token: nil, instance_partition_deadline: nil) - # Pass arguments to `list_instance_partitions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance whose instance partitions should be listed. Values - # are of the form `projects//instances/`. Use `{instance} - # = '-'` to list instance partitions for all Instances in a project, e.g., - # `projects/myproject/instances/-`. - # @param page_size [::Integer] - # Number of instance partitions to be returned in the response. If 0 or less, - # defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. - # @param instance_partition_deadline [::Google::Protobuf::Timestamp, ::Hash] - # Optional. Deadline used while retrieving metadata for instance partitions. - # Instance partitions whose metadata cannot be retrieved within this deadline - # will be added to - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#unreachable unreachable} - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new - # - # # Call the list_instance_partitions method. - # result = client.list_instance_partitions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. - # p item - # end - # - def list_instance_partitions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_instance_partitions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_instance_partitions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_instance_partitions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :list_instance_partitions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_partitions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information about a particular instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_instance(name: nil, field_mask: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the requested instance. Values are of the form - # `projects//instances/`. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # If field_mask is present, specifies the subset of - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields that should be - # returned. If absent, all - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields are returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :get_instance, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an instance and begins preparing it to begin serving. The - # returned long-running operation - # can be used to track the progress of preparing the new - # instance. The instance name is assigned by the caller. If the - # named instance already exists, `CreateInstance` returns - # `ALREADY_EXISTS`. - # - # Immediately upon completion of this request: - # - # * The instance is readable via the API, with all requested attributes - # but no allocated resources. Its state is `CREATING`. - # - # Until completion of the returned operation: - # - # * Cancelling the operation renders the instance immediately unreadable - # via the API. - # * The instance can be deleted. - # * All other attempts to modify the instance are rejected. - # - # Upon completion of the returned operation: - # - # * Billing for all successfully-allocated resources begins (some types - # may have lower than the requested levels). - # * Databases can be created in the instance. - # * The instance's allocated resource levels are readable via the API. - # * The instance's state becomes `READY`. - # - # The returned long-running operation will - # have a name of the format `/operations/` and - # can be used to track creation of the instance. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceMetadata CreateInstanceMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful. - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_instance(parent: nil, instance_id: nil, instance: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project in which to create the instance. Values - # are of the form `projects/`. - # @param instance_id [::String] - # Required. The ID of the instance to create. Valid identifiers are of the - # form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in - # length. - # @param instance [::Google::Cloud::Spanner::Admin::Instance::V1::Instance, ::Hash] - # Required. The instance to create. The name may be omitted, but if - # specified must be `/instances/`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :create_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an instance, and begins allocating or releasing resources - # as requested. The returned long-running operation can be used to track the - # progress of updating the instance. If the named instance does not - # exist, returns `NOT_FOUND`. - # - # Immediately upon completion of this request: - # - # * For resource types for which a decrease in the instance's allocation - # has been requested, billing is based on the newly-requested level. - # - # Until completion of the returned operation: - # - # * Cancelling the operation sets its metadata's - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceMetadata#cancel_time cancel_time}, - # and begins restoring resources to their pre-request values. The - # operation is guaranteed to succeed at undoing all resource changes, - # after which point it terminates with a `CANCELLED` status. - # * All other attempts to modify the instance are rejected. - # * Reading the instance via the API continues to give the pre-request - # resource levels. - # - # Upon completion of the returned operation: - # - # * Billing begins for all successfully-allocated resources (some types - # may have lower than the requested levels). - # * All newly-reserved resources are available for serving the instance's - # tables. - # * The instance's new resource levels are readable via the API. - # - # The returned long-running operation will - # have a name of the format `/operations/` and - # can be used to track the instance modification. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceMetadata UpdateInstanceMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful. - # - # Authorization requires `spanner.instances.update` permission on - # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::Instance#name name}. - # - # @overload update_instance(request, options = nil) - # Pass arguments to `update_instance` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_instance(instance: nil, field_mask: nil) - # Pass arguments to `update_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance [::Google::Cloud::Spanner::Admin::Instance::V1::Instance, ::Hash] - # Required. The instance to update, which must always include the instance - # name. Otherwise, only fields mentioned in - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest#field_mask field_mask} - # need be included. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask specifying which fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} should be updated. - # The field mask must always be specified; this prevents any future fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} from being erased - # accidentally by clients that do not know about them. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new - # - # # Call the update_instance method. - # result = client.update_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.instance&.name - header_params["instance.name"] = request.instance.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :update_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an instance. - # - # Immediately upon completion of the request: - # - # * Billing ceases for all of the instance's reserved resources. - # - # Soon afterward: - # - # * The instance and *all of its databases* immediately and - # irrevocably disappear from the API. All data in the databases - # is permanently deleted. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_instance(name: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the instance to be deleted. Values are of the form - # `projects//instances/` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :delete_instance, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on an instance resource. Replaces any - # existing policy. - # - # Authorization requires `spanner.instances.setIamPolicy` on - # [resource][google.iam.v1.SetIamPolicyRequest.resource]. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for an instance resource. Returns an empty - # policy if an instance exists but does not have a policy set. - # - # Authorization requires `spanner.instances.getIamPolicy` on - # [resource][google.iam.v1.GetIamPolicyRequest.resource]. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that the caller has on the specified instance resource. - # - # Attempting this RPC on a non-existent Cloud Spanner instance resource will - # result in a NOT_FOUND error if the user has `spanner.instances.list` - # permission on the containing Google Cloud Project. Otherwise returns an - # empty set of permissions. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information about a particular instance partition. - # - # @overload get_instance_partition(request, options = nil) - # Pass arguments to `get_instance_partition` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_instance_partition(name: nil) - # Pass arguments to `get_instance_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the requested instance partition. Values are of - # the form - # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new - # - # # Call the get_instance_partition method. - # result = client.get_instance_partition request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. - # p result - # - def get_instance_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_instance_partition.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_instance_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_instance_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :get_instance_partition, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an instance partition and begins preparing it to be used. The - # returned long-running operation - # can be used to track the progress of preparing the new instance partition. - # The instance partition name is assigned by the caller. If the named - # instance partition already exists, `CreateInstancePartition` returns - # `ALREADY_EXISTS`. - # - # Immediately upon completion of this request: - # - # * The instance partition is readable via the API, with all requested - # attributes but no allocated resources. Its state is `CREATING`. - # - # Until completion of the returned operation: - # - # * Cancelling the operation renders the instance partition immediately - # unreadable via the API. - # * The instance partition can be deleted. - # * All other attempts to modify the instance partition are rejected. - # - # Upon completion of the returned operation: - # - # * Billing for all successfully-allocated resources begins (some types - # may have lower than the requested levels). - # * Databases can start using this instance partition. - # * The instance partition's allocated resource levels are readable via the - # API. - # * The instance partition's state becomes `READY`. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to - # track creation of the instance partition. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if - # successful. - # - # @overload create_instance_partition(request, options = nil) - # Pass arguments to `create_instance_partition` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_instance_partition(parent: nil, instance_partition_id: nil, instance_partition: nil) - # Pass arguments to `create_instance_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the instance in which to create the instance - # partition. Values are of the form - # `projects//instances/`. - # @param instance_partition_id [::String] - # Required. The ID of the instance partition to create. Valid identifiers are - # of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 - # characters in length. - # @param instance_partition [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition, ::Hash] - # Required. The instance partition to create. The instance_partition.name may - # be omitted, but if specified must be - # `/instancePartitions/`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new - # - # # Call the create_instance_partition method. - # result = client.create_instance_partition request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_instance_partition.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_instance_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_instance_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :create_instance_partition, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing instance partition. Requires that the - # instance partition is not used by any database or backup and is not the - # default instance partition of an instance. - # - # Authorization requires `spanner.instancePartitions.delete` permission on - # the resource - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition#name name}. - # - # @overload delete_instance_partition(request, options = nil) - # Pass arguments to `delete_instance_partition` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_instance_partition(name: nil, etag: nil) - # Pass arguments to `delete_instance_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the instance partition to be deleted. - # Values are of the form - # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` - # @param etag [::String] - # Optional. If not empty, the API only deletes the instance partition when - # the etag provided matches the current status of the requested instance - # partition. Otherwise, deletes the instance partition without checking the - # current status of the requested instance partition. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new - # - # # Call the delete_instance_partition method. - # result = client.delete_instance_partition request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_instance_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_instance_partition.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_instance_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_instance_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :delete_instance_partition, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an instance partition, and begins allocating or releasing resources - # as requested. The returned long-running operation can be used to track the - # progress of updating the instance partition. If the named instance - # partition does not exist, returns `NOT_FOUND`. - # - # Immediately upon completion of this request: - # - # * For resource types for which a decrease in the instance partition's - # allocation has been requested, billing is based on the newly-requested - # level. - # - # Until completion of the returned operation: - # - # * Cancelling the operation sets its metadata's - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionMetadata#cancel_time cancel_time}, - # and begins restoring resources to their pre-request values. The - # operation is guaranteed to succeed at undoing all resource changes, - # after which point it terminates with a `CANCELLED` status. - # * All other attempts to modify the instance partition are rejected. - # * Reading the instance partition via the API continues to give the - # pre-request resource levels. - # - # Upon completion of the returned operation: - # - # * Billing begins for all successfully-allocated resources (some types - # may have lower than the requested levels). - # * All newly-reserved resources are available for serving the instance - # partition's tables. - # * The instance partition's new resource levels are readable via the API. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to - # track the instance partition modification. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionMetadata UpdateInstancePartitionMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if - # successful. - # - # Authorization requires `spanner.instancePartitions.update` permission on - # the resource - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition#name name}. - # - # @overload update_instance_partition(request, options = nil) - # Pass arguments to `update_instance_partition` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_instance_partition(instance_partition: nil, field_mask: nil) - # Pass arguments to `update_instance_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance_partition [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition, ::Hash] - # Required. The instance partition to update, which must always include the - # instance partition name. Otherwise, only fields mentioned in - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest#field_mask field_mask} - # need be included. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask specifying which fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} - # should be updated. The field mask must always be specified; this prevents - # any future fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} - # from being erased accidentally by clients that do not know about them. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new - # - # # Call the update_instance_partition method. - # result = client.update_instance_partition request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_instance_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_instance_partition.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.instance_partition&.name - header_params["instance_partition.name"] = request.instance_partition.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_instance_partition.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_instance_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :update_instance_partition, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists instance partition long-running operations in the given instance. - # An instance partition operation has a name of the form - # `projects//instances//instancePartitions//operations/`. - # The long-running operation - # metadata field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. Operations returned are ordered by - # `operation.metadata.value.start_time` in descending order starting from the - # most recently started operation. - # - # Authorization requires `spanner.instancePartitionOperations.list` - # permission on the resource - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest#parent parent}. - # - # @overload list_instance_partition_operations(request, options = nil) - # Pass arguments to `list_instance_partition_operations` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_instance_partition_operations(parent: nil, filter: nil, page_size: nil, page_token: nil, instance_partition_deadline: nil) - # Pass arguments to `list_instance_partition_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent instance of the instance partition operations. - # Values are of the form `projects//instances/`. - # @param filter [::String] - # Optional. An expression that filters the list of returned operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the Operation are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata} - # is - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first, if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic. However, - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=` \ - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - # AND` \ - # `(metadata.instance_partition.name:custom-instance-partition) AND` \ - # `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Return operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}. - # * The instance partition name contains "custom-instance-partition". - # * The operation started before 2021-03-28T14:50:00Z. - # * The operation resulted in an error. - # @param page_size [::Integer] - # Optional. Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # Optional. If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse} - # to the same `parent` and with the same `filter`. - # @param instance_partition_deadline [::Google::Protobuf::Timestamp, ::Hash] - # Optional. Deadline used while retrieving metadata for instance partition - # operations. Instance partitions whose operation metadata cannot be - # retrieved within this deadline will be added to - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#unreachable_instance_partitions unreachable_instance_partitions} - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new - # - # # Call the list_instance_partition_operations method. - # result = client.list_instance_partition_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_instance_partition_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_instance_partition_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_instance_partition_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_instance_partition_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :list_instance_partition_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @instance_admin_stub, :list_instance_partition_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Moves an instance to the target instance configuration. You can use the - # returned long-running operation to track - # the progress of moving the instance. - # - # `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of - # the following criteria: - # - # * Is undergoing a move to a different instance configuration - # * Has backups - # * Has an ongoing update - # * Contains any CMEK-enabled databases - # * Is a free trial instance - # - # While the operation is pending: - # - # * All other attempts to modify the instance, including changes to its - # compute capacity, are rejected. - # * The following database and backup admin operations are rejected: - # - # * `DatabaseAdmin.CreateDatabase` - # * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is - # specified in the request.) - # * `DatabaseAdmin.RestoreDatabase` - # * `DatabaseAdmin.CreateBackup` - # * `DatabaseAdmin.CopyBackup` - # - # * Both the source and target instance configurations are subject to - # hourly compute and storage charges. - # * The instance might experience higher read-write latencies and a higher - # transaction abort rate. However, moving an instance doesn't cause any - # downtime. - # - # The returned long-running operation has - # a name of the format - # `/operations/` and can be used to track - # the move instance operation. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceMetadata MoveInstanceMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, - # if successful. - # Cancelling the operation sets its metadata's - # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceMetadata#cancel_time cancel_time}. - # Cancellation is not immediate because it involves moving any data - # previously moved to the target instance configuration back to the original - # instance configuration. You can use this operation to track the progress of - # the cancellation. Upon successful completion of the cancellation, the - # operation terminates with `CANCELLED` status. - # - # If not cancelled, upon completion of the returned operation: - # - # * The instance successfully moves to the target instance - # configuration. - # * You are billed for compute and storage in target instance - # configuration. - # - # Authorization requires the `spanner.instances.update` permission on - # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::Instance instance}. - # - # For more details, see - # [Move an instance](https://cloud.google.com/spanner/docs/move-instance). - # - # @overload move_instance(request, options = nil) - # Pass arguments to `move_instance` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload move_instance(name: nil, target_config: nil) - # Pass arguments to `move_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The instance to move. - # Values are of the form `projects//instances/`. - # @param target_config [::String] - # Required. The target instance configuration where to move the instance. - # Values are of the form `projects//instanceConfigs/`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new - # - # # Call the move_instance method. - # result = client.move_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def move_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.move_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.move_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.move_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.call_rpc :move_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the InstanceAdmin API. - # - # This class represents the configuration for InstanceAdmin, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_instance_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instance_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instance_configs.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "spanner.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the InstanceAdmin API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_instance_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instance_configs - ## - # RPC-specific configuration for `get_instance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance_config - ## - # RPC-specific configuration for `create_instance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance_config - ## - # RPC-specific configuration for `update_instance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance_config - ## - # RPC-specific configuration for `delete_instance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance_config - ## - # RPC-specific configuration for `list_instance_config_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instance_config_operations - ## - # RPC-specific configuration for `list_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `list_instance_partitions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instance_partitions - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `update_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `get_instance_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance_partition - ## - # RPC-specific configuration for `create_instance_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance_partition - ## - # RPC-specific configuration for `delete_instance_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance_partition - ## - # RPC-specific configuration for `update_instance_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance_partition - ## - # RPC-specific configuration for `list_instance_partition_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instance_partition_operations - ## - # RPC-specific configuration for `move_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :move_instance - - # @private - def initialize parent_rpcs = nil - list_instance_configs_config = parent_rpcs.list_instance_configs if parent_rpcs.respond_to? :list_instance_configs - @list_instance_configs = ::Gapic::Config::Method.new list_instance_configs_config - get_instance_config_config = parent_rpcs.get_instance_config if parent_rpcs.respond_to? :get_instance_config - @get_instance_config = ::Gapic::Config::Method.new get_instance_config_config - create_instance_config_config = parent_rpcs.create_instance_config if parent_rpcs.respond_to? :create_instance_config - @create_instance_config = ::Gapic::Config::Method.new create_instance_config_config - update_instance_config_config = parent_rpcs.update_instance_config if parent_rpcs.respond_to? :update_instance_config - @update_instance_config = ::Gapic::Config::Method.new update_instance_config_config - delete_instance_config_config = parent_rpcs.delete_instance_config if parent_rpcs.respond_to? :delete_instance_config - @delete_instance_config = ::Gapic::Config::Method.new delete_instance_config_config - list_instance_config_operations_config = parent_rpcs.list_instance_config_operations if parent_rpcs.respond_to? :list_instance_config_operations - @list_instance_config_operations = ::Gapic::Config::Method.new list_instance_config_operations_config - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - list_instance_partitions_config = parent_rpcs.list_instance_partitions if parent_rpcs.respond_to? :list_instance_partitions - @list_instance_partitions = ::Gapic::Config::Method.new list_instance_partitions_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance - @update_instance = ::Gapic::Config::Method.new update_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - get_instance_partition_config = parent_rpcs.get_instance_partition if parent_rpcs.respond_to? :get_instance_partition - @get_instance_partition = ::Gapic::Config::Method.new get_instance_partition_config - create_instance_partition_config = parent_rpcs.create_instance_partition if parent_rpcs.respond_to? :create_instance_partition - @create_instance_partition = ::Gapic::Config::Method.new create_instance_partition_config - delete_instance_partition_config = parent_rpcs.delete_instance_partition if parent_rpcs.respond_to? :delete_instance_partition - @delete_instance_partition = ::Gapic::Config::Method.new delete_instance_partition_config - update_instance_partition_config = parent_rpcs.update_instance_partition if parent_rpcs.respond_to? :update_instance_partition - @update_instance_partition = ::Gapic::Config::Method.new update_instance_partition_config - list_instance_partition_operations_config = parent_rpcs.list_instance_partition_operations if parent_rpcs.respond_to? :list_instance_partition_operations - @list_instance_partition_operations = ::Gapic::Config::Method.new list_instance_partition_operations_config - move_instance_config = parent_rpcs.move_instance if parent_rpcs.respond_to? :move_instance - @move_instance = ::Gapic::Config::Method.new move_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb deleted file mode 100644 index f1cfbb949203..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - module InstanceAdmin - # Credentials for the InstanceAdmin API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ] - self.env_vars = [ - "SPANNER_CREDENTIALS", - "SPANNER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SPANNER_CREDENTIALS_JSON", - "SPANNER_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb deleted file mode 100644 index 400c0ee971d4..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb +++ /dev/null @@ -1,847 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - module InstanceAdmin - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the InstanceAdmin Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the InstanceAdmin Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "spanner.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb deleted file mode 100644 index 58eb65bcfcfe..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb +++ /dev/null @@ -1,104 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - module InstanceAdmin - # Path helper methods for the InstanceAdmin API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}` - # - # @param project [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/instances/#{instance}" - end - - ## - # Create a fully-qualified InstanceConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instanceConfigs/{instance_config}` - # - # @param project [String] - # @param instance_config [String] - # - # @return [::String] - def instance_config_path project:, instance_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/instanceConfigs/#{instance_config}" - end - - ## - # Create a fully-qualified InstancePartition resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` - # - # @param project [String] - # @param instance [String] - # @param instance_partition [String] - # - # @return [::String] - def instance_partition_path project:, instance:, instance_partition: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/instances/#{instance}/instancePartitions/#{instance_partition}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - extend self - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.rb deleted file mode 100644 index 17c9131daf5d..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/spanner/admin/instance/v1/version" - -require "google/cloud/spanner/admin/instance/v1/instance_admin/credentials" -require "google/cloud/spanner/admin/instance/v1/instance_admin/paths" -require "google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations" -require "google/cloud/spanner/admin/instance/v1/instance_admin/rest/client" - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - ## - # Cloud Spanner Instance Admin API - # - # The Cloud Spanner Instance Admin API can be used to create, delete, - # modify and list instances. Instances are dedicated Cloud Spanner serving - # and storage resources to be used by Cloud Spanner databases. - # - # Each instance has a "configuration", which dictates where the - # serving resources for the Cloud Spanner instance are located (e.g., - # US-central, Europe). Configurations are created by Google based on - # resource availability. - # - # Cloud Spanner billing is based on the instances that exist and their - # sizes. After an instance exists, there are no additional - # per-database or per-operation charges for use of the instance - # (though there may be additional network bandwidth charges). - # Instances offer isolation: problems with databases in one instance - # will not affect other instances. However, within an instance - # databases can affect each other. For example, if one database in an - # instance receives a lot of requests and consumes most of the - # instance resources, fewer resources are available for other - # databases in that instance, and their performance may suffer. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/spanner/admin/instance/v1/instance_admin/rest" - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - module InstanceAdmin - # Client for the REST transport - module Rest - end - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/spanner/admin/instance/v1/instance_admin/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.rb deleted file mode 100644 index 2b3a9223a425..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/client.rb +++ /dev/null @@ -1,2950 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" -require "google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub" - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - module InstanceAdmin - module Rest - ## - # REST client for the InstanceAdmin service. - # - # Cloud Spanner Instance Admin API - # - # The Cloud Spanner Instance Admin API can be used to create, delete, - # modify and list instances. Instances are dedicated Cloud Spanner serving - # and storage resources to be used by Cloud Spanner databases. - # - # Each instance has a "configuration", which dictates where the - # serving resources for the Cloud Spanner instance are located (e.g., - # US-central, Europe). Configurations are created by Google based on - # resource availability. - # - # Cloud Spanner billing is based on the instances that exist and their - # sizes. After an instance exists, there are no additional - # per-database or per-operation charges for use of the instance - # (though there may be additional network bandwidth charges). - # Instances offer isolation: problems with databases in one instance - # will not affect other instances. However, within an instance - # databases can affect each other. For example, if one database in an - # instance receives a lot of requests and consumes most of the - # instance resources, fewer resources are available for other - # databases in that instance, and their performance may suffer. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :instance_admin_stub - - ## - # Configure the InstanceAdmin Client class. - # - # See {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all InstanceAdmin clients - # ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Spanner", "Admin", "Instance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_instance_configs.timeout = 3600.0 - default_config.rpcs.list_instance_configs.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_instance_config.timeout = 3600.0 - default_config.rpcs.get_instance_config.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_instances.timeout = 3600.0 - default_config.rpcs.list_instances.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_instance.timeout = 3600.0 - default_config.rpcs.get_instance.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_instance.timeout = 3600.0 - - default_config.rpcs.update_instance.timeout = 3600.0 - - default_config.rpcs.delete_instance.timeout = 3600.0 - default_config.rpcs.delete_instance.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.set_iam_policy.timeout = 30.0 - - default_config.rpcs.get_iam_policy.timeout = 30.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.test_iam_permissions.timeout = 30.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the InstanceAdmin Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @instance_admin_stub.universe_domain - end - - ## - # Create a new InstanceAdmin REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the InstanceAdmin client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @instance_admin_stub = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @instance_admin_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @instance_admin_stub.logger - end - - # Service calls - - ## - # Lists the supported instance configurations for a given project. - # - # Returns both Google-managed configurations and user-managed - # configurations. - # - # @overload list_instance_configs(request, options = nil) - # Pass arguments to `list_instance_configs` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_instance_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_instance_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project for which a list of supported instance - # configurations is requested. Values are of the form - # `projects/`. - # @param page_size [::Integer] - # Number of instance configurations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse ListInstanceConfigsResponse}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new - # - # # Call the list_instance_configs method. - # result = client.list_instance_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. - # p item - # end - # - def list_instance_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_instance_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_instance_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_instance_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.list_instance_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instance_configs, "instance_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information about a particular instance configuration. - # - # @overload get_instance_config(request, options = nil) - # Pass arguments to `get_instance_config` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_instance_config(name: nil) - # Pass arguments to `get_instance_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the requested instance configuration. Values are of - # the form `projects//instanceConfigs/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new - # - # # Call the get_instance_config method. - # result = client.get_instance_config request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. - # p result - # - def get_instance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_instance_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_instance_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.get_instance_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an instance configuration and begins preparing it to be used. The - # returned long-running operation - # can be used to track the progress of preparing the new - # instance configuration. The instance configuration name is assigned by the - # caller. If the named instance configuration already exists, - # `CreateInstanceConfig` returns `ALREADY_EXISTS`. - # - # Immediately after the request returns: - # - # * The instance configuration is readable via the API, with all requested - # attributes. The instance configuration's - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} - # field is set to true. Its state is `CREATING`. - # - # While the operation is pending: - # - # * Cancelling the operation renders the instance configuration immediately - # unreadable via the API. - # * Except for deleting the creating resource, all other attempts to modify - # the instance configuration are rejected. - # - # Upon completion of the returned operation: - # - # * Instances can be created using the instance configuration. - # * The instance configuration's - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} - # field becomes false. Its state becomes `READY`. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to track - # creation of the instance configuration. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if - # successful. - # - # Authorization requires `spanner.instanceConfigs.create` permission on - # the resource - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest#parent parent}. - # - # @overload create_instance_config(request, options = nil) - # Pass arguments to `create_instance_config` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_instance_config(parent: nil, instance_config_id: nil, instance_config: nil, validate_only: nil) - # Pass arguments to `create_instance_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project in which to create the instance - # configuration. Values are of the form `projects/`. - # @param instance_config_id [::String] - # Required. The ID of the instance configuration to create. Valid identifiers - # are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 - # characters in length. The `custom-` prefix is required to avoid name - # conflicts with Google-managed configurations. - # @param instance_config [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig, ::Hash] - # Required. The `InstanceConfig` proto of the configuration to create. - # `instance_config.name` must be - # `/instanceConfigs/`. - # `instance_config.base_config` must be a Google-managed configuration name, - # e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3. - # @param validate_only [::Boolean] - # An option to validate, but not actually execute, a request, - # and provide the same response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new - # - # # Call the create_instance_config method. - # result = client.create_instance_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_instance_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_instance_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_instance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.create_instance_config request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an instance configuration. The returned - # long-running operation can be used to track - # the progress of updating the instance. If the named instance configuration - # does not exist, returns `NOT_FOUND`. - # - # Only user-managed configurations can be updated. - # - # Immediately after the request returns: - # - # * The instance configuration's - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} - # field is set to true. - # - # While the operation is pending: - # - # * Cancelling the operation sets its metadata's - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigMetadata#cancel_time cancel_time}. - # The operation is guaranteed to succeed at undoing all changes, after - # which point it terminates with a `CANCELLED` status. - # * All other attempts to modify the instance configuration are rejected. - # * Reading the instance configuration via the API continues to give the - # pre-request values. - # - # Upon completion of the returned operation: - # - # * Creating instances using the instance configuration uses the new - # values. - # * The new values of the instance configuration are readable via the API. - # * The instance configuration's - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling reconciling} - # field becomes false. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to track - # the instance configuration modification. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigMetadata UpdateInstanceConfigMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig}, if - # successful. - # - # Authorization requires `spanner.instanceConfigs.update` permission on - # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#name name}. - # - # @overload update_instance_config(request, options = nil) - # Pass arguments to `update_instance_config` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_instance_config(instance_config: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_instance_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance_config [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig, ::Hash] - # Required. The user instance configuration to update, which must always - # include the instance configuration name. Otherwise, only fields mentioned - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest#update_mask update_mask} - # need be included. To prevent conflicts of concurrent updates, - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling etag} can - # be used. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask specifying which fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} should be - # updated. The field mask must always be specified; this prevents any future - # fields in {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} - # from being erased accidentally by clients that do not know about them. Only - # display_name and labels can be updated. - # @param validate_only [::Boolean] - # An option to validate, but not actually execute, a request, - # and provide the same response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new - # - # # Call the update_instance_config method. - # result = client.update_instance_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_instance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_instance_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_instance_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_instance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.update_instance_config request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the instance configuration. Deletion is only allowed when no - # instances are using the configuration. If any instances are using - # the configuration, returns `FAILED_PRECONDITION`. - # - # Only user-managed configurations can be deleted. - # - # Authorization requires `spanner.instanceConfigs.delete` permission on - # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#name name}. - # - # @overload delete_instance_config(request, options = nil) - # Pass arguments to `delete_instance_config` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_instance_config(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_instance_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the instance configuration to be deleted. - # Values are of the form - # `projects//instanceConfigs/` - # @param etag [::String] - # Used for optimistic concurrency control as a way to help prevent - # simultaneous deletes of an instance configuration from overwriting each - # other. If not empty, the API - # only deletes the instance configuration when the etag provided matches the - # current status of the requested instance configuration. Otherwise, deletes - # the instance configuration without checking the current status of the - # requested instance configuration. - # @param validate_only [::Boolean] - # An option to validate, but not actually execute, a request, - # and provide the same response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new - # - # # Call the delete_instance_config method. - # result = client.delete_instance_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_instance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_instance_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_instance_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_instance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.delete_instance_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the user-managed instance configuration long-running - # operations in the given project. An instance - # configuration operation has a name of the form - # `projects//instanceConfigs//operations/`. - # The long-running operation - # metadata field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. Operations returned are ordered by - # `operation.metadata.value.start_time` in descending order starting - # from the most recently started operation. - # - # @overload list_instance_config_operations(request, options = nil) - # Pass arguments to `list_instance_config_operations` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_instance_config_operations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_instance_config_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project of the instance configuration operations. - # Values are of the form `projects/`. - # @param filter [::String] - # An expression that filters the list of returned operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the Operation are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata} - # is - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first, if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic. However, - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=` \ - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - # AND` \ - # `(metadata.instance_config.name:custom-config) AND` \ - # `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Return operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}. - # * The instance configuration name contains "custom-config". - # * The operation started before 2021-03-28T14:50:00Z. - # * The operation resulted in an error. - # @param page_size [::Integer] - # Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse ListInstanceConfigOperationsResponse} - # to the same `parent` and with the same `filter`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new - # - # # Call the list_instance_config_operations method. - # result = client.list_instance_config_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_instance_config_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_instance_config_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_instance_config_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_instance_config_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.list_instance_config_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instance_config_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all instances in the given project. - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, instance_deadline: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project for which a list of instances is - # requested. Values are of the form `projects/`. - # @param page_size [::Integer] - # Number of instances to be returned in the response. If 0 or less, defaults - # to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `display_name` - # * `labels.key` where key is the name of a label - # - # Some examples of using filters are: - # - # * `name:*` --> The instance has a name. - # * `name:Howl` --> The instance's name contains the string "howl". - # * `name:HOWL` --> Equivalent to above. - # * `NAME:howl` --> Equivalent to above. - # * `labels.env:*` --> The instance has the label "env". - # * `labels.env:dev` --> The instance has the label "env" and the value of - # the label contains the string "dev". - # * `name:howl labels.env:dev` --> The instance's name contains "howl" and - # it has the label "env" with its value - # containing "dev". - # @param instance_deadline [::Google::Protobuf::Timestamp, ::Hash] - # Deadline used while retrieving metadata for instances. - # Instances whose metadata cannot be retrieved within this deadline will be - # added to - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#unreachable unreachable} - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::Instance>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::Instance>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_instances.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.list_instances request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instances, "instances", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all instance partitions for the given instance. - # - # @overload list_instance_partitions(request, options = nil) - # Pass arguments to `list_instance_partitions` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_instance_partitions(parent: nil, page_size: nil, page_token: nil, instance_partition_deadline: nil) - # Pass arguments to `list_instance_partitions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance whose instance partitions should be listed. Values - # are of the form `projects//instances/`. Use `{instance} - # = '-'` to list instance partitions for all Instances in a project, e.g., - # `projects/myproject/instances/-`. - # @param page_size [::Integer] - # Number of instance partitions to be returned in the response. If 0 or less, - # defaults to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. - # @param instance_partition_deadline [::Google::Protobuf::Timestamp, ::Hash] - # Optional. Deadline used while retrieving metadata for instance partitions. - # Instance partitions whose metadata cannot be retrieved within this deadline - # will be added to - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#unreachable unreachable} - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new - # - # # Call the list_instance_partitions method. - # result = client.list_instance_partitions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. - # p item - # end - # - def list_instance_partitions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_instance_partitions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_instance_partitions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_instance_partitions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.list_instance_partitions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instance_partitions, "instance_partitions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information about a particular instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_instance(name: nil, field_mask: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the requested instance. Values are of the form - # `projects//instances/`. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # If field_mask is present, specifies the subset of - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields that should be - # returned. If absent, all - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields are returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.get_instance request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an instance and begins preparing it to begin serving. The - # returned long-running operation - # can be used to track the progress of preparing the new - # instance. The instance name is assigned by the caller. If the - # named instance already exists, `CreateInstance` returns - # `ALREADY_EXISTS`. - # - # Immediately upon completion of this request: - # - # * The instance is readable via the API, with all requested attributes - # but no allocated resources. Its state is `CREATING`. - # - # Until completion of the returned operation: - # - # * Cancelling the operation renders the instance immediately unreadable - # via the API. - # * The instance can be deleted. - # * All other attempts to modify the instance are rejected. - # - # Upon completion of the returned operation: - # - # * Billing for all successfully-allocated resources begins (some types - # may have lower than the requested levels). - # * Databases can be created in the instance. - # * The instance's allocated resource levels are readable via the API. - # * The instance's state becomes `READY`. - # - # The returned long-running operation will - # have a name of the format `/operations/` and - # can be used to track creation of the instance. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceMetadata CreateInstanceMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful. - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_instance(parent: nil, instance_id: nil, instance: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the project in which to create the instance. Values - # are of the form `projects/`. - # @param instance_id [::String] - # Required. The ID of the instance to create. Valid identifiers are of the - # form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in - # length. - # @param instance [::Google::Cloud::Spanner::Admin::Instance::V1::Instance, ::Hash] - # Required. The instance to create. The name may be omitted, but if - # specified must be `/instances/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.create_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an instance, and begins allocating or releasing resources - # as requested. The returned long-running operation can be used to track the - # progress of updating the instance. If the named instance does not - # exist, returns `NOT_FOUND`. - # - # Immediately upon completion of this request: - # - # * For resource types for which a decrease in the instance's allocation - # has been requested, billing is based on the newly-requested level. - # - # Until completion of the returned operation: - # - # * Cancelling the operation sets its metadata's - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceMetadata#cancel_time cancel_time}, - # and begins restoring resources to their pre-request values. The - # operation is guaranteed to succeed at undoing all resource changes, - # after which point it terminates with a `CANCELLED` status. - # * All other attempts to modify the instance are rejected. - # * Reading the instance via the API continues to give the pre-request - # resource levels. - # - # Upon completion of the returned operation: - # - # * Billing begins for all successfully-allocated resources (some types - # may have lower than the requested levels). - # * All newly-reserved resources are available for serving the instance's - # tables. - # * The instance's new resource levels are readable via the API. - # - # The returned long-running operation will - # have a name of the format `/operations/` and - # can be used to track the instance modification. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceMetadata UpdateInstanceMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, if successful. - # - # Authorization requires `spanner.instances.update` permission on - # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::Instance#name name}. - # - # @overload update_instance(request, options = nil) - # Pass arguments to `update_instance` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_instance(instance: nil, field_mask: nil) - # Pass arguments to `update_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance [::Google::Cloud::Spanner::Admin::Instance::V1::Instance, ::Hash] - # Required. The instance to update, which must always include the instance - # name. Otherwise, only fields mentioned in - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest#field_mask field_mask} - # need be included. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask specifying which fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} should be updated. - # The field mask must always be specified; this prevents any future fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} from being erased - # accidentally by clients that do not know about them. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new - # - # # Call the update_instance method. - # result = client.update_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.update_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an instance. - # - # Immediately upon completion of the request: - # - # * Billing ceases for all of the instance's reserved resources. - # - # Soon afterward: - # - # * The instance and *all of its databases* immediately and - # irrevocably disappear from the API. All data in the databases - # is permanently deleted. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_instance(name: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the instance to be deleted. Values are of the form - # `projects//instances/` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.delete_instance request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy on an instance resource. Replaces any - # existing policy. - # - # Authorization requires `spanner.instances.setIamPolicy` on - # [resource][google.iam.v1.SetIamPolicyRequest.resource]. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the access control policy for an instance resource. Returns an empty - # policy if an instance exists but does not have a policy set. - # - # Authorization requires `spanner.instances.getIamPolicy` on - # [resource][google.iam.v1.GetIamPolicyRequest.resource]. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns permissions that the caller has on the specified instance resource. - # - # Attempting this RPC on a non-existent Cloud Spanner instance resource will - # result in a NOT_FOUND error if the user has `spanner.instances.list` - # permission on the containing Google Cloud Project. Otherwise returns an - # empty set of permissions. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.test_iam_permissions request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information about a particular instance partition. - # - # @overload get_instance_partition(request, options = nil) - # Pass arguments to `get_instance_partition` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_instance_partition(name: nil) - # Pass arguments to `get_instance_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the requested instance partition. Values are of - # the form - # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new - # - # # Call the get_instance_partition method. - # result = client.get_instance_partition request - # - # # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. - # p result - # - def get_instance_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_instance_partition.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_instance_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.get_instance_partition request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an instance partition and begins preparing it to be used. The - # returned long-running operation - # can be used to track the progress of preparing the new instance partition. - # The instance partition name is assigned by the caller. If the named - # instance partition already exists, `CreateInstancePartition` returns - # `ALREADY_EXISTS`. - # - # Immediately upon completion of this request: - # - # * The instance partition is readable via the API, with all requested - # attributes but no allocated resources. Its state is `CREATING`. - # - # Until completion of the returned operation: - # - # * Cancelling the operation renders the instance partition immediately - # unreadable via the API. - # * The instance partition can be deleted. - # * All other attempts to modify the instance partition are rejected. - # - # Upon completion of the returned operation: - # - # * Billing for all successfully-allocated resources begins (some types - # may have lower than the requested levels). - # * Databases can start using this instance partition. - # * The instance partition's allocated resource levels are readable via the - # API. - # * The instance partition's state becomes `READY`. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to - # track creation of the instance partition. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if - # successful. - # - # @overload create_instance_partition(request, options = nil) - # Pass arguments to `create_instance_partition` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_instance_partition(parent: nil, instance_partition_id: nil, instance_partition: nil) - # Pass arguments to `create_instance_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the instance in which to create the instance - # partition. Values are of the form - # `projects//instances/`. - # @param instance_partition_id [::String] - # Required. The ID of the instance partition to create. Valid identifiers are - # of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 - # characters in length. - # @param instance_partition [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition, ::Hash] - # Required. The instance partition to create. The instance_partition.name may - # be omitted, but if specified must be - # `/instancePartitions/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new - # - # # Call the create_instance_partition method. - # result = client.create_instance_partition request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_instance_partition.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_instance_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_instance_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.create_instance_partition request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing instance partition. Requires that the - # instance partition is not used by any database or backup and is not the - # default instance partition of an instance. - # - # Authorization requires `spanner.instancePartitions.delete` permission on - # the resource - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition#name name}. - # - # @overload delete_instance_partition(request, options = nil) - # Pass arguments to `delete_instance_partition` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_instance_partition(name: nil, etag: nil) - # Pass arguments to `delete_instance_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the instance partition to be deleted. - # Values are of the form - # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` - # @param etag [::String] - # Optional. If not empty, the API only deletes the instance partition when - # the etag provided matches the current status of the requested instance - # partition. Otherwise, deletes the instance partition without checking the - # current status of the requested instance partition. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new - # - # # Call the delete_instance_partition method. - # result = client.delete_instance_partition request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_instance_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_instance_partition.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_instance_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_instance_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.delete_instance_partition request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an instance partition, and begins allocating or releasing resources - # as requested. The returned long-running operation can be used to track the - # progress of updating the instance partition. If the named instance - # partition does not exist, returns `NOT_FOUND`. - # - # Immediately upon completion of this request: - # - # * For resource types for which a decrease in the instance partition's - # allocation has been requested, billing is based on the newly-requested - # level. - # - # Until completion of the returned operation: - # - # * Cancelling the operation sets its metadata's - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionMetadata#cancel_time cancel_time}, - # and begins restoring resources to their pre-request values. The - # operation is guaranteed to succeed at undoing all resource changes, - # after which point it terminates with a `CANCELLED` status. - # * All other attempts to modify the instance partition are rejected. - # * Reading the instance partition via the API continues to give the - # pre-request resource levels. - # - # Upon completion of the returned operation: - # - # * Billing begins for all successfully-allocated resources (some types - # may have lower than the requested levels). - # * All newly-reserved resources are available for serving the instance - # partition's tables. - # * The instance partition's new resource levels are readable via the API. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to - # track the instance partition modification. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionMetadata UpdateInstancePartitionMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition}, if - # successful. - # - # Authorization requires `spanner.instancePartitions.update` permission on - # the resource - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition#name name}. - # - # @overload update_instance_partition(request, options = nil) - # Pass arguments to `update_instance_partition` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_instance_partition(instance_partition: nil, field_mask: nil) - # Pass arguments to `update_instance_partition` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance_partition [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition, ::Hash] - # Required. The instance partition to update, which must always include the - # instance partition name. Otherwise, only fields mentioned in - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest#field_mask field_mask} - # need be included. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask specifying which fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} - # should be updated. The field mask must always be specified; this prevents - # any future fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} - # from being erased accidentally by clients that do not know about them. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new - # - # # Call the update_instance_partition method. - # result = client.update_instance_partition request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_instance_partition request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_instance_partition.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_instance_partition.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_instance_partition.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.update_instance_partition request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists instance partition long-running operations in the given instance. - # An instance partition operation has a name of the form - # `projects//instances//instancePartitions//operations/`. - # The long-running operation - # metadata field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. Operations returned are ordered by - # `operation.metadata.value.start_time` in descending order starting from the - # most recently started operation. - # - # Authorization requires `spanner.instancePartitionOperations.list` - # permission on the resource - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest#parent parent}. - # - # @overload list_instance_partition_operations(request, options = nil) - # Pass arguments to `list_instance_partition_operations` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_instance_partition_operations(parent: nil, filter: nil, page_size: nil, page_token: nil, instance_partition_deadline: nil) - # Pass arguments to `list_instance_partition_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent instance of the instance partition operations. - # Values are of the form `projects//instances/`. - # @param filter [::String] - # Optional. An expression that filters the list of returned operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the Operation are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata} - # is - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first, if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic. However, - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=` \ - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - # AND` \ - # `(metadata.instance_partition.name:custom-instance-partition) AND` \ - # `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Return operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}. - # * The instance partition name contains "custom-instance-partition". - # * The operation started before 2021-03-28T14:50:00Z. - # * The operation resulted in an error. - # @param page_size [::Integer] - # Optional. Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @param page_token [::String] - # Optional. If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse} - # to the same `parent` and with the same `filter`. - # @param instance_partition_deadline [::Google::Protobuf::Timestamp, ::Hash] - # Optional. Deadline used while retrieving metadata for instance partition - # operations. Instance partitions whose operation metadata cannot be - # retrieved within this deadline will be added to - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#unreachable_instance_partitions unreachable_instance_partitions} - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new - # - # # Call the list_instance_partition_operations method. - # result = client.list_instance_partition_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_instance_partition_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_instance_partition_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_instance_partition_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_instance_partition_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.list_instance_partition_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @instance_admin_stub, :list_instance_partition_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Moves an instance to the target instance configuration. You can use the - # returned long-running operation to track - # the progress of moving the instance. - # - # `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of - # the following criteria: - # - # * Is undergoing a move to a different instance configuration - # * Has backups - # * Has an ongoing update - # * Contains any CMEK-enabled databases - # * Is a free trial instance - # - # While the operation is pending: - # - # * All other attempts to modify the instance, including changes to its - # compute capacity, are rejected. - # * The following database and backup admin operations are rejected: - # - # * `DatabaseAdmin.CreateDatabase` - # * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is - # specified in the request.) - # * `DatabaseAdmin.RestoreDatabase` - # * `DatabaseAdmin.CreateBackup` - # * `DatabaseAdmin.CopyBackup` - # - # * Both the source and target instance configurations are subject to - # hourly compute and storage charges. - # * The instance might experience higher read-write latencies and a higher - # transaction abort rate. However, moving an instance doesn't cause any - # downtime. - # - # The returned long-running operation has - # a name of the format - # `/operations/` and can be used to track - # the move instance operation. The - # metadata field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceMetadata MoveInstanceMetadata}. - # The response field type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance}, - # if successful. - # Cancelling the operation sets its metadata's - # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceMetadata#cancel_time cancel_time}. - # Cancellation is not immediate because it involves moving any data - # previously moved to the target instance configuration back to the original - # instance configuration. You can use this operation to track the progress of - # the cancellation. Upon successful completion of the cancellation, the - # operation terminates with `CANCELLED` status. - # - # If not cancelled, upon completion of the returned operation: - # - # * The instance successfully moves to the target instance - # configuration. - # * You are billed for compute and storage in target instance - # configuration. - # - # Authorization requires the `spanner.instances.update` permission on - # the resource {::Google::Cloud::Spanner::Admin::Instance::V1::Instance instance}. - # - # For more details, see - # [Move an instance](https://cloud.google.com/spanner/docs/move-instance). - # - # @overload move_instance(request, options = nil) - # Pass arguments to `move_instance` via a request object, either of type - # {::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload move_instance(name: nil, target_config: nil) - # Pass arguments to `move_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The instance to move. - # Values are of the form `projects//instances/`. - # @param target_config [::String] - # Required. The target instance configuration where to move the instance. - # Values are of the form `projects//instanceConfigs/`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/spanner/admin/instance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new - # - # # Call the move_instance method. - # result = client.move_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def move_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.move_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.move_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.move_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_admin_stub.move_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the InstanceAdmin REST API. - # - # This class represents the configuration for InstanceAdmin REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_instance_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instance_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instance_configs.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "spanner.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the InstanceAdmin API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_instance_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instance_configs - ## - # RPC-specific configuration for `get_instance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance_config - ## - # RPC-specific configuration for `create_instance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance_config - ## - # RPC-specific configuration for `update_instance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance_config - ## - # RPC-specific configuration for `delete_instance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance_config - ## - # RPC-specific configuration for `list_instance_config_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instance_config_operations - ## - # RPC-specific configuration for `list_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `list_instance_partitions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instance_partitions - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `update_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `get_instance_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance_partition - ## - # RPC-specific configuration for `create_instance_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance_partition - ## - # RPC-specific configuration for `delete_instance_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance_partition - ## - # RPC-specific configuration for `update_instance_partition` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance_partition - ## - # RPC-specific configuration for `list_instance_partition_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instance_partition_operations - ## - # RPC-specific configuration for `move_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :move_instance - - # @private - def initialize parent_rpcs = nil - list_instance_configs_config = parent_rpcs.list_instance_configs if parent_rpcs.respond_to? :list_instance_configs - @list_instance_configs = ::Gapic::Config::Method.new list_instance_configs_config - get_instance_config_config = parent_rpcs.get_instance_config if parent_rpcs.respond_to? :get_instance_config - @get_instance_config = ::Gapic::Config::Method.new get_instance_config_config - create_instance_config_config = parent_rpcs.create_instance_config if parent_rpcs.respond_to? :create_instance_config - @create_instance_config = ::Gapic::Config::Method.new create_instance_config_config - update_instance_config_config = parent_rpcs.update_instance_config if parent_rpcs.respond_to? :update_instance_config - @update_instance_config = ::Gapic::Config::Method.new update_instance_config_config - delete_instance_config_config = parent_rpcs.delete_instance_config if parent_rpcs.respond_to? :delete_instance_config - @delete_instance_config = ::Gapic::Config::Method.new delete_instance_config_config - list_instance_config_operations_config = parent_rpcs.list_instance_config_operations if parent_rpcs.respond_to? :list_instance_config_operations - @list_instance_config_operations = ::Gapic::Config::Method.new list_instance_config_operations_config - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - list_instance_partitions_config = parent_rpcs.list_instance_partitions if parent_rpcs.respond_to? :list_instance_partitions - @list_instance_partitions = ::Gapic::Config::Method.new list_instance_partitions_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance - @update_instance = ::Gapic::Config::Method.new update_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - get_instance_partition_config = parent_rpcs.get_instance_partition if parent_rpcs.respond_to? :get_instance_partition - @get_instance_partition = ::Gapic::Config::Method.new get_instance_partition_config - create_instance_partition_config = parent_rpcs.create_instance_partition if parent_rpcs.respond_to? :create_instance_partition - @create_instance_partition = ::Gapic::Config::Method.new create_instance_partition_config - delete_instance_partition_config = parent_rpcs.delete_instance_partition if parent_rpcs.respond_to? :delete_instance_partition - @delete_instance_partition = ::Gapic::Config::Method.new delete_instance_partition_config - update_instance_partition_config = parent_rpcs.update_instance_partition if parent_rpcs.respond_to? :update_instance_partition - @update_instance_partition = ::Gapic::Config::Method.new update_instance_partition_config - list_instance_partition_operations_config = parent_rpcs.list_instance_partition_operations if parent_rpcs.respond_to? :list_instance_partition_operations - @list_instance_partition_operations = ::Gapic::Config::Method.new list_instance_partition_operations_config - move_instance_config = parent_rpcs.move_instance if parent_rpcs.respond_to? :move_instance - @move_instance = ::Gapic::Config::Method.new move_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb deleted file mode 100644 index e2943c53c438..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/operations.rb +++ /dev/null @@ -1,1070 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - module InstanceAdmin - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the InstanceAdmin Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the InstanceAdmin Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "spanner.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/operations/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.rb deleted file mode 100644 index 7f927a943f3e..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/instance_admin/rest/service_stub.rb +++ /dev/null @@ -1,1376 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - module InstanceAdmin - module Rest - ## - # REST service stub for the InstanceAdmin service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_instance_configs REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse] - # A result object deserialized from the server's reply - def list_instance_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_instance_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_instance_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_instance_config REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] - # A result object deserialized from the server's reply - def get_instance_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_instance_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_instance_config REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_instance_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_instance_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_instance_config REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_instance_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_instance_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_instance_config REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_instance_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_instance_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_instance_config_operations REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse] - # A result object deserialized from the server's reply - def list_instance_config_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_instance_config_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_instance_config_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_instances REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse] - # A result object deserialized from the server's reply - def list_instances request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_instances", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_instance_partitions REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse] - # A result object deserialized from the server's reply - def list_instance_partitions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_instance_partitions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_instance_partitions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_instance REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] - # A result object deserialized from the server's reply - def get_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Instance::V1::Instance.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_instance REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_instance REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_instance_partition REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] - # A result object deserialized from the server's reply - def get_instance_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_instance_partition", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_instance_partition REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_instance_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_instance_partition", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_instance_partition REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_instance_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_instance_partition", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_instance_partition REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_instance_partition request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_partition_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_instance_partition", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_instance_partition_operations REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse] - # A result object deserialized from the server's reply - def list_instance_partition_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_instance_partition_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_instance_partition_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the move_instance REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def move_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_move_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "move_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_instance_configs REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_instance_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/instanceConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance_config REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_instance_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_instance_config REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_instance_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/instanceConfigs", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_instance_config REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_instance_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{instance_config.name}", - body: "*", - matches: [ - ["instance_config.name", %r{^projects/[^/]+/instanceConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_instance_config REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_instance_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instanceConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_instance_config_operations REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_instance_config_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/instanceConfigOperations", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_instances REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_instances_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/instances", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_instance_partitions REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_instance_partitions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/instancePartitions", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_instance REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/instances", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_instance REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{instance.name}", - body: "*", - matches: [ - ["instance.name", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance_partition REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_instance_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_instance_partition REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_instance_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/instancePartitions", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_instance_partition REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_instance_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_instance_partition REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_instance_partition_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{instance_partition.name}", - body: "*", - matches: [ - ["instance_partition.name", %r{^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_instance_partition_operations REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_instance_partition_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/instancePartitionOperations", - matches: [ - ["parent", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the move_instance REST call - # - # @param request_pb [::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_move_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:move", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.rb deleted file mode 100644 index bc6ad4b7dcf4..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/rest.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/spanner/admin/instance/v1/instance_admin/rest" -require "google/cloud/spanner/admin/instance/v1/version" - -module Google - module Cloud - module Spanner - module Admin - module Instance - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/spanner/admin/instance/v1/rest" - # client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new - # - module V1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/version.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/version.rb deleted file mode 100644 index a9cfa90b04fb..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/cloud/spanner/admin/instance/v1/version.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - VERSION = "0.0.1" - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/common_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/common_pb.rb deleted file mode 100644 index f6f080766f8d..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/common_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/admin/instance/v1/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/spanner/admin/instance/v1/common.proto\x12 google.spanner.admin.instance.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8b\x01\n\x11OperationProgress\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\")\n\x10ReplicaSelection\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x02*w\n\x11\x46ulfillmentPeriod\x12\"\n\x1e\x46ULFILLMENT_PERIOD_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x46ULFILLMENT_PERIOD_NORMAL\x10\x01\x12\x1f\n\x1b\x46ULFILLMENT_PERIOD_EXTENDED\x10\x02\x42\xfd\x01\n$com.google.spanner.admin.instance.v1B\x0b\x43ommonProtoP\x01ZFcloud.google.com/go/spanner/admin/instance/apiv1/instancepb;instancepb\xaa\x02&Google.Cloud.Spanner.Admin.Instance.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Instance\\V1\xea\x02+Google::Cloud::Spanner::Admin::Instance::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - OperationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.OperationProgress").msgclass - ReplicaSelection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaSelection").msgclass - FulfillmentPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.FulfillmentPeriod").enummodule - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb deleted file mode 100644 index 49f467979b51..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb +++ /dev/null @@ -1,89 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/admin/instance/v1/spanner_instance_admin.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/spanner/admin/instance/v1/common_pb' - - -descriptor_data = "\n=google/spanner/admin/instance/v1/spanner_instance_admin.proto\x12 google.spanner.admin.instance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a-google/spanner/admin/instance/v1/common.proto\"\xda\x01\n\x0bReplicaInfo\x12\x10\n\x08location\x18\x01 \x01(\t\x12G\n\x04type\x18\x02 \x01(\x0e\x32\x39.google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType\x12\x1f\n\x17\x64\x65\x66\x61ult_leader_location\x18\x03 \x01(\x08\"O\n\x0bReplicaType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\x0b\n\x07WITNESS\x10\x03\"\xc0\n\n\x0eInstanceConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12O\n\x0b\x63onfig_type\x18\x05 \x01(\x0e\x32\x35.google.spanner.admin.instance.v1.InstanceConfig.TypeB\x03\xe0\x41\x03\x12?\n\x08replicas\x18\x03 \x03(\x0b\x32-.google.spanner.admin.instance.v1.ReplicaInfo\x12M\n\x11optional_replicas\x18\x06 \x03(\x0b\x32-.google.spanner.admin.instance.v1.ReplicaInfoB\x03\xe0\x41\x03\x12?\n\x0b\x62\x61se_config\x18\x07 \x01(\tB*\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\x12L\n\x06labels\x18\x08 \x03(\x0b\x32<.google.spanner.admin.instance.v1.InstanceConfig.LabelsEntry\x12\x0c\n\x04\x65tag\x18\t \x01(\t\x12\x16\n\x0eleader_options\x18\x04 \x03(\t\x12\x18\n\x0breconciling\x18\n \x01(\x08\x42\x03\xe0\x41\x03\x12J\n\x05state\x18\x0b \x01(\x0e\x32\x36.google.spanner.admin.instance.v1.InstanceConfig.StateB\x03\xe0\x41\x03\x12r\n\x1a\x66ree_instance_availability\x18\x0c \x01(\x0e\x32I.google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailabilityB\x03\xe0\x41\x03\x12U\n\x0bquorum_type\x18\x12 \x01(\x0e\x32;.google.spanner.admin.instance.v1.InstanceConfig.QuorumTypeB\x03\xe0\x41\x03\x12.\n!storage_limit_per_processing_unit\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"B\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eGOOGLE_MANAGED\x10\x01\x12\x10\n\x0cUSER_MANAGED\x10\x02\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\"\x88\x01\n\x18\x46reeInstanceAvailability\x12*\n&FREE_INSTANCE_AVAILABILITY_UNSPECIFIED\x10\x00\x12\r\n\tAVAILABLE\x10\x01\x12\x0f\n\x0bUNSUPPORTED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\x12\n\x0eQUOTA_EXCEEDED\x10\x04\"X\n\nQuorumType\x12\x1b\n\x17QUORUM_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06REGION\x10\x01\x12\x0f\n\x0b\x44UAL_REGION\x10\x02\x12\x10\n\x0cMULTI_REGION\x10\x03:\x81\x01\xea\x41~\n%spanner.googleapis.com/InstanceConfig\x12\x34projects/{project}/instanceConfigs/{instance_config}*\x0finstanceConfigs2\x0einstanceConfig\"\xb2\x01\n\x16ReplicaComputeCapacity\x12R\n\x11replica_selection\x18\x01 \x01(\x0b\x32\x32.google.spanner.admin.instance.v1.ReplicaSelectionB\x03\xe0\x41\x02\x12\x14\n\nnode_count\x18\x02 \x01(\x05H\x00\x12\x1a\n\x10processing_units\x18\x03 \x01(\x05H\x00\x42\x12\n\x10\x63ompute_capacity\"\x84\n\n\x11\x41utoscalingConfig\x12\x66\n\x12\x61utoscaling_limits\x18\x01 \x01(\x0b\x32\x45.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsB\x03\xe0\x41\x02\x12h\n\x13\x61utoscaling_targets\x18\x02 \x01(\x0b\x32\x46.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsB\x03\xe0\x41\x02\x12|\n\x1e\x61symmetric_autoscaling_options\x18\x03 \x03(\x0b\x32O.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOptionB\x03\xe0\x41\x01\x1a\x97\x01\n\x11\x41utoscalingLimits\x12\x13\n\tmin_nodes\x18\x01 \x01(\x05H\x00\x12\x1e\n\x14min_processing_units\x18\x02 \x01(\x05H\x00\x12\x13\n\tmax_nodes\x18\x03 \x01(\x05H\x01\x12\x1e\n\x14max_processing_units\x18\x04 \x01(\x05H\x01\x42\x0b\n\tmin_limitB\x0b\n\tmax_limit\x1a\x9e\x01\n\x12\x41utoscalingTargets\x12\x32\n%high_priority_cpu_utilization_percent\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12*\n\x1dtotal_cpu_utilization_percent\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12(\n\x1bstorage_utilization_percent\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x1a\xe3\x04\n\x1b\x41symmetricAutoscalingOption\x12R\n\x11replica_selection\x18\x01 \x01(\x0b\x32\x32.google.spanner.admin.instance.v1.ReplicaSelectionB\x03\xe0\x41\x02\x12\x82\x01\n\toverrides\x18\x02 \x01(\x0b\x32j.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverridesB\x03\xe0\x41\x01\x1a\xea\x02\n\x1a\x41utoscalingConfigOverrides\x12\x66\n\x12\x61utoscaling_limits\x18\x01 \x01(\x0b\x32\x45.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsB\x03\xe0\x41\x01\x12\x45\n8autoscaling_target_high_priority_cpu_utilization_percent\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12=\n0autoscaling_target_total_cpu_utilization_percent\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x32\n%disable_high_priority_cpu_autoscaling\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12*\n\x1d\x64isable_total_cpu_autoscaling\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xaa\x0b\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12=\n\x06\x63onfig\x18\x02 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nnode_count\x18\x05 \x01(\x05\x12\x18\n\x10processing_units\x18\t \x01(\x05\x12_\n\x18replica_compute_capacity\x18\x13 \x03(\x0b\x32\x38.google.spanner.admin.instance.v1.ReplicaComputeCapacityB\x03\xe0\x41\x03\x12T\n\x12\x61utoscaling_config\x18\x11 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.AutoscalingConfigB\x03\xe0\x41\x01\x12\x44\n\x05state\x18\x06 \x01(\x0e\x32\x30.google.spanner.admin.instance.v1.Instance.StateB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x07 \x03(\x0b\x32\x36.google.spanner.admin.instance.v1.Instance.LabelsEntry\x12N\n\rinstance_type\x18\n \x01(\x0e\x32\x37.google.spanner.admin.instance.v1.Instance.InstanceType\x12\x15\n\rendpoint_uris\x18\x08 \x03(\t\x12\x34\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x16\x66ree_instance_metadata\x18\r \x01(\x0b\x32\x36.google.spanner.admin.instance.v1.FreeInstanceMetadata\x12H\n\x07\x65\x64ition\x18\x14 \x01(\x0e\x32\x32.google.spanner.admin.instance.v1.Instance.EditionB\x03\xe0\x41\x01\x12o\n\x1c\x64\x65\x66\x61ult_backup_schedule_type\x18\x17 \x01(\x0e\x32\x44.google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleTypeB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\"Q\n\x0cInstanceType\x12\x1d\n\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPROVISIONED\x10\x01\x12\x11\n\rFREE_INSTANCE\x10\x02\"U\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x03\"b\n\x19\x44\x65\x66\x61ultBackupScheduleType\x12,\n(DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\r\n\tAUTOMATIC\x10\x02:b\xea\x41_\n\x1fspanner.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}*\tinstances2\x08instance\"\x88\x01\n\x1aListInstanceConfigsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x1bListInstanceConfigsResponse\x12J\n\x10instance_configs\x18\x01 \x03(\x0b\x32\x30.google.spanner.admin.instance.v1.InstanceConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"W\n\x18GetInstanceConfigRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\"\xea\x01\n\x1b\x43reateInstanceConfigRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x1f\n\x12instance_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\x0finstance_config\x18\x03 \x01(\x0b\x32\x30.google.spanner.admin.instance.v1.InstanceConfigB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xba\x01\n\x1bUpdateInstanceConfigRequest\x12N\n\x0finstance_config\x18\x01 \x01(\x0b\x32\x30.google.spanner.admin.instance.v1.InstanceConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\x7f\n\x1b\x44\x65leteInstanceConfigRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\xa1\x01\n#ListInstanceConfigOperationsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"r\n$ListInstanceConfigOperationsResponse\x12\x31\n\noperations\x18\x01 \x03(\x0b\x32\x1d.google.longrunning.Operation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"{\n\x12GetInstanceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12.\n\nfield_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb9\x01\n\x15\x43reateInstanceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x08instance\x18\x03 \x01(\x0b\x32*.google.spanner.admin.instance.v1.InstanceB\x03\xe0\x41\x02\"\xc9\x01\n\x14ListInstancesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x35\n\x11instance_deadline\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x84\x01\n\x15ListInstancesResponse\x12=\n\tinstances\x18\x01 \x03(\x0b\x32*.google.spanner.admin.instance.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8f\x01\n\x15UpdateInstanceRequest\x12\x41\n\x08instance\x18\x01 \x01(\x0b\x32*.google.spanner.admin.instance.v1.InstanceB\x03\xe0\x41\x02\x12\x33\n\nfield_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"N\n\x15\x44\x65leteInstanceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\"\xbf\x02\n\x16\x43reateInstanceMetadata\x12<\n\x08instance\x18\x01 \x01(\x0b\x32*.google.spanner.admin.instance.v1.Instance\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x1b\x65xpected_fulfillment_period\x18\x05 \x01(\x0e\x32\x33.google.spanner.admin.instance.v1.FulfillmentPeriod\"\xbf\x02\n\x16UpdateInstanceMetadata\x12<\n\x08instance\x18\x01 \x01(\x0b\x32*.google.spanner.admin.instance.v1.Instance\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x1b\x65xpected_fulfillment_period\x18\x05 \x01(\x0e\x32\x33.google.spanner.admin.instance.v1.FulfillmentPeriod\"\xce\x02\n\x14\x46reeInstanceMetadata\x12\x34\n\x0b\x65xpire_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x0cupgrade_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12^\n\x0f\x65xpire_behavior\x18\x03 \x01(\x0e\x32\x45.google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior\"i\n\x0e\x45xpireBehavior\x12\x1f\n\x1b\x45XPIRE_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x17\n\x13\x46REE_TO_PROVISIONED\x10\x01\x12\x1d\n\x19REMOVE_AFTER_GRACE_PERIOD\x10\x02\"\xe1\x01\n\x1c\x43reateInstanceConfigMetadata\x12I\n\x0finstance_config\x18\x01 \x01(\x0b\x32\x30.google.spanner.admin.instance.v1.InstanceConfig\x12\x45\n\x08progress\x18\x02 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xe1\x01\n\x1cUpdateInstanceConfigMetadata\x12I\n\x0finstance_config\x18\x01 \x01(\x0b\x32\x30.google.spanner.admin.instance.v1.InstanceConfig\x12\x45\n\x08progress\x18\x02 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8f\x06\n\x11InstancePartition\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12=\n\x06\x63onfig\x18\x02 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\nnode_count\x18\x05 \x01(\x05H\x00\x12\x1a\n\x10processing_units\x18\x06 \x01(\x05H\x00\x12T\n\x12\x61utoscaling_config\x18\r \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.AutoscalingConfigB\x03\xe0\x41\x01\x12M\n\x05state\x18\x07 \x01(\x0e\x32\x39.google.spanner.admin.instance.v1.InstancePartition.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\"\n\x15referencing_databases\x18\n \x03(\tB\x03\xe0\x41\x03\x12\"\n\x13referencing_backups\x18\x0b \x03(\tB\x05\x18\x01\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0c \x01(\t\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02:\xa6\x01\xea\x41\xa2\x01\n(spanner.googleapis.com/InstancePartition\x12Oprojects/{project}/instances/{instance}/instancePartitions/{instance_partition}*\x12instancePartitions2\x11instancePartitionB\x12\n\x10\x63ompute_capacity\"\x81\x02\n\x1f\x43reateInstancePartitionMetadata\x12O\n\x12instance_partition\x18\x01 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.InstancePartition\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd3\x01\n\x1e\x43reateInstancePartitionRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\"\n\x15instance_partition_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x12instance_partition\x18\x03 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.InstancePartitionB\x03\xe0\x41\x02\"n\n\x1e\x44\x65leteInstancePartitionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(spanner.googleapis.com/InstancePartition\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\"]\n\x1bGetInstancePartitionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(spanner.googleapis.com/InstancePartition\"\xab\x01\n\x1eUpdateInstancePartitionRequest\x12T\n\x12instance_partition\x18\x01 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.InstancePartitionB\x03\xe0\x41\x02\x12\x33\n\nfield_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x81\x02\n\x1fUpdateInstancePartitionMetadata\x12O\n\x12instance_partition\x18\x01 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.InstancePartition\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc5\x01\n\x1dListInstancePartitionsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x44\n\x1binstance_partition_deadline\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xa0\x01\n\x1eListInstancePartitionsResponse\x12P\n\x13instance_partitions\x18\x01 \x03(\x0b\x32\x33.google.spanner.admin.instance.v1.InstancePartition\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xed\x01\n&ListInstancePartitionOperationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x1binstance_partition_deadline\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\x9e\x01\n\'ListInstancePartitionOperationsResponse\x12\x31\n\noperations\x18\x01 \x03(\x0b\x32\x1d.google.longrunning.Operation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\'\n\x1funreachable_instance_partitions\x18\x03 \x03(\t\"\x92\x01\n\x13MoveInstanceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Instance\x12\x44\n\rtarget_config\x18\x02 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%spanner.googleapis.com/InstanceConfig\"\x16\n\x14MoveInstanceResponse\"\xa5\x01\n\x14MoveInstanceMetadata\x12\x15\n\rtarget_config\x18\x01 \x01(\t\x12\x45\n\x08progress\x18\x02 \x01(\x0b\x32\x33.google.spanner.admin.instance.v1.OperationProgress\x12/\n\x0b\x63\x61ncel_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xda\'\n\rInstanceAdmin\x12\xcc\x01\n\x13ListInstanceConfigs\x12<.google.spanner.admin.instance.v1.ListInstanceConfigsRequest\x1a=.google.spanner.admin.instance.v1.ListInstanceConfigsResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/v1/{parent=projects/*}/instanceConfigs\x12\xb9\x01\n\x11GetInstanceConfig\x12:.google.spanner.admin.instance.v1.GetInstanceConfigRequest\x1a\x30.google.spanner.admin.instance.v1.InstanceConfig\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/v1/{name=projects/*/instanceConfigs/*}\x12\xc8\x02\n\x14\x43reateInstanceConfig\x12=.google.spanner.admin.instance.v1.CreateInstanceConfigRequest\x1a\x1d.google.longrunning.Operation\"\xd1\x01\xca\x41p\n/google.spanner.admin.instance.v1.InstanceConfig\x12=google.spanner.admin.instance.v1.CreateInstanceConfigMetadata\xda\x41)parent,instance_config,instance_config_id\x82\xd3\xe4\x93\x02,\"\'/v1/{parent=projects/*}/instanceConfigs:\x01*\x12\xca\x02\n\x14UpdateInstanceConfig\x12=.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest\x1a\x1d.google.longrunning.Operation\"\xd3\x01\xca\x41p\n/google.spanner.admin.instance.v1.InstanceConfig\x12=google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata\xda\x41\x1binstance_config,update_mask\x82\xd3\xe4\x93\x02<27/v1/{instance_config.name=projects/*/instanceConfigs/*}:\x01*\x12\xa5\x01\n\x14\x44\x65leteInstanceConfig\x12=.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest\x1a\x16.google.protobuf.Empty\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)*\'/v1/{name=projects/*/instanceConfigs/*}\x12\xf0\x01\n\x1cListInstanceConfigOperations\x12\x45.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest\x1a\x46.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*}/instanceConfigOperations\x12\xb4\x01\n\rListInstances\x12\x36.google.spanner.admin.instance.v1.ListInstancesRequest\x1a\x37.google.spanner.admin.instance.v1.ListInstancesResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/instances\x12\xe4\x01\n\x16ListInstancePartitions\x12?.google.spanner.admin.instance.v1.ListInstancePartitionsRequest\x1a@.google.spanner.admin.instance.v1.ListInstancePartitionsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/instances/*}/instancePartitions\x12\xa1\x01\n\x0bGetInstance\x12\x34.google.spanner.admin.instance.v1.GetInstanceRequest\x1a*.google.spanner.admin.instance.v1.Instance\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/instances/*}\x12\x9c\x02\n\x0e\x43reateInstance\x12\x37.google.spanner.admin.instance.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41\x64\n)google.spanner.admin.instance.v1.Instance\x12\x37google.spanner.admin.instance.v1.CreateInstanceMetadata\xda\x41\x1bparent,instance_id,instance\x82\xd3\xe4\x93\x02&\"!/v1/{parent=projects/*}/instances:\x01*\x12\x9d\x02\n\x0eUpdateInstance\x12\x37.google.spanner.admin.instance.v1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x01\xca\x41\x64\n)google.spanner.admin.instance.v1.Instance\x12\x37google.spanner.admin.instance.v1.UpdateInstanceMetadata\xda\x41\x13instance,field_mask\x82\xd3\xe4\x93\x02/2*/v1/{instance.name=projects/*/instances/*}:\x01*\x12\x93\x01\n\x0e\x44\x65leteInstance\x12\x37.google.spanner.admin.instance.v1.DeleteInstanceRequest\x1a\x16.google.protobuf.Empty\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=projects/*/instances/*}\x12\x9a\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"O\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x37\"2/v1/{resource=projects/*/instances/*}:setIamPolicy:\x01*\x12\x93\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"H\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x37\"2/v1/{resource=projects/*/instances/*}:getIamPolicy:\x01*\x12\xc5\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"Z\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02=\"8/v1/{resource=projects/*/instances/*}:testIamPermissions:\x01*\x12\xd1\x01\n\x14GetInstancePartition\x12=.google.spanner.admin.instance.v1.GetInstancePartitionRequest\x1a\x33.google.spanner.admin.instance.v1.InstancePartition\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/instances/*/instancePartitions/*}\x12\xe9\x02\n\x17\x43reateInstancePartition\x12@.google.spanner.admin.instance.v1.CreateInstancePartitionRequest\x1a\x1d.google.longrunning.Operation\"\xec\x01\xca\x41v\n2google.spanner.admin.instance.v1.InstancePartition\x12@google.spanner.admin.instance.v1.CreateInstancePartitionMetadata\xda\x41/parent,instance_partition,instance_partition_id\x82\xd3\xe4\x93\x02;\"6/v1/{parent=projects/*/instances/*}/instancePartitions:\x01*\x12\xba\x01\n\x17\x44\x65leteInstancePartition\x12@.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/instances/*/instancePartitions/*}\x12\xea\x02\n\x17UpdateInstancePartition\x12@.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest\x1a\x1d.google.longrunning.Operation\"\xed\x01\xca\x41v\n2google.spanner.admin.instance.v1.InstancePartition\x12@google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata\xda\x41\x1dinstance_partition,field_mask\x82\xd3\xe4\x93\x02N2I/v1/{instance_partition.name=projects/*/instances/*/instancePartitions/*}:\x01*\x12\x88\x02\n\x1fListInstancePartitionOperations\x12H.google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest\x1aI.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/instances/*}/instancePartitionOperations\x12\x89\x02\n\x0cMoveInstance\x12\x35.google.spanner.admin.instance.v1.MoveInstanceRequest\x1a\x1d.google.longrunning.Operation\"\xa2\x01\xca\x41n\n5google.spanner.admin.instance.v1.MoveInstanceResponse\x12\x35google.spanner.admin.instance.v1.MoveInstanceMetadata\x82\xd3\xe4\x93\x02+\"&/v1/{name=projects/*/instances/*}:move:\x01*\x1ax\xca\x41\x16spanner.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.adminB\x8b\x02\n$com.google.spanner.admin.instance.v1B\x19SpannerInstanceAdminProtoP\x01ZFcloud.google.com/go/spanner/admin/instance/apiv1/instancepb;instancepb\xaa\x02&Google.Cloud.Spanner.Admin.Instance.V1\xca\x02&Google\\Cloud\\Spanner\\Admin\\Instance\\V1\xea\x02+Google::Cloud::Spanner::Admin::Instance::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - ReplicaInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaInfo").msgclass - ReplicaInfo::ReplicaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType").enummodule - InstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig").msgclass - InstanceConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig.Type").enummodule - InstanceConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig.State").enummodule - InstanceConfig::FreeInstanceAvailability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailability").enummodule - InstanceConfig::QuorumType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig.QuorumType").enummodule - ReplicaComputeCapacity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaComputeCapacity").msgclass - AutoscalingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.AutoscalingConfig").msgclass - AutoscalingConfig::AutoscalingLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits").msgclass - AutoscalingConfig::AutoscalingTargets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets").msgclass - AutoscalingConfig::AsymmetricAutoscalingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption").msgclass - AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides").msgclass - Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance").msgclass - Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance.State").enummodule - Instance::InstanceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance.InstanceType").enummodule - Instance::Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance.Edition").enummodule - Instance::DefaultBackupScheduleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType").enummodule - ListInstanceConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigsRequest").msgclass - ListInstanceConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigsResponse").msgclass - GetInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.GetInstanceConfigRequest").msgclass - CreateInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceConfigRequest").msgclass - UpdateInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceConfigRequest").msgclass - DeleteInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.DeleteInstanceConfigRequest").msgclass - ListInstanceConfigOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest").msgclass - ListInstanceConfigOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse").msgclass - GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.GetInstanceRequest").msgclass - CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceRequest").msgclass - ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancesRequest").msgclass - ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancesResponse").msgclass - UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceRequest").msgclass - DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.DeleteInstanceRequest").msgclass - CreateInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceMetadata").msgclass - UpdateInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceMetadata").msgclass - FreeInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.FreeInstanceMetadata").msgclass - FreeInstanceMetadata::ExpireBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior").enummodule - CreateInstanceConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceConfigMetadata").msgclass - UpdateInstanceConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata").msgclass - InstancePartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstancePartition").msgclass - InstancePartition::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstancePartition.State").enummodule - CreateInstancePartitionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstancePartitionMetadata").msgclass - CreateInstancePartitionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstancePartitionRequest").msgclass - DeleteInstancePartitionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.DeleteInstancePartitionRequest").msgclass - GetInstancePartitionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.GetInstancePartitionRequest").msgclass - UpdateInstancePartitionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstancePartitionRequest").msgclass - UpdateInstancePartitionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata").msgclass - ListInstancePartitionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancePartitionsRequest").msgclass - ListInstancePartitionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancePartitionsResponse").msgclass - ListInstancePartitionOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest").msgclass - ListInstancePartitionOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse").msgclass - MoveInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.MoveInstanceRequest").msgclass - MoveInstanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.MoveInstanceResponse").msgclass - MoveInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.MoveInstanceMetadata").msgclass - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb deleted file mode 100644 index d5b8848f47b8..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb +++ /dev/null @@ -1,463 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/spanner/admin/instance/v1/spanner_instance_admin.proto for package 'Google.Cloud.Spanner.Admin.Instance.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/spanner/admin/instance/v1/spanner_instance_admin_pb' - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - module InstanceAdmin - # Cloud Spanner Instance Admin API - # - # The Cloud Spanner Instance Admin API can be used to create, delete, - # modify and list instances. Instances are dedicated Cloud Spanner serving - # and storage resources to be used by Cloud Spanner databases. - # - # Each instance has a "configuration", which dictates where the - # serving resources for the Cloud Spanner instance are located (e.g., - # US-central, Europe). Configurations are created by Google based on - # resource availability. - # - # Cloud Spanner billing is based on the instances that exist and their - # sizes. After an instance exists, there are no additional - # per-database or per-operation charges for use of the instance - # (though there may be additional network bandwidth charges). - # Instances offer isolation: problems with databases in one instance - # will not affect other instances. However, within an instance - # databases can affect each other. For example, if one database in an - # instance receives a lot of requests and consumes most of the - # instance resources, fewer resources are available for other - # databases in that instance, and their performance may suffer. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.spanner.admin.instance.v1.InstanceAdmin' - - # Lists the supported instance configurations for a given project. - # - # Returns both Google-managed configurations and user-managed - # configurations. - rpc :ListInstanceConfigs, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse - # Gets information about a particular instance configuration. - rpc :GetInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig - # Creates an instance configuration and begins preparing it to be used. The - # returned long-running operation - # can be used to track the progress of preparing the new - # instance configuration. The instance configuration name is assigned by the - # caller. If the named instance configuration already exists, - # `CreateInstanceConfig` returns `ALREADY_EXISTS`. - # - # Immediately after the request returns: - # - # * The instance configuration is readable via the API, with all requested - # attributes. The instance configuration's - # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] - # field is set to true. Its state is `CREATING`. - # - # While the operation is pending: - # - # * Cancelling the operation renders the instance configuration immediately - # unreadable via the API. - # * Except for deleting the creating resource, all other attempts to modify - # the instance configuration are rejected. - # - # Upon completion of the returned operation: - # - # * Instances can be created using the instance configuration. - # * The instance configuration's - # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] - # field becomes false. Its state becomes `READY`. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to track - # creation of the instance configuration. The - # metadata field type is - # [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. - # The response field type is - # [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if - # successful. - # - # Authorization requires `spanner.instanceConfigs.create` permission on - # the resource - # [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent]. - rpc :CreateInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest, ::Google::Longrunning::Operation - # Updates an instance configuration. The returned - # long-running operation can be used to track - # the progress of updating the instance. If the named instance configuration - # does not exist, returns `NOT_FOUND`. - # - # Only user-managed configurations can be updated. - # - # Immediately after the request returns: - # - # * The instance configuration's - # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] - # field is set to true. - # - # While the operation is pending: - # - # * Cancelling the operation sets its metadata's - # [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time]. - # The operation is guaranteed to succeed at undoing all changes, after - # which point it terminates with a `CANCELLED` status. - # * All other attempts to modify the instance configuration are rejected. - # * Reading the instance configuration via the API continues to give the - # pre-request values. - # - # Upon completion of the returned operation: - # - # * Creating instances using the instance configuration uses the new - # values. - # * The new values of the instance configuration are readable via the API. - # * The instance configuration's - # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] - # field becomes false. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to track - # the instance configuration modification. The - # metadata field type is - # [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata]. - # The response field type is - # [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if - # successful. - # - # Authorization requires `spanner.instanceConfigs.update` permission on - # the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name]. - rpc :UpdateInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest, ::Google::Longrunning::Operation - # Deletes the instance configuration. Deletion is only allowed when no - # instances are using the configuration. If any instances are using - # the configuration, returns `FAILED_PRECONDITION`. - # - # Only user-managed configurations can be deleted. - # - # Authorization requires `spanner.instanceConfigs.delete` permission on - # the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name]. - rpc :DeleteInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest, ::Google::Protobuf::Empty - # Lists the user-managed instance configuration long-running - # operations in the given project. An instance - # configuration operation has a name of the form - # `projects//instanceConfigs//operations/`. - # The long-running operation - # metadata field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. Operations returned are ordered by - # `operation.metadata.value.start_time` in descending order starting - # from the most recently started operation. - rpc :ListInstanceConfigOperations, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse - # Lists all instances in the given project. - rpc :ListInstances, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse - # Lists all instance partitions for the given instance. - rpc :ListInstancePartitions, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse - # Gets information about a particular instance. - rpc :GetInstance, ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::Instance - # Creates an instance and begins preparing it to begin serving. The - # returned long-running operation - # can be used to track the progress of preparing the new - # instance. The instance name is assigned by the caller. If the - # named instance already exists, `CreateInstance` returns - # `ALREADY_EXISTS`. - # - # Immediately upon completion of this request: - # - # * The instance is readable via the API, with all requested attributes - # but no allocated resources. Its state is `CREATING`. - # - # Until completion of the returned operation: - # - # * Cancelling the operation renders the instance immediately unreadable - # via the API. - # * The instance can be deleted. - # * All other attempts to modify the instance are rejected. - # - # Upon completion of the returned operation: - # - # * Billing for all successfully-allocated resources begins (some types - # may have lower than the requested levels). - # * Databases can be created in the instance. - # * The instance's allocated resource levels are readable via the API. - # * The instance's state becomes `READY`. - # - # The returned long-running operation will - # have a name of the format `/operations/` and - # can be used to track creation of the instance. The - # metadata field type is - # [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. - # The response field type is - # [Instance][google.spanner.admin.instance.v1.Instance], if successful. - rpc :CreateInstance, ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest, ::Google::Longrunning::Operation - # Updates an instance, and begins allocating or releasing resources - # as requested. The returned long-running operation can be used to track the - # progress of updating the instance. If the named instance does not - # exist, returns `NOT_FOUND`. - # - # Immediately upon completion of this request: - # - # * For resource types for which a decrease in the instance's allocation - # has been requested, billing is based on the newly-requested level. - # - # Until completion of the returned operation: - # - # * Cancelling the operation sets its metadata's - # [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], - # and begins restoring resources to their pre-request values. The - # operation is guaranteed to succeed at undoing all resource changes, - # after which point it terminates with a `CANCELLED` status. - # * All other attempts to modify the instance are rejected. - # * Reading the instance via the API continues to give the pre-request - # resource levels. - # - # Upon completion of the returned operation: - # - # * Billing begins for all successfully-allocated resources (some types - # may have lower than the requested levels). - # * All newly-reserved resources are available for serving the instance's - # tables. - # * The instance's new resource levels are readable via the API. - # - # The returned long-running operation will - # have a name of the format `/operations/` and - # can be used to track the instance modification. The - # metadata field type is - # [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. - # The response field type is - # [Instance][google.spanner.admin.instance.v1.Instance], if successful. - # - # Authorization requires `spanner.instances.update` permission on - # the resource [name][google.spanner.admin.instance.v1.Instance.name]. - rpc :UpdateInstance, ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest, ::Google::Longrunning::Operation - # Deletes an instance. - # - # Immediately upon completion of the request: - # - # * Billing ceases for all of the instance's reserved resources. - # - # Soon afterward: - # - # * The instance and *all of its databases* immediately and - # irrevocably disappear from the API. All data in the databases - # is permanently deleted. - rpc :DeleteInstance, ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest, ::Google::Protobuf::Empty - # Sets the access control policy on an instance resource. Replaces any - # existing policy. - # - # Authorization requires `spanner.instances.setIamPolicy` on - # [resource][google.iam.v1.SetIamPolicyRequest.resource]. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the access control policy for an instance resource. Returns an empty - # policy if an instance exists but does not have a policy set. - # - # Authorization requires `spanner.instances.getIamPolicy` on - # [resource][google.iam.v1.GetIamPolicyRequest.resource]. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns permissions that the caller has on the specified instance resource. - # - # Attempting this RPC on a non-existent Cloud Spanner instance resource will - # result in a NOT_FOUND error if the user has `spanner.instances.list` - # permission on the containing Google Cloud Project. Otherwise returns an - # empty set of permissions. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Gets information about a particular instance partition. - rpc :GetInstancePartition, ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition - # Creates an instance partition and begins preparing it to be used. The - # returned long-running operation - # can be used to track the progress of preparing the new instance partition. - # The instance partition name is assigned by the caller. If the named - # instance partition already exists, `CreateInstancePartition` returns - # `ALREADY_EXISTS`. - # - # Immediately upon completion of this request: - # - # * The instance partition is readable via the API, with all requested - # attributes but no allocated resources. Its state is `CREATING`. - # - # Until completion of the returned operation: - # - # * Cancelling the operation renders the instance partition immediately - # unreadable via the API. - # * The instance partition can be deleted. - # * All other attempts to modify the instance partition are rejected. - # - # Upon completion of the returned operation: - # - # * Billing for all successfully-allocated resources begins (some types - # may have lower than the requested levels). - # * Databases can start using this instance partition. - # * The instance partition's allocated resource levels are readable via the - # API. - # * The instance partition's state becomes `READY`. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to - # track creation of the instance partition. The - # metadata field type is - # [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. - # The response field type is - # [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if - # successful. - rpc :CreateInstancePartition, ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest, ::Google::Longrunning::Operation - # Deletes an existing instance partition. Requires that the - # instance partition is not used by any database or backup and is not the - # default instance partition of an instance. - # - # Authorization requires `spanner.instancePartitions.delete` permission on - # the resource - # [name][google.spanner.admin.instance.v1.InstancePartition.name]. - rpc :DeleteInstancePartition, ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest, ::Google::Protobuf::Empty - # Updates an instance partition, and begins allocating or releasing resources - # as requested. The returned long-running operation can be used to track the - # progress of updating the instance partition. If the named instance - # partition does not exist, returns `NOT_FOUND`. - # - # Immediately upon completion of this request: - # - # * For resource types for which a decrease in the instance partition's - # allocation has been requested, billing is based on the newly-requested - # level. - # - # Until completion of the returned operation: - # - # * Cancelling the operation sets its metadata's - # [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], - # and begins restoring resources to their pre-request values. The - # operation is guaranteed to succeed at undoing all resource changes, - # after which point it terminates with a `CANCELLED` status. - # * All other attempts to modify the instance partition are rejected. - # * Reading the instance partition via the API continues to give the - # pre-request resource levels. - # - # Upon completion of the returned operation: - # - # * Billing begins for all successfully-allocated resources (some types - # may have lower than the requested levels). - # * All newly-reserved resources are available for serving the instance - # partition's tables. - # * The instance partition's new resource levels are readable via the API. - # - # The returned long-running operation will - # have a name of the format - # `/operations/` and can be used to - # track the instance partition modification. The - # metadata field type is - # [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. - # The response field type is - # [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if - # successful. - # - # Authorization requires `spanner.instancePartitions.update` permission on - # the resource - # [name][google.spanner.admin.instance.v1.InstancePartition.name]. - rpc :UpdateInstancePartition, ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest, ::Google::Longrunning::Operation - # Lists instance partition long-running operations in the given instance. - # An instance partition operation has a name of the form - # `projects//instances//instancePartitions//operations/`. - # The long-running operation - # metadata field type - # `metadata.type_url` describes the type of the metadata. Operations returned - # include those that have completed/failed/canceled within the last 7 days, - # and pending operations. Operations returned are ordered by - # `operation.metadata.value.start_time` in descending order starting from the - # most recently started operation. - # - # Authorization requires `spanner.instancePartitionOperations.list` - # permission on the resource - # [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent]. - rpc :ListInstancePartitionOperations, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse - # Moves an instance to the target instance configuration. You can use the - # returned long-running operation to track - # the progress of moving the instance. - # - # `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of - # the following criteria: - # - # * Is undergoing a move to a different instance configuration - # * Has backups - # * Has an ongoing update - # * Contains any CMEK-enabled databases - # * Is a free trial instance - # - # While the operation is pending: - # - # * All other attempts to modify the instance, including changes to its - # compute capacity, are rejected. - # * The following database and backup admin operations are rejected: - # - # * `DatabaseAdmin.CreateDatabase` - # * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is - # specified in the request.) - # * `DatabaseAdmin.RestoreDatabase` - # * `DatabaseAdmin.CreateBackup` - # * `DatabaseAdmin.CopyBackup` - # - # * Both the source and target instance configurations are subject to - # hourly compute and storage charges. - # * The instance might experience higher read-write latencies and a higher - # transaction abort rate. However, moving an instance doesn't cause any - # downtime. - # - # The returned long-running operation has - # a name of the format - # `/operations/` and can be used to track - # the move instance operation. The - # metadata field type is - # [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. - # The response field type is - # [Instance][google.spanner.admin.instance.v1.Instance], - # if successful. - # Cancelling the operation sets its metadata's - # [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time]. - # Cancellation is not immediate because it involves moving any data - # previously moved to the target instance configuration back to the original - # instance configuration. You can use this operation to track the progress of - # the cancellation. Upon successful completion of the cancellation, the - # operation terminates with `CANCELLED` status. - # - # If not cancelled, upon completion of the returned operation: - # - # * The instance successfully moves to the target instance - # configuration. - # * You are billed for compute and storage in target instance - # configuration. - # - # Authorization requires the `spanner.instances.update` permission on - # the resource [instance][google.spanner.admin.instance.v1.Instance]. - # - # For more details, see - # [Move an instance](https://cloud.google.com/spanner/docs/move-instance). - rpc :MoveInstance, ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/README.md deleted file mode 100644 index ff5b3befac4d..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Spanner Instance Admin V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.rb deleted file mode 100644 index 12175e5866ba..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/common.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - # Encapsulates progress related information for a Cloud Spanner long - # running instance operations. - # @!attribute [rw] progress_percent - # @return [::Integer] - # Percent completion of the operation. - # Values are between 0 and 100 inclusive. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time the request was received. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # If set, the time at which this operation failed or was completed - # successfully. - class OperationProgress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ReplicaSelection identifies replicas with common properties. - # @!attribute [rw] location - # @return [::String] - # Required. Name of the location of the replicas (e.g., "us-central1"). - class ReplicaSelection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicates the expected fulfillment period of an operation. - module FulfillmentPeriod - # Not specified. - FULFILLMENT_PERIOD_UNSPECIFIED = 0 - - # Normal fulfillment period. The operation is expected to complete within - # minutes. - FULFILLMENT_PERIOD_NORMAL = 1 - - # Extended fulfillment period. It can take up to an hour for the operation - # to complete. - FULFILLMENT_PERIOD_EXTENDED = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb deleted file mode 100644 index d59b84381c11..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb +++ /dev/null @@ -1,1561 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module Admin - module Instance - module V1 - # @!attribute [rw] location - # @return [::String] - # The location of the serving resources, e.g., "us-central1". - # @!attribute [rw] type - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaInfo::ReplicaType] - # The type of replica. - # @!attribute [rw] default_leader_location - # @return [::Boolean] - # If true, this location is designated as the default leader location where - # leader replicas are placed. See the [region types - # documentation](https://cloud.google.com/spanner/docs/instances#region_types) - # for more details. - class ReplicaInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates the type of replica. See the [replica types - # documentation](https://cloud.google.com/spanner/docs/replication#replica_types) - # for more details. - module ReplicaType - # Not specified. - TYPE_UNSPECIFIED = 0 - - # Read-write replicas support both reads and writes. These replicas: - # - # * Maintain a full copy of your data. - # * Serve reads. - # * Can vote whether to commit a write. - # * Participate in leadership election. - # * Are eligible to become a leader. - READ_WRITE = 1 - - # Read-only replicas only support reads (not writes). Read-only replicas: - # - # * Maintain a full copy of your data. - # * Serve reads. - # * Do not participate in voting to commit writes. - # * Are not eligible to become a leader. - READ_ONLY = 2 - - # Witness replicas don't support reads but do participate in voting to - # commit writes. Witness replicas: - # - # * Do not maintain a full copy of data. - # * Do not serve reads. - # * Vote whether to commit writes. - # * Participate in leader election but are not eligible to become leader. - WITNESS = 3 - end - end - - # A possible configuration for a Cloud Spanner instance. Configurations - # define the geographic placement of nodes and their replication. - # @!attribute [rw] name - # @return [::String] - # A unique identifier for the instance configuration. Values - # are of the form - # `projects//instanceConfigs/[a-z][-a-z0-9]*`. - # - # User instance configuration must start with `custom-`. - # @!attribute [rw] display_name - # @return [::String] - # The name of this instance configuration as it appears in UIs. - # @!attribute [r] config_type - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig::Type] - # Output only. Whether this instance configuration is a Google-managed or - # user-managed configuration. - # @!attribute [rw] replicas - # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaInfo>] - # The geographic placement of nodes in this instance configuration and their - # replication properties. - # - # To create user-managed configurations, input - # `replicas` must include all replicas in `replicas` of the `base_config` - # and include one or more replicas in the `optional_replicas` of the - # `base_config`. - # @!attribute [r] optional_replicas - # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaInfo>] - # Output only. The available optional replicas to choose from for - # user-managed configurations. Populated for Google-managed configurations. - # @!attribute [rw] base_config - # @return [::String] - # Base configuration name, e.g. projects//instanceConfigs/nam3, - # based on which this configuration is created. Only set for user-managed - # configurations. `base_config` must refer to a configuration of type - # `GOOGLE_MANAGED` in the same project as this configuration. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Cloud Labels are a flexible and lightweight mechanism for organizing cloud - # resources into groups that reflect a customer's organizational needs and - # deployment strategies. Cloud Labels can be used to filter collections of - # resources. They can be used to control how resource metrics are aggregated. - # And they can be used as arguments to policy management rules (e.g. route, - # firewall, load balancing, etc.). - # - # * Label keys must be between 1 and 63 characters long and must conform to - # the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - # * Label values must be between 0 and 63 characters long and must conform - # to the regular expression `[a-z0-9_-]{0,63}`. - # * No more than 64 labels can be associated with a given resource. - # - # See https://goo.gl/xmQnxf for more information on and examples of labels. - # - # If you plan to use labels in your own code, please note that additional - # characters may be allowed in the future. Therefore, you are advised to use - # an internal label representation, such as JSON, which doesn't rely upon - # specific characters being disallowed. For example, representing labels - # as the string: name + "_" + value would prove problematic if we were to - # allow "_" in a future release. - # @!attribute [rw] etag - # @return [::String] - # etag is used for optimistic concurrency control as a way - # to help prevent simultaneous updates of a instance configuration from - # overwriting each other. It is strongly suggested that systems make use of - # the etag in the read-modify-write cycle to perform instance configuration - # updates in order to avoid race conditions: An etag is returned in the - # response which contains instance configurations, and systems are expected - # to put that etag in the request to update instance configuration to ensure - # that their change is applied to the same version of the instance - # configuration. If no etag is provided in the call to update the instance - # configuration, then the existing instance configuration is overwritten - # blindly. - # @!attribute [rw] leader_options - # @return [::Array<::String>] - # Allowed values of the "default_leader" schema option for databases in - # instances that use this instance configuration. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. If true, the instance configuration is being created or - # updated. If false, there are no ongoing operations for the instance - # configuration. - # @!attribute [r] state - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig::State] - # Output only. The current instance configuration state. Applicable only for - # `USER_MANAGED` configurations. - # @!attribute [r] free_instance_availability - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig::FreeInstanceAvailability] - # Output only. Describes whether free instances are available to be created - # in this instance configuration. - # @!attribute [r] quorum_type - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig::QuorumType] - # Output only. The `QuorumType` of the instance configuration. - # @!attribute [r] storage_limit_per_processing_unit - # @return [::Integer] - # Output only. The storage limit in bytes per processing unit. - class InstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of this configuration. - module Type - # Unspecified. - TYPE_UNSPECIFIED = 0 - - # Google-managed configuration. - GOOGLE_MANAGED = 1 - - # User-managed configuration. - USER_MANAGED = 2 - end - - # Indicates the current state of the instance configuration. - module State - # Not specified. - STATE_UNSPECIFIED = 0 - - # The instance configuration is still being created. - CREATING = 1 - - # The instance configuration is fully created and ready to be used to - # create instances. - READY = 2 - end - - # Describes the availability for free instances to be created in an instance - # configuration. - module FreeInstanceAvailability - # Not specified. - FREE_INSTANCE_AVAILABILITY_UNSPECIFIED = 0 - - # Indicates that free instances are available to be created in this - # instance configuration. - AVAILABLE = 1 - - # Indicates that free instances are not supported in this instance - # configuration. - UNSUPPORTED = 2 - - # Indicates that free instances are currently not available to be created - # in this instance configuration. - DISABLED = 3 - - # Indicates that additional free instances cannot be created in this - # instance configuration because the project has reached its limit of free - # instances. - QUOTA_EXCEEDED = 4 - end - - # Indicates the quorum type of this instance configuration. - module QuorumType - # Quorum type not specified. - QUORUM_TYPE_UNSPECIFIED = 0 - - # An instance configuration tagged with `REGION` quorum type forms a write - # quorum in a single region. - REGION = 1 - - # An instance configuration tagged with the `DUAL_REGION` quorum type forms - # a write quorum with exactly two read-write regions in a multi-region - # configuration. - # - # This instance configuration requires failover in the event of - # regional failures. - DUAL_REGION = 2 - - # An instance configuration tagged with the `MULTI_REGION` quorum type - # forms a write quorum from replicas that are spread across more than one - # region in a multi-region configuration. - MULTI_REGION = 3 - end - end - - # ReplicaComputeCapacity describes the amount of server resources that are - # allocated to each replica identified by the replica selection. - # @!attribute [rw] replica_selection - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaSelection] - # Required. Identifies replicas by specified properties. - # All replicas in the selection have the same amount of compute capacity. - # @!attribute [rw] node_count - # @return [::Integer] - # The number of nodes allocated to each replica. - # - # This may be zero in API responses for instances that are not yet in - # state `READY`. - # - # Note: The following fields are mutually exclusive: `node_count`, `processing_units`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] processing_units - # @return [::Integer] - # The number of processing units allocated to each replica. - # - # This may be zero in API responses for instances that are not yet in - # state `READY`. - # - # Note: The following fields are mutually exclusive: `processing_units`, `node_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ReplicaComputeCapacity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Autoscaling configuration for an instance. - # @!attribute [rw] autoscaling_limits - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingLimits] - # Required. Autoscaling limits for an instance. - # @!attribute [rw] autoscaling_targets - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingTargets] - # Required. The autoscaling targets for an instance. - # @!attribute [rw] asymmetric_autoscaling_options - # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption>] - # Optional. Optional asymmetric autoscaling options. - # Replicas matching the replica selection criteria will be autoscaled - # independently from other replicas. The autoscaler will scale the replicas - # based on the utilization of replicas identified by the replica selection. - # Replica selections should not overlap with each other. - # - # Other replicas (those do not match any replica selection) will be - # autoscaled together and will have the same compute capacity allocated to - # them. - class AutoscalingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The autoscaling limits for the instance. Users can define the minimum and - # maximum compute capacity allocated to the instance, and the autoscaler will - # only scale within that range. Users can either use nodes or processing - # units to specify the limits, but should use the same unit to set both the - # min_limit and max_limit. - # @!attribute [rw] min_nodes - # @return [::Integer] - # Minimum number of nodes allocated to the instance. If set, this number - # should be greater than or equal to 1. - # - # Note: The following fields are mutually exclusive: `min_nodes`, `min_processing_units`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] min_processing_units - # @return [::Integer] - # Minimum number of processing units allocated to the instance. If set, - # this number should be multiples of 1000. - # - # Note: The following fields are mutually exclusive: `min_processing_units`, `min_nodes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] max_nodes - # @return [::Integer] - # Maximum number of nodes allocated to the instance. If set, this number - # should be greater than or equal to min_nodes. - # - # Note: The following fields are mutually exclusive: `max_nodes`, `max_processing_units`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] max_processing_units - # @return [::Integer] - # Maximum number of processing units allocated to the instance. If set, - # this number should be multiples of 1000 and be greater than or equal to - # min_processing_units. - # - # Note: The following fields are mutually exclusive: `max_processing_units`, `max_nodes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AutoscalingLimits - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The autoscaling targets for an instance. - # @!attribute [rw] high_priority_cpu_utilization_percent - # @return [::Integer] - # Optional. The target high priority cpu utilization percentage that the - # autoscaler should be trying to achieve for the instance. This number is - # on a scale from 0 (no utilization) to 100 (full utilization). The valid - # range is [10, 90] inclusive. If not specified or set to 0, the autoscaler - # skips scaling based on high priority CPU utilization. - # @!attribute [rw] total_cpu_utilization_percent - # @return [::Integer] - # Optional. The target total CPU utilization percentage that the autoscaler - # should be trying to achieve for the instance. This number is on a scale - # from 0 (no utilization) to 100 (full utilization). The valid range is - # [10, 90] inclusive. If not specified or set to 0, the autoscaler skips - # scaling based on total CPU utilization. If both - # `high_priority_cpu_utilization_percent` and - # `total_cpu_utilization_percent` are specified, the autoscaler provisions - # the larger of the two required compute capacities to satisfy both - # targets. - # @!attribute [rw] storage_utilization_percent - # @return [::Integer] - # Required. The target storage utilization percentage that the autoscaler - # should be trying to achieve for the instance. This number is on a scale - # from 0 (no utilization) to 100 (full utilization). The valid range is - # [10, 99] inclusive. - class AutoscalingTargets - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # AsymmetricAutoscalingOption specifies the scaling of replicas identified by - # the given selection. - # @!attribute [rw] replica_selection - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaSelection] - # Required. Selects the replicas to which this AsymmetricAutoscalingOption - # applies. Only read-only replicas are supported. - # @!attribute [rw] overrides - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides] - # Optional. Overrides applied to the top-level autoscaling configuration - # for the selected replicas. - class AsymmetricAutoscalingOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Overrides the top-level autoscaling configuration for the replicas - # identified by `replica_selection`. All fields in this message are - # optional. Any unspecified fields will use the corresponding values from - # the top-level autoscaling configuration. - # @!attribute [rw] autoscaling_limits - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingLimits] - # Optional. If specified, overrides the min/max limit in the top-level - # autoscaling configuration for the selected replicas. - # @!attribute [rw] autoscaling_target_high_priority_cpu_utilization_percent - # @return [::Integer] - # Optional. If specified, overrides the autoscaling target - # high_priority_cpu_utilization_percent in the top-level autoscaling - # configuration for the selected replicas. - # @!attribute [rw] autoscaling_target_total_cpu_utilization_percent - # @return [::Integer] - # Optional. If specified, overrides the - # autoscaling target `total_cpu_utilization_percent` - # in the top-level autoscaling configuration for the selected replicas. - # @!attribute [rw] disable_high_priority_cpu_autoscaling - # @return [::Boolean] - # Optional. If true, disables high priority CPU autoscaling for the - # selected replicas and ignores - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingTargets#high_priority_cpu_utilization_percent high_priority_cpu_utilization_percent} - # in the top-level autoscaling configuration. - # - # When setting this field to true, setting - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#autoscaling_target_high_priority_cpu_utilization_percent autoscaling_target_high_priority_cpu_utilization_percent} - # field to a non-zero value for the same replica is not supported. - # - # If false, the - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#autoscaling_target_high_priority_cpu_utilization_percent autoscaling_target_high_priority_cpu_utilization_percent} - # field in the replica will be used if set to a non-zero value. - # Otherwise, the - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingTargets#high_priority_cpu_utilization_percent high_priority_cpu_utilization_percent} - # field in the top-level autoscaling configuration will be used. - # - # Setting both - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#disable_high_priority_cpu_autoscaling disable_high_priority_cpu_autoscaling} - # and - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#disable_total_cpu_autoscaling disable_total_cpu_autoscaling} - # to true for the same replica is not supported. - # @!attribute [rw] disable_total_cpu_autoscaling - # @return [::Boolean] - # Optional. If true, disables total CPU autoscaling for the selected - # replicas and ignores - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingTargets#total_cpu_utilization_percent total_cpu_utilization_percent} - # in the top-level autoscaling configuration. - # - # When setting this field to true, setting - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#autoscaling_target_total_cpu_utilization_percent autoscaling_target_total_cpu_utilization_percent} - # field to a non-zero value for the same replica is not supported. - # - # If false, the - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#autoscaling_target_total_cpu_utilization_percent autoscaling_target_total_cpu_utilization_percent} - # field in the replica will be used if set to a non-zero value. - # Otherwise, the - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AutoscalingTargets#total_cpu_utilization_percent total_cpu_utilization_percent} - # field in the top-level autoscaling configuration will be used. - # - # Setting both - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#disable_high_priority_cpu_autoscaling disable_high_priority_cpu_autoscaling} - # and - # {::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig::AsymmetricAutoscalingOption::AutoscalingConfigOverrides#disable_total_cpu_autoscaling disable_total_cpu_autoscaling} - # to true for the same replica is not supported. - class AutoscalingConfigOverrides - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # An isolated set of Cloud Spanner resources on which databases can be hosted. - # @!attribute [rw] name - # @return [::String] - # Required. A unique identifier for the instance, which cannot be changed - # after the instance is created. Values are of the form - # `projects//instances/[a-z][-a-z0-9]*[a-z0-9]`. The final - # segment of the name must be between 2 and 64 characters in length. - # @!attribute [rw] config - # @return [::String] - # Required. The name of the instance's configuration. Values are of the form - # `projects//instanceConfigs/`. See - # also {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} and - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs ListInstanceConfigs}. - # @!attribute [rw] display_name - # @return [::String] - # Required. The descriptive name for this instance as it appears in UIs. - # Must be unique per project and between 4 and 30 characters in length. - # @!attribute [rw] node_count - # @return [::Integer] - # The number of nodes allocated to this instance. At most, one of either - # `node_count` or `processing_units` should be present in the message. - # - # Users can set the `node_count` field to specify the target number of nodes - # allocated to the instance. - # - # If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY` - # field and reflects the current number of nodes allocated to the instance. - # - # This might be zero in API responses for instances that are not yet in the - # `READY` state. - # - # - # For more information, see - # [Compute capacity, nodes, and processing - # units](https://cloud.google.com/spanner/docs/compute-capacity). - # @!attribute [rw] processing_units - # @return [::Integer] - # The number of processing units allocated to this instance. At most, one of - # either `processing_units` or `node_count` should be present in the message. - # - # Users can set the `processing_units` field to specify the target number of - # processing units allocated to the instance. - # - # If autoscaling is enabled, `processing_units` is treated as an - # `OUTPUT_ONLY` field and reflects the current number of processing units - # allocated to the instance. - # - # This might be zero in API responses for instances that are not yet in the - # `READY` state. - # - # - # For more information, see - # [Compute capacity, nodes and processing - # units](https://cloud.google.com/spanner/docs/compute-capacity). - # @!attribute [r] replica_compute_capacity - # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::ReplicaComputeCapacity>] - # Output only. Lists the compute capacity per ReplicaSelection. A replica - # selection identifies a set of replicas with common properties. Replicas - # identified by a ReplicaSelection are scaled with the same compute capacity. - # @!attribute [rw] autoscaling_config - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig] - # Optional. The autoscaling configuration. Autoscaling is enabled if this - # field is set. When autoscaling is enabled, node_count and processing_units - # are treated as OUTPUT_ONLY fields and reflect the current compute capacity - # allocated to the instance. - # @!attribute [r] state - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance::State] - # Output only. The current instance state. For - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance CreateInstance}, - # the state must be either omitted or set to `CREATING`. For - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance UpdateInstance}, - # the state must be either omitted or set to `READY`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Cloud Labels are a flexible and lightweight mechanism for organizing cloud - # resources into groups that reflect a customer's organizational needs and - # deployment strategies. Cloud Labels can be used to filter collections of - # resources. They can be used to control how resource metrics are aggregated. - # And they can be used as arguments to policy management rules (e.g. route, - # firewall, load balancing, etc.). - # - # * Label keys must be between 1 and 63 characters long and must conform to - # the following regular expression: `[a-z][a-z0-9_-]{0,62}`. - # * Label values must be between 0 and 63 characters long and must conform - # to the regular expression `[a-z0-9_-]{0,63}`. - # * No more than 64 labels can be associated with a given resource. - # - # See https://goo.gl/xmQnxf for more information on and examples of labels. - # - # If you plan to use labels in your own code, please note that additional - # characters may be allowed in the future. And so you are advised to use an - # internal label representation, such as JSON, which doesn't rely upon - # specific characters being disallowed. For example, representing labels - # as the string: name + "_" + value would prove problematic if we were to - # allow "_" in a future release. - # @!attribute [rw] instance_type - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance::InstanceType] - # The `InstanceType` of the current instance. - # @!attribute [rw] endpoint_uris - # @return [::Array<::String>] - # Deprecated. This field is not populated. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the instance was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the instance was most recently updated. - # @!attribute [rw] free_instance_metadata - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::FreeInstanceMetadata] - # Free instance metadata. Only populated for free instances. - # @!attribute [rw] edition - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance::Edition] - # Optional. The `Edition` of the current instance. - # @!attribute [rw] default_backup_schedule_type - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance::DefaultBackupScheduleType] - # Optional. Controls the default backup schedule behavior for new databases - # within the instance. By default, a backup schedule is created automatically - # when a new database is created in a new instance. - # - # Note that the `AUTOMATIC` value isn't permitted for free instances, - # as backups and backup schedules aren't supported for free instances. - # - # In the `GetInstance` or `ListInstances` response, if the value of - # `default_backup_schedule_type` isn't set, or set to `NONE`, Spanner doesn't - # create a default backup schedule for new databases in the instance. - class Instance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicates the current state of the instance. - module State - # Not specified. - STATE_UNSPECIFIED = 0 - - # The instance is still being created. Resources may not be - # available yet, and operations such as database creation may not - # work. - CREATING = 1 - - # The instance is fully created and ready to do work such as - # creating databases. - READY = 2 - end - - # The type of this instance. The type can be used to distinguish product - # variants, that can affect aspects like: usage restrictions, quotas and - # billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED - # instances. - module InstanceType - # Not specified. - INSTANCE_TYPE_UNSPECIFIED = 0 - - # Provisioned instances have dedicated resources, standard usage limits and - # support. - PROVISIONED = 1 - - # Free instances provide no guarantee for dedicated resources, - # [node_count, processing_units] should be 0. They come - # with stricter usage limits and limited support. - FREE_INSTANCE = 2 - end - - # The edition selected for this instance. Different editions provide - # different capabilities at different price points. - module Edition - # Edition not specified. - EDITION_UNSPECIFIED = 0 - - # Standard edition. - STANDARD = 1 - - # Enterprise edition. - ENTERPRISE = 2 - - # Enterprise Plus edition. - ENTERPRISE_PLUS = 3 - end - - # Indicates the - # [default backup - # schedule](https://cloud.google.com/spanner/docs/backup#default-backup-schedules) - # behavior for new databases within the instance. - module DefaultBackupScheduleType - # Not specified. - DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED = 0 - - # A default backup schedule isn't created automatically when a new database - # is created in the instance. - NONE = 1 - - # A default backup schedule is created automatically when a new database - # is created in the instance. The default backup schedule creates a full - # backup every 24 hours. These full backups are retained for 7 days. - # You can edit or delete the default backup schedule once it's created. - AUTOMATIC = 2 - end - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs ListInstanceConfigs}. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project for which a list of supported instance - # configurations is requested. Values are of the form - # `projects/`. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of instance configurations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse ListInstanceConfigsResponse}. - class ListInstanceConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs ListInstanceConfigs}. - # @!attribute [rw] instance_configs - # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig>] - # The list of requested instance configurations. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs ListInstanceConfigs} - # call to fetch more of the matching instance configurations. - class ListInstanceConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_config GetInstanceConfigRequest}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the requested instance configuration. Values are of - # the form `projects//instanceConfigs/`. - class GetInstanceConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config CreateInstanceConfig}. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project in which to create the instance - # configuration. Values are of the form `projects/`. - # @!attribute [rw] instance_config_id - # @return [::String] - # Required. The ID of the instance configuration to create. Valid identifiers - # are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 - # characters in length. The `custom-` prefix is required to avoid name - # conflicts with Google-managed configurations. - # @!attribute [rw] instance_config - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] - # Required. The `InstanceConfig` proto of the configuration to create. - # `instance_config.name` must be - # `/instanceConfigs/`. - # `instance_config.base_config` must be a Google-managed configuration name, - # e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3. - # @!attribute [rw] validate_only - # @return [::Boolean] - # An option to validate, but not actually execute, a request, - # and provide the same response. - class CreateInstanceConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config UpdateInstanceConfig}. - # @!attribute [rw] instance_config - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] - # Required. The user instance configuration to update, which must always - # include the instance configuration name. Otherwise, only fields mentioned - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest#update_mask update_mask} - # need be included. To prevent conflicts of concurrent updates, - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig#reconciling etag} can - # be used. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A mask specifying which fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} should be - # updated. The field mask must always be specified; this prevents any future - # fields in {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} - # from being erased accidentally by clients that do not know about them. Only - # display_name and labels can be updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # An option to validate, but not actually execute, a request, - # and provide the same response. - class UpdateInstanceConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_config DeleteInstanceConfig}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the instance configuration to be deleted. - # Values are of the form - # `projects//instanceConfigs/` - # @!attribute [rw] etag - # @return [::String] - # Used for optimistic concurrency control as a way to help prevent - # simultaneous deletes of an instance configuration from overwriting each - # other. If not empty, the API - # only deletes the instance configuration when the etag provided matches the - # current status of the requested instance configuration. Otherwise, deletes - # the instance configuration without checking the current status of the - # requested instance configuration. - # @!attribute [rw] validate_only - # @return [::Boolean] - # An option to validate, but not actually execute, a request, - # and provide the same response. - class DeleteInstanceConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations ListInstanceConfigOperations}. - # @!attribute [rw] parent - # @return [::String] - # Required. The project of the instance configuration operations. - # Values are of the form `projects/`. - # @!attribute [rw] filter - # @return [::String] - # An expression that filters the list of returned operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the Operation are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata} - # is - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first, if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic. However, - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=` \ - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) - # AND` \ - # `(metadata.instance_config.name:custom-config) AND` \ - # `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Return operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigMetadata CreateInstanceConfigMetadata}. - # * The instance configuration name contains "custom-config". - # * The operation started before 2021-03-28T14:50:00Z. - # * The operation resulted in an error. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse ListInstanceConfigOperationsResponse} - # to the same `parent` and with the same `filter`. - class ListInstanceConfigOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations ListInstanceConfigOperations}. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # The list of matching instance configuration long-running operations. Each - # operation's name will be - # prefixed by the name of the instance configuration. The operation's - # metadata field type - # `metadata.type_url` describes the type of the metadata. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations ListInstanceConfigOperations} - # call to fetch more of the matching metadata. - class ListInstanceConfigOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance GetInstance}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the requested instance. Values are of the form - # `projects//instances/`. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # If field_mask is present, specifies the subset of - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields that should be - # returned. If absent, all - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} fields are returned. - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance CreateInstance}. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project in which to create the instance. Values - # are of the form `projects/`. - # @!attribute [rw] instance_id - # @return [::String] - # Required. The ID of the instance to create. Valid identifiers are of the - # form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in - # length. - # @!attribute [rw] instance - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] - # Required. The instance to create. The name may be omitted, but if - # specified must be `/instances/`. - class CreateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances ListInstances}. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project for which a list of instances is - # requested. Values are of the form `projects/`. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of instances to be returned in the response. If 0 or less, defaults - # to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `name` - # * `display_name` - # * `labels.key` where key is the name of a label - # - # Some examples of using filters are: - # - # * `name:*` --> The instance has a name. - # * `name:Howl` --> The instance's name contains the string "howl". - # * `name:HOWL` --> Equivalent to above. - # * `NAME:howl` --> Equivalent to above. - # * `labels.env:*` --> The instance has the label "env". - # * `labels.env:dev` --> The instance has the label "env" and the value of - # the label contains the string "dev". - # * `name:howl labels.env:dev` --> The instance's name contains "howl" and - # it has the label "env" with its value - # containing "dev". - # @!attribute [rw] instance_deadline - # @return [::Google::Protobuf::Timestamp] - # Deadline used while retrieving metadata for instances. - # Instances whose metadata cannot be retrieved within this deadline will be - # added to - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse#unreachable unreachable} - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse ListInstancesResponse}. - class ListInstancesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances ListInstances}. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::Instance>] - # The list of requested instances. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances ListInstances} - # call to fetch more of the matching instances. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # The list of unreachable instances. - # It includes the names of instances whose metadata could not be retrieved - # within - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest#instance_deadline instance_deadline}. - class ListInstancesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance UpdateInstance}. - # @!attribute [rw] instance - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] - # Required. The instance to update, which must always include the instance - # name. Otherwise, only fields mentioned in - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest#field_mask field_mask} - # need be included. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A mask specifying which fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} should be updated. - # The field mask must always be specified; this prevents any future fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::Instance Instance} from being erased - # accidentally by clients that do not know about them. - class UpdateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance DeleteInstance}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the instance to be deleted. Values are of the form - # `projects//instances/` - class DeleteInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance CreateInstance}. - # @!attribute [rw] instance - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] - # The instance being created. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance CreateInstance} - # request was received. - # @!attribute [rw] cancel_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation was cancelled. If set, this operation is - # in the process of undoing itself (which is guaranteed to succeed) and - # cannot be cancelled again. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation failed or was completed successfully. - # @!attribute [rw] expected_fulfillment_period - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::FulfillmentPeriod] - # The expected fulfillment period of this create operation. - class CreateInstanceMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance UpdateInstance}. - # @!attribute [rw] instance - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::Instance] - # The desired end state of the update. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time at which - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance UpdateInstance} - # request was received. - # @!attribute [rw] cancel_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation was cancelled. If set, this operation is - # in the process of undoing itself (which is guaranteed to succeed) and - # cannot be cancelled again. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation failed or was completed successfully. - # @!attribute [rw] expected_fulfillment_period - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::FulfillmentPeriod] - # The expected fulfillment period of this update operation. - class UpdateInstanceMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Free instance specific metadata that is kept even after an instance has been - # upgraded for tracking purposes. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp after which the instance will either be upgraded or - # scheduled for deletion after a grace period. ExpireBehavior is used to - # choose between upgrading or scheduling the free instance for deletion. This - # timestamp is set during the creation of a free instance. - # @!attribute [r] upgrade_time - # @return [::Google::Protobuf::Timestamp] - # Output only. If present, the timestamp at which the free instance was - # upgraded to a provisioned instance. - # @!attribute [rw] expire_behavior - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::FreeInstanceMetadata::ExpireBehavior] - # Specifies the expiration behavior of a free instance. The default of - # ExpireBehavior is `REMOVE_AFTER_GRACE_PERIOD`. This can be modified during - # or after creation, and before expiration. - class FreeInstanceMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Allows users to change behavior when a free instance expires. - module ExpireBehavior - # Not specified. - EXPIRE_BEHAVIOR_UNSPECIFIED = 0 - - # When the free instance expires, upgrade the instance to a provisioned - # instance. - FREE_TO_PROVISIONED = 1 - - # When the free instance expires, disable the instance, and delete it - # after the grace period passes if it has not been upgraded. - REMOVE_AFTER_GRACE_PERIOD = 2 - end - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config CreateInstanceConfig}. - # @!attribute [rw] instance_config - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] - # The target instance configuration end state. - # @!attribute [rw] progress - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::OperationProgress] - # The progress of the - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config CreateInstanceConfig} - # operation. - # @!attribute [rw] cancel_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation was cancelled. - class CreateInstanceConfigMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config UpdateInstanceConfig}. - # @!attribute [rw] instance_config - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig] - # The desired instance configuration after updating. - # @!attribute [rw] progress - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::OperationProgress] - # The progress of the - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config UpdateInstanceConfig} - # operation. - # @!attribute [rw] cancel_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation was cancelled. - class UpdateInstanceConfigMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An isolated set of Cloud Spanner resources that databases can define - # placements on. - # @!attribute [rw] name - # @return [::String] - # Required. A unique identifier for the instance partition. Values are of the - # form - # `projects//instances//instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`. - # The final segment of the name must be between 2 and 64 characters in - # length. An instance partition's name cannot be changed after the instance - # partition is created. - # @!attribute [rw] config - # @return [::String] - # Required. The name of the instance partition's configuration. Values are of - # the form `projects//instanceConfigs/`. See also - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig InstanceConfig} and - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs ListInstanceConfigs}. - # @!attribute [rw] display_name - # @return [::String] - # Required. The descriptive name for this instance partition as it appears in - # UIs. Must be unique per project and between 4 and 30 characters in length. - # @!attribute [rw] node_count - # @return [::Integer] - # The number of nodes allocated to this instance partition. - # - # Users can set the `node_count` field to specify the target number of - # nodes allocated to the instance partition. - # - # This may be zero in API responses for instance partitions that are not - # yet in state `READY`. - # - # Note: The following fields are mutually exclusive: `node_count`, `processing_units`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] processing_units - # @return [::Integer] - # The number of processing units allocated to this instance partition. - # - # Users can set the `processing_units` field to specify the target number - # of processing units allocated to the instance partition. - # - # This might be zero in API responses for instance partitions that are not - # yet in the `READY` state. - # - # Note: The following fields are mutually exclusive: `processing_units`, `node_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] autoscaling_config - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::AutoscalingConfig] - # Optional. The autoscaling configuration. Autoscaling is enabled if this - # field is set. When autoscaling is enabled, fields in compute_capacity are - # treated as OUTPUT_ONLY fields and reflect the current compute capacity - # allocated to the instance partition. - # @!attribute [r] state - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition::State] - # Output only. The current instance partition state. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the instance partition was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the instance partition was most recently - # updated. - # @!attribute [r] referencing_databases - # @return [::Array<::String>] - # Output only. The names of the databases that reference this - # instance partition. Referencing databases should share the parent instance. - # The existence of any referencing database prevents the instance partition - # from being deleted. - # @!attribute [r] referencing_backups - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::String>] - # Output only. Deprecated: This field is not populated. - # Output only. The names of the backups that reference this instance - # partition. Referencing backups should share the parent instance. The - # existence of any referencing backup prevents the instance partition from - # being deleted. - # @!attribute [rw] etag - # @return [::String] - # Used for optimistic concurrency control as a way - # to help prevent simultaneous updates of a instance partition from - # overwriting each other. It is strongly suggested that systems make use of - # the etag in the read-modify-write cycle to perform instance partition - # updates in order to avoid race conditions: An etag is returned in the - # response which contains instance partitions, and systems are expected to - # put that etag in the request to update instance partitions to ensure that - # their change will be applied to the same version of the instance partition. - # If no etag is provided in the call to update instance partition, then the - # existing instance partition is overwritten blindly. - class InstancePartition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates the current state of the instance partition. - module State - # Not specified. - STATE_UNSPECIFIED = 0 - - # The instance partition is still being created. Resources may not be - # available yet, and operations such as creating placements using this - # instance partition may not work. - CREATING = 1 - - # The instance partition is fully created and ready to do work such as - # creating placements and using in databases. - READY = 2 - end - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition CreateInstancePartition}. - # @!attribute [rw] instance_partition - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] - # The instance partition being created. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition CreateInstancePartition} - # request was received. - # @!attribute [rw] cancel_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation was cancelled. If set, this operation is - # in the process of undoing itself (which is guaranteed to succeed) and - # cannot be cancelled again. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation failed or was completed successfully. - class CreateInstancePartitionMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition CreateInstancePartition}. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the instance in which to create the instance - # partition. Values are of the form - # `projects//instances/`. - # @!attribute [rw] instance_partition_id - # @return [::String] - # Required. The ID of the instance partition to create. Valid identifiers are - # of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 - # characters in length. - # @!attribute [rw] instance_partition - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] - # Required. The instance partition to create. The instance_partition.name may - # be omitted, but if specified must be - # `/instancePartitions/`. - class CreateInstancePartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_partition DeleteInstancePartition}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the instance partition to be deleted. - # Values are of the form - # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}` - # @!attribute [rw] etag - # @return [::String] - # Optional. If not empty, the API only deletes the instance partition when - # the etag provided matches the current status of the requested instance - # partition. Otherwise, deletes the instance partition without checking the - # current status of the requested instance partition. - class DeleteInstancePartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_partition GetInstancePartition}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the requested instance partition. Values are of - # the form - # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`. - class GetInstancePartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition UpdateInstancePartition}. - # @!attribute [rw] instance_partition - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] - # Required. The instance partition to update, which must always include the - # instance partition name. Otherwise, only fields mentioned in - # {::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest#field_mask field_mask} - # need be included. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A mask specifying which fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} - # should be updated. The field mask must always be specified; this prevents - # any future fields in - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition InstancePartition} - # from being erased accidentally by clients that do not know about them. - class UpdateInstancePartitionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition UpdateInstancePartition}. - # @!attribute [rw] instance_partition - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition] - # The desired end state of the update. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time at which - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition UpdateInstancePartition} - # request was received. - # @!attribute [rw] cancel_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation was cancelled. If set, this operation is - # in the process of undoing itself (which is guaranteed to succeed) and - # cannot be cancelled again. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation failed or was completed successfully. - class UpdateInstancePartitionMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions ListInstancePartitions}. - # @!attribute [rw] parent - # @return [::String] - # Required. The instance whose instance partitions should be listed. Values - # are of the form `projects//instances/`. Use `{instance} - # = '-'` to list instance partitions for all Instances in a project, e.g., - # `projects/myproject/instances/-`. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of instance partitions to be returned in the response. If 0 or less, - # defaults to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. - # @!attribute [rw] instance_partition_deadline - # @return [::Google::Protobuf::Timestamp] - # Optional. Deadline used while retrieving metadata for instance partitions. - # Instance partitions whose metadata cannot be retrieved within this deadline - # will be added to - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse#unreachable unreachable} - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse ListInstancePartitionsResponse}. - class ListInstancePartitionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions ListInstancePartitions}. - # @!attribute [rw] instance_partitions - # @return [::Array<::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition>] - # The list of requested instancePartitions. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions ListInstancePartitions} - # call to fetch more of the matching instance partitions. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # The list of unreachable instances or instance partitions. - # It includes the names of instances or instance partitions whose metadata - # could not be retrieved within - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest#instance_partition_deadline instance_partition_deadline}. - class ListInstancePartitionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations ListInstancePartitionOperations}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent instance of the instance partition operations. - # Values are of the form `projects//instances/`. - # @!attribute [rw] filter - # @return [::String] - # Optional. An expression that filters the list of returned operations. - # - # A filter expression consists of a field name, a - # comparison operator, and a value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the Operation are eligible for filtering: - # - # * `name` - The name of the long-running operation - # * `done` - False if the operation is in progress, else true. - # * `metadata.@type` - the type of metadata. For example, the type string - # for - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata} - # is - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. - # * `metadata.` - any field in metadata.value. - # `metadata.@type` must be specified first, if filtering on metadata - # fields. - # * `error` - Error associated with the long-running operation. - # * `response.@type` - the type of response. - # * `response.` - any field in response.value. - # - # You can combine multiple expressions by enclosing each expression in - # parentheses. By default, expressions are combined with AND logic. However, - # you can specify AND, OR, and NOT logic explicitly. - # - # Here are a few examples: - # - # * `done:true` - The operation is complete. - # * `(metadata.@type=` \ - # `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) - # AND` \ - # `(metadata.instance_partition.name:custom-instance-partition) AND` \ - # `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ - # `(error:*)` - Return operations where: - # * The operation's metadata type is - # {::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionMetadata CreateInstancePartitionMetadata}. - # * The instance partition name contains "custom-instance-partition". - # * The operation started before 2021-03-28T14:50:00Z. - # * The operation resulted in an error. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Number of operations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # Optional. If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse} - # to the same `parent` and with the same `filter`. - # @!attribute [rw] instance_partition_deadline - # @return [::Google::Protobuf::Timestamp] - # Optional. Deadline used while retrieving metadata for instance partition - # operations. Instance partitions whose operation metadata cannot be - # retrieved within this deadline will be added to - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse#unreachable_instance_partitions unreachable_instance_partitions} - # in - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse ListInstancePartitionOperationsResponse}. - class ListInstancePartitionOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations ListInstancePartitionOperations}. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # The list of matching instance partition long-running operations. Each - # operation's name will be - # prefixed by the instance partition's name. The operation's - # metadata field type - # `metadata.type_url` describes the type of the metadata. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations ListInstancePartitionOperations} - # call to fetch more of the matching metadata. - # @!attribute [rw] unreachable_instance_partitions - # @return [::Array<::String>] - # The list of unreachable instance partitions. - # It includes the names of instance partitions whose operation metadata could - # not be retrieved within - # {::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest#instance_partition_deadline instance_partition_deadline}. - class ListInstancePartitionOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance MoveInstance}. - # @!attribute [rw] name - # @return [::String] - # Required. The instance to move. - # Values are of the form `projects//instances/`. - # @!attribute [rw] target_config - # @return [::String] - # Required. The target instance configuration where to move the instance. - # Values are of the form `projects//instanceConfigs/`. - class MoveInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance MoveInstance}. - class MoveInstanceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata type for the operation returned by - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance MoveInstance}. - # @!attribute [rw] target_config - # @return [::String] - # The target instance configuration where to move the instance. - # Values are of the form `projects//instanceConfigs/`. - # @!attribute [rw] progress - # @return [::Google::Cloud::Spanner::Admin::Instance::V1::OperationProgress] - # The progress of the - # {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance MoveInstance} - # operation. - # {::Google::Cloud::Spanner::Admin::Instance::V1::OperationProgress#progress_percent progress_percent} - # is reset when cancellation is requested. - # @!attribute [rw] cancel_time - # @return [::Google::Protobuf::Timestamp] - # The time at which this operation was cancelled. - class MoveInstanceMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/Gemfile deleted file mode 100644 index 948960481f0c..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-spanner-admin-instance-v1", path: "../" -else - gem "google-cloud-spanner-admin-instance-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance.rb deleted file mode 100644 index 2348ff40f605..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_CreateInstance_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the create_instance call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance. -# -def create_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new - - # Call the create_instance method. - result = client.create_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_InstanceAdmin_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.rb deleted file mode 100644 index c3a27669fdae..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_CreateInstanceConfig_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the create_instance_config call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config. -# -def create_instance_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new - - # Call the create_instance_config method. - result = client.create_instance_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_InstanceAdmin_CreateInstanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.rb deleted file mode 100644 index d21b55b5b196..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/create_instance_partition.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_CreateInstancePartition_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the create_instance_partition call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition. -# -def create_instance_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new - - # Call the create_instance_partition method. - result = client.create_instance_partition request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_InstanceAdmin_CreateInstancePartition_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.rb deleted file mode 100644 index 69724c0b1606..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_DeleteInstance_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the delete_instance call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance. -# -def delete_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new - - # Call the delete_instance method. - result = client.delete_instance request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END spanner_v1_generated_InstanceAdmin_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.rb deleted file mode 100644 index 4a1f618dbf0e..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_DeleteInstanceConfig_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the delete_instance_config call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_config. -# -def delete_instance_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new - - # Call the delete_instance_config method. - result = client.delete_instance_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END spanner_v1_generated_InstanceAdmin_DeleteInstanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.rb deleted file mode 100644 index e0a538237a72..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/delete_instance_partition.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_DeleteInstancePartition_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the delete_instance_partition call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_partition. -# -def delete_instance_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new - - # Call the delete_instance_partition method. - result = client.delete_instance_partition request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END spanner_v1_generated_InstanceAdmin_DeleteInstancePartition_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.rb deleted file mode 100644 index 87a8c0c3714a..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_GetIamPolicy_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the get_iam_policy call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END spanner_v1_generated_InstanceAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance.rb deleted file mode 100644 index a1cca2d1c9dc..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_GetInstance_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the get_instance call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::Instance. - p result -end -# [END spanner_v1_generated_InstanceAdmin_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.rb deleted file mode 100644 index ba21ffeef8ab..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_GetInstanceConfig_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the get_instance_config call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_config. -# -def get_instance_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new - - # Call the get_instance_config method. - result = client.get_instance_config request - - # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. - p result -end -# [END spanner_v1_generated_InstanceAdmin_GetInstanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.rb deleted file mode 100644 index 9654b300ce3f..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/get_instance_partition.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_GetInstancePartition_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the get_instance_partition call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_partition. -# -def get_instance_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new - - # Call the get_instance_partition method. - result = client.get_instance_partition request - - # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. - p result -end -# [END spanner_v1_generated_InstanceAdmin_GetInstancePartition_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.rb deleted file mode 100644 index a43ab8906614..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_config_operations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_ListInstanceConfigOperations_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the list_instance_config_operations call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations. -# -def list_instance_config_operations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new - - # Call the list_instance_config_operations method. - result = client.list_instance_config_operations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Longrunning::Operation. - p item - end -end -# [END spanner_v1_generated_InstanceAdmin_ListInstanceConfigOperations_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.rb deleted file mode 100644 index ebe64e95ead6..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_ListInstanceConfigs_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the list_instance_configs call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs. -# -def list_instance_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new - - # Call the list_instance_configs method. - result = client.list_instance_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig. - p item - end -end -# [END spanner_v1_generated_InstanceAdmin_ListInstanceConfigs_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.rb deleted file mode 100644 index a30b5cab92b1..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partition_operations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_ListInstancePartitionOperations_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the list_instance_partition_operations call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations. -# -def list_instance_partition_operations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new - - # Call the list_instance_partition_operations method. - result = client.list_instance_partition_operations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Longrunning::Operation. - p item - end -end -# [END spanner_v1_generated_InstanceAdmin_ListInstancePartitionOperations_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.rb deleted file mode 100644 index 7a571906f7d2..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instance_partitions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_ListInstancePartitions_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the list_instance_partitions call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions. -# -def list_instance_partitions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new - - # Call the list_instance_partitions method. - result = client.list_instance_partitions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition. - p item - end -end -# [END spanner_v1_generated_InstanceAdmin_ListInstancePartitions_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instances.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instances.rb deleted file mode 100644 index 07eef9c99042..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/list_instances.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_ListInstances_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the list_instances call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances. -# -def list_instances - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new - - # Call the list_instances method. - result = client.list_instances request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::Instance. - p item - end -end -# [END spanner_v1_generated_InstanceAdmin_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/move_instance.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/move_instance.rb deleted file mode 100644 index d1260ae8c95f..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/move_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_MoveInstance_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the move_instance call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance. -# -def move_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new - - # Call the move_instance method. - result = client.move_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_InstanceAdmin_MoveInstance_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.rb deleted file mode 100644 index bf36a3b73464..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_SetIamPolicy_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the set_iam_policy call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END spanner_v1_generated_InstanceAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.rb deleted file mode 100644 index 4f9cc75a5905..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/test_iam_permissions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_TestIamPermissions_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the test_iam_permissions call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END spanner_v1_generated_InstanceAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance.rb deleted file mode 100644 index 16786ba2e441..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_UpdateInstance_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the update_instance call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance. -# -def update_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new - - # Call the update_instance method. - result = client.update_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_InstanceAdmin_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.rb deleted file mode 100644 index 4dcaf1b12731..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_UpdateInstanceConfig_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the update_instance_config call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config. -# -def update_instance_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new - - # Call the update_instance_config method. - result = client.update_instance_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_InstanceAdmin_UpdateInstanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.rb deleted file mode 100644 index 38c1442fe587..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/instance_admin/update_instance_partition.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_InstanceAdmin_UpdateInstancePartition_sync] -require "google/cloud/spanner/admin/instance/v1" - -## -# Snippet for the update_instance_partition call in the InstanceAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition. -# -def update_instance_partition - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new - - # Call the update_instance_partition method. - result = client.update_instance_partition request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END spanner_v1_generated_InstanceAdmin_UpdateInstancePartition_sync] diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/snippet_metadata_google.spanner.admin.instance.v1.json b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/snippet_metadata_google.spanner.admin.instance.v1.json deleted file mode 100644 index d91b8bef1312..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/snippets/snippet_metadata_google.spanner.admin.instance.v1.json +++ /dev/null @@ -1,855 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-spanner-admin-instance-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.spanner.admin.instance.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "spanner_v1_generated_InstanceAdmin_ListInstanceConfigs_sync", - "title": "Snippet for the list_instance_configs call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs.", - "file": "instance_admin/list_instance_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instance_configs", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "ListInstanceConfigs", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_GetInstanceConfig_sync", - "title": "Snippet for the get_instance_config call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_config.", - "file": "instance_admin/get_instance_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance_config", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "GetInstanceConfig", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_CreateInstanceConfig_sync", - "title": "Snippet for the create_instance_config call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config.", - "file": "instance_admin/create_instance_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_instance_config", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "CreateInstanceConfig", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_UpdateInstanceConfig_sync", - "title": "Snippet for the update_instance_config call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config.", - "file": "instance_admin/update_instance_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_instance_config", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "UpdateInstanceConfig", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_DeleteInstanceConfig_sync", - "title": "Snippet for the delete_instance_config call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_config.", - "file": "instance_admin/delete_instance_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_instance_config", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "DeleteInstanceConfig", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstanceConfig", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_ListInstanceConfigOperations_sync", - "title": "Snippet for the list_instance_config_operations call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations.", - "file": "instance_admin/list_instance_config_operations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instance_config_operations", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_config_operations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "ListInstanceConfigOperations", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_ListInstances_sync", - "title": "Snippet for the list_instances call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances.", - "file": "instance_admin/list_instances.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instances", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instances", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "ListInstances", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstances", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_ListInstancePartitions_sync", - "title": "Snippet for the list_instance_partitions call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions.", - "file": "instance_admin/list_instance_partitions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instance_partitions", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partitions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "ListInstancePartitions", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_GetInstance_sync", - "title": "Snippet for the get_instance call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance.", - "file": "instance_admin/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::Instance", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.GetInstance", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_CreateInstance_sync", - "title": "Snippet for the create_instance call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance.", - "file": "instance_admin/create_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_instance", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "CreateInstance", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_UpdateInstance_sync", - "title": "Snippet for the update_instance call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance.", - "file": "instance_admin/update_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_instance", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "UpdateInstance", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_DeleteInstance_sync", - "title": "Snippet for the delete_instance call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance.", - "file": "instance_admin/delete_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_instance", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "DeleteInstance", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#set_iam_policy.", - "file": "instance_admin/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.SetIamPolicy", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_iam_policy.", - "file": "instance_admin/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.GetIamPolicy", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#test_iam_permissions.", - "file": "instance_admin/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.TestIamPermissions", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_GetInstancePartition_sync", - "title": "Snippet for the get_instance_partition call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_partition.", - "file": "instance_admin/get_instance_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance_partition", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#get_instance_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "GetInstancePartition", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.GetInstancePartition", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_CreateInstancePartition_sync", - "title": "Snippet for the create_instance_partition call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition.", - "file": "instance_admin/create_instance_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_instance_partition", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#create_instance_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "CreateInstancePartition", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_DeleteInstancePartition_sync", - "title": "Snippet for the delete_instance_partition call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_partition.", - "file": "instance_admin/delete_instance_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_instance_partition", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#delete_instance_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "DeleteInstancePartition", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstancePartition", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_UpdateInstancePartition_sync", - "title": "Snippet for the update_instance_partition call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition.", - "file": "instance_admin/update_instance_partition.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_instance_partition", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#update_instance_partition", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "UpdateInstancePartition", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_ListInstancePartitionOperations_sync", - "title": "Snippet for the list_instance_partition_operations call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations.", - "file": "instance_admin/list_instance_partition_operations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instance_partition_operations", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#list_instance_partition_operations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "ListInstancePartitionOperations", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_InstanceAdmin_MoveInstance_sync", - "title": "Snippet for the move_instance call in the InstanceAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance.", - "file": "instance_admin/move_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "move_instance", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client#move_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "InstanceAdmin::Client", - "full_name": "::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client" - }, - "method": { - "short_name": "MoveInstance", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance", - "service": { - "short_name": "InstanceAdmin", - "full_name": "google.spanner.admin.instance.v1.InstanceAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_test.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_test.rb deleted file mode 100644 index 78ddb3575d25..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" -require "google/spanner/admin/instance/v1/spanner_instance_admin_services_pb" -require "google/cloud/spanner/admin/instance/v1/instance_admin" - -class ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_test.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_test.rb deleted file mode 100644 index 25bc1dce8a0a..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/spanner/admin/instance/v1/instance_admin" - -class ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", instance: "value1" - assert_equal "projects/value0/instances/value1", path - end - end - - def test_instance_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_config_path project: "value0", instance_config: "value1" - assert_equal "projects/value0/instanceConfigs/value1", path - end - end - - def test_instance_partition_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_partition_path project: "value0", instance: "value1", instance_partition: "value2" - assert_equal "projects/value0/instances/value1/instancePartitions/value2", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_test.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_test.rb deleted file mode 100644 index 9965df42fc4e..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_rest_test.rb +++ /dev/null @@ -1,1269 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" -require "google/cloud/spanner/admin/instance/v1/instance_admin/rest" - - -class ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_instance_configs - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_instance_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_list_instance_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instance_configs_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_instance_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_instance_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_instance_configs ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_instance_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_instance_configs(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_instance_configs_client_stub.call_count - end - end - end - - def test_get_instance_config - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_get_instance_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_config_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_instance_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_instance_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_instance_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_config_client_stub.call_count - end - end - end - - def test_create_instance_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_config_id = "hello world" - instance_config = {} - validate_only = true - - create_instance_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_create_instance_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_instance_config_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_instance_config({ parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_instance_config parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new(parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_instance_config({ parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new(parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_instance_config_client_stub.call_count - end - end - end - - def test_update_instance_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - instance_config = {} - update_mask = {} - validate_only = true - - update_instance_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_update_instance_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_instance_config_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_instance_config({ instance_config: instance_config, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_instance_config instance_config: instance_config, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new(instance_config: instance_config, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_instance_config({ instance_config: instance_config, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new(instance_config: instance_config, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_instance_config_client_stub.call_count - end - end - end - - def test_delete_instance_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_instance_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_delete_instance_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_instance_config_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_instance_config({ name: name, etag: etag, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_instance_config name: name, etag: etag, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new(name: name, etag: etag, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_instance_config({ name: name, etag: etag, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new(name: name, etag: etag, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_instance_config_client_stub.call_count - end - end - end - - def test_list_instance_config_operations - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_instance_config_operations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_list_instance_config_operations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instance_config_operations_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_instance_config_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_instance_config_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_instance_config_operations ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_instance_config_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_instance_config_operations(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_instance_config_operations_client_stub.call_count - end - end - end - - def test_list_instances - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - instance_deadline = {} - - list_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_instances ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_instances(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_instances_client_stub.call_count - end - end - end - - def test_list_instance_partitions - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - instance_partition_deadline = {} - - list_instance_partitions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_list_instance_partitions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instance_partitions_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_instance_partitions({ parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_instance_partitions parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_instance_partitions ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_instance_partitions({ parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_instance_partitions(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_instance_partitions_client_stub.call_count - end - end - end - - def test_get_instance - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - field_mask = {} - - get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_instance({ name: name, field_mask: field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_instance name: name, field_mask: field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_instance ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new(name: name, field_mask: field_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_instance({ name: name, field_mask: field_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_instance(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new(name: name, field_mask: field_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_count - end - end - end - - def test_create_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_id = "hello world" - instance = {} - - create_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_instance parent: parent, instance_id: instance_id, instance: instance do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_instance ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_instance(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_instance_client_stub.call_count - end - end - end - - def test_update_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - instance = {} - field_mask = {} - - update_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_instance({ instance: instance, field_mask: field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_instance instance: instance, field_mask: field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_instance ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new(instance: instance, field_mask: field_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_instance({ instance: instance, field_mask: field_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_instance(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new(instance: instance, field_mask: field_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_instance_client_stub.call_count - end - end - end - - def test_delete_instance - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_instance ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_instance(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_instance_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_get_instance_partition - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_get_instance_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_partition_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_instance_partition({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_instance_partition name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_instance_partition({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_partition_client_stub.call_count - end - end - end - - def test_create_instance_partition - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_partition_id = "hello world" - instance_partition = {} - - create_instance_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_create_instance_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_instance_partition_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_instance_partition({ parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_instance_partition parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new(parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_instance_partition({ parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new(parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_instance_partition_client_stub.call_count - end - end - end - - def test_delete_instance_partition - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_instance_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_delete_instance_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_instance_partition_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_instance_partition({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_instance_partition name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_instance_partition({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_instance_partition_client_stub.call_count - end - end - end - - def test_update_instance_partition - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - instance_partition = {} - field_mask = {} - - update_instance_partition_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_update_instance_partition_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_instance_partition_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_instance_partition({ instance_partition: instance_partition, field_mask: field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_instance_partition instance_partition: instance_partition, field_mask: field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new(instance_partition: instance_partition, field_mask: field_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_instance_partition({ instance_partition: instance_partition, field_mask: field_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new(instance_partition: instance_partition, field_mask: field_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_instance_partition_client_stub.call_count - end - end - end - - def test_list_instance_partition_operations - # Create test objects. - client_result = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - instance_partition_deadline = {} - - list_instance_partition_operations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_list_instance_partition_operations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instance_partition_operations_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_instance_partition_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_instance_partition_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_instance_partition_operations ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_instance_partition_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_instance_partition_operations(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_instance_partition_operations_client_stub.call_count - end - end - end - - def test_move_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - target_config = "hello world" - - move_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::ServiceStub.stub :transcode_move_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, move_instance_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.move_instance({ name: name, target_config: target_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.move_instance name: name, target_config: target_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.move_instance ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new(name: name, target_config: target_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.move_instance({ name: name, target_config: target_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.move_instance(::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new(name: name, target_config: target_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, move_instance_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_test.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_test.rb deleted file mode 100644 index e2faccbfe761..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/google/cloud/spanner/admin/instance/v1/instance_admin_test.rb +++ /dev/null @@ -1,1468 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/spanner/admin/instance/v1/spanner_instance_admin_pb" -require "google/cloud/spanner/admin/instance/v1/instance_admin" - -class ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_instance_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_instance_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_instance_configs, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_instance_configs_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_instance_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_instance_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_instance_configs ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_instance_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_instance_configs(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_instance_configs_client_stub.call_rpc_count - end - end - - def test_get_instance_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance_config, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_config_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_instance_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_instance_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_instance_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_instance_config_client_stub.call_rpc_count - end - end - - def test_create_instance_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_config_id = "hello world" - instance_config = {} - validate_only = true - - create_instance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_instance_config, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["instance_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig), request["instance_config"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_instance_config_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_instance_config({ parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_instance_config parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new(parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_instance_config({ parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest.new(parent: parent, instance_config_id: instance_config_id, instance_config: instance_config, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_instance_config_client_stub.call_rpc_count - end - end - - def test_update_instance_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - instance_config = {} - update_mask = {} - validate_only = true - - update_instance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_instance_config, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig), request["instance_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_instance_config_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_instance_config({ instance_config: instance_config, update_mask: update_mask, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_instance_config instance_config: instance_config, update_mask: update_mask, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new(instance_config: instance_config, update_mask: update_mask, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_instance_config({ instance_config: instance_config, update_mask: update_mask, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest.new(instance_config: instance_config, update_mask: update_mask, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_instance_config_client_stub.call_rpc_count - end - end - - def test_delete_instance_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - validate_only = true - - delete_instance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_instance_config, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_instance_config_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_instance_config({ name: name, etag: etag, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_instance_config name: name, etag: etag, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_instance_config ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new(name: name, etag: etag, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_instance_config({ name: name, etag: etag, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_instance_config(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest.new(name: name, etag: etag, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_instance_config_client_stub.call_rpc_count - end - end - - def test_list_instance_config_operations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_instance_config_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_instance_config_operations, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_instance_config_operations_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_instance_config_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_instance_config_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_instance_config_operations ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_instance_config_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_instance_config_operations(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_instance_config_operations_client_stub.call_rpc_count - end - end - - def test_list_instances - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - instance_deadline = {} - - list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_instances, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["instance_deadline"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_instances_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_instances ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_instances(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, instance_deadline: instance_deadline), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_instances_client_stub.call_rpc_count - end - end - - def test_list_instance_partitions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - instance_partition_deadline = {} - - list_instance_partitions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_instance_partitions, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["instance_partition_deadline"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_instance_partitions_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_instance_partitions({ parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_instance_partitions parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_instance_partitions ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_instance_partitions({ parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_instance_partitions(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_instance_partitions_client_stub.call_rpc_count - end - end - - def test_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::Instance.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - field_mask = {} - - get_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_instance({ name: name, field_mask: field_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_instance name: name, field_mask: field_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_instance ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new(name: name, field_mask: field_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_instance({ name: name, field_mask: field_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_instance(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new(name: name, field_mask: field_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_rpc_count - end - end - - def test_create_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_id = "hello world" - instance = {} - - create_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_instance, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["instance_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::Instance), request["instance"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_instance_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_instance parent: parent, instance_id: instance_id, instance: instance do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_instance ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_instance(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_instance_client_stub.call_rpc_count - end - end - - def test_update_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - instance = {} - field_mask = {} - - update_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_instance, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::Instance), request["instance"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_instance_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_instance({ instance: instance, field_mask: field_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_instance instance: instance, field_mask: field_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_instance ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new(instance: instance, field_mask: field_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_instance({ instance: instance, field_mask: field_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_instance(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new(instance: instance, field_mask: field_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_instance_client_stub.call_rpc_count - end - end - - def test_delete_instance - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_instance, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_instance_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_instance({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_instance name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_instance ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_instance({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_instance(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_instance_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_get_instance_partition - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance_partition, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_partition_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_instance_partition({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_instance_partition name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_instance_partition({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::GetInstancePartitionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_instance_partition_client_stub.call_rpc_count - end - end - - def test_create_instance_partition - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_partition_id = "hello world" - instance_partition = {} - - create_instance_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_instance_partition, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["instance_partition_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition), request["instance_partition"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_instance_partition_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_instance_partition({ parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_instance_partition parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new(parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_instance_partition({ parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstancePartitionRequest.new(parent: parent, instance_partition_id: instance_partition_id, instance_partition: instance_partition), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_instance_partition_client_stub.call_rpc_count - end - end - - def test_delete_instance_partition - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_instance_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_instance_partition, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_instance_partition_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_instance_partition({ name: name, etag: etag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_instance_partition name: name, etag: etag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new(name: name, etag: etag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_instance_partition({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstancePartitionRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_instance_partition_client_stub.call_rpc_count - end - end - - def test_update_instance_partition - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - instance_partition = {} - field_mask = {} - - update_instance_partition_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_instance_partition, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::Admin::Instance::V1::InstancePartition), request["instance_partition"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_instance_partition_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_instance_partition({ instance_partition: instance_partition, field_mask: field_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_instance_partition instance_partition: instance_partition, field_mask: field_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_instance_partition ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new(instance_partition: instance_partition, field_mask: field_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_instance_partition({ instance_partition: instance_partition, field_mask: field_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_instance_partition(::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstancePartitionRequest.new(instance_partition: instance_partition, field_mask: field_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_instance_partition_client_stub.call_rpc_count - end - end - - def test_list_instance_partition_operations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - instance_partition_deadline = {} - - list_instance_partition_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_instance_partition_operations, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["instance_partition_deadline"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_instance_partition_operations_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_instance_partition_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_instance_partition_operations parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_instance_partition_operations ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_instance_partition_operations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_instance_partition_operations(::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancePartitionOperationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token, instance_partition_deadline: instance_partition_deadline), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_instance_partition_operations_client_stub.call_rpc_count - end - end - - def test_move_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - target_config = "hello world" - - move_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :move_instance, name - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["target_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, move_instance_client_stub do - # Create client - c = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.move_instance({ name: name, target_config: target_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.move_instance name: name, target_config: target_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.move_instance ::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new(name: name, target_config: target_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.move_instance({ name: name, target_config: target_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.move_instance(::Google::Cloud::Spanner::Admin::Instance::V1::MoveInstanceRequest.new(name: name, target_config: target_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, move_instance_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/helper.rb b/owl-bot-staging/google-cloud-spanner-admin-instance-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-spanner-admin-instance-v1/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-spanner-v1/.gitignore b/owl-bot-staging/google-cloud-spanner-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/.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-spanner-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-spanner-v1/.repo-metadata.json deleted file mode 100644 index 97ae30d48f35..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "spanner.googleapis.com", - "api_shortname": "spanner", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-v1/latest", - "distribution_name": "google-cloud-spanner-v1", - "is_cloud": true, - "language": "ruby", - "name": "spanner", - "name_pretty": "Cloud Spanner V1 API", - "product_documentation": "https://cloud.google.com/spanner", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details.", - "ruby-cloud-env-prefix": "SPANNER", - "ruby-cloud-product-url": "https://cloud.google.com/spanner", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-spanner-v1/.rubocop.yml b/owl-bot-staging/google-cloud-spanner-v1/.rubocop.yml deleted file mode 100644 index c29064123444..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-spanner-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-spanner-v1.rb" diff --git a/owl-bot-staging/google-cloud-spanner-v1/.toys.rb b/owl-bot-staging/google-cloud-spanner-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/.yardopts b/owl-bot-staging/google-cloud-spanner-v1/.yardopts deleted file mode 100644 index 62c084b2c082..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Spanner V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-spanner-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-spanner-v1/AUTHENTICATION.md deleted file mode 100644 index a4d7b47836ad..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-spanner-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-spanner-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/spanner/v1" - -client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/spanner/v1" - -::Google::Cloud::Spanner::V1::Spanner::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Spanner::V1::Spanner::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-spanner-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/spanner/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Spanner::V1::Spanner::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-spanner-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-spanner-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-spanner-v1/Gemfile b/owl-bot-staging/google-cloud-spanner-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-spanner-v1/LICENSE.md b/owl-bot-staging/google-cloud-spanner-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-spanner-v1/README.md b/owl-bot-staging/google-cloud-spanner-v1/README.md deleted file mode 100644 index 5b7691075d33..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Spanner V1 API - -Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Spanner V1 API. Most users should consider using -the main client gem, -[google-cloud-spanner](https://rubygems.org/gems/google-cloud-spanner). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-spanner-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/spanner.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/spanner/v1" - -client = ::Google::Cloud::Spanner::V1::Spanner::Client.new -request = ::Google::Cloud::Spanner::V1::CreateSessionRequest.new # (request fields as keyword arguments...) -response = client.create_session request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-spanner-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/spanner) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/spanner/v1" -require "logger" - -client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-spanner`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-spanner-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-spanner`. -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-spanner-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-spanner-v1/Rakefile b/owl-bot-staging/google-cloud-spanner-v1/Rakefile deleted file mode 100644 index b18de45c0a03..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-spanner-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SPANNER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SPANNER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SPANNER_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 SPANNER_TEST_PROJECT=test123 SPANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/spanner/v1/spanner/credentials" - ::Google::Cloud::Spanner::V1::Spanner::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SPANNER_PROJECT"] = project - ENV["SPANNER_TEST_PROJECT"] = project - ENV["SPANNER_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-spanner-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-spanner-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-spanner-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-spanner-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-spanner-v1" - header "google-cloud-spanner-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-spanner-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-spanner-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-spanner-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-spanner-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-spanner-v1/gapic_metadata.json deleted file mode 100644 index d200c79b9c14..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/gapic_metadata.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.spanner.v1", - "libraryPackage": "::Google::Cloud::Spanner::V1", - "services": { - "Spanner": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Spanner::V1::Spanner::Client", - "rpcs": { - "CreateSession": { - "methods": [ - "create_session" - ] - }, - "BatchCreateSessions": { - "methods": [ - "batch_create_sessions" - ] - }, - "GetSession": { - "methods": [ - "get_session" - ] - }, - "ListSessions": { - "methods": [ - "list_sessions" - ] - }, - "DeleteSession": { - "methods": [ - "delete_session" - ] - }, - "ExecuteSql": { - "methods": [ - "execute_sql" - ] - }, - "ExecuteStreamingSql": { - "methods": [ - "execute_streaming_sql" - ] - }, - "ExecuteBatchDml": { - "methods": [ - "execute_batch_dml" - ] - }, - "Read": { - "methods": [ - "read" - ] - }, - "StreamingRead": { - "methods": [ - "streaming_read" - ] - }, - "BeginTransaction": { - "methods": [ - "begin_transaction" - ] - }, - "Commit": { - "methods": [ - "commit" - ] - }, - "Rollback": { - "methods": [ - "rollback" - ] - }, - "PartitionQuery": { - "methods": [ - "partition_query" - ] - }, - "PartitionRead": { - "methods": [ - "partition_read" - ] - }, - "BatchWrite": { - "methods": [ - "batch_write" - ] - }, - "FetchCacheUpdate": { - "methods": [ - "fetch_cache_update" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-spanner-v1/google-cloud-spanner-v1.gemspec b/owl-bot-staging/google-cloud-spanner-v1/google-cloud-spanner-v1.gemspec deleted file mode 100644 index 586657250c55..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/google-cloud-spanner-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/spanner/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-spanner-v1" - gem.version = Google::Cloud::Spanner::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service. Note that google-cloud-spanner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-spanner instead. See the readme for more details." - gem.summary = "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google-cloud-spanner-v1.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google-cloud-spanner-v1.rb deleted file mode 100644 index 2f3a79fec01f..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google-cloud-spanner-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/spanner/v1" diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1.rb deleted file mode 100644 index 031d8a0b49f6..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/spanner/v1/spanner" -require "google/cloud/spanner/v1/version" - -module Google - module Cloud - module Spanner - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/spanner/v1" - # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/spanner/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner.rb deleted file mode 100644 index 50df58fbcc65..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/spanner/v1/version" - -require "google/cloud/spanner/v1/spanner/credentials" -require "google/cloud/spanner/v1/spanner/paths" -require "google/cloud/spanner/v1/spanner/client" - -module Google - module Cloud - module Spanner - module V1 - ## - # Cloud Spanner API - # - # The Cloud Spanner API can be used to manage sessions and execute - # transactions on data stored in Cloud Spanner databases. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/spanner/v1/spanner" - # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new - # - module Spanner - end - end - end - end -end - -helper_path = ::File.join __dir__, "spanner", "helpers.rb" -require "google/cloud/spanner/v1/spanner/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb deleted file mode 100644 index 7ef640279aff..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/client.rb +++ /dev/null @@ -1,2747 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/spanner/v1/spanner_pb" - -module Google - module Cloud - module Spanner - module V1 - module Spanner - ## - # Client for the Spanner service. - # - # Cloud Spanner API - # - # The Cloud Spanner API can be used to manage sessions and execute - # transactions on data stored in Cloud Spanner databases. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "spanner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :spanner_stub - - ## - # Configure the Spanner Client class. - # - # See {::Google::Cloud::Spanner::V1::Spanner::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Spanner clients - # ::Google::Cloud::Spanner::V1::Spanner::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Spanner", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_session.timeout = 30.0 - default_config.rpcs.create_session.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.batch_create_sessions.timeout = 60.0 - default_config.rpcs.batch_create_sessions.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.get_session.timeout = 30.0 - default_config.rpcs.get_session.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.list_sessions.timeout = 3600.0 - default_config.rpcs.list_sessions.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.delete_session.timeout = 30.0 - default_config.rpcs.delete_session.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.execute_sql.timeout = 30.0 - default_config.rpcs.execute_sql.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.execute_streaming_sql.timeout = 3600.0 - - default_config.rpcs.execute_batch_dml.timeout = 30.0 - default_config.rpcs.execute_batch_dml.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.read.timeout = 30.0 - default_config.rpcs.read.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.streaming_read.timeout = 3600.0 - - default_config.rpcs.begin_transaction.timeout = 30.0 - default_config.rpcs.begin_transaction.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.commit.timeout = 3600.0 - default_config.rpcs.commit.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.rollback.timeout = 30.0 - default_config.rpcs.rollback.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.partition_query.timeout = 30.0 - default_config.rpcs.partition_query.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.partition_read.timeout = 30.0 - default_config.rpcs.partition_read.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 8] - } - - default_config.rpcs.batch_write.timeout = 3600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Spanner Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Spanner::V1::Spanner::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @spanner_stub.universe_domain - end - - ## - # Create a new Spanner client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Spanner client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/spanner/v1/spanner_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @spanner_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Spanner::V1::Spanner::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @spanner_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @spanner_stub.logger - end - - # Service calls - - ## - # Creates a new session. A session can be used to perform - # transactions that read and/or modify data in a Cloud Spanner database. - # Sessions are meant to be reused for many consecutive - # transactions. - # - # Sessions can only execute one transaction at a time. To execute - # multiple concurrent read-write/write-only transactions, create - # multiple sessions. Note that standalone reads and queries use a - # transaction internally, and count toward the one transaction - # limit. - # - # Active sessions use additional server resources, so it's a good idea to - # delete idle and unneeded sessions. - # Aside from explicit deletes, Cloud Spanner can delete sessions when no - # operations are sent for more than an hour. If a session is deleted, - # requests to it return `NOT_FOUND`. - # - # Idle sessions can be kept alive by sending a trivial SQL query - # periodically, for example, `"SELECT 1"`. - # - # @overload create_session(request, options = nil) - # Pass arguments to `create_session` via a request object, either of type - # {::Google::Cloud::Spanner::V1::CreateSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::CreateSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_session(database: nil, session: nil) - # Pass arguments to `create_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database in which the new session is created. - # @param session [::Google::Cloud::Spanner::V1::Session, ::Hash] - # Required. The session to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::V1::Session] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::V1::Session] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::CreateSessionRequest.new - # - # # Call the create_session method. - # result = client.create_session request - # - # # The returned object is of type Google::Cloud::Spanner::V1::Session. - # p result - # - def create_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::CreateSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :create_session, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates multiple new sessions. - # - # This API can be used to initialize a session cache on the clients. - # See https://goo.gl/TgSFN2 for best practices on session cache management. - # - # @overload batch_create_sessions(request, options = nil) - # Pass arguments to `batch_create_sessions` via a request object, either of type - # {::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_create_sessions(database: nil, session_template: nil, session_count: nil) - # Pass arguments to `batch_create_sessions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database in which the new sessions are created. - # @param session_template [::Google::Cloud::Spanner::V1::Session, ::Hash] - # Parameters to apply to each created session. - # @param session_count [::Integer] - # Required. The number of sessions to be created in this batch call. At least - # one session is created. The API can return fewer than the requested number - # of sessions. If a specific number of sessions are desired, the client can - # make additional calls to `BatchCreateSessions` (adjusting - # {::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest#session_count session_count} - # as necessary). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::V1::BatchCreateSessionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::V1::BatchCreateSessionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::BatchCreateSessionsRequest.new - # - # # Call the batch_create_sessions method. - # result = client.batch_create_sessions request - # - # # The returned object is of type Google::Cloud::Spanner::V1::BatchCreateSessionsResponse. - # p result - # - def batch_create_sessions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_create_sessions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_create_sessions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_sessions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :batch_create_sessions, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a session. Returns `NOT_FOUND` if the session doesn't exist. - # This is mainly useful for determining whether a session is still - # alive. - # - # @overload get_session(request, options = nil) - # Pass arguments to `get_session` via a request object, either of type - # {::Google::Cloud::Spanner::V1::GetSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::GetSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_session(name: nil) - # Pass arguments to `get_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the session to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::V1::Session] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::V1::Session] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::GetSessionRequest.new - # - # # Call the get_session method. - # result = client.get_session request - # - # # The returned object is of type Google::Cloud::Spanner::V1::Session. - # p result - # - def get_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::GetSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :get_session, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all sessions in a given database. - # - # @overload list_sessions(request, options = nil) - # Pass arguments to `list_sessions` via a request object, either of type - # {::Google::Cloud::Spanner::V1::ListSessionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::ListSessionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sessions(database: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_sessions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database in which to list sessions. - # @param page_size [::Integer] - # Number of sessions to be returned in the response. If 0 or less, defaults - # to the server's maximum allowed page size. - # @param page_token [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::V1::ListSessionsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::V1::ListSessionsResponse ListSessionsResponse}. - # @param filter [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `labels.key` where key is the name of a label - # - # Some examples of using filters are: - # - # * `labels.env:*` --> The session has the label "env". - # * `labels.env:dev` --> The session has the label "env" and the value of - # the label contains the string "dev". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::V1::Session>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Spanner::V1::Session>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::ListSessionsRequest.new - # - # # Call the list_sessions method. - # result = client.list_sessions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Spanner::V1::Session. - # p item - # end - # - def list_sessions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ListSessionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sessions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sessions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sessions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :list_sessions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @spanner_stub, :list_sessions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Ends a session, releasing server resources associated with it. This - # asynchronously triggers the cancellation of any operations that are running - # with this session. - # - # @overload delete_session(request, options = nil) - # Pass arguments to `delete_session` via a request object, either of type - # {::Google::Cloud::Spanner::V1::DeleteSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::DeleteSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_session(name: nil) - # Pass arguments to `delete_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the session to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::DeleteSessionRequest.new - # - # # Call the delete_session method. - # result = client.delete_session request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::DeleteSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :delete_session, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Executes an SQL statement, returning all results in a single reply. This - # method can't be used to return a result set larger than 10 MiB; - # if the query yields more data than that, the query fails with - # a `FAILED_PRECONDITION` error. - # - # Operations inside read-write transactions might return `ABORTED`. If - # this occurs, the application should restart the transaction from - # the beginning. See {::Google::Cloud::Spanner::V1::Transaction Transaction} for more - # details. - # - # Larger result sets can be fetched in streaming fashion by calling - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql} - # instead. - # - # The query string can be SQL or [Graph Query Language - # (GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro). - # - # @overload execute_sql(request, options = nil) - # Pass arguments to `execute_sql` via a request object, either of type - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::ExecuteSqlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload execute_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil, last_statement: nil, routing_hint: nil) - # Pass arguments to `execute_sql` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param session [::String] - # Required. The session in which the SQL query should be performed. - # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] - # The transaction to use. - # - # For queries, if none is provided, the default is a temporary read-only - # transaction with strong concurrency. - # - # Standard DML statements require a read-write transaction. To protect - # against replays, single-use transactions are not supported. The caller - # must either supply an existing transaction ID or begin a new transaction. - # - # Partitioned DML requires an existing Partitioned DML transaction ID. - # @param sql [::String] - # Required. The SQL string. - # @param params [::Google::Protobuf::Struct, ::Hash] - # Parameter names and values that bind to placeholders in the SQL string. - # - # A parameter placeholder consists of the `@` character followed by the - # parameter name (for example, `@firstName`). Parameter names must conform - # to the naming requirements of identifiers as specified at - # https://cloud.google.com/spanner/docs/lexical#identifiers. - # - # Parameters can appear anywhere that a literal value is expected. The same - # parameter name can be used more than once, for example: - # - # `"WHERE id > @msg_id AND id < @msg_id + 100"` - # - # It's an error to execute a SQL statement with unbound parameters. - # @param param_types [::Hash{::String => ::Google::Cloud::Spanner::V1::Type, ::Hash}] - # It isn't always possible for Cloud Spanner to infer the right SQL type - # from a JSON value. For example, values of type `BYTES` and values - # of type `STRING` both appear in - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#params params} as JSON strings. - # - # In these cases, you can use `param_types` to specify the exact - # SQL type for some or all of the SQL statement parameters. See the - # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information - # about SQL types. - # @param resume_token [::String] - # If this request is resuming a previously interrupted SQL statement - # execution, `resume_token` should be copied from the last - # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the - # interruption. Doing this enables the new SQL statement execution to resume - # where the last one left off. The rest of the request parameters must - # exactly match the request that yielded this token. - # @param query_mode [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode] - # Used to control the amount of debugging information returned in - # {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#partition_token partition_token} is - # set, {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode query_mode} can only - # be set to - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::NORMAL QueryMode.NORMAL}. - # @param partition_token [::String] - # If present, results are restricted to the specified partition - # previously created using `PartitionQuery`. There must be an exact - # match for the values of fields common to this message and the - # `PartitionQueryRequest` message used to create this `partition_token`. - # @param seqno [::Integer] - # A per-transaction sequence number used to identify this request. This field - # makes each request idempotent such that if the request is received multiple - # times, at most one succeeds. - # - # The sequence number must be monotonically increasing within the - # transaction. If a request arrives for the first time with an out-of-order - # sequence number, the transaction can be aborted. Replays of previously - # handled requests yield the same response as the first execution. - # - # Required for DML statements. Ignored for queries. - # @param query_options [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions, ::Hash] - # Query optimizer configuration to use for the given query. - # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] - # Common options for this request. - # @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash] - # Directed read options for this request. - # @param data_boost_enabled [::Boolean] - # If this is for a partitioned query and this field is set to `true`, the - # request is executed with Spanner Data Boost independent compute resources. - # - # If the field is set to `true` but the request doesn't set - # `partition_token`, the API returns an `INVALID_ARGUMENT` error. - # @param last_statement [::Boolean] - # Optional. If set to `true`, this statement marks the end of the - # transaction. After this statement executes, you must commit or abort the - # transaction. Attempts to execute any other requests against this - # transaction (including reads and queries) are rejected. - # - # For DML statements, setting this option might cause some error reporting to - # be deferred until commit time (for example, validation of unique - # constraints). Given this, successful execution of a DML statement shouldn't - # be assumed until a subsequent `Commit` call completes successfully. - # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] - # Optional. Makes the Spanner requests location-aware if present. - # - # It gives the server hints that can be used to route the request - # to an appropriate server, potentially significantly decreasing latency and - # improving throughput. To achieve improved performance, most fields must be - # filled in with accurate values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::V1::ResultSet] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::V1::ResultSet] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::ExecuteSqlRequest.new - # - # # Call the execute_sql method. - # result = client.execute_sql request - # - # # The returned object is of type Google::Cloud::Spanner::V1::ResultSet. - # p result - # - def execute_sql request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ExecuteSqlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.execute_sql.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.session - header_params["session"] = request.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.execute_sql.timeout, - metadata: metadata, - retry_policy: @config.rpcs.execute_sql.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :execute_sql, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Like {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}, except returns the - # result set as a stream. Unlike - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}, there is no limit on - # the size of the returned result set. However, no individual row in the - # result set can exceed 100 MiB, and no column value can exceed 10 MiB. - # - # The query string can be SQL or [Graph Query Language - # (GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro). - # - # @overload execute_streaming_sql(request, options = nil) - # Pass arguments to `execute_streaming_sql` via a request object, either of type - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::ExecuteSqlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload execute_streaming_sql(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, resume_token: nil, query_mode: nil, partition_token: nil, seqno: nil, query_options: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil, last_statement: nil, routing_hint: nil) - # Pass arguments to `execute_streaming_sql` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param session [::String] - # Required. The session in which the SQL query should be performed. - # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] - # The transaction to use. - # - # For queries, if none is provided, the default is a temporary read-only - # transaction with strong concurrency. - # - # Standard DML statements require a read-write transaction. To protect - # against replays, single-use transactions are not supported. The caller - # must either supply an existing transaction ID or begin a new transaction. - # - # Partitioned DML requires an existing Partitioned DML transaction ID. - # @param sql [::String] - # Required. The SQL string. - # @param params [::Google::Protobuf::Struct, ::Hash] - # Parameter names and values that bind to placeholders in the SQL string. - # - # A parameter placeholder consists of the `@` character followed by the - # parameter name (for example, `@firstName`). Parameter names must conform - # to the naming requirements of identifiers as specified at - # https://cloud.google.com/spanner/docs/lexical#identifiers. - # - # Parameters can appear anywhere that a literal value is expected. The same - # parameter name can be used more than once, for example: - # - # `"WHERE id > @msg_id AND id < @msg_id + 100"` - # - # It's an error to execute a SQL statement with unbound parameters. - # @param param_types [::Hash{::String => ::Google::Cloud::Spanner::V1::Type, ::Hash}] - # It isn't always possible for Cloud Spanner to infer the right SQL type - # from a JSON value. For example, values of type `BYTES` and values - # of type `STRING` both appear in - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#params params} as JSON strings. - # - # In these cases, you can use `param_types` to specify the exact - # SQL type for some or all of the SQL statement parameters. See the - # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information - # about SQL types. - # @param resume_token [::String] - # If this request is resuming a previously interrupted SQL statement - # execution, `resume_token` should be copied from the last - # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the - # interruption. Doing this enables the new SQL statement execution to resume - # where the last one left off. The rest of the request parameters must - # exactly match the request that yielded this token. - # @param query_mode [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode] - # Used to control the amount of debugging information returned in - # {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#partition_token partition_token} is - # set, {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode query_mode} can only - # be set to - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::NORMAL QueryMode.NORMAL}. - # @param partition_token [::String] - # If present, results are restricted to the specified partition - # previously created using `PartitionQuery`. There must be an exact - # match for the values of fields common to this message and the - # `PartitionQueryRequest` message used to create this `partition_token`. - # @param seqno [::Integer] - # A per-transaction sequence number used to identify this request. This field - # makes each request idempotent such that if the request is received multiple - # times, at most one succeeds. - # - # The sequence number must be monotonically increasing within the - # transaction. If a request arrives for the first time with an out-of-order - # sequence number, the transaction can be aborted. Replays of previously - # handled requests yield the same response as the first execution. - # - # Required for DML statements. Ignored for queries. - # @param query_options [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions, ::Hash] - # Query optimizer configuration to use for the given query. - # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] - # Common options for this request. - # @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash] - # Directed read options for this request. - # @param data_boost_enabled [::Boolean] - # If this is for a partitioned query and this field is set to `true`, the - # request is executed with Spanner Data Boost independent compute resources. - # - # If the field is set to `true` but the request doesn't set - # `partition_token`, the API returns an `INVALID_ARGUMENT` error. - # @param last_statement [::Boolean] - # Optional. If set to `true`, this statement marks the end of the - # transaction. After this statement executes, you must commit or abort the - # transaction. Attempts to execute any other requests against this - # transaction (including reads and queries) are rejected. - # - # For DML statements, setting this option might cause some error reporting to - # be deferred until commit time (for example, validation of unique - # constraints). Given this, successful execution of a DML statement shouldn't - # be assumed until a subsequent `Commit` call completes successfully. - # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] - # Optional. Makes the Spanner requests location-aware if present. - # - # It gives the server hints that can be used to route the request - # to an appropriate server, potentially significantly decreasing latency and - # improving throughput. To achieve improved performance, most fields must be - # filled in with accurate values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::ExecuteSqlRequest.new - # - # # Call the execute_streaming_sql method to start streaming. - # output = client.execute_streaming_sql request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Spanner::V1::PartialResultSet - # output.each do |current_response| - # p current_response - # end - # - def execute_streaming_sql request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ExecuteSqlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.execute_streaming_sql.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.session - header_params["session"] = request.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.execute_streaming_sql.timeout, - metadata: metadata, - retry_policy: @config.rpcs.execute_streaming_sql.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :execute_streaming_sql, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Executes a batch of SQL DML statements. This method allows many statements - # to be run with lower latency than submitting them sequentially with - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}. - # - # Statements are executed in sequential order. A request can succeed even if - # a statement fails. The - # {::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse#status ExecuteBatchDmlResponse.status} - # field in the response provides information about the statement that failed. - # Clients must inspect this field to determine whether an error occurred. - # - # Execution stops after the first failed statement; the remaining statements - # are not executed. - # - # @overload execute_batch_dml(request, options = nil) - # Pass arguments to `execute_batch_dml` via a request object, either of type - # {::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload execute_batch_dml(session: nil, transaction: nil, statements: nil, seqno: nil, request_options: nil, last_statements: nil) - # Pass arguments to `execute_batch_dml` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param session [::String] - # Required. The session in which the DML statements should be performed. - # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] - # Required. The transaction to use. Must be a read-write transaction. - # - # To protect against replays, single-use transactions are not supported. The - # caller must either supply an existing transaction ID or begin a new - # transaction. - # @param statements [::Array<::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement, ::Hash>] - # Required. The list of statements to execute in this batch. Statements are - # executed serially, such that the effects of statement `i` are visible to - # statement `i+1`. Each statement must be a DML statement. Execution stops at - # the first failed statement; the remaining statements are not executed. - # - # Callers must provide at least one statement. - # @param seqno [::Integer] - # Required. A per-transaction sequence number used to identify this request. - # This field makes each request idempotent such that if the request is - # received multiple times, at most one succeeds. - # - # The sequence number must be monotonically increasing within the - # transaction. If a request arrives for the first time with an out-of-order - # sequence number, the transaction might be aborted. Replays of previously - # handled requests yield the same response as the first execution. - # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] - # Common options for this request. - # @param last_statements [::Boolean] - # Optional. If set to `true`, this request marks the end of the transaction. - # After these statements execute, you must commit or abort the transaction. - # Attempts to execute any other requests against this transaction - # (including reads and queries) are rejected. - # - # Setting this option might cause some error reporting to be deferred until - # commit time (for example, validation of unique constraints). Given this, - # successful execution of statements shouldn't be assumed until a subsequent - # `Commit` call completes successfully. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest.new - # - # # Call the execute_batch_dml method. - # result = client.execute_batch_dml request - # - # # The returned object is of type Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse. - # p result - # - def execute_batch_dml request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.execute_batch_dml.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.session - header_params["session"] = request.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.execute_batch_dml.timeout, - metadata: metadata, - retry_policy: @config.rpcs.execute_batch_dml.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :execute_batch_dml, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Reads rows from the database using key lookups and scans, as a - # simple key/value style alternative to - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}. This method can't be - # used to return a result set larger than 10 MiB; if the read matches more - # data than that, the read fails with a `FAILED_PRECONDITION` - # error. - # - # Reads inside read-write transactions might return `ABORTED`. If - # this occurs, the application should restart the transaction from - # the beginning. See {::Google::Cloud::Spanner::V1::Transaction Transaction} for more - # details. - # - # Larger result sets can be yielded in streaming fashion by calling - # {::Google::Cloud::Spanner::V1::Spanner::Client#streaming_read StreamingRead} instead. - # - # @overload read(request, options = nil) - # Pass arguments to `read` via a request object, either of type - # {::Google::Cloud::Spanner::V1::ReadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::ReadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil, order_by: nil, lock_hint: nil, routing_hint: nil) - # Pass arguments to `read` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param session [::String] - # Required. The session in which the read should be performed. - # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] - # The transaction to use. If none is provided, the default is a - # temporary read-only transaction with strong concurrency. - # @param table [::String] - # Required. The name of the table in the database to be read. - # @param index [::String] - # If non-empty, the name of an index on - # {::Google::Cloud::Spanner::V1::ReadRequest#table table}. This index is used instead of - # the table primary key when interpreting - # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} and sorting result rows. - # See {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} for further - # information. - # @param columns [::Array<::String>] - # Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be - # returned for each row matching this request. - # @param key_set [::Google::Cloud::Spanner::V1::KeySet, ::Hash] - # Required. `key_set` identifies the rows to be yielded. `key_set` names the - # primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to - # be yielded, unless {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present. - # If {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present, then - # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} instead names index keys - # in {::Google::Cloud::Spanner::V1::ReadRequest#index index}. - # - # If the {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} - # field is empty, rows are yielded in table primary key order (if - # {::Google::Cloud::Spanner::V1::ReadRequest#index index} is empty) or index key order - # (if {::Google::Cloud::Spanner::V1::ReadRequest#index index} is non-empty). If the - # {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} field - # isn't empty, rows are yielded in an unspecified order. - # - # It isn't an error for the `key_set` to name rows that don't - # exist in the database. Read yields nothing for nonexistent rows. - # @param limit [::Integer] - # If greater than zero, only the first `limit` rows are yielded. If `limit` - # is zero, the default is no limit. A limit can't be specified if - # `partition_token` is set. - # @param resume_token [::String] - # If this request is resuming a previously interrupted read, - # `resume_token` should be copied from the last - # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the - # interruption. Doing this enables the new read to resume where the last read - # left off. The rest of the request parameters must exactly match the request - # that yielded this token. - # @param partition_token [::String] - # If present, results are restricted to the specified partition - # previously created using `PartitionRead`. There must be an exact - # match for the values of fields common to this message and the - # PartitionReadRequest message used to create this partition_token. - # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] - # Common options for this request. - # @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash] - # Directed read options for this request. - # @param data_boost_enabled [::Boolean] - # If this is for a partitioned read and this field is set to `true`, the - # request is executed with Spanner Data Boost independent compute resources. - # - # If the field is set to `true` but the request doesn't set - # `partition_token`, the API returns an `INVALID_ARGUMENT` error. - # @param order_by [::Google::Cloud::Spanner::V1::ReadRequest::OrderBy] - # Optional. Order for the returned rows. - # - # By default, Spanner returns result rows in primary key order except for - # PartitionRead requests. For applications that don't require rows to be - # returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting - # `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval, - # resulting in lower latencies in certain cases (for example, bulk point - # lookups). - # @param lock_hint [::Google::Cloud::Spanner::V1::ReadRequest::LockHint] - # Optional. Lock Hint for the request, it can only be used with read-write - # transactions. - # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] - # Optional. Makes the Spanner requests location-aware if present. - # - # It gives the server hints that can be used to route the request - # to an appropriate server, potentially significantly decreasing latency and - # improving throughput. To achieve improved performance, most fields must be - # filled in with accurate values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::V1::ResultSet] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::V1::ResultSet] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::ReadRequest.new - # - # # Call the read method. - # result = client.read request - # - # # The returned object is of type Google::Cloud::Spanner::V1::ResultSet. - # p result - # - def read request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ReadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.read.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.session - header_params["session"] = request.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.read.timeout, - metadata: metadata, - retry_policy: @config.rpcs.read.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :read, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Like {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, except returns the result set - # as a stream. Unlike {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, there is no - # limit on the size of the returned result set. However, no individual row in - # the result set can exceed 100 MiB, and no column value can exceed - # 10 MiB. - # - # @overload streaming_read(request, options = nil) - # Pass arguments to `streaming_read` via a request object, either of type - # {::Google::Cloud::Spanner::V1::ReadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::ReadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload streaming_read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, limit: nil, resume_token: nil, partition_token: nil, request_options: nil, directed_read_options: nil, data_boost_enabled: nil, order_by: nil, lock_hint: nil, routing_hint: nil) - # Pass arguments to `streaming_read` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param session [::String] - # Required. The session in which the read should be performed. - # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] - # The transaction to use. If none is provided, the default is a - # temporary read-only transaction with strong concurrency. - # @param table [::String] - # Required. The name of the table in the database to be read. - # @param index [::String] - # If non-empty, the name of an index on - # {::Google::Cloud::Spanner::V1::ReadRequest#table table}. This index is used instead of - # the table primary key when interpreting - # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} and sorting result rows. - # See {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} for further - # information. - # @param columns [::Array<::String>] - # Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be - # returned for each row matching this request. - # @param key_set [::Google::Cloud::Spanner::V1::KeySet, ::Hash] - # Required. `key_set` identifies the rows to be yielded. `key_set` names the - # primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to - # be yielded, unless {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present. - # If {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present, then - # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} instead names index keys - # in {::Google::Cloud::Spanner::V1::ReadRequest#index index}. - # - # If the {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} - # field is empty, rows are yielded in table primary key order (if - # {::Google::Cloud::Spanner::V1::ReadRequest#index index} is empty) or index key order - # (if {::Google::Cloud::Spanner::V1::ReadRequest#index index} is non-empty). If the - # {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} field - # isn't empty, rows are yielded in an unspecified order. - # - # It isn't an error for the `key_set` to name rows that don't - # exist in the database. Read yields nothing for nonexistent rows. - # @param limit [::Integer] - # If greater than zero, only the first `limit` rows are yielded. If `limit` - # is zero, the default is no limit. A limit can't be specified if - # `partition_token` is set. - # @param resume_token [::String] - # If this request is resuming a previously interrupted read, - # `resume_token` should be copied from the last - # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the - # interruption. Doing this enables the new read to resume where the last read - # left off. The rest of the request parameters must exactly match the request - # that yielded this token. - # @param partition_token [::String] - # If present, results are restricted to the specified partition - # previously created using `PartitionRead`. There must be an exact - # match for the values of fields common to this message and the - # PartitionReadRequest message used to create this partition_token. - # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] - # Common options for this request. - # @param directed_read_options [::Google::Cloud::Spanner::V1::DirectedReadOptions, ::Hash] - # Directed read options for this request. - # @param data_boost_enabled [::Boolean] - # If this is for a partitioned read and this field is set to `true`, the - # request is executed with Spanner Data Boost independent compute resources. - # - # If the field is set to `true` but the request doesn't set - # `partition_token`, the API returns an `INVALID_ARGUMENT` error. - # @param order_by [::Google::Cloud::Spanner::V1::ReadRequest::OrderBy] - # Optional. Order for the returned rows. - # - # By default, Spanner returns result rows in primary key order except for - # PartitionRead requests. For applications that don't require rows to be - # returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting - # `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval, - # resulting in lower latencies in certain cases (for example, bulk point - # lookups). - # @param lock_hint [::Google::Cloud::Spanner::V1::ReadRequest::LockHint] - # Optional. Lock Hint for the request, it can only be used with read-write - # transactions. - # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] - # Optional. Makes the Spanner requests location-aware if present. - # - # It gives the server hints that can be used to route the request - # to an appropriate server, potentially significantly decreasing latency and - # improving throughput. To achieve improved performance, most fields must be - # filled in with accurate values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Spanner::V1::PartialResultSet>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::ReadRequest.new - # - # # Call the streaming_read method to start streaming. - # output = client.streaming_read request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Spanner::V1::PartialResultSet - # output.each do |current_response| - # p current_response - # end - # - def streaming_read request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::ReadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.streaming_read.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.session - header_params["session"] = request.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.streaming_read.timeout, - metadata: metadata, - retry_policy: @config.rpcs.streaming_read.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :streaming_read, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Begins a new transaction. This step can often be skipped: - # {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} and - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} can begin a new transaction as a - # side-effect. - # - # @overload begin_transaction(request, options = nil) - # Pass arguments to `begin_transaction` via a request object, either of type - # {::Google::Cloud::Spanner::V1::BeginTransactionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::BeginTransactionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload begin_transaction(session: nil, options: nil, request_options: nil, mutation_key: nil, routing_hint: nil) - # Pass arguments to `begin_transaction` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param session [::String] - # Required. The session in which the transaction runs. - # @param options [::Google::Cloud::Spanner::V1::TransactionOptions, ::Hash] - # Required. Options for the new transaction. - # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] - # Common options for this request. - # Priority is ignored for this request. Setting the priority in this - # `request_options` struct doesn't do anything. To set the priority for a - # transaction, set it on the reads and writes that are part of this - # transaction instead. - # @param mutation_key [::Google::Cloud::Spanner::V1::Mutation, ::Hash] - # Optional. Required for read-write transactions on a multiplexed session - # that commit mutations but don't perform any reads or queries. You must - # randomly select one of the mutations from the mutation set and send it as a - # part of this request. - # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] - # Optional. Makes the Spanner requests location-aware if present. - # - # It gives the server hints that can be used to route the request - # to an appropriate server, potentially significantly decreasing latency and - # improving throughput. To achieve improved performance, most fields must be - # filled in with accurate values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::V1::Transaction] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::V1::Transaction] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::BeginTransactionRequest.new - # - # # Call the begin_transaction method. - # result = client.begin_transaction request - # - # # The returned object is of type Google::Cloud::Spanner::V1::Transaction. - # p result - # - def begin_transaction request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::BeginTransactionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.begin_transaction.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.session - header_params["session"] = request.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.begin_transaction.timeout, - metadata: metadata, - retry_policy: @config.rpcs.begin_transaction.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :begin_transaction, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Commits a transaction. The request includes the mutations to be - # applied to rows in the database. - # - # `Commit` might return an `ABORTED` error. This can occur at any time; - # commonly, the cause is conflicts with concurrent - # transactions. However, it can also happen for a variety of other - # reasons. If `Commit` returns `ABORTED`, the caller should retry - # the transaction from the beginning, reusing the same session. - # - # On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, - # for example, if the client job experiences a 1+ hour networking failure. - # At that point, Cloud Spanner has lost track of the transaction outcome and - # we recommend that you perform another read from the database to see the - # state of things as they are now. - # - # @overload commit(request, options = nil) - # Pass arguments to `commit` via a request object, either of type - # {::Google::Cloud::Spanner::V1::CommitRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::CommitRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload commit(session: nil, transaction_id: nil, single_use_transaction: nil, mutations: nil, return_commit_stats: nil, max_commit_delay: nil, request_options: nil, precommit_token: nil, routing_hint: nil) - # Pass arguments to `commit` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param session [::String] - # Required. The session in which the transaction to be committed is running. - # @param transaction_id [::String] - # Commit a previously-started transaction. - # - # Note: The following parameters are mutually exclusive: `transaction_id`, `single_use_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param single_use_transaction [::Google::Cloud::Spanner::V1::TransactionOptions, ::Hash] - # Execute mutations in a temporary transaction. Note that unlike - # commit of a previously-started transaction, commit with a - # temporary transaction is non-idempotent. That is, if the - # `CommitRequest` is sent to Cloud Spanner more than once (for - # instance, due to retries in the application, or in the - # transport library), it's possible that the mutations are - # executed more than once. If this is undesirable, use - # {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction} and - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} instead. - # - # Note: The following parameters are mutually exclusive: `single_use_transaction`, `transaction_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param mutations [::Array<::Google::Cloud::Spanner::V1::Mutation, ::Hash>] - # The mutations to be executed when this transaction commits. All - # mutations are applied atomically, in the order they appear in - # this list. - # @param return_commit_stats [::Boolean] - # If `true`, then statistics related to the transaction is included in - # the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. - # Default value is `false`. - # @param max_commit_delay [::Google::Protobuf::Duration, ::Hash] - # Optional. The amount of latency this request is configured to incur in - # order to improve throughput. If this field isn't set, Spanner assumes - # requests are relatively latency sensitive and automatically determines an - # appropriate delay time. You can specify a commit delay value between 0 and - # 500 ms. - # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] - # Common options for this request. - # @param precommit_token [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken, ::Hash] - # Optional. If the read-write transaction was executed on a multiplexed - # session, then you must include the precommit token with the highest - # sequence number received in this transaction attempt. Failing to do so - # results in a `FailedPrecondition` error. - # @param routing_hint [::Google::Cloud::Spanner::V1::RoutingHint, ::Hash] - # Optional. Makes the Spanner requests location-aware if present. - # - # It gives the server hints that can be used to route the request - # to an appropriate server, potentially significantly decreasing latency and - # improving throughput. To achieve improved performance, most fields must be - # filled in with accurate values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::V1::CommitResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::V1::CommitResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::CommitRequest.new - # - # # Call the commit method. - # result = client.commit request - # - # # The returned object is of type Google::Cloud::Spanner::V1::CommitResponse. - # p result - # - def commit request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::CommitRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.commit.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.session - header_params["session"] = request.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.commit.timeout, - metadata: metadata, - retry_policy: @config.rpcs.commit.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :commit, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Rolls back a transaction, releasing any locks it holds. It's a good - # idea to call this for any transaction that includes one or more - # {::Google::Cloud::Spanner::V1::Spanner::Client#read Read} or - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} requests and ultimately - # decides not to commit. - # - # `Rollback` returns `OK` if it successfully aborts the transaction, the - # transaction was already aborted, or the transaction isn't - # found. `Rollback` never returns `ABORTED`. - # - # @overload rollback(request, options = nil) - # Pass arguments to `rollback` via a request object, either of type - # {::Google::Cloud::Spanner::V1::RollbackRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::RollbackRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rollback(session: nil, transaction_id: nil) - # Pass arguments to `rollback` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param session [::String] - # Required. The session in which the transaction to roll back is running. - # @param transaction_id [::String] - # Required. The transaction to roll back. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::RollbackRequest.new - # - # # Call the rollback method. - # result = client.rollback request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def rollback request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::RollbackRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rollback.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.session - header_params["session"] = request.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.rollback.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rollback.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :rollback, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a set of partition tokens that can be used to execute a query - # operation in parallel. Each of the returned partition tokens can be used - # by {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql} to - # specify a subset of the query result to read. The same session and - # read-only transaction must be used by the `PartitionQueryRequest` used to - # create the partition tokens and the `ExecuteSqlRequests` that use the - # partition tokens. - # - # Partition tokens become invalid when the session used to create them - # is deleted, is idle for too long, begins a new transaction, or becomes too - # old. When any of these happen, it isn't possible to resume the query, and - # the whole operation must be restarted from the beginning. - # - # @overload partition_query(request, options = nil) - # Pass arguments to `partition_query` via a request object, either of type - # {::Google::Cloud::Spanner::V1::PartitionQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::PartitionQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload partition_query(session: nil, transaction: nil, sql: nil, params: nil, param_types: nil, partition_options: nil) - # Pass arguments to `partition_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param session [::String] - # Required. The session used to create the partitions. - # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] - # Read-only snapshot transactions are supported, read and write and - # single-use transactions are not. - # @param sql [::String] - # Required. The query request to generate partitions for. The request fails - # if the query isn't root partitionable. For a query to be root - # partitionable, it needs to satisfy a few conditions. For example, if the - # query execution plan contains a distributed union operator, then it must be - # the first operator in the plan. For more information about other - # conditions, see [Read data in - # parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). - # - # The query request must not contain DML commands, such as `INSERT`, - # `UPDATE`, or `DELETE`. Use - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql `ExecuteStreamingSql`} with - # a `PartitionedDml` transaction for large, partition-friendly DML - # operations. - # @param params [::Google::Protobuf::Struct, ::Hash] - # Optional. Parameter names and values that bind to placeholders in the SQL - # string. - # - # A parameter placeholder consists of the `@` character followed by the - # parameter name (for example, `@firstName`). Parameter names can contain - # letters, numbers, and underscores. - # - # Parameters can appear anywhere that a literal value is expected. The same - # parameter name can be used more than once, for example: - # - # `"WHERE id > @msg_id AND id < @msg_id + 100"` - # - # It's an error to execute a SQL statement with unbound parameters. - # @param param_types [::Hash{::String => ::Google::Cloud::Spanner::V1::Type, ::Hash}] - # Optional. It isn't always possible for Cloud Spanner to infer the right SQL - # type from a JSON value. For example, values of type `BYTES` and values of - # type `STRING` both appear in - # {::Google::Cloud::Spanner::V1::PartitionQueryRequest#params params} as JSON strings. - # - # In these cases, `param_types` can be used to specify the exact - # SQL type for some or all of the SQL query parameters. See the - # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information - # about SQL types. - # @param partition_options [::Google::Cloud::Spanner::V1::PartitionOptions, ::Hash] - # Additional options that affect how many partitions are created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::V1::PartitionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::V1::PartitionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::PartitionQueryRequest.new - # - # # Call the partition_query method. - # result = client.partition_query request - # - # # The returned object is of type Google::Cloud::Spanner::V1::PartitionResponse. - # p result - # - def partition_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::PartitionQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.partition_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.session - header_params["session"] = request.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.partition_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.partition_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :partition_query, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a set of partition tokens that can be used to execute a read - # operation in parallel. Each of the returned partition tokens can be used - # by {::Google::Cloud::Spanner::V1::Spanner::Client#streaming_read StreamingRead} to specify a - # subset of the read result to read. The same session and read-only - # transaction must be used by the `PartitionReadRequest` used to create the - # partition tokens and the `ReadRequests` that use the partition tokens. - # There are no ordering guarantees on rows returned among the returned - # partition tokens, or even within each individual `StreamingRead` call - # issued with a `partition_token`. - # - # Partition tokens become invalid when the session used to create them - # is deleted, is idle for too long, begins a new transaction, or becomes too - # old. When any of these happen, it isn't possible to resume the read, and - # the whole operation must be restarted from the beginning. - # - # @overload partition_read(request, options = nil) - # Pass arguments to `partition_read` via a request object, either of type - # {::Google::Cloud::Spanner::V1::PartitionReadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::PartitionReadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload partition_read(session: nil, transaction: nil, table: nil, index: nil, columns: nil, key_set: nil, partition_options: nil) - # Pass arguments to `partition_read` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param session [::String] - # Required. The session used to create the partitions. - # @param transaction [::Google::Cloud::Spanner::V1::TransactionSelector, ::Hash] - # Read only snapshot transactions are supported, read/write and single use - # transactions are not. - # @param table [::String] - # Required. The name of the table in the database to be read. - # @param index [::String] - # If non-empty, the name of an index on - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table}. This index is used - # instead of the table primary key when interpreting - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} and sorting - # result rows. See {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} - # for further information. - # @param columns [::Array<::String>] - # The columns of {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be - # returned for each row matching this request. - # @param key_set [::Google::Cloud::Spanner::V1::KeySet, ::Hash] - # Required. `key_set` identifies the rows to be yielded. `key_set` names the - # primary keys of the rows in - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be yielded, unless - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present. If - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present, then - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} instead names - # index keys in {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index}. - # - # It isn't an error for the `key_set` to name rows that don't - # exist in the database. Read yields nothing for nonexistent rows. - # @param partition_options [::Google::Cloud::Spanner::V1::PartitionOptions, ::Hash] - # Additional options that affect how many partitions are created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Spanner::V1::PartitionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Spanner::V1::PartitionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::PartitionReadRequest.new - # - # # Call the partition_read method. - # result = client.partition_read request - # - # # The returned object is of type Google::Cloud::Spanner::V1::PartitionResponse. - # p result - # - def partition_read request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::PartitionReadRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.partition_read.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.session - header_params["session"] = request.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.partition_read.timeout, - metadata: metadata, - retry_policy: @config.rpcs.partition_read.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :partition_read, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Batches the supplied mutation groups in a collection of efficient - # transactions. All mutations in a group are committed atomically. However, - # mutations across groups can be committed non-atomically in an unspecified - # order and thus, they must be independent of each other. Partial failure is - # possible, that is, some groups might have been committed successfully, - # while some might have failed. The results of individual batches are - # streamed into the response as the batches are applied. - # - # `BatchWrite` requests are not replay protected, meaning that each mutation - # group can be applied more than once. Replays of non-idempotent mutations - # can have undesirable effects. For example, replays of an insert mutation - # can produce an already exists error or if you use generated or commit - # timestamp-based keys, it can result in additional rows being added to the - # mutation's table. We recommend structuring your mutation groups to be - # idempotent to avoid this issue. - # - # @overload batch_write(request, options = nil) - # Pass arguments to `batch_write` via a request object, either of type - # {::Google::Cloud::Spanner::V1::BatchWriteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::BatchWriteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_write(session: nil, request_options: nil, mutation_groups: nil, exclude_txn_from_change_streams: nil) - # Pass arguments to `batch_write` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param session [::String] - # Required. The session in which the batch request is to be run. - # @param request_options [::Google::Cloud::Spanner::V1::RequestOptions, ::Hash] - # Common options for this request. - # @param mutation_groups [::Array<::Google::Cloud::Spanner::V1::BatchWriteRequest::MutationGroup, ::Hash>] - # Required. The groups of mutations to be applied. - # @param exclude_txn_from_change_streams [::Boolean] - # Optional. If you don't set the `exclude_txn_from_change_streams` option or - # if it's set to `false`, then any change streams monitoring columns modified - # by transactions will capture the updates made within that transaction. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::BatchWriteResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Spanner::V1::BatchWriteResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::BatchWriteRequest.new - # - # # Call the batch_write method to start streaming. - # output = client.batch_write request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Spanner::V1::BatchWriteResponse - # output.each do |current_response| - # p current_response - # end - # - def batch_write request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::BatchWriteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_write.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.session - header_params["session"] = request.session - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_write.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_write.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :batch_write, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves a cache update for a given database. - # - # This RPC can be used to warm up the client cache by fetching key recipes - # and server information for a given database. It is recommended to call - # this RPC at the beginning of the client's lifecycle, prior to any other - # data plane operations. - # - # The cache update is returned as a stream because the response can be too - # large to fit into a single `CacheUpdate` message. - # - # @overload fetch_cache_update(request, options = nil) - # Pass arguments to `fetch_cache_update` via a request object, either of type - # {::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_cache_update(database: nil, max_recipe_count: nil, max_range_count: nil) - # Pass arguments to `fetch_cache_update` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database for which to retrieve the cache update. - # @param max_recipe_count [::Integer] - # Optional. The maximum number of key recipes to return in the response. - # If not set, a default limit of 100 will be used. - # @param max_range_count [::Integer] - # Optional. The maximum number of ranges to return in the response. - # If not set, a default limit of 10000 will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Spanner::V1::CacheUpdate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Spanner::V1::CacheUpdate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/spanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Spanner::V1::Spanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Spanner::V1::FetchCacheUpdateRequest.new - # - # # Call the fetch_cache_update method to start streaming. - # output = client.fetch_cache_update request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Spanner::V1::CacheUpdate - # output.each do |current_response| - # p current_response - # end - # - def fetch_cache_update request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_cache_update.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Spanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_cache_update.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_cache_update.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @spanner_stub.call_rpc :fetch_cache_update, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Spanner API. - # - # This class represents the configuration for Spanner, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Spanner::V1::Spanner::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_session to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Spanner::V1::Spanner::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_session.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_session.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "spanner.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Spanner API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_session` - # @return [::Gapic::Config::Method] - # - attr_reader :create_session - ## - # RPC-specific configuration for `batch_create_sessions` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_sessions - ## - # RPC-specific configuration for `get_session` - # @return [::Gapic::Config::Method] - # - attr_reader :get_session - ## - # RPC-specific configuration for `list_sessions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sessions - ## - # RPC-specific configuration for `delete_session` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_session - ## - # RPC-specific configuration for `execute_sql` - # @return [::Gapic::Config::Method] - # - attr_reader :execute_sql - ## - # RPC-specific configuration for `execute_streaming_sql` - # @return [::Gapic::Config::Method] - # - attr_reader :execute_streaming_sql - ## - # RPC-specific configuration for `execute_batch_dml` - # @return [::Gapic::Config::Method] - # - attr_reader :execute_batch_dml - ## - # RPC-specific configuration for `read` - # @return [::Gapic::Config::Method] - # - attr_reader :read - ## - # RPC-specific configuration for `streaming_read` - # @return [::Gapic::Config::Method] - # - attr_reader :streaming_read - ## - # RPC-specific configuration for `begin_transaction` - # @return [::Gapic::Config::Method] - # - attr_reader :begin_transaction - ## - # RPC-specific configuration for `commit` - # @return [::Gapic::Config::Method] - # - attr_reader :commit - ## - # RPC-specific configuration for `rollback` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback - ## - # RPC-specific configuration for `partition_query` - # @return [::Gapic::Config::Method] - # - attr_reader :partition_query - ## - # RPC-specific configuration for `partition_read` - # @return [::Gapic::Config::Method] - # - attr_reader :partition_read - ## - # RPC-specific configuration for `batch_write` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_write - ## - # RPC-specific configuration for `fetch_cache_update` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_cache_update - - # @private - def initialize parent_rpcs = nil - create_session_config = parent_rpcs.create_session if parent_rpcs.respond_to? :create_session - @create_session = ::Gapic::Config::Method.new create_session_config - batch_create_sessions_config = parent_rpcs.batch_create_sessions if parent_rpcs.respond_to? :batch_create_sessions - @batch_create_sessions = ::Gapic::Config::Method.new batch_create_sessions_config - get_session_config = parent_rpcs.get_session if parent_rpcs.respond_to? :get_session - @get_session = ::Gapic::Config::Method.new get_session_config - list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions - @list_sessions = ::Gapic::Config::Method.new list_sessions_config - delete_session_config = parent_rpcs.delete_session if parent_rpcs.respond_to? :delete_session - @delete_session = ::Gapic::Config::Method.new delete_session_config - execute_sql_config = parent_rpcs.execute_sql if parent_rpcs.respond_to? :execute_sql - @execute_sql = ::Gapic::Config::Method.new execute_sql_config - execute_streaming_sql_config = parent_rpcs.execute_streaming_sql if parent_rpcs.respond_to? :execute_streaming_sql - @execute_streaming_sql = ::Gapic::Config::Method.new execute_streaming_sql_config - execute_batch_dml_config = parent_rpcs.execute_batch_dml if parent_rpcs.respond_to? :execute_batch_dml - @execute_batch_dml = ::Gapic::Config::Method.new execute_batch_dml_config - read_config = parent_rpcs.read if parent_rpcs.respond_to? :read - @read = ::Gapic::Config::Method.new read_config - streaming_read_config = parent_rpcs.streaming_read if parent_rpcs.respond_to? :streaming_read - @streaming_read = ::Gapic::Config::Method.new streaming_read_config - begin_transaction_config = parent_rpcs.begin_transaction if parent_rpcs.respond_to? :begin_transaction - @begin_transaction = ::Gapic::Config::Method.new begin_transaction_config - commit_config = parent_rpcs.commit if parent_rpcs.respond_to? :commit - @commit = ::Gapic::Config::Method.new commit_config - rollback_config = parent_rpcs.rollback if parent_rpcs.respond_to? :rollback - @rollback = ::Gapic::Config::Method.new rollback_config - partition_query_config = parent_rpcs.partition_query if parent_rpcs.respond_to? :partition_query - @partition_query = ::Gapic::Config::Method.new partition_query_config - partition_read_config = parent_rpcs.partition_read if parent_rpcs.respond_to? :partition_read - @partition_read = ::Gapic::Config::Method.new partition_read_config - batch_write_config = parent_rpcs.batch_write if parent_rpcs.respond_to? :batch_write - @batch_write = ::Gapic::Config::Method.new batch_write_config - fetch_cache_update_config = parent_rpcs.fetch_cache_update if parent_rpcs.respond_to? :fetch_cache_update - @fetch_cache_update = ::Gapic::Config::Method.new fetch_cache_update_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.rb deleted file mode 100644 index 1970ece8b929..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/credentials.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Spanner - module V1 - module Spanner - # Credentials for the Spanner API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ] - self.env_vars = [ - "SPANNER_CREDENTIALS", - "SPANNER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SPANNER_CREDENTIALS_JSON", - "SPANNER_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.rb deleted file mode 100644 index ef5cfd6c6bab..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/spanner/paths.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - module Spanner - # Path helper methods for the Spanner API. - module Paths - ## - # Create a fully-qualified Database resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}/databases/{database}` - # - # @param project [String] - # @param instance [String] - # @param database [String] - # - # @return [::String] - def database_path project:, instance:, database: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/instances/#{instance}/databases/#{database}" - end - - ## - # Create a fully-qualified Session resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}/databases/{database}/sessions/{session}` - # - # @param project [String] - # @param instance [String] - # @param database [String] - # @param session [String] - # - # @return [::String] - def session_path project:, instance:, database:, session: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" - - "projects/#{project}/instances/#{instance}/databases/#{database}/sessions/#{session}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb deleted file mode 100644 index d42f1a645d00..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/cloud/spanner/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb deleted file mode 100644 index 4d36ea2bd9bf..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/change_stream_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/v1/change_stream.proto - -require 'google/protobuf' - -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'google/spanner/v1/type_pb' - - -descriptor_data = "\n%google/spanner/v1/change_stream.proto\x12\x11google.spanner.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/spanner/v1/type.proto\"\x96\x14\n\x12\x43hangeStreamRecord\x12T\n\x12\x64\x61ta_change_record\x18\x01 \x01(\x0b\x32\x36.google.spanner.v1.ChangeStreamRecord.DataChangeRecordH\x00\x12Q\n\x10heartbeat_record\x18\x02 \x01(\x0b\x32\x35.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordH\x00\x12\\\n\x16partition_start_record\x18\x03 \x01(\x0b\x32:.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordH\x00\x12X\n\x14partition_end_record\x18\x04 \x01(\x0b\x32\x38.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordH\x00\x12\\\n\x16partition_event_record\x18\x05 \x01(\x0b\x32:.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordH\x00\x1a\xd2\n\n\x10\x44\x61taChangeRecord\x12\x34\n\x10\x63ommit_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x1d\n\x15server_transaction_id\x18\x03 \x01(\t\x12\x32\n*is_last_record_in_transaction_in_partition\x18\x04 \x01(\x08\x12\r\n\x05table\x18\x05 \x01(\t\x12^\n\x0f\x63olumn_metadata\x18\x06 \x03(\x0b\x32\x45.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata\x12H\n\x04mods\x18\x07 \x03(\x0b\x32:.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod\x12P\n\x08mod_type\x18\x08 \x01(\x0e\x32>.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType\x12\x63\n\x12value_capture_type\x18\t \x01(\x0e\x32G.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType\x12(\n number_of_records_in_transaction\x18\n \x01(\x05\x12+\n#number_of_partitions_in_transaction\x18\x0b \x01(\x05\x12\x17\n\x0ftransaction_tag\x18\x0c \x01(\t\x12\x1d\n\x15is_system_transaction\x18\r \x01(\x08\x1aw\n\x0e\x43olumnMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12%\n\x04type\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type\x12\x16\n\x0eis_primary_key\x18\x03 \x01(\x08\x12\x18\n\x10ordinal_position\x18\x04 \x01(\x03\x1aP\n\x08ModValue\x12\x1d\n\x15\x63olumn_metadata_index\x18\x01 \x01(\x05\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\x1a\xfe\x01\n\x03Mod\x12M\n\x04keys\x18\x01 \x03(\x0b\x32?.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue\x12S\n\nold_values\x18\x02 \x03(\x0b\x32?.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue\x12S\n\nnew_values\x18\x03 \x03(\x0b\x32?.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue\"G\n\x07ModType\x12\x18\n\x14MOD_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06INSERT\x10\n\x12\n\n\x06UPDATE\x10\x14\x12\n\n\x06\x44\x45LETE\x10\x1e\"\x87\x01\n\x10ValueCaptureType\x12\"\n\x1eVALUE_CAPTURE_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12OLD_AND_NEW_VALUES\x10\n\x12\x0e\n\nNEW_VALUES\x10\x14\x12\x0b\n\x07NEW_ROW\x10\x1e\x12\x1a\n\x16NEW_ROW_AND_OLD_VALUES\x10(\x1a@\n\x0fHeartbeatRecord\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a~\n\x14PartitionStartRecord\x12\x33\n\x0fstart_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x18\n\x10partition_tokens\x18\x03 \x03(\t\x1ay\n\x12PartitionEndRecord\x12\x31\n\rend_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x17\n\x0fpartition_token\x18\x03 \x01(\t\x1a\xa4\x03\n\x14PartitionEventRecord\x12\x34\n\x10\x63ommit_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0frecord_sequence\x18\x02 \x01(\t\x12\x17\n\x0fpartition_token\x18\x03 \x01(\t\x12^\n\x0emove_in_events\x18\x04 \x03(\x0b\x32\x46.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent\x12`\n\x0fmove_out_events\x18\x05 \x03(\x0b\x32G.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent\x1a-\n\x0bMoveInEvent\x12\x1e\n\x16source_partition_token\x18\x01 \x01(\t\x1a\x33\n\x0cMoveOutEvent\x12#\n\x1b\x64\x65stination_partition_token\x18\x01 \x01(\tB\x08\n\x06recordB\xb4\x01\n\x15\x63om.google.spanner.v1B\x11\x43hangeStreamProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module V1 - ChangeStreamRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord").msgclass - ChangeStreamRecord::DataChangeRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord").msgclass - ChangeStreamRecord::DataChangeRecord::ColumnMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata").msgclass - ChangeStreamRecord::DataChangeRecord::ModValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue").msgclass - ChangeStreamRecord::DataChangeRecord::Mod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod").msgclass - ChangeStreamRecord::DataChangeRecord::ModType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType").enummodule - ChangeStreamRecord::DataChangeRecord::ValueCaptureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType").enummodule - ChangeStreamRecord::HeartbeatRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.HeartbeatRecord").msgclass - ChangeStreamRecord::PartitionStartRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionStartRecord").msgclass - ChangeStreamRecord::PartitionEndRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEndRecord").msgclass - ChangeStreamRecord::PartitionEventRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEventRecord").msgclass - ChangeStreamRecord::PartitionEventRecord::MoveInEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent").msgclass - ChangeStreamRecord::PartitionEventRecord::MoveOutEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb deleted file mode 100644 index 607a4aa4cabc..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/commit_response_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/v1/commit_response.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' -require 'google/spanner/v1/location_pb' -require 'google/spanner/v1/transaction_pb' - - -descriptor_data = "\n\'google/spanner/v1/commit_response.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/spanner/v1/location.proto\x1a#google/spanner/v1/transaction.proto\"\xb5\x04\n\x0e\x43ommitResponse\x12\x34\n\x10\x63ommit_timestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x0c\x63ommit_stats\x18\x02 \x01(\x0b\x32-.google.spanner.v1.CommitResponse.CommitStats\x12N\n\x0fprecommit_token\x18\x04 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenH\x00\x12\x36\n\x12snapshot_timestamp\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x0c\x63\x61\x63he_update\x18\x06 \x01(\x0b\x32\x1e.google.spanner.v1.CacheUpdateB\x03\xe0\x41\x01\x12M\n\x0fisolation_level\x18\x07 \x01(\x0e\x32\x34.google.spanner.v1.TransactionOptions.IsolationLevel\x12T\n\x0eread_lock_mode\x18\x08 \x01(\x0e\x32<.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode\x1a%\n\x0b\x43ommitStats\x12\x16\n\x0emutation_count\x18\x01 \x01(\x03\x42\x19\n\x17MultiplexedSessionRetryB\xb6\x01\n\x15\x63om.google.spanner.v1B\x13\x43ommitResponseProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module V1 - CommitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse").msgclass - CommitResponse::CommitStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CommitResponse.CommitStats").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/keys_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/keys_pb.rb deleted file mode 100644 index 8e8743e95c42..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/keys_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/v1/keys.proto - -require 'google/protobuf' - -require 'google/protobuf/struct_pb' - - -descriptor_data = "\n\x1cgoogle/spanner/v1/keys.proto\x12\x11google.spanner.v1\x1a\x1cgoogle/protobuf/struct.proto\"\xf4\x01\n\x08KeyRange\x12\x32\n\x0cstart_closed\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.ListValueH\x00\x12\x30\n\nstart_open\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.ListValueH\x00\x12\x30\n\nend_closed\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.ListValueH\x01\x12.\n\x08\x65nd_open\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.ListValueH\x01\x42\x10\n\x0estart_key_typeB\x0e\n\x0c\x65nd_key_type\"l\n\x06KeySet\x12(\n\x04keys\x18\x01 \x03(\x0b\x32\x1a.google.protobuf.ListValue\x12+\n\x06ranges\x18\x02 \x03(\x0b\x32\x1b.google.spanner.v1.KeyRange\x12\x0b\n\x03\x61ll\x18\x03 \x01(\x08\x42\xac\x01\n\x15\x63om.google.spanner.v1B\tKeysProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module V1 - KeyRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeyRange").msgclass - KeySet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeySet").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/location_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/location_pb.rb deleted file mode 100644 index 911d7f698ff7..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/location_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/v1/location.proto - -require 'google/protobuf' - -require 'google/protobuf/struct_pb' -require 'google/spanner/v1/type_pb' - - -descriptor_data = "\n google/spanner/v1/location.proto\x12\x11google.spanner.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/spanner/v1/type.proto\"f\n\x05Range\x12\x11\n\tstart_key\x18\x01 \x01(\x0c\x12\x11\n\tlimit_key\x18\x02 \x01(\x0c\x12\x11\n\tgroup_uid\x18\x03 \x01(\x04\x12\x10\n\x08split_id\x18\x04 \x01(\x04\x12\x12\n\ngeneration\x18\x05 \x01(\x0c\"\xe6\x01\n\x06Tablet\x12\x12\n\ntablet_uid\x18\x01 \x01(\x04\x12\x16\n\x0eserver_address\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\x12,\n\x04role\x18\x04 \x01(\x0e\x32\x1e.google.spanner.v1.Tablet.Role\x12\x13\n\x0bincarnation\x18\x05 \x01(\x0c\x12\x10\n\x08\x64istance\x18\x06 \x01(\r\x12\x0c\n\x04skip\x18\x07 \x01(\x08\";\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\"p\n\x05Group\x12\x11\n\tgroup_uid\x18\x01 \x01(\x04\x12*\n\x07tablets\x18\x02 \x03(\x0b\x32\x19.google.spanner.v1.Tablet\x12\x14\n\x0cleader_index\x18\x03 \x01(\x05\x12\x12\n\ngeneration\x18\x04 \x01(\x0c\"\xd3\x04\n\tKeyRecipe\x12\x14\n\ntable_name\x18\x01 \x01(\tH\x00\x12\x14\n\nindex_name\x18\x02 \x01(\tH\x00\x12\x17\n\roperation_uid\x18\x03 \x01(\x04H\x00\x12/\n\x04part\x18\x04 \x03(\x0b\x32!.google.spanner.v1.KeyRecipe.Part\x1a\xc5\x03\n\x04Part\x12\x0b\n\x03tag\x18\x01 \x01(\r\x12\x36\n\x05order\x18\x02 \x01(\x0e\x32\'.google.spanner.v1.KeyRecipe.Part.Order\x12?\n\nnull_order\x18\x03 \x01(\x0e\x32+.google.spanner.v1.KeyRecipe.Part.NullOrder\x12%\n\x04type\x18\x04 \x01(\x0b\x32\x17.google.spanner.v1.Type\x12\x14\n\nidentifier\x18\x05 \x01(\tH\x00\x12\'\n\x05value\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueH\x00\x12\x10\n\x06random\x18\x08 \x01(\x08H\x00\x12\x1a\n\x12struct_identifiers\x18\x07 \x03(\x05\"=\n\x05Order\x12\x15\n\x11ORDER_UNSPECIFIED\x10\x00\x12\r\n\tASCENDING\x10\x01\x12\x0e\n\nDESCENDING\x10\x02\"V\n\tNullOrder\x12\x1a\n\x16NULL_ORDER_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNULLS_FIRST\x10\x01\x12\x0e\n\nNULLS_LAST\x10\x02\x12\x0c\n\x08NOT_NULL\x10\x03\x42\x0c\n\nvalue_typeB\x08\n\x06target\"U\n\nRecipeList\x12\x19\n\x11schema_generation\x18\x01 \x01(\x0c\x12,\n\x06recipe\x18\x03 \x03(\x0b\x32\x1c.google.spanner.v1.KeyRecipe\"\xa8\x01\n\x0b\x43\x61\x63heUpdate\x12\x13\n\x0b\x64\x61tabase_id\x18\x01 \x01(\x04\x12\'\n\x05range\x18\x02 \x03(\x0b\x32\x18.google.spanner.v1.Range\x12\'\n\x05group\x18\x03 \x03(\x0b\x32\x18.google.spanner.v1.Group\x12\x32\n\x0bkey_recipes\x18\x05 \x01(\x0b\x32\x1d.google.spanner.v1.RecipeList\"\xca\x02\n\x0bRoutingHint\x12\x15\n\roperation_uid\x18\x01 \x01(\x04\x12\x13\n\x0b\x64\x61tabase_id\x18\x02 \x01(\x04\x12\x19\n\x11schema_generation\x18\x03 \x01(\x0c\x12\x0b\n\x03key\x18\x04 \x01(\x0c\x12\x11\n\tlimit_key\x18\x05 \x01(\x0c\x12\x11\n\tgroup_uid\x18\x06 \x01(\x04\x12\x10\n\x08split_id\x18\x07 \x01(\x04\x12\x12\n\ntablet_uid\x18\x08 \x01(\x04\x12H\n\x12skipped_tablet_uid\x18\t \x03(\x0b\x32,.google.spanner.v1.RoutingHint.SkippedTablet\x12\x17\n\x0f\x63lient_location\x18\n \x01(\t\x1a\x38\n\rSkippedTablet\x12\x12\n\ntablet_uid\x18\x01 \x01(\x04\x12\x13\n\x0bincarnation\x18\x02 \x01(\x0c\x42\xb0\x01\n\x15\x63om.google.spanner.v1B\rLocationProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module V1 - Range = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Range").msgclass - Tablet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Tablet").msgclass - Tablet::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Tablet.Role").enummodule - Group = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Group").msgclass - KeyRecipe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeyRecipe").msgclass - KeyRecipe::Part = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeyRecipe.Part").msgclass - KeyRecipe::Part::Order = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeyRecipe.Part.Order").enummodule - KeyRecipe::Part::NullOrder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.KeyRecipe.Part.NullOrder").enummodule - RecipeList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RecipeList").msgclass - CacheUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.CacheUpdate").msgclass - RoutingHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RoutingHint").msgclass - RoutingHint::SkippedTablet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.RoutingHint.SkippedTablet").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/mutation_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/mutation_pb.rb deleted file mode 100644 index b84e466d4627..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/mutation_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/v1/mutation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'google/spanner/v1/keys_pb' - - -descriptor_data = "\n google/spanner/v1/mutation.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/spanner/v1/keys.proto\"\xc0\x06\n\x08Mutation\x12\x33\n\x06insert\x18\x01 \x01(\x0b\x32!.google.spanner.v1.Mutation.WriteH\x00\x12\x33\n\x06update\x18\x02 \x01(\x0b\x32!.google.spanner.v1.Mutation.WriteH\x00\x12=\n\x10insert_or_update\x18\x03 \x01(\x0b\x32!.google.spanner.v1.Mutation.WriteH\x00\x12\x34\n\x07replace\x18\x04 \x01(\x0b\x32!.google.spanner.v1.Mutation.WriteH\x00\x12\x34\n\x06\x64\x65lete\x18\x05 \x01(\x0b\x32\".google.spanner.v1.Mutation.DeleteH\x00\x12\x30\n\x04send\x18\x06 \x01(\x0b\x32 .google.spanner.v1.Mutation.SendH\x00\x12.\n\x03\x61\x63k\x18\x07 \x01(\x0b\x32\x1f.google.spanner.v1.Mutation.AckH\x00\x1aX\n\x05Write\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07\x63olumns\x18\x02 \x03(\t\x12*\n\x06values\x18\x03 \x03(\x0b\x32\x1a.google.protobuf.ListValue\x1aM\n\x06\x44\x65lete\x12\x12\n\x05table\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12/\n\x07key_set\x18\x02 \x01(\x0b\x32\x19.google.spanner.v1.KeySetB\x03\xe0\x41\x02\x1a\xa3\x01\n\x04Send\x12\x12\n\x05queue\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12,\n\x03key\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.ListValueB\x03\xe0\x41\x02\x12\x30\n\x0c\x64\x65liver_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x07payload\x18\x04 \x01(\x0b\x32\x16.google.protobuf.Value\x1a\x61\n\x03\x41\x63k\x12\x12\n\x05queue\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12,\n\x03key\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.ListValueB\x03\xe0\x41\x02\x12\x18\n\x10ignore_not_found\x18\x03 \x01(\x08\x42\x0b\n\toperationB\xb0\x01\n\x15\x63om.google.spanner.v1B\rMutationProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module V1 - Mutation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Mutation").msgclass - Mutation::Write = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Mutation.Write").msgclass - Mutation::Delete = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Mutation.Delete").msgclass - Mutation::Send = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Mutation.Send").msgclass - Mutation::Ack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Mutation.Ack").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/query_plan_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/query_plan_pb.rb deleted file mode 100644 index 143949a764c5..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/query_plan_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/v1/query_plan.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\n\"google/spanner/v1/query_plan.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xf8\x04\n\x08PlanNode\x12\r\n\x05index\x18\x01 \x01(\x05\x12.\n\x04kind\x18\x02 \x01(\x0e\x32 .google.spanner.v1.PlanNode.Kind\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12:\n\x0b\x63hild_links\x18\x04 \x03(\x0b\x32%.google.spanner.v1.PlanNode.ChildLink\x12M\n\x14short_representation\x18\x05 \x01(\x0b\x32/.google.spanner.v1.PlanNode.ShortRepresentation\x12)\n\x08metadata\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x30\n\x0f\x65xecution_stats\x18\x07 \x01(\x0b\x32\x17.google.protobuf.Struct\x1a@\n\tChildLink\x12\x13\n\x0b\x63hild_index\x18\x01 \x01(\x05\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x10\n\x08variable\x18\x03 \x01(\t\x1a\xb2\x01\n\x13ShortRepresentation\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12S\n\nsubqueries\x18\x02 \x03(\x0b\x32?.google.spanner.v1.PlanNode.ShortRepresentation.SubqueriesEntry\x1a\x31\n\x0fSubqueriesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"8\n\x04Kind\x12\x14\n\x10KIND_UNSPECIFIED\x10\x00\x12\x0e\n\nRELATIONAL\x10\x01\x12\n\n\x06SCALAR\x10\x02\"\xa4\x01\n\x12QueryAdvisorResult\x12L\n\x0cindex_advice\x18\x01 \x03(\x0b\x32\x31.google.spanner.v1.QueryAdvisorResult.IndexAdviceB\x03\xe0\x41\x01\x1a@\n\x0bIndexAdvice\x12\x10\n\x03\x64\x64l\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12improvement_factor\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\"~\n\tQueryPlan\x12/\n\nplan_nodes\x18\x01 \x03(\x0b\x32\x1b.google.spanner.v1.PlanNode\x12@\n\x0cquery_advice\x18\x02 \x01(\x0b\x32%.google.spanner.v1.QueryAdvisorResultB\x03\xe0\x41\x01\x42\xb1\x01\n\x15\x63om.google.spanner.v1B\x0eQueryPlanProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module V1 - PlanNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PlanNode").msgclass - PlanNode::ChildLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PlanNode.ChildLink").msgclass - PlanNode::ShortRepresentation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PlanNode.ShortRepresentation").msgclass - PlanNode::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PlanNode.Kind").enummodule - QueryAdvisorResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.QueryAdvisorResult").msgclass - QueryAdvisorResult::IndexAdvice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.QueryAdvisorResult.IndexAdvice").msgclass - QueryPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.QueryPlan").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/result_set_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/result_set_pb.rb deleted file mode 100644 index 687b6efa6936..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/result_set_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/v1/result_set.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/struct_pb' -require 'google/spanner/v1/location_pb' -require 'google/spanner/v1/query_plan_pb' -require 'google/spanner/v1/transaction_pb' -require 'google/spanner/v1/type_pb' - - -descriptor_data = "\n\"google/spanner/v1/result_set.proto\x12\x11google.spanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a google/spanner/v1/location.proto\x1a\"google/spanner/v1/query_plan.proto\x1a#google/spanner/v1/transaction.proto\x1a\x1cgoogle/spanner/v1/type.proto\"\xad\x02\n\tResultSet\x12\x36\n\x08metadata\x18\x01 \x01(\x0b\x32$.google.spanner.v1.ResultSetMetadata\x12(\n\x04rows\x18\x02 \x03(\x0b\x32\x1a.google.protobuf.ListValue\x12\x30\n\x05stats\x18\x03 \x01(\x0b\x32!.google.spanner.v1.ResultSetStats\x12Q\n\x0fprecommit_token\x18\x05 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenB\x03\xe0\x41\x01\x12\x39\n\x0c\x63\x61\x63he_update\x18\x06 \x01(\x0b\x32\x1e.google.spanner.v1.CacheUpdateB\x03\xe0\x41\x01\"\xf2\x02\n\x10PartialResultSet\x12\x36\n\x08metadata\x18\x01 \x01(\x0b\x32$.google.spanner.v1.ResultSetMetadata\x12&\n\x06values\x18\x02 \x03(\x0b\x32\x16.google.protobuf.Value\x12\x15\n\rchunked_value\x18\x03 \x01(\x08\x12\x14\n\x0cresume_token\x18\x04 \x01(\x0c\x12\x30\n\x05stats\x18\x05 \x01(\x0b\x32!.google.spanner.v1.ResultSetStats\x12Q\n\x0fprecommit_token\x18\x08 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenB\x03\xe0\x41\x01\x12\x11\n\x04last\x18\t \x01(\x08\x42\x03\xe0\x41\x01\x12\x39\n\x0c\x63\x61\x63he_update\x18\n \x01(\x0b\x32\x1e.google.spanner.v1.CacheUpdateB\x03\xe0\x41\x01\"\xb7\x01\n\x11ResultSetMetadata\x12/\n\x08row_type\x18\x01 \x01(\x0b\x32\x1d.google.spanner.v1.StructType\x12\x33\n\x0btransaction\x18\x02 \x01(\x0b\x32\x1e.google.spanner.v1.Transaction\x12<\n\x15undeclared_parameters\x18\x03 \x01(\x0b\x32\x1d.google.spanner.v1.StructType\"\xb9\x01\n\x0eResultSetStats\x12\x30\n\nquery_plan\x18\x01 \x01(\x0b\x32\x1c.google.spanner.v1.QueryPlan\x12,\n\x0bquery_stats\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x19\n\x0frow_count_exact\x18\x03 \x01(\x03H\x00\x12\x1f\n\x15row_count_lower_bound\x18\x04 \x01(\x03H\x00\x42\x0b\n\trow_countB\xb1\x01\n\x15\x63om.google.spanner.v1B\x0eResultSetProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module V1 - ResultSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ResultSet").msgclass - PartialResultSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.PartialResultSet").msgclass - ResultSetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ResultSetMetadata").msgclass - ResultSetStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.ResultSetStats").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_pb.rb b/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_pb.rb deleted file mode 100644 index e4c5330cfad2..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/lib/google/spanner/v1/spanner_pb.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/spanner/v1/spanner.proto - -require 'google/protobuf' - -require 'google/spanner/v1/commit_response_pb' -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' -require 'google/spanner/v1/keys_pb' -require 'google/spanner/v1/location_pb' -require 'google/spanner/v1/mutation_pb' -require 'google/spanner/v1/result_set_pb' -require 'google/spanner/v1/transaction_pb' -require 'google/spanner/v1/type_pb' - - -descriptor_data = "\n\x1fgoogle/spanner/v1/spanner.proto\x12\x11google.spanner.v1\x1a\'google/spanner/v1/commit_response.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1cgoogle/spanner/v1/keys.proto\x1a google/spanner/v1/location.proto\x1a google/spanner/v1/mutation.proto\x1a\"google/spanner/v1/result_set.proto\x1a#google/spanner/v1/transaction.proto\x1a\x1cgoogle/spanner/v1/type.proto\"\x83\x01\n\x14\x43reateSessionRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x30\n\x07session\x18\x02 \x01(\x0b\x32\x1a.google.spanner.v1.SessionB\x03\xe0\x41\x02\"\xa9\x01\n\x1a\x42\x61tchCreateSessionsRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x34\n\x10session_template\x18\x02 \x01(\x0b\x32\x1a.google.spanner.v1.Session\x12\x1a\n\rsession_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\"J\n\x1b\x42\x61tchCreateSessionsResponse\x12+\n\x07session\x18\x01 \x03(\x0b\x32\x1a.google.spanner.v1.Session\"\xb8\x03\n\x07Session\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\x06labels\x18\x02 \x03(\x0b\x32&.google.spanner.v1.Session.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x19\x61pproximate_last_use_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x0c\x63reator_role\x18\x05 \x01(\t\x12\x18\n\x0bmultiplexed\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x88\x01\xea\x41\x84\x01\n\x1espanner.googleapis.com/Session\x12Oprojects/{project}/instances/{instance}/databases/{database}/sessions/{session}*\x08sessions2\x07session\"I\n\x11GetSessionRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\"\x87\x01\n\x13ListSessionsRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"]\n\x14ListSessionsResponse\x12,\n\x08sessions\x18\x01 \x03(\x0b\x32\x1a.google.spanner.v1.Session\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"L\n\x14\x44\x65leteSessionRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\"\xeb\x03\n\x0eRequestOptions\x12<\n\x08priority\x18\x01 \x01(\x0e\x32*.google.spanner.v1.RequestOptions.Priority\x12\x13\n\x0brequest_tag\x18\x02 \x01(\t\x12\x17\n\x0ftransaction_tag\x18\x03 \x01(\t\x12L\n\x0e\x63lient_context\x18\x04 \x01(\x0b\x32/.google.spanner.v1.RequestOptions.ClientContextB\x03\xe0\x41\x01\x1a\xbe\x01\n\rClientContext\x12_\n\x0esecure_context\x18\x01 \x03(\x0b\x32\x42.google.spanner.v1.RequestOptions.ClientContext.SecureContextEntryB\x03\xe0\x41\x01\x1aL\n\x12SecureContextEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\"^\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cPRIORITY_LOW\x10\x01\x12\x13\n\x0fPRIORITY_MEDIUM\x10\x02\x12\x11\n\rPRIORITY_HIGH\x10\x03\"\xea\x04\n\x13\x44irectedReadOptions\x12R\n\x10include_replicas\x18\x01 \x01(\x0b\x32\x36.google.spanner.v1.DirectedReadOptions.IncludeReplicasH\x00\x12R\n\x10\x65xclude_replicas\x18\x02 \x01(\x0b\x32\x36.google.spanner.v1.DirectedReadOptions.ExcludeReplicasH\x00\x1a\xad\x01\n\x10ReplicaSelection\x12\x10\n\x08location\x18\x01 \x01(\t\x12J\n\x04type\x18\x02 \x01(\x0e\x32<.google.spanner.v1.DirectedReadOptions.ReplicaSelection.Type\";\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nREAD_WRITE\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x1a\x86\x01\n\x0fIncludeReplicas\x12S\n\x12replica_selections\x18\x01 \x03(\x0b\x32\x37.google.spanner.v1.DirectedReadOptions.ReplicaSelection\x12\x1e\n\x16\x61uto_failover_disabled\x18\x02 \x01(\x08\x1a\x66\n\x0f\x45xcludeReplicas\x12S\n\x12replica_selections\x18\x01 \x03(\x0b\x32\x37.google.spanner.v1.DirectedReadOptions.ReplicaSelectionB\n\n\x08replicas\"\xc8\x07\n\x11\x45xecuteSqlRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x10\n\x03sql\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x06params\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12I\n\x0bparam_types\x18\x05 \x03(\x0b\x32\x34.google.spanner.v1.ExecuteSqlRequest.ParamTypesEntry\x12\x14\n\x0cresume_token\x18\x06 \x01(\x0c\x12\x42\n\nquery_mode\x18\x07 \x01(\x0e\x32..google.spanner.v1.ExecuteSqlRequest.QueryMode\x12\x17\n\x0fpartition_token\x18\x08 \x01(\x0c\x12\r\n\x05seqno\x18\t \x01(\x03\x12H\n\rquery_options\x18\n \x01(\x0b\x32\x31.google.spanner.v1.ExecuteSqlRequest.QueryOptions\x12:\n\x0frequest_options\x18\x0b \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x45\n\x15\x64irected_read_options\x18\x0f \x01(\x0b\x32&.google.spanner.v1.DirectedReadOptions\x12\x1a\n\x12\x64\x61ta_boost_enabled\x18\x10 \x01(\x08\x12\x1b\n\x0elast_statement\x18\x11 \x01(\x08\x42\x03\xe0\x41\x01\x12\x39\n\x0crouting_hint\x18\x12 \x01(\x0b\x32\x1e.google.spanner.v1.RoutingHintB\x03\xe0\x41\x01\x1aO\n\x0cQueryOptions\x12\x19\n\x11optimizer_version\x18\x01 \x01(\t\x12$\n\x1coptimizer_statistics_package\x18\x02 \x01(\t\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\"W\n\tQueryMode\x12\n\n\x06NORMAL\x10\x00\x12\x08\n\x04PLAN\x10\x01\x12\x0b\n\x07PROFILE\x10\x02\x12\x0e\n\nWITH_STATS\x10\x03\x12\x17\n\x13WITH_PLAN_AND_STATS\x10\x04\"\xbe\x04\n\x16\x45xecuteBatchDmlRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12@\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelectorB\x03\xe0\x41\x02\x12L\n\nstatements\x18\x03 \x03(\x0b\x32\x33.google.spanner.v1.ExecuteBatchDmlRequest.StatementB\x03\xe0\x41\x02\x12\x12\n\x05seqno\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02\x12:\n\x0frequest_options\x18\x05 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x1c\n\x0flast_statements\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xec\x01\n\tStatement\x12\x10\n\x03sql\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x06params\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12X\n\x0bparam_types\x18\x03 \x03(\x0b\x32\x43.google.spanner.v1.ExecuteBatchDmlRequest.Statement.ParamTypesEntry\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\"\xc3\x01\n\x17\x45xecuteBatchDmlResponse\x12\x31\n\x0bresult_sets\x18\x01 \x03(\x0b\x32\x1c.google.spanner.v1.ResultSet\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x12Q\n\x0fprecommit_token\x18\x03 \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenB\x03\xe0\x41\x01\"H\n\x10PartitionOptions\x12\x1c\n\x14partition_size_bytes\x18\x01 \x01(\x03\x12\x16\n\x0emax_partitions\x18\x02 \x01(\x03\"\xad\x03\n\x15PartitionQueryRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x10\n\x03sql\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12,\n\x06params\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12R\n\x0bparam_types\x18\x05 \x03(\x0b\x32\x38.google.spanner.v1.PartitionQueryRequest.ParamTypesEntryB\x03\xe0\x41\x01\x12>\n\x11partition_options\x18\x06 \x01(\x0b\x32#.google.spanner.v1.PartitionOptions\x1aJ\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type:\x02\x38\x01\"\xb1\x02\n\x14PartitionReadRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x12\n\x05table\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05index\x18\x04 \x01(\t\x12\x0f\n\x07\x63olumns\x18\x05 \x03(\t\x12/\n\x07key_set\x18\x06 \x01(\x0b\x32\x19.google.spanner.v1.KeySetB\x03\xe0\x41\x02\x12>\n\x11partition_options\x18\t \x01(\x0b\x32#.google.spanner.v1.PartitionOptions\"$\n\tPartition\x12\x17\n\x0fpartition_token\x18\x01 \x01(\x0c\"z\n\x11PartitionResponse\x12\x30\n\npartitions\x18\x01 \x03(\x0b\x32\x1c.google.spanner.v1.Partition\x12\x33\n\x0btransaction\x18\x02 \x01(\x0b\x32\x1e.google.spanner.v1.Transaction\"\xb1\x06\n\x0bReadRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x0btransaction\x18\x02 \x01(\x0b\x32&.google.spanner.v1.TransactionSelector\x12\x12\n\x05table\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05index\x18\x04 \x01(\t\x12\x14\n\x07\x63olumns\x18\x05 \x03(\tB\x03\xe0\x41\x02\x12/\n\x07key_set\x18\x06 \x01(\x0b\x32\x19.google.spanner.v1.KeySetB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x08 \x01(\x03\x12\x14\n\x0cresume_token\x18\t \x01(\x0c\x12\x17\n\x0fpartition_token\x18\n \x01(\x0c\x12:\n\x0frequest_options\x18\x0b \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x45\n\x15\x64irected_read_options\x18\x0e \x01(\x0b\x32&.google.spanner.v1.DirectedReadOptions\x12\x1a\n\x12\x64\x61ta_boost_enabled\x18\x0f \x01(\x08\x12=\n\x08order_by\x18\x10 \x01(\x0e\x32&.google.spanner.v1.ReadRequest.OrderByB\x03\xe0\x41\x01\x12?\n\tlock_hint\x18\x11 \x01(\x0e\x32\'.google.spanner.v1.ReadRequest.LockHintB\x03\xe0\x41\x01\x12\x39\n\x0crouting_hint\x18\x12 \x01(\x0b\x32\x1e.google.spanner.v1.RoutingHintB\x03\xe0\x41\x01\"T\n\x07OrderBy\x12\x18\n\x14ORDER_BY_UNSPECIFIED\x10\x00\x12\x18\n\x14ORDER_BY_PRIMARY_KEY\x10\x01\x12\x15\n\x11ORDER_BY_NO_ORDER\x10\x02\"T\n\x08LockHint\x12\x19\n\x15LOCK_HINT_UNSPECIFIED\x10\x00\x12\x14\n\x10LOCK_HINT_SHARED\x10\x01\x12\x17\n\x13LOCK_HINT_EXCLUSIVE\x10\x02\"\xbe\x02\n\x17\x42\x65ginTransactionRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12;\n\x07options\x18\x02 \x01(\x0b\x32%.google.spanner.v1.TransactionOptionsB\x03\xe0\x41\x02\x12:\n\x0frequest_options\x18\x03 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12\x36\n\x0cmutation_key\x18\x04 \x01(\x0b\x32\x1b.google.spanner.v1.MutationB\x03\xe0\x41\x01\x12\x39\n\x0crouting_hint\x18\x05 \x01(\x0b\x32\x1e.google.spanner.v1.RoutingHintB\x03\xe0\x41\x01\"\x8b\x04\n\rCommitRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12\x18\n\x0etransaction_id\x18\x02 \x01(\x0cH\x00\x12G\n\x16single_use_transaction\x18\x03 \x01(\x0b\x32%.google.spanner.v1.TransactionOptionsH\x00\x12.\n\tmutations\x18\x04 \x03(\x0b\x32\x1b.google.spanner.v1.Mutation\x12\x1b\n\x13return_commit_stats\x18\x05 \x01(\x08\x12\x38\n\x10max_commit_delay\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12:\n\x0frequest_options\x18\x06 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12Q\n\x0fprecommit_token\x18\t \x01(\x0b\x32\x33.google.spanner.v1.MultiplexedSessionPrecommitTokenB\x03\xe0\x41\x01\x12\x39\n\x0crouting_hint\x18\n \x01(\x0b\x32\x1e.google.spanner.v1.RoutingHintB\x03\xe0\x41\x01\x42\r\n\x0btransaction\"g\n\x0fRollbackRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12\x1b\n\x0etransaction_id\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"\xce\x02\n\x11\x42\x61tchWriteRequest\x12\x37\n\x07session\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1espanner.googleapis.com/Session\x12:\n\x0frequest_options\x18\x03 \x01(\x0b\x32!.google.spanner.v1.RequestOptions\x12P\n\x0fmutation_groups\x18\x04 \x03(\x0b\x32\x32.google.spanner.v1.BatchWriteRequest.MutationGroupB\x03\xe0\x41\x02\x12,\n\x1f\x65xclude_txn_from_change_streams\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x44\n\rMutationGroup\x12\x33\n\tmutations\x18\x01 \x03(\x0b\x32\x1b.google.spanner.v1.MutationB\x03\xe0\x41\x02\"\x7f\n\x12\x42\x61tchWriteResponse\x12\x0f\n\x07indexes\x18\x01 \x03(\x05\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x12\x34\n\x10\x63ommit_timestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x91\x01\n\x17\x46\x65tchCacheUpdateRequest\x12\x39\n\x08\x64\x61tabase\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspanner.googleapis.com/Database\x12\x1d\n\x10max_recipe_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0fmax_range_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x32\xc3\x19\n\x07Spanner\x12\xa6\x01\n\rCreateSession\x12\'.google.spanner.v1.CreateSessionRequest\x1a\x1a.google.spanner.v1.Session\"P\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02?\":/v1/{database=projects/*/instances/*/databases/*}/sessions:\x01*\x12\xe0\x01\n\x13\x42\x61tchCreateSessions\x12-.google.spanner.v1.BatchCreateSessionsRequest\x1a..google.spanner.v1.BatchCreateSessionsResponse\"j\xda\x41\x16\x64\x61tabase,session_count\x82\xd3\xe4\x93\x02K\"F/v1/{database=projects/*/instances/*/databases/*}/sessions:batchCreate:\x01*\x12\x97\x01\n\nGetSession\x12$.google.spanner.v1.GetSessionRequest\x1a\x1a.google.spanner.v1.Session\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/instances/*/databases/*/sessions/*}\x12\xae\x01\n\x0cListSessions\x12&.google.spanner.v1.ListSessionsRequest\x1a\'.google.spanner.v1.ListSessionsResponse\"M\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02<\x12:/v1/{database=projects/*/instances/*/databases/*}/sessions\x12\x99\x01\n\rDeleteSession\x12\'.google.spanner.v1.DeleteSessionRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/instances/*/databases/*/sessions/*}\x12\xa3\x01\n\nExecuteSql\x12$.google.spanner.v1.ExecuteSqlRequest\x1a\x1c.google.spanner.v1.ResultSet\"Q\x82\xd3\xe4\x93\x02K\"F/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql:\x01*\x12\xbe\x01\n\x13\x45xecuteStreamingSql\x12$.google.spanner.v1.ExecuteSqlRequest\x1a#.google.spanner.v1.PartialResultSet\"Z\x82\xd3\xe4\x93\x02T\"O/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeStreamingSql:\x01*0\x01\x12\xc0\x01\n\x0f\x45xecuteBatchDml\x12).google.spanner.v1.ExecuteBatchDmlRequest\x1a*.google.spanner.v1.ExecuteBatchDmlResponse\"V\x82\xd3\xe4\x93\x02P\"K/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeBatchDml:\x01*\x12\x91\x01\n\x04Read\x12\x1e.google.spanner.v1.ReadRequest\x1a\x1c.google.spanner.v1.ResultSet\"K\x82\xd3\xe4\x93\x02\x45\"@/v1/{session=projects/*/instances/*/databases/*/sessions/*}:read:\x01*\x12\xac\x01\n\rStreamingRead\x12\x1e.google.spanner.v1.ReadRequest\x1a#.google.spanner.v1.PartialResultSet\"T\x82\xd3\xe4\x93\x02N\"I/v1/{session=projects/*/instances/*/databases/*/sessions/*}:streamingRead:\x01*0\x01\x12\xc9\x01\n\x10\x42\x65ginTransaction\x12*.google.spanner.v1.BeginTransactionRequest\x1a\x1e.google.spanner.v1.Transaction\"i\xda\x41\x0fsession,options\x82\xd3\xe4\x93\x02Q\"L/v1/{session=projects/*/instances/*/databases/*/sessions/*}:beginTransaction:\x01*\x12\xeb\x01\n\x06\x43ommit\x12 .google.spanner.v1.CommitRequest\x1a!.google.spanner.v1.CommitResponse\"\x9b\x01\xda\x41 session,transaction_id,mutations\xda\x41(session,single_use_transaction,mutations\x82\xd3\xe4\x93\x02G\"B/v1/{session=projects/*/instances/*/databases/*/sessions/*}:commit:\x01*\x12\xb0\x01\n\x08Rollback\x12\".google.spanner.v1.RollbackRequest\x1a\x16.google.protobuf.Empty\"h\xda\x41\x16session,transaction_id\x82\xd3\xe4\x93\x02I\"D/v1/{session=projects/*/instances/*/databases/*/sessions/*}:rollback:\x01*\x12\xb7\x01\n\x0ePartitionQuery\x12(.google.spanner.v1.PartitionQueryRequest\x1a$.google.spanner.v1.PartitionResponse\"U\x82\xd3\xe4\x93\x02O\"J/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionQuery:\x01*\x12\xb4\x01\n\rPartitionRead\x12\'.google.spanner.v1.PartitionReadRequest\x1a$.google.spanner.v1.PartitionResponse\"T\x82\xd3\xe4\x93\x02N\"I/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionRead:\x01*\x12\xc8\x01\n\nBatchWrite\x12$.google.spanner.v1.BatchWriteRequest\x1a%.google.spanner.v1.BatchWriteResponse\"k\xda\x41\x17session,mutation_groups\x82\xd3\xe4\x93\x02K\"F/v1/{session=projects/*/instances/*/databases/*/sessions/*}:batchWrite:\x01*0\x01\x12\xb5\x01\n\x10\x46\x65tchCacheUpdate\x12*.google.spanner.v1.FetchCacheUpdateRequest\x1a\x1e.google.spanner.v1.CacheUpdate\"S\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x42\"=/v1/{database=projects/*/instances/*/databases/*}:cacheUpdate:\x01*0\x01\x1aw\xca\x41\x16spanner.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spanner.dataB\x91\x02\n\x15\x63om.google.spanner.v1B\x0cSpannerProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1\xea\x41_\n\x1fspanner.googleapis.com/Database\x12\n\x0ftype_annotation\x18\x04 \x01(\x0e\x32%.google.spanner.v1.TypeAnnotationCode\x12\x16\n\x0eproto_type_fqn\x18\x05 \x01(\t\"\x7f\n\nStructType\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32#.google.spanner.v1.StructType.Field\x1a<\n\x05\x46ield\x12\x0c\n\x04name\x18\x01 \x01(\t\x12%\n\x04type\x18\x02 \x01(\x0b\x32\x17.google.spanner.v1.Type*\xdf\x01\n\x08TypeCode\x12\x19\n\x15TYPE_CODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\t\n\x05INT64\x10\x02\x12\x0b\n\x07\x46LOAT64\x10\x03\x12\x0b\n\x07\x46LOAT32\x10\x0f\x12\r\n\tTIMESTAMP\x10\x04\x12\x08\n\x04\x44\x41TE\x10\x05\x12\n\n\x06STRING\x10\x06\x12\t\n\x05\x42YTES\x10\x07\x12\t\n\x05\x41RRAY\x10\x08\x12\n\n\x06STRUCT\x10\t\x12\x0b\n\x07NUMERIC\x10\n\x12\x08\n\x04JSON\x10\x0b\x12\t\n\x05PROTO\x10\r\x12\x08\n\x04\x45NUM\x10\x0e\x12\x0c\n\x08INTERVAL\x10\x10\x12\x08\n\x04UUID\x10\x11*d\n\x12TypeAnnotationCode\x12$\n TYPE_ANNOTATION_CODE_UNSPECIFIED\x10\x00\x12\x0e\n\nPG_NUMERIC\x10\x02\x12\x0c\n\x08PG_JSONB\x10\x03\x12\n\n\x06PG_OID\x10\x04\x42\xac\x01\n\x15\x63om.google.spanner.v1B\tTypeProtoP\x01Z5cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb\xaa\x02\x17Google.Cloud.Spanner.V1\xca\x02\x17Google\\Cloud\\Spanner\\V1\xea\x02\x1aGoogle::Cloud::Spanner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Spanner - module V1 - Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.Type").msgclass - StructType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.StructType").msgclass - StructType::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.StructType.Field").msgclass - TypeCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TypeCode").enummodule - TypeAnnotationCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.v1.TypeAnnotationCode").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/README.md deleted file mode 100644 index 9e764966d911..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Spanner V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb deleted file mode 100644 index 977e81d500bc..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/change_stream.rb +++ /dev/null @@ -1,488 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - # Spanner Change Streams enable customers to capture and stream out changes to - # their Spanner databases in real-time. A change stream - # can be created with option partition_mode='IMMUTABLE_KEY_RANGE' or - # partition_mode='MUTABLE_KEY_RANGE'. - # - # This message is only used in Change Streams created with the option - # partition_mode='MUTABLE_KEY_RANGE'. Spanner automatically creates a special - # Table-Valued Function (TVF) along with each Change Streams. The function - # provides access to the change stream's records. The function is named - # READ_ (where is the - # name of the change stream), and it returns a table with only one column - # called ChangeRecord. - # @!attribute [rw] data_change_record - # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord] - # Data change record describing a data change for a change stream - # partition. - # - # Note: The following fields are mutually exclusive: `data_change_record`, `heartbeat_record`, `partition_start_record`, `partition_end_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] heartbeat_record - # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::HeartbeatRecord] - # Heartbeat record describing a heartbeat for a change stream partition. - # - # Note: The following fields are mutually exclusive: `heartbeat_record`, `data_change_record`, `partition_start_record`, `partition_end_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] partition_start_record - # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionStartRecord] - # Partition start record describing a new change stream partition. - # - # Note: The following fields are mutually exclusive: `partition_start_record`, `data_change_record`, `heartbeat_record`, `partition_end_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] partition_end_record - # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEndRecord] - # Partition end record describing a terminated change stream partition. - # - # Note: The following fields are mutually exclusive: `partition_end_record`, `data_change_record`, `heartbeat_record`, `partition_start_record`, `partition_event_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] partition_event_record - # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord] - # Partition event record describing key range changes for a change stream - # partition. - # - # Note: The following fields are mutually exclusive: `partition_event_record`, `data_change_record`, `heartbeat_record`, `partition_start_record`, `partition_end_record`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ChangeStreamRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A data change record contains a set of changes to a table with the same - # modification type (insert, update, or delete) committed at the same commit - # timestamp in one change stream partition for the same transaction. Multiple - # data change records can be returned for the same transaction across - # multiple change stream partitions. - # @!attribute [rw] commit_timestamp - # @return [::Google::Protobuf::Timestamp] - # Indicates the timestamp in which the change was committed. - # DataChangeRecord.commit_timestamps, - # PartitionStartRecord.start_timestamps, - # PartitionEventRecord.commit_timestamps, and - # PartitionEndRecord.end_timestamps can have the same value in the same - # partition. - # @!attribute [rw] record_sequence - # @return [::String] - # Record sequence numbers are unique and monotonically increasing (but not - # necessarily contiguous) for a specific timestamp across record - # types in the same partition. To guarantee ordered processing, the reader - # should process records (of potentially different types) in - # record_sequence order for a specific timestamp in the same partition. - # - # The record sequence number ordering across partitions is only meaningful - # in the context of a specific transaction. Record sequence numbers are - # unique across partitions for a specific transaction. Sort the - # DataChangeRecords for the same - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#server_transaction_id server_transaction_id} - # by - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#record_sequence record_sequence} - # to reconstruct the ordering of the changes within the transaction. - # @!attribute [rw] server_transaction_id - # @return [::String] - # Provides a globally unique string that represents the transaction in - # which the change was committed. Multiple transactions can have the same - # commit timestamp, but each transaction has a unique - # server_transaction_id. - # @!attribute [rw] is_last_record_in_transaction_in_partition - # @return [::Boolean] - # Indicates whether this is the last record for a transaction in the - # current partition. Clients can use this field to determine when all - # records for a transaction in the current partition have been received. - # @!attribute [rw] table - # @return [::String] - # Name of the table affected by the change. - # @!attribute [rw] column_metadata - # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ColumnMetadata>] - # Provides metadata describing the columns associated with the - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#mods mods} listed - # below. - # @!attribute [rw] mods - # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod>] - # Describes the changes that were made. - # @!attribute [rw] mod_type - # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType] - # Describes the type of change. - # @!attribute [rw] value_capture_type - # @return [::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType] - # Describes the value capture type that was specified in the change stream - # configuration when this change was captured. - # @!attribute [rw] number_of_records_in_transaction - # @return [::Integer] - # Indicates the number of data change records that are part of this - # transaction across all change stream partitions. This value can be used - # to assemble all the records associated with a particular transaction. - # @!attribute [rw] number_of_partitions_in_transaction - # @return [::Integer] - # Indicates the number of partitions that return data change records for - # this transaction. This value can be helpful in assembling all records - # associated with a particular transaction. - # @!attribute [rw] transaction_tag - # @return [::String] - # Indicates the transaction tag associated with this transaction. - # @!attribute [rw] is_system_transaction - # @return [::Boolean] - # Indicates whether the transaction is a system transaction. System - # transactions include those issued by time-to-live (TTL), column backfill, - # etc. - class DataChangeRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metadata for a column. - # @!attribute [rw] name - # @return [::String] - # Name of the column. - # @!attribute [rw] type - # @return [::Google::Cloud::Spanner::V1::Type] - # Type of the column. - # @!attribute [rw] is_primary_key - # @return [::Boolean] - # Indicates whether the column is a primary key column. - # @!attribute [rw] ordinal_position - # @return [::Integer] - # Ordinal position of the column based on the original table definition - # in the schema starting with a value of 1. - class ColumnMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Returns the value and associated metadata for a particular field of the - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. - # @!attribute [rw] column_metadata_index - # @return [::Integer] - # Index within the repeated - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} - # field, to obtain the column metadata for the column that was modified. - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - # The value of the column. - class ModValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A mod describes all data changes in a watched table row. - # @!attribute [rw] keys - # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] - # Returns the value of the primary key of the modified row. - # @!attribute [rw] old_values - # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] - # Returns the old values before the change for the modified columns. - # Always empty for - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, - # or if old values are not being captured specified by - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. - # @!attribute [rw] new_values - # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] - # Returns the new values after the change for the modified columns. - # Always empty for - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. - class Mod - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Mod type describes the type of change Spanner applied to the data. For - # example, if the client submits an INSERT_OR_UPDATE request, Spanner will - # perform an insert if there is no existing row and return ModType INSERT. - # Alternatively, if there is an existing row, Spanner will perform an - # update and return ModType UPDATE. - module ModType - # Not specified. - MOD_TYPE_UNSPECIFIED = 0 - - # Indicates data was inserted. - INSERT = 10 - - # Indicates existing data was updated. - UPDATE = 20 - - # Indicates existing data was deleted. - DELETE = 30 - end - - # Value capture type describes which values are recorded in the data - # change record. - module ValueCaptureType - # Not specified. - VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 - - # Records both old and new values of the modified watched columns. - OLD_AND_NEW_VALUES = 10 - - # Records only new values of the modified watched columns. - NEW_VALUES = 20 - - # Records new values of all watched columns, including modified and - # unmodified columns. - NEW_ROW = 30 - - # Records the new values of all watched columns, including modified and - # unmodified columns. Also records the old values of the modified - # columns. - NEW_ROW_AND_OLD_VALUES = 40 - end - end - - # A heartbeat record is returned as a progress indicator, when there are no - # data changes or any other partition record types in the change stream - # partition. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # Indicates the timestamp at which the query has returned all the records - # in the change stream partition with timestamp <= heartbeat timestamp. - # The heartbeat timestamp will not be the same as the timestamps of other - # record types in the same partition. - class HeartbeatRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A partition start record serves as a notification that the client should - # schedule the partitions to be queried. PartitionStartRecord returns - # information about one or more partitions. - # @!attribute [rw] start_timestamp - # @return [::Google::Protobuf::Timestamp] - # Start timestamp at which the partitions should be queried to return - # change stream records with timestamps >= start_timestamp. - # DataChangeRecord.commit_timestamps, - # PartitionStartRecord.start_timestamps, - # PartitionEventRecord.commit_timestamps, and - # PartitionEndRecord.end_timestamps can have the same value in the same - # partition. - # @!attribute [rw] record_sequence - # @return [::String] - # Record sequence numbers are unique and monotonically increasing (but not - # necessarily contiguous) for a specific timestamp across record - # types in the same partition. To guarantee ordered processing, the reader - # should process records (of potentially different types) in - # record_sequence order for a specific timestamp in the same partition. - # @!attribute [rw] partition_tokens - # @return [::Array<::String>] - # Unique partition identifiers to be used in queries. - class PartitionStartRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A partition end record serves as a notification that the client should stop - # reading the partition. No further records are expected to be retrieved on - # it. - # @!attribute [rw] end_timestamp - # @return [::Google::Protobuf::Timestamp] - # End timestamp at which the change stream partition is terminated. All - # changes generated by this partition will have timestamps <= - # end_timestamp. DataChangeRecord.commit_timestamps, - # PartitionStartRecord.start_timestamps, - # PartitionEventRecord.commit_timestamps, and - # PartitionEndRecord.end_timestamps can have the same value in the same - # partition. PartitionEndRecord is the last record returned for a - # partition. - # @!attribute [rw] record_sequence - # @return [::String] - # Record sequence numbers are unique and monotonically increasing (but not - # necessarily contiguous) for a specific timestamp across record - # types in the same partition. To guarantee ordered processing, the reader - # should process records (of potentially different types) in - # record_sequence order for a specific timestamp in the same partition. - # @!attribute [rw] partition_token - # @return [::String] - # Unique partition identifier describing the terminated change stream - # partition. - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEndRecord#partition_token partition_token} - # is equal to the partition token of the change stream partition currently - # queried to return this PartitionEndRecord. - class PartitionEndRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A partition event record describes key range changes for a change stream - # partition. The changes to a row defined by its primary key can be captured - # in one change stream partition for a specific time range, and then be - # captured in a different change stream partition for a different time range. - # This movement of key ranges across change stream partitions is a reflection - # of activities, such as Spanner's dynamic splitting and load balancing, etc. - # Processing this event is needed if users want to guarantee processing of - # the changes for any key in timestamp order. If time ordered processing of - # changes for a primary key is not needed, this event can be ignored. - # To guarantee time ordered processing for each primary key, if the event - # describes move-ins, the reader of this partition needs to wait until the - # readers of the source partitions have processed all records with timestamps - # <= this PartitionEventRecord.commit_timestamp, before advancing beyond this - # PartitionEventRecord. If the event describes move-outs, the reader can - # notify the readers of the destination partitions that they can continue - # processing. - # @!attribute [rw] commit_timestamp - # @return [::Google::Protobuf::Timestamp] - # Indicates the commit timestamp at which the key range change occurred. - # DataChangeRecord.commit_timestamps, - # PartitionStartRecord.start_timestamps, - # PartitionEventRecord.commit_timestamps, and - # PartitionEndRecord.end_timestamps can have the same value in the same - # partition. - # @!attribute [rw] record_sequence - # @return [::String] - # Record sequence numbers are unique and monotonically increasing (but not - # necessarily contiguous) for a specific timestamp across record - # types in the same partition. To guarantee ordered processing, the reader - # should process records (of potentially different types) in - # record_sequence order for a specific timestamp in the same partition. - # @!attribute [rw] partition_token - # @return [::String] - # Unique partition identifier describing the partition this event - # occurred on. - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token} - # is equal to the partition token of the change stream partition currently - # queried to return this PartitionEventRecord. - # @!attribute [rw] move_in_events - # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord::MoveInEvent>] - # Set when one or more key ranges are moved into the change stream - # partition identified by - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. - # - # Example: Two key ranges are moved into partition (P1) from partition (P2) - # and partition (P3) in a single transaction at timestamp T. - # - # The PartitionEventRecord returned in P1 will reflect the move as: - # - # PartitionEventRecord { - # commit_timestamp: T - # partition_token: "P1" - # move_in_events { - # source_partition_token: "P2" - # } - # move_in_events { - # source_partition_token: "P3" - # } - # } - # - # The PartitionEventRecord returned in P2 will reflect the move as: - # - # PartitionEventRecord { - # commit_timestamp: T - # partition_token: "P2" - # move_out_events { - # destination_partition_token: "P1" - # } - # } - # - # The PartitionEventRecord returned in P3 will reflect the move as: - # - # PartitionEventRecord { - # commit_timestamp: T - # partition_token: "P3" - # move_out_events { - # destination_partition_token: "P1" - # } - # } - # @!attribute [rw] move_out_events - # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord::MoveOutEvent>] - # Set when one or more key ranges are moved out of the change stream - # partition identified by - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. - # - # Example: Two key ranges are moved out of partition (P1) to partition (P2) - # and partition (P3) in a single transaction at timestamp T. - # - # The PartitionEventRecord returned in P1 will reflect the move as: - # - # PartitionEventRecord { - # commit_timestamp: T - # partition_token: "P1" - # move_out_events { - # destination_partition_token: "P2" - # } - # move_out_events { - # destination_partition_token: "P3" - # } - # } - # - # The PartitionEventRecord returned in P2 will reflect the move as: - # - # PartitionEventRecord { - # commit_timestamp: T - # partition_token: "P2" - # move_in_events { - # source_partition_token: "P1" - # } - # } - # - # The PartitionEventRecord returned in P3 will reflect the move as: - # - # PartitionEventRecord { - # commit_timestamp: T - # partition_token: "P3" - # move_in_events { - # source_partition_token: "P1" - # } - # } - class PartitionEventRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes move-in of the key ranges into the change stream partition - # identified by - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. - # - # To maintain processing the changes for a particular key in timestamp - # order, the query processing the change stream partition identified by - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token} - # should not advance beyond the partition event record commit timestamp - # until the queries processing the source change stream partitions have - # processed all change stream records with timestamps <= the partition - # event record commit timestamp. - # @!attribute [rw] source_partition_token - # @return [::String] - # An unique partition identifier describing the source change stream - # partition that recorded changes for the key range that is moving - # into this partition. - class MoveInEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes move-out of the key ranges out of the change stream partition - # identified by - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token}. - # - # To maintain processing the changes for a particular key in timestamp - # order, the query processing the - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord::MoveOutEvent MoveOutEvent} - # in the partition identified by - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#partition_token partition_token} - # should inform the queries processing the destination partitions that - # they can unblock and proceed processing records past the - # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord#commit_timestamp commit_timestamp}. - # @!attribute [rw] destination_partition_token - # @return [::String] - # An unique partition identifier describing the destination change - # stream partition that will record changes for the key range that is - # moving out of this partition. - class MoveOutEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb deleted file mode 100644 index 38ab0bf66244..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/commit_response.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - # The response for {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit}. - # @!attribute [rw] commit_timestamp - # @return [::Google::Protobuf::Timestamp] - # The Cloud Spanner timestamp at which the transaction committed. - # @!attribute [rw] commit_stats - # @return [::Google::Cloud::Spanner::V1::CommitResponse::CommitStats] - # The statistics about this `Commit`. Not returned by default. - # For more information, see - # {::Google::Cloud::Spanner::V1::CommitRequest#return_commit_stats CommitRequest.return_commit_stats}. - # @!attribute [rw] precommit_token - # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] - # If specified, transaction has not committed yet. - # You must retry the commit with the new precommit token. - # @!attribute [rw] snapshot_timestamp - # @return [::Google::Protobuf::Timestamp] - # If `TransactionOptions.isolation_level` is set to - # `IsolationLevel.REPEATABLE_READ`, then the snapshot timestamp is the - # timestamp at which all reads in the transaction ran. This timestamp is - # never returned. - # @!attribute [rw] cache_update - # @return [::Google::Cloud::Spanner::V1::CacheUpdate] - # Optional. A cache update expresses a set of changes the client should - # incorporate into its location cache. The client should discard the changes - # if they are older than the data it already has. This data can be obtained - # in response to requests that included a `RoutingHint` field, but may also - # be obtained by explicit location-fetching RPCs which may be added in the - # future. - # @!attribute [rw] isolation_level - # @return [::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel] - # The isolation level used for the read-write transaction. - # @!attribute [rw] read_lock_mode - # @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite::ReadLockMode] - # The read lock mode used for the read-write transaction. - class CommitResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional statistics about a commit. - # @!attribute [rw] mutation_count - # @return [::Integer] - # The total number of mutations for the transaction. Knowing the - # `mutation_count` value can help you maximize the number of mutations - # in a transaction and minimize the number of API round trips. You can - # also monitor this value to prevent transactions from exceeding the system - # [limit](https://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data). - # If the number of mutations exceeds the limit, the server returns - # [INVALID_ARGUMENT](https://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT). - class CommitStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/keys.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/keys.rb deleted file mode 100644 index 5faebc2232ef..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/keys.rb +++ /dev/null @@ -1,170 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - # KeyRange represents a range of rows in a table or index. - # - # A range has a start key and an end key. These keys can be open or - # closed, indicating if the range includes rows with that key. - # - # Keys are represented by lists, where the ith value in the list - # corresponds to the ith component of the table or index primary key. - # Individual values are encoded as described - # {::Google::Cloud::Spanner::V1::TypeCode here}. - # - # For example, consider the following table definition: - # - # CREATE TABLE UserEvents ( - # UserName STRING(MAX), - # EventDate STRING(10) - # ) PRIMARY KEY(UserName, EventDate); - # - # The following keys name rows in this table: - # - # ["Bob", "2014-09-23"] - # ["Alfred", "2015-06-12"] - # - # Since the `UserEvents` table's `PRIMARY KEY` clause names two - # columns, each `UserEvents` key has two elements; the first is the - # `UserName`, and the second is the `EventDate`. - # - # Key ranges with multiple components are interpreted - # lexicographically by component using the table or index key's declared - # sort order. For example, the following range returns all events for - # user `"Bob"` that occurred in the year 2015: - # - # "start_closed": ["Bob", "2015-01-01"] - # "end_closed": ["Bob", "2015-12-31"] - # - # Start and end keys can omit trailing key components. This affects the - # inclusion and exclusion of rows that exactly match the provided key - # components: if the key is closed, then rows that exactly match the - # provided components are included; if the key is open, then rows - # that exactly match are not included. - # - # For example, the following range includes all events for `"Bob"` that - # occurred during and after the year 2000: - # - # "start_closed": ["Bob", "2000-01-01"] - # "end_closed": ["Bob"] - # - # The next example retrieves all events for `"Bob"`: - # - # "start_closed": ["Bob"] - # "end_closed": ["Bob"] - # - # To retrieve events before the year 2000: - # - # "start_closed": ["Bob"] - # "end_open": ["Bob", "2000-01-01"] - # - # The following range includes all rows in the table: - # - # "start_closed": [] - # "end_closed": [] - # - # This range returns all users whose `UserName` begins with any - # character from A to C: - # - # "start_closed": ["A"] - # "end_open": ["D"] - # - # This range returns all users whose `UserName` begins with B: - # - # "start_closed": ["B"] - # "end_open": ["C"] - # - # Key ranges honor column sort order. For example, suppose a table is - # defined as follows: - # - # CREATE TABLE DescendingSortedTable { - # Key INT64, - # ... - # ) PRIMARY KEY(Key DESC); - # - # The following range retrieves all rows with key values between 1 - # and 100 inclusive: - # - # "start_closed": ["100"] - # "end_closed": ["1"] - # - # Note that 100 is passed as the start, and 1 is passed as the end, - # because `Key` is a descending column in the schema. - # @!attribute [rw] start_closed - # @return [::Google::Protobuf::ListValue] - # If the start is closed, then the range includes all rows whose - # first `len(start_closed)` key columns exactly match `start_closed`. - # - # Note: The following fields are mutually exclusive: `start_closed`, `start_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] start_open - # @return [::Google::Protobuf::ListValue] - # If the start is open, then the range excludes rows whose first - # `len(start_open)` key columns exactly match `start_open`. - # - # Note: The following fields are mutually exclusive: `start_open`, `start_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] end_closed - # @return [::Google::Protobuf::ListValue] - # If the end is closed, then the range includes all rows whose - # first `len(end_closed)` key columns exactly match `end_closed`. - # - # Note: The following fields are mutually exclusive: `end_closed`, `end_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] end_open - # @return [::Google::Protobuf::ListValue] - # If the end is open, then the range excludes rows whose first - # `len(end_open)` key columns exactly match `end_open`. - # - # Note: The following fields are mutually exclusive: `end_open`, `end_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class KeyRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All - # the keys are expected to be in the same table or index. The keys need - # not be sorted in any particular way. - # - # If the same key is specified multiple times in the set (for example - # if two ranges, two keys, or a key and a range overlap), Cloud Spanner - # behaves as if the key were only specified once. - # @!attribute [rw] keys - # @return [::Array<::Google::Protobuf::ListValue>] - # A list of specific keys. Entries in `keys` should have exactly as - # many elements as there are columns in the primary or index key - # with which this `KeySet` is used. Individual key values are - # encoded as described {::Google::Cloud::Spanner::V1::TypeCode here}. - # @!attribute [rw] ranges - # @return [::Array<::Google::Cloud::Spanner::V1::KeyRange>] - # A list of key ranges. See {::Google::Cloud::Spanner::V1::KeyRange KeyRange} for more - # information about key range specifications. - # @!attribute [rw] all - # @return [::Boolean] - # For convenience `all` can be set to `true` to indicate that this - # `KeySet` matches all keys in the table or index. Note that any keys - # specified in `keys` or `ranges` are only yielded once. - class KeySet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/location.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/location.rb deleted file mode 100644 index d79971bad844..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/location.rb +++ /dev/null @@ -1,417 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - # A `Range` represents a range of keys in a database. The keys themselves - # are encoded in "sortable string format", also known as ssformat. Consult - # Spanner's open source client libraries for details on the encoding. - # - # Each range represents a contiguous range of rows, possibly from multiple - # tables/indexes. Each range is associated with a single paxos group (known as - # a "group" throughout this API), a split (which names the exact range within - # the group), and a generation that can be used to determine whether a given - # `Range` represents a newer or older location for the key range. - # @!attribute [rw] start_key - # @return [::String] - # The start key of the range, inclusive. Encoded in "sortable string format" - # (ssformat). - # @!attribute [rw] limit_key - # @return [::String] - # The limit key of the range, exclusive. Encoded in "sortable string format" - # (ssformat). - # @!attribute [rw] group_uid - # @return [::Integer] - # The UID of the paxos group where this range is stored. UIDs are unique - # within the database. References `Group.group_uid`. - # @!attribute [rw] split_id - # @return [::Integer] - # A group can store multiple ranges of keys. Each key range is named by an - # ID (the split ID). Within a group, split IDs are unique. The `split_id` - # names the exact split in `group_uid` where this range is stored. - # @!attribute [rw] generation - # @return [::String] - # `generation` indicates the freshness of the range information contained - # in this proto. Generations can be compared lexicographically; if generation - # A is greater than generation B, then the `Range` corresponding to A is - # newer than the `Range` corresponding to B, and should be used - # preferentially. - class Range - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A `Tablet` represents a single replica of a `Group`. A tablet is served by a - # single server at a time, and can move between servers due to server death or - # simply load balancing. - # @!attribute [rw] tablet_uid - # @return [::Integer] - # The UID of the tablet, unique within the database. Matches the - # `tablet_uids` and `leader_tablet_uid` fields in `Group`. - # @!attribute [rw] server_address - # @return [::String] - # The address of the server that is serving this tablet -- either an IP - # address or DNS hostname and a port number. - # @!attribute [rw] location - # @return [::String] - # Where this tablet is located. This is the name of a Google Cloud region, - # such as "us-central1". - # @!attribute [rw] role - # @return [::Google::Cloud::Spanner::V1::Tablet::Role] - # The role of the tablet. - # @!attribute [rw] incarnation - # @return [::String] - # `incarnation` indicates the freshness of the tablet information contained - # in this proto. Incarnations can be compared lexicographically; if - # incarnation A is greater than incarnation B, then the `Tablet` - # corresponding to A is newer than the `Tablet` corresponding to B, and - # should be used preferentially. - # @!attribute [rw] distance - # @return [::Integer] - # Distances help the client pick the closest tablet out of the list of - # tablets for a given request. Tablets with lower distances should generally - # be preferred. Tablets with the same distance are approximately equally - # close; the client can choose arbitrarily. - # - # Distances do not correspond precisely to expected latency, geographical - # distance, or anything else. Distances should be compared only between - # tablets of the same group; they are not meaningful between different - # groups. - # - # A value of zero indicates that the tablet may be in the same zone as - # the client, and have minimum network latency. A value less than or equal to - # five indicates that the tablet is thought to be in the same region as the - # client, and may have a few milliseconds of network latency. Values greater - # than five are most likely in a different region, with non-trivial network - # latency. - # - # Clients should use the following algorithm: - # * If the request is using a directed read, eliminate any tablets that - # do not match the directed read's target zone and/or replica type. - # * (Read-write transactions only) Choose leader tablet if it has an - # distance <=5. - # * Group and sort tablets by distance. Choose a random - # tablet with the lowest distance. If the request - # is not a directed read, only consider replicas with distances <=5. - # * Send the request to the fallback endpoint. - # - # The tablet picked by this algorithm may be skipped, either because it is - # marked as `skip` by the server or because the corresponding server is - # unreachable, flow controlled, etc. Skipped tablets should be added to the - # `skipped_tablet_uid` field in `RoutingHint`; the algorithm above should - # then be re-run without including the skipped tablet(s) to pick the next - # best tablet. - # @!attribute [rw] skip - # @return [::Boolean] - # If true, the tablet should not be chosen by the client. Typically, this - # signals that the tablet is unhealthy in some way. Tablets with `skip` - # set to true should be reported back to the server in - # `RoutingHint.skipped_tablet_uid`; this cues the server to send updated - # information for this tablet should it become usable again. - class Tablet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates the role of the tablet. - module Role - # Not specified. - ROLE_UNSPECIFIED = 0 - - # The tablet can perform reads and (if elected leader) writes. - READ_WRITE = 1 - - # The tablet can only perform reads. - READ_ONLY = 2 - end - end - - # A `Group` represents a paxos group in a database. A group is a set of - # tablets that are replicated across multiple servers. Groups may have a leader - # tablet. Groups store one (or sometimes more) ranges of keys. - # @!attribute [rw] group_uid - # @return [::Integer] - # The UID of the paxos group, unique within the database. Matches the - # `group_uid` field in `Range`. - # @!attribute [rw] tablets - # @return [::Array<::Google::Cloud::Spanner::V1::Tablet>] - # A list of tablets that are part of the group. Note that this list may not - # be exhaustive; it will only include tablets the server considers useful - # to the client. The returned list is ordered ascending by distance. - # - # Tablet UIDs reference `Tablet.tablet_uid`. - # @!attribute [rw] leader_index - # @return [::Integer] - # The last known leader tablet of the group as an index into `tablets`. May - # be negative if the group has no known leader. - # @!attribute [rw] generation - # @return [::String] - # `generation` indicates the freshness of the group information (including - # leader information) contained in this proto. Generations can be compared - # lexicographically; if generation A is greater than generation B, then the - # `Group` corresponding to A is newer than the `Group` corresponding to B, - # and should be used preferentially. - class Group - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A `KeyRecipe` provides the metadata required to translate reads, mutations, - # and queries into a byte array in "sortable string format" (ssformat)that can - # be used with `Range`s to route requests. Note that the client *must* tolerate - # `KeyRecipe`s that appear to be invalid, since the `KeyRecipe` format may - # change over time. Requests with invalid `KeyRecipe`s should be routed to a - # default server. - # @!attribute [rw] table_name - # @return [::String] - # A table name, matching the name from the database schema. - # - # Note: The following fields are mutually exclusive: `table_name`, `index_name`, `operation_uid`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] index_name - # @return [::String] - # An index name, matching the name from the database schema. - # - # Note: The following fields are mutually exclusive: `index_name`, `table_name`, `operation_uid`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] operation_uid - # @return [::Integer] - # The UID of a query, matching the UID from `RoutingHint`. - # - # Note: The following fields are mutually exclusive: `operation_uid`, `table_name`, `index_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] part - # @return [::Array<::Google::Cloud::Spanner::V1::KeyRecipe::Part>] - # Parts are in the order they should appear in the encoded key. - class KeyRecipe - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An ssformat key is composed of a sequence of tag numbers and key column - # values. `Part` represents a single tag or key column value. - # @!attribute [rw] tag - # @return [::Integer] - # If non-zero, `tag` is the only field present in this `Part`. The part - # is encoded by appending `tag` to the ssformat key. - # @!attribute [rw] order - # @return [::Google::Cloud::Spanner::V1::KeyRecipe::Part::Order] - # Whether the key column is sorted ascending or descending. Only present - # if `tag` is zero. - # @!attribute [rw] null_order - # @return [::Google::Cloud::Spanner::V1::KeyRecipe::Part::NullOrder] - # How NULLs are represented in the encoded key part. Only present if `tag` - # is zero. - # @!attribute [rw] type - # @return [::Google::Cloud::Spanner::V1::Type] - # The type of the key part. Only present if `tag` is zero. - # @!attribute [rw] identifier - # @return [::String] - # `identifier` is the name of the column or query parameter. - # - # Note: The following fields are mutually exclusive: `identifier`, `value`, `random`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - # The constant value of the key part. - # It is present when query uses a constant as a part of the key. - # - # Note: The following fields are mutually exclusive: `value`, `identifier`, `random`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] random - # @return [::Boolean] - # If true, the client is responsible to fill in the value randomly. - # It's relevant only for the INT64 type. - # - # Note: The following fields are mutually exclusive: `random`, `identifier`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_identifiers - # @return [::Array<::Integer>] - # It is a repeated field to support fetching key columns from nested - # structs, such as `STRUCT` query parameters. - class Part - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The remaining fields encode column values. - module Order - # Default value, equivalent to `ASCENDING`. - ORDER_UNSPECIFIED = 0 - - # The key is ascending - corresponds to `ASC` in the schema definition. - ASCENDING = 1 - - # The key is descending - corresponds to `DESC` in the schema definition. - DESCENDING = 2 - end - - # The null order of the key column. This dictates where NULL values sort - # in the sorted order. Note that columns which are `NOT NULL` can have a - # special encoding. - module NullOrder - # Default value. This value is unused. - NULL_ORDER_UNSPECIFIED = 0 - - # NULL values sort before any non-NULL values. - NULLS_FIRST = 1 - - # NULL values sort after any non-NULL values. - NULLS_LAST = 2 - - # The column does not support NULL values. - NOT_NULL = 3 - end - end - end - - # A `RecipeList` contains a list of `KeyRecipe`s, which share the same - # schema generation. - # @!attribute [rw] schema_generation - # @return [::String] - # The schema generation of the recipes. To be sent to the server in - # `RoutingHint.schema_generation` whenever one of the recipes is used. - # `schema_generation` values are comparable with each other; if generation A - # compares greater than generation B, then A is a more recent schema than B. - # Clients should in general aim to cache only the latest schema generation, - # and discard more stale recipes. - # @!attribute [rw] recipe - # @return [::Array<::Google::Cloud::Spanner::V1::KeyRecipe>] - # A list of recipes to be cached. - class RecipeList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A `CacheUpdate` expresses a set of changes the client should incorporate into - # its location cache. These changes may or may not be newer than what the - # client has in its cache, and should be discarded if necessary. `CacheUpdate`s - # can be obtained in response to requests that included a `RoutingHint` - # field, but may also be obtained by explicit location-fetching RPCs which may - # be added in the future. - # @!attribute [rw] database_id - # @return [::Integer] - # An internal ID for the database. Database names can be reused if a database - # is deleted and re-created. Each time the database is re-created, it will - # get a new database ID, which will never be re-used for any other database. - # @!attribute [rw] range - # @return [::Array<::Google::Cloud::Spanner::V1::Range>] - # A list of ranges to be cached. - # @!attribute [rw] group - # @return [::Array<::Google::Cloud::Spanner::V1::Group>] - # A list of groups to be cached. - # @!attribute [rw] key_recipes - # @return [::Google::Cloud::Spanner::V1::RecipeList] - # A list of recipes to be cached. - class CacheUpdate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `RoutingHint` can be optionally added to location-aware Spanner - # requests. It gives the server hints that can be used to route the request to - # an appropriate server, potentially significantly decreasing latency and - # improving throughput. To achieve improved performance, most fields must be - # filled in with accurate values. - # - # The presence of a valid `RoutingHint` tells the server that the client - # is location-aware. - # - # `RoutingHint` does not change the semantics of the request; it is - # purely a performance hint; the request will perform the same actions on the - # database's data as if `RoutingHint` were not present. However, if - # the `RoutingHint` is incomplete or incorrect, the response may include - # a `CacheUpdate` the client can use to correct its location cache. - # @!attribute [rw] operation_uid - # @return [::Integer] - # A session-scoped unique ID for the operation, computed client-side. - # Requests with the same `operation_uid` should have a shared 'shape', - # meaning that some fields are expected to be the same, such as the SQL - # query, the target table/columns (for reads) etc. Requests with the same - # `operation_uid` are meant to differ only in fields like keys/key - # ranges/query parameters, transaction IDs, etc. - # - # `operation_uid` must be non-zero for `RoutingHint` to be valid. - # @!attribute [rw] database_id - # @return [::Integer] - # The database ID of the database being accessed, see - # `CacheUpdate.database_id`. Should match the cache entries that were used - # to generate the rest of the fields in this `RoutingHint`. - # @!attribute [rw] schema_generation - # @return [::String] - # The schema generation of the recipe that was used to generate `key` and - # `limit_key`. See also `RecipeList.schema_generation`. - # @!attribute [rw] key - # @return [::String] - # The key / key range that this request accesses. For operations that - # access a single key, `key` should be set and `limit_key` should be empty. - # For operations that access a key range, `key` and `limit_key` should both - # be set, to the inclusive start and exclusive end of the range respectively. - # - # The keys are encoded in "sortable string format" (ssformat), using a - # `KeyRecipe` that is appropriate for the request. See `KeyRecipe` for more - # details. - # @!attribute [rw] limit_key - # @return [::String] - # If this request targets a key range, this is the exclusive end of the - # range. See `key` for more details. - # @!attribute [rw] group_uid - # @return [::Integer] - # The group UID of the group that the client believes serves the range - # defined by `key` and `limit_key`. See `Range.group_uid` for more details. - # @!attribute [rw] split_id - # @return [::Integer] - # The split ID of the split that the client believes contains the range - # defined by `key` and `limit_key`. See `Range.split_id` for more details. - # @!attribute [rw] tablet_uid - # @return [::Integer] - # The tablet UID of the tablet from group `group_uid` that the client - # believes is best to serve this request. See `Group.local_tablet_uids` and - # `Group.leader_tablet_uid`. - # @!attribute [rw] skipped_tablet_uid - # @return [::Array<::Google::Cloud::Spanner::V1::RoutingHint::SkippedTablet>] - # If the client had multiple options for tablet selection, and some of its - # first choices were unhealthy (e.g., the server is unreachable, or - # `Tablet.skip` is true), this field will contain the tablet UIDs of those - # tablets, with their incarnations. The server may include a `CacheUpdate` - # with new locations for those tablets. - # @!attribute [rw] client_location - # @return [::String] - # If present, the client's current location. This should be the name of a - # Google Cloud zone or region, such as "us-central1". - # - # If absent, the client's location will be assumed to be the same as the - # location of the server the client ends up connected to. - # - # Locations are primarily valuable for clients that connect from regions - # other than the ones that contain the Spanner database. - class RoutingHint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A tablet that was skipped by the client. See `Tablet.tablet_uid` and - # `Tablet.incarnation`. - # @!attribute [rw] tablet_uid - # @return [::Integer] - # The tablet UID of the tablet that was skipped. See `Tablet.tablet_uid`. - # @!attribute [rw] incarnation - # @return [::String] - # The incarnation of the tablet that was skipped. See `Tablet.incarnation`. - class SkippedTablet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/mutation.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/mutation.rb deleted file mode 100644 index 5c0d3caa5bb8..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/mutation.rb +++ /dev/null @@ -1,178 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - # A modification to one or more Cloud Spanner rows. Mutations can be - # applied to a Cloud Spanner database by sending them in a - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} call. - # @!attribute [rw] insert - # @return [::Google::Cloud::Spanner::V1::Mutation::Write] - # Insert new rows in a table. If any of the rows already exist, - # the write or transaction fails with error `ALREADY_EXISTS`. - # - # Note: The following fields are mutually exclusive: `insert`, `update`, `insert_or_update`, `replace`, `delete`, `send`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] update - # @return [::Google::Cloud::Spanner::V1::Mutation::Write] - # Update existing rows in a table. If any of the rows does not - # already exist, the transaction fails with error `NOT_FOUND`. - # - # Note: The following fields are mutually exclusive: `update`, `insert`, `insert_or_update`, `replace`, `delete`, `send`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] insert_or_update - # @return [::Google::Cloud::Spanner::V1::Mutation::Write] - # Like {::Google::Cloud::Spanner::V1::Mutation#insert insert}, except that if the row - # already exists, then its column values are overwritten with the ones - # provided. Any column values not explicitly written are preserved. - # - # When using - # {::Google::Cloud::Spanner::V1::Mutation#insert_or_update insert_or_update}, just as - # when using {::Google::Cloud::Spanner::V1::Mutation#insert insert}, all `NOT NULL` - # columns in the table must be given a value. This holds true even when the - # row already exists and will therefore actually be updated. - # - # Note: The following fields are mutually exclusive: `insert_or_update`, `insert`, `update`, `replace`, `delete`, `send`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] replace - # @return [::Google::Cloud::Spanner::V1::Mutation::Write] - # Like {::Google::Cloud::Spanner::V1::Mutation#insert insert}, except that if the row - # already exists, it is deleted, and the column values provided are - # inserted instead. Unlike - # {::Google::Cloud::Spanner::V1::Mutation#insert_or_update insert_or_update}, this - # means any values not explicitly written become `NULL`. - # - # In an interleaved table, if you create the child table with the - # `ON DELETE CASCADE` annotation, then replacing a parent row - # also deletes the child rows. Otherwise, you must delete the - # child rows before you replace the parent row. - # - # Note: The following fields are mutually exclusive: `replace`, `insert`, `update`, `insert_or_update`, `delete`, `send`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] delete - # @return [::Google::Cloud::Spanner::V1::Mutation::Delete] - # Delete rows from a table. Succeeds whether or not the named - # rows were present. - # - # Note: The following fields are mutually exclusive: `delete`, `insert`, `update`, `insert_or_update`, `replace`, `send`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] send - # @return [::Google::Cloud::Spanner::V1::Mutation::Send] - # Send a message to a queue. - # - # Note: The following fields are mutually exclusive: `send`, `insert`, `update`, `insert_or_update`, `replace`, `delete`, `ack`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ack - # @return [::Google::Cloud::Spanner::V1::Mutation::Ack] - # Ack a message from a queue. - # - # Note: The following fields are mutually exclusive: `ack`, `insert`, `update`, `insert_or_update`, `replace`, `delete`, `send`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Mutation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Arguments to {::Google::Cloud::Spanner::V1::Mutation#insert insert}, - # {::Google::Cloud::Spanner::V1::Mutation#update update}, - # {::Google::Cloud::Spanner::V1::Mutation#insert_or_update insert_or_update}, and - # {::Google::Cloud::Spanner::V1::Mutation#replace replace} operations. - # @!attribute [rw] table - # @return [::String] - # Required. The table whose rows will be written. - # @!attribute [rw] columns - # @return [::Array<::String>] - # The names of the columns in - # {::Google::Cloud::Spanner::V1::Mutation::Write#table table} to be written. - # - # The list of columns must contain enough columns to allow - # Cloud Spanner to derive values for all primary key columns in the - # row(s) to be modified. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::ListValue>] - # The values to be written. `values` can contain more than one - # list of values. If it does, then multiple rows are written, one - # for each entry in `values`. Each list in `values` must have - # exactly as many entries as there are entries in - # {::Google::Cloud::Spanner::V1::Mutation::Write#columns columns} above. Sending - # multiple lists is equivalent to sending multiple `Mutation`s, each - # containing one `values` entry and repeating - # {::Google::Cloud::Spanner::V1::Mutation::Write#table table} and - # {::Google::Cloud::Spanner::V1::Mutation::Write#columns columns}. Individual values in - # each list are encoded as described {::Google::Cloud::Spanner::V1::TypeCode here}. - class Write - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Arguments to {::Google::Cloud::Spanner::V1::Mutation#delete delete} operations. - # @!attribute [rw] table - # @return [::String] - # Required. The table whose rows will be deleted. - # @!attribute [rw] key_set - # @return [::Google::Cloud::Spanner::V1::KeySet] - # Required. The primary keys of the rows within - # {::Google::Cloud::Spanner::V1::Mutation::Delete#table table} to delete. The primary - # keys must be specified in the order in which they appear in the `PRIMARY - # KEY()` clause of the table's equivalent DDL statement (the DDL statement - # used to create the table). Delete is idempotent. The transaction will - # succeed even if some or all rows do not exist. - class Delete - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Arguments to {::Google::Cloud::Spanner::V1::Mutation#send send} operations. - # @!attribute [rw] queue - # @return [::String] - # Required. The queue to which the message will be sent. - # @!attribute [rw] key - # @return [::Google::Protobuf::ListValue] - # Required. The primary key of the message to be sent. - # @!attribute [rw] deliver_time - # @return [::Google::Protobuf::Timestamp] - # The time at which Spanner will begin attempting to deliver the message. - # If `deliver_time` is not set, Spanner will deliver the message - # immediately. If `deliver_time` is in the past, Spanner will replace it - # with a value closer to the current time. - # @!attribute [rw] payload - # @return [::Google::Protobuf::Value] - # The payload of the message. - class Send - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Arguments to {::Google::Cloud::Spanner::V1::Mutation#ack ack} operations. - # @!attribute [rw] queue - # @return [::String] - # Required. The queue where the message to be acked is stored. - # @!attribute [rw] key - # @return [::Google::Protobuf::ListValue] - # Required. The primary key of the message to be acked. - # @!attribute [rw] ignore_not_found - # @return [::Boolean] - # By default, an attempt to ack a message that does not exist will fail - # with a `NOT_FOUND` error. With `ignore_not_found` set to true, the ack - # will succeed even if the message does not exist. This is useful for - # unconditionally acking a message, even if it is missing or has already - # been acked. - class Ack - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/query_plan.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/query_plan.rb deleted file mode 100644 index a213c6fbe1d4..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/query_plan.rb +++ /dev/null @@ -1,180 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - # Node information for nodes appearing in a - # {::Google::Cloud::Spanner::V1::QueryPlan#plan_nodes QueryPlan.plan_nodes}. - # @!attribute [rw] index - # @return [::Integer] - # The `PlanNode`'s index in [node - # list][google.spanner.v1.QueryPlan.plan_nodes]. - # @!attribute [rw] kind - # @return [::Google::Cloud::Spanner::V1::PlanNode::Kind] - # Used to determine the type of node. May be needed for visualizing - # different kinds of nodes differently. For example, If the node is a - # {::Google::Cloud::Spanner::V1::PlanNode::Kind::SCALAR SCALAR} node, it will have a - # condensed representation which can be used to directly embed a description - # of the node in its parent. - # @!attribute [rw] display_name - # @return [::String] - # The display name for the node. - # @!attribute [rw] child_links - # @return [::Array<::Google::Cloud::Spanner::V1::PlanNode::ChildLink>] - # List of child node `index`es and their relationship to this parent. - # @!attribute [rw] short_representation - # @return [::Google::Cloud::Spanner::V1::PlanNode::ShortRepresentation] - # Condensed representation for - # {::Google::Cloud::Spanner::V1::PlanNode::Kind::SCALAR SCALAR} nodes. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Struct] - # Attributes relevant to the node contained in a group of key-value pairs. - # For example, a Parameter Reference node could have the following - # information in its metadata: - # - # { - # "parameter_reference": "param1", - # "parameter_type": "array" - # } - # @!attribute [rw] execution_stats - # @return [::Google::Protobuf::Struct] - # The execution statistics associated with the node, contained in a group of - # key-value pairs. Only present if the plan was returned as a result of a - # profile query. For example, number of executions, number of rows/time per - # execution etc. - class PlanNode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metadata associated with a parent-child relationship appearing in a - # {::Google::Cloud::Spanner::V1::PlanNode PlanNode}. - # @!attribute [rw] child_index - # @return [::Integer] - # The node to which the link points. - # @!attribute [rw] type - # @return [::String] - # The type of the link. For example, in Hash Joins this could be used to - # distinguish between the build child and the probe child, or in the case - # of the child being an output variable, to represent the tag associated - # with the output variable. - # @!attribute [rw] variable - # @return [::String] - # Only present if the child node is - # {::Google::Cloud::Spanner::V1::PlanNode::Kind::SCALAR SCALAR} and corresponds to an - # output variable of the parent node. The field carries the name of the - # output variable. For example, a `TableScan` operator that reads rows from - # a table will have child links to the `SCALAR` nodes representing the - # output variables created for each column that is read by the operator. - # The corresponding `variable` fields will be set to the variable names - # assigned to the columns. - class ChildLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Condensed representation of a node and its subtree. Only present for - # `SCALAR` [PlanNode(s)][google.spanner.v1.PlanNode]. - # @!attribute [rw] description - # @return [::String] - # A string representation of the expression subtree rooted at this node. - # @!attribute [rw] subqueries - # @return [::Google::Protobuf::Map{::String => ::Integer}] - # A mapping of (subquery variable name) -> (subquery node id) for cases - # where the `description` string of this node references a `SCALAR` - # subquery contained in the expression subtree rooted at this node. The - # referenced `SCALAR` subquery may not necessarily be a direct child of - # this node. - class ShortRepresentation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Integer] - class SubqueriesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The kind of {::Google::Cloud::Spanner::V1::PlanNode PlanNode}. Distinguishes between - # the two different kinds of nodes that can appear in a query plan. - module Kind - # Not specified. - KIND_UNSPECIFIED = 0 - - # Denotes a Relational operator node in the expression tree. Relational - # operators represent iterative processing of rows during query execution. - # For example, a `TableScan` operation that reads rows from a table. - RELATIONAL = 1 - - # Denotes a Scalar node in the expression tree. Scalar nodes represent - # non-iterable entities in the query plan. For example, constants or - # arithmetic operators appearing inside predicate expressions or references - # to column names. - SCALAR = 2 - end - end - - # Output of query advisor analysis. - # @!attribute [rw] index_advice - # @return [::Array<::Google::Cloud::Spanner::V1::QueryAdvisorResult::IndexAdvice>] - # Optional. Index Recommendation for a query. This is an optional field and - # the recommendation will only be available when the recommendation - # guarantees significant improvement in query performance. - class QueryAdvisorResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Recommendation to add new indexes to run queries more efficiently. - # @!attribute [rw] ddl - # @return [::Array<::String>] - # Optional. DDL statements to add new indexes that will improve the query. - # @!attribute [rw] improvement_factor - # @return [::Float] - # Optional. Estimated latency improvement factor. For example if the query - # currently takes 500 ms to run and the estimated latency with new indexes - # is 100 ms this field will be 5. - class IndexAdvice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Contains an ordered list of nodes appearing in the query plan. - # @!attribute [rw] plan_nodes - # @return [::Array<::Google::Cloud::Spanner::V1::PlanNode>] - # The nodes in the query plan. Plan nodes are returned in pre-order starting - # with the plan root. Each {::Google::Cloud::Spanner::V1::PlanNode PlanNode}'s `id` - # corresponds to its index in `plan_nodes`. - # @!attribute [rw] query_advice - # @return [::Google::Cloud::Spanner::V1::QueryAdvisorResult] - # Optional. The advise/recommendations for a query. Currently this field will - # be serving index recommendations for a query. - class QueryPlan - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/result_set.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/result_set.rb deleted file mode 100644 index 965cab4685b9..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/result_set.rb +++ /dev/null @@ -1,265 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - # Results from {::Google::Cloud::Spanner::V1::Spanner::Client#read Read} or - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}. - # @!attribute [rw] metadata - # @return [::Google::Cloud::Spanner::V1::ResultSetMetadata] - # Metadata about the result set, such as row type information. - # @!attribute [rw] rows - # @return [::Array<::Google::Protobuf::ListValue>] - # Each element in `rows` is a row whose format is defined by - # {::Google::Cloud::Spanner::V1::ResultSetMetadata#row_type metadata.row_type}. The ith - # element in each row matches the ith field in - # {::Google::Cloud::Spanner::V1::ResultSetMetadata#row_type metadata.row_type}. Elements - # are encoded based on type as described {::Google::Cloud::Spanner::V1::TypeCode here}. - # @!attribute [rw] stats - # @return [::Google::Cloud::Spanner::V1::ResultSetStats] - # Query plan and execution statistics for the SQL statement that - # produced this result set. These can be requested by setting - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode}. - # DML statements always produce stats containing the number of rows - # modified, unless executed using the - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::PLAN ExecuteSqlRequest.QueryMode.PLAN} - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode}. - # Other fields might or might not be populated, based on the - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode}. - # @!attribute [rw] precommit_token - # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] - # Optional. A precommit token is included if the read-write transaction is on - # a multiplexed session. Pass the precommit token with the highest sequence - # number from this transaction attempt to the - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} request for this transaction. - # @!attribute [rw] cache_update - # @return [::Google::Cloud::Spanner::V1::CacheUpdate] - # Optional. A cache update expresses a set of changes the client should - # incorporate into its location cache. The client should discard the changes - # if they are older than the data it already has. This data can be obtained - # in response to requests that included a `RoutingHint` field, but may also - # be obtained by explicit location-fetching RPCs which may be added in the - # future. - class ResultSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Partial results from a streaming read or SQL query. Streaming reads and - # SQL queries better tolerate large result sets, large rows, and large - # values, but are a little trickier to consume. - # @!attribute [rw] metadata - # @return [::Google::Cloud::Spanner::V1::ResultSetMetadata] - # Metadata about the result set, such as row type information. - # Only present in the first response. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # A streamed result set consists of a stream of values, which might - # be split into many `PartialResultSet` messages to accommodate - # large rows and/or large values. Every N complete values defines a - # row, where N is equal to the number of entries in - # {::Google::Cloud::Spanner::V1::StructType#fields metadata.row_type.fields}. - # - # Most values are encoded based on type as described - # {::Google::Cloud::Spanner::V1::TypeCode here}. - # - # It's possible that the last value in values is "chunked", - # meaning that the rest of the value is sent in subsequent - # `PartialResultSet`(s). This is denoted by the - # {::Google::Cloud::Spanner::V1::PartialResultSet#chunked_value chunked_value} field. - # Two or more chunked values can be merged to form a complete value as - # follows: - # - # * `bool/number/null`: can't be chunked - # * `string`: concatenate the strings - # * `list`: concatenate the lists. If the last element in a list is a - # `string`, `list`, or `object`, merge it with the first element in - # the next list by applying these rules recursively. - # * `object`: concatenate the (field name, field value) pairs. If a - # field name is duplicated, then apply these rules recursively - # to merge the field values. - # - # Some examples of merging: - # - # Strings are concatenated. - # "foo", "bar" => "foobar" - # - # Lists of non-strings are concatenated. - # [2, 3], [4] => [2, 3, 4] - # - # Lists are concatenated, but the last and first elements are merged - # because they are strings. - # ["a", "b"], ["c", "d"] => ["a", "bc", "d"] - # - # Lists are concatenated, but the last and first elements are merged - # because they are lists. Recursively, the last and first elements - # of the inner lists are merged because they are strings. - # ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] - # - # Non-overlapping object fields are combined. - # {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} - # - # Overlapping object fields are merged. - # {"a": "1"}, {"a": "2"} => {"a": "12"} - # - # Examples of merging objects containing lists of strings. - # {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} - # - # For a more complete example, suppose a streaming SQL query is - # yielding a result set whose rows contain a single string - # field. The following `PartialResultSet`s might be yielded: - # - # { - # "metadata": { ... } - # "values": ["Hello", "W"] - # "chunked_value": true - # "resume_token": "Af65..." - # } - # { - # "values": ["orl"] - # "chunked_value": true - # } - # { - # "values": ["d"] - # "resume_token": "Zx1B..." - # } - # - # This sequence of `PartialResultSet`s encodes two rows, one - # containing the field value `"Hello"`, and a second containing the - # field value `"World" = "W" + "orl" + "d"`. - # - # Not all `PartialResultSet`s contain a `resume_token`. Execution can only be - # resumed from a previously yielded `resume_token`. For the above sequence of - # `PartialResultSet`s, resuming the query with `"resume_token": "Af65..."` - # yields results from the `PartialResultSet` with value "orl". - # @!attribute [rw] chunked_value - # @return [::Boolean] - # If true, then the final value in - # {::Google::Cloud::Spanner::V1::PartialResultSet#values values} is chunked, and must be - # combined with more values from subsequent `PartialResultSet`s to obtain a - # complete field value. - # @!attribute [rw] resume_token - # @return [::String] - # Streaming calls might be interrupted for a variety of reasons, such - # as TCP connection loss. If this occurs, the stream of results can - # be resumed by re-sending the original request and including - # `resume_token`. Note that executing any other transaction in the - # same session invalidates the token. - # @!attribute [rw] stats - # @return [::Google::Cloud::Spanner::V1::ResultSetStats] - # Query plan and execution statistics for the statement that produced this - # streaming result set. These can be requested by setting - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode ExecuteSqlRequest.query_mode} - # and are sent only once with the last response in the stream. This field is - # also present in the last response for DML statements. - # @!attribute [rw] precommit_token - # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] - # Optional. A precommit token is included if the read-write transaction - # has multiplexed sessions enabled. Pass the precommit token with the highest - # sequence number from this transaction attempt to the - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} request for this transaction. - # @!attribute [rw] last - # @return [::Boolean] - # Optional. Indicates whether this is the last `PartialResultSet` in the - # stream. The server might optionally set this field. Clients shouldn't rely - # on this field being set in all cases. - # @!attribute [rw] cache_update - # @return [::Google::Cloud::Spanner::V1::CacheUpdate] - # Optional. A cache update expresses a set of changes the client should - # incorporate into its location cache. The client should discard the changes - # if they are older than the data it already has. This data can be obtained - # in response to requests that included a `RoutingHint` field, but may also - # be obtained by explicit location-fetching RPCs which may be added in the - # future. - class PartialResultSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata about a {::Google::Cloud::Spanner::V1::ResultSet ResultSet} or - # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet}. - # @!attribute [rw] row_type - # @return [::Google::Cloud::Spanner::V1::StructType] - # Indicates the field names and types for the rows in the result - # set. For example, a SQL query like `"SELECT UserId, UserName FROM - # Users"` could return a `row_type` value like: - # - # "fields": [ - # { "name": "UserId", "type": { "code": "INT64" } }, - # { "name": "UserName", "type": { "code": "STRING" } }, - # ] - # @!attribute [rw] transaction - # @return [::Google::Cloud::Spanner::V1::Transaction] - # If the read or SQL query began a transaction as a side-effect, the - # information about the new transaction is yielded here. - # @!attribute [rw] undeclared_parameters - # @return [::Google::Cloud::Spanner::V1::StructType] - # A SQL query can be parameterized. In PLAN mode, these parameters can be - # undeclared. This indicates the field names and types for those undeclared - # parameters in the SQL query. For example, a SQL query like `"SELECT * FROM - # Users where UserId = @userId and UserName = @userName "` could return a - # `undeclared_parameters` value like: - # - # "fields": [ - # { "name": "UserId", "type": { "code": "INT64" } }, - # { "name": "UserName", "type": { "code": "STRING" } }, - # ] - class ResultSetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional statistics about a {::Google::Cloud::Spanner::V1::ResultSet ResultSet} or - # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet}. - # @!attribute [rw] query_plan - # @return [::Google::Cloud::Spanner::V1::QueryPlan] - # {::Google::Cloud::Spanner::V1::QueryPlan QueryPlan} for the query associated with this - # result. - # @!attribute [rw] query_stats - # @return [::Google::Protobuf::Struct] - # Aggregated statistics from the execution of the query. Only present when - # the query is profiled. For example, a query could return the statistics as - # follows: - # - # { - # "rows_returned": "3", - # "elapsed_time": "1.22 secs", - # "cpu_time": "1.19 secs" - # } - # @!attribute [rw] row_count_exact - # @return [::Integer] - # Standard DML returns an exact count of rows that were modified. - # - # Note: The following fields are mutually exclusive: `row_count_exact`, `row_count_lower_bound`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] row_count_lower_bound - # @return [::Integer] - # Partitioned DML doesn't offer exactly-once semantics, so it - # returns a lower bound of the rows modified. - # - # Note: The following fields are mutually exclusive: `row_count_lower_bound`, `row_count_exact`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ResultSetStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/spanner.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/spanner.rb deleted file mode 100644 index e2cb2f86f38a..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/spanner.rb +++ /dev/null @@ -1,1221 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#create_session CreateSession}. - # @!attribute [rw] database - # @return [::String] - # Required. The database in which the new session is created. - # @!attribute [rw] session - # @return [::Google::Cloud::Spanner::V1::Session] - # Required. The session to create. - class CreateSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions BatchCreateSessions}. - # @!attribute [rw] database - # @return [::String] - # Required. The database in which the new sessions are created. - # @!attribute [rw] session_template - # @return [::Google::Cloud::Spanner::V1::Session] - # Parameters to apply to each created session. - # @!attribute [rw] session_count - # @return [::Integer] - # Required. The number of sessions to be created in this batch call. At least - # one session is created. The API can return fewer than the requested number - # of sessions. If a specific number of sessions are desired, the client can - # make additional calls to `BatchCreateSessions` (adjusting - # {::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest#session_count session_count} - # as necessary). - class BatchCreateSessionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions BatchCreateSessions}. - # @!attribute [rw] session - # @return [::Array<::Google::Cloud::Spanner::V1::Session>] - # The freshly created sessions. - class BatchCreateSessionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A session in the Cloud Spanner API. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the session. This is always system-assigned. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The labels for the session. - # - # * Label keys must be between 1 and 63 characters long and must conform to - # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. - # * Label values must be between 0 and 63 characters long and must conform - # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. - # * No more than 64 labels can be associated with a given session. - # - # See https://goo.gl/xmQnxf for more information on and examples of labels. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the session is created. - # @!attribute [r] approximate_last_use_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The approximate timestamp when the session is last used. It's - # typically earlier than the actual last use time. - # @!attribute [rw] creator_role - # @return [::String] - # The database role which created this session. - # @!attribute [rw] multiplexed - # @return [::Boolean] - # Optional. If `true`, specifies a multiplexed session. Use a multiplexed - # session for multiple, concurrent operations including any combination of - # read-only and read-write transactions. Use - # {::Google::Cloud::Spanner::V1::Spanner::Client#create_session `sessions.create`} to create - # multiplexed sessions. Don't use - # {::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions BatchCreateSessions} to - # create a multiplexed session. You can't delete or list multiplexed - # sessions. - class Session - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#get_session GetSession}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the session to retrieve. - class GetSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#list_sessions ListSessions}. - # @!attribute [rw] database - # @return [::String] - # Required. The database in which to list sessions. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of sessions to be returned in the response. If 0 or less, defaults - # to the server's maximum allowed page size. - # @!attribute [rw] page_token - # @return [::String] - # If non-empty, `page_token` should contain a - # {::Google::Cloud::Spanner::V1::ListSessionsResponse#next_page_token next_page_token} - # from a previous - # {::Google::Cloud::Spanner::V1::ListSessionsResponse ListSessionsResponse}. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # - # * `labels.key` where key is the name of a label - # - # Some examples of using filters are: - # - # * `labels.env:*` --> The session has the label "env". - # * `labels.env:dev` --> The session has the label "env" and the value of - # the label contains the string "dev". - class ListSessionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for {::Google::Cloud::Spanner::V1::Spanner::Client#list_sessions ListSessions}. - # @!attribute [rw] sessions - # @return [::Array<::Google::Cloud::Spanner::V1::Session>] - # The list of requested sessions. - # @!attribute [rw] next_page_token - # @return [::String] - # `next_page_token` can be sent in a subsequent - # {::Google::Cloud::Spanner::V1::Spanner::Client#list_sessions ListSessions} call to fetch more - # of the matching sessions. - class ListSessionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#delete_session DeleteSession}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the session to delete. - class DeleteSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Common request options for various APIs. - # @!attribute [rw] priority - # @return [::Google::Cloud::Spanner::V1::RequestOptions::Priority] - # Priority for the request. - # @!attribute [rw] request_tag - # @return [::String] - # A per-request tag which can be applied to queries or reads, used for - # statistics collection. - # Both `request_tag` and `transaction_tag` can be specified for a read or - # query that belongs to a transaction. - # This field is ignored for requests where it's not applicable (for example, - # `CommitRequest`). - # Legal characters for `request_tag` values are all printable characters - # (ASCII 32 - 126) and the length of a request_tag is limited to 50 - # characters. Values that exceed this limit are truncated. - # Any leading underscore (_) characters are removed from the string. - # @!attribute [rw] transaction_tag - # @return [::String] - # A tag used for statistics collection about this transaction. - # Both `request_tag` and `transaction_tag` can be specified for a read or - # query that belongs to a transaction. - # To enable tagging on a transaction, `transaction_tag` must be set to the - # same value for all requests belonging to the same transaction, including - # {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction}. - # If this request doesn't belong to any transaction, `transaction_tag` is - # ignored. - # Legal characters for `transaction_tag` values are all printable characters - # (ASCII 32 - 126) and the length of a `transaction_tag` is limited to 50 - # characters. Values that exceed this limit are truncated. - # Any leading underscore (_) characters are removed from the string. - # @!attribute [rw] client_context - # @return [::Google::Cloud::Spanner::V1::RequestOptions::ClientContext] - # Optional. Optional context that may be needed for some requests. - class RequestOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Container for various pieces of client-owned context attached to a request. - # @!attribute [rw] secure_context - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Optional. Map of parameter name to value for this request. These values - # will be returned by any SECURE_CONTEXT() calls invoked by this request - # (e.g., by queries against Parameterized Secure Views). - class ClientContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class SecureContextEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The relative priority for requests. Note that priority isn't applicable - # for {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction}. - # - # The priority acts as a hint to the Cloud Spanner scheduler and doesn't - # guarantee priority or order of execution. For example: - # - # * Some parts of a write operation always execute at `PRIORITY_HIGH`, - # regardless of the specified priority. This can cause you to see an - # increase in high priority workload even when executing a low priority - # request. This can also potentially cause a priority inversion where a - # lower priority request is fulfilled ahead of a higher priority - # request. - # * If a transaction contains multiple operations with different priorities, - # Cloud Spanner doesn't guarantee to process the higher priority - # operations first. There might be other constraints to satisfy, such as - # the order of operations. - module Priority - # `PRIORITY_UNSPECIFIED` is equivalent to `PRIORITY_HIGH`. - PRIORITY_UNSPECIFIED = 0 - - # This specifies that the request is low priority. - PRIORITY_LOW = 1 - - # This specifies that the request is medium priority. - PRIORITY_MEDIUM = 2 - - # This specifies that the request is high priority. - PRIORITY_HIGH = 3 - end - end - - # The `DirectedReadOptions` can be used to indicate which replicas or regions - # should be used for non-transactional reads or queries. - # - # `DirectedReadOptions` can only be specified for a read-only transaction, - # otherwise the API returns an `INVALID_ARGUMENT` error. - # @!attribute [rw] include_replicas - # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions::IncludeReplicas] - # `Include_replicas` indicates the order of replicas (as they appear in - # this list) to process the request. If `auto_failover_disabled` is set to - # `true` and all replicas are exhausted without finding a healthy replica, - # Spanner waits for a replica in the list to become available, requests - # might fail due to `DEADLINE_EXCEEDED` errors. - # - # Note: The following fields are mutually exclusive: `include_replicas`, `exclude_replicas`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exclude_replicas - # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions::ExcludeReplicas] - # `Exclude_replicas` indicates that specified replicas should be excluded - # from serving requests. Spanner doesn't route requests to the replicas - # in this list. - # - # Note: The following fields are mutually exclusive: `exclude_replicas`, `include_replicas`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DirectedReadOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The directed read replica selector. - # Callers must provide one or more of the following fields for replica - # selection: - # - # * `location` - The location must be one of the regions within the - # multi-region configuration of your database. - # * `type` - The type of the replica. - # - # Some examples of using replica_selectors are: - # - # * `location:us-east1` --> The "us-east1" replica(s) of any available type - # is used to process the request. - # * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in the nearest - # available location are used to process the - # request. - # * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) - # in location "us-east1" is used to process - # the request. - # @!attribute [rw] location - # @return [::String] - # The location or region of the serving requests, for example, "us-east1". - # @!attribute [rw] type - # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions::ReplicaSelection::Type] - # The type of replica. - class ReplicaSelection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates the type of replica. - module Type - # Not specified. - TYPE_UNSPECIFIED = 0 - - # Read-write replicas support both reads and writes. - READ_WRITE = 1 - - # Read-only replicas only support reads (not writes). - READ_ONLY = 2 - end - end - - # An `IncludeReplicas` contains a repeated set of `ReplicaSelection` which - # indicates the order in which replicas should be considered. - # @!attribute [rw] replica_selections - # @return [::Array<::Google::Cloud::Spanner::V1::DirectedReadOptions::ReplicaSelection>] - # The directed read replica selector. - # @!attribute [rw] auto_failover_disabled - # @return [::Boolean] - # If `true`, Spanner doesn't route requests to a replica outside the - # <`include_replicas` list when all of the specified replicas are - # unavailable or unhealthy. Default value is `false`. - class IncludeReplicas - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An ExcludeReplicas contains a repeated set of ReplicaSelection that should - # be excluded from serving requests. - # @!attribute [rw] replica_selections - # @return [::Array<::Google::Cloud::Spanner::V1::DirectedReadOptions::ReplicaSelection>] - # The directed read replica selector. - class ExcludeReplicas - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} and - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql ExecuteStreamingSql}. - # @!attribute [rw] session - # @return [::String] - # Required. The session in which the SQL query should be performed. - # @!attribute [rw] transaction - # @return [::Google::Cloud::Spanner::V1::TransactionSelector] - # The transaction to use. - # - # For queries, if none is provided, the default is a temporary read-only - # transaction with strong concurrency. - # - # Standard DML statements require a read-write transaction. To protect - # against replays, single-use transactions are not supported. The caller - # must either supply an existing transaction ID or begin a new transaction. - # - # Partitioned DML requires an existing Partitioned DML transaction ID. - # @!attribute [rw] sql - # @return [::String] - # Required. The SQL string. - # @!attribute [rw] params - # @return [::Google::Protobuf::Struct] - # Parameter names and values that bind to placeholders in the SQL string. - # - # A parameter placeholder consists of the `@` character followed by the - # parameter name (for example, `@firstName`). Parameter names must conform - # to the naming requirements of identifiers as specified at - # https://cloud.google.com/spanner/docs/lexical#identifiers. - # - # Parameters can appear anywhere that a literal value is expected. The same - # parameter name can be used more than once, for example: - # - # `"WHERE id > @msg_id AND id < @msg_id + 100"` - # - # It's an error to execute a SQL statement with unbound parameters. - # @!attribute [rw] param_types - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}] - # It isn't always possible for Cloud Spanner to infer the right SQL type - # from a JSON value. For example, values of type `BYTES` and values - # of type `STRING` both appear in - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#params params} as JSON strings. - # - # In these cases, you can use `param_types` to specify the exact - # SQL type for some or all of the SQL statement parameters. See the - # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information - # about SQL types. - # @!attribute [rw] resume_token - # @return [::String] - # If this request is resuming a previously interrupted SQL statement - # execution, `resume_token` should be copied from the last - # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the - # interruption. Doing this enables the new SQL statement execution to resume - # where the last one left off. The rest of the request parameters must - # exactly match the request that yielded this token. - # @!attribute [rw] query_mode - # @return [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode] - # Used to control the amount of debugging information returned in - # {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats}. If - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#partition_token partition_token} is - # set, {::Google::Cloud::Spanner::V1::ExecuteSqlRequest#query_mode query_mode} can only - # be set to - # {::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryMode::NORMAL QueryMode.NORMAL}. - # @!attribute [rw] partition_token - # @return [::String] - # If present, results are restricted to the specified partition - # previously created using `PartitionQuery`. There must be an exact - # match for the values of fields common to this message and the - # `PartitionQueryRequest` message used to create this `partition_token`. - # @!attribute [rw] seqno - # @return [::Integer] - # A per-transaction sequence number used to identify this request. This field - # makes each request idempotent such that if the request is received multiple - # times, at most one succeeds. - # - # The sequence number must be monotonically increasing within the - # transaction. If a request arrives for the first time with an out-of-order - # sequence number, the transaction can be aborted. Replays of previously - # handled requests yield the same response as the first execution. - # - # Required for DML statements. Ignored for queries. - # @!attribute [rw] query_options - # @return [::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions] - # Query optimizer configuration to use for the given query. - # @!attribute [rw] request_options - # @return [::Google::Cloud::Spanner::V1::RequestOptions] - # Common options for this request. - # @!attribute [rw] directed_read_options - # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions] - # Directed read options for this request. - # @!attribute [rw] data_boost_enabled - # @return [::Boolean] - # If this is for a partitioned query and this field is set to `true`, the - # request is executed with Spanner Data Boost independent compute resources. - # - # If the field is set to `true` but the request doesn't set - # `partition_token`, the API returns an `INVALID_ARGUMENT` error. - # @!attribute [rw] last_statement - # @return [::Boolean] - # Optional. If set to `true`, this statement marks the end of the - # transaction. After this statement executes, you must commit or abort the - # transaction. Attempts to execute any other requests against this - # transaction (including reads and queries) are rejected. - # - # For DML statements, setting this option might cause some error reporting to - # be deferred until commit time (for example, validation of unique - # constraints). Given this, successful execution of a DML statement shouldn't - # be assumed until a subsequent `Commit` call completes successfully. - # @!attribute [rw] routing_hint - # @return [::Google::Cloud::Spanner::V1::RoutingHint] - # Optional. Makes the Spanner requests location-aware if present. - # - # It gives the server hints that can be used to route the request - # to an appropriate server, potentially significantly decreasing latency and - # improving throughput. To achieve improved performance, most fields must be - # filled in with accurate values. - class ExecuteSqlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Query optimizer configuration. - # @!attribute [rw] optimizer_version - # @return [::String] - # An option to control the selection of optimizer version. - # - # This parameter allows individual queries to pick different query - # optimizer versions. - # - # Specifying `latest` as a value instructs Cloud Spanner to use the - # latest supported query optimizer version. If not specified, Cloud Spanner - # uses the optimizer version set at the database level options. Any other - # positive integer (from the list of supported optimizer versions) - # overrides the default optimizer version for query execution. - # - # The list of supported optimizer versions can be queried from - # `SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS`. - # - # Executing a SQL statement with an invalid optimizer version fails with - # an `INVALID_ARGUMENT` error. - # - # See - # https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer - # for more information on managing the query optimizer. - # - # The `optimizer_version` statement hint has precedence over this setting. - # @!attribute [rw] optimizer_statistics_package - # @return [::String] - # An option to control the selection of optimizer statistics package. - # - # This parameter allows individual queries to use a different query - # optimizer statistics package. - # - # Specifying `latest` as a value instructs Cloud Spanner to use the latest - # generated statistics package. If not specified, Cloud Spanner uses - # the statistics package set at the database level options, or the latest - # package if the database option isn't set. - # - # The statistics package requested by the query has to be exempt from - # garbage collection. This can be achieved with the following DDL - # statement: - # - # ```sql - # ALTER STATISTICS SET OPTIONS (allow_gc=false) - # ``` - # - # The list of available statistics packages can be queried from - # `INFORMATION_SCHEMA.SPANNER_STATISTICS`. - # - # Executing a SQL statement with an invalid optimizer statistics package - # or with a statistics package that allows garbage collection fails with - # an `INVALID_ARGUMENT` error. - class QueryOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Spanner::V1::Type] - class ParamTypesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Mode in which the statement must be processed. - module QueryMode - # The default mode. Only the statement results are returned. - NORMAL = 0 - - # This mode returns only the query plan, without any results or - # execution statistics information. - PLAN = 1 - - # This mode returns the query plan, overall execution statistics, - # operator level execution statistics along with the results. This has a - # performance overhead compared to the other modes. It isn't recommended - # to use this mode for production traffic. - PROFILE = 2 - - # This mode returns the overall (but not operator-level) execution - # statistics along with the results. - WITH_STATS = 3 - - # This mode returns the query plan, overall (but not operator-level) - # execution statistics along with the results. - WITH_PLAN_AND_STATS = 4 - end - end - - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml ExecuteBatchDml}. - # @!attribute [rw] session - # @return [::String] - # Required. The session in which the DML statements should be performed. - # @!attribute [rw] transaction - # @return [::Google::Cloud::Spanner::V1::TransactionSelector] - # Required. The transaction to use. Must be a read-write transaction. - # - # To protect against replays, single-use transactions are not supported. The - # caller must either supply an existing transaction ID or begin a new - # transaction. - # @!attribute [rw] statements - # @return [::Array<::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement>] - # Required. The list of statements to execute in this batch. Statements are - # executed serially, such that the effects of statement `i` are visible to - # statement `i+1`. Each statement must be a DML statement. Execution stops at - # the first failed statement; the remaining statements are not executed. - # - # Callers must provide at least one statement. - # @!attribute [rw] seqno - # @return [::Integer] - # Required. A per-transaction sequence number used to identify this request. - # This field makes each request idempotent such that if the request is - # received multiple times, at most one succeeds. - # - # The sequence number must be monotonically increasing within the - # transaction. If a request arrives for the first time with an out-of-order - # sequence number, the transaction might be aborted. Replays of previously - # handled requests yield the same response as the first execution. - # @!attribute [rw] request_options - # @return [::Google::Cloud::Spanner::V1::RequestOptions] - # Common options for this request. - # @!attribute [rw] last_statements - # @return [::Boolean] - # Optional. If set to `true`, this request marks the end of the transaction. - # After these statements execute, you must commit or abort the transaction. - # Attempts to execute any other requests against this transaction - # (including reads and queries) are rejected. - # - # Setting this option might cause some error reporting to be deferred until - # commit time (for example, validation of unique constraints). Given this, - # successful execution of statements shouldn't be assumed until a subsequent - # `Commit` call completes successfully. - class ExecuteBatchDmlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A single DML statement. - # @!attribute [rw] sql - # @return [::String] - # Required. The DML string. - # @!attribute [rw] params - # @return [::Google::Protobuf::Struct] - # Parameter names and values that bind to placeholders in the DML string. - # - # A parameter placeholder consists of the `@` character followed by the - # parameter name (for example, `@firstName`). Parameter names can contain - # letters, numbers, and underscores. - # - # Parameters can appear anywhere that a literal value is expected. The - # same parameter name can be used more than once, for example: - # - # `"WHERE id > @msg_id AND id < @msg_id + 100"` - # - # It's an error to execute a SQL statement with unbound parameters. - # @!attribute [rw] param_types - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}] - # It isn't always possible for Cloud Spanner to infer the right SQL type - # from a JSON value. For example, values of type `BYTES` and values - # of type `STRING` both appear in - # {::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement#params params} as - # JSON strings. - # - # In these cases, `param_types` can be used to specify the exact - # SQL type for some or all of the SQL statement parameters. See the - # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information - # about SQL types. - class Statement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Spanner::V1::Type] - class ParamTypesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # The response for - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml ExecuteBatchDml}. Contains a list - # of {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, one for each DML - # statement that has successfully executed, in the same order as the statements - # in the request. If a statement fails, the status in the response body - # identifies the cause of the failure. - # - # To check for DML statements that failed, use the following approach: - # - # 1. Check the status in the response message. The - # [google.rpc.Code][google.rpc.Code] enum - # value `OK` indicates that all statements were executed successfully. - # 2. If the status was not `OK`, check the number of result sets in the - # response. If the response contains `N` - # {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, then statement `N+1` in - # the request failed. - # - # Example 1: - # - # * Request: 5 DML statements, all executed successfully. - # * Response: 5 {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, with the - # status `OK`. - # - # Example 2: - # - # * Request: 5 DML statements. The third statement has a syntax error. - # * Response: 2 {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages, and a syntax - # error (`INVALID_ARGUMENT`) - # status. The number of {::Google::Cloud::Spanner::V1::ResultSet ResultSet} messages - # indicates that the third statement failed, and the fourth and fifth - # statements were not executed. - # @!attribute [rw] result_sets - # @return [::Array<::Google::Cloud::Spanner::V1::ResultSet>] - # One {::Google::Cloud::Spanner::V1::ResultSet ResultSet} for each statement in the - # request that ran successfully, in the same order as the statements in the - # request. Each {::Google::Cloud::Spanner::V1::ResultSet ResultSet} does not contain any - # rows. The {::Google::Cloud::Spanner::V1::ResultSetStats ResultSetStats} in each - # {::Google::Cloud::Spanner::V1::ResultSet ResultSet} contain the number of rows - # modified by the statement. - # - # Only the first {::Google::Cloud::Spanner::V1::ResultSet ResultSet} in the response - # contains valid {::Google::Cloud::Spanner::V1::ResultSetMetadata ResultSetMetadata}. - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # If all DML statements are executed successfully, the status is `OK`. - # Otherwise, the error status of the first failed statement. - # @!attribute [rw] precommit_token - # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] - # Optional. A precommit token is included if the read-write transaction - # is on a multiplexed session. Pass the precommit token with the highest - # sequence number from this transaction attempt should be passed to the - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} request for this transaction. - class ExecuteBatchDmlResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options for a `PartitionQueryRequest` and `PartitionReadRequest`. - # @!attribute [rw] partition_size_bytes - # @return [::Integer] - # **Note:** This hint is currently ignored by `PartitionQuery` and - # `PartitionRead` requests. - # - # The desired data size for each partition generated. The default for this - # option is currently 1 GiB. This is only a hint. The actual size of each - # partition can be smaller or larger than this size request. - # @!attribute [rw] max_partitions - # @return [::Integer] - # **Note:** This hint is currently ignored by `PartitionQuery` and - # `PartitionRead` requests. - # - # The desired maximum number of partitions to return. For example, this - # might be set to the number of workers available. The default for this - # option is currently 10,000. The maximum value is currently 200,000. This - # is only a hint. The actual number of partitions returned can be smaller or - # larger than this maximum count request. - class PartitionOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#partition_query PartitionQuery} - # @!attribute [rw] session - # @return [::String] - # Required. The session used to create the partitions. - # @!attribute [rw] transaction - # @return [::Google::Cloud::Spanner::V1::TransactionSelector] - # Read-only snapshot transactions are supported, read and write and - # single-use transactions are not. - # @!attribute [rw] sql - # @return [::String] - # Required. The query request to generate partitions for. The request fails - # if the query isn't root partitionable. For a query to be root - # partitionable, it needs to satisfy a few conditions. For example, if the - # query execution plan contains a distributed union operator, then it must be - # the first operator in the plan. For more information about other - # conditions, see [Read data in - # parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). - # - # The query request must not contain DML commands, such as `INSERT`, - # `UPDATE`, or `DELETE`. Use - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql `ExecuteStreamingSql`} with - # a `PartitionedDml` transaction for large, partition-friendly DML - # operations. - # @!attribute [rw] params - # @return [::Google::Protobuf::Struct] - # Optional. Parameter names and values that bind to placeholders in the SQL - # string. - # - # A parameter placeholder consists of the `@` character followed by the - # parameter name (for example, `@firstName`). Parameter names can contain - # letters, numbers, and underscores. - # - # Parameters can appear anywhere that a literal value is expected. The same - # parameter name can be used more than once, for example: - # - # `"WHERE id > @msg_id AND id < @msg_id + 100"` - # - # It's an error to execute a SQL statement with unbound parameters. - # @!attribute [rw] param_types - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Spanner::V1::Type}] - # Optional. It isn't always possible for Cloud Spanner to infer the right SQL - # type from a JSON value. For example, values of type `BYTES` and values of - # type `STRING` both appear in - # {::Google::Cloud::Spanner::V1::PartitionQueryRequest#params params} as JSON strings. - # - # In these cases, `param_types` can be used to specify the exact - # SQL type for some or all of the SQL query parameters. See the - # definition of {::Google::Cloud::Spanner::V1::Type Type} for more information - # about SQL types. - # @!attribute [rw] partition_options - # @return [::Google::Cloud::Spanner::V1::PartitionOptions] - # Additional options that affect how many partitions are created. - class PartitionQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Spanner::V1::Type] - class ParamTypesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#partition_read PartitionRead} - # @!attribute [rw] session - # @return [::String] - # Required. The session used to create the partitions. - # @!attribute [rw] transaction - # @return [::Google::Cloud::Spanner::V1::TransactionSelector] - # Read only snapshot transactions are supported, read/write and single use - # transactions are not. - # @!attribute [rw] table - # @return [::String] - # Required. The name of the table in the database to be read. - # @!attribute [rw] index - # @return [::String] - # If non-empty, the name of an index on - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table}. This index is used - # instead of the table primary key when interpreting - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} and sorting - # result rows. See {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} - # for further information. - # @!attribute [rw] columns - # @return [::Array<::String>] - # The columns of {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be - # returned for each row matching this request. - # @!attribute [rw] key_set - # @return [::Google::Cloud::Spanner::V1::KeySet] - # Required. `key_set` identifies the rows to be yielded. `key_set` names the - # primary keys of the rows in - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#table table} to be yielded, unless - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present. If - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index} is present, then - # {::Google::Cloud::Spanner::V1::PartitionReadRequest#key_set key_set} instead names - # index keys in {::Google::Cloud::Spanner::V1::PartitionReadRequest#index index}. - # - # It isn't an error for the `key_set` to name rows that don't - # exist in the database. Read yields nothing for nonexistent rows. - # @!attribute [rw] partition_options - # @return [::Google::Cloud::Spanner::V1::PartitionOptions] - # Additional options that affect how many partitions are created. - class PartitionReadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information returned for each partition returned in a - # PartitionResponse. - # @!attribute [rw] partition_token - # @return [::String] - # This token can be passed to `Read`, `StreamingRead`, `ExecuteSql`, or - # `ExecuteStreamingSql` requests to restrict the results to those identified - # by this partition token. - class Partition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for {::Google::Cloud::Spanner::V1::Spanner::Client#partition_query PartitionQuery} - # or {::Google::Cloud::Spanner::V1::Spanner::Client#partition_read PartitionRead} - # @!attribute [rw] partitions - # @return [::Array<::Google::Cloud::Spanner::V1::Partition>] - # Partitions created by this request. - # @!attribute [rw] transaction - # @return [::Google::Cloud::Spanner::V1::Transaction] - # Transaction created by this request. - class PartitionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#read Read} and - # {::Google::Cloud::Spanner::V1::Spanner::Client#streaming_read StreamingRead}. - # @!attribute [rw] session - # @return [::String] - # Required. The session in which the read should be performed. - # @!attribute [rw] transaction - # @return [::Google::Cloud::Spanner::V1::TransactionSelector] - # The transaction to use. If none is provided, the default is a - # temporary read-only transaction with strong concurrency. - # @!attribute [rw] table - # @return [::String] - # Required. The name of the table in the database to be read. - # @!attribute [rw] index - # @return [::String] - # If non-empty, the name of an index on - # {::Google::Cloud::Spanner::V1::ReadRequest#table table}. This index is used instead of - # the table primary key when interpreting - # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} and sorting result rows. - # See {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} for further - # information. - # @!attribute [rw] columns - # @return [::Array<::String>] - # Required. The columns of {::Google::Cloud::Spanner::V1::ReadRequest#table table} to be - # returned for each row matching this request. - # @!attribute [rw] key_set - # @return [::Google::Cloud::Spanner::V1::KeySet] - # Required. `key_set` identifies the rows to be yielded. `key_set` names the - # primary keys of the rows in {::Google::Cloud::Spanner::V1::ReadRequest#table table} to - # be yielded, unless {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present. - # If {::Google::Cloud::Spanner::V1::ReadRequest#index index} is present, then - # {::Google::Cloud::Spanner::V1::ReadRequest#key_set key_set} instead names index keys - # in {::Google::Cloud::Spanner::V1::ReadRequest#index index}. - # - # If the {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} - # field is empty, rows are yielded in table primary key order (if - # {::Google::Cloud::Spanner::V1::ReadRequest#index index} is empty) or index key order - # (if {::Google::Cloud::Spanner::V1::ReadRequest#index index} is non-empty). If the - # {::Google::Cloud::Spanner::V1::ReadRequest#partition_token partition_token} field - # isn't empty, rows are yielded in an unspecified order. - # - # It isn't an error for the `key_set` to name rows that don't - # exist in the database. Read yields nothing for nonexistent rows. - # @!attribute [rw] limit - # @return [::Integer] - # If greater than zero, only the first `limit` rows are yielded. If `limit` - # is zero, the default is no limit. A limit can't be specified if - # `partition_token` is set. - # @!attribute [rw] resume_token - # @return [::String] - # If this request is resuming a previously interrupted read, - # `resume_token` should be copied from the last - # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} yielded before the - # interruption. Doing this enables the new read to resume where the last read - # left off. The rest of the request parameters must exactly match the request - # that yielded this token. - # @!attribute [rw] partition_token - # @return [::String] - # If present, results are restricted to the specified partition - # previously created using `PartitionRead`. There must be an exact - # match for the values of fields common to this message and the - # PartitionReadRequest message used to create this partition_token. - # @!attribute [rw] request_options - # @return [::Google::Cloud::Spanner::V1::RequestOptions] - # Common options for this request. - # @!attribute [rw] directed_read_options - # @return [::Google::Cloud::Spanner::V1::DirectedReadOptions] - # Directed read options for this request. - # @!attribute [rw] data_boost_enabled - # @return [::Boolean] - # If this is for a partitioned read and this field is set to `true`, the - # request is executed with Spanner Data Boost independent compute resources. - # - # If the field is set to `true` but the request doesn't set - # `partition_token`, the API returns an `INVALID_ARGUMENT` error. - # @!attribute [rw] order_by - # @return [::Google::Cloud::Spanner::V1::ReadRequest::OrderBy] - # Optional. Order for the returned rows. - # - # By default, Spanner returns result rows in primary key order except for - # PartitionRead requests. For applications that don't require rows to be - # returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting - # `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval, - # resulting in lower latencies in certain cases (for example, bulk point - # lookups). - # @!attribute [rw] lock_hint - # @return [::Google::Cloud::Spanner::V1::ReadRequest::LockHint] - # Optional. Lock Hint for the request, it can only be used with read-write - # transactions. - # @!attribute [rw] routing_hint - # @return [::Google::Cloud::Spanner::V1::RoutingHint] - # Optional. Makes the Spanner requests location-aware if present. - # - # It gives the server hints that can be used to route the request - # to an appropriate server, potentially significantly decreasing latency and - # improving throughput. To achieve improved performance, most fields must be - # filled in with accurate values. - class ReadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An option to control the order in which rows are returned from a read. - module OrderBy - # Default value. - # - # `ORDER_BY_UNSPECIFIED` is equivalent to `ORDER_BY_PRIMARY_KEY`. - ORDER_BY_UNSPECIFIED = 0 - - # Read rows are returned in primary key order. - # - # In the event that this option is used in conjunction with the - # `partition_token` field, the API returns an `INVALID_ARGUMENT` error. - ORDER_BY_PRIMARY_KEY = 1 - - # Read rows are returned in any order. - ORDER_BY_NO_ORDER = 2 - end - - # A lock hint mechanism for reads done within a transaction. - module LockHint - # Default value. - # - # `LOCK_HINT_UNSPECIFIED` is equivalent to `LOCK_HINT_SHARED`. - LOCK_HINT_UNSPECIFIED = 0 - - # Acquire shared locks. - # - # By default when you perform a read as part of a read-write transaction, - # Spanner acquires shared read locks, which allows other reads to still - # access the data until your transaction is ready to commit. When your - # transaction is committing and writes are being applied, the transaction - # attempts to upgrade to an exclusive lock for any data you are writing. - # For more information about locks, see [Lock - # modes](https://cloud.google.com/spanner/docs/introspection/lock-statistics#explain-lock-modes). - LOCK_HINT_SHARED = 1 - - # Acquire exclusive locks. - # - # Requesting exclusive locks is beneficial if you observe high write - # contention, which means you notice that multiple transactions are - # concurrently trying to read and write to the same data, resulting in a - # large number of aborts. This problem occurs when two transactions - # initially acquire shared locks and then both try to upgrade to exclusive - # locks at the same time. In this situation both transactions are waiting - # for the other to give up their lock, resulting in a deadlocked situation. - # Spanner is able to detect this occurring and force one of the - # transactions to abort. However, this is a slow and expensive operation - # and results in lower performance. In this case it makes sense to acquire - # exclusive locks at the start of the transaction because then when - # multiple transactions try to act on the same data, they automatically get - # serialized. Each transaction waits its turn to acquire the lock and - # avoids getting into deadlock situations. - # - # Because the exclusive lock hint is just a hint, it shouldn't be - # considered equivalent to a mutex. In other words, you shouldn't use - # Spanner exclusive locks as a mutual exclusion mechanism for the execution - # of code outside of Spanner. - # - # **Note:** Request exclusive locks judiciously because they block others - # from reading that data for the entire transaction, rather than just when - # the writes are being performed. Unless you observe high write contention, - # you should use the default of shared read locks so you don't prematurely - # block other clients from reading the data that you're writing to. - LOCK_HINT_EXCLUSIVE = 2 - end - end - - # The request for - # {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction}. - # @!attribute [rw] session - # @return [::String] - # Required. The session in which the transaction runs. - # @!attribute [rw] options - # @return [::Google::Cloud::Spanner::V1::TransactionOptions] - # Required. Options for the new transaction. - # @!attribute [rw] request_options - # @return [::Google::Cloud::Spanner::V1::RequestOptions] - # Common options for this request. - # Priority is ignored for this request. Setting the priority in this - # `request_options` struct doesn't do anything. To set the priority for a - # transaction, set it on the reads and writes that are part of this - # transaction instead. - # @!attribute [rw] mutation_key - # @return [::Google::Cloud::Spanner::V1::Mutation] - # Optional. Required for read-write transactions on a multiplexed session - # that commit mutations but don't perform any reads or queries. You must - # randomly select one of the mutations from the mutation set and send it as a - # part of this request. - # @!attribute [rw] routing_hint - # @return [::Google::Cloud::Spanner::V1::RoutingHint] - # Optional. Makes the Spanner requests location-aware if present. - # - # It gives the server hints that can be used to route the request - # to an appropriate server, potentially significantly decreasing latency and - # improving throughput. To achieve improved performance, most fields must be - # filled in with accurate values. - class BeginTransactionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit}. - # @!attribute [rw] session - # @return [::String] - # Required. The session in which the transaction to be committed is running. - # @!attribute [rw] transaction_id - # @return [::String] - # Commit a previously-started transaction. - # - # Note: The following fields are mutually exclusive: `transaction_id`, `single_use_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] single_use_transaction - # @return [::Google::Cloud::Spanner::V1::TransactionOptions] - # Execute mutations in a temporary transaction. Note that unlike - # commit of a previously-started transaction, commit with a - # temporary transaction is non-idempotent. That is, if the - # `CommitRequest` is sent to Cloud Spanner more than once (for - # instance, due to retries in the application, or in the - # transport library), it's possible that the mutations are - # executed more than once. If this is undesirable, use - # {::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction BeginTransaction} and - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} instead. - # - # Note: The following fields are mutually exclusive: `single_use_transaction`, `transaction_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mutations - # @return [::Array<::Google::Cloud::Spanner::V1::Mutation>] - # The mutations to be executed when this transaction commits. All - # mutations are applied atomically, in the order they appear in - # this list. - # @!attribute [rw] return_commit_stats - # @return [::Boolean] - # If `true`, then statistics related to the transaction is included in - # the {::Google::Cloud::Spanner::V1::CommitResponse#commit_stats CommitResponse}. - # Default value is `false`. - # @!attribute [rw] max_commit_delay - # @return [::Google::Protobuf::Duration] - # Optional. The amount of latency this request is configured to incur in - # order to improve throughput. If this field isn't set, Spanner assumes - # requests are relatively latency sensitive and automatically determines an - # appropriate delay time. You can specify a commit delay value between 0 and - # 500 ms. - # @!attribute [rw] request_options - # @return [::Google::Cloud::Spanner::V1::RequestOptions] - # Common options for this request. - # @!attribute [rw] precommit_token - # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] - # Optional. If the read-write transaction was executed on a multiplexed - # session, then you must include the precommit token with the highest - # sequence number received in this transaction attempt. Failing to do so - # results in a `FailedPrecondition` error. - # @!attribute [rw] routing_hint - # @return [::Google::Cloud::Spanner::V1::RoutingHint] - # Optional. Makes the Spanner requests location-aware if present. - # - # It gives the server hints that can be used to route the request - # to an appropriate server, potentially significantly decreasing latency and - # improving throughput. To achieve improved performance, most fields must be - # filled in with accurate values. - class CommitRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback}. - # @!attribute [rw] session - # @return [::String] - # Required. The session in which the transaction to roll back is running. - # @!attribute [rw] transaction_id - # @return [::String] - # Required. The transaction to roll back. - class RollbackRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for {::Google::Cloud::Spanner::V1::Spanner::Client#batch_write BatchWrite}. - # @!attribute [rw] session - # @return [::String] - # Required. The session in which the batch request is to be run. - # @!attribute [rw] request_options - # @return [::Google::Cloud::Spanner::V1::RequestOptions] - # Common options for this request. - # @!attribute [rw] mutation_groups - # @return [::Array<::Google::Cloud::Spanner::V1::BatchWriteRequest::MutationGroup>] - # Required. The groups of mutations to be applied. - # @!attribute [rw] exclude_txn_from_change_streams - # @return [::Boolean] - # Optional. If you don't set the `exclude_txn_from_change_streams` option or - # if it's set to `false`, then any change streams monitoring columns modified - # by transactions will capture the updates made within that transaction. - class BatchWriteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A group of mutations to be committed together. Related mutations should be - # placed in a group. For example, two mutations inserting rows with the same - # primary key prefix in both parent and child tables are related. - # @!attribute [rw] mutations - # @return [::Array<::Google::Cloud::Spanner::V1::Mutation>] - # Required. The mutations in this group. - class MutationGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The result of applying a batch of mutations. - # @!attribute [rw] indexes - # @return [::Array<::Integer>] - # The mutation groups applied in this batch. The values index into the - # `mutation_groups` field in the corresponding `BatchWriteRequest`. - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # An `OK` status indicates success. Any other status indicates a failure. - # @!attribute [rw] commit_timestamp - # @return [::Google::Protobuf::Timestamp] - # The commit timestamp of the transaction that applied this batch. - # Present if status is OK and the mutation groups were applied, absent - # otherwise. - # - # For mutation groups with conditions, a status=OK and missing - # commit_timestamp means that the mutation groups were not applied due to the - # condition not being satisfied after evaluation. - class BatchWriteResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Spanner::V1::Spanner::Client#fetch_cache_update FetchCacheUpdate}. - # @!attribute [rw] database - # @return [::String] - # Required. The database for which to retrieve the cache update. - # @!attribute [rw] max_recipe_count - # @return [::Integer] - # Optional. The maximum number of key recipes to return in the response. - # If not set, a default limit of 100 will be used. - # @!attribute [rw] max_range_count - # @return [::Integer] - # Optional. The maximum number of ranges to return in the response. - # If not set, a default limit of 10000 will be used. - class FetchCacheUpdateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb deleted file mode 100644 index 53ec83e49080..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/transaction.rb +++ /dev/null @@ -1,357 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - # Options to use for transactions. - # @!attribute [rw] read_write - # @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite] - # Transaction may write. - # - # Authorization to begin a read-write transaction requires - # `spanner.databases.beginOrRollbackReadWriteTransaction` permission - # on the `session` resource. - # - # Note: The following fields are mutually exclusive: `read_write`, `partitioned_dml`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] partitioned_dml - # @return [::Google::Cloud::Spanner::V1::TransactionOptions::PartitionedDml] - # Partitioned DML transaction. - # - # Authorization to begin a Partitioned DML transaction requires - # `spanner.databases.beginPartitionedDmlTransaction` permission - # on the `session` resource. - # - # Note: The following fields are mutually exclusive: `partitioned_dml`, `read_write`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] read_only - # @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly] - # Transaction does not write. - # - # Authorization to begin a read-only transaction requires - # `spanner.databases.beginReadOnlyTransaction` permission - # on the `session` resource. - # - # Note: The following fields are mutually exclusive: `read_only`, `read_write`, `partitioned_dml`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exclude_txn_from_change_streams - # @return [::Boolean] - # When `exclude_txn_from_change_streams` is set to `true`, it prevents read - # or write transactions from being tracked in change streams. - # - # * If the DDL option `allow_txn_exclusion` is set to `true`, then the - # updates - # made within this transaction aren't recorded in the change stream. - # - # * If you don't set the DDL option `allow_txn_exclusion` or if it's - # set to `false`, then the updates made within this transaction are - # recorded in the change stream. - # - # When `exclude_txn_from_change_streams` is set to `false` or not set, - # modifications from this transaction are recorded in all change streams - # that are tracking columns modified by these transactions. - # - # The `exclude_txn_from_change_streams` option can only be specified - # for read-write or partitioned DML transactions, otherwise the API returns - # an `INVALID_ARGUMENT` error. - # @!attribute [rw] isolation_level - # @return [::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel] - # Isolation level for the transaction. - class TransactionOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message type to initiate a read-write transaction. Currently this - # transaction type has no options. - # @!attribute [rw] read_lock_mode - # @return [::Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite::ReadLockMode] - # Read lock mode for the transaction. - # @!attribute [rw] multiplexed_session_previous_transaction_id - # @return [::String] - # Optional. Clients should pass the transaction ID of the previous - # transaction attempt that was aborted if this transaction is being - # executed on a multiplexed session. - class ReadWrite - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # `ReadLockMode` is used to set the read lock mode for read-write - # transactions. - module ReadLockMode - # Default value. - # - # * If isolation level is - # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::SERIALIZABLE SERIALIZABLE}, - # locking semantics default to `PESSIMISTIC`. - # * If isolation level is - # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::REPEATABLE_READ REPEATABLE_READ}, - # locking semantics default to `OPTIMISTIC`. - # * See - # [Concurrency - # control](https://cloud.google.com/spanner/docs/concurrency-control) - # for more details. - READ_LOCK_MODE_UNSPECIFIED = 0 - - # Pessimistic lock mode. - # - # Lock acquisition behavior depends on the isolation level in use. In - # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::SERIALIZABLE SERIALIZABLE} - # isolation, reads and writes acquire necessary locks during transaction - # statement execution. In - # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::REPEATABLE_READ REPEATABLE_READ} - # isolation, reads that explicitly request to be locked and writes - # acquire locks. - # See - # [Concurrency - # control](https://cloud.google.com/spanner/docs/concurrency-control) for - # details on the types of locks acquired at each transaction step. - PESSIMISTIC = 1 - - # Optimistic lock mode. - # - # Lock acquisition behavior depends on the isolation level in use. In - # both - # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::SERIALIZABLE SERIALIZABLE} - # and - # {::Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel::REPEATABLE_READ REPEATABLE_READ} - # isolation, reads and writes do not acquire locks during transaction - # statement execution. - # See - # [Concurrency - # control](https://cloud.google.com/spanner/docs/concurrency-control) for - # details on how the guarantees of each isolation level are provided at - # commit time. - OPTIMISTIC = 2 - end - end - - # Message type to initiate a Partitioned DML transaction. - class PartitionedDml - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message type to initiate a read-only transaction. - # @!attribute [rw] strong - # @return [::Boolean] - # Read at a timestamp where all previously committed transactions - # are visible. - # - # Note: The following fields are mutually exclusive: `strong`, `min_read_timestamp`, `max_staleness`, `read_timestamp`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] min_read_timestamp - # @return [::Google::Protobuf::Timestamp] - # Executes all reads at a timestamp >= `min_read_timestamp`. - # - # This is useful for requesting fresher data than some previous - # read, or data that is fresh enough to observe the effects of some - # previously committed transaction whose timestamp is known. - # - # Note that this option can only be used in single-use transactions. - # - # A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. - # Example: `"2014-10-02T15:01:23.045123456Z"`. - # - # Note: The following fields are mutually exclusive: `min_read_timestamp`, `strong`, `max_staleness`, `read_timestamp`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] max_staleness - # @return [::Google::Protobuf::Duration] - # Read data at a timestamp >= `NOW - max_staleness` - # seconds. Guarantees that all writes that have committed more - # than the specified number of seconds ago are visible. Because - # Cloud Spanner chooses the exact timestamp, this mode works even if - # the client's local clock is substantially skewed from Cloud Spanner - # commit timestamps. - # - # Useful for reading the freshest data available at a nearby - # replica, while bounding the possible staleness if the local - # replica has fallen behind. - # - # Note that this option can only be used in single-use - # transactions. - # - # Note: The following fields are mutually exclusive: `max_staleness`, `strong`, `min_read_timestamp`, `read_timestamp`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] read_timestamp - # @return [::Google::Protobuf::Timestamp] - # Executes all reads at the given timestamp. Unlike other modes, - # reads at a specific timestamp are repeatable; the same read at - # the same timestamp always returns the same data. If the - # timestamp is in the future, the read is blocked until the - # specified timestamp, modulo the read's deadline. - # - # Useful for large scale consistent reads such as mapreduces, or - # for coordinating many reads against a consistent snapshot of the - # data. - # - # A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. - # Example: `"2014-10-02T15:01:23.045123456Z"`. - # - # Note: The following fields are mutually exclusive: `read_timestamp`, `strong`, `min_read_timestamp`, `max_staleness`, `exact_staleness`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exact_staleness - # @return [::Google::Protobuf::Duration] - # Executes all reads at a timestamp that is `exact_staleness` - # old. The timestamp is chosen soon after the read is started. - # - # Guarantees that all writes that have committed more than the - # specified number of seconds ago are visible. Because Cloud Spanner - # chooses the exact timestamp, this mode works even if the client's - # local clock is substantially skewed from Cloud Spanner commit - # timestamps. - # - # Useful for reading at nearby replicas without the distributed - # timestamp negotiation overhead of `max_staleness`. - # - # Note: The following fields are mutually exclusive: `exact_staleness`, `strong`, `min_read_timestamp`, `max_staleness`, `read_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] return_read_timestamp - # @return [::Boolean] - # If true, the Cloud Spanner-selected read timestamp is included in - # the {::Google::Cloud::Spanner::V1::Transaction Transaction} message that describes - # the transaction. - class ReadOnly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `IsolationLevel` is used when setting the [isolation - # level](https://cloud.google.com/spanner/docs/isolation-levels) for a - # transaction. - module IsolationLevel - # Default value. - # - # If the value is not specified, the `SERIALIZABLE` isolation level is - # used. - ISOLATION_LEVEL_UNSPECIFIED = 0 - - # All transactions appear as if they executed in a serial order, even if - # some of the reads, writes, and other operations of distinct transactions - # actually occurred in parallel. Spanner assigns commit timestamps that - # reflect the order of committed transactions to implement this property. - # Spanner offers a stronger guarantee than serializability called external - # consistency. For more information, see - # [TrueTime and external - # consistency](https://cloud.google.com/spanner/docs/true-time-external-consistency#serializability). - SERIALIZABLE = 1 - - # All reads performed during the transaction observe a consistent snapshot - # of the database, and the transaction is only successfully committed in - # the absence of conflicts between its updates and any concurrent updates - # that have occurred since that snapshot. Consequently, in contrast to - # `SERIALIZABLE` transactions, only write-write conflicts are detected in - # snapshot transactions. - # - # This isolation level does not support read-only and partitioned DML - # transactions. - # - # When `REPEATABLE_READ` is specified on a read-write transaction, the - # locking semantics default to `OPTIMISTIC`. - REPEATABLE_READ = 2 - end - end - - # A transaction. - # @!attribute [rw] id - # @return [::String] - # `id` may be used to identify the transaction in subsequent - # {::Google::Cloud::Spanner::V1::Spanner::Client#read Read}, - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql}, - # {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit}, or - # {::Google::Cloud::Spanner::V1::Spanner::Client#rollback Rollback} calls. - # - # Single-use read-only transactions do not have IDs, because - # single-use transactions do not support multiple requests. - # @!attribute [rw] read_timestamp - # @return [::Google::Protobuf::Timestamp] - # For snapshot read-only transactions, the read timestamp chosen - # for the transaction. Not returned by default: see - # {::Google::Cloud::Spanner::V1::TransactionOptions::ReadOnly#return_read_timestamp TransactionOptions.ReadOnly.return_read_timestamp}. - # - # A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. - # Example: `"2014-10-02T15:01:23.045123456Z"`. - # @!attribute [rw] precommit_token - # @return [::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken] - # A precommit token is included in the response of a BeginTransaction - # request if the read-write transaction is on a multiplexed session and - # a mutation_key was specified in the - # {::Google::Cloud::Spanner::V1::BeginTransactionRequest BeginTransaction}. - # The precommit token with the highest sequence number from this transaction - # attempt should be passed to the {::Google::Cloud::Spanner::V1::Spanner::Client#commit Commit} - # request for this transaction. - # @!attribute [rw] cache_update - # @return [::Google::Cloud::Spanner::V1::CacheUpdate] - # Optional. A cache update expresses a set of changes the client should - # incorporate into its location cache. The client should discard the changes - # if they are older than the data it already has. This data can be obtained - # in response to requests that included a `RoutingHint` field, but may also - # be obtained by explicit location-fetching RPCs which may be added in the - # future. - class Transaction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message is used to select the transaction in which a - # {::Google::Cloud::Spanner::V1::Spanner::Client#read Read} or - # {::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql ExecuteSql} call runs. - # - # See {::Google::Cloud::Spanner::V1::TransactionOptions TransactionOptions} for more - # information about transactions. - # @!attribute [rw] single_use - # @return [::Google::Cloud::Spanner::V1::TransactionOptions] - # Execute the read or SQL query in a temporary transaction. - # This is the most efficient way to execute a transaction that - # consists of a single SQL query. - # - # Note: The following fields are mutually exclusive: `single_use`, `id`, `begin`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] id - # @return [::String] - # Execute the read or SQL query in a previously-started transaction. - # - # Note: The following fields are mutually exclusive: `id`, `single_use`, `begin`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] begin - # @return [::Google::Cloud::Spanner::V1::TransactionOptions] - # Begin a new transaction and execute this read or SQL query in - # it. The transaction ID of the new transaction is returned in - # {::Google::Cloud::Spanner::V1::ResultSetMetadata#transaction ResultSetMetadata.transaction}, - # which is a {::Google::Cloud::Spanner::V1::Transaction Transaction}. - # - # Note: The following fields are mutually exclusive: `begin`, `single_use`, `id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TransactionSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # When a read-write transaction is executed on a multiplexed session, - # this precommit token is sent back to the client - # as a part of the {::Google::Cloud::Spanner::V1::Transaction Transaction} message in the - # {::Google::Cloud::Spanner::V1::BeginTransactionRequest BeginTransaction} response and - # also as a part of the {::Google::Cloud::Spanner::V1::ResultSet ResultSet} and - # {::Google::Cloud::Spanner::V1::PartialResultSet PartialResultSet} responses. - # @!attribute [rw] precommit_token - # @return [::String] - # Opaque precommit token. - # @!attribute [rw] seq_num - # @return [::Integer] - # An incrementing seq number is generated on every precommit token - # that is returned. Clients should remember the precommit token with the - # highest sequence number from the current transaction attempt. - class MultiplexedSessionPrecommitToken - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/type.rb b/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/type.rb deleted file mode 100644 index 693060eddddf..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/proto_docs/google/spanner/v1/type.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Spanner - module V1 - # `Type` indicates the type of a Cloud Spanner value, as might be stored in a - # table cell or returned from an SQL query. - # @!attribute [rw] code - # @return [::Google::Cloud::Spanner::V1::TypeCode] - # Required. The {::Google::Cloud::Spanner::V1::TypeCode TypeCode} for this type. - # @!attribute [rw] array_element_type - # @return [::Google::Cloud::Spanner::V1::Type] - # If {::Google::Cloud::Spanner::V1::Type#code code} == - # {::Google::Cloud::Spanner::V1::TypeCode::ARRAY ARRAY}, then `array_element_type` is the - # type of the array elements. - # @!attribute [rw] struct_type - # @return [::Google::Cloud::Spanner::V1::StructType] - # If {::Google::Cloud::Spanner::V1::Type#code code} == - # {::Google::Cloud::Spanner::V1::TypeCode::STRUCT STRUCT}, then `struct_type` provides - # type information for the struct's fields. - # @!attribute [rw] type_annotation - # @return [::Google::Cloud::Spanner::V1::TypeAnnotationCode] - # The {::Google::Cloud::Spanner::V1::TypeAnnotationCode TypeAnnotationCode} that - # disambiguates SQL type that Spanner will use to represent values of this - # type during query processing. This is necessary for some type codes because - # a single {::Google::Cloud::Spanner::V1::TypeCode TypeCode} can be mapped to different - # SQL types depending on the SQL dialect. - # {::Google::Cloud::Spanner::V1::Type#type_annotation type_annotation} typically is not - # needed to process the content of a value (it doesn't affect serialization) - # and clients can ignore it on the read path. - # @!attribute [rw] proto_type_fqn - # @return [::String] - # If {::Google::Cloud::Spanner::V1::Type#code code} == - # {::Google::Cloud::Spanner::V1::TypeCode::PROTO PROTO} or - # {::Google::Cloud::Spanner::V1::Type#code code} == - # {::Google::Cloud::Spanner::V1::TypeCode::ENUM ENUM}, then `proto_type_fqn` is the fully - # qualified name of the proto type representing the proto/enum definition. - class Type - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StructType` defines the fields of a - # {::Google::Cloud::Spanner::V1::TypeCode::STRUCT STRUCT} type. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Spanner::V1::StructType::Field>] - # The list of fields that make up this struct. Order is - # significant, because values of this struct type are represented as - # lists, where the order of field values matches the order of - # fields in the {::Google::Cloud::Spanner::V1::StructType StructType}. In turn, the - # order of fields matches the order of columns in a read request, or the - # order of fields in the `SELECT` clause of a query. - class StructType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message representing a single field of a struct. - # @!attribute [rw] name - # @return [::String] - # The name of the field. For reads, this is the column name. For - # SQL queries, it is the column alias (e.g., `"Word"` in the - # query `"SELECT 'hello' AS Word"`), or the column name (e.g., - # `"ColName"` in the query `"SELECT ColName FROM Table"`). Some - # columns might have an empty name (e.g., `"SELECT - # UPPER(ColName)"`). Note that a query result can contain - # multiple fields with the same name. - # @!attribute [rw] type - # @return [::Google::Cloud::Spanner::V1::Type] - # The type of the field. - class Field - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `TypeCode` is used as part of {::Google::Cloud::Spanner::V1::Type Type} to - # indicate the type of a Cloud Spanner value. - # - # Each legal value of a type can be encoded to or decoded from a JSON - # value, using the encodings described below. All Cloud Spanner values can - # be `null`, regardless of type; `null`s are always encoded as a JSON - # `null`. - module TypeCode - # Not specified. - TYPE_CODE_UNSPECIFIED = 0 - - # Encoded as JSON `true` or `false`. - BOOL = 1 - - # Encoded as `string`, in decimal format. - INT64 = 2 - - # Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or - # `"-Infinity"`. - FLOAT64 = 3 - - # Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or - # `"-Infinity"`. - FLOAT32 = 15 - - # Encoded as `string` in RFC 3339 timestamp format. The time zone - # must be present, and must be `"Z"`. - # - # If the schema has the column option - # `allow_commit_timestamp=true`, the placeholder string - # `"spanner.commit_timestamp()"` can be used to instruct the system - # to insert the commit timestamp associated with the transaction - # commit. - TIMESTAMP = 4 - - # Encoded as `string` in RFC 3339 date format. - DATE = 5 - - # Encoded as `string`. - STRING = 6 - - # Encoded as a base64-encoded `string`, as described in RFC 4648, - # section 4. - BYTES = 7 - - # Encoded as `list`, where the list elements are represented - # according to - # {::Google::Cloud::Spanner::V1::Type#array_element_type array_element_type}. - ARRAY = 8 - - # Encoded as `list`, where list element `i` is represented according - # to [struct_type.fields[i]][google.spanner.v1.StructType.fields]. - STRUCT = 9 - - # Encoded as `string`, in decimal format or scientific notation format. - # Decimal format: - # `[+-]Digits[.[Digits]]` or - # `[+-][Digits].Digits` - # - # Scientific notation: - # `[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or - # `[+-][Digits].Digits[ExponentIndicator[+-]Digits]` - # (ExponentIndicator is `"e"` or `"E"`) - NUMERIC = 10 - - # Encoded as a JSON-formatted `string` as described in RFC 7159. The - # following rules are applied when parsing JSON input: - # - # - Whitespace characters are not preserved. - # - If a JSON object has duplicate keys, only the first key is preserved. - # - Members of a JSON object are not guaranteed to have their order - # preserved. - # - JSON array elements will have their order preserved. - JSON = 11 - - # Encoded as a base64-encoded `string`, as described in RFC 4648, - # section 4. - PROTO = 13 - - # Encoded as `string`, in decimal format. - ENUM = 14 - - # Encoded as `string`, in `ISO8601` duration format - - # `P[n]Y[n]M[n]DT[n]H[n]M[n[.fraction]]S` - # where `n` is an integer. - # For example, `P1Y2M3DT4H5M6.5S` represents time duration of 1 year, 2 - # months, 3 days, 4 hours, 5 minutes, and 6.5 seconds. - INTERVAL = 16 - - # Encoded as `string`, in lower-case hexa-decimal format, as described - # in RFC 9562, section 4. - UUID = 17 - end - - # `TypeAnnotationCode` is used as a part of {::Google::Cloud::Spanner::V1::Type Type} to - # disambiguate SQL types that should be used for a given Cloud Spanner value. - # Disambiguation is needed because the same Cloud Spanner type can be mapped to - # different SQL types depending on SQL dialect. TypeAnnotationCode doesn't - # affect the way value is serialized. - module TypeAnnotationCode - # Not specified. - TYPE_ANNOTATION_CODE_UNSPECIFIED = 0 - - # PostgreSQL compatible NUMERIC type. This annotation needs to be applied to - # {::Google::Cloud::Spanner::V1::Type Type} instances having - # {::Google::Cloud::Spanner::V1::TypeCode::NUMERIC NUMERIC} type code to specify that - # values of this type should be treated as PostgreSQL NUMERIC values. - # Currently this annotation is always needed for - # {::Google::Cloud::Spanner::V1::TypeCode::NUMERIC NUMERIC} when a client interacts with - # PostgreSQL-enabled Spanner databases. - PG_NUMERIC = 2 - - # PostgreSQL compatible JSONB type. This annotation needs to be applied to - # {::Google::Cloud::Spanner::V1::Type Type} instances having - # {::Google::Cloud::Spanner::V1::TypeCode::JSON JSON} type code to specify that values of - # this type should be treated as PostgreSQL JSONB values. Currently this - # annotation is always needed for {::Google::Cloud::Spanner::V1::TypeCode::JSON JSON} - # when a client interacts with PostgreSQL-enabled Spanner databases. - PG_JSONB = 3 - - # PostgreSQL compatible OID type. This annotation can be used by a client - # interacting with PostgreSQL-enabled Spanner database to specify that a - # value should be treated using the semantics of the OID type. - PG_OID = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-spanner-v1/snippets/Gemfile deleted file mode 100644 index 77b0e1097706..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-spanner-v1", path: "../" -else - gem "google-cloud-spanner-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json b/owl-bot-staging/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json deleted file mode 100644 index 8f892d90b39b..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/snippet_metadata_google.spanner.v1.json +++ /dev/null @@ -1,695 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-spanner-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.spanner.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "spanner_v1_generated_Spanner_CreateSession_sync", - "title": "Snippet for the create_session call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#create_session.", - "file": "spanner/create_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_session", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#create_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::CreateSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::Session", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "CreateSession", - "full_name": "google.spanner.v1.Spanner.CreateSession", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_BatchCreateSessions_sync", - "title": "Snippet for the batch_create_sessions call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions.", - "file": "spanner/batch_create_sessions.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_sessions", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::BatchCreateSessionsResponse", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "BatchCreateSessions", - "full_name": "google.spanner.v1.Spanner.BatchCreateSessions", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_GetSession_sync", - "title": "Snippet for the get_session call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#get_session.", - "file": "spanner/get_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_session", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#get_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::GetSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::Session", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "GetSession", - "full_name": "google.spanner.v1.Spanner.GetSession", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_ListSessions_sync", - "title": "Snippet for the list_sessions call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#list_sessions.", - "file": "spanner/list_sessions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sessions", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#list_sessions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::ListSessionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::ListSessionsResponse", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "ListSessions", - "full_name": "google.spanner.v1.Spanner.ListSessions", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_DeleteSession_sync", - "title": "Snippet for the delete_session call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#delete_session.", - "file": "spanner/delete_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_session", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#delete_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::DeleteSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "DeleteSession", - "full_name": "google.spanner.v1.Spanner.DeleteSession", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_ExecuteSql_sync", - "title": "Snippet for the execute_sql call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#execute_sql.", - "file": "spanner/execute_sql.rb", - "language": "RUBY", - "client_method": { - "short_name": "execute_sql", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#execute_sql", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::ExecuteSqlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::ResultSet", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "ExecuteSql", - "full_name": "google.spanner.v1.Spanner.ExecuteSql", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_ExecuteStreamingSql_sync", - "title": "Snippet for the execute_streaming_sql call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql.", - "file": "spanner/execute_streaming_sql.rb", - "language": "RUBY", - "client_method": { - "short_name": "execute_streaming_sql", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::ExecuteSqlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::PartialResultSet", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "ExecuteStreamingSql", - "full_name": "google.spanner.v1.Spanner.ExecuteStreamingSql", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_ExecuteBatchDml_sync", - "title": "Snippet for the execute_batch_dml call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml.", - "file": "spanner/execute_batch_dml.rb", - "language": "RUBY", - "client_method": { - "short_name": "execute_batch_dml", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "ExecuteBatchDml", - "full_name": "google.spanner.v1.Spanner.ExecuteBatchDml", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_Read_sync", - "title": "Snippet for the read call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#read.", - "file": "spanner/read.rb", - "language": "RUBY", - "client_method": { - "short_name": "read", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#read", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::ReadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::ResultSet", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "Read", - "full_name": "google.spanner.v1.Spanner.Read", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_StreamingRead_sync", - "title": "Snippet for the streaming_read call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#streaming_read.", - "file": "spanner/streaming_read.rb", - "language": "RUBY", - "client_method": { - "short_name": "streaming_read", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#streaming_read", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::ReadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::PartialResultSet", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "StreamingRead", - "full_name": "google.spanner.v1.Spanner.StreamingRead", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_BeginTransaction_sync", - "title": "Snippet for the begin_transaction call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction.", - "file": "spanner/begin_transaction.rb", - "language": "RUBY", - "client_method": { - "short_name": "begin_transaction", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::BeginTransactionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::Transaction", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "BeginTransaction", - "full_name": "google.spanner.v1.Spanner.BeginTransaction", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_Commit_sync", - "title": "Snippet for the commit call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#commit.", - "file": "spanner/commit.rb", - "language": "RUBY", - "client_method": { - "short_name": "commit", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#commit", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::CommitRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::CommitResponse", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "Commit", - "full_name": "google.spanner.v1.Spanner.Commit", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_Rollback_sync", - "title": "Snippet for the rollback call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#rollback.", - "file": "spanner/rollback.rb", - "language": "RUBY", - "client_method": { - "short_name": "rollback", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#rollback", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::RollbackRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "Rollback", - "full_name": "google.spanner.v1.Spanner.Rollback", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_PartitionQuery_sync", - "title": "Snippet for the partition_query call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#partition_query.", - "file": "spanner/partition_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "partition_query", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#partition_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::PartitionQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::PartitionResponse", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "PartitionQuery", - "full_name": "google.spanner.v1.Spanner.PartitionQuery", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_PartitionRead_sync", - "title": "Snippet for the partition_read call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#partition_read.", - "file": "spanner/partition_read.rb", - "language": "RUBY", - "client_method": { - "short_name": "partition_read", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#partition_read", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::PartitionReadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::PartitionResponse", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "PartitionRead", - "full_name": "google.spanner.v1.Spanner.PartitionRead", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_BatchWrite_sync", - "title": "Snippet for the batch_write call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#batch_write.", - "file": "spanner/batch_write.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_write", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#batch_write", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::BatchWriteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::BatchWriteResponse", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "BatchWrite", - "full_name": "google.spanner.v1.Spanner.BatchWrite", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "spanner_v1_generated_Spanner_FetchCacheUpdate_sync", - "title": "Snippet for the fetch_cache_update call in the Spanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Spanner::V1::Spanner::Client#fetch_cache_update.", - "file": "spanner/fetch_cache_update.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_cache_update", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client#fetch_cache_update", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Spanner::V1::CacheUpdate", - "client": { - "short_name": "Spanner::Client", - "full_name": "::Google::Cloud::Spanner::V1::Spanner::Client" - }, - "method": { - "short_name": "FetchCacheUpdate", - "full_name": "google.spanner.v1.Spanner.FetchCacheUpdate", - "service": { - "short_name": "Spanner", - "full_name": "google.spanner.v1.Spanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_create_sessions.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_create_sessions.rb deleted file mode 100644 index 0586ea617219..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_create_sessions.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_BatchCreateSessions_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the batch_create_sessions call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#batch_create_sessions. -# -def batch_create_sessions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::BatchCreateSessionsRequest.new - - # Call the batch_create_sessions method. - result = client.batch_create_sessions request - - # The returned object is of type Google::Cloud::Spanner::V1::BatchCreateSessionsResponse. - p result -end -# [END spanner_v1_generated_Spanner_BatchCreateSessions_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_write.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_write.rb deleted file mode 100644 index b95914412706..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/batch_write.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_BatchWrite_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the batch_write call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#batch_write. -# -def batch_write - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::BatchWriteRequest.new - - # Call the batch_write method to start streaming. - output = client.batch_write request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Spanner::V1::BatchWriteResponse - output.each do |current_response| - p current_response - end -end -# [END spanner_v1_generated_Spanner_BatchWrite_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/begin_transaction.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/begin_transaction.rb deleted file mode 100644 index 491b1932c86d..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/begin_transaction.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_BeginTransaction_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the begin_transaction call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#begin_transaction. -# -def begin_transaction - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::BeginTransactionRequest.new - - # Call the begin_transaction method. - result = client.begin_transaction request - - # The returned object is of type Google::Cloud::Spanner::V1::Transaction. - p result -end -# [END spanner_v1_generated_Spanner_BeginTransaction_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/commit.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/commit.rb deleted file mode 100644 index bdef590c536b..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/commit.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_Commit_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the commit call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#commit. -# -def commit - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::CommitRequest.new - - # Call the commit method. - result = client.commit request - - # The returned object is of type Google::Cloud::Spanner::V1::CommitResponse. - p result -end -# [END spanner_v1_generated_Spanner_Commit_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/create_session.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/create_session.rb deleted file mode 100644 index 2978e20b708d..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/create_session.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_CreateSession_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the create_session call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#create_session. -# -def create_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::CreateSessionRequest.new - - # Call the create_session method. - result = client.create_session request - - # The returned object is of type Google::Cloud::Spanner::V1::Session. - p result -end -# [END spanner_v1_generated_Spanner_CreateSession_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/delete_session.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/delete_session.rb deleted file mode 100644 index 0fe6714eefc1..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/delete_session.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_DeleteSession_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the delete_session call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#delete_session. -# -def delete_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::DeleteSessionRequest.new - - # Call the delete_session method. - result = client.delete_session request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END spanner_v1_generated_Spanner_DeleteSession_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_batch_dml.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_batch_dml.rb deleted file mode 100644 index 0dfff556a81d..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_batch_dml.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_ExecuteBatchDml_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the execute_batch_dml call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#execute_batch_dml. -# -def execute_batch_dml - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest.new - - # Call the execute_batch_dml method. - result = client.execute_batch_dml request - - # The returned object is of type Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse. - p result -end -# [END spanner_v1_generated_Spanner_ExecuteBatchDml_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_sql.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_sql.rb deleted file mode 100644 index 25fda1b8ff3f..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_sql.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_ExecuteSql_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the execute_sql call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#execute_sql. -# -def execute_sql - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::ExecuteSqlRequest.new - - # Call the execute_sql method. - result = client.execute_sql request - - # The returned object is of type Google::Cloud::Spanner::V1::ResultSet. - p result -end -# [END spanner_v1_generated_Spanner_ExecuteSql_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_streaming_sql.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_streaming_sql.rb deleted file mode 100644 index e96077064cca..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/execute_streaming_sql.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_ExecuteStreamingSql_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the execute_streaming_sql call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#execute_streaming_sql. -# -def execute_streaming_sql - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::ExecuteSqlRequest.new - - # Call the execute_streaming_sql method to start streaming. - output = client.execute_streaming_sql request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Spanner::V1::PartialResultSet - output.each do |current_response| - p current_response - end -end -# [END spanner_v1_generated_Spanner_ExecuteStreamingSql_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/fetch_cache_update.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/fetch_cache_update.rb deleted file mode 100644 index b459fe3f05ad..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/fetch_cache_update.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_FetchCacheUpdate_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the fetch_cache_update call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#fetch_cache_update. -# -def fetch_cache_update - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::FetchCacheUpdateRequest.new - - # Call the fetch_cache_update method to start streaming. - output = client.fetch_cache_update request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Spanner::V1::CacheUpdate - output.each do |current_response| - p current_response - end -end -# [END spanner_v1_generated_Spanner_FetchCacheUpdate_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/get_session.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/get_session.rb deleted file mode 100644 index 57e3f09069af..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/get_session.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_GetSession_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the get_session call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#get_session. -# -def get_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::GetSessionRequest.new - - # Call the get_session method. - result = client.get_session request - - # The returned object is of type Google::Cloud::Spanner::V1::Session. - p result -end -# [END spanner_v1_generated_Spanner_GetSession_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/list_sessions.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/list_sessions.rb deleted file mode 100644 index ad2e46e5db36..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/list_sessions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_ListSessions_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the list_sessions call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#list_sessions. -# -def list_sessions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::ListSessionsRequest.new - - # Call the list_sessions method. - result = client.list_sessions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Spanner::V1::Session. - p item - end -end -# [END spanner_v1_generated_Spanner_ListSessions_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_query.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_query.rb deleted file mode 100644 index fe7511916bee..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_query.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_PartitionQuery_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the partition_query call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#partition_query. -# -def partition_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::PartitionQueryRequest.new - - # Call the partition_query method. - result = client.partition_query request - - # The returned object is of type Google::Cloud::Spanner::V1::PartitionResponse. - p result -end -# [END spanner_v1_generated_Spanner_PartitionQuery_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_read.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_read.rb deleted file mode 100644 index 548247d9a655..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/partition_read.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_PartitionRead_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the partition_read call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#partition_read. -# -def partition_read - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::PartitionReadRequest.new - - # Call the partition_read method. - result = client.partition_read request - - # The returned object is of type Google::Cloud::Spanner::V1::PartitionResponse. - p result -end -# [END spanner_v1_generated_Spanner_PartitionRead_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/read.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/read.rb deleted file mode 100644 index e0ae8f6a89bd..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/read.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_Read_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the read call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#read. -# -def read - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::ReadRequest.new - - # Call the read method. - result = client.read request - - # The returned object is of type Google::Cloud::Spanner::V1::ResultSet. - p result -end -# [END spanner_v1_generated_Spanner_Read_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/rollback.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/rollback.rb deleted file mode 100644 index aa46e63322b9..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/rollback.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_Rollback_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the rollback call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#rollback. -# -def rollback - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::RollbackRequest.new - - # Call the rollback method. - result = client.rollback request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END spanner_v1_generated_Spanner_Rollback_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/streaming_read.rb b/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/streaming_read.rb deleted file mode 100644 index 858dafcebeb7..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/snippets/spanner/streaming_read.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START spanner_v1_generated_Spanner_StreamingRead_sync] -require "google/cloud/spanner/v1" - -## -# Snippet for the streaming_read call in the Spanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Spanner::V1::Spanner::Client#streaming_read. -# -def streaming_read - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Spanner::V1::Spanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Spanner::V1::ReadRequest.new - - # Call the streaming_read method to start streaming. - output = client.streaming_read request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Spanner::V1::PartialResultSet - output.each do |current_response| - p current_response - end -end -# [END spanner_v1_generated_Spanner_StreamingRead_sync] diff --git a/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_test.rb b/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_test.rb deleted file mode 100644 index f1898edbaf00..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/spanner/v1/spanner" - -class ::Google::Cloud::Spanner::V1::Spanner::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_database_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.database_path project: "value0", instance: "value1", database: "value2" - assert_equal "projects/value0/instances/value1/databases/value2", path - end - end - - def test_session_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.session_path project: "value0", instance: "value1", database: "value2", session: "value3" - assert_equal "projects/value0/instances/value1/databases/value2/sessions/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_test.rb b/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_test.rb deleted file mode 100644 index cb1799597ef6..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/test/google/cloud/spanner/v1/spanner_test.rb +++ /dev/null @@ -1,1346 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/spanner/v1/spanner_pb" -require "google/cloud/spanner/v1/spanner" - -class ::Google::Cloud::Spanner::V1::Spanner::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::Session.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = "hello world" - session = {} - - create_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_session, name - assert_kind_of ::Google::Cloud::Spanner::V1::CreateSessionRequest, request - assert_equal "hello world", request["database"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::Session), request["session"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_session_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_session({ database: database, session: session }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_session database: database, session: session do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_session ::Google::Cloud::Spanner::V1::CreateSessionRequest.new(database: database, session: session) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_session({ database: database, session: session }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_session(::Google::Cloud::Spanner::V1::CreateSessionRequest.new(database: database, session: session), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_session_client_stub.call_rpc_count - end - end - - def test_batch_create_sessions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::BatchCreateSessionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = "hello world" - session_template = {} - session_count = 42 - - batch_create_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_sessions, name - assert_kind_of ::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest, request - assert_equal "hello world", request["database"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::Session), request["session_template"] - assert_equal 42, request["session_count"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_sessions_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_create_sessions({ database: database, session_template: session_template, session_count: session_count }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_create_sessions database: database, session_template: session_template, session_count: session_count do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_create_sessions ::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest.new(database: database, session_template: session_template, session_count: session_count) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_create_sessions({ database: database, session_template: session_template, session_count: session_count }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_create_sessions(::Google::Cloud::Spanner::V1::BatchCreateSessionsRequest.new(database: database, session_template: session_template, session_count: session_count), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_create_sessions_client_stub.call_rpc_count - end - end - - def test_get_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::Session.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_session, name - assert_kind_of ::Google::Cloud::Spanner::V1::GetSessionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_session_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_session({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_session name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_session ::Google::Cloud::Spanner::V1::GetSessionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_session({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_session(::Google::Cloud::Spanner::V1::GetSessionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_session_client_stub.call_rpc_count - end - end - - def test_list_sessions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::ListSessionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_sessions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sessions, name - assert_kind_of ::Google::Cloud::Spanner::V1::ListSessionsRequest, request - assert_equal "hello world", request["database"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sessions_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_sessions({ database: database, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_sessions database: database, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_sessions ::Google::Cloud::Spanner::V1::ListSessionsRequest.new(database: database, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_sessions({ database: database, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_sessions(::Google::Cloud::Spanner::V1::ListSessionsRequest.new(database: database, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_sessions_client_stub.call_rpc_count - end - end - - def test_delete_session - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_session, name - assert_kind_of ::Google::Cloud::Spanner::V1::DeleteSessionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_session_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_session({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_session name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_session ::Google::Cloud::Spanner::V1::DeleteSessionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_session({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_session(::Google::Cloud::Spanner::V1::DeleteSessionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_session_client_stub.call_rpc_count - end - end - - def test_execute_sql - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::ResultSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - session = "hello world" - transaction = {} - sql = "hello world" - params = {} - param_types = {} - resume_token = "hello world" - query_mode = :NORMAL - partition_token = "hello world" - seqno = 42 - query_options = {} - request_options = {} - directed_read_options = {} - data_boost_enabled = true - last_statement = true - routing_hint = {} - - execute_sql_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :execute_sql, name - assert_kind_of ::Google::Cloud::Spanner::V1::ExecuteSqlRequest, request - assert_equal "hello world", request["session"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] - assert_equal "hello world", request["sql"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Struct), request["params"] - assert_equal({}, request["param_types"].to_h) - assert_equal "hello world", request["resume_token"] - assert_equal :NORMAL, request["query_mode"] - assert_equal "hello world", request["partition_token"] - assert_equal 42, request["seqno"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions), request["query_options"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::DirectedReadOptions), request["directed_read_options"] - assert_equal true, request["data_boost_enabled"] - assert_equal true, request["last_statement"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, execute_sql_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.execute_sql({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.execute_sql session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.execute_sql ::Google::Cloud::Spanner::V1::ExecuteSqlRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.execute_sql({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.execute_sql(::Google::Cloud::Spanner::V1::ExecuteSqlRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, execute_sql_client_stub.call_rpc_count - end - end - - def test_execute_streaming_sql - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::PartialResultSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a server streaming method. - session = "hello world" - transaction = {} - sql = "hello world" - params = {} - param_types = {} - resume_token = "hello world" - query_mode = :NORMAL - partition_token = "hello world" - seqno = 42 - query_options = {} - request_options = {} - directed_read_options = {} - data_boost_enabled = true - last_statement = true - routing_hint = {} - - execute_streaming_sql_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :execute_streaming_sql, name - assert_kind_of ::Google::Cloud::Spanner::V1::ExecuteSqlRequest, request - assert_equal "hello world", request["session"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] - assert_equal "hello world", request["sql"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Struct), request["params"] - assert_equal({}, request["param_types"].to_h) - assert_equal "hello world", request["resume_token"] - assert_equal :NORMAL, request["query_mode"] - assert_equal "hello world", request["partition_token"] - assert_equal 42, request["seqno"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::ExecuteSqlRequest::QueryOptions), request["query_options"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::DirectedReadOptions), request["directed_read_options"] - assert_equal true, request["data_boost_enabled"] - assert_equal true, request["last_statement"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, execute_streaming_sql_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.execute_streaming_sql({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - c.execute_streaming_sql session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.execute_streaming_sql ::Google::Cloud::Spanner::V1::ExecuteSqlRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.execute_streaming_sql({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.execute_streaming_sql(::Google::Cloud::Spanner::V1::ExecuteSqlRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, resume_token: resume_token, query_mode: query_mode, partition_token: partition_token, seqno: seqno, query_options: query_options, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, last_statement: last_statement, routing_hint: routing_hint), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, execute_streaming_sql_client_stub.call_rpc_count - end - end - - def test_execute_batch_dml - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::ExecuteBatchDmlResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - session = "hello world" - transaction = {} - statements = [{}] - seqno = 42 - request_options = {} - last_statements = true - - execute_batch_dml_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :execute_batch_dml, name - assert_kind_of ::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest, request - assert_equal "hello world", request["session"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] - assert_kind_of ::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest::Statement, request["statements"].first - assert_equal 42, request["seqno"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] - assert_equal true, request["last_statements"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, execute_batch_dml_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.execute_batch_dml({ session: session, transaction: transaction, statements: statements, seqno: seqno, request_options: request_options, last_statements: last_statements }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.execute_batch_dml session: session, transaction: transaction, statements: statements, seqno: seqno, request_options: request_options, last_statements: last_statements do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.execute_batch_dml ::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest.new(session: session, transaction: transaction, statements: statements, seqno: seqno, request_options: request_options, last_statements: last_statements) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.execute_batch_dml({ session: session, transaction: transaction, statements: statements, seqno: seqno, request_options: request_options, last_statements: last_statements }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.execute_batch_dml(::Google::Cloud::Spanner::V1::ExecuteBatchDmlRequest.new(session: session, transaction: transaction, statements: statements, seqno: seqno, request_options: request_options, last_statements: last_statements), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, execute_batch_dml_client_stub.call_rpc_count - end - end - - def test_read - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::ResultSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - session = "hello world" - transaction = {} - table = "hello world" - index = "hello world" - columns = ["hello world"] - key_set = {} - limit = 42 - resume_token = "hello world" - partition_token = "hello world" - request_options = {} - directed_read_options = {} - data_boost_enabled = true - order_by = :ORDER_BY_UNSPECIFIED - lock_hint = :LOCK_HINT_UNSPECIFIED - routing_hint = {} - - read_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :read, name - assert_kind_of ::Google::Cloud::Spanner::V1::ReadRequest, request - assert_equal "hello world", request["session"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] - assert_equal "hello world", request["table"] - assert_equal "hello world", request["index"] - assert_equal ["hello world"], request["columns"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::KeySet), request["key_set"] - assert_equal 42, request["limit"] - assert_equal "hello world", request["resume_token"] - assert_equal "hello world", request["partition_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::DirectedReadOptions), request["directed_read_options"] - assert_equal true, request["data_boost_enabled"] - assert_equal :ORDER_BY_UNSPECIFIED, request["order_by"] - assert_equal :LOCK_HINT_UNSPECIFIED, request["lock_hint"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, read_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.read session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.read ::Google::Cloud::Spanner::V1::ReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.read(::Google::Cloud::Spanner::V1::ReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, read_client_stub.call_rpc_count - end - end - - def test_streaming_read - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::PartialResultSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a server streaming method. - session = "hello world" - transaction = {} - table = "hello world" - index = "hello world" - columns = ["hello world"] - key_set = {} - limit = 42 - resume_token = "hello world" - partition_token = "hello world" - request_options = {} - directed_read_options = {} - data_boost_enabled = true - order_by = :ORDER_BY_UNSPECIFIED - lock_hint = :LOCK_HINT_UNSPECIFIED - routing_hint = {} - - streaming_read_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :streaming_read, name - assert_kind_of ::Google::Cloud::Spanner::V1::ReadRequest, request - assert_equal "hello world", request["session"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] - assert_equal "hello world", request["table"] - assert_equal "hello world", request["index"] - assert_equal ["hello world"], request["columns"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::KeySet), request["key_set"] - assert_equal 42, request["limit"] - assert_equal "hello world", request["resume_token"] - assert_equal "hello world", request["partition_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::DirectedReadOptions), request["directed_read_options"] - assert_equal true, request["data_boost_enabled"] - assert_equal :ORDER_BY_UNSPECIFIED, request["order_by"] - assert_equal :LOCK_HINT_UNSPECIFIED, request["lock_hint"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, streaming_read_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.streaming_read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - c.streaming_read session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.streaming_read ::Google::Cloud::Spanner::V1::ReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.streaming_read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.streaming_read(::Google::Cloud::Spanner::V1::ReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, limit: limit, resume_token: resume_token, partition_token: partition_token, request_options: request_options, directed_read_options: directed_read_options, data_boost_enabled: data_boost_enabled, order_by: order_by, lock_hint: lock_hint, routing_hint: routing_hint), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::PartialResultSet, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, streaming_read_client_stub.call_rpc_count - end - end - - def test_begin_transaction - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::Transaction.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - session = "hello world" - options = {} - request_options = {} - mutation_key = {} - routing_hint = {} - - begin_transaction_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :begin_transaction, name - assert_kind_of ::Google::Cloud::Spanner::V1::BeginTransactionRequest, request - assert_equal "hello world", request["session"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionOptions), request["options"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::Mutation), request["mutation_key"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, begin_transaction_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.begin_transaction({ session: session, options: options, request_options: request_options, mutation_key: mutation_key, routing_hint: routing_hint }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.begin_transaction session: session, options: options, request_options: request_options, mutation_key: mutation_key, routing_hint: routing_hint do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.begin_transaction ::Google::Cloud::Spanner::V1::BeginTransactionRequest.new(session: session, options: options, request_options: request_options, mutation_key: mutation_key, routing_hint: routing_hint) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.begin_transaction({ session: session, options: options, request_options: request_options, mutation_key: mutation_key, routing_hint: routing_hint }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.begin_transaction(::Google::Cloud::Spanner::V1::BeginTransactionRequest.new(session: session, options: options, request_options: request_options, mutation_key: mutation_key, routing_hint: routing_hint), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, begin_transaction_client_stub.call_rpc_count - end - end - - def test_commit - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::CommitResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - session = "hello world" - transaction_id = "hello world" - mutations = [{}] - return_commit_stats = true - max_commit_delay = {} - request_options = {} - precommit_token = {} - routing_hint = {} - - commit_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :commit, name - assert_kind_of ::Google::Cloud::Spanner::V1::CommitRequest, request - assert_equal "hello world", request["session"] - assert_equal "hello world", request["transaction_id"] - assert_equal :transaction_id, request.transaction - assert_kind_of ::Google::Cloud::Spanner::V1::Mutation, request["mutations"].first - assert_equal true, request["return_commit_stats"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["max_commit_delay"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::MultiplexedSessionPrecommitToken), request["precommit_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RoutingHint), request["routing_hint"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, commit_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.commit({ session: session, transaction_id: transaction_id, mutations: mutations, return_commit_stats: return_commit_stats, max_commit_delay: max_commit_delay, request_options: request_options, precommit_token: precommit_token, routing_hint: routing_hint }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.commit session: session, transaction_id: transaction_id, mutations: mutations, return_commit_stats: return_commit_stats, max_commit_delay: max_commit_delay, request_options: request_options, precommit_token: precommit_token, routing_hint: routing_hint do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.commit ::Google::Cloud::Spanner::V1::CommitRequest.new(session: session, transaction_id: transaction_id, mutations: mutations, return_commit_stats: return_commit_stats, max_commit_delay: max_commit_delay, request_options: request_options, precommit_token: precommit_token, routing_hint: routing_hint) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.commit({ session: session, transaction_id: transaction_id, mutations: mutations, return_commit_stats: return_commit_stats, max_commit_delay: max_commit_delay, request_options: request_options, precommit_token: precommit_token, routing_hint: routing_hint }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.commit(::Google::Cloud::Spanner::V1::CommitRequest.new(session: session, transaction_id: transaction_id, mutations: mutations, return_commit_stats: return_commit_stats, max_commit_delay: max_commit_delay, request_options: request_options, precommit_token: precommit_token, routing_hint: routing_hint), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, commit_client_stub.call_rpc_count - end - end - - def test_rollback - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - session = "hello world" - transaction_id = "hello world" - - rollback_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rollback, name - assert_kind_of ::Google::Cloud::Spanner::V1::RollbackRequest, request - assert_equal "hello world", request["session"] - assert_equal "hello world", request["transaction_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rollback_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.rollback({ session: session, transaction_id: transaction_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.rollback session: session, transaction_id: transaction_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.rollback ::Google::Cloud::Spanner::V1::RollbackRequest.new(session: session, transaction_id: transaction_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.rollback({ session: session, transaction_id: transaction_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.rollback(::Google::Cloud::Spanner::V1::RollbackRequest.new(session: session, transaction_id: transaction_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rollback_client_stub.call_rpc_count - end - end - - def test_partition_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::PartitionResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - session = "hello world" - transaction = {} - sql = "hello world" - params = {} - param_types = {} - partition_options = {} - - partition_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :partition_query, name - assert_kind_of ::Google::Cloud::Spanner::V1::PartitionQueryRequest, request - assert_equal "hello world", request["session"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] - assert_equal "hello world", request["sql"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Struct), request["params"] - assert_equal({}, request["param_types"].to_h) - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::PartitionOptions), request["partition_options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, partition_query_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.partition_query({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, partition_options: partition_options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.partition_query session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, partition_options: partition_options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.partition_query ::Google::Cloud::Spanner::V1::PartitionQueryRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, partition_options: partition_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.partition_query({ session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, partition_options: partition_options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.partition_query(::Google::Cloud::Spanner::V1::PartitionQueryRequest.new(session: session, transaction: transaction, sql: sql, params: params, param_types: param_types, partition_options: partition_options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, partition_query_client_stub.call_rpc_count - end - end - - def test_partition_read - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::PartitionResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - session = "hello world" - transaction = {} - table = "hello world" - index = "hello world" - columns = ["hello world"] - key_set = {} - partition_options = {} - - partition_read_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :partition_read, name - assert_kind_of ::Google::Cloud::Spanner::V1::PartitionReadRequest, request - assert_equal "hello world", request["session"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::TransactionSelector), request["transaction"] - assert_equal "hello world", request["table"] - assert_equal "hello world", request["index"] - assert_equal ["hello world"], request["columns"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::KeySet), request["key_set"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::PartitionOptions), request["partition_options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, partition_read_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.partition_read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, partition_options: partition_options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.partition_read session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, partition_options: partition_options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.partition_read ::Google::Cloud::Spanner::V1::PartitionReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, partition_options: partition_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.partition_read({ session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, partition_options: partition_options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.partition_read(::Google::Cloud::Spanner::V1::PartitionReadRequest.new(session: session, transaction: transaction, table: table, index: index, columns: columns, key_set: key_set, partition_options: partition_options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, partition_read_client_stub.call_rpc_count - end - end - - def test_batch_write - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::BatchWriteResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a server streaming method. - session = "hello world" - request_options = {} - mutation_groups = [{}] - exclude_txn_from_change_streams = true - - batch_write_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :batch_write, name - assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteRequest, request - assert_equal "hello world", request["session"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Spanner::V1::RequestOptions), request["request_options"] - assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteRequest::MutationGroup, request["mutation_groups"].first - assert_equal true, request["exclude_txn_from_change_streams"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_write_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_write({ session: session, request_options: request_options, mutation_groups: mutation_groups, exclude_txn_from_change_streams: exclude_txn_from_change_streams }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_write session: session, request_options: request_options, mutation_groups: mutation_groups, exclude_txn_from_change_streams: exclude_txn_from_change_streams do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_write ::Google::Cloud::Spanner::V1::BatchWriteRequest.new(session: session, request_options: request_options, mutation_groups: mutation_groups, exclude_txn_from_change_streams: exclude_txn_from_change_streams) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_write({ session: session, request_options: request_options, mutation_groups: mutation_groups, exclude_txn_from_change_streams: exclude_txn_from_change_streams }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_write(::Google::Cloud::Spanner::V1::BatchWriteRequest.new(session: session, request_options: request_options, mutation_groups: mutation_groups, exclude_txn_from_change_streams: exclude_txn_from_change_streams), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::BatchWriteResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_write_client_stub.call_rpc_count - end - end - - def test_fetch_cache_update - # Create GRPC objects. - grpc_response = ::Google::Cloud::Spanner::V1::CacheUpdate.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a server streaming method. - database = "hello world" - max_recipe_count = 42 - max_range_count = 42 - - fetch_cache_update_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :fetch_cache_update, name - assert_kind_of ::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest, request - assert_equal "hello world", request["database"] - assert_equal 42, request["max_recipe_count"] - assert_equal 42, request["max_range_count"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_cache_update_client_stub do - # Create client - c = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.fetch_cache_update({ database: database, max_recipe_count: max_recipe_count, max_range_count: max_range_count }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::CacheUpdate, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - c.fetch_cache_update database: database, max_recipe_count: max_recipe_count, max_range_count: max_range_count do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::CacheUpdate, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.fetch_cache_update ::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest.new(database: database, max_recipe_count: max_recipe_count, max_range_count: max_range_count) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::CacheUpdate, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.fetch_cache_update({ database: database, max_recipe_count: max_recipe_count, max_range_count: max_range_count }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::CacheUpdate, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.fetch_cache_update(::Google::Cloud::Spanner::V1::FetchCacheUpdateRequest.new(database: database, max_recipe_count: max_recipe_count, max_range_count: max_range_count), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Spanner::V1::CacheUpdate, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_cache_update_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Spanner::V1::Spanner::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Spanner::V1::Spanner::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-spanner-v1/test/helper.rb b/owl-bot-staging/google-cloud-spanner-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-spanner-v1/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-speech-v1/.gitignore b/owl-bot-staging/google-cloud-speech-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/.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-speech-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-speech-v1/.repo-metadata.json deleted file mode 100644 index 2c94c817be63..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "speech.googleapis.com", - "api_shortname": "speech", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-speech-v1/latest", - "distribution_name": "google-cloud-speech-v1", - "is_cloud": true, - "language": "ruby", - "name": "speech", - "name_pretty": "Cloud Speech-to-Text V1 API", - "product_documentation": "https://cloud.google.com/speech-to-text", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. Note that google-cloud-speech-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-speech instead. See the readme for more details.", - "ruby-cloud-env-prefix": "SPEECH", - "ruby-cloud-product-url": "https://cloud.google.com/speech-to-text", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-speech-v1/.rubocop.yml b/owl-bot-staging/google-cloud-speech-v1/.rubocop.yml deleted file mode 100644 index 3c22305c5efd..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-speech-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-speech-v1.rb" diff --git a/owl-bot-staging/google-cloud-speech-v1/.toys.rb b/owl-bot-staging/google-cloud-speech-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-speech-v1/.yardopts b/owl-bot-staging/google-cloud-speech-v1/.yardopts deleted file mode 100644 index a7bd0f2eaed7..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Speech-to-Text V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-speech-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-speech-v1/AUTHENTICATION.md deleted file mode 100644 index 3c4dc7e2d2ce..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-speech-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-speech-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/speech/v1" - -client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/speech/v1" - -::Google::Cloud::Speech::V1::Speech::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Speech::V1::Speech::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-speech-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/speech/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Speech::V1::Speech::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-speech-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-speech-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-speech-v1/Gemfile b/owl-bot-staging/google-cloud-speech-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-speech-v1/LICENSE.md b/owl-bot-staging/google-cloud-speech-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-speech-v1/README.md b/owl-bot-staging/google-cloud-speech-v1/README.md deleted file mode 100644 index b6487d40b93b..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Speech-to-Text V1 API - -Converts audio to text by applying powerful neural network models. - -Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Speech-to-Text V1 API. Most users should consider using -the main client gem, -[google-cloud-speech](https://rubygems.org/gems/google-cloud-speech). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-speech-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/speech.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/speech/v1" - -client = ::Google::Cloud::Speech::V1::Speech::Client.new -request = ::Google::Cloud::Speech::V1::RecognizeRequest.new # (request fields as keyword arguments...) -response = client.recognize request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-speech-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/speech-to-text) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/speech/v1" -require "logger" - -client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-speech`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-speech-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-speech`. -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-speech-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-speech-v1/Rakefile b/owl-bot-staging/google-cloud-speech-v1/Rakefile deleted file mode 100644 index 4e0a18b9fab2..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-speech-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SPEECH_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SPEECH_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SPEECH_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 SPEECH_TEST_PROJECT=test123 SPEECH_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/speech/v1/speech/credentials" - ::Google::Cloud::Speech::V1::Speech::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SPEECH_PROJECT"] = project - ENV["SPEECH_TEST_PROJECT"] = project - ENV["SPEECH_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-speech-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-speech-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-speech-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-speech-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-speech-v1" - header "google-cloud-speech-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-speech-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-speech-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-speech-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-speech-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-speech-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-speech-v1/gapic_metadata.json deleted file mode 100644 index b8215cef6ab6..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/gapic_metadata.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.speech.v1", - "libraryPackage": "::Google::Cloud::Speech::V1", - "services": { - "Speech": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Speech::V1::Speech::Client", - "rpcs": { - "Recognize": { - "methods": [ - "recognize" - ] - }, - "LongRunningRecognize": { - "methods": [ - "long_running_recognize" - ] - }, - "StreamingRecognize": { - "methods": [ - "streaming_recognize" - ] - } - } - } - } - }, - "Adaptation": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Speech::V1::Adaptation::Client", - "rpcs": { - "CreatePhraseSet": { - "methods": [ - "create_phrase_set" - ] - }, - "GetPhraseSet": { - "methods": [ - "get_phrase_set" - ] - }, - "ListPhraseSet": { - "methods": [ - "list_phrase_set" - ] - }, - "UpdatePhraseSet": { - "methods": [ - "update_phrase_set" - ] - }, - "DeletePhraseSet": { - "methods": [ - "delete_phrase_set" - ] - }, - "CreateCustomClass": { - "methods": [ - "create_custom_class" - ] - }, - "GetCustomClass": { - "methods": [ - "get_custom_class" - ] - }, - "ListCustomClasses": { - "methods": [ - "list_custom_classes" - ] - }, - "UpdateCustomClass": { - "methods": [ - "update_custom_class" - ] - }, - "DeleteCustomClass": { - "methods": [ - "delete_custom_class" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-speech-v1/google-cloud-speech-v1.gemspec b/owl-bot-staging/google-cloud-speech-v1/google-cloud-speech-v1.gemspec deleted file mode 100644 index 9edc44b2885c..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/google-cloud-speech-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/speech/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-speech-v1" - gem.version = Google::Cloud::Speech::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. Note that google-cloud-speech-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-speech instead. See the readme for more details." - gem.summary = "Converts audio to text by applying powerful neural network models." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google-cloud-speech-v1.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google-cloud-speech-v1.rb deleted file mode 100644 index 203644080a2e..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google-cloud-speech-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/speech/v1" diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1.rb deleted file mode 100644 index 3a78a0bfcd8b..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/speech/v1/speech" -require "google/cloud/speech/v1/adaptation" -require "google/cloud/speech/v1/version" - -module Google - module Cloud - module Speech - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/speech/v1" - # client = ::Google::Cloud::Speech::V1::Speech::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/speech/v1" - # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/speech/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation.rb deleted file mode 100644 index 13699cd76973..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/speech/v1/version" - -require "google/cloud/speech/v1/adaptation/credentials" -require "google/cloud/speech/v1/adaptation/paths" -require "google/cloud/speech/v1/adaptation/client" -require "google/cloud/speech/v1/adaptation/rest" - -module Google - module Cloud - module Speech - module V1 - ## - # Service that implements Google Cloud Speech Adaptation API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/speech/v1/adaptation" - # client = ::Google::Cloud::Speech::V1::Adaptation::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/speech/v1/adaptation/rest" - # client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - module Adaptation - end - end - end - end -end - -helper_path = ::File.join __dir__, "adaptation", "helpers.rb" -require "google/cloud/speech/v1/adaptation/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/client.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/client.rb deleted file mode 100644 index af6f3724ead2..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/client.rb +++ /dev/null @@ -1,1436 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/speech/v1/cloud_speech_adaptation_pb" - -module Google - module Cloud - module Speech - module V1 - module Adaptation - ## - # Client for the Adaptation service. - # - # Service that implements Google Cloud Speech Adaptation API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :adaptation_stub - - ## - # Configure the Adaptation Client class. - # - # See {::Google::Cloud::Speech::V1::Adaptation::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Adaptation clients - # ::Google::Cloud::Speech::V1::Adaptation::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Speech", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Adaptation Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Speech::V1::Adaptation::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @adaptation_stub.universe_domain - end - - ## - # Create a new Adaptation client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Speech::V1::Adaptation::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Adaptation client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/speech/v1/cloud_speech_adaptation_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @adaptation_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Speech::V1::Adaptation::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @adaptation_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @adaptation_stub.logger - end - - # Service calls - - ## - # Create a set of phrase hints. Each item in the set can be a single word or - # a multi-word phrase. The items in the PhraseSet are favored by the - # recognition model when you send a call that includes the PhraseSet. - # - # @overload create_phrase_set(request, options = nil) - # Pass arguments to `create_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1::CreatePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::CreatePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_phrase_set(parent: nil, phrase_set_id: nil, phrase_set: nil) - # Pass arguments to `create_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this phrase set will be created. - # Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param phrase_set_id [::String] - # Required. The ID to use for the phrase set, which will become the final - # component of the phrase set's resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @param phrase_set [::Google::Cloud::Speech::V1::PhraseSet, ::Hash] - # Required. The phrase set to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1::PhraseSet] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::CreatePhraseSetRequest.new - # - # # Call the create_phrase_set method. - # result = client.create_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. - # p result - # - def create_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::CreatePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_phrase_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :create_phrase_set, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a phrase set. - # - # @overload get_phrase_set(request, options = nil) - # Pass arguments to `get_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1::GetPhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::GetPhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_phrase_set(name: nil) - # Pass arguments to `get_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the phrase set to retrieve. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1::PhraseSet] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::GetPhraseSetRequest.new - # - # # Call the get_phrase_set method. - # result = client.get_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. - # p result - # - def get_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::GetPhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_phrase_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :get_phrase_set, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List phrase sets. - # - # @overload list_phrase_set(request, options = nil) - # Pass arguments to `list_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1::ListPhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::ListPhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_phrase_set(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of phrase set. Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param page_size [::Integer] - # The maximum number of phrase sets to return. The service may return - # fewer than this value. If unspecified, at most 50 phrase sets will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListPhraseSet` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPhraseSet` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1::PhraseSet>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1::PhraseSet>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::ListPhraseSetRequest.new - # - # # Call the list_phrase_set method. - # result = client.list_phrase_set request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Speech::V1::PhraseSet. - # p item - # end - # - def list_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::ListPhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_phrase_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :list_phrase_set, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @adaptation_stub, :list_phrase_set, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a phrase set. - # - # @overload update_phrase_set(request, options = nil) - # Pass arguments to `update_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1::UpdatePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::UpdatePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_phrase_set(phrase_set: nil, update_mask: nil) - # Pass arguments to `update_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param phrase_set [::Google::Cloud::Speech::V1::PhraseSet, ::Hash] - # Required. The phrase set to update. - # - # The phrase set's `name` field is used to identify the set to be - # updated. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1::PhraseSet] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new - # - # # Call the update_phrase_set method. - # result = client.update_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. - # p result - # - def update_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.phrase_set&.name - header_params["phrase_set.name"] = request.phrase_set.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_phrase_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :update_phrase_set, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a phrase set. - # - # @overload delete_phrase_set(request, options = nil) - # Pass arguments to `delete_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1::DeletePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::DeletePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_phrase_set(name: nil) - # Pass arguments to `delete_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the phrase set to delete. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::DeletePhraseSetRequest.new - # - # # Call the delete_phrase_set method. - # result = client.delete_phrase_set request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::DeletePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_phrase_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :delete_phrase_set, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a custom class. - # - # @overload create_custom_class(request, options = nil) - # Pass arguments to `create_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1::CreateCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::CreateCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_custom_class(parent: nil, custom_class_id: nil, custom_class: nil) - # Pass arguments to `create_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this custom class will be created. - # Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param custom_class_id [::String] - # Required. The ID to use for the custom class, which will become the final - # component of the custom class' resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @param custom_class [::Google::Cloud::Speech::V1::CustomClass, ::Hash] - # Required. The custom class to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1::CustomClass] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::CreateCustomClassRequest.new - # - # # Call the create_custom_class method. - # result = client.create_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. - # p result - # - def create_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::CreateCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_custom_class.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :create_custom_class, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a custom class. - # - # @overload get_custom_class(request, options = nil) - # Pass arguments to `get_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1::GetCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::GetCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_custom_class(name: nil) - # Pass arguments to `get_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the custom class to retrieve. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1::CustomClass] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::GetCustomClassRequest.new - # - # # Call the get_custom_class method. - # result = client.get_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. - # p result - # - def get_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::GetCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_custom_class.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :get_custom_class, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List custom classes. - # - # @overload list_custom_classes(request, options = nil) - # Pass arguments to `list_custom_classes` via a request object, either of type - # {::Google::Cloud::Speech::V1::ListCustomClassesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::ListCustomClassesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_custom_classes(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_custom_classes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of custom classes. Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param page_size [::Integer] - # The maximum number of custom classes to return. The service may return - # fewer than this value. If unspecified, at most 50 custom classes will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListCustomClass` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCustomClass` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1::CustomClass>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1::CustomClass>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::ListCustomClassesRequest.new - # - # # Call the list_custom_classes method. - # result = client.list_custom_classes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Speech::V1::CustomClass. - # p item - # end - # - def list_custom_classes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::ListCustomClassesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_custom_classes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_custom_classes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_custom_classes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :list_custom_classes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @adaptation_stub, :list_custom_classes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a custom class. - # - # @overload update_custom_class(request, options = nil) - # Pass arguments to `update_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1::UpdateCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::UpdateCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_custom_class(custom_class: nil, update_mask: nil) - # Pass arguments to `update_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param custom_class [::Google::Cloud::Speech::V1::CustomClass, ::Hash] - # Required. The custom class to update. - # - # The custom class's `name` field is used to identify the custom class to be - # updated. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1::CustomClass] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::UpdateCustomClassRequest.new - # - # # Call the update_custom_class method. - # result = client.update_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. - # p result - # - def update_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::UpdateCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.custom_class&.name - header_params["custom_class.name"] = request.custom_class.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_custom_class.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :update_custom_class, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a custom class. - # - # @overload delete_custom_class(request, options = nil) - # Pass arguments to `delete_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1::DeleteCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::DeleteCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_custom_class(name: nil) - # Pass arguments to `delete_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the custom class to delete. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::DeleteCustomClassRequest.new - # - # # Call the delete_custom_class method. - # result = client.delete_custom_class request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::DeleteCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_custom_class.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :delete_custom_class, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Adaptation API. - # - # This class represents the configuration for Adaptation, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Speech::V1::Adaptation::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_phrase_set to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Speech::V1::Adaptation::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_phrase_set.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_phrase_set.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Adaptation API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :create_phrase_set - ## - # RPC-specific configuration for `get_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :get_phrase_set - ## - # RPC-specific configuration for `list_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :list_phrase_set - ## - # RPC-specific configuration for `update_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :update_phrase_set - ## - # RPC-specific configuration for `delete_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_phrase_set - ## - # RPC-specific configuration for `create_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :create_custom_class - ## - # RPC-specific configuration for `get_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :get_custom_class - ## - # RPC-specific configuration for `list_custom_classes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_custom_classes - ## - # RPC-specific configuration for `update_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :update_custom_class - ## - # RPC-specific configuration for `delete_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_custom_class - - # @private - def initialize parent_rpcs = nil - create_phrase_set_config = parent_rpcs.create_phrase_set if parent_rpcs.respond_to? :create_phrase_set - @create_phrase_set = ::Gapic::Config::Method.new create_phrase_set_config - get_phrase_set_config = parent_rpcs.get_phrase_set if parent_rpcs.respond_to? :get_phrase_set - @get_phrase_set = ::Gapic::Config::Method.new get_phrase_set_config - list_phrase_set_config = parent_rpcs.list_phrase_set if parent_rpcs.respond_to? :list_phrase_set - @list_phrase_set = ::Gapic::Config::Method.new list_phrase_set_config - update_phrase_set_config = parent_rpcs.update_phrase_set if parent_rpcs.respond_to? :update_phrase_set - @update_phrase_set = ::Gapic::Config::Method.new update_phrase_set_config - delete_phrase_set_config = parent_rpcs.delete_phrase_set if parent_rpcs.respond_to? :delete_phrase_set - @delete_phrase_set = ::Gapic::Config::Method.new delete_phrase_set_config - create_custom_class_config = parent_rpcs.create_custom_class if parent_rpcs.respond_to? :create_custom_class - @create_custom_class = ::Gapic::Config::Method.new create_custom_class_config - get_custom_class_config = parent_rpcs.get_custom_class if parent_rpcs.respond_to? :get_custom_class - @get_custom_class = ::Gapic::Config::Method.new get_custom_class_config - list_custom_classes_config = parent_rpcs.list_custom_classes if parent_rpcs.respond_to? :list_custom_classes - @list_custom_classes = ::Gapic::Config::Method.new list_custom_classes_config - update_custom_class_config = parent_rpcs.update_custom_class if parent_rpcs.respond_to? :update_custom_class - @update_custom_class = ::Gapic::Config::Method.new update_custom_class_config - delete_custom_class_config = parent_rpcs.delete_custom_class if parent_rpcs.respond_to? :delete_custom_class - @delete_custom_class = ::Gapic::Config::Method.new delete_custom_class_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.rb deleted file mode 100644 index 3d08fc44b076..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Speech - module V1 - module Adaptation - # Credentials for the Adaptation API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SPEECH_CREDENTIALS", - "SPEECH_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SPEECH_CREDENTIALS_JSON", - "SPEECH_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.rb deleted file mode 100644 index 57c97718dd9d..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/paths.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Speech - module V1 - module Adaptation - # Path helper methods for the Adaptation API. - module Paths - ## - # Create a fully-qualified CustomClass resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # @param project [String] - # @param location [String] - # @param custom_class [String] - # - # @return [::String] - def custom_class_path project:, location:, custom_class: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/customClasses/#{custom_class}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified PhraseSet resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # @param project [String] - # @param location [String] - # @param phrase_set [String] - # - # @return [::String] - def phrase_set_path project:, location:, phrase_set: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/phraseSets/#{phrase_set}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.rb deleted file mode 100644 index 3b9be5472f5a..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/speech/v1/version" - -require "google/cloud/speech/v1/adaptation/credentials" -require "google/cloud/speech/v1/adaptation/paths" -require "google/cloud/speech/v1/adaptation/rest/client" - -module Google - module Cloud - module Speech - module V1 - ## - # Service that implements Google Cloud Speech Adaptation API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/speech/v1/adaptation/rest" - # client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - module Adaptation - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/speech/v1/adaptation/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.rb deleted file mode 100644 index 00bf27004afc..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/client.rb +++ /dev/null @@ -1,1323 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/speech/v1/cloud_speech_adaptation_pb" -require "google/cloud/speech/v1/adaptation/rest/service_stub" - -module Google - module Cloud - module Speech - module V1 - module Adaptation - module Rest - ## - # REST client for the Adaptation service. - # - # Service that implements Google Cloud Speech Adaptation API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :adaptation_stub - - ## - # Configure the Adaptation Client class. - # - # See {::Google::Cloud::Speech::V1::Adaptation::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Adaptation clients - # ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Speech", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Adaptation Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Speech::V1::Adaptation::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @adaptation_stub.universe_domain - end - - ## - # Create a new Adaptation REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Adaptation client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @adaptation_stub = ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @adaptation_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @adaptation_stub.logger - end - - # Service calls - - ## - # Create a set of phrase hints. Each item in the set can be a single word or - # a multi-word phrase. The items in the PhraseSet are favored by the - # recognition model when you send a call that includes the PhraseSet. - # - # @overload create_phrase_set(request, options = nil) - # Pass arguments to `create_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1::CreatePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::CreatePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_phrase_set(parent: nil, phrase_set_id: nil, phrase_set: nil) - # Pass arguments to `create_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this phrase set will be created. - # Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param phrase_set_id [::String] - # Required. The ID to use for the phrase set, which will become the final - # component of the phrase set's resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @param phrase_set [::Google::Cloud::Speech::V1::PhraseSet, ::Hash] - # Required. The phrase set to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::CreatePhraseSetRequest.new - # - # # Call the create_phrase_set method. - # result = client.create_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. - # p result - # - def create_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::CreatePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_phrase_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.create_phrase_set request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a phrase set. - # - # @overload get_phrase_set(request, options = nil) - # Pass arguments to `get_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1::GetPhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::GetPhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_phrase_set(name: nil) - # Pass arguments to `get_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the phrase set to retrieve. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::GetPhraseSetRequest.new - # - # # Call the get_phrase_set method. - # result = client.get_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. - # p result - # - def get_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::GetPhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_phrase_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.get_phrase_set request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List phrase sets. - # - # @overload list_phrase_set(request, options = nil) - # Pass arguments to `list_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1::ListPhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::ListPhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_phrase_set(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of phrase set. Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param page_size [::Integer] - # The maximum number of phrase sets to return. The service may return - # fewer than this value. If unspecified, at most 50 phrase sets will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListPhraseSet` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPhraseSet` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1::PhraseSet>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1::PhraseSet>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::ListPhraseSetRequest.new - # - # # Call the list_phrase_set method. - # result = client.list_phrase_set request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Speech::V1::PhraseSet. - # p item - # end - # - def list_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::ListPhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_phrase_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.list_phrase_set request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @adaptation_stub, :list_phrase_set, "phrase_sets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a phrase set. - # - # @overload update_phrase_set(request, options = nil) - # Pass arguments to `update_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1::UpdatePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::UpdatePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_phrase_set(phrase_set: nil, update_mask: nil) - # Pass arguments to `update_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param phrase_set [::Google::Cloud::Speech::V1::PhraseSet, ::Hash] - # Required. The phrase set to update. - # - # The phrase set's `name` field is used to identify the set to be - # updated. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new - # - # # Call the update_phrase_set method. - # result = client.update_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. - # p result - # - def update_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_phrase_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.update_phrase_set request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a phrase set. - # - # @overload delete_phrase_set(request, options = nil) - # Pass arguments to `delete_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1::DeletePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::DeletePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_phrase_set(name: nil) - # Pass arguments to `delete_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the phrase set to delete. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::DeletePhraseSetRequest.new - # - # # Call the delete_phrase_set method. - # result = client.delete_phrase_set request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::DeletePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_phrase_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.delete_phrase_set request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a custom class. - # - # @overload create_custom_class(request, options = nil) - # Pass arguments to `create_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1::CreateCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::CreateCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_custom_class(parent: nil, custom_class_id: nil, custom_class: nil) - # Pass arguments to `create_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this custom class will be created. - # Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param custom_class_id [::String] - # Required. The ID to use for the custom class, which will become the final - # component of the custom class' resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @param custom_class [::Google::Cloud::Speech::V1::CustomClass, ::Hash] - # Required. The custom class to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::CreateCustomClassRequest.new - # - # # Call the create_custom_class method. - # result = client.create_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. - # p result - # - def create_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::CreateCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_custom_class.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.create_custom_class request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a custom class. - # - # @overload get_custom_class(request, options = nil) - # Pass arguments to `get_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1::GetCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::GetCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_custom_class(name: nil) - # Pass arguments to `get_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the custom class to retrieve. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::GetCustomClassRequest.new - # - # # Call the get_custom_class method. - # result = client.get_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. - # p result - # - def get_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::GetCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_custom_class.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.get_custom_class request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List custom classes. - # - # @overload list_custom_classes(request, options = nil) - # Pass arguments to `list_custom_classes` via a request object, either of type - # {::Google::Cloud::Speech::V1::ListCustomClassesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::ListCustomClassesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_custom_classes(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_custom_classes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of custom classes. Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param page_size [::Integer] - # The maximum number of custom classes to return. The service may return - # fewer than this value. If unspecified, at most 50 custom classes will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListCustomClass` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCustomClass` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1::CustomClass>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1::CustomClass>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::ListCustomClassesRequest.new - # - # # Call the list_custom_classes method. - # result = client.list_custom_classes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Speech::V1::CustomClass. - # p item - # end - # - def list_custom_classes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::ListCustomClassesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_custom_classes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_custom_classes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_custom_classes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.list_custom_classes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @adaptation_stub, :list_custom_classes, "custom_classes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a custom class. - # - # @overload update_custom_class(request, options = nil) - # Pass arguments to `update_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1::UpdateCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::UpdateCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_custom_class(custom_class: nil, update_mask: nil) - # Pass arguments to `update_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param custom_class [::Google::Cloud::Speech::V1::CustomClass, ::Hash] - # Required. The custom class to update. - # - # The custom class's `name` field is used to identify the custom class to be - # updated. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::UpdateCustomClassRequest.new - # - # # Call the update_custom_class method. - # result = client.update_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1::CustomClass. - # p result - # - def update_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::UpdateCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_custom_class.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.update_custom_class request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a custom class. - # - # @overload delete_custom_class(request, options = nil) - # Pass arguments to `delete_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1::DeleteCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::DeleteCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_custom_class(name: nil) - # Pass arguments to `delete_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the custom class to delete. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::DeleteCustomClassRequest.new - # - # # Call the delete_custom_class method. - # result = client.delete_custom_class request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::DeleteCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_custom_class.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.delete_custom_class request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Adaptation REST API. - # - # This class represents the configuration for Adaptation REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Speech::V1::Adaptation::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_phrase_set to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_phrase_set.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_phrase_set.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Adaptation API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :create_phrase_set - ## - # RPC-specific configuration for `get_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :get_phrase_set - ## - # RPC-specific configuration for `list_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :list_phrase_set - ## - # RPC-specific configuration for `update_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :update_phrase_set - ## - # RPC-specific configuration for `delete_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_phrase_set - ## - # RPC-specific configuration for `create_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :create_custom_class - ## - # RPC-specific configuration for `get_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :get_custom_class - ## - # RPC-specific configuration for `list_custom_classes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_custom_classes - ## - # RPC-specific configuration for `update_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :update_custom_class - ## - # RPC-specific configuration for `delete_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_custom_class - - # @private - def initialize parent_rpcs = nil - create_phrase_set_config = parent_rpcs.create_phrase_set if parent_rpcs.respond_to? :create_phrase_set - @create_phrase_set = ::Gapic::Config::Method.new create_phrase_set_config - get_phrase_set_config = parent_rpcs.get_phrase_set if parent_rpcs.respond_to? :get_phrase_set - @get_phrase_set = ::Gapic::Config::Method.new get_phrase_set_config - list_phrase_set_config = parent_rpcs.list_phrase_set if parent_rpcs.respond_to? :list_phrase_set - @list_phrase_set = ::Gapic::Config::Method.new list_phrase_set_config - update_phrase_set_config = parent_rpcs.update_phrase_set if parent_rpcs.respond_to? :update_phrase_set - @update_phrase_set = ::Gapic::Config::Method.new update_phrase_set_config - delete_phrase_set_config = parent_rpcs.delete_phrase_set if parent_rpcs.respond_to? :delete_phrase_set - @delete_phrase_set = ::Gapic::Config::Method.new delete_phrase_set_config - create_custom_class_config = parent_rpcs.create_custom_class if parent_rpcs.respond_to? :create_custom_class - @create_custom_class = ::Gapic::Config::Method.new create_custom_class_config - get_custom_class_config = parent_rpcs.get_custom_class if parent_rpcs.respond_to? :get_custom_class - @get_custom_class = ::Gapic::Config::Method.new get_custom_class_config - list_custom_classes_config = parent_rpcs.list_custom_classes if parent_rpcs.respond_to? :list_custom_classes - @list_custom_classes = ::Gapic::Config::Method.new list_custom_classes_config - update_custom_class_config = parent_rpcs.update_custom_class if parent_rpcs.respond_to? :update_custom_class - @update_custom_class = ::Gapic::Config::Method.new update_custom_class_config - delete_custom_class_config = parent_rpcs.delete_custom_class if parent_rpcs.respond_to? :delete_custom_class - @delete_custom_class = ::Gapic::Config::Method.new delete_custom_class_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb deleted file mode 100644 index 3eb09c2b9827..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/adaptation/rest/service_stub.rb +++ /dev/null @@ -1,695 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/speech/v1/cloud_speech_adaptation_pb" - -module Google - module Cloud - module Speech - module V1 - module Adaptation - module Rest - ## - # REST service stub for the Adaptation service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::CreatePhraseSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::PhraseSet] - # A result object deserialized from the server's reply - def create_phrase_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_phrase_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_phrase_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1::PhraseSet.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::GetPhraseSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::PhraseSet] - # A result object deserialized from the server's reply - def get_phrase_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_phrase_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_phrase_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1::PhraseSet.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::ListPhraseSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::ListPhraseSetResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::ListPhraseSetResponse] - # A result object deserialized from the server's reply - def list_phrase_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_phrase_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_phrase_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1::ListPhraseSetResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::UpdatePhraseSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::PhraseSet] - # A result object deserialized from the server's reply - def update_phrase_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_phrase_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_phrase_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1::PhraseSet.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::DeletePhraseSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_phrase_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_phrase_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_phrase_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::CreateCustomClassRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::CustomClass] - # A result object deserialized from the server's reply - def create_custom_class request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_custom_class_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_custom_class", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1::CustomClass.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::GetCustomClassRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::CustomClass] - # A result object deserialized from the server's reply - def get_custom_class request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_custom_class_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_custom_class", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1::CustomClass.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_custom_classes REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::ListCustomClassesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::ListCustomClassesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::ListCustomClassesResponse] - # A result object deserialized from the server's reply - def list_custom_classes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_custom_classes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_custom_classes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1::ListCustomClassesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::UpdateCustomClassRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::CustomClass] - # A result object deserialized from the server's reply - def update_custom_class request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_custom_class_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_custom_class", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1::CustomClass.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::DeleteCustomClassRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_custom_class request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_custom_class_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_custom_class", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::CreatePhraseSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_phrase_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/phraseSets", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::GetPhraseSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_phrase_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::ListPhraseSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_phrase_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/phraseSets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::UpdatePhraseSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_phrase_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{phrase_set.name}", - body: "phrase_set", - matches: [ - ["phrase_set.name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::DeletePhraseSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_phrase_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::CreateCustomClassRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_custom_class_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customClasses", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::GetCustomClassRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_custom_class_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_custom_classes REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::ListCustomClassesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_custom_classes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customClasses", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::UpdateCustomClassRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_custom_class_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{custom_class.name}", - body: "custom_class", - matches: [ - ["custom_class.name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::DeleteCustomClassRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_custom_class_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_pb.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_pb.rb deleted file mode 100644 index 602e53dc90e7..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/speech/v1/cloud_speech_adaptation.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/speech/v1/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n4google/cloud/speech/v1/cloud_speech_adaptation.proto\x12\x16google.cloud.speech.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a%google/cloud/speech/v1/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa9\x01\n\x16\x43reatePhraseSetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\x12\x1a\n\rphrase_set_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12:\n\nphrase_set\x18\x03 \x01(\x0b\x32!.google.cloud.speech.v1.PhraseSetB\x03\xe0\x41\x02\"\x85\x01\n\x16UpdatePhraseSetRequest\x12:\n\nphrase_set\x18\x01 \x01(\x0b\x32!.google.cloud.speech.v1.PhraseSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"L\n\x13GetPhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"v\n\x14ListPhraseSetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"h\n\x15ListPhraseSetResponse\x12\x36\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32!.google.cloud.speech.v1.PhraseSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x16\x44\x65letePhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"\xb3\x01\n\x18\x43reateCustomClassRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\x12\x1c\n\x0f\x63ustom_class_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0c\x63ustom_class\x18\x03 \x01(\x0b\x32#.google.cloud.speech.v1.CustomClassB\x03\xe0\x41\x02\"\x8b\x01\n\x18UpdateCustomClassRequest\x12>\n\x0c\x63ustom_class\x18\x01 \x01(\x0b\x32#.google.cloud.speech.v1.CustomClassB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"P\n\x15GetCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass\"|\n\x18ListCustomClassesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"q\n\x19ListCustomClassesResponse\x12;\n\x0e\x63ustom_classes\x18\x01 \x03(\x0b\x32#.google.cloud.speech.v1.CustomClass\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n\x18\x44\x65leteCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass2\x8e\x0f\n\nAdaptation\x12\xc1\x01\n\x0f\x43reatePhraseSet\x12..google.cloud.speech.v1.CreatePhraseSetRequest\x1a!.google.cloud.speech.v1.PhraseSet\"[\xda\x41\x1fparent,phrase_set,phrase_set_id\x82\xd3\xe4\x93\x02\x33\"./v1/{parent=projects/*/locations/*}/phraseSets:\x01*\x12\x9d\x01\n\x0cGetPhraseSet\x12+.google.cloud.speech.v1.GetPhraseSetRequest\x1a!.google.cloud.speech.v1.PhraseSet\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/phraseSets/*}\x12\xad\x01\n\rListPhraseSet\x12,.google.cloud.speech.v1.ListPhraseSetRequest\x1a-.google.cloud.speech.v1.ListPhraseSetResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/phraseSets\x12\xcc\x01\n\x0fUpdatePhraseSet\x12..google.cloud.speech.v1.UpdatePhraseSetRequest\x1a!.google.cloud.speech.v1.PhraseSet\"f\xda\x41\x16phrase_set,update_mask\x82\xd3\xe4\x93\x02G29/v1/{phrase_set.name=projects/*/locations/*/phraseSets/*}:\nphrase_set\x12\x98\x01\n\x0f\x44\x65letePhraseSet\x12..google.cloud.speech.v1.DeletePhraseSetRequest\x1a\x16.google.protobuf.Empty\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/phraseSets/*}\x12\xce\x01\n\x11\x43reateCustomClass\x12\x30.google.cloud.speech.v1.CreateCustomClassRequest\x1a#.google.cloud.speech.v1.CustomClass\"b\xda\x41#parent,custom_class,custom_class_id\x82\xd3\xe4\x93\x02\x36\"1/v1/{parent=projects/*/locations/*}/customClasses:\x01*\x12\xa6\x01\n\x0eGetCustomClass\x12-.google.cloud.speech.v1.GetCustomClassRequest\x1a#.google.cloud.speech.v1.CustomClass\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/customClasses/*}\x12\xbc\x01\n\x11ListCustomClasses\x12\x30.google.cloud.speech.v1.ListCustomClassesRequest\x1a\x31.google.cloud.speech.v1.ListCustomClassesResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/customClasses\x12\xdb\x01\n\x11UpdateCustomClass\x12\x30.google.cloud.speech.v1.UpdateCustomClassRequest\x1a#.google.cloud.speech.v1.CustomClass\"o\xda\x41\x18\x63ustom_class,update_mask\x82\xd3\xe4\x93\x02N2>/v1/{custom_class.name=projects/*/locations/*/customClasses/*}:\x0c\x63ustom_class\x12\x9f\x01\n\x11\x44\x65leteCustomClass\x12\x30.google.cloud.speech.v1.DeleteCustomClassRequest\x1a\x16.google.protobuf.Empty\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/customClasses/*}\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBr\n\x1a\x63om.google.cloud.speech.v1B\x15SpeechAdaptationProtoP\x01Z2cloud.google.com/go/speech/apiv1/speechpb;speechpb\xf8\x01\x01\xa2\x02\x03GCSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Speech - module V1 - CreatePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CreatePhraseSetRequest").msgclass - UpdatePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.UpdatePhraseSetRequest").msgclass - GetPhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.GetPhraseSetRequest").msgclass - ListPhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListPhraseSetRequest").msgclass - ListPhraseSetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListPhraseSetResponse").msgclass - DeletePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.DeletePhraseSetRequest").msgclass - CreateCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CreateCustomClassRequest").msgclass - UpdateCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.UpdateCustomClassRequest").msgclass - GetCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.GetCustomClassRequest").msgclass - ListCustomClassesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListCustomClassesRequest").msgclass - ListCustomClassesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.ListCustomClassesResponse").msgclass - DeleteCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.DeleteCustomClassRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb deleted file mode 100644 index 9cc7add34e77..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_adaptation_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/speech/v1/cloud_speech_adaptation.proto for package 'google.cloud.speech.v1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/speech/v1/cloud_speech_adaptation_pb' - -module Google - module Cloud - module Speech - module V1 - module Adaptation - # Service that implements Google Cloud Speech Adaptation API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.speech.v1.Adaptation' - - # Create a set of phrase hints. Each item in the set can be a single word or - # a multi-word phrase. The items in the PhraseSet are favored by the - # recognition model when you send a call that includes the PhraseSet. - rpc :CreatePhraseSet, ::Google::Cloud::Speech::V1::CreatePhraseSetRequest, ::Google::Cloud::Speech::V1::PhraseSet - # Get a phrase set. - rpc :GetPhraseSet, ::Google::Cloud::Speech::V1::GetPhraseSetRequest, ::Google::Cloud::Speech::V1::PhraseSet - # List phrase sets. - rpc :ListPhraseSet, ::Google::Cloud::Speech::V1::ListPhraseSetRequest, ::Google::Cloud::Speech::V1::ListPhraseSetResponse - # Update a phrase set. - rpc :UpdatePhraseSet, ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest, ::Google::Cloud::Speech::V1::PhraseSet - # Delete a phrase set. - rpc :DeletePhraseSet, ::Google::Cloud::Speech::V1::DeletePhraseSetRequest, ::Google::Protobuf::Empty - # Create a custom class. - rpc :CreateCustomClass, ::Google::Cloud::Speech::V1::CreateCustomClassRequest, ::Google::Cloud::Speech::V1::CustomClass - # Get a custom class. - rpc :GetCustomClass, ::Google::Cloud::Speech::V1::GetCustomClassRequest, ::Google::Cloud::Speech::V1::CustomClass - # List custom classes. - rpc :ListCustomClasses, ::Google::Cloud::Speech::V1::ListCustomClassesRequest, ::Google::Cloud::Speech::V1::ListCustomClassesResponse - # Update a custom class. - rpc :UpdateCustomClass, ::Google::Cloud::Speech::V1::UpdateCustomClassRequest, ::Google::Cloud::Speech::V1::CustomClass - # Delete a custom class. - rpc :DeleteCustomClass, ::Google::Cloud::Speech::V1::DeleteCustomClassRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_pb.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_pb.rb deleted file mode 100644 index 1870ee42f8a3..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/speech/v1/cloud_speech.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/cloud/speech/v1/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n)google/cloud/speech/v1/cloud_speech.proto\x12\x16google.cloud.speech.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a%google/cloud/speech/v1/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\x90\x01\n\x10RecognizeRequest\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v1.RecognitionConfigB\x03\xe0\x41\x02\x12<\n\x05\x61udio\x18\x02 \x01(\x0b\x32(.google.cloud.speech.v1.RecognitionAudioB\x03\xe0\x41\x02\"\xe7\x01\n\x1bLongRunningRecognizeRequest\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v1.RecognitionConfigB\x03\xe0\x41\x02\x12<\n\x05\x61udio\x18\x02 \x01(\x0b\x32(.google.cloud.speech.v1.RecognitionAudioB\x03\xe0\x41\x02\x12J\n\routput_config\x18\x04 \x01(\x0b\x32..google.cloud.speech.v1.TranscriptOutputConfigB\x03\xe0\x41\x01\":\n\x16TranscriptOutputConfig\x12\x11\n\x07gcs_uri\x18\x01 \x01(\tH\x00\x42\r\n\x0boutput_type\"\x99\x01\n\x19StreamingRecognizeRequest\x12N\n\x10streaming_config\x18\x01 \x01(\x0b\x32\x32.google.cloud.speech.v1.StreamingRecognitionConfigH\x00\x12\x17\n\raudio_content\x18\x02 \x01(\x0cH\x00\x42\x13\n\x11streaming_request\"\xa7\x03\n\x1aStreamingRecognitionConfig\x12>\n\x06\x63onfig\x18\x01 \x01(\x0b\x32).google.cloud.speech.v1.RecognitionConfigB\x03\xe0\x41\x02\x12\x18\n\x10single_utterance\x18\x02 \x01(\x08\x12\x17\n\x0finterim_results\x18\x03 \x01(\x08\x12$\n\x1c\x65nable_voice_activity_events\x18\x05 \x01(\x08\x12g\n\x16voice_activity_timeout\x18\x06 \x01(\x0b\x32G.google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout\x1a\x86\x01\n\x14VoiceActivityTimeout\x12\x37\n\x14speech_start_timeout\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12speech_end_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xca\x08\n\x11RecognitionConfig\x12I\n\x08\x65ncoding\x18\x01 \x01(\x0e\x32\x37.google.cloud.speech.v1.RecognitionConfig.AudioEncoding\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12\x1b\n\x13\x61udio_channel_count\x18\x07 \x01(\x05\x12/\n\'enable_separate_recognition_per_channel\x18\x0c \x01(\x08\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x1a\x61lternative_language_codes\x18\x12 \x03(\t\x12\x18\n\x10max_alternatives\x18\x04 \x01(\x05\x12\x18\n\x10profanity_filter\x18\x05 \x01(\x08\x12<\n\nadaptation\x18\x14 \x01(\x0b\x32(.google.cloud.speech.v1.SpeechAdaptation\x12V\n\x18transcript_normalization\x18\x18 \x01(\x0b\x32/.google.cloud.speech.v1.TranscriptNormalizationB\x03\xe0\x41\x01\x12>\n\x0fspeech_contexts\x18\x06 \x03(\x0b\x32%.google.cloud.speech.v1.SpeechContext\x12 \n\x18\x65nable_word_time_offsets\x18\x08 \x01(\x08\x12\x1e\n\x16\x65nable_word_confidence\x18\x0f \x01(\x08\x12$\n\x1c\x65nable_automatic_punctuation\x18\x0b \x01(\x08\x12=\n\x19\x65nable_spoken_punctuation\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x38\n\x14\x65nable_spoken_emojis\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12L\n\x12\x64iarization_config\x18\x13 \x01(\x0b\x32\x30.google.cloud.speech.v1.SpeakerDiarizationConfig\x12=\n\x08metadata\x18\t \x01(\x0b\x32+.google.cloud.speech.v1.RecognitionMetadata\x12\r\n\x05model\x18\r \x01(\t\x12\x14\n\x0cuse_enhanced\x18\x0e \x01(\x08\"\xa3\x01\n\rAudioEncoding\x12\x18\n\x14\x45NCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\x08\n\x04\x46LAC\x10\x02\x12\t\n\x05MULAW\x10\x03\x12\x07\n\x03\x41MR\x10\x04\x12\n\n\x06\x41MR_WB\x10\x05\x12\x0c\n\x08OGG_OPUS\x10\x06\x12\x1a\n\x16SPEEX_WITH_HEADER_BYTE\x10\x07\x12\x07\n\x03MP3\x10\x08\x12\r\n\tWEBM_OPUS\x10\t\"\x90\x01\n\x18SpeakerDiarizationConfig\x12\"\n\x1a\x65nable_speaker_diarization\x18\x01 \x01(\x08\x12\x19\n\x11min_speaker_count\x18\x02 \x01(\x05\x12\x19\n\x11max_speaker_count\x18\x03 \x01(\x05\x12\x1a\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\"\xa4\x08\n\x13RecognitionMetadata\x12U\n\x10interaction_type\x18\x01 \x01(\x0e\x32;.google.cloud.speech.v1.RecognitionMetadata.InteractionType\x12$\n\x1cindustry_naics_code_of_audio\x18\x03 \x01(\r\x12[\n\x13microphone_distance\x18\x04 \x01(\x0e\x32>.google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance\x12Z\n\x13original_media_type\x18\x05 \x01(\x0e\x32=.google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType\x12^\n\x15recording_device_type\x18\x06 \x01(\x0e\x32?.google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType\x12\x1d\n\x15recording_device_name\x18\x07 \x01(\t\x12\x1a\n\x12original_mime_type\x18\x08 \x01(\t\x12\x13\n\x0b\x61udio_topic\x18\n \x01(\t\"\xc5\x01\n\x0fInteractionType\x12 \n\x1cINTERACTION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nDISCUSSION\x10\x01\x12\x10\n\x0cPRESENTATION\x10\x02\x12\x0e\n\nPHONE_CALL\x10\x03\x12\r\n\tVOICEMAIL\x10\x04\x12\x1b\n\x17PROFESSIONALLY_PRODUCED\x10\x05\x12\x10\n\x0cVOICE_SEARCH\x10\x06\x12\x11\n\rVOICE_COMMAND\x10\x07\x12\r\n\tDICTATION\x10\x08\"d\n\x12MicrophoneDistance\x12#\n\x1fMICROPHONE_DISTANCE_UNSPECIFIED\x10\x00\x12\r\n\tNEARFIELD\x10\x01\x12\x0c\n\x08MIDFIELD\x10\x02\x12\x0c\n\x08\x46\x41RFIELD\x10\x03\"N\n\x11OriginalMediaType\x12#\n\x1fORIGINAL_MEDIA_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41UDIO\x10\x01\x12\t\n\x05VIDEO\x10\x02\"\xa4\x01\n\x13RecordingDeviceType\x12%\n!RECORDING_DEVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nSMARTPHONE\x10\x01\x12\x06\n\x02PC\x10\x02\x12\x0e\n\nPHONE_LINE\x10\x03\x12\x0b\n\x07VEHICLE\x10\x04\x12\x18\n\x14OTHER_OUTDOOR_DEVICE\x10\x05\x12\x17\n\x13OTHER_INDOOR_DEVICE\x10\x06:\x02\x18\x01\"/\n\rSpeechContext\x12\x0f\n\x07phrases\x18\x01 \x03(\t\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\"D\n\x10RecognitionAudio\x12\x11\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x12\r\n\x03uri\x18\x02 \x01(\tH\x00\x42\x0e\n\x0c\x61udio_source\"\xed\x01\n\x11RecognizeResponse\x12@\n\x07results\x18\x02 \x03(\x0b\x32/.google.cloud.speech.v1.SpeechRecognitionResult\x12\x34\n\x11total_billed_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x16speech_adaptation_info\x18\x07 \x01(\x0b\x32,.google.cloud.speech.v1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\x08 \x01(\x03\"\xe9\x02\n\x1cLongRunningRecognizeResponse\x12@\n\x07results\x18\x02 \x03(\x0b\x32/.google.cloud.speech.v1.SpeechRecognitionResult\x12\x34\n\x11total_billed_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32..google.cloud.speech.v1.TranscriptOutputConfig\x12(\n\x0coutput_error\x18\x07 \x01(\x0b\x32\x12.google.rpc.Status\x12L\n\x16speech_adaptation_info\x18\x08 \x01(\x0b\x32,.google.cloud.speech.v1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\t \x01(\x03\"\xb0\x01\n\x1cLongRunningRecognizeMetadata\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x03uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xd1\x04\n\x1aStreamingRecognizeResponse\x12!\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x43\n\x07results\x18\x02 \x03(\x0b\x32\x32.google.cloud.speech.v1.StreamingRecognitionResult\x12]\n\x11speech_event_type\x18\x04 \x01(\x0e\x32\x42.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType\x12\x34\n\x11speech_event_time\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11total_billed_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\x16speech_adaptation_info\x18\t \x01(\x0b\x32,.google.cloud.speech.v1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\n \x01(\x03\"\x9d\x01\n\x0fSpeechEventType\x12\x1c\n\x18SPEECH_EVENT_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x01\x12\x19\n\x15SPEECH_ACTIVITY_BEGIN\x10\x02\x12\x17\n\x13SPEECH_ACTIVITY_END\x10\x03\x12\x1b\n\x17SPEECH_ACTIVITY_TIMEOUT\x10\x04\"\xf2\x01\n\x1aStreamingRecognitionResult\x12J\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x34.google.cloud.speech.v1.SpeechRecognitionAlternative\x12\x10\n\x08is_final\x18\x02 \x01(\x08\x12\x11\n\tstability\x18\x03 \x01(\x02\x12\x32\n\x0fresult_end_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x63hannel_tag\x18\x05 \x01(\x05\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x03\"\xca\x01\n\x17SpeechRecognitionResult\x12J\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32\x34.google.cloud.speech.v1.SpeechRecognitionAlternative\x12\x13\n\x0b\x63hannel_tag\x18\x02 \x01(\x05\x12\x32\n\x0fresult_end_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\"w\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12/\n\x05words\x18\x03 \x03(\x0b\x32 .google.cloud.speech.v1.WordInfo\"\xc0\x01\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x1a\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x1a\n\rspeaker_label\x18\x06 \x01(\tB\x03\xe0\x41\x03\"K\n\x14SpeechAdaptationInfo\x12\x1a\n\x12\x61\x64\x61ptation_timeout\x18\x01 \x01(\x08\x12\x17\n\x0ftimeout_message\x18\x04 \x01(\t2\xd1\x04\n\x06Speech\x12\x90\x01\n\tRecognize\x12(.google.cloud.speech.v1.RecognizeRequest\x1a).google.cloud.speech.v1.RecognizeResponse\".\xda\x41\x0c\x63onfig,audio\x82\xd3\xe4\x93\x02\x19\"\x14/v1/speech:recognize:\x01*\x12\xe4\x01\n\x14LongRunningRecognize\x12\x33.google.cloud.speech.v1.LongRunningRecognizeRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41<\n\x1cLongRunningRecognizeResponse\x12\x1cLongRunningRecognizeMetadata\xda\x41\x0c\x63onfig,audio\x82\xd3\xe4\x93\x02$\"\x1f/v1/speech:longrunningrecognize:\x01*\x12\x81\x01\n\x12StreamingRecognize\x12\x31.google.cloud.speech.v1.StreamingRecognizeRequest\x1a\x32.google.cloud.speech.v1.StreamingRecognizeResponse\"\x00(\x01\x30\x01\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBh\n\x1a\x63om.google.cloud.speech.v1B\x0bSpeechProtoP\x01Z2cloud.google.com/go/speech/apiv1/speechpb;speechpb\xf8\x01\x01\xa2\x02\x03GCSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Speech - module V1 - RecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognizeRequest").msgclass - LongRunningRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.LongRunningRecognizeRequest").msgclass - TranscriptOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.TranscriptOutputConfig").msgclass - StreamingRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognizeRequest").msgclass - StreamingRecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognitionConfig").msgclass - StreamingRecognitionConfig::VoiceActivityTimeout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout").msgclass - RecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionConfig").msgclass - RecognitionConfig::AudioEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionConfig.AudioEncoding").enummodule - SpeakerDiarizationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeakerDiarizationConfig").msgclass - RecognitionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionMetadata").msgclass - RecognitionMetadata::InteractionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionMetadata.InteractionType").enummodule - RecognitionMetadata::MicrophoneDistance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance").enummodule - RecognitionMetadata::OriginalMediaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType").enummodule - RecognitionMetadata::RecordingDeviceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType").enummodule - SpeechContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechContext").msgclass - RecognitionAudio = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognitionAudio").msgclass - RecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.RecognizeResponse").msgclass - LongRunningRecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.LongRunningRecognizeResponse").msgclass - LongRunningRecognizeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.LongRunningRecognizeMetadata").msgclass - StreamingRecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognizeResponse").msgclass - StreamingRecognizeResponse::SpeechEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType").enummodule - StreamingRecognitionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.StreamingRecognitionResult").msgclass - SpeechRecognitionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechRecognitionResult").msgclass - SpeechRecognitionAlternative = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechRecognitionAlternative").msgclass - WordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.WordInfo").msgclass - SpeechAdaptationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechAdaptationInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb deleted file mode 100644 index 872e6df62f83..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/cloud_speech_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/speech/v1/cloud_speech.proto for package 'google.cloud.speech.v1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/speech/v1/cloud_speech_pb' - -module Google - module Cloud - module Speech - module V1 - module Speech - # Service that implements Google Cloud Speech API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.speech.v1.Speech' - - # Performs synchronous speech recognition: receive results after all audio - # has been sent and processed. - rpc :Recognize, ::Google::Cloud::Speech::V1::RecognizeRequest, ::Google::Cloud::Speech::V1::RecognizeResponse - # Performs asynchronous speech recognition: receive results via the - # google.longrunning.Operations interface. Returns either an - # `Operation.error` or an `Operation.response` which contains - # a `LongRunningRecognizeResponse` message. - # For more information on asynchronous speech recognition, see the - # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). - rpc :LongRunningRecognize, ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest, ::Google::Longrunning::Operation - # Performs bidirectional streaming speech recognition: receive results while - # sending audio. This method is only available via the gRPC API (not REST). - rpc :StreamingRecognize, stream(::Google::Cloud::Speech::V1::StreamingRecognizeRequest), stream(::Google::Cloud::Speech::V1::StreamingRecognizeResponse) - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/resource_pb.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/resource_pb.rb deleted file mode 100644 index 2b910a6cea8b..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/resource_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/speech/v1/resource.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n%google/cloud/speech/v1/resource.proto\x12\x16google.cloud.speech.v1\x1a\x19google/api/resource.proto\"\xfc\x01\n\x0b\x43ustomClass\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0f\x63ustom_class_id\x18\x02 \x01(\t\x12<\n\x05items\x18\x03 \x03(\x0b\x32-.google.cloud.speech.v1.CustomClass.ClassItem\x1a\x1a\n\tClassItem\x12\r\n\x05value\x18\x01 \x01(\t:l\xea\x41i\n!speech.googleapis.com/CustomClass\x12\x44projects/{project}/locations/{location}/customClasses/{custom_class}\"\xf2\x01\n\tPhraseSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x07phrases\x18\x02 \x03(\x0b\x32(.google.cloud.speech.v1.PhraseSet.Phrase\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\x1a&\n\x06Phrase\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02:e\xea\x41\x62\n\x1fspeech.googleapis.com/PhraseSet\x12?projects/{project}/locations/{location}/phraseSets/{phrase_set}\"\xbd\x02\n\x10SpeechAdaptation\x12\x36\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32!.google.cloud.speech.v1.PhraseSet\x12\x43\n\x15phrase_set_references\x18\x02 \x03(\tB$\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\x12;\n\x0e\x63ustom_classes\x18\x03 \x03(\x0b\x32#.google.cloud.speech.v1.CustomClass\x12J\n\x0c\x61\x62nf_grammar\x18\x04 \x01(\x0b\x32\x34.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar\x1a#\n\x0b\x41\x42NFGrammar\x12\x14\n\x0c\x61\x62nf_strings\x18\x01 \x03(\t\"\xa3\x01\n\x17TranscriptNormalization\x12\x46\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x35.google.cloud.speech.v1.TranscriptNormalization.Entry\x1a@\n\x05\x45ntry\x12\x0e\n\x06search\x18\x01 \x01(\t\x12\x0f\n\x07replace\x18\x02 \x01(\t\x12\x16\n\x0e\x63\x61se_sensitive\x18\x03 \x01(\x08\x42p\n\x1a\x63om.google.cloud.speech.v1B\x13SpeechResourceProtoP\x01Z2cloud.google.com/go/speech/apiv1/speechpb;speechpb\xf8\x01\x01\xa2\x02\x03GCSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Speech - module V1 - CustomClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CustomClass").msgclass - CustomClass::ClassItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.CustomClass.ClassItem").msgclass - PhraseSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.PhraseSet").msgclass - PhraseSet::Phrase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.PhraseSet.Phrase").msgclass - SpeechAdaptation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechAdaptation").msgclass - SpeechAdaptation::ABNFGrammar = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar").msgclass - TranscriptNormalization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.TranscriptNormalization").msgclass - TranscriptNormalization::Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1.TranscriptNormalization.Entry").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.rb deleted file mode 100644 index b039262b9bb0..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/speech/v1/speech/rest" -require "google/cloud/speech/v1/adaptation/rest" -require "google/cloud/speech/v1/version" - -module Google - module Cloud - module Speech - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/speech/v1/rest" - # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech.rb deleted file mode 100644 index b88111d1fa2f..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/speech/v1/version" - -require "google/cloud/speech/v1/speech/credentials" -require "google/cloud/speech/v1/speech/paths" -require "google/cloud/speech/v1/speech/operations" -require "google/cloud/speech/v1/speech/client" -require "google/cloud/speech/v1/speech/rest" - -module Google - module Cloud - module Speech - module V1 - ## - # Service that implements Google Cloud Speech API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/speech/v1/speech" - # client = ::Google::Cloud::Speech::V1::Speech::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/speech/v1/speech/rest" - # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new - # - module Speech - end - end - end - end -end - -helper_path = ::File.join __dir__, "speech", "helpers.rb" -require "google/cloud/speech/v1/speech/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/client.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/client.rb deleted file mode 100644 index 78746525ea93..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/client.rb +++ /dev/null @@ -1,687 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/speech/v1/cloud_speech_pb" - -module Google - module Cloud - module Speech - module V1 - module Speech - ## - # Client for the Speech service. - # - # Service that implements Google Cloud Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :speech_stub - - ## - # Configure the Speech Client class. - # - # See {::Google::Cloud::Speech::V1::Speech::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Speech clients - # ::Google::Cloud::Speech::V1::Speech::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Speech", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.recognize.timeout = 5000.0 - default_config.rpcs.recognize.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.long_running_recognize.timeout = 5000.0 - - default_config.rpcs.streaming_recognize.timeout = 5000.0 - default_config.rpcs.streaming_recognize.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Speech Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Speech::V1::Speech::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @speech_stub.universe_domain - end - - ## - # Create a new Speech client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Speech::V1::Speech::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Speech client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/speech/v1/cloud_speech_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @speech_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Speech::V1::Speech::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @speech_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Speech::V1::Speech::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @speech_stub.logger - end - - # Service calls - - ## - # Performs synchronous speech recognition: receive results after all audio - # has been sent and processed. - # - # @overload recognize(request, options = nil) - # Pass arguments to `recognize` via a request object, either of type - # {::Google::Cloud::Speech::V1::RecognizeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::RecognizeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload recognize(config: nil, audio: nil) - # Pass arguments to `recognize` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param config [::Google::Cloud::Speech::V1::RecognitionConfig, ::Hash] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @param audio [::Google::Cloud::Speech::V1::RecognitionAudio, ::Hash] - # Required. The audio data to be recognized. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1::RecognizeResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1::RecognizeResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Speech::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::RecognizeRequest.new - # - # # Call the recognize method. - # result = client.recognize request - # - # # The returned object is of type Google::Cloud::Speech::V1::RecognizeResponse. - # p result - # - def recognize request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::RecognizeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.recognize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.recognize.timeout, - metadata: metadata, - retry_policy: @config.rpcs.recognize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @speech_stub.call_rpc :recognize, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs asynchronous speech recognition: receive results via the - # google.longrunning.Operations interface. Returns either an - # `Operation.error` or an `Operation.response` which contains - # a `LongRunningRecognizeResponse` message. - # For more information on asynchronous speech recognition, see the - # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). - # - # @overload long_running_recognize(request, options = nil) - # Pass arguments to `long_running_recognize` via a request object, either of type - # {::Google::Cloud::Speech::V1::LongRunningRecognizeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::LongRunningRecognizeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload long_running_recognize(config: nil, audio: nil, output_config: nil) - # Pass arguments to `long_running_recognize` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param config [::Google::Cloud::Speech::V1::RecognitionConfig, ::Hash] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @param audio [::Google::Cloud::Speech::V1::RecognitionAudio, ::Hash] - # Required. The audio data to be recognized. - # @param output_config [::Google::Cloud::Speech::V1::TranscriptOutputConfig, ::Hash] - # Optional. Specifies an optional destination for the recognition results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Speech::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new - # - # # Call the long_running_recognize method. - # result = client.long_running_recognize request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def long_running_recognize request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.long_running_recognize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.long_running_recognize.timeout, - metadata: metadata, - retry_policy: @config.rpcs.long_running_recognize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @speech_stub.call_rpc :long_running_recognize, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs bidirectional streaming speech recognition: receive results while - # sending audio. This method is only available via the gRPC API (not REST). - # - # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Speech::V1::StreamingRecognizeRequest, ::Hash>] - # An enumerable of {::Google::Cloud::Speech::V1::StreamingRecognizeRequest} instances. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Speech::V1::StreamingRecognizeResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Speech::V1::StreamingRecognizeResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Speech::Client.new - # - # # Create an input stream. - # input = Gapic::StreamInput.new - # - # # Call the streaming_recognize method to start streaming. - # output = client.streaming_recognize input - # - # # Send requests on the stream. For each request object, set fields by - # # passing keyword arguments. Be sure to close the stream when done. - # input << Google::Cloud::Speech::V1::StreamingRecognizeRequest.new - # input << Google::Cloud::Speech::V1::StreamingRecognizeRequest.new - # input.close - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Speech::V1::StreamingRecognizeResponse - # output.each do |current_response| - # p current_response - # end - # - def streaming_recognize request, options = nil - unless request.is_a? ::Enumerable - raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum - request = request.to_enum - end - - request = request.lazy.map do |req| - ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Speech::V1::StreamingRecognizeRequest - end - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.streaming_recognize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.streaming_recognize.timeout, - metadata: metadata, - retry_policy: @config.rpcs.streaming_recognize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @speech_stub.call_rpc :streaming_recognize, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Speech API. - # - # This class represents the configuration for Speech, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Speech::V1::Speech::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # recognize to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Speech::V1::Speech::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.recognize.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.recognize.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Speech API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `recognize` - # @return [::Gapic::Config::Method] - # - attr_reader :recognize - ## - # RPC-specific configuration for `long_running_recognize` - # @return [::Gapic::Config::Method] - # - attr_reader :long_running_recognize - ## - # RPC-specific configuration for `streaming_recognize` - # @return [::Gapic::Config::Method] - # - attr_reader :streaming_recognize - - # @private - def initialize parent_rpcs = nil - recognize_config = parent_rpcs.recognize if parent_rpcs.respond_to? :recognize - @recognize = ::Gapic::Config::Method.new recognize_config - long_running_recognize_config = parent_rpcs.long_running_recognize if parent_rpcs.respond_to? :long_running_recognize - @long_running_recognize = ::Gapic::Config::Method.new long_running_recognize_config - streaming_recognize_config = parent_rpcs.streaming_recognize if parent_rpcs.respond_to? :streaming_recognize - @streaming_recognize = ::Gapic::Config::Method.new streaming_recognize_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/credentials.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/credentials.rb deleted file mode 100644 index b98a12db51ab..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Speech - module V1 - module Speech - # Credentials for the Speech API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SPEECH_CREDENTIALS", - "SPEECH_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SPEECH_CREDENTIALS_JSON", - "SPEECH_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/operations.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/operations.rb deleted file mode 100644 index 153214386909..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/operations.rb +++ /dev/null @@ -1,835 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Speech - module V1 - module Speech - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Speech Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the Speech Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/paths.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/paths.rb deleted file mode 100644 index ae06954b3904..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/paths.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Speech - module V1 - module Speech - # Path helper methods for the Speech API. - module Paths - ## - # Create a fully-qualified CustomClass resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # @param project [String] - # @param location [String] - # @param custom_class [String] - # - # @return [::String] - def custom_class_path project:, location:, custom_class: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/customClasses/#{custom_class}" - end - - ## - # Create a fully-qualified PhraseSet resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # @param project [String] - # @param location [String] - # @param phrase_set [String] - # - # @return [::String] - def phrase_set_path project:, location:, phrase_set: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/phraseSets/#{phrase_set}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest.rb deleted file mode 100644 index bf0e8c48b909..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/speech/v1/version" - -require "google/cloud/speech/v1/speech/credentials" -require "google/cloud/speech/v1/speech/paths" -require "google/cloud/speech/v1/speech/rest/operations" -require "google/cloud/speech/v1/speech/rest/client" - -module Google - module Cloud - module Speech - module V1 - ## - # Service that implements Google Cloud Speech API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/speech/v1/speech/rest" - # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new - # - module Speech - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/speech/v1/speech/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.rb deleted file mode 100644 index c0a221dac348..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/client.rb +++ /dev/null @@ -1,555 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/speech/v1/cloud_speech_pb" -require "google/cloud/speech/v1/speech/rest/service_stub" - -module Google - module Cloud - module Speech - module V1 - module Speech - module Rest - ## - # REST client for the Speech service. - # - # Service that implements Google Cloud Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :speech_stub - - ## - # Configure the Speech Client class. - # - # See {::Google::Cloud::Speech::V1::Speech::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Speech clients - # ::Google::Cloud::Speech::V1::Speech::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Speech", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.recognize.timeout = 5000.0 - default_config.rpcs.recognize.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.long_running_recognize.timeout = 5000.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Speech Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Speech::V1::Speech::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @speech_stub.universe_domain - end - - ## - # Create a new Speech REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Speech client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Speech::V1::Speech::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @speech_stub = ::Google::Cloud::Speech::V1::Speech::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @speech_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Speech::V1::Speech::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @speech_stub.logger - end - - # Service calls - - ## - # Performs synchronous speech recognition: receive results after all audio - # has been sent and processed. - # - # @overload recognize(request, options = nil) - # Pass arguments to `recognize` via a request object, either of type - # {::Google::Cloud::Speech::V1::RecognizeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::RecognizeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload recognize(config: nil, audio: nil) - # Pass arguments to `recognize` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param config [::Google::Cloud::Speech::V1::RecognitionConfig, ::Hash] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @param audio [::Google::Cloud::Speech::V1::RecognitionAudio, ::Hash] - # Required. The audio data to be recognized. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::RecognizeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::RecognizeResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Speech::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::RecognizeRequest.new - # - # # Call the recognize method. - # result = client.recognize request - # - # # The returned object is of type Google::Cloud::Speech::V1::RecognizeResponse. - # p result - # - def recognize request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::RecognizeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.recognize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.recognize.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.recognize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @speech_stub.recognize request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs asynchronous speech recognition: receive results via the - # google.longrunning.Operations interface. Returns either an - # `Operation.error` or an `Operation.response` which contains - # a `LongRunningRecognizeResponse` message. - # For more information on asynchronous speech recognition, see the - # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). - # - # @overload long_running_recognize(request, options = nil) - # Pass arguments to `long_running_recognize` via a request object, either of type - # {::Google::Cloud::Speech::V1::LongRunningRecognizeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1::LongRunningRecognizeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload long_running_recognize(config: nil, audio: nil, output_config: nil) - # Pass arguments to `long_running_recognize` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param config [::Google::Cloud::Speech::V1::RecognitionConfig, ::Hash] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @param audio [::Google::Cloud::Speech::V1::RecognitionAudio, ::Hash] - # Required. The audio data to be recognized. - # @param output_config [::Google::Cloud::Speech::V1::TranscriptOutputConfig, ::Hash] - # Optional. Specifies an optional destination for the recognition results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1::Speech::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new - # - # # Call the long_running_recognize method. - # result = client.long_running_recognize request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def long_running_recognize request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.long_running_recognize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.long_running_recognize.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.long_running_recognize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @speech_stub.long_running_recognize request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Speech REST API. - # - # This class represents the configuration for Speech REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Speech::V1::Speech::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # recognize to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Speech::V1::Speech::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.recognize.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.recognize.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Speech API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `recognize` - # @return [::Gapic::Config::Method] - # - attr_reader :recognize - ## - # RPC-specific configuration for `long_running_recognize` - # @return [::Gapic::Config::Method] - # - attr_reader :long_running_recognize - - # @private - def initialize parent_rpcs = nil - recognize_config = parent_rpcs.recognize if parent_rpcs.respond_to? :recognize - @recognize = ::Gapic::Config::Method.new recognize_config - long_running_recognize_config = parent_rpcs.long_running_recognize if parent_rpcs.respond_to? :long_running_recognize - @long_running_recognize = ::Gapic::Config::Method.new long_running_recognize_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.rb deleted file mode 100644 index 610575fe6b03..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Speech - module V1 - module Speech - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Speech Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the Speech Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/operations", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/operations/{name}", - matches: [ - ["name", %r{^(?<__wildcard__>.*)$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.rb deleted file mode 100644 index 6394ec823985..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/speech/rest/service_stub.rb +++ /dev/null @@ -1,201 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/speech/v1/cloud_speech_pb" - -module Google - module Cloud - module Speech - module V1 - module Speech - module Rest - ## - # REST service stub for the Speech service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the recognize REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::RecognizeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1::RecognizeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1::RecognizeResponse] - # A result object deserialized from the server's reply - def recognize request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_recognize_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "recognize", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1::RecognizeResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the long_running_recognize REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::LongRunningRecognizeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def long_running_recognize request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_long_running_recognize_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "long_running_recognize", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the recognize REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::RecognizeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_recognize_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/speech:recognize", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the long_running_recognize REST call - # - # @param request_pb [::Google::Cloud::Speech::V1::LongRunningRecognizeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_long_running_recognize_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/speech:longrunningrecognize", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/version.rb b/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/version.rb deleted file mode 100644 index 1a5ee1f9dace..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/lib/google/cloud/speech/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Speech - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-speech-v1/proto_docs/README.md deleted file mode 100644 index 9ab7063008bf..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Speech-to-Text V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.rb deleted file mode 100644 index c7a315d42f57..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech.rb +++ /dev/null @@ -1,1003 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Speech - module V1 - # The top-level message sent by the client for the `Recognize` method. - # @!attribute [rw] config - # @return [::Google::Cloud::Speech::V1::RecognitionConfig] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @!attribute [rw] audio - # @return [::Google::Cloud::Speech::V1::RecognitionAudio] - # Required. The audio data to be recognized. - class RecognizeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The top-level message sent by the client for the `LongRunningRecognize` - # method. - # @!attribute [rw] config - # @return [::Google::Cloud::Speech::V1::RecognitionConfig] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @!attribute [rw] audio - # @return [::Google::Cloud::Speech::V1::RecognitionAudio] - # Required. The audio data to be recognized. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Speech::V1::TranscriptOutputConfig] - # Optional. Specifies an optional destination for the recognition results. - class LongRunningRecognizeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies an optional destination for the recognition results. - # @!attribute [rw] gcs_uri - # @return [::String] - # Specifies a Cloud Storage URI for the recognition results. Must be - # specified in the format: `gs://bucket_name/object_name`, and the bucket - # must already exist. - class TranscriptOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The top-level message sent by the client for the `StreamingRecognize` method. - # Multiple `StreamingRecognizeRequest` messages are sent. The first message - # must contain a `streaming_config` message and must not contain - # `audio_content`. All subsequent messages must contain `audio_content` and - # must not contain a `streaming_config` message. - # @!attribute [rw] streaming_config - # @return [::Google::Cloud::Speech::V1::StreamingRecognitionConfig] - # Provides information to the recognizer that specifies how to process the - # request. The first `StreamingRecognizeRequest` message must contain a - # `streaming_config` message. - # - # Note: The following fields are mutually exclusive: `streaming_config`, `audio_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] audio_content - # @return [::String] - # The audio data to be recognized. Sequential chunks of audio data are sent - # in sequential `StreamingRecognizeRequest` messages. The first - # `StreamingRecognizeRequest` message must not contain `audio_content` data - # and all subsequent `StreamingRecognizeRequest` messages must contain - # `audio_content` data. The audio bytes must be encoded as specified in - # `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a - # pure binary representation (not base64). See - # [content limits](https://cloud.google.com/speech-to-text/quotas#content). - # - # Note: The following fields are mutually exclusive: `audio_content`, `streaming_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class StreamingRecognizeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides information to the recognizer that specifies how to process the - # request. - # @!attribute [rw] config - # @return [::Google::Cloud::Speech::V1::RecognitionConfig] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @!attribute [rw] single_utterance - # @return [::Boolean] - # If `false` or omitted, the recognizer will perform continuous - # recognition (continuing to wait for and process audio even if the user - # pauses speaking) until the client closes the input stream (gRPC API) or - # until the maximum time limit has been reached. May return multiple - # `StreamingRecognitionResult`s with the `is_final` flag set to `true`. - # - # If `true`, the recognizer will detect a single spoken utterance. When it - # detects that the user has paused or stopped speaking, it will return an - # `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no - # more than one `StreamingRecognitionResult` with the `is_final` flag set to - # `true`. - # - # The `single_utterance` field can only be used with specified models, - # otherwise an error is thrown. The `model` field in [`RecognitionConfig`][] - # must be set to: - # - # * `command_and_search` - # * `phone_call` AND additional field `useEnhanced`=`true` - # * The `model` field is left undefined. In this case the API auto-selects - # a model based on any other parameters that you set in - # `RecognitionConfig`. - # @!attribute [rw] interim_results - # @return [::Boolean] - # If `true`, interim results (tentative hypotheses) may be - # returned as they become available (these interim results are indicated with - # the `is_final=false` flag). - # If `false` or omitted, only `is_final=true` result(s) are returned. - # @!attribute [rw] enable_voice_activity_events - # @return [::Boolean] - # If `true`, responses with voice activity speech events will be returned as - # they are detected. - # @!attribute [rw] voice_activity_timeout - # @return [::Google::Cloud::Speech::V1::StreamingRecognitionConfig::VoiceActivityTimeout] - # If set, the server will automatically close the stream after the specified - # duration has elapsed after the last VOICE_ACTIVITY speech event has been - # sent. The field `voice_activity_events` must also be set to true. - class StreamingRecognitionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Events that a timeout can be set on for voice activity. - # @!attribute [rw] speech_start_timeout - # @return [::Google::Protobuf::Duration] - # Duration to timeout the stream if no speech begins. - # @!attribute [rw] speech_end_timeout - # @return [::Google::Protobuf::Duration] - # Duration to timeout the stream after speech ends. - class VoiceActivityTimeout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Provides information to the recognizer that specifies how to process the - # request. - # @!attribute [rw] encoding - # @return [::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding] - # Encoding of audio data sent in all `RecognitionAudio` messages. - # This field is optional for `FLAC` and `WAV` audio files and required - # for all other audio formats. For details, see - # {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}. - # @!attribute [rw] sample_rate_hertz - # @return [::Integer] - # Sample rate in Hertz of the audio data sent in all - # `RecognitionAudio` messages. Valid values are: 8000-48000. - # 16000 is optimal. For best results, set the sampling rate of the audio - # source to 16000 Hz. If that's not possible, use the native sample rate of - # the audio source (instead of re-sampling). - # This field is optional for FLAC and WAV audio files, but is - # required for all other audio formats. For details, see - # {::Google::Cloud::Speech::V1::RecognitionConfig::AudioEncoding AudioEncoding}. - # @!attribute [rw] audio_channel_count - # @return [::Integer] - # The number of channels in the input audio data. - # ONLY set this for MULTI-CHANNEL recognition. - # Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. - # Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. - # If `0` or omitted, defaults to one channel (mono). - # Note: We only recognize the first channel by default. - # To perform independent recognition on each channel set - # `enable_separate_recognition_per_channel` to 'true'. - # @!attribute [rw] enable_separate_recognition_per_channel - # @return [::Boolean] - # This needs to be set to `true` explicitly and `audio_channel_count` > 1 - # to get each channel recognized separately. The recognition result will - # contain a `channel_tag` field to state which channel that result belongs - # to. If this is not true, we will only recognize the first channel. The - # request is billed cumulatively for all channels recognized: - # `audio_channel_count` multiplied by the length of the audio. - # @!attribute [rw] language_code - # @return [::String] - # Required. The language of the supplied audio as a - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - # Example: "en-US". - # See [Language - # Support](https://cloud.google.com/speech-to-text/docs/languages) for a list - # of the currently supported language codes. - # @!attribute [rw] alternative_language_codes - # @return [::Array<::String>] - # A list of up to 3 additional - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags, - # listing possible alternative languages of the supplied audio. - # See [Language - # Support](https://cloud.google.com/speech-to-text/docs/languages) for a list - # of the currently supported language codes. If alternative languages are - # listed, recognition result will contain recognition in the most likely - # language detected including the main language_code. The recognition result - # will include the language tag of the language detected in the audio. Note: - # This feature is only supported for Voice Command and Voice Search use cases - # and performance may vary for other use cases (e.g., phone call - # transcription). - # @!attribute [rw] max_alternatives - # @return [::Integer] - # Maximum number of recognition hypotheses to be returned. - # Specifically, the maximum number of `SpeechRecognitionAlternative` messages - # within each `SpeechRecognitionResult`. - # The server may return fewer than `max_alternatives`. - # Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of - # one. If omitted, will return a maximum of one. - # @!attribute [rw] profanity_filter - # @return [::Boolean] - # If set to `true`, the server will attempt to filter out - # profanities, replacing all but the initial character in each filtered word - # with asterisks, e.g. "f***". If set to `false` or omitted, profanities - # won't be filtered out. - # @!attribute [rw] adaptation - # @return [::Google::Cloud::Speech::V1::SpeechAdaptation] - # Speech adaptation configuration improves the accuracy of speech - # recognition. For more information, see the [speech - # adaptation](https://cloud.google.com/speech-to-text/docs/adaptation) - # documentation. - # When speech adaptation is set it supersedes the `speech_contexts` field. - # @!attribute [rw] transcript_normalization - # @return [::Google::Cloud::Speech::V1::TranscriptNormalization] - # Optional. Use transcription normalization to automatically replace parts of - # the transcript with phrases of your choosing. For StreamingRecognize, this - # normalization only applies to stable partial transcripts (stability > 0.8) - # and final transcripts. - # @!attribute [rw] speech_contexts - # @return [::Array<::Google::Cloud::Speech::V1::SpeechContext>] - # Array of {::Google::Cloud::Speech::V1::SpeechContext SpeechContext}. - # A means to provide context to assist the speech recognition. For more - # information, see - # [speech - # adaptation](https://cloud.google.com/speech-to-text/docs/adaptation). - # @!attribute [rw] enable_word_time_offsets - # @return [::Boolean] - # If `true`, the top result includes a list of words and - # the start and end time offsets (timestamps) for those words. If - # `false`, no word-level time offset information is returned. The default is - # `false`. - # @!attribute [rw] enable_word_confidence - # @return [::Boolean] - # If `true`, the top result includes a list of words and the - # confidence for those words. If `false`, no word-level confidence - # information is returned. The default is `false`. - # @!attribute [rw] enable_automatic_punctuation - # @return [::Boolean] - # If 'true', adds punctuation to recognition result hypotheses. - # This feature is only available in select languages. Setting this for - # requests in other languages has no effect at all. - # The default 'false' value does not add punctuation to result hypotheses. - # @!attribute [rw] enable_spoken_punctuation - # @return [::Google::Protobuf::BoolValue] - # The spoken punctuation behavior for the call - # If not set, uses default behavior based on model of choice - # e.g. command_and_search will enable spoken punctuation by default - # If 'true', replaces spoken punctuation with the corresponding symbols in - # the request. For example, "how are you question mark" becomes "how are - # you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation - # for support. If 'false', spoken punctuation is not replaced. - # @!attribute [rw] enable_spoken_emojis - # @return [::Google::Protobuf::BoolValue] - # The spoken emoji behavior for the call - # If not set, uses default behavior based on model of choice - # If 'true', adds spoken emoji formatting for the request. This will replace - # spoken emojis with the corresponding Unicode symbols in the final - # transcript. If 'false', spoken emojis are not replaced. - # @!attribute [rw] diarization_config - # @return [::Google::Cloud::Speech::V1::SpeakerDiarizationConfig] - # Config to enable speaker diarization and set additional - # parameters to make diarization better suited for your application. - # Note: When this is enabled, we send all the words from the beginning of the - # audio for the top alternative in every consecutive STREAMING responses. - # This is done in order to improve our speaker tags as our models learn to - # identify the speakers in the conversation over time. - # For non-streaming requests, the diarization results will be provided only - # in the top alternative of the FINAL SpeechRecognitionResult. - # @!attribute [rw] metadata - # @return [::Google::Cloud::Speech::V1::RecognitionMetadata] - # Metadata regarding this request. - # @!attribute [rw] model - # @return [::String] - # Which model to select for the given request. Select the model - # best suited to your domain to get best results. If a model is not - # explicitly specified, then we auto-select a model based on the parameters - # in the RecognitionConfig. - #
- # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - #
ModelDescription
latest_longBest for long form content like media or conversation.
latest_shortBest for short form content like commands or single shot directed - # speech.
command_and_searchBest for short queries such as voice commands or voice search.
phone_callBest for audio that originated from a phone call (typically - # recorded at an 8khz sampling rate).
videoBest for audio that originated from video or includes multiple - # speakers. Ideally the audio is recorded at a 16khz or greater - # sampling rate. This is a premium model that costs more than the - # standard rate.
defaultBest for audio that is not one of the specific audio models. - # For example, long-form audio. Ideally the audio is high-fidelity, - # recorded at a 16khz or greater sampling rate.
medical_conversationBest for audio that originated from a conversation between a - # medical provider and patient.
medical_dictationBest for audio that originated from dictation notes by a medical - # provider.
- # @!attribute [rw] use_enhanced - # @return [::Boolean] - # Set to true to use an enhanced model for speech recognition. - # If `use_enhanced` is set to true and the `model` field is not set, then - # an appropriate enhanced model is chosen if an enhanced model exists for - # the audio. - # - # If `use_enhanced` is true and an enhanced version of the specified model - # does not exist, then the speech is recognized using the standard version - # of the specified model. - class RecognitionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The encoding of the audio data sent in the request. - # - # All encodings support only 1 channel (mono) audio, unless the - # `audio_channel_count` and `enable_separate_recognition_per_channel` fields - # are set. - # - # For best results, the audio source should be captured and transmitted using - # a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech - # recognition can be reduced if lossy codecs are used to capture or transmit - # audio, particularly if background noise is present. Lossy codecs include - # `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`, - # and `WEBM_OPUS`. - # - # The `FLAC` and `WAV` audio file formats include a header that describes the - # included audio content. You can request recognition for `WAV` files that - # contain either `LINEAR16` or `MULAW` encoded audio. - # If you send `FLAC` or `WAV` audio file format in - # your request, you do not need to specify an `AudioEncoding`; the audio - # encoding format is determined from the file header. If you specify - # an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the - # encoding configuration must match the encoding described in the audio - # header; otherwise the request returns an - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error - # code. - module AudioEncoding - # Not specified. - ENCODING_UNSPECIFIED = 0 - - # Uncompressed 16-bit signed little-endian samples (Linear PCM). - LINEAR16 = 1 - - # `FLAC` (Free Lossless Audio - # Codec) is the recommended encoding because it is - # lossless--therefore recognition is not compromised--and - # requires only about half the bandwidth of `LINEAR16`. `FLAC` stream - # encoding supports 16-bit and 24-bit samples, however, not all fields in - # `STREAMINFO` are supported. - FLAC = 2 - - # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - MULAW = 3 - - # Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. - AMR = 4 - - # Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. - AMR_WB = 5 - - # Opus encoded audio frames in Ogg container - # ([OggOpus](https://wiki.xiph.org/OggOpus)). - # `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000. - OGG_OPUS = 6 - - # Although the use of lossy encodings is not recommended, if a very low - # bitrate encoding is required, `OGG_OPUS` is highly preferred over - # Speex encoding. The [Speex](https://speex.org/) encoding supported by - # Cloud Speech API has a header byte in each block, as in MIME type - # `audio/x-speex-with-header-byte`. - # It is a variant of the RTP Speex encoding defined in - # [RFC 5574](https://tools.ietf.org/html/rfc5574). - # The stream is a sequence of blocks, one block per RTP packet. Each block - # starts with a byte containing the length of the block, in bytes, followed - # by one or more frames of Speex data, padded to an integral number of - # bytes (octets) as specified in RFC 5574. In other words, each RTP header - # is replaced with a single byte containing the block length. Only Speex - # wideband is supported. `sample_rate_hertz` must be 16000. - SPEEX_WITH_HEADER_BYTE = 7 - - # MP3 audio. MP3 encoding is a Beta feature and only available in - # v1p1beta1. Support all standard MP3 bitrates (which range from 32-320 - # kbps). When using this encoding, `sample_rate_hertz` has to match the - # sample rate of the file being used. - MP3 = 8 - - # Opus encoded audio frames in WebM container - # ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be - # one of 8000, 12000, 16000, 24000, or 48000. - WEBM_OPUS = 9 - end - end - - # Config to enable speaker diarization. - # @!attribute [rw] enable_speaker_diarization - # @return [::Boolean] - # If 'true', enables speaker detection for each recognized word in - # the top alternative of the recognition result using a speaker_label - # provided in the WordInfo. - # @!attribute [rw] min_speaker_count - # @return [::Integer] - # Minimum number of speakers in the conversation. This range gives you more - # flexibility by allowing the system to automatically determine the correct - # number of speakers. If not set, the default value is 2. - # @!attribute [rw] max_speaker_count - # @return [::Integer] - # Maximum number of speakers in the conversation. This range gives you more - # flexibility by allowing the system to automatically determine the correct - # number of speakers. If not set, the default value is 6. - # @!attribute [r] speaker_tag - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Output only. Unused. - class SpeakerDiarizationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of audio data to be recognized. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] interaction_type - # @return [::Google::Cloud::Speech::V1::RecognitionMetadata::InteractionType] - # The use case most closely describing the audio content to be recognized. - # @!attribute [rw] industry_naics_code_of_audio - # @return [::Integer] - # The industry vertical to which this speech recognition request most - # closely applies. This is most indicative of the topics contained - # in the audio. Use the 6-digit NAICS code to identify the industry - # vertical - see https://www.naics.com/search/. - # @!attribute [rw] microphone_distance - # @return [::Google::Cloud::Speech::V1::RecognitionMetadata::MicrophoneDistance] - # The audio type that most closely describes the audio being recognized. - # @!attribute [rw] original_media_type - # @return [::Google::Cloud::Speech::V1::RecognitionMetadata::OriginalMediaType] - # The original media the speech was recorded on. - # @!attribute [rw] recording_device_type - # @return [::Google::Cloud::Speech::V1::RecognitionMetadata::RecordingDeviceType] - # The type of device the speech was recorded with. - # @!attribute [rw] recording_device_name - # @return [::String] - # The device used to make the recording. Examples 'Nexus 5X' or - # 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or - # 'Cardioid Microphone'. - # @!attribute [rw] original_mime_type - # @return [::String] - # Mime type of the original audio file. For example `audio/m4a`, - # `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`. - # A list of possible audio mime types is maintained at - # http://www.iana.org/assignments/media-types/media-types.xhtml#audio - # @!attribute [rw] audio_topic - # @return [::String] - # Description of the content. Eg. "Recordings of federal supreme court - # hearings from 2012". - class RecognitionMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Use case categories that the audio recognition request can be described - # by. - module InteractionType - # Use case is either unknown or is something other than one of the other - # values below. - INTERACTION_TYPE_UNSPECIFIED = 0 - - # Multiple people in a conversation or discussion. For example in a - # meeting with two or more people actively participating. Typically - # all the primary people speaking would be in the same room (if not, - # see PHONE_CALL) - DISCUSSION = 1 - - # One or more persons lecturing or presenting to others, mostly - # uninterrupted. - PRESENTATION = 2 - - # A phone-call or video-conference in which two or more people, who are - # not in the same room, are actively participating. - PHONE_CALL = 3 - - # A recorded message intended for another person to listen to. - VOICEMAIL = 4 - - # Professionally produced audio (eg. TV Show, Podcast). - PROFESSIONALLY_PRODUCED = 5 - - # Transcribe spoken questions and queries into text. - VOICE_SEARCH = 6 - - # Transcribe voice commands, such as for controlling a device. - VOICE_COMMAND = 7 - - # Transcribe speech to text to create a written document, such as a - # text-message, email or report. - DICTATION = 8 - end - - # Enumerates the types of capture settings describing an audio file. - module MicrophoneDistance - # Audio type is not known. - MICROPHONE_DISTANCE_UNSPECIFIED = 0 - - # The audio was captured from a closely placed microphone. Eg. phone, - # dictaphone, or handheld microphone. Generally if there speaker is within - # 1 meter of the microphone. - NEARFIELD = 1 - - # The speaker if within 3 meters of the microphone. - MIDFIELD = 2 - - # The speaker is more than 3 meters away from the microphone. - FARFIELD = 3 - end - - # The original media the speech was recorded on. - module OriginalMediaType - # Unknown original media type. - ORIGINAL_MEDIA_TYPE_UNSPECIFIED = 0 - - # The speech data is an audio recording. - AUDIO = 1 - - # The speech data originally recorded on a video. - VIDEO = 2 - end - - # The type of device the speech was recorded with. - module RecordingDeviceType - # The recording device is unknown. - RECORDING_DEVICE_TYPE_UNSPECIFIED = 0 - - # Speech was recorded on a smartphone. - SMARTPHONE = 1 - - # Speech was recorded using a personal computer or tablet. - PC = 2 - - # Speech was recorded over a phone line. - PHONE_LINE = 3 - - # Speech was recorded in a vehicle. - VEHICLE = 4 - - # Speech was recorded outdoors. - OTHER_OUTDOOR_DEVICE = 5 - - # Speech was recorded indoors. - OTHER_INDOOR_DEVICE = 6 - end - end - - # Provides "hints" to the speech recognizer to favor specific words and phrases - # in the results. - # @!attribute [rw] phrases - # @return [::Array<::String>] - # A list of strings containing words and phrases "hints" so that - # the speech recognition is more likely to recognize them. This can be used - # to improve the accuracy for specific words and phrases, for example, if - # specific commands are typically spoken by the user. This can also be used - # to add additional words to the vocabulary of the recognizer. See - # [usage limits](https://cloud.google.com/speech-to-text/quotas#content). - # - # List items can also be set to classes for groups of words that represent - # common concepts that occur in natural language. For example, rather than - # providing phrase hints for every month of the year, using the $MONTH class - # improves the likelihood of correctly transcribing audio that includes - # months. - # @!attribute [rw] boost - # @return [::Float] - # Hint Boost. Positive value will increase the probability that a specific - # phrase will be recognized over other similar sounding phrases. The higher - # the boost, the higher the chance of false positive recognition as well. - # Negative boost values would correspond to anti-biasing. Anti-biasing is not - # enabled, so negative boost will simply be ignored. Though `boost` can - # accept a wide range of positive values, most use cases are best served with - # values between 0 and 20. We recommend using a binary search approach to - # finding the optimal value for your use case. - class SpeechContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains audio data in the encoding specified in the `RecognitionConfig`. - # Either `content` or `uri` must be supplied. Supplying both or neither - # returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - # See [content limits](https://cloud.google.com/speech-to-text/quotas#content). - # @!attribute [rw] content - # @return [::String] - # The audio data bytes encoded as specified in - # `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a - # pure binary representation, whereas JSON representations use base64. - # - # Note: The following fields are mutually exclusive: `content`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] uri - # @return [::String] - # URI that points to a file that contains audio data bytes as specified in - # `RecognitionConfig`. The file must not be compressed (for example, gzip). - # Currently, only Google Cloud Storage URIs are - # supported, which must be specified in the following format: - # `gs://bucket_name/object_name` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). - # For more information, see [Request - # URIs](https://cloud.google.com/storage/docs/reference-uris). - # - # Note: The following fields are mutually exclusive: `uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class RecognitionAudio - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The only message returned to the client by the `Recognize` method. It - # contains the result as zero or more sequential `SpeechRecognitionResult` - # messages. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Speech::V1::SpeechRecognitionResult>] - # Sequential list of transcription results corresponding to - # sequential portions of audio. - # @!attribute [rw] total_billed_time - # @return [::Google::Protobuf::Duration] - # When available, billed audio seconds for the corresponding request. - # @!attribute [rw] speech_adaptation_info - # @return [::Google::Cloud::Speech::V1::SpeechAdaptationInfo] - # Provides information on adaptation behavior in response - # @!attribute [rw] request_id - # @return [::Integer] - # The ID associated with the request. This is a unique ID specific only to - # the given request. - class RecognizeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The only message returned to the client by the `LongRunningRecognize` method. - # It contains the result as zero or more sequential `SpeechRecognitionResult` - # messages. It is included in the `result.response` field of the `Operation` - # returned by the `GetOperation` call of the `google::longrunning::Operations` - # service. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Speech::V1::SpeechRecognitionResult>] - # Sequential list of transcription results corresponding to - # sequential portions of audio. - # @!attribute [rw] total_billed_time - # @return [::Google::Protobuf::Duration] - # When available, billed audio seconds for the corresponding request. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Speech::V1::TranscriptOutputConfig] - # Original output config if present in the request. - # @!attribute [rw] output_error - # @return [::Google::Rpc::Status] - # If the transcript output fails this field contains the relevant error. - # @!attribute [rw] speech_adaptation_info - # @return [::Google::Cloud::Speech::V1::SpeechAdaptationInfo] - # Provides information on speech adaptation behavior in response - # @!attribute [rw] request_id - # @return [::Integer] - # The ID associated with the request. This is a unique ID specific only to - # the given request. - class LongRunningRecognizeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the progress of a long-running `LongRunningRecognize` call. It is - # included in the `metadata` field of the `Operation` returned by the - # `GetOperation` call of the `google::longrunning::Operations` service. - # @!attribute [rw] progress_percent - # @return [::Integer] - # Approximate percentage of audio processed thus far. Guaranteed to be 100 - # when the audio is fully processed and the results are available. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time when the request was received. - # @!attribute [rw] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Time of the most recent processing update. - # @!attribute [r] uri - # @return [::String] - # Output only. The URI of the audio file being transcribed. Empty if the - # audio was sent as byte content. - class LongRunningRecognizeMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StreamingRecognizeResponse` is the only message returned to the client by - # `StreamingRecognize`. A series of zero or more `StreamingRecognizeResponse` - # messages are streamed back to the client. If there is no recognizable - # audio, and `single_utterance` is set to false, then no messages are streamed - # back to the client. - # - # Here's an example of a series of `StreamingRecognizeResponse`s that might be - # returned while processing audio: - # - # 1. results { alternatives { transcript: "tube" } stability: 0.01 } - # - # 2. results { alternatives { transcript: "to be a" } stability: 0.01 } - # - # 3. results { alternatives { transcript: "to be" } stability: 0.9 } - # results { alternatives { transcript: " or not to be" } stability: 0.01 } - # - # 4. results { alternatives { transcript: "to be or not to be" - # confidence: 0.92 } - # alternatives { transcript: "to bee or not to bee" } - # is_final: true } - # - # 5. results { alternatives { transcript: " that's" } stability: 0.01 } - # - # 6. results { alternatives { transcript: " that is" } stability: 0.9 } - # results { alternatives { transcript: " the question" } stability: 0.01 } - # - # 7. results { alternatives { transcript: " that is the question" - # confidence: 0.98 } - # alternatives { transcript: " that was the question" } - # is_final: true } - # - # Notes: - # - # - Only two of the above responses #4 and #7 contain final results; they are - # indicated by `is_final: true`. Concatenating these together generates the - # full transcript: "to be or not to be that is the question". - # - # - The others contain interim `results`. #3 and #6 contain two interim - # `results`: the first portion has a high stability and is less likely to - # change; the second portion has a low stability and is very likely to - # change. A UI designer might choose to show only high stability `results`. - # - # - The specific `stability` and `confidence` values shown above are only for - # illustrative purposes. Actual values may vary. - # - # - In each response, only one of these fields will be set: - # `error`, - # `speech_event_type`, or - # one or more (repeated) `results`. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # If set, returns a {::Google::Rpc::Status google.rpc.Status} message that - # specifies the error for the operation. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Speech::V1::StreamingRecognitionResult>] - # This repeated list contains zero or more results that - # correspond to consecutive portions of the audio currently being processed. - # It contains zero or one `is_final=true` result (the newly settled portion), - # followed by zero or more `is_final=false` results (the interim results). - # @!attribute [rw] speech_event_type - # @return [::Google::Cloud::Speech::V1::StreamingRecognizeResponse::SpeechEventType] - # Indicates the type of speech event. - # @!attribute [rw] speech_event_time - # @return [::Google::Protobuf::Duration] - # Time offset between the beginning of the audio and event emission. - # @!attribute [rw] total_billed_time - # @return [::Google::Protobuf::Duration] - # When available, billed audio seconds for the stream. - # Set only if this is the last response in the stream. - # @!attribute [rw] speech_adaptation_info - # @return [::Google::Cloud::Speech::V1::SpeechAdaptationInfo] - # Provides information on adaptation behavior in response - # @!attribute [rw] request_id - # @return [::Integer] - # The ID associated with the request. This is a unique ID specific only to - # the given request. - class StreamingRecognizeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates the type of speech event. - module SpeechEventType - # No speech event specified. - SPEECH_EVENT_UNSPECIFIED = 0 - - # This event indicates that the server has detected the end of the user's - # speech utterance and expects no additional speech. Therefore, the server - # will not process additional audio (although it may subsequently return - # additional results). The client should stop sending additional audio - # data, half-close the gRPC connection, and wait for any additional results - # until the server closes the gRPC connection. This event is only sent if - # `single_utterance` was set to `true`, and is not used otherwise. - END_OF_SINGLE_UTTERANCE = 1 - - # This event indicates that the server has detected the beginning of human - # voice activity in the stream. This event can be returned multiple times - # if speech starts and stops repeatedly throughout the stream. This event - # is only sent if `voice_activity_events` is set to true. - SPEECH_ACTIVITY_BEGIN = 2 - - # This event indicates that the server has detected the end of human voice - # activity in the stream. This event can be returned multiple times if - # speech starts and stops repeatedly throughout the stream. This event is - # only sent if `voice_activity_events` is set to true. - SPEECH_ACTIVITY_END = 3 - - # This event indicates that the user-set timeout for speech activity begin - # or end has exceeded. Upon receiving this event, the client is expected to - # send a half close. Further audio will not be processed. - SPEECH_ACTIVITY_TIMEOUT = 4 - end - end - - # A streaming speech recognition result corresponding to a portion of the audio - # that is currently being processed. - # @!attribute [rw] alternatives - # @return [::Array<::Google::Cloud::Speech::V1::SpeechRecognitionAlternative>] - # May contain one or more recognition hypotheses (up to the - # maximum specified in `max_alternatives`). - # These alternatives are ordered in terms of accuracy, with the top (first) - # alternative being the most probable, as ranked by the recognizer. - # @!attribute [rw] is_final - # @return [::Boolean] - # If `false`, this `StreamingRecognitionResult` represents an - # interim result that may change. If `true`, this is the final time the - # speech service will return this particular `StreamingRecognitionResult`, - # the recognizer will not return any further hypotheses for this portion of - # the transcript and corresponding audio. - # @!attribute [rw] stability - # @return [::Float] - # An estimate of the likelihood that the recognizer will not - # change its guess about this interim result. Values range from 0.0 - # (completely unstable) to 1.0 (completely stable). - # This field is only provided for interim results (`is_final=false`). - # The default of 0.0 is a sentinel value indicating `stability` was not set. - # @!attribute [rw] result_end_time - # @return [::Google::Protobuf::Duration] - # Time offset of the end of this result relative to the - # beginning of the audio. - # @!attribute [rw] channel_tag - # @return [::Integer] - # For multi-channel audio, this is the channel number corresponding to the - # recognized result for the audio from that channel. - # For audio_channel_count = N, its output values can range from '1' to 'N'. - # @!attribute [r] language_code - # @return [::String] - # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - # language tag of the language in this result. This language code was - # detected to have the most likelihood of being spoken in the audio. - class StreamingRecognitionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A speech recognition result corresponding to a portion of the audio. - # @!attribute [rw] alternatives - # @return [::Array<::Google::Cloud::Speech::V1::SpeechRecognitionAlternative>] - # May contain one or more recognition hypotheses (up to the - # maximum specified in `max_alternatives`). - # These alternatives are ordered in terms of accuracy, with the top (first) - # alternative being the most probable, as ranked by the recognizer. - # @!attribute [rw] channel_tag - # @return [::Integer] - # For multi-channel audio, this is the channel number corresponding to the - # recognized result for the audio from that channel. - # For audio_channel_count = N, its output values can range from '1' to 'N'. - # @!attribute [rw] result_end_time - # @return [::Google::Protobuf::Duration] - # Time offset of the end of this result relative to the - # beginning of the audio. - # @!attribute [r] language_code - # @return [::String] - # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - # language tag of the language in this result. This language code was - # detected to have the most likelihood of being spoken in the audio. - class SpeechRecognitionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Alternative hypotheses (a.k.a. n-best list). - # @!attribute [rw] transcript - # @return [::String] - # Transcript text representing the words that the user spoke. - # In languages that use spaces to separate words, the transcript might have a - # leading space if it isn't the first result. You can concatenate each result - # to obtain the full transcript without using a separator. - # @!attribute [rw] confidence - # @return [::Float] - # The confidence estimate between 0.0 and 1.0. A higher number - # indicates an estimated greater likelihood that the recognized words are - # correct. This field is set only for the top alternative of a non-streaming - # result or, of a streaming result where `is_final=true`. - # This field is not guaranteed to be accurate and users should not rely on it - # to be always provided. - # The default of 0.0 is a sentinel value indicating `confidence` was not set. - # @!attribute [rw] words - # @return [::Array<::Google::Cloud::Speech::V1::WordInfo>] - # A list of word-specific information for each recognized word. - # Note: When `enable_speaker_diarization` is true, you will see all the words - # from the beginning of the audio. - class SpeechRecognitionAlternative - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Word-specific information for recognized words. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Duration] - # Time offset relative to the beginning of the audio, - # and corresponding to the start of the spoken word. - # This field is only set if `enable_word_time_offsets=true` and only - # in the top hypothesis. - # This is an experimental feature and the accuracy of the time offset can - # vary. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Duration] - # Time offset relative to the beginning of the audio, - # and corresponding to the end of the spoken word. - # This field is only set if `enable_word_time_offsets=true` and only - # in the top hypothesis. - # This is an experimental feature and the accuracy of the time offset can - # vary. - # @!attribute [rw] word - # @return [::String] - # The word corresponding to this set of information. - # @!attribute [rw] confidence - # @return [::Float] - # The confidence estimate between 0.0 and 1.0. A higher number - # indicates an estimated greater likelihood that the recognized words are - # correct. This field is set only for the top alternative of a non-streaming - # result or, of a streaming result where `is_final=true`. - # This field is not guaranteed to be accurate and users should not rely on it - # to be always provided. - # The default of 0.0 is a sentinel value indicating `confidence` was not set. - # @!attribute [r] speaker_tag - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Output only. A distinct integer value is assigned for every speaker within - # the audio. This field specifies which one of those speakers was detected to - # have spoken this word. Value ranges from '1' to diarization_speaker_count. - # speaker_tag is set if enable_speaker_diarization = 'true' and only for the - # top alternative. - # Note: Use speaker_label instead. - # @!attribute [r] speaker_label - # @return [::String] - # Output only. A label value assigned for every unique speaker within the - # audio. This field specifies which speaker was detected to have spoken this - # word. For some models, like medical_conversation this can be actual speaker - # role, for example "patient" or "provider", but generally this would be a - # number identifying a speaker. This field is only set if - # enable_speaker_diarization = 'true' and only for the top alternative. - class WordInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information on speech adaptation use in results - # @!attribute [rw] adaptation_timeout - # @return [::Boolean] - # Whether there was a timeout when applying speech adaptation. If true, - # adaptation had no effect in the response transcript. - # @!attribute [rw] timeout_message - # @return [::String] - # If set, returns a message specifying which part of the speech adaptation - # request timed out. - class SpeechAdaptationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb deleted file mode 100644 index 73416b556c1c..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/cloud_speech_adaptation.rb +++ /dev/null @@ -1,270 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Speech - module V1 - # Message sent by the client for the `CreatePhraseSet` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this phrase set will be created. - # Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] phrase_set_id - # @return [::String] - # Required. The ID to use for the phrase set, which will become the final - # component of the phrase set's resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @!attribute [rw] phrase_set - # @return [::Google::Cloud::Speech::V1::PhraseSet] - # Required. The phrase set to create. - class CreatePhraseSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `UpdatePhraseSet` method. - # @!attribute [rw] phrase_set - # @return [::Google::Cloud::Speech::V1::PhraseSet] - # Required. The phrase set to update. - # - # The phrase set's `name` field is used to identify the set to be - # updated. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - class UpdatePhraseSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `GetPhraseSet` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the phrase set to retrieve. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - class GetPhraseSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `ListPhraseSet` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of phrase set. Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of phrase sets to return. The service may return - # fewer than this value. If unspecified, at most 50 phrase sets will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListPhraseSet` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPhraseSet` must - # match the call that provided the page token. - class ListPhraseSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message returned to the client by the `ListPhraseSet` method. - # @!attribute [rw] phrase_sets - # @return [::Array<::Google::Cloud::Speech::V1::PhraseSet>] - # The phrase set. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListPhraseSetResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `DeletePhraseSet` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the phrase set to delete. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - class DeletePhraseSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `CreateCustomClass` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this custom class will be created. - # Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] custom_class_id - # @return [::String] - # Required. The ID to use for the custom class, which will become the final - # component of the custom class' resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @!attribute [rw] custom_class - # @return [::Google::Cloud::Speech::V1::CustomClass] - # Required. The custom class to create. - class CreateCustomClassRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `UpdateCustomClass` method. - # @!attribute [rw] custom_class - # @return [::Google::Cloud::Speech::V1::CustomClass] - # Required. The custom class to update. - # - # The custom class's `name` field is used to identify the custom class to be - # updated. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - class UpdateCustomClassRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `GetCustomClass` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the custom class to retrieve. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - class GetCustomClassRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `ListCustomClasses` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of custom classes. Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of custom classes to return. The service may return - # fewer than this value. If unspecified, at most 50 custom classes will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListCustomClass` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCustomClass` must - # match the call that provided the page token. - class ListCustomClassesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message returned to the client by the `ListCustomClasses` method. - # @!attribute [rw] custom_classes - # @return [::Array<::Google::Cloud::Speech::V1::CustomClass>] - # The custom classes. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListCustomClassesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `DeleteCustomClass` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the custom class to delete. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - class DeleteCustomClassRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/resource.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/resource.rb deleted file mode 100644 index 91ddc97572db..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/cloud/speech/v1/resource.rb +++ /dev/null @@ -1,185 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Speech - module V1 - # A set of words or phrases that represents a common concept likely to appear - # in your audio, for example a list of passenger ship names. CustomClass items - # can be substituted into placeholders that you set in PhraseSet phrases. - # @!attribute [rw] name - # @return [::String] - # The resource name of the custom class. - # @!attribute [rw] custom_class_id - # @return [::String] - # If this custom class is a resource, the custom_class_id is the resource id - # of the CustomClass. Case sensitive. - # @!attribute [rw] items - # @return [::Array<::Google::Cloud::Speech::V1::CustomClass::ClassItem>] - # A collection of class items. - class CustomClass - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An item of the class. - # @!attribute [rw] value - # @return [::String] - # The class item's value. - class ClassItem - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Provides "hints" to the speech recognizer to favor specific words and phrases - # in the results. - # @!attribute [rw] name - # @return [::String] - # The resource name of the phrase set. - # @!attribute [rw] phrases - # @return [::Array<::Google::Cloud::Speech::V1::PhraseSet::Phrase>] - # A list of word and phrases. - # @!attribute [rw] boost - # @return [::Float] - # Hint Boost. Positive value will increase the probability that a specific - # phrase will be recognized over other similar sounding phrases. The higher - # the boost, the higher the chance of false positive recognition as well. - # Negative boost values would correspond to anti-biasing. Anti-biasing is not - # enabled, so negative boost will simply be ignored. Though `boost` can - # accept a wide range of positive values, most use cases are best served with - # values between 0 (exclusive) and 20. We recommend using a binary search - # approach to finding the optimal value for your use case as well as adding - # phrases both with and without boost to your requests. - class PhraseSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A phrases containing words and phrase "hints" so that - # the speech recognition is more likely to recognize them. This can be used - # to improve the accuracy for specific words and phrases, for example, if - # specific commands are typically spoken by the user. This can also be used - # to add additional words to the vocabulary of the recognizer. See - # [usage limits](https://cloud.google.com/speech-to-text/quotas#content). - # - # List items can also include pre-built or custom classes containing groups - # of words that represent common concepts that occur in natural language. For - # example, rather than providing a phrase hint for every month of the - # year (e.g. "i was born in january", "i was born in febuary", ...), use the - # pre-built `$MONTH` class improves the likelihood of correctly transcribing - # audio that includes months (e.g. "i was born in $month"). - # To refer to pre-built classes, use the class' symbol prepended with `$` - # e.g. `$MONTH`. To refer to custom classes that were defined inline in the - # request, set the class's `custom_class_id` to a string unique to all class - # resources and inline classes. Then use the class' id wrapped in $`{...}` - # e.g. "$\\{my-months}". To refer to custom classes resources, use the class' - # id wrapped in `${}` (e.g. `${my-months}`). - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] value - # @return [::String] - # The phrase itself. - # @!attribute [rw] boost - # @return [::Float] - # Hint Boost. Overrides the boost set at the phrase set level. - # Positive value will increase the probability that a specific phrase will - # be recognized over other similar sounding phrases. The higher the boost, - # the higher the chance of false positive recognition as well. Negative - # boost will simply be ignored. Though `boost` can accept a wide range of - # positive values, most use cases are best served - # with values between 0 and 20. We recommend using a binary search approach - # to finding the optimal value for your use case as well as adding - # phrases both with and without boost to your requests. - class Phrase - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Speech adaptation configuration. - # @!attribute [rw] phrase_sets - # @return [::Array<::Google::Cloud::Speech::V1::PhraseSet>] - # A collection of phrase sets. To specify the hints inline, leave the - # phrase set's `name` blank and fill in the rest of its fields. Any - # phrase set can use any custom class. - # @!attribute [rw] phrase_set_references - # @return [::Array<::String>] - # A collection of phrase set resource names to use. - # @!attribute [rw] custom_classes - # @return [::Array<::Google::Cloud::Speech::V1::CustomClass>] - # A collection of custom classes. To specify the classes inline, leave the - # class' `name` blank and fill in the rest of its fields, giving it a unique - # `custom_class_id`. Refer to the inline defined class in phrase hints by its - # `custom_class_id`. - # @!attribute [rw] abnf_grammar - # @return [::Google::Cloud::Speech::V1::SpeechAdaptation::ABNFGrammar] - # Augmented Backus-Naur form (ABNF) is a standardized grammar notation - # comprised by a set of derivation rules. - # See specifications: https://www.w3.org/TR/speech-grammar - class SpeechAdaptation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] abnf_strings - # @return [::Array<::String>] - # All declarations and rules of an ABNF grammar broken up into multiple - # strings that will end up concatenated. - class ABNFGrammar - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Transcription normalization configuration. Use transcription normalization - # to automatically replace parts of the transcript with phrases of your - # choosing. For StreamingRecognize, this normalization only applies to stable - # partial transcripts (stability > 0.8) and final transcripts. - # @!attribute [rw] entries - # @return [::Array<::Google::Cloud::Speech::V1::TranscriptNormalization::Entry>] - # A list of replacement entries. We will perform replacement with one entry - # at a time. For example, the second entry in ["cat" => "dog", "mountain cat" - # => "mountain dog"] will never be applied because we will always process the - # first entry before it. At most 100 entries. - class TranscriptNormalization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A single replacement configuration. - # @!attribute [rw] search - # @return [::String] - # What to replace. Max length is 100 characters. - # @!attribute [rw] replace - # @return [::String] - # What to replace with. Max length is 100 characters. - # @!attribute [rw] case_sensitive - # @return [::Boolean] - # Whether the search is case sensitive. - class Entry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-speech-v1/snippets/Gemfile deleted file mode 100644 index cbcc9d84c51b..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-speech-v1", path: "../" -else - gem "google-cloud-speech-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_custom_class.rb deleted file mode 100644 index fc51d3e2daca..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_custom_class.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Adaptation_CreateCustomClass_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the create_custom_class call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Adaptation::Client#create_custom_class. -# -def create_custom_class - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::CreateCustomClassRequest.new - - # Call the create_custom_class method. - result = client.create_custom_class request - - # The returned object is of type Google::Cloud::Speech::V1::CustomClass. - p result -end -# [END speech_v1_generated_Adaptation_CreateCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_phrase_set.rb deleted file mode 100644 index 7240501837bc..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/create_phrase_set.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Adaptation_CreatePhraseSet_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the create_phrase_set call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Adaptation::Client#create_phrase_set. -# -def create_phrase_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::CreatePhraseSetRequest.new - - # Call the create_phrase_set method. - result = client.create_phrase_set request - - # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. - p result -end -# [END speech_v1_generated_Adaptation_CreatePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_custom_class.rb deleted file mode 100644 index 29e6c8d7cfb2..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_custom_class.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Adaptation_DeleteCustomClass_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the delete_custom_class call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Adaptation::Client#delete_custom_class. -# -def delete_custom_class - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::DeleteCustomClassRequest.new - - # Call the delete_custom_class method. - result = client.delete_custom_class request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END speech_v1_generated_Adaptation_DeleteCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_phrase_set.rb deleted file mode 100644 index b2c8ad998b0b..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/delete_phrase_set.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Adaptation_DeletePhraseSet_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the delete_phrase_set call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Adaptation::Client#delete_phrase_set. -# -def delete_phrase_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::DeletePhraseSetRequest.new - - # Call the delete_phrase_set method. - result = client.delete_phrase_set request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END speech_v1_generated_Adaptation_DeletePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_custom_class.rb deleted file mode 100644 index 087735c5f1c5..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_custom_class.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Adaptation_GetCustomClass_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the get_custom_class call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Adaptation::Client#get_custom_class. -# -def get_custom_class - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::GetCustomClassRequest.new - - # Call the get_custom_class method. - result = client.get_custom_class request - - # The returned object is of type Google::Cloud::Speech::V1::CustomClass. - p result -end -# [END speech_v1_generated_Adaptation_GetCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_phrase_set.rb deleted file mode 100644 index 25a23e7f955f..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/get_phrase_set.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Adaptation_GetPhraseSet_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the get_phrase_set call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Adaptation::Client#get_phrase_set. -# -def get_phrase_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::GetPhraseSetRequest.new - - # Call the get_phrase_set method. - result = client.get_phrase_set request - - # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. - p result -end -# [END speech_v1_generated_Adaptation_GetPhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_custom_classes.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_custom_classes.rb deleted file mode 100644 index dacfa57bd4ff..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_custom_classes.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Adaptation_ListCustomClasses_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the list_custom_classes call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Adaptation::Client#list_custom_classes. -# -def list_custom_classes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::ListCustomClassesRequest.new - - # Call the list_custom_classes method. - result = client.list_custom_classes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Speech::V1::CustomClass. - p item - end -end -# [END speech_v1_generated_Adaptation_ListCustomClasses_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_phrase_set.rb deleted file mode 100644 index 44d69fb6efab..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/list_phrase_set.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Adaptation_ListPhraseSet_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the list_phrase_set call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Adaptation::Client#list_phrase_set. -# -def list_phrase_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::ListPhraseSetRequest.new - - # Call the list_phrase_set method. - result = client.list_phrase_set request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Speech::V1::PhraseSet. - p item - end -end -# [END speech_v1_generated_Adaptation_ListPhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_custom_class.rb deleted file mode 100644 index 2d1b25dcb582..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_custom_class.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Adaptation_UpdateCustomClass_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the update_custom_class call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Adaptation::Client#update_custom_class. -# -def update_custom_class - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::UpdateCustomClassRequest.new - - # Call the update_custom_class method. - result = client.update_custom_class request - - # The returned object is of type Google::Cloud::Speech::V1::CustomClass. - p result -end -# [END speech_v1_generated_Adaptation_UpdateCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_phrase_set.rb deleted file mode 100644 index ff2decbbb48a..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/adaptation/update_phrase_set.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Adaptation_UpdatePhraseSet_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the update_phrase_set call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Adaptation::Client#update_phrase_set. -# -def update_phrase_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new - - # Call the update_phrase_set method. - result = client.update_phrase_set request - - # The returned object is of type Google::Cloud::Speech::V1::PhraseSet. - p result -end -# [END speech_v1_generated_Adaptation_UpdatePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/snippet_metadata_google.cloud.speech.v1.json b/owl-bot-staging/google-cloud-speech-v1/snippets/snippet_metadata_google.cloud.speech.v1.json deleted file mode 100644 index 356aec9f11f2..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/snippet_metadata_google.cloud.speech.v1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-speech-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.speech.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "speech_v1_generated_Speech_Recognize_sync", - "title": "Snippet for the recognize call in the Speech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Speech::Client#recognize.", - "file": "speech/recognize.rb", - "language": "RUBY", - "client_method": { - "short_name": "recognize", - "full_name": "::Google::Cloud::Speech::V1::Speech::Client#recognize", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::RecognizeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1::RecognizeResponse", - "client": { - "short_name": "Speech::Client", - "full_name": "::Google::Cloud::Speech::V1::Speech::Client" - }, - "method": { - "short_name": "Recognize", - "full_name": "google.cloud.speech.v1.Speech.Recognize", - "service": { - "short_name": "Speech", - "full_name": "google.cloud.speech.v1.Speech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Speech_LongRunningRecognize_sync", - "title": "Snippet for the long_running_recognize call in the Speech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Speech::Client#long_running_recognize.", - "file": "speech/long_running_recognize.rb", - "language": "RUBY", - "client_method": { - "short_name": "long_running_recognize", - "full_name": "::Google::Cloud::Speech::V1::Speech::Client#long_running_recognize", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::LongRunningRecognizeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Speech::Client", - "full_name": "::Google::Cloud::Speech::V1::Speech::Client" - }, - "method": { - "short_name": "LongRunningRecognize", - "full_name": "google.cloud.speech.v1.Speech.LongRunningRecognize", - "service": { - "short_name": "Speech", - "full_name": "google.cloud.speech.v1.Speech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Speech_StreamingRecognize_sync", - "title": "Snippet for the streaming_recognize call in the Speech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Speech::Client#streaming_recognize.", - "file": "speech/streaming_recognize.rb", - "language": "RUBY", - "client_method": { - "short_name": "streaming_recognize", - "full_name": "::Google::Cloud::Speech::V1::Speech::Client#streaming_recognize", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::StreamingRecognizeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1::StreamingRecognizeResponse", - "client": { - "short_name": "Speech::Client", - "full_name": "::Google::Cloud::Speech::V1::Speech::Client" - }, - "method": { - "short_name": "StreamingRecognize", - "full_name": "google.cloud.speech.v1.Speech.StreamingRecognize", - "service": { - "short_name": "Speech", - "full_name": "google.cloud.speech.v1.Speech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 55, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Adaptation_CreatePhraseSet_sync", - "title": "Snippet for the create_phrase_set call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#create_phrase_set.", - "file": "adaptation/create_phrase_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_phrase_set", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#create_phrase_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::CreatePhraseSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1::PhraseSet", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" - }, - "method": { - "short_name": "CreatePhraseSet", - "full_name": "google.cloud.speech.v1.Adaptation.CreatePhraseSet", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Adaptation_GetPhraseSet_sync", - "title": "Snippet for the get_phrase_set call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#get_phrase_set.", - "file": "adaptation/get_phrase_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_phrase_set", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#get_phrase_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::GetPhraseSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1::PhraseSet", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" - }, - "method": { - "short_name": "GetPhraseSet", - "full_name": "google.cloud.speech.v1.Adaptation.GetPhraseSet", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Adaptation_ListPhraseSet_sync", - "title": "Snippet for the list_phrase_set call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#list_phrase_set.", - "file": "adaptation/list_phrase_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_phrase_set", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#list_phrase_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::ListPhraseSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1::ListPhraseSetResponse", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" - }, - "method": { - "short_name": "ListPhraseSet", - "full_name": "google.cloud.speech.v1.Adaptation.ListPhraseSet", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Adaptation_UpdatePhraseSet_sync", - "title": "Snippet for the update_phrase_set call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#update_phrase_set.", - "file": "adaptation/update_phrase_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_phrase_set", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#update_phrase_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::UpdatePhraseSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1::PhraseSet", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" - }, - "method": { - "short_name": "UpdatePhraseSet", - "full_name": "google.cloud.speech.v1.Adaptation.UpdatePhraseSet", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Adaptation_DeletePhraseSet_sync", - "title": "Snippet for the delete_phrase_set call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#delete_phrase_set.", - "file": "adaptation/delete_phrase_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_phrase_set", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#delete_phrase_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::DeletePhraseSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" - }, - "method": { - "short_name": "DeletePhraseSet", - "full_name": "google.cloud.speech.v1.Adaptation.DeletePhraseSet", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Adaptation_CreateCustomClass_sync", - "title": "Snippet for the create_custom_class call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#create_custom_class.", - "file": "adaptation/create_custom_class.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_custom_class", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#create_custom_class", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::CreateCustomClassRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1::CustomClass", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" - }, - "method": { - "short_name": "CreateCustomClass", - "full_name": "google.cloud.speech.v1.Adaptation.CreateCustomClass", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Adaptation_GetCustomClass_sync", - "title": "Snippet for the get_custom_class call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#get_custom_class.", - "file": "adaptation/get_custom_class.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_custom_class", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#get_custom_class", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::GetCustomClassRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1::CustomClass", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" - }, - "method": { - "short_name": "GetCustomClass", - "full_name": "google.cloud.speech.v1.Adaptation.GetCustomClass", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Adaptation_ListCustomClasses_sync", - "title": "Snippet for the list_custom_classes call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#list_custom_classes.", - "file": "adaptation/list_custom_classes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_custom_classes", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#list_custom_classes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::ListCustomClassesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1::ListCustomClassesResponse", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" - }, - "method": { - "short_name": "ListCustomClasses", - "full_name": "google.cloud.speech.v1.Adaptation.ListCustomClasses", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Adaptation_UpdateCustomClass_sync", - "title": "Snippet for the update_custom_class call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#update_custom_class.", - "file": "adaptation/update_custom_class.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_custom_class", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#update_custom_class", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::UpdateCustomClassRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1::CustomClass", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" - }, - "method": { - "short_name": "UpdateCustomClass", - "full_name": "google.cloud.speech.v1.Adaptation.UpdateCustomClass", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1_generated_Adaptation_DeleteCustomClass_sync", - "title": "Snippet for the delete_custom_class call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1::Adaptation::Client#delete_custom_class.", - "file": "adaptation/delete_custom_class.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_custom_class", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client#delete_custom_class", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1::DeleteCustomClassRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1::Adaptation::Client" - }, - "method": { - "short_name": "DeleteCustomClass", - "full_name": "google.cloud.speech.v1.Adaptation.DeleteCustomClass", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/speech/long_running_recognize.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/speech/long_running_recognize.rb deleted file mode 100644 index 5b94dc5d192e..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/speech/long_running_recognize.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Speech_LongRunningRecognize_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the long_running_recognize call in the Speech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Speech::Client#long_running_recognize. -# -def long_running_recognize - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Speech::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new - - # Call the long_running_recognize method. - result = client.long_running_recognize request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END speech_v1_generated_Speech_LongRunningRecognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/speech/recognize.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/speech/recognize.rb deleted file mode 100644 index 20864502c3ca..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/speech/recognize.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Speech_Recognize_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the recognize call in the Speech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Speech::Client#recognize. -# -def recognize - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Speech::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1::RecognizeRequest.new - - # Call the recognize method. - result = client.recognize request - - # The returned object is of type Google::Cloud::Speech::V1::RecognizeResponse. - p result -end -# [END speech_v1_generated_Speech_Recognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/snippets/speech/streaming_recognize.rb b/owl-bot-staging/google-cloud-speech-v1/snippets/speech/streaming_recognize.rb deleted file mode 100644 index fa73922ac483..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/snippets/speech/streaming_recognize.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1_generated_Speech_StreamingRecognize_sync] -require "google/cloud/speech/v1" - -## -# Snippet for the streaming_recognize call in the Speech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1::Speech::Client#streaming_recognize. -# -def streaming_recognize - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1::Speech::Client.new - - # Create an input stream. - input = Gapic::StreamInput.new - - # Call the streaming_recognize method to start streaming. - output = client.streaming_recognize input - - # Send requests on the stream. For each request object, set fields by - # passing keyword arguments. Be sure to close the stream when done. - input << Google::Cloud::Speech::V1::StreamingRecognizeRequest.new - input << Google::Cloud::Speech::V1::StreamingRecognizeRequest.new - input.close - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Speech::V1::StreamingRecognizeResponse - output.each do |current_response| - p current_response - end -end -# [END speech_v1_generated_Speech_StreamingRecognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_paths_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_paths_test.rb deleted file mode 100644 index 952b7e04e59a..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/speech/v1/adaptation" - -class ::Google::Cloud::Speech::V1::Adaptation::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_custom_class_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.custom_class_path project: "value0", location: "value1", custom_class: "value2" - assert_equal "projects/value0/locations/value1/customClasses/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_phrase_set_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.phrase_set_path project: "value0", location: "value1", phrase_set: "value2" - assert_equal "projects/value0/locations/value1/phraseSets/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_rest_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_rest_test.rb deleted file mode 100644 index b424e2cedd56..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_rest_test.rb +++ /dev/null @@ -1,649 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/speech/v1/cloud_speech_adaptation_pb" -require "google/cloud/speech/v1/adaptation/rest" - - -class ::Google::Cloud::Speech::V1::Adaptation::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_phrase_set - # Create test objects. - client_result = ::Google::Cloud::Speech::V1::PhraseSet.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - phrase_set_id = "hello world" - phrase_set = {} - - create_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_create_phrase_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_phrase_set parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_phrase_set ::Google::Cloud::Speech::V1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_phrase_set(::Google::Cloud::Speech::V1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_phrase_set_client_stub.call_count - end - end - end - - def test_get_phrase_set - # Create test objects. - client_result = ::Google::Cloud::Speech::V1::PhraseSet.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_get_phrase_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_phrase_set({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_phrase_set name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_phrase_set ::Google::Cloud::Speech::V1::GetPhraseSetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_phrase_set({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_phrase_set(::Google::Cloud::Speech::V1::GetPhraseSetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_phrase_set_client_stub.call_count - end - end - end - - def test_list_phrase_set - # Create test objects. - client_result = ::Google::Cloud::Speech::V1::ListPhraseSetResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_list_phrase_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_phrase_set parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_phrase_set ::Google::Cloud::Speech::V1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_phrase_set(::Google::Cloud::Speech::V1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_phrase_set_client_stub.call_count - end - end - end - - def test_update_phrase_set - # Create test objects. - client_result = ::Google::Cloud::Speech::V1::PhraseSet.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - phrase_set = {} - update_mask = {} - - update_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_update_phrase_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_phrase_set phrase_set: phrase_set, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_phrase_set ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_phrase_set(::Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_phrase_set_client_stub.call_count - end - end - end - - def test_delete_phrase_set - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_delete_phrase_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_phrase_set({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_phrase_set name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_phrase_set ::Google::Cloud::Speech::V1::DeletePhraseSetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_phrase_set({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_phrase_set(::Google::Cloud::Speech::V1::DeletePhraseSetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_phrase_set_client_stub.call_count - end - end - end - - def test_create_custom_class - # Create test objects. - client_result = ::Google::Cloud::Speech::V1::CustomClass.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - custom_class_id = "hello world" - custom_class = {} - - create_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_create_custom_class_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_custom_class parent: parent, custom_class_id: custom_class_id, custom_class: custom_class do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_custom_class ::Google::Cloud::Speech::V1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_custom_class(::Google::Cloud::Speech::V1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_custom_class_client_stub.call_count - end - end - end - - def test_get_custom_class - # Create test objects. - client_result = ::Google::Cloud::Speech::V1::CustomClass.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_get_custom_class_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_custom_class({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_custom_class name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_custom_class ::Google::Cloud::Speech::V1::GetCustomClassRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_custom_class({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_custom_class(::Google::Cloud::Speech::V1::GetCustomClassRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_custom_class_client_stub.call_count - end - end - end - - def test_list_custom_classes - # Create test objects. - client_result = ::Google::Cloud::Speech::V1::ListCustomClassesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_custom_classes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_list_custom_classes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_custom_classes_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_custom_classes parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_custom_classes ::Google::Cloud::Speech::V1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_custom_classes(::Google::Cloud::Speech::V1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_custom_classes_client_stub.call_count - end - end - end - - def test_update_custom_class - # Create test objects. - client_result = ::Google::Cloud::Speech::V1::CustomClass.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - custom_class = {} - update_mask = {} - - update_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_update_custom_class_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_custom_class custom_class: custom_class, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_custom_class ::Google::Cloud::Speech::V1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_custom_class(::Google::Cloud::Speech::V1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_custom_class_client_stub.call_count - end - end - end - - def test_delete_custom_class - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Adaptation::Rest::ServiceStub.stub :transcode_delete_custom_class_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_custom_class({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_custom_class name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_custom_class ::Google::Cloud::Speech::V1::DeleteCustomClassRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_custom_class({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_custom_class(::Google::Cloud::Speech::V1::DeleteCustomClassRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_custom_class_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1::Adaptation::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Speech::V1::Adaptation::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_test.rb deleted file mode 100644 index b47a0ba500cc..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/adaptation_test.rb +++ /dev/null @@ -1,714 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/speech/v1/cloud_speech_adaptation_pb" -require "google/cloud/speech/v1/adaptation" - -class ::Google::Cloud::Speech::V1::Adaptation::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_phrase_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1::PhraseSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - phrase_set_id = "hello world" - phrase_set = {} - - create_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_phrase_set, name - assert_kind_of ::Google::Cloud::Speech::V1::CreatePhraseSetRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["phrase_set_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::PhraseSet), request["phrase_set"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_phrase_set parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_phrase_set ::Google::Cloud::Speech::V1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_phrase_set(::Google::Cloud::Speech::V1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_phrase_set_client_stub.call_rpc_count - end - end - - def test_get_phrase_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1::PhraseSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_phrase_set, name - assert_kind_of ::Google::Cloud::Speech::V1::GetPhraseSetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_phrase_set({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_phrase_set name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_phrase_set ::Google::Cloud::Speech::V1::GetPhraseSetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_phrase_set({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_phrase_set(::Google::Cloud::Speech::V1::GetPhraseSetRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_phrase_set_client_stub.call_rpc_count - end - end - - def test_list_phrase_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1::ListPhraseSetResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_phrase_set, name - assert_kind_of ::Google::Cloud::Speech::V1::ListPhraseSetRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_phrase_set parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_phrase_set ::Google::Cloud::Speech::V1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_phrase_set(::Google::Cloud::Speech::V1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_phrase_set_client_stub.call_rpc_count - end - end - - def test_update_phrase_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1::PhraseSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - phrase_set = {} - update_mask = {} - - update_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_phrase_set, name - assert_kind_of ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::PhraseSet), request["phrase_set"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_phrase_set phrase_set: phrase_set, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_phrase_set ::Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_phrase_set(::Google::Cloud::Speech::V1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_phrase_set_client_stub.call_rpc_count - end - end - - def test_delete_phrase_set - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_phrase_set, name - assert_kind_of ::Google::Cloud::Speech::V1::DeletePhraseSetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_phrase_set({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_phrase_set name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_phrase_set ::Google::Cloud::Speech::V1::DeletePhraseSetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_phrase_set({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_phrase_set(::Google::Cloud::Speech::V1::DeletePhraseSetRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_phrase_set_client_stub.call_rpc_count - end - end - - def test_create_custom_class - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1::CustomClass.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - custom_class_id = "hello world" - custom_class = {} - - create_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_custom_class, name - assert_kind_of ::Google::Cloud::Speech::V1::CreateCustomClassRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["custom_class_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::CustomClass), request["custom_class"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_custom_class parent: parent, custom_class_id: custom_class_id, custom_class: custom_class do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_custom_class ::Google::Cloud::Speech::V1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_custom_class(::Google::Cloud::Speech::V1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_custom_class_client_stub.call_rpc_count - end - end - - def test_get_custom_class - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1::CustomClass.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_custom_class, name - assert_kind_of ::Google::Cloud::Speech::V1::GetCustomClassRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_custom_class({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_custom_class name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_custom_class ::Google::Cloud::Speech::V1::GetCustomClassRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_custom_class({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_custom_class(::Google::Cloud::Speech::V1::GetCustomClassRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_custom_class_client_stub.call_rpc_count - end - end - - def test_list_custom_classes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1::ListCustomClassesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_custom_classes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_custom_classes, name - assert_kind_of ::Google::Cloud::Speech::V1::ListCustomClassesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_custom_classes_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_custom_classes parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_custom_classes ::Google::Cloud::Speech::V1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_custom_classes(::Google::Cloud::Speech::V1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_custom_classes_client_stub.call_rpc_count - end - end - - def test_update_custom_class - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1::CustomClass.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - custom_class = {} - update_mask = {} - - update_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_custom_class, name - assert_kind_of ::Google::Cloud::Speech::V1::UpdateCustomClassRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::CustomClass), request["custom_class"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_custom_class custom_class: custom_class, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_custom_class ::Google::Cloud::Speech::V1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_custom_class(::Google::Cloud::Speech::V1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_custom_class_client_stub.call_rpc_count - end - end - - def test_delete_custom_class - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_custom_class, name - assert_kind_of ::Google::Cloud::Speech::V1::DeleteCustomClassRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_custom_class({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_custom_class name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_custom_class ::Google::Cloud::Speech::V1::DeleteCustomClassRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_custom_class({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_custom_class(::Google::Cloud::Speech::V1::DeleteCustomClassRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_custom_class_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Speech::V1::Adaptation::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1::Adaptation::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Speech::V1::Adaptation::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_operations_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_operations_test.rb deleted file mode 100644 index b2460b275c23..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/speech/v1/cloud_speech_pb" -require "google/cloud/speech/v1/cloud_speech_services_pb" -require "google/cloud/speech/v1/speech" - -class ::Google::Cloud::Speech::V1::Speech::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Speech::V1::Speech::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_paths_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_paths_test.rb deleted file mode 100644 index f90ecd2284cc..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/speech/v1/speech" - -class ::Google::Cloud::Speech::V1::Speech::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_custom_class_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.custom_class_path project: "value0", location: "value1", custom_class: "value2" - assert_equal "projects/value0/locations/value1/customClasses/value2", path - end - end - - def test_phrase_set_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.phrase_set_path project: "value0", location: "value1", phrase_set: "value2" - assert_equal "projects/value0/locations/value1/phraseSets/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_rest_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_rest_test.rb deleted file mode 100644 index cb1414e847b8..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_rest_test.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/speech/v1/cloud_speech_pb" -require "google/cloud/speech/v1/speech/rest" - - -class ::Google::Cloud::Speech::V1::Speech::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_recognize - # Create test objects. - client_result = ::Google::Cloud::Speech::V1::RecognizeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - config = {} - audio = {} - - recognize_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Speech::Rest::ServiceStub.stub :transcode_recognize_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, recognize_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.recognize({ config: config, audio: audio }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.recognize config: config, audio: audio do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.recognize ::Google::Cloud::Speech::V1::RecognizeRequest.new(config: config, audio: audio) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.recognize({ config: config, audio: audio }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.recognize(::Google::Cloud::Speech::V1::RecognizeRequest.new(config: config, audio: audio), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, recognize_client_stub.call_count - end - end - end - - def test_long_running_recognize - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - config = {} - audio = {} - output_config = {} - - long_running_recognize_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1::Speech::Rest::ServiceStub.stub :transcode_long_running_recognize_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, long_running_recognize_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.long_running_recognize({ config: config, audio: audio, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.long_running_recognize config: config, audio: audio, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.long_running_recognize ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.long_running_recognize({ config: config, audio: audio, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.long_running_recognize(::Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, long_running_recognize_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1::Speech::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Speech::V1::Speech::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_test.rb b/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_test.rb deleted file mode 100644 index d978a343a0d6..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/test/google/cloud/speech/v1/speech_test.rb +++ /dev/null @@ -1,334 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/speech/v1/cloud_speech_pb" -require "google/cloud/speech/v1/speech" - -class ::Google::Cloud::Speech::V1::Speech::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_recognize - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1::RecognizeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - config = {} - audio = {} - - recognize_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :recognize, name - assert_kind_of ::Google::Cloud::Speech::V1::RecognizeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::RecognitionConfig), request["config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::RecognitionAudio), request["audio"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, recognize_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.recognize({ config: config, audio: audio }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.recognize config: config, audio: audio do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.recognize ::Google::Cloud::Speech::V1::RecognizeRequest.new(config: config, audio: audio) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.recognize({ config: config, audio: audio }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.recognize(::Google::Cloud::Speech::V1::RecognizeRequest.new(config: config, audio: audio), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, recognize_client_stub.call_rpc_count - end - end - - def test_long_running_recognize - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - config = {} - audio = {} - output_config = {} - - long_running_recognize_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :long_running_recognize, name - assert_kind_of ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::RecognitionConfig), request["config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::RecognitionAudio), request["audio"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::TranscriptOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, long_running_recognize_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.long_running_recognize({ config: config, audio: audio, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.long_running_recognize config: config, audio: audio, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.long_running_recognize ::Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.long_running_recognize({ config: config, audio: audio, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.long_running_recognize(::Google::Cloud::Speech::V1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, long_running_recognize_client_stub.call_rpc_count - end - end - - def test_streaming_recognize - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1::StreamingRecognizeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a bidi streaming method. - streaming_config = {} - - streaming_recognize_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :streaming_recognize, name - assert_kind_of Enumerable, request - refute_nil options - request - end - - Gapic::ServiceStub.stub :new, streaming_recognize_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use enumerable object with hash and protobuf object. - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::Speech::V1::StreamingRecognizeRequest.new streaming_config: streaming_config - enum_input = [request_hash, request_proto].to_enum - c.streaming_recognize enum_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Speech::V1::StreamingRecognizeResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common). - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::Speech::V1::StreamingRecognizeRequest.new streaming_config: streaming_config - stream_input = Gapic::StreamInput.new - c.streaming_recognize stream_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Speech::V1::StreamingRecognizeResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Use enumerable object with hash and protobuf object with options. - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::Speech::V1::StreamingRecognizeRequest.new streaming_config: streaming_config - enum_input = [request_hash, request_proto].to_enum - c.streaming_recognize enum_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Speech::V1::StreamingRecognizeResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common) with options. - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::Speech::V1::StreamingRecognizeRequest.new streaming_config: streaming_config - stream_input = Gapic::StreamInput.new - c.streaming_recognize stream_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Speech::V1::StreamingRecognizeResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Verify method calls - assert_equal 4, streaming_recognize_client_stub.call_rpc_count - streaming_recognize_client_stub.requests.each do |request| - request.to_a.each do |r| - assert_kind_of ::Google::Cloud::Speech::V1::StreamingRecognizeRequest, r - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1::StreamingRecognitionConfig), r["streaming_config"] - assert_equal :streaming_config, r.streaming_request - end - end - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Speech::V1::Speech::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Speech::V1::Speech::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Speech::V1::Speech::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1/test/helper.rb b/owl-bot-staging/google-cloud-speech-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1/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-speech-v1p1beta1/.gitignore b/owl-bot-staging/google-cloud-speech-v1p1beta1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/.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-speech-v1p1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-speech-v1p1beta1/.repo-metadata.json deleted file mode 100644 index 0f33931b5a91..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "speech.googleapis.com", - "api_shortname": "speech", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-speech-v1p1beta1/latest", - "distribution_name": "google-cloud-speech-v1p1beta1", - "is_cloud": true, - "language": "ruby", - "name": "speech", - "name_pretty": "Cloud Speech-to-Text V1p1beta1 API", - "product_documentation": "https://cloud.google.com/speech-to-text", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. Note that google-cloud-speech-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-speech instead. See the readme for more details.", - "ruby-cloud-env-prefix": "SPEECH", - "ruby-cloud-product-url": "https://cloud.google.com/speech-to-text", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-speech-v1p1beta1/.rubocop.yml deleted file mode 100644 index 6e64dd5a1ded..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-speech-v1p1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-speech-v1p1beta1.rb" diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/.toys.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/.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-speech-v1p1beta1/.yardopts b/owl-bot-staging/google-cloud-speech-v1p1beta1/.yardopts deleted file mode 100644 index 5265c1e63603..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Speech-to-Text V1p1beta1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-speech-v1p1beta1/AUTHENTICATION.md deleted file mode 100644 index 234cd17b2900..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-speech-v1p1beta1 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-speech-v1p1beta1 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/speech/v1p1beta1" - -client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/speech/v1p1beta1" - -::Google::Cloud::Speech::V1p1beta1::Speech::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-speech-v1p1beta1 -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/speech/v1p1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-speech-v1p1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/Gemfile b/owl-bot-staging/google-cloud-speech-v1p1beta1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-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-speech-v1p1beta1/LICENSE.md b/owl-bot-staging/google-cloud-speech-v1p1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/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-speech-v1p1beta1/README.md b/owl-bot-staging/google-cloud-speech-v1p1beta1/README.md deleted file mode 100644 index 4f5aa19e0af2..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Speech-to-Text V1p1beta1 API - -Converts audio to text by applying powerful neural network models. - -Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Speech-to-Text V1p1beta1 API. Most users should consider using -the main client gem, -[google-cloud-speech](https://rubygems.org/gems/google-cloud-speech). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-speech-v1p1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/speech.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/speech/v1p1beta1" - -client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new -request = ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new # (request fields as keyword arguments...) -response = client.recognize request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-speech-v1p1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/speech-to-text) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/speech/v1p1beta1" -require "logger" - -client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-speech`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-speech-v1p1beta1`. -_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-speech`. -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-speech-v1p1beta1`. - -### 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-speech-v1p1beta1/Rakefile b/owl-bot-staging/google-cloud-speech-v1p1beta1/Rakefile deleted file mode 100644 index 0e12b1140bcd..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-speech-v1p1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["SPEECH_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["SPEECH_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["SPEECH_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 SPEECH_TEST_PROJECT=test123 SPEECH_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/speech/v1p1beta1/speech/credentials" - ::Google::Cloud::Speech::V1p1beta1::Speech::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["SPEECH_PROJECT"] = project - ENV["SPEECH_TEST_PROJECT"] = project - ENV["SPEECH_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-speech-v1p1beta1 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-speech-v1p1beta1 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-speech-v1p1beta1 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-speech-v1p1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-speech-v1p1beta1" - header "google-cloud-speech-v1p1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-speech-v1p1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-speech-v1p1beta1 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-speech-v1p1beta1 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-speech-v1p1beta1 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-speech-v1p1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-speech-v1p1beta1/gapic_metadata.json deleted file mode 100644 index 763b43de9241..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/gapic_metadata.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.speech.v1p1beta1", - "libraryPackage": "::Google::Cloud::Speech::V1p1beta1", - "services": { - "Speech": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Speech::V1p1beta1::Speech::Client", - "rpcs": { - "Recognize": { - "methods": [ - "recognize" - ] - }, - "LongRunningRecognize": { - "methods": [ - "long_running_recognize" - ] - }, - "StreamingRecognize": { - "methods": [ - "streaming_recognize" - ] - } - } - } - } - }, - "Adaptation": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client", - "rpcs": { - "CreatePhraseSet": { - "methods": [ - "create_phrase_set" - ] - }, - "GetPhraseSet": { - "methods": [ - "get_phrase_set" - ] - }, - "ListPhraseSet": { - "methods": [ - "list_phrase_set" - ] - }, - "UpdatePhraseSet": { - "methods": [ - "update_phrase_set" - ] - }, - "DeletePhraseSet": { - "methods": [ - "delete_phrase_set" - ] - }, - "CreateCustomClass": { - "methods": [ - "create_custom_class" - ] - }, - "GetCustomClass": { - "methods": [ - "get_custom_class" - ] - }, - "ListCustomClasses": { - "methods": [ - "list_custom_classes" - ] - }, - "UpdateCustomClass": { - "methods": [ - "update_custom_class" - ] - }, - "DeleteCustomClass": { - "methods": [ - "delete_custom_class" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/google-cloud-speech-v1p1beta1.gemspec b/owl-bot-staging/google-cloud-speech-v1p1beta1/google-cloud-speech-v1p1beta1.gemspec deleted file mode 100644 index 209a842aba3a..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/google-cloud-speech-v1p1beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/speech/v1p1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-speech-v1p1beta1" - gem.version = Google::Cloud::Speech::V1p1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Google Speech-to-Text enables developers to convert audio to text by applying powerful neural network models in an easy-to-use API. The API recognizes more than 120 languages and variants to support your global user base. You can enable voice command-and-control, transcribe audio from call centers, and more. It can process real-time streaming or prerecorded audio, using Google's machine learning technology. Note that google-cloud-speech-v1p1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-speech instead. See the readme for more details." - gem.summary = "Converts audio to text by applying powerful neural network models." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.rb deleted file mode 100644 index f30b25947a2c..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google-cloud-speech-v1p1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/speech/v1p1beta1" diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.rb deleted file mode 100644 index 29aac12bfb2a..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/speech/v1p1beta1/speech" -require "google/cloud/speech/v1p1beta1/adaptation" -require "google/cloud/speech/v1p1beta1/version" - -module Google - module Cloud - module Speech - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/speech/v1p1beta1" - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/speech/v1p1beta1" - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new - # - module V1p1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1p1beta1", "_helpers.rb" -require "google/cloud/speech/v1p1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.rb deleted file mode 100644 index 304cdacc9735..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/speech/v1p1beta1/version" - -require "google/cloud/speech/v1p1beta1/adaptation/credentials" -require "google/cloud/speech/v1p1beta1/adaptation/paths" -require "google/cloud/speech/v1p1beta1/adaptation/client" -require "google/cloud/speech/v1p1beta1/adaptation/rest" - -module Google - module Cloud - module Speech - module V1p1beta1 - ## - # Service that implements Google Cloud Speech Adaptation API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/speech/v1p1beta1/adaptation" - # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/speech/v1p1beta1/adaptation/rest" - # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - module Adaptation - end - end - end - end -end - -helper_path = ::File.join __dir__, "adaptation", "helpers.rb" -require "google/cloud/speech/v1p1beta1/adaptation/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb deleted file mode 100644 index 29510000f22d..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/client.rb +++ /dev/null @@ -1,1436 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb" - -module Google - module Cloud - module Speech - module V1p1beta1 - module Adaptation - ## - # Client for the Adaptation service. - # - # Service that implements Google Cloud Speech Adaptation API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :adaptation_stub - - ## - # Configure the Adaptation Client class. - # - # See {::Google::Cloud::Speech::V1p1beta1::Adaptation::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Adaptation clients - # ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Speech", "V1p1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Adaptation Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Speech::V1p1beta1::Adaptation::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @adaptation_stub.universe_domain - end - - ## - # Create a new Adaptation client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Adaptation client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @adaptation_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Speech::V1p1beta1::Adaptation::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @adaptation_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @adaptation_stub.logger - end - - # Service calls - - ## - # Create a set of phrase hints. Each item in the set can be a single word or - # a multi-word phrase. The items in the PhraseSet are favored by the - # recognition model when you send a call that includes the PhraseSet. - # - # @overload create_phrase_set(request, options = nil) - # Pass arguments to `create_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_phrase_set(parent: nil, phrase_set_id: nil, phrase_set: nil) - # Pass arguments to `create_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this phrase set will be created. - # Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param phrase_set_id [::String] - # Required. The ID to use for the phrase set, which will become the final - # component of the phrase set's resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @param phrase_set [::Google::Cloud::Speech::V1p1beta1::PhraseSet, ::Hash] - # Required. The phrase set to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new - # - # # Call the create_phrase_set method. - # result = client.create_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. - # p result - # - def create_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_phrase_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :create_phrase_set, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a phrase set. - # - # @overload get_phrase_set(request, options = nil) - # Pass arguments to `get_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_phrase_set(name: nil) - # Pass arguments to `get_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the phrase set to retrieve. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new - # - # # Call the get_phrase_set method. - # result = client.get_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. - # p result - # - def get_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_phrase_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :get_phrase_set, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List phrase sets. - # - # @overload list_phrase_set(request, options = nil) - # Pass arguments to `list_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_phrase_set(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of phrase set. Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param page_size [::Integer] - # The maximum number of phrase sets to return. The service may return - # fewer than this value. If unspecified, at most 50 phrase sets will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListPhraseSet` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPhraseSet` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new - # - # # Call the list_phrase_set method. - # result = client.list_phrase_set request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::PhraseSet. - # p item - # end - # - def list_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_phrase_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :list_phrase_set, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @adaptation_stub, :list_phrase_set, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a phrase set. - # - # @overload update_phrase_set(request, options = nil) - # Pass arguments to `update_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_phrase_set(phrase_set: nil, update_mask: nil) - # Pass arguments to `update_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param phrase_set [::Google::Cloud::Speech::V1p1beta1::PhraseSet, ::Hash] - # Required. The phrase set to update. - # - # The phrase set's `name` field is used to identify the set to be - # updated. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new - # - # # Call the update_phrase_set method. - # result = client.update_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. - # p result - # - def update_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.phrase_set&.name - header_params["phrase_set.name"] = request.phrase_set.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_phrase_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :update_phrase_set, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a phrase set. - # - # @overload delete_phrase_set(request, options = nil) - # Pass arguments to `delete_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_phrase_set(name: nil) - # Pass arguments to `delete_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the phrase set to delete. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new - # - # # Call the delete_phrase_set method. - # result = client.delete_phrase_set request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_phrase_set.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :delete_phrase_set, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a custom class. - # - # @overload create_custom_class(request, options = nil) - # Pass arguments to `create_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_custom_class(parent: nil, custom_class_id: nil, custom_class: nil) - # Pass arguments to `create_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this custom class will be created. - # Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param custom_class_id [::String] - # Required. The ID to use for the custom class, which will become the final - # component of the custom class' resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @param custom_class [::Google::Cloud::Speech::V1p1beta1::CustomClass, ::Hash] - # Required. The custom class to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new - # - # # Call the create_custom_class method. - # result = client.create_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. - # p result - # - def create_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_custom_class.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :create_custom_class, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a custom class. - # - # @overload get_custom_class(request, options = nil) - # Pass arguments to `get_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_custom_class(name: nil) - # Pass arguments to `get_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the custom class to retrieve. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new - # - # # Call the get_custom_class method. - # result = client.get_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. - # p result - # - def get_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_custom_class.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :get_custom_class, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List custom classes. - # - # @overload list_custom_classes(request, options = nil) - # Pass arguments to `list_custom_classes` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_custom_classes(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_custom_classes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of custom classes. Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param page_size [::Integer] - # The maximum number of custom classes to return. The service may return - # fewer than this value. If unspecified, at most 50 custom classes will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListCustomClass` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCustomClass` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::CustomClass>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::CustomClass>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new - # - # # Call the list_custom_classes method. - # result = client.list_custom_classes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::CustomClass. - # p item - # end - # - def list_custom_classes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_custom_classes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_custom_classes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_custom_classes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :list_custom_classes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @adaptation_stub, :list_custom_classes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a custom class. - # - # @overload update_custom_class(request, options = nil) - # Pass arguments to `update_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_custom_class(custom_class: nil, update_mask: nil) - # Pass arguments to `update_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param custom_class [::Google::Cloud::Speech::V1p1beta1::CustomClass, ::Hash] - # Required. The custom class to update. - # - # The custom class's `name` field is used to identify the custom class to be - # updated. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new - # - # # Call the update_custom_class method. - # result = client.update_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. - # p result - # - def update_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.custom_class&.name - header_params["custom_class.name"] = request.custom_class.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_custom_class.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :update_custom_class, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a custom class. - # - # @overload delete_custom_class(request, options = nil) - # Pass arguments to `delete_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_custom_class(name: nil) - # Pass arguments to `delete_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the custom class to delete. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new - # - # # Call the delete_custom_class method. - # result = client.delete_custom_class request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_custom_class.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.call_rpc :delete_custom_class, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Adaptation API. - # - # This class represents the configuration for Adaptation, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Speech::V1p1beta1::Adaptation::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_phrase_set to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_phrase_set.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_phrase_set.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Adaptation API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :create_phrase_set - ## - # RPC-specific configuration for `get_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :get_phrase_set - ## - # RPC-specific configuration for `list_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :list_phrase_set - ## - # RPC-specific configuration for `update_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :update_phrase_set - ## - # RPC-specific configuration for `delete_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_phrase_set - ## - # RPC-specific configuration for `create_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :create_custom_class - ## - # RPC-specific configuration for `get_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :get_custom_class - ## - # RPC-specific configuration for `list_custom_classes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_custom_classes - ## - # RPC-specific configuration for `update_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :update_custom_class - ## - # RPC-specific configuration for `delete_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_custom_class - - # @private - def initialize parent_rpcs = nil - create_phrase_set_config = parent_rpcs.create_phrase_set if parent_rpcs.respond_to? :create_phrase_set - @create_phrase_set = ::Gapic::Config::Method.new create_phrase_set_config - get_phrase_set_config = parent_rpcs.get_phrase_set if parent_rpcs.respond_to? :get_phrase_set - @get_phrase_set = ::Gapic::Config::Method.new get_phrase_set_config - list_phrase_set_config = parent_rpcs.list_phrase_set if parent_rpcs.respond_to? :list_phrase_set - @list_phrase_set = ::Gapic::Config::Method.new list_phrase_set_config - update_phrase_set_config = parent_rpcs.update_phrase_set if parent_rpcs.respond_to? :update_phrase_set - @update_phrase_set = ::Gapic::Config::Method.new update_phrase_set_config - delete_phrase_set_config = parent_rpcs.delete_phrase_set if parent_rpcs.respond_to? :delete_phrase_set - @delete_phrase_set = ::Gapic::Config::Method.new delete_phrase_set_config - create_custom_class_config = parent_rpcs.create_custom_class if parent_rpcs.respond_to? :create_custom_class - @create_custom_class = ::Gapic::Config::Method.new create_custom_class_config - get_custom_class_config = parent_rpcs.get_custom_class if parent_rpcs.respond_to? :get_custom_class - @get_custom_class = ::Gapic::Config::Method.new get_custom_class_config - list_custom_classes_config = parent_rpcs.list_custom_classes if parent_rpcs.respond_to? :list_custom_classes - @list_custom_classes = ::Gapic::Config::Method.new list_custom_classes_config - update_custom_class_config = parent_rpcs.update_custom_class if parent_rpcs.respond_to? :update_custom_class - @update_custom_class = ::Gapic::Config::Method.new update_custom_class_config - delete_custom_class_config = parent_rpcs.delete_custom_class if parent_rpcs.respond_to? :delete_custom_class - @delete_custom_class = ::Gapic::Config::Method.new delete_custom_class_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.rb deleted file mode 100644 index 0752ca8a8cf1..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Speech - module V1p1beta1 - module Adaptation - # Credentials for the Adaptation API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SPEECH_CREDENTIALS", - "SPEECH_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SPEECH_CREDENTIALS_JSON", - "SPEECH_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.rb deleted file mode 100644 index e5086c847d19..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/paths.rb +++ /dev/null @@ -1,132 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Speech - module V1p1beta1 - module Adaptation - # Path helper methods for the Adaptation API. - module Paths - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # - # @return [::String] - def crypto_key_path project:, location:, key_ring:, crypto_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" - end - - ## - # Create a fully-qualified CryptoKeyVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # @param crypto_key_version [String] - # - # @return [::String] - def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" - end - - ## - # Create a fully-qualified CustomClass resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # @param project [String] - # @param location [String] - # @param custom_class [String] - # - # @return [::String] - def custom_class_path project:, location:, custom_class: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/customClasses/#{custom_class}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified PhraseSet resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # @param project [String] - # @param location [String] - # @param phrase_set [String] - # - # @return [::String] - def phrase_set_path project:, location:, phrase_set: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/phraseSets/#{phrase_set}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.rb deleted file mode 100644 index 06d9364c931d..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/speech/v1p1beta1/version" - -require "google/cloud/speech/v1p1beta1/adaptation/credentials" -require "google/cloud/speech/v1p1beta1/adaptation/paths" -require "google/cloud/speech/v1p1beta1/adaptation/rest/client" - -module Google - module Cloud - module Speech - module V1p1beta1 - ## - # Service that implements Google Cloud Speech Adaptation API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/speech/v1p1beta1/adaptation/rest" - # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - module Adaptation - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/speech/v1p1beta1/adaptation/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.rb deleted file mode 100644 index 526ddaf0816c..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/client.rb +++ /dev/null @@ -1,1323 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb" -require "google/cloud/speech/v1p1beta1/adaptation/rest/service_stub" - -module Google - module Cloud - module Speech - module V1p1beta1 - module Adaptation - module Rest - ## - # REST client for the Adaptation service. - # - # Service that implements Google Cloud Speech Adaptation API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :adaptation_stub - - ## - # Configure the Adaptation Client class. - # - # See {::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Adaptation clients - # ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Speech", "V1p1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Adaptation Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @adaptation_stub.universe_domain - end - - ## - # Create a new Adaptation REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Adaptation client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @adaptation_stub = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @adaptation_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @adaptation_stub.logger - end - - # Service calls - - ## - # Create a set of phrase hints. Each item in the set can be a single word or - # a multi-word phrase. The items in the PhraseSet are favored by the - # recognition model when you send a call that includes the PhraseSet. - # - # @overload create_phrase_set(request, options = nil) - # Pass arguments to `create_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_phrase_set(parent: nil, phrase_set_id: nil, phrase_set: nil) - # Pass arguments to `create_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this phrase set will be created. - # Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param phrase_set_id [::String] - # Required. The ID to use for the phrase set, which will become the final - # component of the phrase set's resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @param phrase_set [::Google::Cloud::Speech::V1p1beta1::PhraseSet, ::Hash] - # Required. The phrase set to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new - # - # # Call the create_phrase_set method. - # result = client.create_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. - # p result - # - def create_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_phrase_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.create_phrase_set request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a phrase set. - # - # @overload get_phrase_set(request, options = nil) - # Pass arguments to `get_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_phrase_set(name: nil) - # Pass arguments to `get_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the phrase set to retrieve. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new - # - # # Call the get_phrase_set method. - # result = client.get_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. - # p result - # - def get_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_phrase_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.get_phrase_set request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List phrase sets. - # - # @overload list_phrase_set(request, options = nil) - # Pass arguments to `list_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_phrase_set(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of phrase set. Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param page_size [::Integer] - # The maximum number of phrase sets to return. The service may return - # fewer than this value. If unspecified, at most 50 phrase sets will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListPhraseSet` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPhraseSet` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new - # - # # Call the list_phrase_set method. - # result = client.list_phrase_set request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::PhraseSet. - # p item - # end - # - def list_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_phrase_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.list_phrase_set request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @adaptation_stub, :list_phrase_set, "phrase_sets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a phrase set. - # - # @overload update_phrase_set(request, options = nil) - # Pass arguments to `update_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_phrase_set(phrase_set: nil, update_mask: nil) - # Pass arguments to `update_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param phrase_set [::Google::Cloud::Speech::V1p1beta1::PhraseSet, ::Hash] - # Required. The phrase set to update. - # - # The phrase set's `name` field is used to identify the set to be - # updated. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new - # - # # Call the update_phrase_set method. - # result = client.update_phrase_set request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. - # p result - # - def update_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_phrase_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.update_phrase_set request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a phrase set. - # - # @overload delete_phrase_set(request, options = nil) - # Pass arguments to `delete_phrase_set` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_phrase_set(name: nil) - # Pass arguments to `delete_phrase_set` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the phrase set to delete. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new - # - # # Call the delete_phrase_set method. - # result = client.delete_phrase_set request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_phrase_set request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_phrase_set.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_phrase_set.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_phrase_set.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.delete_phrase_set request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Create a custom class. - # - # @overload create_custom_class(request, options = nil) - # Pass arguments to `create_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_custom_class(parent: nil, custom_class_id: nil, custom_class: nil) - # Pass arguments to `create_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this custom class will be created. - # Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param custom_class_id [::String] - # Required. The ID to use for the custom class, which will become the final - # component of the custom class' resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @param custom_class [::Google::Cloud::Speech::V1p1beta1::CustomClass, ::Hash] - # Required. The custom class to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new - # - # # Call the create_custom_class method. - # result = client.create_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. - # p result - # - def create_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_custom_class.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.create_custom_class request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get a custom class. - # - # @overload get_custom_class(request, options = nil) - # Pass arguments to `get_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_custom_class(name: nil) - # Pass arguments to `get_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the custom class to retrieve. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new - # - # # Call the get_custom_class method. - # result = client.get_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. - # p result - # - def get_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_custom_class.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.get_custom_class request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List custom classes. - # - # @overload list_custom_classes(request, options = nil) - # Pass arguments to `list_custom_classes` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_custom_classes(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_custom_classes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of custom classes. Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param page_size [::Integer] - # The maximum number of custom classes to return. The service may return - # fewer than this value. If unspecified, at most 50 custom classes will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListCustomClass` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCustomClass` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::CustomClass>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Speech::V1p1beta1::CustomClass>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new - # - # # Call the list_custom_classes method. - # result = client.list_custom_classes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Speech::V1p1beta1::CustomClass. - # p item - # end - # - def list_custom_classes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_custom_classes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_custom_classes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_custom_classes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.list_custom_classes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @adaptation_stub, :list_custom_classes, "custom_classes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a custom class. - # - # @overload update_custom_class(request, options = nil) - # Pass arguments to `update_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_custom_class(custom_class: nil, update_mask: nil) - # Pass arguments to `update_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param custom_class [::Google::Cloud::Speech::V1p1beta1::CustomClass, ::Hash] - # Required. The custom class to update. - # - # The custom class's `name` field is used to identify the custom class to be - # updated. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new - # - # # Call the update_custom_class method. - # result = client.update_custom_class request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. - # p result - # - def update_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_custom_class.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.update_custom_class request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a custom class. - # - # @overload delete_custom_class(request, options = nil) - # Pass arguments to `delete_custom_class` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_custom_class(name: nil) - # Pass arguments to `delete_custom_class` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the custom class to delete. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new - # - # # Call the delete_custom_class method. - # result = client.delete_custom_class request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_custom_class request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_custom_class.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_custom_class.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_custom_class.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @adaptation_stub.delete_custom_class request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Adaptation REST API. - # - # This class represents the configuration for Adaptation REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_phrase_set to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_phrase_set.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_phrase_set.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Adaptation API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :create_phrase_set - ## - # RPC-specific configuration for `get_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :get_phrase_set - ## - # RPC-specific configuration for `list_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :list_phrase_set - ## - # RPC-specific configuration for `update_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :update_phrase_set - ## - # RPC-specific configuration for `delete_phrase_set` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_phrase_set - ## - # RPC-specific configuration for `create_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :create_custom_class - ## - # RPC-specific configuration for `get_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :get_custom_class - ## - # RPC-specific configuration for `list_custom_classes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_custom_classes - ## - # RPC-specific configuration for `update_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :update_custom_class - ## - # RPC-specific configuration for `delete_custom_class` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_custom_class - - # @private - def initialize parent_rpcs = nil - create_phrase_set_config = parent_rpcs.create_phrase_set if parent_rpcs.respond_to? :create_phrase_set - @create_phrase_set = ::Gapic::Config::Method.new create_phrase_set_config - get_phrase_set_config = parent_rpcs.get_phrase_set if parent_rpcs.respond_to? :get_phrase_set - @get_phrase_set = ::Gapic::Config::Method.new get_phrase_set_config - list_phrase_set_config = parent_rpcs.list_phrase_set if parent_rpcs.respond_to? :list_phrase_set - @list_phrase_set = ::Gapic::Config::Method.new list_phrase_set_config - update_phrase_set_config = parent_rpcs.update_phrase_set if parent_rpcs.respond_to? :update_phrase_set - @update_phrase_set = ::Gapic::Config::Method.new update_phrase_set_config - delete_phrase_set_config = parent_rpcs.delete_phrase_set if parent_rpcs.respond_to? :delete_phrase_set - @delete_phrase_set = ::Gapic::Config::Method.new delete_phrase_set_config - create_custom_class_config = parent_rpcs.create_custom_class if parent_rpcs.respond_to? :create_custom_class - @create_custom_class = ::Gapic::Config::Method.new create_custom_class_config - get_custom_class_config = parent_rpcs.get_custom_class if parent_rpcs.respond_to? :get_custom_class - @get_custom_class = ::Gapic::Config::Method.new get_custom_class_config - list_custom_classes_config = parent_rpcs.list_custom_classes if parent_rpcs.respond_to? :list_custom_classes - @list_custom_classes = ::Gapic::Config::Method.new list_custom_classes_config - update_custom_class_config = parent_rpcs.update_custom_class if parent_rpcs.respond_to? :update_custom_class - @update_custom_class = ::Gapic::Config::Method.new update_custom_class_config - delete_custom_class_config = parent_rpcs.delete_custom_class if parent_rpcs.respond_to? :delete_custom_class - @delete_custom_class = ::Gapic::Config::Method.new delete_custom_class_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.rb deleted file mode 100644 index bd467300f761..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/adaptation/rest/service_stub.rb +++ /dev/null @@ -1,695 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb" - -module Google - module Cloud - module Speech - module V1p1beta1 - module Adaptation - module Rest - ## - # REST service stub for the Adaptation service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # A result object deserialized from the server's reply - def create_phrase_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_phrase_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_phrase_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # A result object deserialized from the server's reply - def get_phrase_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_phrase_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_phrase_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse] - # A result object deserialized from the server's reply - def list_phrase_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_phrase_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_phrase_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # A result object deserialized from the server's reply - def update_phrase_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_phrase_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_phrase_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_phrase_set request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_phrase_set_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_phrase_set", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # A result object deserialized from the server's reply - def create_custom_class request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_custom_class_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_custom_class", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # A result object deserialized from the server's reply - def get_custom_class request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_custom_class_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_custom_class", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_custom_classes REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse] - # A result object deserialized from the server's reply - def list_custom_classes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_custom_classes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_custom_classes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # A result object deserialized from the server's reply - def update_custom_class request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_custom_class_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_custom_class", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_custom_class request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_custom_class_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_custom_class", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_phrase_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/phraseSets", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_phrase_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_phrase_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/phraseSets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_phrase_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{phrase_set.name}", - body: "phrase_set", - matches: [ - ["phrase_set.name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_phrase_set REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_phrase_set_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_custom_class_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/{parent}/customClasses", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_custom_class_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_custom_classes REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_custom_classes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/{parent}/customClasses", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_custom_class_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1p1beta1/{custom_class.name}", - body: "custom_class", - matches: [ - ["custom_class.name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_custom_class REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_custom_class_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1p1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/customClasses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb.rb deleted file mode 100644 index 5b0bc2fff55e..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/speech/v1p1beta1/resource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n;google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto\x12\x1dgoogle.cloud.speech.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/speech/v1p1beta1/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb0\x01\n\x16\x43reatePhraseSetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\x12\x1a\n\rphrase_set_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\nphrase_set\x18\x03 \x01(\x0b\x32(.google.cloud.speech.v1p1beta1.PhraseSetB\x03\xe0\x41\x02\"\x8c\x01\n\x16UpdatePhraseSetRequest\x12\x41\n\nphrase_set\x18\x01 \x01(\x0b\x32(.google.cloud.speech.v1p1beta1.PhraseSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"L\n\x13GetPhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"v\n\x14ListPhraseSetRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fspeech.googleapis.com/PhraseSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"o\n\x15ListPhraseSetResponse\x12=\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32(.google.cloud.speech.v1p1beta1.PhraseSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"O\n\x16\x44\x65letePhraseSetRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\"\xba\x01\n\x18\x43reateCustomClassRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\x12\x1c\n\x0f\x63ustom_class_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0c\x63ustom_class\x18\x03 \x01(\x0b\x32*.google.cloud.speech.v1p1beta1.CustomClassB\x03\xe0\x41\x02\"\x92\x01\n\x18UpdateCustomClassRequest\x12\x45\n\x0c\x63ustom_class\x18\x01 \x01(\x0b\x32*.google.cloud.speech.v1p1beta1.CustomClassB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"P\n\x15GetCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass\"|\n\x18ListCustomClassesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!speech.googleapis.com/CustomClass\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"x\n\x19ListCustomClassesResponse\x12\x42\n\x0e\x63ustom_classes\x18\x01 \x03(\x0b\x32*.google.cloud.speech.v1p1beta1.CustomClass\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n\x18\x44\x65leteCustomClassRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!speech.googleapis.com/CustomClass2\xd2\x10\n\nAdaptation\x12\xd6\x01\n\x0f\x43reatePhraseSet\x12\x35.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest\x1a(.google.cloud.speech.v1p1beta1.PhraseSet\"b\xda\x41\x1fparent,phrase_set,phrase_set_id\x82\xd3\xe4\x93\x02:\"5/v1p1beta1/{parent=projects/*/locations/*}/phraseSets:\x01*\x12\xb2\x01\n\x0cGetPhraseSet\x12\x32.google.cloud.speech.v1p1beta1.GetPhraseSetRequest\x1a(.google.cloud.speech.v1p1beta1.PhraseSet\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1p1beta1/{name=projects/*/locations/*/phraseSets/*}\x12\xc2\x01\n\rListPhraseSet\x12\x33.google.cloud.speech.v1p1beta1.ListPhraseSetRequest\x1a\x34.google.cloud.speech.v1p1beta1.ListPhraseSetResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1p1beta1/{parent=projects/*/locations/*}/phraseSets\x12\xe1\x01\n\x0fUpdatePhraseSet\x12\x35.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest\x1a(.google.cloud.speech.v1p1beta1.PhraseSet\"m\xda\x41\x16phrase_set,update_mask\x82\xd3\xe4\x93\x02N2@/v1p1beta1/{phrase_set.name=projects/*/locations/*/phraseSets/*}:\nphrase_set\x12\xa6\x01\n\x0f\x44\x65letePhraseSet\x12\x35.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1p1beta1/{name=projects/*/locations/*/phraseSets/*}\x12\xe3\x01\n\x11\x43reateCustomClass\x12\x37.google.cloud.speech.v1p1beta1.CreateCustomClassRequest\x1a*.google.cloud.speech.v1p1beta1.CustomClass\"i\xda\x41#parent,custom_class,custom_class_id\x82\xd3\xe4\x93\x02=\"8/v1p1beta1/{parent=projects/*/locations/*}/customClasses:\x01*\x12\xbb\x01\n\x0eGetCustomClass\x12\x34.google.cloud.speech.v1p1beta1.GetCustomClassRequest\x1a*.google.cloud.speech.v1p1beta1.CustomClass\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1p1beta1/{name=projects/*/locations/*/customClasses/*}\x12\xd1\x01\n\x11ListCustomClasses\x12\x37.google.cloud.speech.v1p1beta1.ListCustomClassesRequest\x1a\x38.google.cloud.speech.v1p1beta1.ListCustomClassesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1p1beta1/{parent=projects/*/locations/*}/customClasses\x12\xf0\x01\n\x11UpdateCustomClass\x12\x37.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest\x1a*.google.cloud.speech.v1p1beta1.CustomClass\"v\xda\x41\x18\x63ustom_class,update_mask\x82\xd3\xe4\x93\x02U2E/v1p1beta1/{custom_class.name=projects/*/locations/*/customClasses/*}:\x0c\x63ustom_class\x12\xad\x01\n\x11\x44\x65leteCustomClass\x12\x37.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1p1beta1/{name=projects/*/locations/*/customClasses/*}\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB}\n!com.google.cloud.speech.v1p1beta1B\x15SpeechAdaptationProtoP\x01Z9cloud.google.com/go/speech/apiv1p1beta1/speechpb;speechpb\xa2\x02\x03GCSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Speech - module V1p1beta1 - CreatePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CreatePhraseSetRequest").msgclass - UpdatePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest").msgclass - GetPhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.GetPhraseSetRequest").msgclass - ListPhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.ListPhraseSetRequest").msgclass - ListPhraseSetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.ListPhraseSetResponse").msgclass - DeletePhraseSetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.DeletePhraseSetRequest").msgclass - CreateCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CreateCustomClassRequest").msgclass - UpdateCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.UpdateCustomClassRequest").msgclass - GetCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.GetCustomClassRequest").msgclass - ListCustomClassesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.ListCustomClassesRequest").msgclass - ListCustomClassesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.ListCustomClassesResponse").msgclass - DeleteCustomClassRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.DeleteCustomClassRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb deleted file mode 100644 index e7fe2aa9bbdf..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_adaptation_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto for package 'google.cloud.speech.v1p1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb' - -module Google - module Cloud - module Speech - module V1p1beta1 - module Adaptation - # Service that implements Google Cloud Speech Adaptation API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.speech.v1p1beta1.Adaptation' - - # Create a set of phrase hints. Each item in the set can be a single word or - # a multi-word phrase. The items in the PhraseSet are favored by the - # recognition model when you send a call that includes the PhraseSet. - rpc :CreatePhraseSet, ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest, ::Google::Cloud::Speech::V1p1beta1::PhraseSet - # Get a phrase set. - rpc :GetPhraseSet, ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest, ::Google::Cloud::Speech::V1p1beta1::PhraseSet - # List phrase sets. - rpc :ListPhraseSet, ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest, ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse - # Update a phrase set. - rpc :UpdatePhraseSet, ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest, ::Google::Cloud::Speech::V1p1beta1::PhraseSet - # Delete a phrase set. - rpc :DeletePhraseSet, ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest, ::Google::Protobuf::Empty - # Create a custom class. - rpc :CreateCustomClass, ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest, ::Google::Cloud::Speech::V1p1beta1::CustomClass - # Get a custom class. - rpc :GetCustomClass, ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest, ::Google::Cloud::Speech::V1p1beta1::CustomClass - # List custom classes. - rpc :ListCustomClasses, ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest, ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse - # Update a custom class. - rpc :UpdateCustomClass, ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest, ::Google::Cloud::Speech::V1p1beta1::CustomClass - # Delete a custom class. - rpc :DeleteCustomClass, ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb deleted file mode 100644 index b33181f5fa56..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/speech/v1p1beta1/cloud_speech.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/cloud/speech/v1p1beta1/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n0google/cloud/speech/v1p1beta1/cloud_speech.proto\x12\x1dgoogle.cloud.speech.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/cloud/speech/v1p1beta1/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\x9e\x01\n\x10RecognizeRequest\x12\x45\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x30.google.cloud.speech.v1p1beta1.RecognitionConfigB\x03\xe0\x41\x02\x12\x43\n\x05\x61udio\x18\x02 \x01(\x0b\x32/.google.cloud.speech.v1p1beta1.RecognitionAudioB\x03\xe0\x41\x02\"\xfc\x01\n\x1bLongRunningRecognizeRequest\x12\x45\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x30.google.cloud.speech.v1p1beta1.RecognitionConfigB\x03\xe0\x41\x02\x12\x43\n\x05\x61udio\x18\x02 \x01(\x0b\x32/.google.cloud.speech.v1p1beta1.RecognitionAudioB\x03\xe0\x41\x02\x12Q\n\routput_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.speech.v1p1beta1.TranscriptOutputConfigB\x03\xe0\x41\x01\":\n\x16TranscriptOutputConfig\x12\x11\n\x07gcs_uri\x18\x01 \x01(\tH\x00\x42\r\n\x0boutput_type\"\xa0\x01\n\x19StreamingRecognizeRequest\x12U\n\x10streaming_config\x18\x01 \x01(\x0b\x32\x39.google.cloud.speech.v1p1beta1.StreamingRecognitionConfigH\x00\x12\x17\n\raudio_content\x18\x02 \x01(\x0cH\x00\x42\x13\n\x11streaming_request\"\xb5\x03\n\x1aStreamingRecognitionConfig\x12\x45\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x30.google.cloud.speech.v1p1beta1.RecognitionConfigB\x03\xe0\x41\x02\x12\x18\n\x10single_utterance\x18\x02 \x01(\x08\x12\x17\n\x0finterim_results\x18\x03 \x01(\x08\x12$\n\x1c\x65nable_voice_activity_events\x18\x05 \x01(\x08\x12n\n\x16voice_activity_timeout\x18\x06 \x01(\x0b\x32N.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout\x1a\x86\x01\n\x14VoiceActivityTimeout\x12\x37\n\x14speech_start_timeout\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12speech_end_timeout\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xcd\t\n\x11RecognitionConfig\x12P\n\x08\x65ncoding\x18\x01 \x01(\x0e\x32>.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding\x12\x19\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x12\x1b\n\x13\x61udio_channel_count\x18\x07 \x01(\x05\x12/\n\'enable_separate_recognition_per_channel\x18\x0c \x01(\x08\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x1a\x61lternative_language_codes\x18\x12 \x03(\t\x12\x18\n\x10max_alternatives\x18\x04 \x01(\x05\x12\x18\n\x10profanity_filter\x18\x05 \x01(\x08\x12\x43\n\nadaptation\x18\x14 \x01(\x0b\x32/.google.cloud.speech.v1p1beta1.SpeechAdaptation\x12]\n\x18transcript_normalization\x18\x18 \x01(\x0b\x32\x36.google.cloud.speech.v1p1beta1.TranscriptNormalizationB\x03\xe0\x41\x01\x12\x45\n\x0fspeech_contexts\x18\x06 \x03(\x0b\x32,.google.cloud.speech.v1p1beta1.SpeechContext\x12 \n\x18\x65nable_word_time_offsets\x18\x08 \x01(\x08\x12\x1e\n\x16\x65nable_word_confidence\x18\x0f \x01(\x08\x12$\n\x1c\x65nable_automatic_punctuation\x18\x0b \x01(\x08\x12=\n\x19\x65nable_spoken_punctuation\x18\x16 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x38\n\x14\x65nable_spoken_emojis\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12&\n\x1a\x65nable_speaker_diarization\x18\x10 \x01(\x08\x42\x02\x18\x01\x12%\n\x19\x64iarization_speaker_count\x18\x11 \x01(\x05\x42\x02\x18\x01\x12S\n\x12\x64iarization_config\x18\x13 \x01(\x0b\x32\x37.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig\x12\x44\n\x08metadata\x18\t \x01(\x0b\x32\x32.google.cloud.speech.v1p1beta1.RecognitionMetadata\x12\r\n\x05model\x18\r \x01(\t\x12\x14\n\x0cuse_enhanced\x18\x0e \x01(\x08\"\xad\x01\n\rAudioEncoding\x12\x18\n\x14\x45NCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\x08\n\x04\x46LAC\x10\x02\x12\t\n\x05MULAW\x10\x03\x12\x07\n\x03\x41MR\x10\x04\x12\n\n\x06\x41MR_WB\x10\x05\x12\x0c\n\x08OGG_OPUS\x10\x06\x12\x1a\n\x16SPEEX_WITH_HEADER_BYTE\x10\x07\x12\x07\n\x03MP3\x10\x08\x12\r\n\tWEBM_OPUS\x10\t\x12\x08\n\x04\x41LAW\x10\n\"\x90\x01\n\x18SpeakerDiarizationConfig\x12\"\n\x1a\x65nable_speaker_diarization\x18\x01 \x01(\x08\x12\x19\n\x11min_speaker_count\x18\x02 \x01(\x05\x12\x19\n\x11max_speaker_count\x18\x03 \x01(\x05\x12\x1a\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\"\xdb\x08\n\x13RecognitionMetadata\x12\\\n\x10interaction_type\x18\x01 \x01(\x0e\x32\x42.google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType\x12$\n\x1cindustry_naics_code_of_audio\x18\x03 \x01(\r\x12\x62\n\x13microphone_distance\x18\x04 \x01(\x0e\x32\x45.google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance\x12\x61\n\x13original_media_type\x18\x05 \x01(\x0e\x32\x44.google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType\x12\x65\n\x15recording_device_type\x18\x06 \x01(\x0e\x32\x46.google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType\x12\x1d\n\x15recording_device_name\x18\x07 \x01(\t\x12\x1a\n\x12original_mime_type\x18\x08 \x01(\t\x12\x19\n\robfuscated_id\x18\t \x01(\x03\x42\x02\x18\x01\x12\x13\n\x0b\x61udio_topic\x18\n \x01(\t\"\xc5\x01\n\x0fInteractionType\x12 \n\x1cINTERACTION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nDISCUSSION\x10\x01\x12\x10\n\x0cPRESENTATION\x10\x02\x12\x0e\n\nPHONE_CALL\x10\x03\x12\r\n\tVOICEMAIL\x10\x04\x12\x1b\n\x17PROFESSIONALLY_PRODUCED\x10\x05\x12\x10\n\x0cVOICE_SEARCH\x10\x06\x12\x11\n\rVOICE_COMMAND\x10\x07\x12\r\n\tDICTATION\x10\x08\"d\n\x12MicrophoneDistance\x12#\n\x1fMICROPHONE_DISTANCE_UNSPECIFIED\x10\x00\x12\r\n\tNEARFIELD\x10\x01\x12\x0c\n\x08MIDFIELD\x10\x02\x12\x0c\n\x08\x46\x41RFIELD\x10\x03\"N\n\x11OriginalMediaType\x12#\n\x1fORIGINAL_MEDIA_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41UDIO\x10\x01\x12\t\n\x05VIDEO\x10\x02\"\xa4\x01\n\x13RecordingDeviceType\x12%\n!RECORDING_DEVICE_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nSMARTPHONE\x10\x01\x12\x06\n\x02PC\x10\x02\x12\x0e\n\nPHONE_LINE\x10\x03\x12\x0b\n\x07VEHICLE\x10\x04\x12\x18\n\x14OTHER_OUTDOOR_DEVICE\x10\x05\x12\x17\n\x13OTHER_INDOOR_DEVICE\x10\x06:\x02\x18\x01\"/\n\rSpeechContext\x12\x0f\n\x07phrases\x18\x01 \x03(\t\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\"D\n\x10RecognitionAudio\x12\x11\n\x07\x63ontent\x18\x01 \x01(\x0cH\x00\x12\r\n\x03uri\x18\x02 \x01(\tH\x00\x42\x0e\n\x0c\x61udio_source\"\x98\x02\n\x11RecognizeResponse\x12G\n\x07results\x18\x02 \x03(\x0b\x32\x36.google.cloud.speech.v1p1beta1.SpeechRecognitionResult\x12\x34\n\x11total_billed_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12S\n\x16speech_adaptation_info\x18\x07 \x01(\x0b\x32\x33.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\x08 \x01(\x03\x12\x1b\n\x13using_legacy_models\x18\t \x01(\x08\"\xfe\x02\n\x1cLongRunningRecognizeResponse\x12G\n\x07results\x18\x02 \x03(\x0b\x32\x36.google.cloud.speech.v1p1beta1.SpeechRecognitionResult\x12\x34\n\x11total_billed_time\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12L\n\routput_config\x18\x06 \x01(\x0b\x32\x35.google.cloud.speech.v1p1beta1.TranscriptOutputConfig\x12(\n\x0coutput_error\x18\x07 \x01(\x0b\x32\x12.google.rpc.Status\x12S\n\x16speech_adaptation_info\x18\x08 \x01(\x0b\x32\x33.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\t \x01(\x03\"\x83\x02\n\x1cLongRunningRecognizeMetadata\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x03uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12Q\n\routput_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.speech.v1p1beta1.TranscriptOutputConfigB\x03\xe0\x41\x03\"\xe6\x04\n\x1aStreamingRecognizeResponse\x12!\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12J\n\x07results\x18\x02 \x03(\x0b\x32\x39.google.cloud.speech.v1p1beta1.StreamingRecognitionResult\x12\x64\n\x11speech_event_type\x18\x04 \x01(\x0e\x32I.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType\x12\x34\n\x11speech_event_time\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x34\n\x11total_billed_time\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12S\n\x16speech_adaptation_info\x18\t \x01(\x0b\x32\x33.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo\x12\x12\n\nrequest_id\x18\n \x01(\x03\"\x9d\x01\n\x0fSpeechEventType\x12\x1c\n\x18SPEECH_EVENT_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45ND_OF_SINGLE_UTTERANCE\x10\x01\x12\x19\n\x15SPEECH_ACTIVITY_BEGIN\x10\x02\x12\x17\n\x13SPEECH_ACTIVITY_END\x10\x03\x12\x1b\n\x17SPEECH_ACTIVITY_TIMEOUT\x10\x04\"\xf9\x01\n\x1aStreamingRecognitionResult\x12Q\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32;.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative\x12\x10\n\x08is_final\x18\x02 \x01(\x08\x12\x11\n\tstability\x18\x03 \x01(\x02\x12\x32\n\x0fresult_end_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x63hannel_tag\x18\x05 \x01(\x05\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x03\"\xd1\x01\n\x17SpeechRecognitionResult\x12Q\n\x0c\x61lternatives\x18\x01 \x03(\x0b\x32;.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative\x12\x13\n\x0b\x63hannel_tag\x18\x02 \x01(\x05\x12\x32\n\x0fresult_end_time\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x03\"~\n\x1cSpeechRecognitionAlternative\x12\x12\n\ntranscript\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x36\n\x05words\x18\x03 \x03(\x0b\x32\'.google.cloud.speech.v1p1beta1.WordInfo\"\xc0\x01\n\x08WordInfo\x12-\n\nstart_time\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x12\x1a\n\x0bspeaker_tag\x18\x05 \x01(\x05\x42\x05\x18\x01\xe0\x41\x03\x12\x1a\n\rspeaker_label\x18\x06 \x01(\tB\x03\xe0\x41\x03\"K\n\x14SpeechAdaptationInfo\x12\x1a\n\x12\x61\x64\x61ptation_timeout\x18\x01 \x01(\x08\x12\x17\n\x0ftimeout_message\x18\x04 \x01(\t2\x82\x05\n\x06Speech\x12\xa5\x01\n\tRecognize\x12/.google.cloud.speech.v1p1beta1.RecognizeRequest\x1a\x30.google.cloud.speech.v1p1beta1.RecognizeResponse\"5\xda\x41\x0c\x63onfig,audio\x82\xd3\xe4\x93\x02 \"\x1b/v1p1beta1/speech:recognize:\x01*\x12\xf2\x01\n\x14LongRunningRecognize\x12:.google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41<\n\x1cLongRunningRecognizeResponse\x12\x1cLongRunningRecognizeMetadata\xda\x41\x0c\x63onfig,audio\x82\xd3\xe4\x93\x02+\"&/v1p1beta1/speech:longrunningrecognize:\x01*\x12\x8f\x01\n\x12StreamingRecognize\x12\x38.google.cloud.speech.v1p1beta1.StreamingRecognizeRequest\x1a\x39.google.cloud.speech.v1p1beta1.StreamingRecognizeResponse\"\x00(\x01\x30\x01\x1aI\xca\x41\x15speech.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBs\n!com.google.cloud.speech.v1p1beta1B\x0bSpeechProtoP\x01Z9cloud.google.com/go/speech/apiv1p1beta1/speechpb;speechpb\xa2\x02\x03GCSb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Speech - module V1p1beta1 - RecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognizeRequest").msgclass - LongRunningRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest").msgclass - TranscriptOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.TranscriptOutputConfig").msgclass - StreamingRecognizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognizeRequest").msgclass - StreamingRecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognitionConfig").msgclass - StreamingRecognitionConfig::VoiceActivityTimeout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout").msgclass - RecognitionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionConfig").msgclass - RecognitionConfig::AudioEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding").enummodule - SpeakerDiarizationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig").msgclass - RecognitionMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionMetadata").msgclass - RecognitionMetadata::InteractionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType").enummodule - RecognitionMetadata::MicrophoneDistance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance").enummodule - RecognitionMetadata::OriginalMediaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType").enummodule - RecognitionMetadata::RecordingDeviceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType").enummodule - SpeechContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechContext").msgclass - RecognitionAudio = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognitionAudio").msgclass - RecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.RecognizeResponse").msgclass - LongRunningRecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse").msgclass - LongRunningRecognizeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata").msgclass - StreamingRecognizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognizeResponse").msgclass - StreamingRecognizeResponse::SpeechEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType").enummodule - StreamingRecognitionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.StreamingRecognitionResult").msgclass - SpeechRecognitionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechRecognitionResult").msgclass - SpeechRecognitionAlternative = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative").msgclass - WordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.WordInfo").msgclass - SpeechAdaptationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechAdaptationInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb deleted file mode 100644 index 7a757ba1b34b..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/cloud_speech_services_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/speech/v1p1beta1/cloud_speech.proto for package 'google.cloud.speech.v1p1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/speech/v1p1beta1/cloud_speech_pb' - -module Google - module Cloud - module Speech - module V1p1beta1 - module Speech - # Service that implements Google Cloud Speech API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.speech.v1p1beta1.Speech' - - # Performs synchronous speech recognition: receive results after all audio - # has been sent and processed. - rpc :Recognize, ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest, ::Google::Cloud::Speech::V1p1beta1::RecognizeResponse - # Performs asynchronous speech recognition: receive results via the - # google.longrunning.Operations interface. Returns either an - # `Operation.error` or an `Operation.response` which contains - # a `LongRunningRecognizeResponse` message. - # For more information on asynchronous speech recognition, see the - # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). - rpc :LongRunningRecognize, ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest, ::Google::Longrunning::Operation - # Performs bidirectional streaming speech recognition: receive results while - # sending audio. This method is only available via the gRPC API (not REST). - rpc :StreamingRecognize, stream(::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest), stream(::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse) - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/resource_pb.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/resource_pb.rb deleted file mode 100644 index debdb5df1fa0..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/resource_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/speech/v1p1beta1/resource.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/speech/v1p1beta1/resource.proto\x12\x1dgoogle.cloud.speech.v1p1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe4\x06\n\x0b\x43ustomClass\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0f\x63ustom_class_id\x18\x02 \x01(\t\x12\x43\n\x05items\x18\x03 \x03(\x0b\x32\x34.google.cloud.speech.v1p1beta1.CustomClass.ClassItem\x12?\n\x0ckms_key_name\x18\x06 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x14kms_key_version_name\x18\x07 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12\x10\n\x03uid\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x05state\x18\n \x01(\x0e\x32\x30.google.cloud.speech.v1p1beta1.CustomClass.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12U\n\x0b\x61nnotations\x18\r \x03(\x0b\x32;.google.cloud.speech.v1p1beta1.CustomClass.AnnotationsEntryB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x1a\x1a\n\tClassItem\x12\r\n\x05value\x18\x01 \x01(\t\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x04:l\xea\x41i\n!speech.googleapis.com/CustomClass\x12\x44projects/{project}/locations/{location}/customClasses/{custom_class}\"\xd6\x06\n\tPhraseSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x07phrases\x18\x02 \x03(\x0b\x32/.google.cloud.speech.v1p1beta1.PhraseSet.Phrase\x12\r\n\x05\x62oost\x18\x04 \x01(\x02\x12?\n\x0ckms_key_name\x18\x07 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x14kms_key_version_name\x18\x08 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12\x10\n\x03uid\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x0b \x01(\x0e\x32..google.cloud.speech.v1p1beta1.PhraseSet.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12S\n\x0b\x61nnotations\x18\x0e \x03(\x0b\x32\x39.google.cloud.speech.v1p1beta1.PhraseSet.AnnotationsEntryB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x1a&\n\x06Phrase\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x04:e\xea\x41\x62\n\x1fspeech.googleapis.com/PhraseSet\x12?projects/{project}/locations/{location}/phraseSets/{phrase_set}\"\xd2\x02\n\x10SpeechAdaptation\x12=\n\x0bphrase_sets\x18\x01 \x03(\x0b\x32(.google.cloud.speech.v1p1beta1.PhraseSet\x12\x43\n\x15phrase_set_references\x18\x02 \x03(\tB$\xfa\x41!\n\x1fspeech.googleapis.com/PhraseSet\x12\x42\n\x0e\x63ustom_classes\x18\x03 \x03(\x0b\x32*.google.cloud.speech.v1p1beta1.CustomClass\x12Q\n\x0c\x61\x62nf_grammar\x18\x04 \x01(\x0b\x32;.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar\x1a#\n\x0b\x41\x42NFGrammar\x12\x14\n\x0c\x61\x62nf_strings\x18\x01 \x03(\t\"\xaa\x01\n\x17TranscriptNormalization\x12M\n\x07\x65ntries\x18\x01 \x03(\x0b\x32<.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry\x1a@\n\x05\x45ntry\x12\x0e\n\x06search\x18\x01 \x01(\t\x12\x0f\n\x07replace\x18\x02 \x01(\t\x12\x16\n\x0e\x63\x61se_sensitive\x18\x03 \x01(\x08\x42\xa0\x03\n!com.google.cloud.speech.v1p1beta1B\x13SpeechResourceProtoP\x01Z9cloud.google.com/go/speech/apiv1p1beta1/speechpb;speechpb\xa2\x02\x03GCS\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Speech - module V1p1beta1 - CustomClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CustomClass").msgclass - CustomClass::ClassItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CustomClass.ClassItem").msgclass - CustomClass::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.CustomClass.State").enummodule - PhraseSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.PhraseSet").msgclass - PhraseSet::Phrase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.PhraseSet.Phrase").msgclass - PhraseSet::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.PhraseSet.State").enummodule - SpeechAdaptation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechAdaptation").msgclass - SpeechAdaptation::ABNFGrammar = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar").msgclass - TranscriptNormalization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.TranscriptNormalization").msgclass - TranscriptNormalization::Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.rb deleted file mode 100644 index 6c94920321b1..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/speech/v1p1beta1/speech/rest" -require "google/cloud/speech/v1p1beta1/adaptation/rest" -require "google/cloud/speech/v1p1beta1/version" - -module Google - module Cloud - module Speech - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/speech/v1p1beta1/rest" - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new - # - module V1p1beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.rb deleted file mode 100644 index bd0aec88faf2..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/speech/v1p1beta1/version" - -require "google/cloud/speech/v1p1beta1/speech/credentials" -require "google/cloud/speech/v1p1beta1/speech/paths" -require "google/cloud/speech/v1p1beta1/speech/operations" -require "google/cloud/speech/v1p1beta1/speech/client" -require "google/cloud/speech/v1p1beta1/speech/rest" - -module Google - module Cloud - module Speech - module V1p1beta1 - ## - # Service that implements Google Cloud Speech API. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/speech/v1p1beta1/speech" - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/speech/v1p1beta1/speech/rest" - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new - # - module Speech - end - end - end - end -end - -helper_path = ::File.join __dir__, "speech", "helpers.rb" -require "google/cloud/speech/v1p1beta1/speech/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.rb deleted file mode 100644 index f7dedf02534f..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/client.rb +++ /dev/null @@ -1,687 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/speech/v1p1beta1/cloud_speech_pb" - -module Google - module Cloud - module Speech - module V1p1beta1 - module Speech - ## - # Client for the Speech service. - # - # Service that implements Google Cloud Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :speech_stub - - ## - # Configure the Speech Client class. - # - # See {::Google::Cloud::Speech::V1p1beta1::Speech::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Speech clients - # ::Google::Cloud::Speech::V1p1beta1::Speech::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Speech", "V1p1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.recognize.timeout = 5000.0 - default_config.rpcs.recognize.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.long_running_recognize.timeout = 5000.0 - - default_config.rpcs.streaming_recognize.timeout = 5000.0 - default_config.rpcs.streaming_recognize.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Speech Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Speech::V1p1beta1::Speech::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @speech_stub.universe_domain - end - - ## - # Create a new Speech client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Speech client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/speech/v1p1beta1/cloud_speech_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @speech_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Speech::V1p1beta1::Speech::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @speech_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Speech::V1p1beta1::Speech::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @speech_stub.logger - end - - # Service calls - - ## - # Performs synchronous speech recognition: receive results after all audio - # has been sent and processed. - # - # @overload recognize(request, options = nil) - # Pass arguments to `recognize` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::RecognizeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::RecognizeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload recognize(config: nil, audio: nil) - # Pass arguments to `recognize` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param config [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig, ::Hash] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @param audio [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio, ::Hash] - # Required. The audio data to be recognized. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new - # - # # Call the recognize method. - # result = client.recognize request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::RecognizeResponse. - # p result - # - def recognize request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.recognize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.recognize.timeout, - metadata: metadata, - retry_policy: @config.rpcs.recognize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @speech_stub.call_rpc :recognize, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs asynchronous speech recognition: receive results via the - # google.longrunning.Operations interface. Returns either an - # `Operation.error` or an `Operation.response` which contains - # a `LongRunningRecognizeResponse` message. - # For more information on asynchronous speech recognition, see the - # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). - # - # @overload long_running_recognize(request, options = nil) - # Pass arguments to `long_running_recognize` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload long_running_recognize(config: nil, audio: nil, output_config: nil) - # Pass arguments to `long_running_recognize` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param config [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig, ::Hash] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @param audio [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio, ::Hash] - # Required. The audio data to be recognized. - # @param output_config [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig, ::Hash] - # Optional. Specifies an optional destination for the recognition results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new - # - # # Call the long_running_recognize method. - # result = client.long_running_recognize request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def long_running_recognize request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.long_running_recognize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.long_running_recognize.timeout, - metadata: metadata, - retry_policy: @config.rpcs.long_running_recognize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @speech_stub.call_rpc :long_running_recognize, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs bidirectional streaming speech recognition: receive results while - # sending audio. This method is only available via the gRPC API (not REST). - # - # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest, ::Hash>] - # An enumerable of {::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest} instances. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new - # - # # Create an input stream. - # input = Gapic::StreamInput.new - # - # # Call the streaming_recognize method to start streaming. - # output = client.streaming_recognize input - # - # # Send requests on the stream. For each request object, set fields by - # # passing keyword arguments. Be sure to close the stream when done. - # input << Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new - # input << Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new - # input.close - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse - # output.each do |current_response| - # p current_response - # end - # - def streaming_recognize request, options = nil - unless request.is_a? ::Enumerable - raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum - request = request.to_enum - end - - request = request.lazy.map do |req| - ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest - end - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.streaming_recognize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.streaming_recognize.timeout, - metadata: metadata, - retry_policy: @config.rpcs.streaming_recognize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @speech_stub.call_rpc :streaming_recognize, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Speech API. - # - # This class represents the configuration for Speech, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Speech::V1p1beta1::Speech::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # recognize to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Speech::V1p1beta1::Speech::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.recognize.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.recognize.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Speech API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `recognize` - # @return [::Gapic::Config::Method] - # - attr_reader :recognize - ## - # RPC-specific configuration for `long_running_recognize` - # @return [::Gapic::Config::Method] - # - attr_reader :long_running_recognize - ## - # RPC-specific configuration for `streaming_recognize` - # @return [::Gapic::Config::Method] - # - attr_reader :streaming_recognize - - # @private - def initialize parent_rpcs = nil - recognize_config = parent_rpcs.recognize if parent_rpcs.respond_to? :recognize - @recognize = ::Gapic::Config::Method.new recognize_config - long_running_recognize_config = parent_rpcs.long_running_recognize if parent_rpcs.respond_to? :long_running_recognize - @long_running_recognize = ::Gapic::Config::Method.new long_running_recognize_config - streaming_recognize_config = parent_rpcs.streaming_recognize if parent_rpcs.respond_to? :streaming_recognize - @streaming_recognize = ::Gapic::Config::Method.new streaming_recognize_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.rb deleted file mode 100644 index f83c21f0ed37..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Speech - module V1p1beta1 - module Speech - # Credentials for the Speech API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "SPEECH_CREDENTIALS", - "SPEECH_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "SPEECH_CREDENTIALS_JSON", - "SPEECH_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.rb deleted file mode 100644 index 05f9fca7becb..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/operations.rb +++ /dev/null @@ -1,835 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Speech - module V1p1beta1 - module Speech - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Speech Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the Speech Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.rb deleted file mode 100644 index 9e690dc1410d..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/paths.rb +++ /dev/null @@ -1,115 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Speech - module V1p1beta1 - module Speech - # Path helper methods for the Speech API. - module Paths - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # - # @return [::String] - def crypto_key_path project:, location:, key_ring:, crypto_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" - end - - ## - # Create a fully-qualified CryptoKeyVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # @param crypto_key_version [String] - # - # @return [::String] - def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" - end - - ## - # Create a fully-qualified CustomClass resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # @param project [String] - # @param location [String] - # @param custom_class [String] - # - # @return [::String] - def custom_class_path project:, location:, custom_class: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/customClasses/#{custom_class}" - end - - ## - # Create a fully-qualified PhraseSet resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # @param project [String] - # @param location [String] - # @param phrase_set [String] - # - # @return [::String] - def phrase_set_path project:, location:, phrase_set: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/phraseSets/#{phrase_set}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.rb deleted file mode 100644 index cd4e47947364..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/speech/v1p1beta1/version" - -require "google/cloud/speech/v1p1beta1/speech/credentials" -require "google/cloud/speech/v1p1beta1/speech/paths" -require "google/cloud/speech/v1p1beta1/speech/rest/operations" -require "google/cloud/speech/v1p1beta1/speech/rest/client" - -module Google - module Cloud - module Speech - module V1p1beta1 - ## - # Service that implements Google Cloud Speech API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/speech/v1p1beta1/speech/rest" - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new - # - module Speech - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/speech/v1p1beta1/speech/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.rb deleted file mode 100644 index d364abfd7fa0..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/client.rb +++ /dev/null @@ -1,555 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/speech/v1p1beta1/cloud_speech_pb" -require "google/cloud/speech/v1p1beta1/speech/rest/service_stub" - -module Google - module Cloud - module Speech - module V1p1beta1 - module Speech - module Rest - ## - # REST client for the Speech service. - # - # Service that implements Google Cloud Speech API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :speech_stub - - ## - # Configure the Speech Client class. - # - # See {::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Speech clients - # ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Speech", "V1p1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.recognize.timeout = 5000.0 - default_config.rpcs.recognize.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.long_running_recognize.timeout = 5000.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Speech Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @speech_stub.universe_domain - end - - ## - # Create a new Speech REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Speech client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @speech_stub = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @speech_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @speech_stub.logger - end - - # Service calls - - ## - # Performs synchronous speech recognition: receive results after all audio - # has been sent and processed. - # - # @overload recognize(request, options = nil) - # Pass arguments to `recognize` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::RecognizeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::RecognizeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload recognize(config: nil, audio: nil) - # Pass arguments to `recognize` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param config [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig, ::Hash] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @param audio [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio, ::Hash] - # Required. The audio data to be recognized. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new - # - # # Call the recognize method. - # result = client.recognize request - # - # # The returned object is of type Google::Cloud::Speech::V1p1beta1::RecognizeResponse. - # p result - # - def recognize request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.recognize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.recognize.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.recognize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @speech_stub.recognize request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Performs asynchronous speech recognition: receive results via the - # google.longrunning.Operations interface. Returns either an - # `Operation.error` or an `Operation.response` which contains - # a `LongRunningRecognizeResponse` message. - # For more information on asynchronous speech recognition, see the - # [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize). - # - # @overload long_running_recognize(request, options = nil) - # Pass arguments to `long_running_recognize` via a request object, either of type - # {::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload long_running_recognize(config: nil, audio: nil, output_config: nil) - # Pass arguments to `long_running_recognize` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param config [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig, ::Hash] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @param audio [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio, ::Hash] - # Required. The audio data to be recognized. - # @param output_config [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig, ::Hash] - # Optional. Specifies an optional destination for the recognition results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/speech/v1p1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new - # - # # Call the long_running_recognize method. - # result = client.long_running_recognize request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def long_running_recognize request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.long_running_recognize.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.long_running_recognize.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.long_running_recognize.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @speech_stub.long_running_recognize request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Speech REST API. - # - # This class represents the configuration for Speech REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # recognize to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.recognize.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.recognize.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Speech API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `recognize` - # @return [::Gapic::Config::Method] - # - attr_reader :recognize - ## - # RPC-specific configuration for `long_running_recognize` - # @return [::Gapic::Config::Method] - # - attr_reader :long_running_recognize - - # @private - def initialize parent_rpcs = nil - recognize_config = parent_rpcs.recognize if parent_rpcs.respond_to? :recognize - @recognize = ::Gapic::Config::Method.new recognize_config - long_running_recognize_config = parent_rpcs.long_running_recognize if parent_rpcs.respond_to? :long_running_recognize - @long_running_recognize = ::Gapic::Config::Method.new long_running_recognize_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.rb deleted file mode 100644 index 6db77cbcb4d0..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Speech - module V1p1beta1 - module Speech - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "speech.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Speech Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the Speech Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Speech::V1p1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "speech.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/operations", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1p1beta1/operations/{name}", - matches: [ - ["name", %r{^(?<__wildcard__>.*)$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/(?<__wildcard__>.*))?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.rb deleted file mode 100644 index 5822dffd5c1b..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/speech/rest/service_stub.rb +++ /dev/null @@ -1,201 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/speech/v1p1beta1/cloud_speech_pb" - -module Google - module Cloud - module Speech - module V1p1beta1 - module Speech - module Rest - ## - # REST service stub for the Speech service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the recognize REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::RecognizeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Speech::V1p1beta1::RecognizeResponse] - # A result object deserialized from the server's reply - def recognize request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_recognize_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "recognize", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Speech::V1p1beta1::RecognizeResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the long_running_recognize REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def long_running_recognize request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_long_running_recognize_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "long_running_recognize", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the recognize REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::RecognizeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_recognize_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/speech:recognize", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the long_running_recognize REST call - # - # @param request_pb [::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_long_running_recognize_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1p1beta1/speech:longrunningrecognize", - body: "*", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/version.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/version.rb deleted file mode 100644 index 44ab865d9484..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/lib/google/cloud/speech/v1p1beta1/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 Speech - module V1p1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/README.md deleted file mode 100644 index 61d72528ac28..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Speech-to-Text V1p1beta1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb deleted file mode 100644 index 00d8a38fa769..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech.rb +++ /dev/null @@ -1,1033 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Speech - module V1p1beta1 - # The top-level message sent by the client for the `Recognize` method. - # @!attribute [rw] config - # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @!attribute [rw] audio - # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio] - # Required. The audio data to be recognized. - class RecognizeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The top-level message sent by the client for the `LongRunningRecognize` - # method. - # @!attribute [rw] config - # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @!attribute [rw] audio - # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionAudio] - # Required. The audio data to be recognized. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig] - # Optional. Specifies an optional destination for the recognition results. - class LongRunningRecognizeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies an optional destination for the recognition results. - # @!attribute [rw] gcs_uri - # @return [::String] - # Specifies a Cloud Storage URI for the recognition results. Must be - # specified in the format: `gs://bucket_name/object_name`, and the bucket - # must already exist. - class TranscriptOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The top-level message sent by the client for the `StreamingRecognize` method. - # Multiple `StreamingRecognizeRequest` messages are sent. The first message - # must contain a `streaming_config` message and must not contain - # `audio_content`. All subsequent messages must contain `audio_content` and - # must not contain a `streaming_config` message. - # @!attribute [rw] streaming_config - # @return [::Google::Cloud::Speech::V1p1beta1::StreamingRecognitionConfig] - # Provides information to the recognizer that specifies how to process the - # request. The first `StreamingRecognizeRequest` message must contain a - # `streaming_config` message. - # - # Note: The following fields are mutually exclusive: `streaming_config`, `audio_content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] audio_content - # @return [::String] - # The audio data to be recognized. Sequential chunks of audio data are sent - # in sequential `StreamingRecognizeRequest` messages. The first - # `StreamingRecognizeRequest` message must not contain `audio_content` data - # and all subsequent `StreamingRecognizeRequest` messages must contain - # `audio_content` data. The audio bytes must be encoded as specified in - # `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a - # pure binary representation (not base64). See - # [content limits](https://cloud.google.com/speech-to-text/quotas#content). - # - # Note: The following fields are mutually exclusive: `audio_content`, `streaming_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class StreamingRecognizeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides information to the recognizer that specifies how to process the - # request. - # @!attribute [rw] config - # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig] - # Required. Provides information to the recognizer that specifies how to - # process the request. - # @!attribute [rw] single_utterance - # @return [::Boolean] - # If `false` or omitted, the recognizer will perform continuous - # recognition (continuing to wait for and process audio even if the user - # pauses speaking) until the client closes the input stream (gRPC API) or - # until the maximum time limit has been reached. May return multiple - # `StreamingRecognitionResult`s with the `is_final` flag set to `true`. - # - # If `true`, the recognizer will detect a single spoken utterance. When it - # detects that the user has paused or stopped speaking, it will return an - # `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no - # more than one `StreamingRecognitionResult` with the `is_final` flag set to - # `true`. - # - # The `single_utterance` field can only be used with specified models, - # otherwise an error is thrown. The `model` field in - # {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig RecognitionConfig} must - # be set to: - # - # * `command_and_search` - # * `phone_call` AND additional field `useEnhanced`=`true` - # * The `model` field is left undefined. In this case the API auto-selects - # a model based on any other parameters that you set in - # `RecognitionConfig`. - # @!attribute [rw] interim_results - # @return [::Boolean] - # If `true`, interim results (tentative hypotheses) may be - # returned as they become available (these interim results are indicated with - # the `is_final=false` flag). - # If `false` or omitted, only `is_final=true` result(s) are returned. - # @!attribute [rw] enable_voice_activity_events - # @return [::Boolean] - # If `true`, responses with voice activity speech events will be returned as - # they are detected. - # @!attribute [rw] voice_activity_timeout - # @return [::Google::Cloud::Speech::V1p1beta1::StreamingRecognitionConfig::VoiceActivityTimeout] - # If set, the server will automatically close the stream after the specified - # duration has elapsed after the last VOICE_ACTIVITY speech event has been - # sent. The field `voice_activity_events` must also be set to true. - class StreamingRecognitionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Events that a timeout can be set on for voice activity. - # @!attribute [rw] speech_start_timeout - # @return [::Google::Protobuf::Duration] - # Duration to timeout the stream if no speech begins. - # @!attribute [rw] speech_end_timeout - # @return [::Google::Protobuf::Duration] - # Duration to timeout the stream after speech ends. - class VoiceActivityTimeout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Provides information to the recognizer that specifies how to process the - # request. - # @!attribute [rw] encoding - # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding] - # Encoding of audio data sent in all `RecognitionAudio` messages. - # This field is optional for `FLAC` and `WAV` audio files and required - # for all other audio formats. For details, see - # {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}. - # @!attribute [rw] sample_rate_hertz - # @return [::Integer] - # Sample rate in Hertz of the audio data sent in all - # `RecognitionAudio` messages. Valid values are: 8000-48000. - # 16000 is optimal. For best results, set the sampling rate of the audio - # source to 16000 Hz. If that's not possible, use the native sample rate of - # the audio source (instead of re-sampling). - # This field is optional for FLAC and WAV audio files, but is - # required for all other audio formats. For details, see - # {::Google::Cloud::Speech::V1p1beta1::RecognitionConfig::AudioEncoding AudioEncoding}. - # @!attribute [rw] audio_channel_count - # @return [::Integer] - # The number of channels in the input audio data. - # ONLY set this for MULTI-CHANNEL recognition. - # Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. - # Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. - # If `0` or omitted, defaults to one channel (mono). - # Note: We only recognize the first channel by default. - # To perform independent recognition on each channel set - # `enable_separate_recognition_per_channel` to 'true'. - # @!attribute [rw] enable_separate_recognition_per_channel - # @return [::Boolean] - # This needs to be set to `true` explicitly and `audio_channel_count` > 1 - # to get each channel recognized separately. The recognition result will - # contain a `channel_tag` field to state which channel that result belongs - # to. If this is not true, we will only recognize the first channel. The - # request is billed cumulatively for all channels recognized: - # `audio_channel_count` multiplied by the length of the audio. - # @!attribute [rw] language_code - # @return [::String] - # Required. The language of the supplied audio as a - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - # Example: "en-US". - # See [Language - # Support](https://cloud.google.com/speech-to-text/docs/languages) for a list - # of the currently supported language codes. - # @!attribute [rw] alternative_language_codes - # @return [::Array<::String>] - # A list of up to 3 additional - # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags, - # listing possible alternative languages of the supplied audio. - # See [Language - # Support](https://cloud.google.com/speech-to-text/docs/languages) for a list - # of the currently supported language codes. If alternative languages are - # listed, recognition result will contain recognition in the most likely - # language detected including the main language_code. The recognition result - # will include the language tag of the language detected in the audio. Note: - # This feature is only supported for Voice Command and Voice Search use cases - # and performance may vary for other use cases (e.g., phone call - # transcription). - # @!attribute [rw] max_alternatives - # @return [::Integer] - # Maximum number of recognition hypotheses to be returned. - # Specifically, the maximum number of `SpeechRecognitionAlternative` messages - # within each `SpeechRecognitionResult`. - # The server may return fewer than `max_alternatives`. - # Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of - # one. If omitted, will return a maximum of one. - # @!attribute [rw] profanity_filter - # @return [::Boolean] - # If set to `true`, the server will attempt to filter out - # profanities, replacing all but the initial character in each filtered word - # with asterisks, e.g. "f***". If set to `false` or omitted, profanities - # won't be filtered out. - # @!attribute [rw] adaptation - # @return [::Google::Cloud::Speech::V1p1beta1::SpeechAdaptation] - # Speech adaptation configuration improves the accuracy of speech - # recognition. For more information, see the [speech - # adaptation](https://cloud.google.com/speech-to-text/docs/adaptation) - # documentation. - # When speech adaptation is set it supersedes the `speech_contexts` field. - # @!attribute [rw] transcript_normalization - # @return [::Google::Cloud::Speech::V1p1beta1::TranscriptNormalization] - # Optional. Use transcription normalization to automatically replace parts of - # the transcript with phrases of your choosing. For StreamingRecognize, this - # normalization only applies to stable partial transcripts (stability > 0.8) - # and final transcripts. - # @!attribute [rw] speech_contexts - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechContext>] - # Array of {::Google::Cloud::Speech::V1p1beta1::SpeechContext SpeechContext}. - # A means to provide context to assist the speech recognition. For more - # information, see - # [speech - # adaptation](https://cloud.google.com/speech-to-text/docs/adaptation). - # @!attribute [rw] enable_word_time_offsets - # @return [::Boolean] - # If `true`, the top result includes a list of words and - # the start and end time offsets (timestamps) for those words. If - # `false`, no word-level time offset information is returned. The default is - # `false`. - # @!attribute [rw] enable_word_confidence - # @return [::Boolean] - # If `true`, the top result includes a list of words and the - # confidence for those words. If `false`, no word-level confidence - # information is returned. The default is `false`. - # @!attribute [rw] enable_automatic_punctuation - # @return [::Boolean] - # If 'true', adds punctuation to recognition result hypotheses. - # This feature is only available in select languages. Setting this for - # requests in other languages has no effect at all. - # The default 'false' value does not add punctuation to result hypotheses. - # @!attribute [rw] enable_spoken_punctuation - # @return [::Google::Protobuf::BoolValue] - # The spoken punctuation behavior for the call - # If not set, uses default behavior based on model of choice - # e.g. command_and_search will enable spoken punctuation by default - # If 'true', replaces spoken punctuation with the corresponding symbols in - # the request. For example, "how are you question mark" becomes "how are - # you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation - # for support. If 'false', spoken punctuation is not replaced. - # @!attribute [rw] enable_spoken_emojis - # @return [::Google::Protobuf::BoolValue] - # The spoken emoji behavior for the call - # If not set, uses default behavior based on model of choice - # If 'true', adds spoken emoji formatting for the request. This will replace - # spoken emojis with the corresponding Unicode symbols in the final - # transcript. If 'false', spoken emojis are not replaced. - # @!attribute [rw] enable_speaker_diarization - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # If 'true', enables speaker detection for each recognized word in - # the top alternative of the recognition result using a speaker_label - # provided in the WordInfo. - # Note: Use diarization_config instead. - # @!attribute [rw] diarization_speaker_count - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # If set, specifies the estimated number of speakers in the conversation. - # Defaults to '2'. Ignored unless enable_speaker_diarization is set to true. - # Note: Use diarization_config instead. - # @!attribute [rw] diarization_config - # @return [::Google::Cloud::Speech::V1p1beta1::SpeakerDiarizationConfig] - # Config to enable speaker diarization and set additional - # parameters to make diarization better suited for your application. - # Note: When this is enabled, we send all the words from the beginning of the - # audio for the top alternative in every consecutive STREAMING responses. - # This is done in order to improve our speaker tags as our models learn to - # identify the speakers in the conversation over time. - # For non-streaming requests, the diarization results will be provided only - # in the top alternative of the FINAL SpeechRecognitionResult. - # @!attribute [rw] metadata - # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata] - # Metadata regarding this request. - # @!attribute [rw] model - # @return [::String] - # Which model to select for the given request. Select the model - # best suited to your domain to get best results. If a model is not - # explicitly specified, then we auto-select a model based on the parameters - # in the RecognitionConfig. - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - # - #
ModelDescription
latest_longBest for long form content like media or conversation.
latest_shortBest for short form content like commands or single shot directed - # speech.
command_and_searchBest for short queries such as voice commands or voice search.
phone_callBest for audio that originated from a phone call (typically - # recorded at an 8khz sampling rate).
videoBest for audio that originated from video or includes multiple - # speakers. Ideally the audio is recorded at a 16khz or greater - # sampling rate. This is a premium model that costs more than the - # standard rate.
defaultBest for audio that is not one of the specific audio models. - # For example, long-form audio. Ideally the audio is high-fidelity, - # recorded at a 16khz or greater sampling rate.
medical_conversationBest for audio that originated from a conversation between a - # medical provider and patient.
medical_dictationBest for audio that originated from dictation notes by a medical - # provider.
- # @!attribute [rw] use_enhanced - # @return [::Boolean] - # Set to true to use an enhanced model for speech recognition. - # If `use_enhanced` is set to true and the `model` field is not set, then - # an appropriate enhanced model is chosen if an enhanced model exists for - # the audio. - # - # If `use_enhanced` is true and an enhanced version of the specified model - # does not exist, then the speech is recognized using the standard version - # of the specified model. - class RecognitionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The encoding of the audio data sent in the request. - # - # All encodings support only 1 channel (mono) audio, unless the - # `audio_channel_count` and `enable_separate_recognition_per_channel` fields - # are set. - # - # For best results, the audio source should be captured and transmitted using - # a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech - # recognition can be reduced if lossy codecs are used to capture or transmit - # audio, particularly if background noise is present. Lossy codecs include - # `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`, - # and `WEBM_OPUS`. - # - # The `FLAC` and `WAV` audio file formats include a header that describes the - # included audio content. You can request recognition for `WAV` files that - # contain either `LINEAR16` or `MULAW` encoded audio. - # If you send `FLAC` or `WAV` audio file format in - # your request, you do not need to specify an `AudioEncoding`; the audio - # encoding format is determined from the file header. If you specify - # an `AudioEncoding` when you send send `FLAC` or `WAV` audio, the - # encoding configuration must match the encoding described in the audio - # header; otherwise the request returns an - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error - # code. - module AudioEncoding - # Not specified. - ENCODING_UNSPECIFIED = 0 - - # Uncompressed 16-bit signed little-endian samples (Linear PCM). - LINEAR16 = 1 - - # `FLAC` (Free Lossless Audio - # Codec) is the recommended encoding because it is - # lossless--therefore recognition is not compromised--and - # requires only about half the bandwidth of `LINEAR16`. `FLAC` stream - # encoding supports 16-bit and 24-bit samples, however, not all fields in - # `STREAMINFO` are supported. - FLAC = 2 - - # 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - MULAW = 3 - - # Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. - AMR = 4 - - # Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. - AMR_WB = 5 - - # Opus encoded audio frames in Ogg container - # ([OggOpus](https://wiki.xiph.org/OggOpus)). - # `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000. - OGG_OPUS = 6 - - # Although the use of lossy encodings is not recommended, if a very low - # bitrate encoding is required, `OGG_OPUS` is highly preferred over - # Speex encoding. The [Speex](https://speex.org/) encoding supported by - # Cloud Speech API has a header byte in each block, as in MIME type - # `audio/x-speex-with-header-byte`. - # It is a variant of the RTP Speex encoding defined in - # [RFC 5574](https://tools.ietf.org/html/rfc5574). - # The stream is a sequence of blocks, one block per RTP packet. Each block - # starts with a byte containing the length of the block, in bytes, followed - # by one or more frames of Speex data, padded to an integral number of - # bytes (octets) as specified in RFC 5574. In other words, each RTP header - # is replaced with a single byte containing the block length. Only Speex - # wideband is supported. `sample_rate_hertz` must be 16000. - SPEEX_WITH_HEADER_BYTE = 7 - - # MP3 audio. MP3 encoding is a Beta feature and only available in - # v1p1beta1. Support all standard MP3 bitrates (which range from 32-320 - # kbps). When using this encoding, `sample_rate_hertz` has to match the - # sample rate of the file being used. - MP3 = 8 - - # Opus encoded audio frames in WebM container - # ([WebM](https://www.webmproject.org/docs/container/)). - # `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000. - WEBM_OPUS = 9 - - # 8-bit samples that compand 13-bit audio samples using G.711 PCMU/a-law. - ALAW = 10 - end - end - - # Config to enable speaker diarization. - # @!attribute [rw] enable_speaker_diarization - # @return [::Boolean] - # If 'true', enables speaker detection for each recognized word in - # the top alternative of the recognition result using a speaker_label - # provided in the WordInfo. - # @!attribute [rw] min_speaker_count - # @return [::Integer] - # Minimum number of speakers in the conversation. This range gives you more - # flexibility by allowing the system to automatically determine the correct - # number of speakers. If not set, the default value is 2. - # @!attribute [rw] max_speaker_count - # @return [::Integer] - # Maximum number of speakers in the conversation. This range gives you more - # flexibility by allowing the system to automatically determine the correct - # number of speakers. If not set, the default value is 6. - # @!attribute [r] speaker_tag - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Output only. Unused. - class SpeakerDiarizationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Description of audio data to be recognized. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] interaction_type - # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::InteractionType] - # The use case most closely describing the audio content to be recognized. - # @!attribute [rw] industry_naics_code_of_audio - # @return [::Integer] - # The industry vertical to which this speech recognition request most - # closely applies. This is most indicative of the topics contained - # in the audio. Use the 6-digit NAICS code to identify the industry - # vertical - see https://www.naics.com/search/. - # @!attribute [rw] microphone_distance - # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::MicrophoneDistance] - # The audio type that most closely describes the audio being recognized. - # @!attribute [rw] original_media_type - # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::OriginalMediaType] - # The original media the speech was recorded on. - # @!attribute [rw] recording_device_type - # @return [::Google::Cloud::Speech::V1p1beta1::RecognitionMetadata::RecordingDeviceType] - # The type of device the speech was recorded with. - # @!attribute [rw] recording_device_name - # @return [::String] - # The device used to make the recording. Examples 'Nexus 5X' or - # 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or - # 'Cardioid Microphone'. - # @!attribute [rw] original_mime_type - # @return [::String] - # Mime type of the original audio file. For example `audio/m4a`, - # `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`. - # A list of possible audio mime types is maintained at - # http://www.iana.org/assignments/media-types/media-types.xhtml#audio - # @!attribute [rw] obfuscated_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Obfuscated (privacy-protected) ID of the user, to identify number of - # unique users using the service. - # @!attribute [rw] audio_topic - # @return [::String] - # Description of the content. Eg. "Recordings of federal supreme court - # hearings from 2012". - class RecognitionMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Use case categories that the audio recognition request can be described - # by. - module InteractionType - # Use case is either unknown or is something other than one of the other - # values below. - INTERACTION_TYPE_UNSPECIFIED = 0 - - # Multiple people in a conversation or discussion. For example in a - # meeting with two or more people actively participating. Typically - # all the primary people speaking would be in the same room (if not, - # see PHONE_CALL) - DISCUSSION = 1 - - # One or more persons lecturing or presenting to others, mostly - # uninterrupted. - PRESENTATION = 2 - - # A phone-call or video-conference in which two or more people, who are - # not in the same room, are actively participating. - PHONE_CALL = 3 - - # A recorded message intended for another person to listen to. - VOICEMAIL = 4 - - # Professionally produced audio (eg. TV Show, Podcast). - PROFESSIONALLY_PRODUCED = 5 - - # Transcribe spoken questions and queries into text. - VOICE_SEARCH = 6 - - # Transcribe voice commands, such as for controlling a device. - VOICE_COMMAND = 7 - - # Transcribe speech to text to create a written document, such as a - # text-message, email or report. - DICTATION = 8 - end - - # Enumerates the types of capture settings describing an audio file. - module MicrophoneDistance - # Audio type is not known. - MICROPHONE_DISTANCE_UNSPECIFIED = 0 - - # The audio was captured from a closely placed microphone. Eg. phone, - # dictaphone, or handheld microphone. Generally if there speaker is within - # 1 meter of the microphone. - NEARFIELD = 1 - - # The speaker if within 3 meters of the microphone. - MIDFIELD = 2 - - # The speaker is more than 3 meters away from the microphone. - FARFIELD = 3 - end - - # The original media the speech was recorded on. - module OriginalMediaType - # Unknown original media type. - ORIGINAL_MEDIA_TYPE_UNSPECIFIED = 0 - - # The speech data is an audio recording. - AUDIO = 1 - - # The speech data originally recorded on a video. - VIDEO = 2 - end - - # The type of device the speech was recorded with. - module RecordingDeviceType - # The recording device is unknown. - RECORDING_DEVICE_TYPE_UNSPECIFIED = 0 - - # Speech was recorded on a smartphone. - SMARTPHONE = 1 - - # Speech was recorded using a personal computer or tablet. - PC = 2 - - # Speech was recorded over a phone line. - PHONE_LINE = 3 - - # Speech was recorded in a vehicle. - VEHICLE = 4 - - # Speech was recorded outdoors. - OTHER_OUTDOOR_DEVICE = 5 - - # Speech was recorded indoors. - OTHER_INDOOR_DEVICE = 6 - end - end - - # Provides "hints" to the speech recognizer to favor specific words and phrases - # in the results. - # @!attribute [rw] phrases - # @return [::Array<::String>] - # A list of strings containing words and phrases "hints" so that - # the speech recognition is more likely to recognize them. This can be used - # to improve the accuracy for specific words and phrases, for example, if - # specific commands are typically spoken by the user. This can also be used - # to add additional words to the vocabulary of the recognizer. See - # [usage limits](https://cloud.google.com/speech-to-text/quotas#content). - # - # List items can also be set to classes for groups of words that represent - # common concepts that occur in natural language. For example, rather than - # providing phrase hints for every month of the year, using the $MONTH class - # improves the likelihood of correctly transcribing audio that includes - # months. - # @!attribute [rw] boost - # @return [::Float] - # Hint Boost. Positive value will increase the probability that a specific - # phrase will be recognized over other similar sounding phrases. The higher - # the boost, the higher the chance of false positive recognition as well. - # Negative boost values would correspond to anti-biasing. Anti-biasing is not - # enabled, so negative boost will simply be ignored. Though `boost` can - # accept a wide range of positive values, most use cases are best served with - # values between 0 and 20. We recommend using a binary search approach to - # finding the optimal value for your use case. - class SpeechContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains audio data in the encoding specified in the `RecognitionConfig`. - # Either `content` or `uri` must be supplied. Supplying both or neither - # returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - # See [content limits](https://cloud.google.com/speech-to-text/quotas#content). - # @!attribute [rw] content - # @return [::String] - # The audio data bytes encoded as specified in - # `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a - # pure binary representation, whereas JSON representations use base64. - # - # Note: The following fields are mutually exclusive: `content`, `uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] uri - # @return [::String] - # URI that points to a file that contains audio data bytes as specified in - # `RecognitionConfig`. The file must not be compressed (for example, gzip). - # Currently, only Google Cloud Storage URIs are - # supported, which must be specified in the following format: - # `gs://bucket_name/object_name` (other URI formats return - # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). - # For more information, see [Request - # URIs](https://cloud.google.com/storage/docs/reference-uris). - # - # Note: The following fields are mutually exclusive: `uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class RecognitionAudio - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The only message returned to the client by the `Recognize` method. It - # contains the result as zero or more sequential `SpeechRecognitionResult` - # messages. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionResult>] - # Sequential list of transcription results corresponding to - # sequential portions of audio. - # @!attribute [rw] total_billed_time - # @return [::Google::Protobuf::Duration] - # When available, billed audio seconds for the corresponding request. - # @!attribute [rw] speech_adaptation_info - # @return [::Google::Cloud::Speech::V1p1beta1::SpeechAdaptationInfo] - # Provides information on adaptation behavior in response - # @!attribute [rw] request_id - # @return [::Integer] - # The ID associated with the request. This is a unique ID specific only to - # the given request. - # @!attribute [rw] using_legacy_models - # @return [::Boolean] - # Whether request used legacy asr models (was not automatically migrated to - # use conformer models). - class RecognizeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The only message returned to the client by the `LongRunningRecognize` method. - # It contains the result as zero or more sequential `SpeechRecognitionResult` - # messages. It is included in the `result.response` field of the `Operation` - # returned by the `GetOperation` call of the `google::longrunning::Operations` - # service. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionResult>] - # Sequential list of transcription results corresponding to - # sequential portions of audio. - # @!attribute [rw] total_billed_time - # @return [::Google::Protobuf::Duration] - # When available, billed audio seconds for the corresponding request. - # @!attribute [rw] output_config - # @return [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig] - # Original output config if present in the request. - # @!attribute [rw] output_error - # @return [::Google::Rpc::Status] - # If the transcript output fails this field contains the relevant error. - # @!attribute [rw] speech_adaptation_info - # @return [::Google::Cloud::Speech::V1p1beta1::SpeechAdaptationInfo] - # Provides information on speech adaptation behavior in response - # @!attribute [rw] request_id - # @return [::Integer] - # The ID associated with the request. This is a unique ID specific only to - # the given request. - class LongRunningRecognizeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the progress of a long-running `LongRunningRecognize` call. It is - # included in the `metadata` field of the `Operation` returned by the - # `GetOperation` call of the `google::longrunning::Operations` service. - # @!attribute [rw] progress_percent - # @return [::Integer] - # Approximate percentage of audio processed thus far. Guaranteed to be 100 - # when the audio is fully processed and the results are available. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Time when the request was received. - # @!attribute [rw] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Time of the most recent processing update. - # @!attribute [r] uri - # @return [::String] - # Output only. The URI of the audio file being transcribed. Empty if the - # audio was sent as byte content. - # @!attribute [r] output_config - # @return [::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig] - # Output only. A copy of the TranscriptOutputConfig if it was set in the - # request. - class LongRunningRecognizeMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StreamingRecognizeResponse` is the only message returned to the client by - # `StreamingRecognize`. A series of zero or more `StreamingRecognizeResponse` - # messages are streamed back to the client. If there is no recognizable - # audio, and `single_utterance` is set to false, then no messages are streamed - # back to the client. - # - # Here's an example of a series of `StreamingRecognizeResponse`s that might be - # returned while processing audio: - # - # 1. results { alternatives { transcript: "tube" } stability: 0.01 } - # - # 2. results { alternatives { transcript: "to be a" } stability: 0.01 } - # - # 3. results { alternatives { transcript: "to be" } stability: 0.9 } - # results { alternatives { transcript: " or not to be" } stability: 0.01 } - # - # 4. results { alternatives { transcript: "to be or not to be" - # confidence: 0.92 } - # alternatives { transcript: "to bee or not to bee" } - # is_final: true } - # - # 5. results { alternatives { transcript: " that's" } stability: 0.01 } - # - # 6. results { alternatives { transcript: " that is" } stability: 0.9 } - # results { alternatives { transcript: " the question" } stability: 0.01 } - # - # 7. results { alternatives { transcript: " that is the question" - # confidence: 0.98 } - # alternatives { transcript: " that was the question" } - # is_final: true } - # - # Notes: - # - # - Only two of the above responses #4 and #7 contain final results; they are - # indicated by `is_final: true`. Concatenating these together generates the - # full transcript: "to be or not to be that is the question". - # - # - The others contain interim `results`. #3 and #6 contain two interim - # `results`: the first portion has a high stability and is less likely to - # change; the second portion has a low stability and is very likely to - # change. A UI designer might choose to show only high stability `results`. - # - # - The specific `stability` and `confidence` values shown above are only for - # illustrative purposes. Actual values may vary. - # - # - In each response, only one of these fields will be set: - # `error`, - # `speech_event_type`, or - # one or more (repeated) `results`. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # If set, returns a {::Google::Rpc::Status google.rpc.Status} message that - # specifies the error for the operation. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::StreamingRecognitionResult>] - # This repeated list contains zero or more results that - # correspond to consecutive portions of the audio currently being processed. - # It contains zero or one `is_final=true` result (the newly settled portion), - # followed by zero or more `is_final=false` results (the interim results). - # @!attribute [rw] speech_event_type - # @return [::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse::SpeechEventType] - # Indicates the type of speech event. - # @!attribute [rw] speech_event_time - # @return [::Google::Protobuf::Duration] - # Time offset between the beginning of the audio and event emission. - # @!attribute [rw] total_billed_time - # @return [::Google::Protobuf::Duration] - # When available, billed audio seconds for the stream. - # Set only if this is the last response in the stream. - # @!attribute [rw] speech_adaptation_info - # @return [::Google::Cloud::Speech::V1p1beta1::SpeechAdaptationInfo] - # Provides information on adaptation behavior in response - # @!attribute [rw] request_id - # @return [::Integer] - # The ID associated with the request. This is a unique ID specific only to - # the given request. - class StreamingRecognizeResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates the type of speech event. - module SpeechEventType - # No speech event specified. - SPEECH_EVENT_UNSPECIFIED = 0 - - # This event indicates that the server has detected the end of the user's - # speech utterance and expects no additional speech. Therefore, the server - # will not process additional audio (although it may subsequently return - # additional results). The client should stop sending additional audio - # data, half-close the gRPC connection, and wait for any additional results - # until the server closes the gRPC connection. This event is only sent if - # `single_utterance` was set to `true`, and is not used otherwise. - END_OF_SINGLE_UTTERANCE = 1 - - # This event indicates that the server has detected the beginning of human - # voice activity in the stream. This event can be returned multiple times - # if speech starts and stops repeatedly throughout the stream. This event - # is only sent if `voice_activity_events` is set to true. - SPEECH_ACTIVITY_BEGIN = 2 - - # This event indicates that the server has detected the end of human voice - # activity in the stream. This event can be returned multiple times if - # speech starts and stops repeatedly throughout the stream. This event is - # only sent if `voice_activity_events` is set to true. - SPEECH_ACTIVITY_END = 3 - - # This event indicates that the user-set timeout for speech activity begin - # or end has exceeded. Upon receiving this event, the client is expected to - # send a half close. Further audio will not be processed. - SPEECH_ACTIVITY_TIMEOUT = 4 - end - end - - # A streaming speech recognition result corresponding to a portion of the audio - # that is currently being processed. - # @!attribute [rw] alternatives - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionAlternative>] - # May contain one or more recognition hypotheses (up to the - # maximum specified in `max_alternatives`). - # These alternatives are ordered in terms of accuracy, with the top (first) - # alternative being the most probable, as ranked by the recognizer. - # @!attribute [rw] is_final - # @return [::Boolean] - # If `false`, this `StreamingRecognitionResult` represents an - # interim result that may change. If `true`, this is the final time the - # speech service will return this particular `StreamingRecognitionResult`, - # the recognizer will not return any further hypotheses for this portion of - # the transcript and corresponding audio. - # @!attribute [rw] stability - # @return [::Float] - # An estimate of the likelihood that the recognizer will not - # change its guess about this interim result. Values range from 0.0 - # (completely unstable) to 1.0 (completely stable). - # This field is only provided for interim results (`is_final=false`). - # The default of 0.0 is a sentinel value indicating `stability` was not set. - # @!attribute [rw] result_end_time - # @return [::Google::Protobuf::Duration] - # Time offset of the end of this result relative to the - # beginning of the audio. - # @!attribute [rw] channel_tag - # @return [::Integer] - # For multi-channel audio, this is the channel number corresponding to the - # recognized result for the audio from that channel. - # For audio_channel_count = N, its output values can range from '1' to 'N'. - # @!attribute [r] language_code - # @return [::String] - # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - # language tag of the language in this result. This language code was - # detected to have the most likelihood of being spoken in the audio. - class StreamingRecognitionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A speech recognition result corresponding to a portion of the audio. - # @!attribute [rw] alternatives - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::SpeechRecognitionAlternative>] - # May contain one or more recognition hypotheses (up to the - # maximum specified in `max_alternatives`). - # These alternatives are ordered in terms of accuracy, with the top (first) - # alternative being the most probable, as ranked by the recognizer. - # @!attribute [rw] channel_tag - # @return [::Integer] - # For multi-channel audio, this is the channel number corresponding to the - # recognized result for the audio from that channel. - # For audio_channel_count = N, its output values can range from '1' to 'N'. - # @!attribute [rw] result_end_time - # @return [::Google::Protobuf::Duration] - # Time offset of the end of this result relative to the - # beginning of the audio. - # @!attribute [r] language_code - # @return [::String] - # Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - # language tag of the language in this result. This language code was - # detected to have the most likelihood of being spoken in the audio. - class SpeechRecognitionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Alternative hypotheses (a.k.a. n-best list). - # @!attribute [rw] transcript - # @return [::String] - # Transcript text representing the words that the user spoke. - # In languages that use spaces to separate words, the transcript might have a - # leading space if it isn't the first result. You can concatenate each result - # to obtain the full transcript without using a separator. - # @!attribute [rw] confidence - # @return [::Float] - # The confidence estimate between 0.0 and 1.0. A higher number - # indicates an estimated greater likelihood that the recognized words are - # correct. This field is set only for the top alternative of a non-streaming - # result or, of a streaming result where `is_final=true`. - # This field is not guaranteed to be accurate and users should not rely on it - # to be always provided. - # The default of 0.0 is a sentinel value indicating `confidence` was not set. - # @!attribute [rw] words - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::WordInfo>] - # A list of word-specific information for each recognized word. - # Note: When `enable_speaker_diarization` is true, you will see all the words - # from the beginning of the audio. - class SpeechRecognitionAlternative - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Word-specific information for recognized words. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Duration] - # Time offset relative to the beginning of the audio, - # and corresponding to the start of the spoken word. - # This field is only set if `enable_word_time_offsets=true` and only - # in the top hypothesis. - # This is an experimental feature and the accuracy of the time offset can - # vary. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Duration] - # Time offset relative to the beginning of the audio, - # and corresponding to the end of the spoken word. - # This field is only set if `enable_word_time_offsets=true` and only - # in the top hypothesis. - # This is an experimental feature and the accuracy of the time offset can - # vary. - # @!attribute [rw] word - # @return [::String] - # The word corresponding to this set of information. - # @!attribute [rw] confidence - # @return [::Float] - # The confidence estimate between 0.0 and 1.0. A higher number - # indicates an estimated greater likelihood that the recognized words are - # correct. This field is set only for the top alternative of a non-streaming - # result or, of a streaming result where `is_final=true`. - # This field is not guaranteed to be accurate and users should not rely on it - # to be always provided. - # The default of 0.0 is a sentinel value indicating `confidence` was not set. - # @!attribute [r] speaker_tag - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Output only. A distinct integer value is assigned for every speaker within - # the audio. This field specifies which one of those speakers was detected to - # have spoken this word. Value ranges from '1' to diarization_speaker_count. - # speaker_tag is set if enable_speaker_diarization = 'true' and only for the - # top alternative. - # Note: Use speaker_label instead. - # @!attribute [r] speaker_label - # @return [::String] - # Output only. A label value assigned for every unique speaker within the - # audio. This field specifies which speaker was detected to have spoken this - # word. For some models, like medical_conversation this can be actual speaker - # role, for example "patient" or "provider", but generally this would be a - # number identifying a speaker. This field is only set if - # enable_speaker_diarization = 'true' and only for the top alternative. - class WordInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information on speech adaptation use in results - # @!attribute [rw] adaptation_timeout - # @return [::Boolean] - # Whether there was a timeout when applying speech adaptation. If true, - # adaptation had no effect in the response transcript. - # @!attribute [rw] timeout_message - # @return [::String] - # If set, returns a message specifying which part of the speech adaptation - # request timed out. - class SpeechAdaptationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb deleted file mode 100644 index 9d33bec8a1dd..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.rb +++ /dev/null @@ -1,270 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Speech - module V1p1beta1 - # Message sent by the client for the `CreatePhraseSet` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this phrase set will be created. - # Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] phrase_set_id - # @return [::String] - # Required. The ID to use for the phrase set, which will become the final - # component of the phrase set's resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @!attribute [rw] phrase_set - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # Required. The phrase set to create. - class CreatePhraseSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `UpdatePhraseSet` method. - # @!attribute [rw] phrase_set - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet] - # Required. The phrase set to update. - # - # The phrase set's `name` field is used to identify the set to be - # updated. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - class UpdatePhraseSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `GetPhraseSet` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the phrase set to retrieve. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - class GetPhraseSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `ListPhraseSet` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of phrase set. Format: - # - # `projects/{project}/locations/{location}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of phrase sets to return. The service may return - # fewer than this value. If unspecified, at most 50 phrase sets will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListPhraseSet` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListPhraseSet` must - # match the call that provided the page token. - class ListPhraseSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message returned to the client by the `ListPhraseSet` method. - # @!attribute [rw] phrase_sets - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] - # The phrase set. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListPhraseSetResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `DeletePhraseSet` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the phrase set to delete. Format: - # - # `projects/{project}/locations/{location}/phraseSets/{phrase_set}` - class DeletePhraseSetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `CreateCustomClass` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this custom class will be created. - # Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] custom_class_id - # @return [::String] - # Required. The ID to use for the custom class, which will become the final - # component of the custom class' resource name. - # - # This value should restrict to letters, numbers, and hyphens, with the first - # character a letter, the last a letter or a number, and be 4-63 characters. - # @!attribute [rw] custom_class - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # Required. The custom class to create. - class CreateCustomClassRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `UpdateCustomClass` method. - # @!attribute [rw] custom_class - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass] - # Required. The custom class to update. - # - # The custom class's `name` field is used to identify the custom class to be - # updated. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - class UpdateCustomClassRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `GetCustomClass` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the custom class to retrieve. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - class GetCustomClassRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `ListCustomClasses` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of custom classes. Format: - # - # `projects/{project}/locations/{location}/customClasses` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of custom classes to return. The service may return - # fewer than this value. If unspecified, at most 50 custom classes will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListCustomClass` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListCustomClass` must - # match the call that provided the page token. - class ListCustomClassesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message returned to the client by the `ListCustomClasses` method. - # @!attribute [rw] custom_classes - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::CustomClass>] - # The custom classes. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListCustomClassesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message sent by the client for the `DeleteCustomClass` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the custom class to delete. Format: - # - # `projects/{project}/locations/{location}/customClasses/{custom_class}` - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - class DeleteCustomClassRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.rb deleted file mode 100644 index 09887768ca8a..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/cloud/speech/v1p1beta1/resource.rb +++ /dev/null @@ -1,325 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Speech - module V1p1beta1 - # A set of words or phrases that represents a common concept likely to appear - # in your audio, for example a list of passenger ship names. CustomClass items - # can be substituted into placeholders that you set in PhraseSet phrases. - # @!attribute [rw] name - # @return [::String] - # The resource name of the custom class. - # @!attribute [rw] custom_class_id - # @return [::String] - # If this custom class is a resource, the custom_class_id is the resource id - # of the CustomClass. Case sensitive. - # @!attribute [rw] items - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::CustomClass::ClassItem>] - # A collection of class items. - # @!attribute [r] kms_key_name - # @return [::String] - # Output only. The [KMS key - # name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which - # the content of the ClassItem is encrypted. The expected format is - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - # @!attribute [r] kms_key_version_name - # @return [::String] - # Output only. The [KMS key version - # name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) - # with which content of the ClassItem is encrypted. The expected format is - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`. - # @!attribute [r] uid - # @return [::String] - # Output only. System-assigned unique identifier for the CustomClass. - # This field is not used. - # @!attribute [r] display_name - # @return [::String] - # Output only. User-settable, human-readable name for the CustomClass. Must - # be 63 characters or less. This field is not used. - # @!attribute [r] state - # @return [::Google::Cloud::Speech::V1p1beta1::CustomClass::State] - # Output only. The CustomClass lifecycle state. - # This field is not used. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this resource was requested for deletion. - # This field is not used. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this resource will be purged. - # This field is not used. - # @!attribute [r] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. Allows users to store small amounts of arbitrary data. - # Both the key and the value must be 63 characters or less each. - # At most 100 annotations. - # This field is not used. - # @!attribute [r] etag - # @return [::String] - # Output only. This checksum is computed by the server based on the value of - # other fields. This may be sent on update, undelete, and delete requests to - # ensure the client has an up-to-date value before proceeding. This field is - # not used. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Whether or not this CustomClass is in the process of being - # updated. This field is not used. - class CustomClass - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An item of the class. - # @!attribute [rw] value - # @return [::String] - # The class item's value. - class ClassItem - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Set of states that define the lifecycle of a CustomClass. - module State - # Unspecified state. This is only used/useful for distinguishing - # unset values. - STATE_UNSPECIFIED = 0 - - # The normal and active state. - ACTIVE = 2 - - # This CustomClass has been deleted. - DELETED = 4 - end - end - - # Provides "hints" to the speech recognizer to favor specific words and phrases - # in the results. - # @!attribute [rw] name - # @return [::String] - # The resource name of the phrase set. - # @!attribute [rw] phrases - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::PhraseSet::Phrase>] - # A list of word and phrases. - # @!attribute [rw] boost - # @return [::Float] - # Hint Boost. Positive value will increase the probability that a specific - # phrase will be recognized over other similar sounding phrases. The higher - # the boost, the higher the chance of false positive recognition as well. - # Negative boost values would correspond to anti-biasing. Anti-biasing is not - # enabled, so negative boost will simply be ignored. Though `boost` can - # accept a wide range of positive values, most use cases are best served with - # values between 0 (exclusive) and 20. We recommend using a binary search - # approach to finding the optimal value for your use case as well as adding - # phrases both with and without boost to your requests. - # @!attribute [r] kms_key_name - # @return [::String] - # Output only. The [KMS key - # name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which - # the content of the PhraseSet is encrypted. The expected format is - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - # @!attribute [r] kms_key_version_name - # @return [::String] - # Output only. The [KMS key version - # name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) - # with which content of the PhraseSet is encrypted. The expected format is - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`. - # @!attribute [r] uid - # @return [::String] - # Output only. System-assigned unique identifier for the PhraseSet. - # This field is not used. - # @!attribute [r] display_name - # @return [::String] - # Output only. User-settable, human-readable name for the PhraseSet. Must be - # 63 characters or less. This field is not used. - # @!attribute [r] state - # @return [::Google::Cloud::Speech::V1p1beta1::PhraseSet::State] - # Output only. The CustomClass lifecycle state. - # This field is not used. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this resource was requested for deletion. - # This field is not used. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this resource will be purged. - # This field is not used. - # @!attribute [r] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. Allows users to store small amounts of arbitrary data. - # Both the key and the value must be 63 characters or less each. - # At most 100 annotations. - # This field is not used. - # @!attribute [r] etag - # @return [::String] - # Output only. This checksum is computed by the server based on the value of - # other fields. This may be sent on update, undelete, and delete requests to - # ensure the client has an up-to-date value before proceeding. This field is - # not used. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Whether or not this PhraseSet is in the process of being - # updated. This field is not used. - class PhraseSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A phrases containing words and phrase "hints" so that - # the speech recognition is more likely to recognize them. This can be used - # to improve the accuracy for specific words and phrases, for example, if - # specific commands are typically spoken by the user. This can also be used - # to add additional words to the vocabulary of the recognizer. See - # [usage limits](https://cloud.google.com/speech-to-text/quotas#content). - # - # List items can also include pre-built or custom classes containing groups - # of words that represent common concepts that occur in natural language. For - # example, rather than providing a phrase hint for every month of the - # year (e.g. "i was born in january", "i was born in febuary", ...), use the - # pre-built `$MONTH` class improves the likelihood of correctly transcribing - # audio that includes months (e.g. "i was born in $month"). - # To refer to pre-built classes, use the class' symbol prepended with `$` - # e.g. `$MONTH`. To refer to custom classes that were defined inline in the - # request, set the class's `custom_class_id` to a string unique to all class - # resources and inline classes. Then use the class' id wrapped in $`{...}` - # e.g. "$\\{my-months}". To refer to custom classes resources, use the class' - # id wrapped in `${}` (e.g. `${my-months}`). - # - # Speech-to-Text supports three locations: `global`, `us` (US North America), - # and `eu` (Europe). If you are calling the `speech.googleapis.com` - # endpoint, use the `global` location. To specify a region, use a - # [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) - # with matching `us` or `eu` location value. - # @!attribute [rw] value - # @return [::String] - # The phrase itself. - # @!attribute [rw] boost - # @return [::Float] - # Hint Boost. Overrides the boost set at the phrase set level. - # Positive value will increase the probability that a specific phrase will - # be recognized over other similar sounding phrases. The higher the boost, - # the higher the chance of false positive recognition as well. Negative - # boost will simply be ignored. Though `boost` can accept a wide range of - # positive values, most use cases are best served - # with values between 0 and 20. We recommend using a binary search approach - # to finding the optimal value for your use case as well as adding - # phrases both with and without boost to your requests. - class Phrase - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Set of states that define the lifecycle of a CustomClass. - module State - # Unspecified state. This is only used/useful for distinguishing - # unset values. - STATE_UNSPECIFIED = 0 - - # The normal and active state. - ACTIVE = 2 - - # This CustomClass has been deleted. - DELETED = 4 - end - end - - # Speech adaptation configuration. - # @!attribute [rw] phrase_sets - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::PhraseSet>] - # A collection of phrase sets. To specify the hints inline, leave the - # phrase set's `name` blank and fill in the rest of its fields. Any - # phrase set can use any custom class. - # @!attribute [rw] phrase_set_references - # @return [::Array<::String>] - # A collection of phrase set resource names to use. - # @!attribute [rw] custom_classes - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::CustomClass>] - # A collection of custom classes. To specify the classes inline, leave the - # class' `name` blank and fill in the rest of its fields, giving it a unique - # `custom_class_id`. Refer to the inline defined class in phrase hints by its - # `custom_class_id`. - # @!attribute [rw] abnf_grammar - # @return [::Google::Cloud::Speech::V1p1beta1::SpeechAdaptation::ABNFGrammar] - # Augmented Backus-Naur form (ABNF) is a standardized grammar notation - # comprised by a set of derivation rules. - # See specifications: https://www.w3.org/TR/speech-grammar - class SpeechAdaptation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] abnf_strings - # @return [::Array<::String>] - # All declarations and rules of an ABNF grammar broken up into multiple - # strings that will end up concatenated. - class ABNFGrammar - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Transcription normalization configuration. Use transcription normalization - # to automatically replace parts of the transcript with phrases of your - # choosing. For StreamingRecognize, this normalization only applies to stable - # partial transcripts (stability > 0.8) and final transcripts. - # @!attribute [rw] entries - # @return [::Array<::Google::Cloud::Speech::V1p1beta1::TranscriptNormalization::Entry>] - # A list of replacement entries. We will perform replacement with one entry - # at a time. For example, the second entry in ["cat" => "dog", "mountain cat" - # => "mountain dog"] will never be applied because we will always process the - # first entry before it. At most 100 entries. - class TranscriptNormalization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A single replacement configuration. - # @!attribute [rw] search - # @return [::String] - # What to replace. Max length is 100 characters. - # @!attribute [rw] replace - # @return [::String] - # What to replace with. Max length is 100 characters. - # @!attribute [rw] case_sensitive - # @return [::Boolean] - # Whether the search is case sensitive. - class Entry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/Gemfile deleted file mode 100644 index 4acec445659b..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-speech-v1p1beta1", path: "../" -else - gem "google-cloud-speech-v1p1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_custom_class.rb deleted file mode 100644 index 5c73bb5dd521..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_custom_class.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Adaptation_CreateCustomClass_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the create_custom_class call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_custom_class. -# -def create_custom_class - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new - - # Call the create_custom_class method. - result = client.create_custom_class request - - # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. - p result -end -# [END speech_v1p1beta1_generated_Adaptation_CreateCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_phrase_set.rb deleted file mode 100644 index 7d85b9d76fde..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/create_phrase_set.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Adaptation_CreatePhraseSet_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the create_phrase_set call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_phrase_set. -# -def create_phrase_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new - - # Call the create_phrase_set method. - result = client.create_phrase_set request - - # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. - p result -end -# [END speech_v1p1beta1_generated_Adaptation_CreatePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_custom_class.rb deleted file mode 100644 index 4093e3e479b3..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_custom_class.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Adaptation_DeleteCustomClass_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the delete_custom_class call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_custom_class. -# -def delete_custom_class - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new - - # Call the delete_custom_class method. - result = client.delete_custom_class request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END speech_v1p1beta1_generated_Adaptation_DeleteCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.rb deleted file mode 100644 index 742847acd058..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/delete_phrase_set.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Adaptation_DeletePhraseSet_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the delete_phrase_set call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_phrase_set. -# -def delete_phrase_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new - - # Call the delete_phrase_set method. - result = client.delete_phrase_set request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END speech_v1p1beta1_generated_Adaptation_DeletePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_custom_class.rb deleted file mode 100644 index 67374d53dcb0..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_custom_class.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Adaptation_GetCustomClass_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the get_custom_class call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_custom_class. -# -def get_custom_class - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new - - # Call the get_custom_class method. - result = client.get_custom_class request - - # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. - p result -end -# [END speech_v1p1beta1_generated_Adaptation_GetCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_phrase_set.rb deleted file mode 100644 index 292ba87e414c..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/get_phrase_set.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Adaptation_GetPhraseSet_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the get_phrase_set call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_phrase_set. -# -def get_phrase_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new - - # Call the get_phrase_set method. - result = client.get_phrase_set request - - # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. - p result -end -# [END speech_v1p1beta1_generated_Adaptation_GetPhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_custom_classes.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_custom_classes.rb deleted file mode 100644 index 0bc4f30f6be8..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_custom_classes.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Adaptation_ListCustomClasses_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the list_custom_classes call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_custom_classes. -# -def list_custom_classes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new - - # Call the list_custom_classes method. - result = client.list_custom_classes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Speech::V1p1beta1::CustomClass. - p item - end -end -# [END speech_v1p1beta1_generated_Adaptation_ListCustomClasses_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_phrase_set.rb deleted file mode 100644 index 6ad4f5cc6487..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/list_phrase_set.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Adaptation_ListPhraseSet_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the list_phrase_set call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_phrase_set. -# -def list_phrase_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new - - # Call the list_phrase_set method. - result = client.list_phrase_set request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Speech::V1p1beta1::PhraseSet. - p item - end -end -# [END speech_v1p1beta1_generated_Adaptation_ListPhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_custom_class.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_custom_class.rb deleted file mode 100644 index 6cf5ff2deb0c..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_custom_class.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Adaptation_UpdateCustomClass_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the update_custom_class call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_custom_class. -# -def update_custom_class - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new - - # Call the update_custom_class method. - result = client.update_custom_class request - - # The returned object is of type Google::Cloud::Speech::V1p1beta1::CustomClass. - p result -end -# [END speech_v1p1beta1_generated_Adaptation_UpdateCustomClass_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_phrase_set.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_phrase_set.rb deleted file mode 100644 index 4b35a1ba1fff..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/adaptation/update_phrase_set.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Adaptation_UpdatePhraseSet_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the update_phrase_set call in the Adaptation service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_phrase_set. -# -def update_phrase_set - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new - - # Call the update_phrase_set method. - result = client.update_phrase_set request - - # The returned object is of type Google::Cloud::Speech::V1p1beta1::PhraseSet. - p result -end -# [END speech_v1p1beta1_generated_Adaptation_UpdatePhraseSet_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/snippet_metadata_google.cloud.speech.v1p1beta1.json b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/snippet_metadata_google.cloud.speech.v1p1beta1.json deleted file mode 100644 index ab7bf03ae9a7..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/snippet_metadata_google.cloud.speech.v1p1beta1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-speech-v1p1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.speech.v1p1beta1", - "version": "v1p1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "speech_v1p1beta1_generated_Speech_Recognize_sync", - "title": "Snippet for the recognize call in the Speech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Speech::Client#recognize.", - "file": "speech/recognize.rb", - "language": "RUBY", - "client_method": { - "short_name": "recognize", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client#recognize", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::RecognizeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1p1beta1::RecognizeResponse", - "client": { - "short_name": "Speech::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client" - }, - "method": { - "short_name": "Recognize", - "full_name": "google.cloud.speech.v1p1beta1.Speech.Recognize", - "service": { - "short_name": "Speech", - "full_name": "google.cloud.speech.v1p1beta1.Speech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Speech_LongRunningRecognize_sync", - "title": "Snippet for the long_running_recognize call in the Speech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Speech::Client#long_running_recognize.", - "file": "speech/long_running_recognize.rb", - "language": "RUBY", - "client_method": { - "short_name": "long_running_recognize", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client#long_running_recognize", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Speech::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client" - }, - "method": { - "short_name": "LongRunningRecognize", - "full_name": "google.cloud.speech.v1p1beta1.Speech.LongRunningRecognize", - "service": { - "short_name": "Speech", - "full_name": "google.cloud.speech.v1p1beta1.Speech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Speech_StreamingRecognize_sync", - "title": "Snippet for the streaming_recognize call in the Speech service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Speech::Client#streaming_recognize.", - "file": "speech/streaming_recognize.rb", - "language": "RUBY", - "client_method": { - "short_name": "streaming_recognize", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client#streaming_recognize", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse", - "client": { - "short_name": "Speech::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Speech::Client" - }, - "method": { - "short_name": "StreamingRecognize", - "full_name": "google.cloud.speech.v1p1beta1.Speech.StreamingRecognize", - "service": { - "short_name": "Speech", - "full_name": "google.cloud.speech.v1p1beta1.Speech" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 55, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Adaptation_CreatePhraseSet_sync", - "title": "Snippet for the create_phrase_set call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_phrase_set.", - "file": "adaptation/create_phrase_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_phrase_set", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_phrase_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1p1beta1::PhraseSet", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" - }, - "method": { - "short_name": "CreatePhraseSet", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation.CreatePhraseSet", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Adaptation_GetPhraseSet_sync", - "title": "Snippet for the get_phrase_set call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_phrase_set.", - "file": "adaptation/get_phrase_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_phrase_set", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_phrase_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1p1beta1::PhraseSet", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" - }, - "method": { - "short_name": "GetPhraseSet", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation.GetPhraseSet", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Adaptation_ListPhraseSet_sync", - "title": "Snippet for the list_phrase_set call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_phrase_set.", - "file": "adaptation/list_phrase_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_phrase_set", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_phrase_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" - }, - "method": { - "short_name": "ListPhraseSet", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation.ListPhraseSet", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Adaptation_UpdatePhraseSet_sync", - "title": "Snippet for the update_phrase_set call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_phrase_set.", - "file": "adaptation/update_phrase_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_phrase_set", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_phrase_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1p1beta1::PhraseSet", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" - }, - "method": { - "short_name": "UpdatePhraseSet", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation.UpdatePhraseSet", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Adaptation_DeletePhraseSet_sync", - "title": "Snippet for the delete_phrase_set call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_phrase_set.", - "file": "adaptation/delete_phrase_set.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_phrase_set", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_phrase_set", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" - }, - "method": { - "short_name": "DeletePhraseSet", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation.DeletePhraseSet", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Adaptation_CreateCustomClass_sync", - "title": "Snippet for the create_custom_class call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_custom_class.", - "file": "adaptation/create_custom_class.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_custom_class", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#create_custom_class", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1p1beta1::CustomClass", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" - }, - "method": { - "short_name": "CreateCustomClass", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation.CreateCustomClass", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Adaptation_GetCustomClass_sync", - "title": "Snippet for the get_custom_class call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_custom_class.", - "file": "adaptation/get_custom_class.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_custom_class", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#get_custom_class", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1p1beta1::CustomClass", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" - }, - "method": { - "short_name": "GetCustomClass", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation.GetCustomClass", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Adaptation_ListCustomClasses_sync", - "title": "Snippet for the list_custom_classes call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_custom_classes.", - "file": "adaptation/list_custom_classes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_custom_classes", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#list_custom_classes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" - }, - "method": { - "short_name": "ListCustomClasses", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation.ListCustomClasses", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Adaptation_UpdateCustomClass_sync", - "title": "Snippet for the update_custom_class call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_custom_class.", - "file": "adaptation/update_custom_class.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_custom_class", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#update_custom_class", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Speech::V1p1beta1::CustomClass", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" - }, - "method": { - "short_name": "UpdateCustomClass", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation.UpdateCustomClass", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "speech_v1p1beta1_generated_Adaptation_DeleteCustomClass_sync", - "title": "Snippet for the delete_custom_class call in the Adaptation service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_custom_class.", - "file": "adaptation/delete_custom_class.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_custom_class", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client#delete_custom_class", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Adaptation::Client", - "full_name": "::Google::Cloud::Speech::V1p1beta1::Adaptation::Client" - }, - "method": { - "short_name": "DeleteCustomClass", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation.DeleteCustomClass", - "service": { - "short_name": "Adaptation", - "full_name": "google.cloud.speech.v1p1beta1.Adaptation" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/long_running_recognize.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/long_running_recognize.rb deleted file mode 100644 index eb1d313092dd..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/long_running_recognize.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Speech_LongRunningRecognize_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the long_running_recognize call in the Speech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Speech::Client#long_running_recognize. -# -def long_running_recognize - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new - - # Call the long_running_recognize method. - result = client.long_running_recognize request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END speech_v1p1beta1_generated_Speech_LongRunningRecognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/recognize.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/recognize.rb deleted file mode 100644 index cd26986de973..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/recognize.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Speech_Recognize_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the recognize call in the Speech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Speech::Client#recognize. -# -def recognize - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new - - # Call the recognize method. - result = client.recognize request - - # The returned object is of type Google::Cloud::Speech::V1p1beta1::RecognizeResponse. - p result -end -# [END speech_v1p1beta1_generated_Speech_Recognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/streaming_recognize.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/streaming_recognize.rb deleted file mode 100644 index 719413e3c9a3..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/snippets/speech/streaming_recognize.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START speech_v1p1beta1_generated_Speech_StreamingRecognize_sync] -require "google/cloud/speech/v1p1beta1" - -## -# Snippet for the streaming_recognize call in the Speech service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Speech::V1p1beta1::Speech::Client#streaming_recognize. -# -def streaming_recognize - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Speech::V1p1beta1::Speech::Client.new - - # Create an input stream. - input = Gapic::StreamInput.new - - # Call the streaming_recognize method to start streaming. - output = client.streaming_recognize input - - # Send requests on the stream. For each request object, set fields by - # passing keyword arguments. Be sure to close the stream when done. - input << Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new - input << Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new - input.close - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse - output.each do |current_response| - p current_response - end -end -# [END speech_v1p1beta1_generated_Speech_StreamingRecognize_sync] diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_test.rb deleted file mode 100644 index 5b544b26135c..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_paths_test.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/speech/v1p1beta1/adaptation" - -class ::Google::Cloud::Speech::V1p1beta1::Adaptation::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path - end - end - - def test_crypto_key_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_version_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path - end - end - - def test_custom_class_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.custom_class_path project: "value0", location: "value1", custom_class: "value2" - assert_equal "projects/value0/locations/value1/customClasses/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_phrase_set_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.phrase_set_path project: "value0", location: "value1", phrase_set: "value2" - assert_equal "projects/value0/locations/value1/phraseSets/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_test.rb deleted file mode 100644 index edcb942810ca..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_rest_test.rb +++ /dev/null @@ -1,649 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb" -require "google/cloud/speech/v1p1beta1/adaptation/rest" - - -class ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_phrase_set - # Create test objects. - client_result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - phrase_set_id = "hello world" - phrase_set = {} - - create_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_create_phrase_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_phrase_set parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_phrase_set ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_phrase_set(::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_phrase_set_client_stub.call_count - end - end - end - - def test_get_phrase_set - # Create test objects. - client_result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_get_phrase_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_phrase_set({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_phrase_set name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_phrase_set ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_phrase_set({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_phrase_set(::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_phrase_set_client_stub.call_count - end - end - end - - def test_list_phrase_set - # Create test objects. - client_result = ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_list_phrase_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_phrase_set parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_phrase_set ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_phrase_set(::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_phrase_set_client_stub.call_count - end - end - end - - def test_update_phrase_set - # Create test objects. - client_result = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - phrase_set = {} - update_mask = {} - - update_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_update_phrase_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_phrase_set phrase_set: phrase_set, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_phrase_set ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_phrase_set(::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_phrase_set_client_stub.call_count - end - end - end - - def test_delete_phrase_set - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_phrase_set_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_delete_phrase_set_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_phrase_set({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_phrase_set name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_phrase_set ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_phrase_set({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_phrase_set(::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_phrase_set_client_stub.call_count - end - end - end - - def test_create_custom_class - # Create test objects. - client_result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - custom_class_id = "hello world" - custom_class = {} - - create_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_create_custom_class_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_custom_class parent: parent, custom_class_id: custom_class_id, custom_class: custom_class do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_custom_class ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_custom_class(::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_custom_class_client_stub.call_count - end - end - end - - def test_get_custom_class - # Create test objects. - client_result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_get_custom_class_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_custom_class({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_custom_class name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_custom_class ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_custom_class({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_custom_class(::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_custom_class_client_stub.call_count - end - end - end - - def test_list_custom_classes - # Create test objects. - client_result = ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_custom_classes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_list_custom_classes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_custom_classes_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_custom_classes parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_custom_classes ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_custom_classes(::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_custom_classes_client_stub.call_count - end - end - end - - def test_update_custom_class - # Create test objects. - client_result = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - custom_class = {} - update_mask = {} - - update_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_update_custom_class_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_custom_class custom_class: custom_class, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_custom_class ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_custom_class(::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_custom_class_client_stub.call_count - end - end - end - - def test_delete_custom_class - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_custom_class_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::ServiceStub.stub :transcode_delete_custom_class_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_custom_class({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_custom_class name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_custom_class ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_custom_class({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_custom_class(::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_custom_class_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Adaptation::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_test.rb deleted file mode 100644 index 45d5c248278e..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/adaptation_test.rb +++ /dev/null @@ -1,714 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/speech/v1p1beta1/cloud_speech_adaptation_pb" -require "google/cloud/speech/v1p1beta1/adaptation" - -class ::Google::Cloud::Speech::V1p1beta1::Adaptation::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_phrase_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - phrase_set_id = "hello world" - phrase_set = {} - - create_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_phrase_set, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["phrase_set_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::PhraseSet), request["phrase_set"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_phrase_set parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_phrase_set ::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_phrase_set({ parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_phrase_set(::Google::Cloud::Speech::V1p1beta1::CreatePhraseSetRequest.new(parent: parent, phrase_set_id: phrase_set_id, phrase_set: phrase_set), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_phrase_set_client_stub.call_rpc_count - end - end - - def test_get_phrase_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_phrase_set, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_phrase_set({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_phrase_set name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_phrase_set ::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_phrase_set({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_phrase_set(::Google::Cloud::Speech::V1p1beta1::GetPhraseSetRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_phrase_set_client_stub.call_rpc_count - end - end - - def test_list_phrase_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_phrase_set, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_phrase_set parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_phrase_set ::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_phrase_set({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_phrase_set(::Google::Cloud::Speech::V1p1beta1::ListPhraseSetRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_phrase_set_client_stub.call_rpc_count - end - end - - def test_update_phrase_set - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1p1beta1::PhraseSet.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - phrase_set = {} - update_mask = {} - - update_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_phrase_set, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::PhraseSet), request["phrase_set"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_phrase_set phrase_set: phrase_set, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_phrase_set ::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_phrase_set({ phrase_set: phrase_set, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_phrase_set(::Google::Cloud::Speech::V1p1beta1::UpdatePhraseSetRequest.new(phrase_set: phrase_set, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_phrase_set_client_stub.call_rpc_count - end - end - - def test_delete_phrase_set - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_phrase_set_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_phrase_set, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_phrase_set_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_phrase_set({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_phrase_set name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_phrase_set ::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_phrase_set({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_phrase_set(::Google::Cloud::Speech::V1p1beta1::DeletePhraseSetRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_phrase_set_client_stub.call_rpc_count - end - end - - def test_create_custom_class - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - custom_class_id = "hello world" - custom_class = {} - - create_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_custom_class, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["custom_class_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::CustomClass), request["custom_class"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_custom_class parent: parent, custom_class_id: custom_class_id, custom_class: custom_class do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_custom_class ::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_custom_class({ parent: parent, custom_class_id: custom_class_id, custom_class: custom_class }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_custom_class(::Google::Cloud::Speech::V1p1beta1::CreateCustomClassRequest.new(parent: parent, custom_class_id: custom_class_id, custom_class: custom_class), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_custom_class_client_stub.call_rpc_count - end - end - - def test_get_custom_class - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_custom_class, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_custom_class({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_custom_class name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_custom_class ::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_custom_class({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_custom_class(::Google::Cloud::Speech::V1p1beta1::GetCustomClassRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_custom_class_client_stub.call_rpc_count - end - end - - def test_list_custom_classes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_custom_classes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_custom_classes, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_custom_classes_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_custom_classes parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_custom_classes ::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_custom_classes({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_custom_classes(::Google::Cloud::Speech::V1p1beta1::ListCustomClassesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_custom_classes_client_stub.call_rpc_count - end - end - - def test_update_custom_class - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1p1beta1::CustomClass.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - custom_class = {} - update_mask = {} - - update_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_custom_class, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::CustomClass), request["custom_class"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_custom_class custom_class: custom_class, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_custom_class ::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_custom_class({ custom_class: custom_class, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_custom_class(::Google::Cloud::Speech::V1p1beta1::UpdateCustomClassRequest.new(custom_class: custom_class, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_custom_class_client_stub.call_rpc_count - end - end - - def test_delete_custom_class - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_custom_class_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_custom_class, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_custom_class_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_custom_class({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_custom_class name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_custom_class ::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_custom_class({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_custom_class(::Google::Cloud::Speech::V1p1beta1::DeleteCustomClassRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_custom_class_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Adaptation::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_test.rb deleted file mode 100644 index 9b7d530e92fd..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/speech/v1p1beta1/cloud_speech_pb" -require "google/cloud/speech/v1p1beta1/cloud_speech_services_pb" -require "google/cloud/speech/v1p1beta1/speech" - -class ::Google::Cloud::Speech::V1p1beta1::Speech::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1p1beta1::Speech::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Speech::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_test.rb deleted file mode 100644 index 9572a99afe91..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/speech/v1p1beta1/speech" - -class ::Google::Cloud::Speech::V1p1beta1::Speech::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path - end - end - - def test_crypto_key_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_version_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3", crypto_key_version: "value4" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3/cryptoKeyVersions/value4", path - end - end - - def test_custom_class_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.custom_class_path project: "value0", location: "value1", custom_class: "value2" - assert_equal "projects/value0/locations/value1/customClasses/value2", path - end - end - - def test_phrase_set_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.phrase_set_path project: "value0", location: "value1", phrase_set: "value2" - assert_equal "projects/value0/locations/value1/phraseSets/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_test.rb deleted file mode 100644 index 64c9cc539b53..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_rest_test.rb +++ /dev/null @@ -1,210 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/speech/v1p1beta1/cloud_speech_pb" -require "google/cloud/speech/v1p1beta1/speech/rest" - - -class ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_recognize - # Create test objects. - client_result = ::Google::Cloud::Speech::V1p1beta1::RecognizeResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - config = {} - audio = {} - - recognize_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::ServiceStub.stub :transcode_recognize_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, recognize_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.recognize({ config: config, audio: audio }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.recognize config: config, audio: audio do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.recognize ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new(config: config, audio: audio) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.recognize({ config: config, audio: audio }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.recognize(::Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new(config: config, audio: audio), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, recognize_client_stub.call_count - end - end - end - - def test_long_running_recognize - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - config = {} - audio = {} - output_config = {} - - long_running_recognize_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::ServiceStub.stub :transcode_long_running_recognize_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, long_running_recognize_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.long_running_recognize({ config: config, audio: audio, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.long_running_recognize config: config, audio: audio, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.long_running_recognize ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.long_running_recognize({ config: config, audio: audio, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.long_running_recognize(::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, long_running_recognize_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Speech::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_test.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_test.rb deleted file mode 100644 index a6e3e98d8da1..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/google/cloud/speech/v1p1beta1/speech_test.rb +++ /dev/null @@ -1,334 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/speech/v1p1beta1/cloud_speech_pb" -require "google/cloud/speech/v1p1beta1/speech" - -class ::Google::Cloud::Speech::V1p1beta1::Speech::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_recognize - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1p1beta1::RecognizeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - config = {} - audio = {} - - recognize_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :recognize, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::RecognitionConfig), request["config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::RecognitionAudio), request["audio"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, recognize_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.recognize({ config: config, audio: audio }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.recognize config: config, audio: audio do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.recognize ::Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new(config: config, audio: audio) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.recognize({ config: config, audio: audio }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.recognize(::Google::Cloud::Speech::V1p1beta1::RecognizeRequest.new(config: config, audio: audio), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, recognize_client_stub.call_rpc_count - end - end - - def test_long_running_recognize - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - config = {} - audio = {} - output_config = {} - - long_running_recognize_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :long_running_recognize, name - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::RecognitionConfig), request["config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::RecognitionAudio), request["audio"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::TranscriptOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, long_running_recognize_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.long_running_recognize({ config: config, audio: audio, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.long_running_recognize config: config, audio: audio, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.long_running_recognize ::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.long_running_recognize({ config: config, audio: audio, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.long_running_recognize(::Google::Cloud::Speech::V1p1beta1::LongRunningRecognizeRequest.new(config: config, audio: audio, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, long_running_recognize_client_stub.call_rpc_count - end - end - - def test_streaming_recognize - # Create GRPC objects. - grpc_response = ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a bidi streaming method. - streaming_config = {} - - streaming_recognize_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :streaming_recognize, name - assert_kind_of Enumerable, request - refute_nil options - request - end - - Gapic::ServiceStub.stub :new, streaming_recognize_client_stub do - # Create client - c = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - - # Use enumerable object with hash and protobuf object. - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new streaming_config: streaming_config - enum_input = [request_hash, request_proto].to_enum - c.streaming_recognize enum_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common). - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new streaming_config: streaming_config - stream_input = Gapic::StreamInput.new - c.streaming_recognize stream_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Use enumerable object with hash and protobuf object with options. - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new streaming_config: streaming_config - enum_input = [request_hash, request_proto].to_enum - c.streaming_recognize enum_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common) with options. - request_hash = { streaming_config: streaming_config } - request_proto = ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest.new streaming_config: streaming_config - stream_input = Gapic::StreamInput.new - c.streaming_recognize stream_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Verify method calls - assert_equal 4, streaming_recognize_client_stub.call_rpc_count - streaming_recognize_client_stub.requests.each do |request| - request.to_a.each do |r| - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::StreamingRecognizeRequest, r - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Speech::V1p1beta1::StreamingRecognitionConfig), r["streaming_config"] - assert_equal :streaming_config, r.streaming_request - end - end - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Speech::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Speech::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Speech::V1p1beta1::Speech::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Speech::V1p1beta1::Speech::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-speech-v1p1beta1/test/helper.rb b/owl-bot-staging/google-cloud-speech-v1p1beta1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-speech-v1p1beta1/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"